_id stringlengths 64 64 | repository stringlengths 6 84 | name stringlengths 4 110 | content stringlengths 0 248k | license null | download_url stringlengths 89 454 | language stringclasses 7
values | comments stringlengths 0 74.6k | code stringlengths 0 248k |
|---|---|---|---|---|---|---|---|---|
6675476a550251d35515776b6b793bc8d5b1c591105aafacd32594ab27a23ddc | NorfairKing/easyspec | Archive.hs | module EasySpec.Evaluate.Analyse.Archive where
import Import
import Development.Shake
import Development.Shake.Path
import EasySpec.Evaluate.Analyse.Common
import EasySpec.Evaluate.Analyse.Data.Files
import EasySpec.Evaluate.Analyse.Plots.Files
archiveRule :: String
archiveRule = "zip"
archiveRules :: Rules ()
arc... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/easyspec-evaluate/src/EasySpec/Evaluate/Analyse/Archive.hs | haskell | module EasySpec.Evaluate.Analyse.Archive where
import Import
import Development.Shake
import Development.Shake.Path
import EasySpec.Evaluate.Analyse.Common
import EasySpec.Evaluate.Analyse.Data.Files
import EasySpec.Evaluate.Analyse.Plots.Files
archiveRule :: String
archiveRule = "zip"
archiveRules :: Rules ()
arc... | |
0da96c08040d5ae7b46a41a4c51f5f2655f737aa9bfa7ff1f0df0c4ac4907699 | static-analysis-engineering/codehawk | bCHAnalysisTypes.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/45f39248b404eeab91ae225243d79ec0583c3331/CodeHawk/CHB/bchanalyze/bCHAnalysisTypes.mli | ocaml | chutil
bchlib
bchlibx86 | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
f263be72d0c16406f9f8576a41e39d7a43b7a3fee53911e0fddf16771fcc70be | dalaing/little-languages | Pretty.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Pretty printers for terms of the NB language .
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
Pretty printers for term... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/nb/src/Term/Pretty.hs | haskell | from 'base'
from 'ansi-wl-pprint'
local
$setup
O
| A pretty printer for 'TmSucc'
S O
| A pretty printer for 'TmPred'
pred O
False
True
if False
then False
else True
isZero S O
This function is built from the contents of 'prettyTermRules'.
It will print "???" if none of the rules apply - which s... | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Pretty printers for terms of the NB language .
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
Pretty printers for term... |
1904200d6e54bee6b367550eff6af260b88ff9a9e4a40ddd43d7386f56478783 | samrocketman/home | gimp-wb-puzzle.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the License , or
; (at your option) any later ve... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/gimp-wb-puzzle.scm | scheme | The GIMP -- an image manipulation program
This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
... | Copyright ( C ) 1995 and
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 675 Mass Ave , Cambridge , , USA .
Copyright ( C ) 2008 < >
(define (script-fu-wb-puzzle aimg adraw puzzlewidth puzzleh... |
826be9119f85444eb4f28d5bc395f7e84c97a55928642c560a8c22c1550ecebb | adlai/scalpl | bit2c.lisp | (defpackage #:scalpl.bit2c
(:nicknames #:bit2c) (:export #:*bit2c* #:bit2c-gate)
(:use #:cl #:base64 #:chanl #:anaphora #:local-time #:scalpl.util
;; #:|| #+(and) #-(or) #:\\require-X3J13 #:deterministic-gc
#:scalpl.actor #:scalpl.exchange))
(in-package #:scalpl.bit2c)
;;; General Parameters
(defparamete... | null | https://raw.githubusercontent.com/adlai/scalpl/39a0d49be18f36b0f339fc5482e946924b658e21/bit2c.lisp | lisp | #:|| #+(and) #-(or) #:\\require-X3J13 #:deterministic-gc
General Parameters
... was that contract smart?
the rate limit should never get hit!
why special-case these, here?
ideally, this info should be read out of the <script>
tag at the end of ,
although that footer includes delisted coins!
Public Data API
... | (defpackage #:scalpl.bit2c
(:nicknames #:bit2c) (:export #:*bit2c* #:bit2c-gate)
(:use #:cl #:base64 #:chanl #:anaphora #:local-time #:scalpl.util
#:scalpl.actor #:scalpl.exchange))
(in-package #:scalpl.bit2c)
(defparameter *base-url* "/")
(setf cl+ssl:*make-ssl-client-stream-verify-default*
(and (and (ye... |
cb55dfb90ad52b247f36a1425de7dc5bf9671c3b6b874f1f367e359c9232b407 | ssor/erlangDemos | reg.erl | -module(reg).
-export([add_port/1, delete_port/1, add_handler/2
, delete_handler/2, list_current_ports/0
% , start_port_from_config/0
, get_current_lease_time/1, set_lease_time/2
, refresh_port_filter_list/0
, get_port_filter_list/0
, event_call/2
, event_notify/2]).
% start_port_from_config() ->
% ca... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/rfid_event_generator/src/reg.erl | erlang | , start_port_from_config/0
start_port_from_config() ->
case file:consult("config.dat") of
{error, enoent} ->
io:format("config file does not exist~n");
{ok, Config} ->
lists : foreach(fun({Port } ) - > io : format("File - > Port - > ~p ~ n " , [ Port ] ) end , PortList )
% io:format("-> ~p~n", [Conf... | -module(reg).
-export([add_port/1, delete_port/1, add_handler/2
, delete_handler/2, list_current_ports/0
, get_current_lease_time/1, set_lease_time/2
, refresh_port_filter_list/0
, get_port_filter_list/0
, event_call/2
, event_notify/2]).
[ { ports , PortList } ] = Config ,
lists : foreach(fun(... |
3a9af90b83e36c07e6f9b1a0ad0b65232d0d0058338e7763ccadf645700b6c7c | zellige/hastile | Controllers.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeOperators #-}
module Hastile.Controllers
( publicHastileServer
, authenticatedHastileServer
) where
import Control.Monad.Error.Class
import qualified Control.Monad.... | null | https://raw.githubusercontent.com/zellige/hastile/4dabe66bd997e91128ab4136b6f40da51c204a2b/src/Hastile/Controllers.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators # | # LANGUAGE MultiParamTypeClasses #
module Hastile.Controllers
( publicHastileServer
, authenticatedHastileServer
) where
import Control.Monad.Error.Class
import qualified Control.Monad.IO.Class as MonadIO
import qualified Control.Monad.Reader.Class as MonadReaderClass
import qualified Data.Aeson ... |
97fe7cc0f14e39685d4b13a418ce7034ae19627572d2d2c0cedc789a57fdb6fe | privet-kitty/cl-competitive | perfect-kth-powers.lisp | (defpackage :cp/test/perfect-kth-powers
(:use :cl :fiveam :cp/perfect-kth-powers :cp/linear-sieve :cp/mod-power)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/perfect-kth-powers)
(in-suite base-suite)
(test perfect-kth-powers
(let ((*test-dribble* nil)
(minfactor-table (make-minfactor-t... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/perfect-kth-powers.lisp | lisp | (defpackage :cp/test/perfect-kth-powers
(:use :cl :fiveam :cp/perfect-kth-powers :cp/linear-sieve :cp/mod-power)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/perfect-kth-powers)
(in-suite base-suite)
(test perfect-kth-powers
(let ((*test-dribble* nil)
(minfactor-table (make-minfactor-t... | |
3bdeec01f22407a75f2839e5f3c1a354b0cda50182116834223407aa6a3aa4bf | ocaml/opam-file-format | opamParserTypes.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2020 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam-file-format/d99af5e8f3b917770b3c8d29f55d865fcab3b899/src/opamParserTypes.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2020 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
]
type file_name = string
type pos = file_name * int * int
module FullPos... |
68eb2aa2840051a982f8d6fb9958af0bb9703fbd1e8e2607015dd0739576b075 | flavioc/cl-hurd | msg-option.lisp |
(in-package :mach)
;;
;; This file defines the mach_msg_option_t foreign type.
;;
(defbitfield msg-option
(:msg-option-none 0)
(:send-msg #x01)
(:rcv-msg #x02)
(:send-timeout #x010)
(:send-notify #x020)
(:send-interrupt #x040)
(:send-cancel #x080)
(:rcv-timeout #x0100)
(:rcv-notify #x0200)
(:rcv-... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/mach/msg-option.lisp | lisp |
This file defines the mach_msg_option_t foreign type.
|
(in-package :mach)
(defbitfield msg-option
(:msg-option-none 0)
(:send-msg #x01)
(:rcv-msg #x02)
(:send-timeout #x010)
(:send-notify #x020)
(:send-interrupt #x040)
(:send-cancel #x080)
(:rcv-timeout #x0100)
(:rcv-notify #x0200)
(:rcv-interrupt #x0400)
(:rcv-large #x0800))
|
e106ade271651e9de7d51c6b08ef59bd8fdbd06c049d6a87d59ccad811b0b399 | hackwaly/ocamlearlybird | list.ml |
* BatList - additional and modified functions for lists .
* Copyright ( C ) 2003
* Copyright ( C ) 2003
* Copyright ( C ) 2008 Red Hat Inc.
* Copyright ( C ) 2008 , LIFO , Universite d'Orleans
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms ... | null | https://raw.githubusercontent.com/hackwaly/ocamlearlybird/165174e3cc749ba416ec7ebfb4b521e5fac744db/src/ground/list.ml | ocaml |
* BatList - additional and modified functions for lists .
* Copyright ( C ) 2003
* Copyright ( C ) 2003
* Copyright ( C ) 2008 Red Hat Inc.
* Copyright ( C ) 2008 , LIFO , Universite d'Orleans
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms ... | |
7d5fade61ec94756f071ed03ffbb1762667b9a34581344bc593e34f726c0ad12 | mbenke/zpf2012 | DotMain.hs | import Data.Array.Parallel
import Data.Array.Parallel.PArray (PArray, fromList)
import DotP (dotp_wrapper) -- import vectorised code
main :: IO ()
main
= let v = fromList [1..10] -- convert lists...
w = fromList [1,2..20] -- ...to parallel arrays
result = dotp_wrapper v w -- invo... | null | https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Code/dph/DotMain.hs | haskell | import vectorised code
convert lists...
...to parallel arrays
invoke vectorised code
print the result | import Data.Array.Parallel
import Data.Array.Parallel.PArray (PArray, fromList)
main :: IO ()
main
in
|
efcde3599de889236931dbffb9f34df692482004834c6cafc913c591e251e90c | klutometis/aima | scrabble-server.scm | #!/usr/bin/env chicken-scheme
[ [ file:~/prg / scm / aima / aima.org::*5.5][5\.5:5 ] ]
(include "scrabble.scm")
(use alist-lib
debug
loops
medea
srfi-1
zmq)
(define (play game players)
((game-init game) (game-state game) players)
(let iter ((round-robin (apply circular-list players)))... | null | https://raw.githubusercontent.com/klutometis/aima/df78e161f22ddb677dbf2fa819e5a4869be22f50/scrabble-server.scm | scheme | Players isn't part of the game-state, huh?
Successful move, go to the next player.
Circular; some failure to move. Should the player
forfeit? That's up to the game, isn't it?
(players (list (make-scrabble-player lexicon)
(make-scrabble-player lexicon)))
Ugly
5\.5:5 ends here | #!/usr/bin/env chicken-scheme
[ [ file:~/prg / scm / aima / aima.org::*5.5][5\.5:5 ] ]
(include "scrabble.scm")
(use alist-lib
debug
loops
medea
srfi-1
zmq)
(define (play game players)
((game-init game) (game-state game) players)
(let iter ((round-robin (apply circular-list players)))... |
cfbf36a57c7753c28e5d008ee29f4e1a8930f9775b529345698bced24c30297d | anmonteiro/ocaml-h2 | gen_static.ml | ----------------------------------------------------------------------------
Copyright ( c ) 2019
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of sourc... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/1aea7e0aebb2c440dc35ef35ca15d87d44799f4e/hpack/util/gen_static.ml | ocaml | ----------------------------------------------------------------------------
Copyright ( c ) 2019
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of sourc... | |
84d1af59a423f7094c57e7c063a22e6f651fa636fd4e85a42cf25d886a7bf20a | mstewartgallus/hs-callbypushvalue | AsOptimized.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Cps.AsOptimized (Simplifier, extract) where
import Cps
import Common
import Control.Category
import HasCode
import HasConstants
import HasData
import HasLet
import HasTerminal
import HasTuple
import HasStack... | null | https://raw.githubusercontent.com/mstewartgallus/hs-callbypushvalue/d8770b7e9e444e1261901f5ee435fcefb0f7ad75/src/Cps/AsOptimized.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Cps.AsOptimized (Simplifier, extract) where
import Cps
import Common
import Control.Category
import HasCode
import HasConstants
import HasData
import HasLet
import HasTerminal
import HasTuple
import HasStack
import NatTrans
import AsCompose ((:.:))
import Co... |
a1c7ff72e12ae329a4d992094b36774c82e407cc3e78c8dd9fee24e089daae40 | pfdietz/ansi-test | prog1.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Oct 19 09:37:14 2002
Contains : Tests for PROG1
(deftest prog1.1
(prog1 'a)
a)
(deftest prog1.2
(prog1 'a 'b)
a)
(deftest prog1.3
(prog1 (values 'a 'b) 'c)
a)
(deftest prog1.4
(prog1 (values) 'c)
nil)
(deftest prog1.5
(let ((x 0))
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/data-and-control-flow/prog1.lsp | lisp | -*- Mode: Lisp -*-
Test that explicit calls to macroexpand in subforms
are done in the correct environment | Author :
Created : Sat Oct 19 09:37:14 2002
Contains : Tests for PROG1
(deftest prog1.1
(prog1 'a)
a)
(deftest prog1.2
(prog1 'a 'b)
a)
(deftest prog1.3
(prog1 (values 'a 'b) 'c)
a)
(deftest prog1.4
(prog1 (values) 'c)
nil)
(deftest prog1.5
(let ((x 0))
(values (prog1 x (incf x... |
bc9e566116aa63743f48837769201a2e1f39c3773d403a030e0d090cc4a14467 | lispm/FRL | set.lisp | (include declar)
(comment Set Operations) ;-*-Lisp-*-
;;; >>>>> May want to use LIBLSP; SET FASL instead.
(defun SETIFY (l)
;; returns L with all duplicates (compared using
EQUAL ) removed . The order is unchanged .
(cond((null l) nil)
(t
(do ((set (list (car l)))
... | null | https://raw.githubusercontent.com/lispm/FRL/1a2aadf71062a89474b1164e4539911011b3b63e/util/set.lisp | lisp | -*-Lisp-*-
>>>>> May want to use LIBLSP; SET FASL instead.
returns L with all duplicates (compared using
returns L with all duplicates (compared using
EQ) removed. The order is unchanged.
(SETMINUS a b) returns all elements of a not in b.
*** Rewrite setminus to be a LEXPR ***
UNION takes the union of any numb... | (include declar)
(defun SETIFY (l)
EQUAL ) removed . The order is unchanged .
(cond((null l) nil)
(t
(do ((set (list (car l)))
(remainder (cdr l) (cdr remainder)))
((null remainder) (nreverse set))
(cond((not (member (car r... |
bb03e21471a6be2d47bc793879313127aa638b8e140a158791a9e0d233c56e07 | owainlewis/ocaml-datastructures-algorithms | sorting.ml | (* Sorting algorithms functional and imp *)
open Utils
module type SORTSIG =
sig
val quicksort : 'a list -> 'a list
val selection_sort : 'a list -> 'a list
val insertion_sort : 'a list -> 'a list
val bubble_sort : 'a list -> 'a list
end
module SortAlgorithms : SORTSIG = struct
let rec q... | null | https://raw.githubusercontent.com/owainlewis/ocaml-datastructures-algorithms/4696fa4f5a015fc18e903b0b9ba2a1a8013a40ce/archive/sorting.ml | ocaml | Sorting algorithms functional and imp
Insertion sort using an auxilary insertion helper
* Utils *
Mutable state for array swap
Tests
********************************** |
open Utils
module type SORTSIG =
sig
val quicksort : 'a list -> 'a list
val selection_sort : 'a list -> 'a list
val insertion_sort : 'a list -> 'a list
val bubble_sort : 'a list -> 'a list
end
module SortAlgorithms : SORTSIG = struct
let rec quicksort = function
| [] -> []
| x::... |
c242797ba03ad4f53288e2fd9328988b53d24805cc6c7a9bfe9773e16cd1c0fe | iokasimov/apart | Blockchain.hs | module Data.Apart.Usage.Blockchain
(Transaction (..), Block, Blockchain, genesis, block, mainchain, verify) where
import "free" Control.Comonad.Cofree (Cofree (..))
import "base" Data.Bitraversable (Bitraversable (..))
import "base" Data.Functor.Compose (Compose (..))
import Data.Apart (Apart (..))
import Data.Apart... | null | https://raw.githubusercontent.com/iokasimov/apart/5a3a8c0cfb516d5a55121dc39f7465f572866c90/Data/Apart/Usage/Blockchain.hs | haskell | | Simplified transaction type, no certificates/keys.
| Block is just a bunch of transactions, no pointers/keys here.
| Our blockchain type is distributed - we really don't want to keep all chain in memory,
instead, we'll store balance table of all accounts in some database.
| Let's suppose that genesis is a regula... | module Data.Apart.Usage.Blockchain
(Transaction (..), Block, Blockchain, genesis, block, mainchain, verify) where
import "free" Control.Comonad.Cofree (Cofree (..))
import "base" Data.Bitraversable (Bitraversable (..))
import "base" Data.Functor.Compose (Compose (..))
import Data.Apart (Apart (..))
import Data.Apart... |
e2f04c10c041a6ef40569c6ed0dd6641f1df75ab2d27447a8d64c91f852d9ba2 | redplanetlabs/specter | macros.clj | (ns com.rpl.specter.macros
(:use [com.rpl.specter.protocols :only [RichNavigator]])
(:require [com.rpl.specter.impl :as i]))
(defn- determine-params-impls [impls]
(let [grouped (->> impls (map (fn [[n & body]] [n body])) (into {}))]
(if-not (= #{'select* 'transform*} (-> grouped keys set))
(throw (ex-inf... | null | https://raw.githubusercontent.com/redplanetlabs/specter/e8225f0e5883746c2fd17612c42334ccda6cc73d/src/clj/com/rpl/specter/macros.clj | clojure | remove the "this" param for the helper | (ns com.rpl.specter.macros
(:use [com.rpl.specter.protocols :only [RichNavigator]])
(:require [com.rpl.specter.impl :as i]))
(defn- determine-params-impls [impls]
(let [grouped (->> impls (map (fn [[n & body]] [n body])) (into {}))]
(if-not (= #{'select* 'transform*} (-> grouped keys set))
(throw (ex-inf... |
119c7bfed4c894af6bc4246934a63ba002267eada1350e72e642ce9bf5fa0731 | simonstl/introducing-erlang-2nd | drop.erl | -module(drop).
-export([drop/0]).
drop() ->
receive
{From, Planemo, Distance} ->
From ! {Planemo, Distance, fall_velocity(Planemo, Distance)},
drop()
end.
fall_velocity(earth, Distance) when Distance >= 0 -> math:sqrt(2 * 9.8 * Distance);
fall_velocity(moon, Distance) when Distance >= 0 -> math:sqrt... | null | https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch08/ex10-resilient/drop.erl | erlang | -module(drop).
-export([drop/0]).
drop() ->
receive
{From, Planemo, Distance} ->
From ! {Planemo, Distance, fall_velocity(Planemo, Distance)},
drop()
end.
fall_velocity(earth, Distance) when Distance >= 0 -> math:sqrt(2 * 9.8 * Distance);
fall_velocity(moon, Distance) when Distance >= 0 -> math:sqrt... | |
68aea76aeb75bea2cdefb4b06a36b5aed736b40a38fc70fabad89f139f536223 | Clozure/ccl-tests | plusp.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Aug 4 21:42:14 2003
Contains : Tests for PLUSP
(in-package :cl-test)
;;; Error tests
(deftest plusp.error.1
(signals-error (plusp) program-error)
t)
(deftest plusp.error.2
(signals-error (plusp 0 0) program-error)
t)
(deftest plusp.error.3
(si... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/plusp.lsp | lisp | -*- Mode: Lisp -*-
Error tests
Non-error tests | Author :
Created : Mon Aug 4 21:42:14 2003
Contains : Tests for PLUSP
(in-package :cl-test)
(deftest plusp.error.1
(signals-error (plusp) program-error)
t)
(deftest plusp.error.2
(signals-error (plusp 0 0) program-error)
t)
(deftest plusp.error.3
(signals-error (plusp 0 nil) program-error)... |
02d4195cae7b62844f599126c99e818d2255a237503bc3bdb981a0c731e82255 | adamdoupe/find_ear_rails | unify.mli |
type 'a t
val create : 'a -> 'a t
val current : 'a t -> 'a
val value : 'a t -> 'a
val ecr : 'a t -> 'a t
val union : 'a t -> 'a t -> 'a t
val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
| null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/typing/unify.mli | ocaml |
type 'a t
val create : 'a -> 'a t
val current : 'a t -> 'a
val value : 'a t -> 'a
val ecr : 'a t -> 'a t
val union : 'a t -> 'a t -> 'a t
val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b
| |
7c5863eee2520b98e990490331420d2c9e982456a16e40448bc4298b07dd5ae2 | bluelisp/hemlock | hashing.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
(in-package "SPELL")
;;; FIXME: the original code included the below comment; obviously, it
;;; utilized implementation-specific primitives to speed up hashing. is
;;; this reasonable to do?
;;;
STRING - HASH employs the instruction SXHASH - SIMPLE - SUBSTRING which t... | null | https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/unused/spell/hashing.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
FIXME: the original code included the below comment; obviously, it
utilized implementation-specific primitives to speed up hashing. is
this reasonable to do?
|
(in-package "SPELL")
STRING - HASH employs the instruction SXHASH - SIMPLE - SUBSTRING which takes
an end argument , so we do not have to use SXHASH . SXHASH would mean
doing a SUBSEQ of entry .
(declaim (inline string-hash))
(defun string-hash (string length)
(if (= length (length string))
(sxhash st... |
9b18d8f9d78a652c671f5772a99b6c57a7fb74a2a2d98c47ece9e0bdce8c1d45 | jacekschae/learn-re-frame-course-files | log_in.cljs | (ns app.auth.views.log-in
(:require [reagent.core :as r]
[re-frame.core :as rf]
[app.components.page-nav :refer [page-nav]]
[app.components.form-group :refer [form-group]]
["@smooth-ui/core-sc" :refer [Row Col FormGroup Label Input Box Button]]))
(defn log-in
[]
(l... | null | https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/22-router-dispatch/src/app/auth/views/log_in.cljs | clojure | (ns app.auth.views.log-in
(:require [reagent.core :as r]
[re-frame.core :as rf]
[app.components.page-nav :refer [page-nav]]
[app.components.form-group :refer [form-group]]
["@smooth-ui/core-sc" :refer [Row Col FormGroup Label Input Box Button]]))
(defn log-in
[]
(l... | |
cdddfbf5275596094676f40fab30eeed8f472480d1f0b7660addfea004e3b348 | imrehg/ypsilon | weight.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon pango weight)
(export pango_weight_get_type)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libpango-1.0.so.0... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/pango/weight.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon pango weight)
(export pango_weight_get_type)
(import (rnrs) (ypsilon ffi))
(define lib-name
(cond (on-linux "libpango-1.0.so.0... |
29bb19c0db119fbbe0e63429dcd8a55152387bdc8b562769094867cb14ee3672 | jellelicht/guix | pth.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2015 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundat... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/pth.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2015 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages pth)
#:use-module (guix licenses)
#:use-module ... |
797577b228348e1a5b2ca0280d0e620ac41024a583910a878d45edc9f03c7d98 | patzy/glaw | stats.lisp | (in-package #:glaw)
;; Frame timer
(defstruct frame-timer
;; time window average
in seconds
(avg-min most-positive-single-float)
(avg-max most-negative-single-float)
(time-sum 0.0)
(avg-frame-time 0.0)
(avg-nb-frames 0)
(avg-framerate 50.0)
;; instant
(instant-min most-positive-single-float)
(ins... | null | https://raw.githubusercontent.com/patzy/glaw/e678fc0c107ce4b1e3ff9921a6de7e32fd39bc37/src/stats.lisp | lisp | Frame timer
time window average
instant
all time average
update all time average framerate data
update instantaneous framerate data
update average framerate data
Frame timer singleton
Stats graphs
Frame timer grapher
Data are in order:
instant-fps, instant-frame-time
avg-fps, avg-frame-time
all-time-fps, ... | (in-package #:glaw)
(defstruct frame-timer
in seconds
(avg-min most-positive-single-float)
(avg-max most-negative-single-float)
(time-sum 0.0)
(avg-frame-time 0.0)
(avg-nb-frames 0)
(avg-framerate 50.0)
(instant-min most-positive-single-float)
(instant-max most-negative-single-float)
(instant-frame... |
f04504a42c42407a0ad1dac9e1761c8c987954ac23d166d30aeff6593c6a4d14 | metosin/kekkonen | io.clj | (ns example.io
(:require [kekkonen.core :as k]
[plumbing.core :refer [defnk]]))
(defrecord IO [io])
(defnk ^:handler save-user [data db]
(->IO
(concat
[[:io/db data]]
(if-not (@db data)
[[:io/email data]]))))
(defnk ^:io db [data db]
(swap! db conj data)
(println ".. saved... | null | https://raw.githubusercontent.com/metosin/kekkonen/5a38c52af34a0eb0f19d87e9f549e93e6d87885f/dev-src/example/io.clj | clojure | .. saved to db: Lotta
.. saved to db: Lotta
#example.io.IO{:io ([:io/db Lotta])} | (ns example.io
(:require [kekkonen.core :as k]
[plumbing.core :refer [defnk]]))
(defrecord IO [io])
(defnk ^:handler save-user [data db]
(->IO
(concat
[[:io/db data]]
(if-not (@db data)
[[:io/email data]]))))
(defnk ^:io db [data db]
(swap! db conj data)
(println ".. saved... |
d8219c1af5b0d733feaefec59d2db039a1b34c0bba3ef85aca877cfd814c99a8 | umber-lang/umber | llvm_sexp.mli | open! Import
type llvalue = Llvm.llvalue [@@deriving sexp_of]
type llmodule = Llvm.llmodule [@@deriving sexp_of]
module Opcode : sig
type t = Llvm.Opcode.t =
| Invalid (** Not an instruction *)
| Ret (** Terminator Instructions *)
| Br
| Switch
| IndirectBr
| Invoke
| Invalid2
| Unre... | null | https://raw.githubusercontent.com/umber-lang/umber/b4bb5ead4135ae8acea11d52d6bcc8cb00730989/src/llvm_sexp.mli | ocaml | * Not an instruction
* Terminator Instructions
* Standard Binary Operators
* Logical Operators
* Memory Operators
* Cast Operators
* Other Operators | open! Import
type llvalue = Llvm.llvalue [@@deriving sexp_of]
type llmodule = Llvm.llmodule [@@deriving sexp_of]
module Opcode : sig
type t = Llvm.Opcode.t =
| Br
| Switch
| IndirectBr
| Invoke
| Invalid2
| Unreachable
| FAdd
| Sub
| FSub
| Mul
| FMul
| UDiv
| SDi... |
a660a4c2b0a4207d2b22edd0bb206cd4595ad5106c9615d3525f807fcf09b082 | iambrj/imin | type-check-Cwhile.rkt | #lang racket
(require graph)
(require "multigraph.rkt")
(require "utilities.rkt")
(require (only-in "any.rkt" compile-Rany))
(require (only-in "type-check-Rlambda.rkt" typed-vars))
(require "type-check-Rany.rkt")
(require "type-check-Cany.rkt")
(provide type-check-Cwhile type-check-Cwhile-class)
;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/type-check-Cwhile.rkt | racket |
type-check-Cwhile
C-level expressions | #lang racket
(require graph)
(require "multigraph.rkt")
(require "utilities.rkt")
(require (only-in "any.rkt" compile-Rany))
(require (only-in "type-check-Rlambda.rkt" typed-vars))
(require "type-check-Rany.rkt")
(require "type-check-Cany.rkt")
(provide type-check-Cwhile type-check-Cwhile-class)
Dataflow analysis
... |
9cdd74cf80b36224384b8267080093106fabeedca441c72c5c39ef3bbb686a2a | input-output-hk/cardano-ledger | Tx.hs | module Cardano.Ledger.ShelleyMA.Tx
# DEPRECATED " Use ` Cardano . . Allegra . Tx ` from ' cardano - ledger - allegra ' package instead " #
module Cardano.Ledger.Allegra.Tx,
)
where
import Cardano.Ledger.Allegra.Tx
| null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA/Tx.hs | haskell | module Cardano.Ledger.ShelleyMA.Tx
# DEPRECATED " Use ` Cardano . . Allegra . Tx ` from ' cardano - ledger - allegra ' package instead " #
module Cardano.Ledger.Allegra.Tx,
)
where
import Cardano.Ledger.Allegra.Tx
| |
eb8e6ee9fe8bac56a2abc2ce3bd90070912dffd6950f09982a1fccead146ff34 | ericthorsen/enclojure-repl | controls.clj | (comment
;*
* Copyright ( c ) ThorTech , L.L.C .. All rights reserved .
;* The use and distribution terms for this software are covered by the
;* Eclipse Public License 1.0 (-1.0.php)
;* which can be found in the file epl-v10.html at the root of this distribution.
;* By using this software in any fashio... | null | https://raw.githubusercontent.com/ericthorsen/enclojure-repl/eeae31ba5ddccde5a1aa11a122db6e8d8a49cd8f/org-enclojure-repl-client/src/main/clojure/org/enclojure/ui/controls.clj | clojure | *
* The use and distribution terms for this software are covered by the
* Eclipse Public License 1.0 (-1.0.php)
* which can be found in the file epl-v10.html at the root of this distribution.
* By using this software in any fashion, you are agreeing to be bound by
* the terms of this license.
* You mu... | (comment
* Copyright ( c ) ThorTech , L.L.C .. All rights reserved .
* Author :
)
(ns org.enclojure.ui.controls
(:require
[org.enclojure.commons.c-slf4j :as logger]
)
(:import
(javax.swing Icon ImageIcon DefaultListModel)
(java.util.logging Level)
(java.awt Toolkit)
(java.util Date... |
41a2ec9b5c0a6e8c7b322cb0e831bebec3ba7408c3ade784983bc50220869ac4 | elaforge/karya | Util.hs | Copyright 2017
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Ness.Util where
import qualified Prelude
import Prelude hiding (putStrLn)
import qualified Control.Concurrent.Async as Async
import qualified Control.Concurrent.QSem as Q... | null | https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Ness/Util.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| I think the web service gives no way to tell if the file is complete.
Redownload manually if it was partial.
| Submit scores in their own subdirs, check the output for duplicate
responses, and pair them wi... | Copyright 2017
module Ness.Util where
import qualified Prelude
import Prelude hiding (putStrLn)
import qualified Control.Concurrent.Async as Async
import qualified Control.Concurrent.QSem as QSem
import qualified Control.Exception as Exception
import qualified Data.Bits as Bits
import Data.Bit... |
cf1f775e4fbbc81617b4ac9e49216a8434a05e51d7ba0c483822d5c038421b73 | racket/racket7 | set-two.rkt | #lang racket/base
(provide bytes-set-two!)
(define big-endian? (system-big-endian?))
(define (bytes-set-two! out-bstr j hi lo)
(cond
[big-endian?
(bytes-set! out-bstr j hi)
(bytes-set! out-bstr (+ j 1) lo)]
[else
(bytes-set! out-bstr j lo)
(bytes-set! out-bstr (+ j 1) hi)]))
| null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/common/set-two.rkt | racket | #lang racket/base
(provide bytes-set-two!)
(define big-endian? (system-big-endian?))
(define (bytes-set-two! out-bstr j hi lo)
(cond
[big-endian?
(bytes-set! out-bstr j hi)
(bytes-set! out-bstr (+ j 1) lo)]
[else
(bytes-set! out-bstr j lo)
(bytes-set! out-bstr (+ j 1) hi)]))
| |
fd8bcac37ca2301d897a9309f01124fb4eec018f1e56ce606a81e0aa7074483d | hstreamdb/hstream | Types.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/hstreamdb/hstream/125d9982d47874aee5e33324b55689d64bd664c2/common/hstream/HStream/MetaStore/Types.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
| LocalHandle FHandle
FIXME: The Operation is not atomic
TODO: if failing show which operation failed
TODO: if failing show which operation failed | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module HStream.MetaStore.Types where
import Control.Excep... |
00ddefde5fb00fa11788f97a90c47b263dc8d10938e19cf5291005cbcd874cf6 | facebook/flow | monitorRPC.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/0a121296f053100ff0a26ac79f335dbc6759692d/src/monitor/rpc/monitorRPC.ml | ocaml | Probably means someone is calling this module from a worker thread
Probably means that this is a `flow check` and there is no server monitor
The main server process will initialize this with the channels to the monitor process
Read a single message from the monitor.
Respond to a request from an ephemeral clien... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
28b7591f0e700af93819ab4cd2a4bc7dca5f8deeae60f4fa4e50626a5120cad2 | d-cent/mooncake | helper.clj | (ns mooncake.helper
(:require [ring.util.response :as r]
[clj-time.core :as c]
[clj-time.format :as f]
[mooncake.routes :as routes]
[mooncake.translation :as t]
[mooncake.view.view-helpers :as vh]))
(defn signed-in? [request]
(boolean (get-in request [:se... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src/mooncake/helper.clj | clojure | (ns mooncake.helper
(:require [ring.util.response :as r]
[clj-time.core :as c]
[clj-time.format :as f]
[mooncake.routes :as routes]
[mooncake.translation :as t]
[mooncake.view.view-helpers :as vh]))
(defn signed-in? [request]
(boolean (get-in request [:se... | |
66848144d7d788196301aa3df2b076fe9e5060cb2264cd43716c9207eb090334 | oscoin/oscoin | Orphanage.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UndecidableInstances #
module Test.Oscoin.Storage.Block.Orphanage
( tests
) where
import Oscoin.Prelude hiding (reverse)
import qualified Prelude (head, reverse)
import Oscoin.Consensus.Nakamoto (blockScore)
import Oscoin.Crypto.B... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Test/Oscoin/Storage/Block/Orphanage.hs | haskell | -----------------------------------------------------------------------------
Properties
-----------------------------------------------------------------------------
Generates a bunch of candidates and check the best one is selected.
time there is /only one/ best chain to select.
link, and we assess that the best... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UndecidableInstances #
module Test.Oscoin.Storage.Block.Orphanage
( tests
) where
import Oscoin.Prelude hiding (reverse)
import qualified Prelude (head, reverse)
import Oscoin.Consensus.Nakamoto (blockScore)
import Oscoin.Crypto.B... |
71012d29d2a08d5e5198968ffd730a0bf46efe2a3c53595275a8635b1ac47b54 | UU-ComputerScience/js-asteroids | Substitution.hs | # LANGUAGE ScopedTypeVariables , ImpredicativeTypes , TypeOperators , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
module Substitution where
import Unsafe.Coerce
class Sub a b where
upcast :: a -> b
depth 1
instance Sub (a ()) (a ()) where
upcast = id
depth 2
instance Sub (a (b ())) (a ... | null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/thesis-snippets/OO/Substitution.hs | haskell | subst :: A () -> A (forall a. a) | # LANGUAGE ScopedTypeVariables , ImpredicativeTypes , TypeOperators , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
module Substitution where
import Unsafe.Coerce
class Sub a b where
upcast :: a -> b
depth 1
instance Sub (a ()) (a ()) where
upcast = id
depth 2
instance Sub (a (b ())) (a ... |
c785631aef876f53f6643144f102f2de893c9cd3a918e35c70cf7f3ea53a30ed | the-drunk-coder/megra | megra-supercollider-event-handlers-32ch.lisp | (in-package :megra)
(defmethod handle-grain-event-sc-32ch ((g grain-event-32ch) timestamp &key)
(unless (gethash (grain-32ch-sample-location g) *sc-buffer-directory*)
(register-sample (grain-32ch-sample-location g)))
;; might save a hashtable access here ... later ...
(let ((bufnum (gethash (grain-32ch-sampl... | null | https://raw.githubusercontent.com/the-drunk-coder/megra/8d40fc4e3c2758d71895a46ea96280ed217bd348/megra-supercollider-event-handlers-32ch.lisp | lisp | might save a hashtable access here ... later ... | (in-package :megra)
(defmethod handle-grain-event-sc-32ch ((g grain-event-32ch) timestamp &key)
(unless (gethash (grain-32ch-sample-location g) *sc-buffer-directory*)
(register-sample (grain-32ch-sample-location g)))
(let ((bufnum (gethash (grain-32ch-sample-location g) *sc-buffer-directory*)))
(osc:s... |
900c84b46faebb8e191b0e9640f7b0db7841f7f0a068e84abe4db84d6eecd025 | YoshikuniJujo/test_haskell | Tools.hs | # , LambdaCase #
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Try.Tools (mainLoop, mainLoopDisplay, defaultGdkWindowAttr) where
import Control.Concurrent
import Graphics.Gdk.GdkDisplay
import Graphics.Gdk.Events
import Graphics.Gdk.EventStructures
import Graphics.Gdk.Windows.GdkWindo... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/45adfbe1e0631f8a27a45c120198507312575d77/themes/gui/gdk/try-gdk-gl/src/Try/Tools.hs | haskell | # LANGUAGE RankNTypes #
, gdkAllEventsMask | # , LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Try.Tools (mainLoop, mainLoopDisplay, defaultGdkWindowAttr) where
import Control.Concurrent
import Graphics.Gdk.GdkDisplay
import Graphics.Gdk.Events
import Graphics.Gdk.EventStructures
import Graphics.Gdk.Windows.GdkWindowAttr
import Graphics.Gdk.Wi... |
d5ec68df8d030e3d558c91e72d713874dc3acc16fcfc7cd93eae36c2015ea2a0 | AccelerateHS/accelerate | Issue439.hs | {-# LANGUAGE RankNTypes #-}
-- |
Module : Data . Array . Accelerate . Test . NoFib . Issues .
Copyright : [ 2009 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extensions )
--
-- -llvm/issues/46
--
module ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/63e53be22aef32cd0b3b6f108e637716a92b72dc/src/Data/Array/Accelerate/Test/NoFib/Issues/Issue439.hs | haskell | # LANGUAGE RankNTypes #
|
License : BSD3
Stability : experimental
-llvm/issues/46
| Module : Data . Array . Accelerate . Test . NoFib . Issues .
Copyright : [ 2009 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.Test.NoFib.Issues.Issue439 (
test_issue439
) where
import Data.Array.Accelerate ... |
f9550e10d4ff0a40b0a0da74dfc2e65d354811e75871533b1550c228ff19affd | sogaiu/alc.index-defs | fs.clj | (ns alc.index-defs.impl.fs
(:require
[clojure.string :as cs]))
(def cache
(atom {}))
(defn reset-cache!
[]
(reset! cache {}))
(defn get-content
[path]
(if-let [cached-str (get @cache path)]
cached-str
(let [slurped (slurp path)]
(swap! cache assoc
path slurped)
slurped)))
... | null | https://raw.githubusercontent.com/sogaiu/alc.index-defs/03a3c7184360c578dc8e8f42e6a453b4431b6593/src/alc/index_defs/impl/fs.clj | clojure | input
output | (ns alc.index-defs.impl.fs
(:require
[clojure.string :as cs]))
(def cache
(atom {}))
(defn reset-cache!
[]
(reset! cache {}))
(defn get-content
[path]
(if-let [cached-str (get @cache path)]
cached-str
(let [slurped (slurp path)]
(swap! cache assoc
path slurped)
slurped)))
... |
584d2a20ff4b4ea02193c5863b22b01d651230925ea60672e1f31fbcf819b760 | dalvescb/LearningHaskell_Exercises | Main.hs | # LANGUAGE ExistentialQuantification #
|
Module : HaskellExercises04.Main
Copyright : ( c ) 2020
License : GPL ( see the LICENSE file )
Maintainer : none
Stability : experimental
Portability : portable
Description :
Contains Quickcheck tests for Exercises04 and a main f... | null | https://raw.githubusercontent.com/dalvescb/LearningHaskell_Exercises/7ee9f651c897b4c6a70d1fc180eb1a5060d0e6b0/HaskellExercises04/app/Main.hs | haskell | | Main Program | # LANGUAGE ExistentialQuantification #
|
Module : HaskellExercises04.Main
Copyright : ( c ) 2020
License : GPL ( see the LICENSE file )
Maintainer : none
Stability : experimental
Portability : portable
Description :
Contains Quickcheck tests for Exercises04 and a main f... |
77455765ddcb79e0a6bc216e53a2095b05966c6fac8d47cc7b6e57b3bc39dfb8 | basho/riak_test | ts_simple_batch.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_simple_batch.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 Basho Technologies , Inc.
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(ts_simple_batch).
-beh... |
d8871b20b9328aa0bd91a4856bcb52c9258ca16aa79e9e3b17e5e1693e2f35ef | plumatic/hiphip | long_test.clj | (ns hiphip.long-test
"Benchmarks for double arrays"
(:require [hiphip.long :as hiphip])
(:import hiphip.long_.Baseline))
(load "type_impl_test") | null | https://raw.githubusercontent.com/plumatic/hiphip/d839359cc1e4c453cd6ffe0b5857de550b3d7489/test/hiphip/long_test.clj | clojure | (ns hiphip.long-test
"Benchmarks for double arrays"
(:require [hiphip.long :as hiphip])
(:import hiphip.long_.Baseline))
(load "type_impl_test") | |
63a6b8ca73c755ce2c2f41a49f3b8cb66fce43a31caedbde63511f425afbb603 | grin-compiler/ghc-wpc-sample-programs | Path.hs |
module Agda.TypeChecking.Telescope.Path where
import Prelude hiding (null)
import qualified Data.List as List
import Data.Maybe
import Agda.Syntax.Common
import Agda.Syntax.Internal
import Agda.TypeChecking.Free
import Agda.TypeChecking.Monad.Builtin
import Agda.TypeChecking.Monad
import Agda.TypeChecking.Pretty
i... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/TypeChecking/Telescope/Path.hs | haskell | can be @telViewPathBoundaryP'ed@ into (TelV Δ t, bs').
Γ.Δ ⊢ t
bs = [(i,u_i)]
Δ = Δ0,(i : I),Δ1
TODO better Type Error
assume a = 𝕀 |
module Agda.TypeChecking.Telescope.Path where
import Prelude hiding (null)
import qualified Data.List as List
import Data.Maybe
import Agda.Syntax.Common
import Agda.Syntax.Internal
import Agda.TypeChecking.Free
import Agda.TypeChecking.Monad.Builtin
import Agda.TypeChecking.Monad
import Agda.TypeChecking.Pretty
i... |
43892a2b429bca2839251b11551bd3e9836e31742ff141032fc66b542cd56930 | esl/MongooseIM | mod_dynamic_domains_test.erl | -module(mod_dynamic_domains_test).
-include("mongoose_config_spec.hrl").
-include("jlib.hrl").
-behaviour(mongoose_packet_handler).
-behaviour(gen_mod).
%% API
-export([start/2, stop/1,
config_spec/0,
supported_features/0]).
-export([process_packet/5, process_iq/5]).
-spec config_spec() -> mongoos... | null | https://raw.githubusercontent.com/esl/MongooseIM/c3383bc66ddd042553d38223fa7e2aa9f9f505fe/src/mod_dynamic_domains_test.erl | erlang | API
if we need to intercept traffic to some subdomain, we can create custom packet
handler and register it. note that IQs will be delivered to this packet handler
as well, even if an IQ handler is registered for the same subdomain. IQ handler
doesn't work at all if the IQ packet is not routed to the corresponding ... | -module(mod_dynamic_domains_test).
-include("mongoose_config_spec.hrl").
-include("jlib.hrl").
-behaviour(mongoose_packet_handler).
-behaviour(gen_mod).
-export([start/2, stop/1,
config_spec/0,
supported_features/0]).
-export([process_packet/5, process_iq/5]).
-spec config_spec() -> mongoose_confi... |
45ca73139e3dbb1423b33ad09a094585e0f706953fd7ff9876fbaaa8a0e4fcb2 | IBM-Watson/kale | login_test.clj | ;;
( C ) Copyright IBM Corp. 2016 All Rights Reserved .
;;
(ns kale.login-test
(:require [kale.login :as sut]
[kale.cloud-foundry :as cf]
[kale.persistence :refer [write-state]]
[kale.common :refer [new-line] :as common]
[kale.cloud-foundry-constants :refer :all]
... | null | https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/test/kale/login_test.clj | clojure | ( C ) Copyright IBM Corp. 2016 All Rights Reserved .
(ns kale.login-test
(:require [kale.login :as sut]
[kale.cloud-foundry :as cf]
[kale.persistence :refer [write-state]]
[kale.common :refer [new-line] :as common]
[kale.cloud-foundry-constants :refer :all]
... | |
59fb2e75433152532c2f4806c1542e971f106a1347c6dca57ebab5b8d9904d99 | froggey/Mezzano | struct.lisp | ;;;; Low-level support functions for structures.
(in-package :mezzano.runtime)
(sys.int::defglobal *structure-class-layout*) ; layout of structure-class instances
(defun structure-class-p (object)
;; If the object's layout is structure-class's slot layout,
;; then it's a structure class.
(and (sys.int::instanc... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/runtime/struct.lisp | lisp | Low-level support functions for structures.
layout of structure-class instances
If the object's layout is structure-class's slot layout,
then it's a structure class.
The structure-class class can never be reinitialized, so this
layout is permanent. There will never be obsolete instances of it.
Copy STRUCTURE slo... |
(in-package :mezzano.runtime)
(defun structure-class-p (object)
(and (sys.int::instance-p object)
(eq (sys.int::%instance-layout object) *structure-class-layout*)))
(defun sys.int::structure-object-p (object)
(structure-object-class object))
(defun find-struct-slot (class slot-name &optional (errorp t))... |
f4a9e6d77e103a0ba17ca99db238d3b7c6d780038a8006110277cdc85c92e7f2 | thattommyhall/offline-4clojure | p173.clj | ;; Intro to Destructuring 2 - Easy
Sequential destructuring allows you to bind symbols to parts of sequential things ( vectors , lists , seqs , etc . ): < a href=" / special_forms#Special Forms--(let [ bindings * ] exprs*)">(let [ bindings * ] exprs*)</a >
;;
Complete the bindings so all let - parts evaluate to 3 .
;... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p173.clj | clojure | Intro to Destructuring 2 - Easy
tags - Destructuring
restricted -
your solution here | Sequential destructuring allows you to bind symbols to parts of sequential things ( vectors , lists , seqs , etc . ): < a href=" / special_forms#Special Forms--(let [ bindings * ] exprs*)">(let [ bindings * ] exprs*)</a >
Complete the bindings so all let - parts evaluate to 3 .
(ns offline-4clojure.p173
(:use cloju... |
7c7d86399b47ec1e04d6b55bde2a89b547a0b88bc9b696d30dc6ca47b1179ee7 | polarina/sdl2 | Thread.hs | module Graphics.UI.SDL.Thread (
-- * Thread Management
createThread,
detachThread,
getThreadID,
getThreadName,
setThreadPriority,
tlsCreate,
tlsGet,
tlsSet,
threadID,
waitThread,
-- * Thread Synchronization Primitives
condBroadcast,
condSignal,
condWait,
condWaitTimeout,
createCond,
... | null | https://raw.githubusercontent.com/polarina/sdl2/4abac2793518ffc56ccda553758aed8eadf718b2/Graphics/UI/SDL/Thread.hs | haskell | * Thread Management
* Thread Synchronization Primitives
* Atomic Operations
# INLINE atomicTryLock # | module Graphics.UI.SDL.Thread (
createThread,
detachThread,
getThreadID,
getThreadName,
setThreadPriority,
tlsCreate,
tlsGet,
tlsSet,
threadID,
waitThread,
condBroadcast,
condSignal,
condWait,
condWaitTimeout,
createCond,
createMutex,
createSemaphore,
destroyCond,
destroyMutex,
... |
cff4df13f0af6c036d72cf987d56baf71071e6d0a3a7fd71fddfc87b7f8e546f | victornicolet/parsynt | Log.mli | val quiet : bool ref
val verbose : bool ref
val verb_debug : int ref
val verb_warning : bool ref
val submsg_on : bool ref
val indent : unit -> string
val error : unit Fmt.t -> unit
val info : unit Fmt.t -> unit
val debug : ?level:int -> unit Fmt.t -> unit
val success : unit Fmt.t -> unit
val warning : ?level:... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/utils/Log.mli | ocaml | val quiet : bool ref
val verbose : bool ref
val verb_debug : int ref
val verb_warning : bool ref
val submsg_on : bool ref
val indent : unit -> string
val error : unit Fmt.t -> unit
val info : unit Fmt.t -> unit
val debug : ?level:int -> unit Fmt.t -> unit
val success : unit Fmt.t -> unit
val warning : ?level:... | |
6ca713bcbca66271d2d8dcf9e70f671c84fdb91ce16fcdef5c81dbfd1b11a333 | dwayne/eopl3 | env.rkt | #lang eopl
(require "./parser.rkt")
(require "./store.rkt")
(provide
;; Build
empty-env
extend-env
extend-env-rec
;; Query
env?
apply-env
identifier? identifier=?)
(define-datatype env env?
[empty]
[extend
(var identifier?)
(val any?)
(saved-env env?)]
[extend-rec
(p-names (list-of ident... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/CALL-BY-NAME/env.rkt | racket | Build
Query | #lang eopl
(require "./parser.rkt")
(require "./store.rkt")
(provide
empty-env
extend-env
extend-env-rec
env?
apply-env
identifier? identifier=?)
(define-datatype env env?
[empty]
[extend
(var identifier?)
(val any?)
(saved-env env?)]
[extend-rec
(p-names (list-of identifier?))
(b-vars ... |
c94c6a96f1be896342c1931b57f4ef2a3b67e8bd8756ea84b8a297b01478ee29 | gas2serra/cldk | port.lisp | (in-package :cldk-xcb-backend)
(defclass cldk-xcb-port-mixin (cldk-port-mixin
cldk-backend::multi-thread-display-server
xcb-driver)
())
(defmethod port-graft-mirror-class ((port cldk-xcb-port-mixin))
'xcb-root)
(defclass xcb-graft (cldk-graft-mixin ro... | null | https://raw.githubusercontent.com/gas2serra/cldk/63c8322aedac44249ff8f28cd4f5f59a48ab1441/mcclim/Backends/XCB/port.lisp | lisp | (in-package :cldk-xcb-backend)
(defclass cldk-xcb-port-mixin (cldk-port-mixin
cldk-backend::multi-thread-display-server
xcb-driver)
())
(defmethod port-graft-mirror-class ((port cldk-xcb-port-mixin))
'xcb-root)
(defclass xcb-graft (cldk-graft-mixin ro... | |
d2fe201e77e91de228dd13a039172d2f99cc36b0a136776704175042481d7a1f | xldenis/ill | Monad.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE DeriveDataTypeable #-}
module Thrill.Infer.Monad
( module Thrill.Infer.Monad
, module Control.Monad.Unify
, module Thrill.Error
, runWriterT
) where
import Thrill.Pre... | null | https://raw.githubusercontent.com/xldenis/ill/46bb41bf5c82cd6fc4ad6d0d8d33cda9e87a671c/src/Thrill/Infer/Monad.hs | haskell | # LANGUAGE DeriveDataTypeable #
[(Name, [InstanceEntry])]
| Errors
header e = error $ "Non-exhaustive function header, constructor:" ++ (show e)
what we _do_ have in the context
| Helper functions for inference
get rid of this it doesn't work
class name
super classes
variables of class | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Thrill.Infer.Monad
( module Thrill.Infer.Monad
, module Control.Monad.Unify
, module Thrill.Error
, runWriterT
) where
import Thrill.Prelude
import Thrill.Error
import ... |
1ba007e9de9214d29d89d51df4eef17ca03533dd9aa68a56ff8df04635582062 | AdRoll/mero | mero_elasticache.erl | Copyright ( c ) 2014 , AdRoll
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%%
%% * Redistributions of source code must retain the above copyright notice, this
%% list of conditions and th... | null | https://raw.githubusercontent.com/AdRoll/mero/ed9d150ad38f1b61654d199f97531a016e450f35/src/mero_elasticache.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in... | Copyright ( c ) 2014 , AdRoll
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR LIABLE
FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLAR... |
468cd3a1b629acfdadde2fe0d064022d5430669338d3fd812eafbee7bcf340ff | mikelevins/categories | protocol-converting.scm | ;;;; ***********************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: protocol-converting.scm
;;;; Project: Categories
;;;; Purpose: the Categories object system
;;;; Author: mikel evins
Copyright : 2013 by mikel evins
;;;;
;;;; ********... | null | https://raw.githubusercontent.com/mikelevins/categories/66e3861071e4d88b7b27421a78ab497e1fb5fa0c/0.4/src/protocol-converting.scm | scheme | ***********************************************************************
FILE IDENTIFICATION
Name: protocol-converting.scm
Project: Categories
Purpose: the Categories object system
Author: mikel evins
***********************************************************************
as
type-f... | Copyright : 2013 by mikel evins
|
a1a91c5cfdc5f474229accd1955ecb41b8de734351bc7257da51302c9ddc1017 | jellelicht/guix | gem.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/scripts/import/gem.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix scripts import gem)
#:use-module (guix ui)
#:use-module (guix utils)
#:use-module (guix... |
931a9350c2fd2c4fee131ec10adb3f05e2c17ede4259ce3a4b36086e93164f2c | saevarb/haskord | Common.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeFamilies #
module Haskord.Types.Common
( module GHC.Generics
, Text
, unpack
, pack
, decodingOptions
, (<>)
, Monoid (..)
, Snowflake (..)
, MessageApplication (..)
, Emoji (..)
... | null | https://raw.githubusercontent.com/saevarb/haskord/d1bb07bcc4f3dbc29f2dfd3351ff9f16fc100c07/haskord-lib/src/Haskord/Types/Common.hs | haskell | # LANGUAGE DeriveGeneric #
TODO: Probably not right
TODO: not sure Message is right parameter
TODO: not sure Message is right parameter | # LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeFamilies #
module Haskord.Types.Common
( module GHC.Generics
, Text
, unpack
, pack
, decodingOptions
, (<>)
, Monoid (..)
, Snowflake (..)
, MessageApplication (..)
, Emoji (..)
, Word64
, Timestamps (..)
, ... |
06a8dce14eebdab708e3d66d0c7f54588743dfe2ea5339a73332a657428baac6 | Perry961002/SICP | exe4.7-letstart.scm | ;判断函数
(define (let*? exp)
(taggesd-list exp 'let*))
(define (expand-let bindings body)
(if (null? bindings)
body
(make-let (list (car bindings))
(expand-let (cdr bindings) body))))
(define (let*->nested-lets exp)
(expand-let (let-bindings exp)
(let-body e... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap4/exercise/exe4.7-letstart.scm | scheme | 判断函数 | (define (let*? exp)
(taggesd-list exp 'let*))
(define (expand-let bindings body)
(if (null? bindings)
body
(make-let (list (car bindings))
(expand-let (cdr bindings) body))))
(define (let*->nested-lets exp)
(expand-let (let-bindings exp)
(let-body exp))) |
4d0df0b9d42443e74684fc97ca02cbc699256fefdc8657d578fef92c92d8e3fa | glguy/toml-parser | Tokens.hs | |
Module : TOML.Tokens
Description : Internal : Token type and operations for TOML
Copyright : ( c ) , 2017
License : ISC
Maintainer :
This module provides the token type used in the lexer and
parser and provides the extra pass to insert layout tokens .
Module : TOML.Tokens
Desc... | null | https://raw.githubusercontent.com/glguy/toml-parser/a338e635292fa96dbcf15313f0a27c3ae1110d1f/src/TOML/Tokens.hs | haskell | ^ string literal
^ bare table key
^ integer literal
^ floating -point literal
^ offset date-time
^ local date-time
^ local time
^ local date
^ @,@
^ @.@
^ @[@
^ @[@
^ @{@
^ @=@
^ @true@
^ @false@
^ lexical error
^ end-of-file
| Errors possible in the course of lexing
^ unterminated string literal
... | |
Module : TOML.Tokens
Description : Internal : Token type and operations for TOML
Copyright : ( c ) , 2017
License : ISC
Maintainer :
This module provides the token type used in the lexer and
parser and provides the extra pass to insert layout tokens .
Module : TOML.Tokens
Desc... |
2e705ed9b69f16864e023bc2fe1299074bda9b6fb6a13f712e7292609c54518a | hyperfiddle/electric | component.clj | (comment
System DAG specified as Component
(defn example-system [{:keys [host port] :as config}]
(component/system-map
:db (new-database host port)
:scheduler (new-scheduler)
:app (component/using
(example-component config)
{:database :db
:scheduler :s... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/component.clj | clojure | (comment
System DAG specified as Component
(defn example-system [{:keys [host port] :as config}]
(component/system-map
:db (new-database host port)
:scheduler (new-scheduler)
:app (component/using
(example-component config)
{:database :db
:scheduler :s... | |
9b986f9d8fe366f91e125b0f4c92ba7230f011ab1ff6a19a6fdac123f58c61a8 | erlangonrails/devdb | riak_kv_map_localphase.erl | %% -------------------------------------------------------------------
%%
%% riak_map_localphase: node-local portion of map-phase management
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/apps/riak_kv/src/riak_kv_map_localphase.erl | erlang | -------------------------------------------------------------------
riak_map_localphase: node-local portion of map-phase management
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implie... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
13223fc3daf92ef597e365cb2acb1a8f27eabee071447874591b11bc59b2d695 | dalaing/websockets-reflex | Bounded.hs | |
Copyright : ( c ) 2017 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2017, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/dalaing/websockets-reflex/65bee7560442f5aae96f6f64fb12abeb501f5427/example/backend/src/Backend/Bounded.hs | haskell | # LANGUAGE OverloadedStrings # | |
Copyright : ( c ) 2017 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2017, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
40227f63c7781956fb68901910a5c74caa6f918cf0d2e43f8a386a83eade06d9 | qfpl/reflex-workshop | Exercise.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Types/Exercise.hs | haskell | #LANGUAGE RankNTypes #
#LANGUAGE GADTs # | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
8cbcf7100a27b606cabd656aa5d9ec7f3b81c614470eaa3d7d2ab91f90a44374 | mzp/coq-for-ipad | spill.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/asmcomp/spill.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : spill.mli 9547 2010 - 01 - 22... |
d4e60d2ff96e05b980b6fdf0884a351ed0367b2c08d3c648837f920822a9f4b4 | ucsd-progsys/mist | narrowing.hs | undefined as rforall a. a
undefined = 0
assert :: {v:Bool | v} -> Unit
assert = \tru -> Unit
-----------------------------------------------------------------------------
-- | Library ----------------------------------------------------------------
----------------------------------------------------------------------... | null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/narrowing.hs | haskell | ---------------------------------------------------------------------------
| Library ----------------------------------------------------------------
---------------------------------------------------------------------------
| Some opaque implementation of pointers to `Int` ------------------------
| Allocating a ... | undefined as rforall a. a
undefined = 0
assert :: {v:Bool | v} -> Unit
assert = \tru -> Unit
bind :: rforall a, b, p, q, r.
ST <p >q >a ->
(x:a -> ST <q >r >b) ->
ST <p >r >b
bind = undefined
thenn :: rforall a, b, p, q, r.
ST <p >q >a
-> ST <q >r >b
-> ST <p >r >b
thenn = undefined
pure :: rforall a, p,... |
90cf47ebc0deef54959526e297d6a85101d084c9d5a1bff017ccb281f4f05c1e | jeanparpaillon/erlang-dbus | dbus_auth_anonymous.erl | @author < >
( C ) 2014 ,
@doc Implements authentication
%%%
%%% See <a href="" >RFC 2245</a>
%%% for complete specification.
%%%
%%% @end
Created : 19 November 2015 by < >
-module(dbus_auth_anonymous).
-behaviour(dbus_auth).
%% dbus_auth callbacks
-export([init/0,
challenge/2]).
@doc In... | null | https://raw.githubusercontent.com/jeanparpaillon/erlang-dbus/80640bf735badca4a18753f47abbc0072b546c29/src/dbus_auth_anonymous.erl | erlang |
See <a href="" >RFC 2245</a>
for complete specification.
@end
dbus_auth callbacks
@end
@end | @author < >
( C ) 2014 ,
@doc Implements authentication
Created : 19 November 2015 by < >
-module(dbus_auth_anonymous).
-behaviour(dbus_auth).
-export([init/0,
challenge/2]).
@doc Init ANONYMOUS mechanism
-spec init() -> {ok, binary()}.
init() ->
{ok, <<"ANONYMOUS">>}.
@doc Not ... |
fb1555ec2d4c30f8cf7fa4eb7c82681dc4131a28d0cff2ba2908f0b662b1bb9b | YoshikuniJujo/funpaala | survey0.hs | import Data.Bool
type Questions a = [(a, a)]
type Answers = [Bool]
type Results a = [(Bool, (a, a))]
questions1 :: Questions String
questions1 = [
("Elephant", "Giraffe"),
("Apple", "Banana"),
("TV", "Radio"),
("Plane", "Ship"),
("Tennis", "Ski") ]
answers1 :: Answers
answers1 = [True, False, True, True, False]... | null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/12_syntaxes/survey0.hs | haskell | import Data.Bool
type Questions a = [(a, a)]
type Answers = [Bool]
type Results a = [(Bool, (a, a))]
questions1 :: Questions String
questions1 = [
("Elephant", "Giraffe"),
("Apple", "Banana"),
("TV", "Radio"),
("Plane", "Ship"),
("Tennis", "Ski") ]
answers1 :: Answers
answers1 = [True, False, True, True, False]... | |
60335b5a9690be27c816c3e10f8596262ce2c59f342b571bc26fef0142d35cec | tolysz/prepare-ghcjs | List.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , MagicHash #
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.List
Copyright : ( c ) The University of Glasgow 199... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base-pure/GHC/List.hs | haskell | # LANGUAGE BangPatterns #
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : GHC.List
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
The List data type and its operations
--------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , ScopedTypeVariables , MagicHash #
Copyright : ( c ) The University of Glasgow 1994 - 2002
Portability : non - portable ( GHC Extensions )
module GHC.List (
map, (++), filter, concat,
head, last, tail, init, uncons, null, length, (!!),
... |
5bbbf6b7d3083d43952d4f9ec3f0b53388d80b1b6569b40eb5c261f526cf9cbd | zotonic/ringbuffer | ringbuffer_process.erl | @author < >
2021
%% @doc Process to own the created ets table for the ring buffer.
Copyright 2021
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% ... | null | https://raw.githubusercontent.com/zotonic/ringbuffer/26caf8561a849e0d4f3769b647a7652ad659e5de/src/ringbuffer_process.erl | erlang | @doc Process to own the created ets table for the ring buffer.
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or im... | @author < >
2021
Copyright 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ringbuffer_process).
-behaviour(gen_server).
-export([
start_link/2,
process_pid/1,
write/2,
read/1
]).... |
57eae93f091bae7b6a88dfc301f5c7988a92c9909965e058b7c1389148b87310 | yellowtides/owenbot-hs | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : : Utils
Description : A module containing all sorts of useful macros and functions . The Appendix of owenbot .
Module: : Utils
Description : A module containing all sorts of useful macros and functions. The Appendix of owenbot.
-}
module Util... | null | https://raw.githubusercontent.com/yellowtides/owenbot-hs/9aaf66cc09b038c8c45b462ed93b77edbe0e5622/src/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
| The `FilePath` representing the location of the assets.
| `pingUser` constructs a minimal `Text` pinging the given user.
| `pingRole` constructs a minimal `Text` pinging the given role id.
| `pingWithUsername` constructs a minimal `Text` pinging the the user with the given
username... |
|
Module : : Utils
Description : A module containing all sorts of useful macros and functions . The Appendix of owenbot .
Module: : Utils
Description : A module containing all sorts of useful macros and functions. The Appendix of owenbot.
-}
module Utils
( emojiToUsableText
, sen... |
030e12e14412a9608687c2ff192fac5cf34c29b0863c2b87338e9c73819cf3c8 | lilactown/pyramid | pull.cljc | (ns pyramid.pull
(:require
[cascade.core :as cc]
[pyramid.ident :as ident]
[edn-query-language.core :as eql]))
(defprotocol IPullable
(resolve-ref [p lookup-ref] [p lookup-ref not-found]
"Given a ref [:key val], return the entity map it refers to"))
(extend-protocol IPullable
#?(:clj clojure.lang... | null | https://raw.githubusercontent.com/lilactown/pyramid/90008edab56e61286871952a11ec23b950956ffe/src/pyramid/pull.cljc | clojure | ident query
lookup-ref result
handle ordering of lists by using map/filter directly instead of into
k
f
not a coll
infinite recursion
repeat this query with the new data
handle union, which might have a visitor
handle ordering of lists by using map/filter directly instead of into
k
pred
f | (ns pyramid.pull
(:require
[cascade.core :as cc]
[pyramid.ident :as ident]
[edn-query-language.core :as eql]))
(defprotocol IPullable
(resolve-ref [p lookup-ref] [p lookup-ref not-found]
"Given a ref [:key val], return the entity map it refers to"))
(extend-protocol IPullable
#?(:clj clojure.lang... |
8a316bd74f40f7d8b6cea4d338043f7e22cf5ca2d610940e479e7725b7d7c08c | andrewthad/packed | IO.hs | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE UnboxedSums #
{-# OPTIONS_GHC -O2 #-}
module Packed.Bytes.Stream.IO
( ByteStream(..)
, empty
, singleton
, toBytes
, unpack
, fromBytes
, fromArray
, fromHandle
) where
import Data.Word (Word8)
import GHC.Exts (RealWorld,State#,Int#,ByteA... | null | https://raw.githubusercontent.com/andrewthad/packed/72437b5f99fbe745897a0a27cae72565c9727781/src/Packed/Bytes/Stream/IO.hs | haskell | # OPTIONS_GHC -O2 # | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
# LANGUAGE UnboxedSums #
module Packed.Bytes.Stream.IO
( ByteStream(..)
, empty
, singleton
, toBytes
, unpack
, fromBytes
, fromArray
, fromHandle
) where
import Data.Word (Word8)
import GHC.Exts (RealWorld,State#,Int#,ByteArray#)
import GHC.Int (I... |
52adb2277917ecd03b607498f663221ce9f66c632f9da8e58bc12ecf578b8223 | ryanpbrewster/haskell | mc_integration.hs | -- mc_integration.hs
{-
- Use Metropolis Monte-Carlo to integrate a function
- Integrate[ f[x] * rho[x] ]
- where rho[x] is a normalized sampling function.
-}
import System.Random.Mersenne
import System.Environment
import Data.List (intercalate)
foo :: Double -> Double
foo x = x ** 4
rho :: Double -> Double... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/mc_integration.hs | haskell | mc_integration.hs
- Use Metropolis Monte-Carlo to integrate a function
- Integrate[ f[x] * rho[x] ]
- where rho[x] is a normalized sampling function.
|
import System.Random.Mersenne
import System.Environment
import Data.List (intercalate)
foo :: Double -> Double
foo x = x ** 4
rho :: Double -> Double
rho x = exp (-x*x) / sqrt pi
main = do
rng <- newMTGen Nothing
rands <- randoms rng
let ans = mcIntegrate foo rho rands
putStrLn $ prettyPrint ans
p... |
e9abb8808fcbc1d4f2d0c25afd81192a2454af4be0e92605c17876aaca2b71c3 | fission-codes/fission | File.hs | module Fission.CLI.File (forceWrite, lazyForceWrite) where
import qualified RIO.ByteString.Lazy as Lazy
import qualified RIO.Text as Text
import RIO.Directory
import RIO.File
import RIO.FilePath
import Fission.Prelude
forceWrite :: (MonadIO m, MonadLogger m) => Fil... | null | https://raw.githubusercontent.com/fission-codes/fission/e07965d911c05f79b01f47aff7b76cd92d21e290/fission-cli/library/Fission/CLI/File.hs | haskell | module Fission.CLI.File (forceWrite, lazyForceWrite) where
import qualified RIO.ByteString.Lazy as Lazy
import qualified RIO.Text as Text
import RIO.Directory
import RIO.File
import RIO.FilePath
import Fission.Prelude
forceWrite :: (MonadIO m, MonadLogger m) => Fil... | |
c009daac528d730f4600387e59651791c7bdea7c74bd2e03ee1761d5804a6061 | NorfairKing/easyspec | Tree.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
module Tree where
import GHC.Generics (Generic)
import Prelude (Bool(..), Eq, Show, (++), (<$>), (<*>), pure)
import Test.QuickCheck (Arbitrary(arbitrary), Gen, oneof)
data Tree
= Leaf
| Branch Tree
Tree
deriving (Show, Eq, Generic)
... | null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples-wishlist/Tree.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
module Tree where
import GHC.Generics (Generic)
import Prelude (Bool(..), Eq, Show, (++), (<$>), (<*>), pure)
import Test.QuickCheck (Arbitrary(arbitrary), Gen, oneof)
data Tree
= Leaf
| Branch Tree
Tree
deriving (Show, Eq, Generic)
... | |
b4188c1f7921e072a130222e0499bcec760d76ddb8b455fb1dd10caace6dcd19 | rowangithub/DOrder | MADWiFi-encode_ie_ok.ml | let rec loop i p ielen bufsize (bufsizecopy:int) (leaderlen:int) =
if i < ielen && bufsize > 2 then
let _ = assert (0 <= p) in
let _ = assert (p+1 < bufsizecopy) in
(*// *p = 'x';
// *(p+1) = 'x';*)
loop (i+1) (p+2) ielen bufsize bufsizecopy leaderlen
else ()
let main leaderlen bufsize ielen =
... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/MADWiFi-encode_ie_ok.ml | ocaml | // *p = 'x';
// *(p+1) = 'x';
memcpy(p, leader, leader_len);
This is the fix. | let rec loop i p ielen bufsize (bufsizecopy:int) (leaderlen:int) =
if i < ielen && bufsize > 2 then
let _ = assert (0 <= p) in
let _ = assert (p+1 < bufsizecopy) in
loop (i+1) (p+2) ielen bufsize bufsizecopy leaderlen
else ()
let main leaderlen bufsize ielen =
copy the contents of leader into buf
if (leade... |
44bd33569fc30437fb9c7010e92f6b4c1240b392538a4d90990df8a08d21cf3f | bristolpl/intensional-datatys | Scheme.hs | {-# LANGUAGE DeriveTraversable #-}
# LANGUAGE PatternSynonyms #
module Self.Scheme
( Scheme,
SchemeGen (..),
pattern Forall,
mono,
)
where
import Binary
import Self.Constraints
import qualified Data.IntSet as I
import GhcPlugins hiding ((<>))
import Self.Types
type Scheme = SchemeGen TyCon
Constra... | null | https://raw.githubusercontent.com/bristolpl/intensional-datatys/ce6e7f5069530ea21a3e19c8e9e17fc23dc8e66c/test/Self/Scheme.hs | haskell | # LANGUAGE DeriveTraversable #
# COMPLETE Forall #
Demand a monomorphic type | # LANGUAGE PatternSynonyms #
module Self.Scheme
( Scheme,
SchemeGen (..),
pattern Forall,
mono,
)
where
import Binary
import Self.Constraints
import qualified Data.IntSet as I
import GhcPlugins hiding ((<>))
import Self.Types
type Scheme = SchemeGen TyCon
Constrained polymorphic types
data SchemeG... |
112bb240003164a94d0798d3a8653007c7b15f5ba122f91203594f170e8c65d0 | sharplispers/cxml | klacks-impl.lisp | ;;; -*- Mode: Lisp; readtable: runes; -*-
( c ) copyright 2007
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any late... | null | https://raw.githubusercontent.com/sharplispers/cxml/8701da08ba4aac30891b8d2005edb018c1d3d796/klacks/klacks-impl.lisp | lisp | -*- Mode: Lisp; readtable: runes; -*-
This library is free software; you can redistribute it and/or
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
License alo... | ( c ) copyright 2007
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Free Software Foundation , Inc. , 59 T... |
705c7d8e13df20ebb5f88c2ff9da039a719f014464037dfb672dbaba765ac75b | mcorbin/tour-of-clojure | agent.clj | creates an agent with the state of 0
(def my-agent (agent 0))
;; dereferencing the agent gives the current value
(println "Agent state is:" @my-agent)
;; sends an action to an agent
(send-off my-agent
(fn [s]
(Thread/sleep 2000) ; Doing some work like writing to a file
(inc s)))
;; agent never blocks and... | null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/agent.clj | clojure | dereferencing the agent gives the current value
sends an action to an agent
Doing some work like writing to a file
agent never blocks and the current value can be read
waiting the agent to proceed | creates an agent with the state of 0
(def my-agent (agent 0))
(println "Agent state is:" @my-agent)
(send-off my-agent
(fn [s]
(inc s)))
(println "Agent state is:" @my-agent)
(Thread/sleep 3000)
(println "Agent state is:" @my-agent)
|
2f8105994559db42751a0c2abc6eadb56851cdcaeac9ea0ff1854ceee92b055b | scymtym/clim.flamegraph | source-configuration-pane.lisp | (cl:in-package #:clim.flamegraph.application)
;;; `source-configuration-pane'
(defun display-source-configuration (frame pane)
(declare (ignore frame))
(let ((configuration (configuration pane)))
(clim:present configuration (clim:presentation-type-of configuration)
:stream pane :single-box t... | null | https://raw.githubusercontent.com/scymtym/clim.flamegraph/03b5e4f08b53af86a98afa975a8e7a29d0ddd3a7/src/application/source-configuration-pane.lisp | lisp | `source-configuration-pane'
`thread-list-pane' | (cl:in-package #:clim.flamegraph.application)
(defun display-source-configuration (frame pane)
(declare (ignore frame))
(let ((configuration (configuration pane)))
(clim:present configuration (clim:presentation-type-of configuration)
:stream pane :single-box t)))
(defclass source-configurat... |
e8c1198c0412ae17ce0a861886eb69724207c2b46251704a5c695602877a4eec | overtone/overtone | ex01_phrasestudy.clj | (ns
^{:doc "Workshop exercises in musical pattern creation with Overtone."
:author "Karsten Schmidt"}
overtone.examples.workshops.resonate2013.ex01_phrasestudy
(:use
[overtone.live]
[overtone.inst.piano]))
;; All examples are wrapped in (comment) to stop them from
;; executing all at once when the file... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/examples/workshops/resonate2013/ex01_phrasestudy.clj | clojure | All examples are wrapped in (comment) to stop them from
executing all at once when the file is loaded...
front of the opening bracket and then pressing Command+Shift+right...
the `now` fn returns the current timestamp
play minor variation (7 -> 6)
the examples in this namespace are all about thinking of music as ... | (ns
^{:doc "Workshop exercises in musical pattern creation with Overtone."
:author "Karsten Schmidt"}
overtone.examples.workshops.resonate2013.ex01_phrasestudy
(:use
[overtone.live]
[overtone.inst.piano]))
To execute an example in the REPL , select a single form ,
e.g. " ( piano 60 ) " below and pr... |
70012d8bb12c354ab095b458bc97390b781c0f69e4580a8403641ea1ff89d912 | haskell-works/hw-xml | InterestBits.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
module HaskellWorks.Data.Xml.Succinct.Cursor.InterestBits
( XmlIntere... | null | https://raw.githubusercontent.com/haskell-works/hw-xml/e30a4cd8e6dc7451263a3d45c1ae28b3f35d0079/src/HaskellWorks/Data/Xml/Succinct/Cursor/InterestBits.hs | haskell | # LANGUAGE DeriveGeneric # | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
module HaskellWorks.Data.Xml.Succinct.Cursor.InterestBits
( XmlInterestBits(..)
, getXmlInterestBits
, blanke... |
9ccb7df03e4d87ef08d7a11aff0affedd508160f6f2bff05e32c6c2da6134727 | alaricsp/chicken-scheme | fixnum-tests.scm | (define (fxo+ x y) (##core#inline "C_i_o_fixnum_plus" x y))
(define (fxo- x y) (##core#inline "C_i_o_fixnum_difference" x y))
(assert (= 4 (fxo+ 2 2)))
(assert (= -26 (fxo+ 74 -100)))
(assert (= 1073741823 (fxo+ #x3ffffffe 1)))
(assert (not (fxo+ #x3fffffff 1)))
(assert (= 4 (fxo- 6 2)))
(assert (= -4 (fxo- 1000 1004)... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/tests/fixnum-tests.scm | scheme | (define (fxo+ x y) (##core#inline "C_i_o_fixnum_plus" x y))
(define (fxo- x y) (##core#inline "C_i_o_fixnum_difference" x y))
(assert (= 4 (fxo+ 2 2)))
(assert (= -26 (fxo+ 74 -100)))
(assert (= 1073741823 (fxo+ #x3ffffffe 1)))
(assert (not (fxo+ #x3fffffff 1)))
(assert (= 4 (fxo- 6 2)))
(assert (= -4 (fxo- 1000 1004)... | |
56ab962bb40766bfb62382dff1446d466b5acd6d1ba11eb6410091152efaedca | quan-nh/adventofcode | day21.clj | (ns adventofcode2017.day21
(:require [clojure.string :as str]
[clojure.java.io :as io]))
(def input (slurp (io/resource "2017/day21")))
(def init [".#."
"..#"
"###"])
(def transpose #(apply map vector %))
(def flip #(map reverse %))
(def rotate-right (comp flip transpose))
(defn ... | null | https://raw.githubusercontent.com/quan-nh/adventofcode/98542934a121d1df85dd271d28fedc1f25b98206/src/adventofcode2017/day21.clj | clojure | (ns adventofcode2017.day21
(:require [clojure.string :as str]
[clojure.java.io :as io]))
(def input (slurp (io/resource "2017/day21")))
(def init [".#."
"..#"
"###"])
(def transpose #(apply map vector %))
(def flip #(map reverse %))
(def rotate-right (comp flip transpose))
(defn ... | |
91233c080f6d7c8091d4001f3febe554bb81f29f2746e0a5286f6b5a192c6771 | fukamachi/clozure-cl | reg.lisp | ;;;-*- Mode: Lisp; Package: CCL-*-
;;;
Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
;... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/compiler/reg.lisp | lisp | -*- Mode: Lisp; Package: CCL-*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
bits 24 - 26
(inclusive) define the type of register-spec in q... | Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as ... |
4344890c38a6ac6852fa34ab15dcbc5bbbd2e108608ed6fdbc4faa1671b057bb | fabiodomingues/clj-depend | foo.clj | (ns sample.logic.foo)
| null | https://raw.githubusercontent.com/fabiodomingues/clj-depend/3f4564cdb62816e8571a8dc7f11bc0f50e112af5/test-resources/without-violations/src/sample/logic/foo.clj | clojure | (ns sample.logic.foo)
| |
b854a8be16ea9566ca936928310aae294c504e4823590ccad0cddd365a9ecb7c | processone/ejabberd | mod_block_strangers_opt.erl | %% Generated automatically
%% DO NOT EDIT: run `make options` instead
-module(mod_block_strangers_opt).
-export([access/1]).
-export([allow_local_users/1]).
-export([allow_transports/1]).
-export([captcha/1]).
-export([drop/1]).
-export([log/1]).
-spec access(gen_mod:opts() | global | binary()) -> 'none' | acl:acl()... | null | https://raw.githubusercontent.com/processone/ejabberd/b860a25c82515ba51b044e13ea4e040e3b9bbc41/src/mod_block_strangers_opt.erl | erlang | Generated automatically
DO NOT EDIT: run `make options` instead |
-module(mod_block_strangers_opt).
-export([access/1]).
-export([allow_local_users/1]).
-export([allow_transports/1]).
-export([captcha/1]).
-export([drop/1]).
-export([log/1]).
-spec access(gen_mod:opts() | global | binary()) -> 'none' | acl:acl().
access(Opts) when is_map(Opts) ->
gen_mod:get_opt(access, Opts);... |
ed6a440dfa42a6e6ca9d05ff1180f104d3065385b37e17b5df1c0ee8fe038170 | Helium4Haskell/helium | SuspiciousFBs.hs | module SuspiciousFBs where
fun x = x
funs x = [x]
test = let suspicious :: Int -> Bool
suspiciuos 0 = True
suspicious 1 = False
suspicious n = suspicious (n-1)
in undefined
deleteIndex :: Int -> [a] -> [a]
deleteIndex _ [] = []
deleteIndex 0 (a:as) = as
deletein... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/SuspiciousFBs.hs | haskell | module SuspiciousFBs where
fun x = x
funs x = [x]
test = let suspicious :: Int -> Bool
suspiciuos 0 = True
suspicious 1 = False
suspicious n = suspicious (n-1)
in undefined
deleteIndex :: Int -> [a] -> [a]
deleteIndex _ [] = []
deleteIndex 0 (a:as) = as
deletein... | |
9dd592f43af29d2ce5a09debbee00832bf3895398577dc93d4f452247a74f22e | tokiwoousaka/ttask | Types.hs | module Data.TTask.Types
( module Data.TTask.Types.Types
, module Data.TTask.Types.Lens
, module Data.TTask.Types.Class
) where
import Data.TTask.Types.Types
import Data.TTask.Types.Lens
import Data.TTask.Types.Class
| null | https://raw.githubusercontent.com/tokiwoousaka/ttask/ef5a14ee49e9d8a1e8d0b5c35ee4ae131f4e9acc/src/Data/TTask/Types.hs | haskell | module Data.TTask.Types
( module Data.TTask.Types.Types
, module Data.TTask.Types.Lens
, module Data.TTask.Types.Class
) where
import Data.TTask.Types.Types
import Data.TTask.Types.Lens
import Data.TTask.Types.Class
| |
40df8637d96ca1fd5087d99646b32c82ba80048512db7ed860e3382c6cc9e415 | oden-lang/oden | Signature.hs | -- | This module contains values modelling the type signatures you _write_ in
source code , not the actual type expressions get in the compiler . For
example , a ' TSSymbol ' expression may refer to a type not in scope which
-- causes a compile time error.
--
-- All values are paramterized to support signatures wh... | null | https://raw.githubusercontent.com/oden-lang/oden/10c99b59c8b77c4db51ade9a4d8f9573db7f4d14/src/Oden/Type/Signature.hs | haskell | | This module contains values modelling the type signatures you _write_ in
causes a compile time error.
All values are paramterized to support signatures where the source info is
| A type expression used in type signatures and type annotations.
| A type variable binding in an explicit quantification.
| A top lev... | source code , not the actual type expressions get in the compiler . For
example , a ' TSSymbol ' expression may refer to a type not in scope which
considered metadata , i.e. not used when comparing with .
# LANGUAGE LambdaCase #
module Oden.Type.Signature where
import Oden.Identifier
import Oden.SourceInfo
da... |
cebda55fbcb6ebd18d2437e3965321a41e4cff2cb10f860cd79d729201ec3141 | fredlund/McErlang | mce_table_bit.erl | Copyright ( c ) 2009 ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions a... | null | https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/tables/src/mce_table_bit.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2009 ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
@author
2006 - 2009
@private
-module(mce_table_bit).
-export([init/1,permit_state/2,permit_state_alt/2,add_state/2,add... |
2965cb511d084832c042e69b2593b7feacbc0b312376a94dd42170cf8e34cbf3 | robert-strandh/Gsharp | packages.lisp | (defpackage :gsharp-utilities
(:shadow built-in-class)
(:use :clim-lisp)
(:export #:ninsert-element #:define-stealth-mixin
#:unicode-to-char #:char-to-unicode))
(defpackage :mf
(:use :cl)
(:export #:make-bezier-segment #:bezier-segment
#:make-open-path #:make-closed-path
#:cl... | null | https://raw.githubusercontent.com/robert-strandh/Gsharp/da3762f5d023305fba2899655175bc1ef67b57d2/packages.lisp | lisp | mf-like stuff | (defpackage :gsharp-utilities
(:shadow built-in-class)
(:use :clim-lisp)
(:export #:ninsert-element #:define-stealth-mixin
#:unicode-to-char #:char-to-unicode))
(defpackage :mf
(:use :cl)
(:export #:make-bezier-segment #:bezier-segment
#:make-open-path #:make-closed-path
#:cl... |
f3045e41b17be2de6b1653d225afb623868d3c120a3e46647cbe2dbba58c9c30 | rescript-lang/syntax | ast_helper.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-lang/syntax/c6807e87c112a22657c21f43f26e012ad4ba1ce2/compiler-libs-406/ast_helper.mli | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Helpers to produce Parsetree fragments
open Asttypes
open Docstrings
open Parsetree
type lid = Longide... |
b493e05ae6587db538d3fc7d1d11040ffcbfda18fa6defadda81196acaf3ba33 | anmonteiro/piaf | iOVec.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2020 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistribu... | null | https://raw.githubusercontent.com/anmonteiro/piaf/77f3f539f84b82cf049c20678af1898484e0ae84/lib/iOVec.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2020 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistribu... | |
dd6e1bf53cba40a94b7d3a7c913d5fd0636c7830b3cc99f3c2e5c30f2e704872 | tommaisey/aeon | atan2.help.scm | ;; (Atan2 x y)
;; Returns the arctangent of y/x.
See also hypot .
add a pan to the hypot doppler examples by using atan2 to find the
;; azimuth, or direction angle, of the sound source. Assume speakers
at + /- 45 degrees and clip the direction to between those .
(let* ((x 10)
(y (mul (lf-saw kr 1/6 0)... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/atan2.help.scm | scheme | (Atan2 x y)
Returns the arctangent of y/x.
azimuth, or direction angle, of the sound source. Assume speakers |
See also hypot .
add a pan to the hypot doppler examples by using atan2 to find the
at + /- 45 degrees and clip the direction to between those .
(let* ((x 10)
(y (mul (lf-saw kr 1/6 0) 100))
(distance (hypot x y))
(amplitude (fdiv 40 (squared distance)))
(sound (rlpf (mul (f-sin-os... |
4e7d0158ec2970302e641113339fe0b07ae790be686688132d662fc6a4468bed | fp-works/2019-winter-Haskell-school | JoinList.hs | # OPTIONS_GHC -Wall #
module JoinList where
import Scrabble
import Sized
data JoinList m a
= Empty
| Single m a
| Append m (JoinList m a) (JoinList m a)
deriving (Eq, Show)
tag :: Monoid m => JoinList m a -> m
tag Empty = mempty
tag (Single m _) = m
tag (Append _ jl1 jl2) = (tag jl1) <> (tag jl2)
exercis... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/tien/src/JoinList.hs | haskell | # OPTIONS_GHC -Wall #
module JoinList where
import Scrabble
import Sized
data JoinList m a
= Empty
| Single m a
| Append m (JoinList m a) (JoinList m a)
deriving (Eq, Show)
tag :: Monoid m => JoinList m a -> m
tag Empty = mempty
tag (Single m _) = m
tag (Append _ jl1 jl2) = (tag jl1) <> (tag jl2)
(+++) :: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.