_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
ce6e1954d579d72ea170ae5141db0f1136feb13ecd7fa62e305a4aac1033c53e
akabe/ocaml-crf
myocamlbuild.ml
OASIS_START (* DO NOT EDIT (digest: 184f3979eb04297c79b55718d0cbd066) *) module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else ...
null
https://raw.githubusercontent.com/akabe/ocaml-crf/ced26bcce559b1eda307f7a8961ac9e52905882f/myocamlbuild.ml
ocaml
DO NOT EDIT (digest: 184f3979eb04297c79b55718d0cbd066) these functions are not really officially exported ocamlfind command This lists all supported packages. Mock to list available syntaxes. By using Before_options one let command line options have an higher * priority on the contrary using After...
OASIS_START module OASISGettext = struct # 22 " src / oasis / OASISGettext.ml " let ns_ str = str let s_ str = str let f_ (str: ('a, 'b, 'c, 'd) format4) = str let fn_ fmt1 fmt2 n = if n = 1 then fmt1^^"" else fmt2^^"" let init = [] end module OASISExpr = s...
d18b2779a8fd5e967bc76179852906aeaa73dcdc0dc70f4cb34841dc18937a10
antifuchs/sbcl
cell.lisp
;;;; various primitive memory access VOPs for the x86 VM This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in th...
null
https://raw.githubusercontent.com/antifuchs/sbcl/789bf105edca031aff991ad16a5fd207812336a0/src/compiler/x86/cell.lisp
lisp
various primitive memory access VOPs for the x86 VM more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. data object ref/set stuff symbol hacking VOPs This code has to pathological cases: NO-TL...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") (define-vop (slot) (:args (object :scs (descriptor-reg))) (:info name offset lowtag) (:ignore n...
537921ba7e7e8ce258aa3268a8964c6ebf7ef3fb5328cecfbc5acec8b549f131
metaocaml/ber-metaocaml
pr7214.ml
(* TEST * expect *) type _ t = I : int t;; let f (type a) (x : a t) = let module M = struct let (I : a t) = x (* fail because of toplevel let *) let x = (I : a t) end in () ;; [%%expect{| type _ t = I : int t Line 5, characters 9-10: 5 | let (I : a t) = x (* fail because of toplevel let *...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-gadts/pr7214.ml
ocaml
TEST * expect fail because of toplevel let fail because of toplevel let Should not be allowed! must fail for soundness must fail for soundness
type _ t = I : int t;; let f (type a) (x : a t) = let module M = struct let x = (I : a t) end in () ;; [%%expect{| type _ t = I : int t Line 5, characters 9-10: ^ Error: This pattern matches values of type int t but a pattern was expected which matches values of type a t Type int ...
fd53b42c93831efdd745b2f4c0a9080b4cbf983a2c347884ce4adcd521bb03fc
LeventErkok/sbv
Counts.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Puzzles.Counts Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Test suite for Documentation.SBV.Examples.Puzzles.Counts ------------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/0d791d9f4d1de6bd915b6d7d3f9a550385cb27a5/SBVTestSuite/TestSuite/Puzzles/Counts.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Puzzles.Counts License : BSD3 Maintainer: Stability : experimental Test suite for Documentation.SBV.Examples.Puzzles.Counts --------------------------------------------------------------------------- # OPTIONS_...
Copyright : ( c ) module TestSuite.Puzzles.Counts(tests) where import Documentation.SBV.Examples.Puzzles.Counts import Utils.SBVTestFramework tests :: TestTree tests = testGroup "Puzzles.Counts" [ goldenVsStringShow "counts" countPgm ] where countPgm = runSAT $ universal_ puzzle' >>= output puzzle' ...
31dfa7703b2fee43042e8c724c1edfed1fa731ac395c8b0ed6d56d4515af0d9f
joyofclojure/book-source
unit_testing.clj
(ns joy.unit-testing (:require [joy.futures :as joy])) (def stubbed-feed-children (constantly [{:content [{:tag :title :content ["Stub"]}]}])) (defn count-feed-entries [url] (count (joy/feed-children url))) (comment (count-feed-entries "/") = > 5 (with-redefs [joy/feed-childr...
null
https://raw.githubusercontent.com/joyofclojure/book-source/b76ef15248dac88c7b1c77c2d461f3aa522a1461/src/clj/joy/unit_testing.clj
clojure
(ns joy.unit-testing (:require [joy.futures :as joy])) (def stubbed-feed-children (constantly [{:content [{:tag :title :content ["Stub"]}]}])) (defn count-feed-entries [url] (count (joy/feed-children url))) (comment (count-feed-entries "/") = > 5 (with-redefs [joy/feed-childr...
b5e712d015171e26d31661fd41b3a82a9560bc58a06b735a676705d1139fefe1
lispm/FRL
util.lisp
(include declar) ;;; -*-lisp-*- (comment Required Files) #-lispm (declare (sstatus macro /~ '(lambda () ((lambda (/~) (eval /~) /~) (read))))) #-lispm (setq /~ nil) ; ~ is a NO-OP to the interpreter. ;; Expressions preceded by ~ are read and digested by the compiler, as well as being ;; compiled and left define...
null
https://raw.githubusercontent.com/lispm/FRL/1a2aadf71062a89474b1164e4539911011b3b63e/util/util.lisp
lisp
-*-lisp-*- ~ is a NO-OP to the interpreter. Expressions preceded by ~ are read and digested by the compiler, as well as being compiled and left defined in the file. Use ~ before expressions that will be needed at at compile-time as well as load-time. Arguments are files that are required to be loaded. REQUIREDF...
(include declar) (comment Required Files) #-lispm (declare (sstatus macro /~ '(lambda () ((lambda (/~) (eval /~) /~) (read))))) #-lispm (defun REQUIREDF narg (do ((files (listify narg) (cdr files)) (f)) ((null files)) (setq f (mergef (car files) '((* *) * FASL))) ...
49bff75e753ca3be20569d5e3826688a2f54130d2771887a0688f66d69656e54
serokell/ariadne
QuickCheck.hs
-- | Wrappers around Test.QuickCheck that use 'Buildable' instead of 'Show' -- -- Intended as a drop-in replacement for "Test.QuickCheck" (but only for the -- test drivers; the properties themselves should just use "Test.QuickCheck"). module Util.Buildable.QuickCheck ( -- * Wrappers forAll , forAllShrink ...
null
https://raw.githubusercontent.com/serokell/ariadne/5f49ee53b6bbaf332cb6f110c75f7b971acdd452/ariadne/cardano/test/backend/Util/Buildable/QuickCheck.hs
haskell
| Wrappers around Test.QuickCheck that use 'Buildable' instead of 'Show' Intended as a drop-in replacement for "Test.QuickCheck" (but only for the test drivers; the properties themselves should just use "Test.QuickCheck"). * Wrappers * Re-exports -------------------------------------------------------------------...
module Util.Buildable.QuickCheck ( forAll , forAllShrink , QC.Property , QC.Gen , QC.conjoin , QC.choose ) where import Data.Coerce (coerce) import qualified Test.QuickCheck as QC import Util.Buildable forAll :: (Buildable a, QC.Testable prop) => QC.Gen a -> (a -> prop) -> QC.Property forAll ...
a35abc895c04f7ee42ed4d356c78ae98b4ea6c3b77d01de8dbe464ebf142de8c
pirapira/coq2rust
contradiction.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/tactics/contradiction.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Absurd Contradiction * [f] does ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Errors open Term open Hi...
6aa0141517200155d4c531c5f5692b96c922d73ca14e407d6141dcb37d44dbc2
AshleyYakeley/Truth
Dual.hs
module Control.Category.Dual where import Shapes.Import newtype CatDual (cat :: k -> k -> Type) (a :: k) (b :: k) = MkCatDual { unCatDual :: cat b a } instance Category cat => Category (CatDual cat) where id = MkCatDual id (MkCatDual p) . (MkCatDual q) = MkCatDual $ q . p instance Show (cat b a) => ...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/52cd2afec3242ea4c0efb1efbf8c724bd76929cc/Changes/shapes/src/Control/Category/Dual.hs
haskell
module Control.Category.Dual where import Shapes.Import newtype CatDual (cat :: k -> k -> Type) (a :: k) (b :: k) = MkCatDual { unCatDual :: cat b a } instance Category cat => Category (CatDual cat) where id = MkCatDual id (MkCatDual p) . (MkCatDual q) = MkCatDual $ q . p instance Show (cat b a) => ...
7cc6a4c00e7acdf02f8546333a03d47612ff3f599eace4538cb4bf6f5d3fca78
cosmicoptima/dictator
Events.hs
-- | ??? this file's purpose is unclear module Events where import Relude hiding ( First ) -- local modules ---------------- import Utils import Utils.DictM import Utils.Discord import Utils.Language -------- -- discord ---------- import Di...
null
https://raw.githubusercontent.com/cosmicoptima/dictator/f3c575db4658820400f11297346f51ffaee75300/src/Events.hs
haskell
| ??? this file's purpose is unclear local modules -------------- ------ discord -------- color all else --------- ---- other ------
module Events where import Relude hiding ( First ) import Utils import Utils.DictM import Utils.Discord import Utils.Language import Discord import Discord.Types import Control.Monad ( liftM2 ) import ...
3f8c4e3937ff6de225c281cc941bf0c78905d75f8838ab0978607e5f280dfae4
reanimate/reanimate
Object.hs
# LANGUAGE ApplicativeDo # # LANGUAGE RecordWildCards # module Reanimate.Scene.Object where import Control.Lens import Control.Monad (forM_, void) import Control.Monad.State (State, execState) import Graphics.SvgTree (Number (..), Tree, pattern None, strokeW...
null
https://raw.githubusercontent.com/reanimate/reanimate/ed1c0ba6c198b7f14a2d512ca77470cc41f3bfa4/src/Reanimate/Scene/Object.hs
haskell
----------------------------------------------------- Objects identity, location, and several other properties that can change over time. | Container for object properties. | Top, right, bottom, left Basic lenses FIXME: Maybe 'position' is a better name. | Object position. Default: \<0,0\> | Rendered SVG n...
# LANGUAGE ApplicativeDo # # LANGUAGE RecordWildCards # module Reanimate.Scene.Object where import Control.Lens import Control.Monad (forM_, void) import Control.Monad.State (State, execState) import Graphics.SvgTree (Number (..), Tree, pattern None, strokeW...
afbb6938202679978e9db6b0c66981ad884047dad2f54385f24694ad5d372754
nyu-acsys/drift
recursive.ml
let rec f (g: int -> int) x = if x >= 0 then g x else f (f g) (g x) let succ sx = sx + 1 let main (n:int(*-:{v:Int | true}*)) = assert (f succ n >= 0)
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/high/recursive.ml
ocaml
-:{v:Int | true}
let rec f (g: int -> int) x = if x >= 0 then g x else f (f g) (g x) let succ sx = sx + 1 assert (f succ n >= 0)
e2d9da87da917470662fc82ec40f01cf9718cf1f52fcb26adc5a5de1be724f15
ntoronto/drbayes
set.rkt
#lang typed/racket/base (require racket/match racket/list "../types.rkt" "../untyped-utils.rkt") (provide (all-defined-out)) (define-singleton-type Empty-Set empty-set) (define-singleton-type Univ-Set univ-set) (define-singleton-type Null-Set null-set) (define-type Nonempty-Set (U Univ-S...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/direct/racket-impl/set.rkt
racket
--------------------------------------------------------------------------------------------------- Reals --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- Pairs ==...
#lang typed/racket/base (require racket/match racket/list "../types.rkt" "../untyped-utils.rkt") (provide (all-defined-out)) (define-singleton-type Empty-Set empty-set) (define-singleton-type Univ-Set univ-set) (define-singleton-type Null-Set null-set) (define-type Nonempty-Set (U Univ-S...
81612349c446f09805951e7b8d87fa5c0c0a0c7fb60580c9e155941d57548cad
VisionsGlobalEmpowerment/webchange
state.cljs
(ns webchange.book-library.pages.library.state (:require [re-frame.core :as re-frame] [webchange.book-library.state :as parent-state] [webchange.routes :as routes] [webchange.state.core :as state] [webchange.state.warehouse :as warehouse] [webchange.utils.map :refer [map-keys]])) (defn path-t...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/book_library/pages/library/state.cljs
clojure
Available books Books list Current category
(ns webchange.book-library.pages.library.state (:require [re-frame.core :as re-frame] [webchange.book-library.state :as parent-state] [webchange.routes :as routes] [webchange.state.core :as state] [webchange.state.warehouse :as warehouse] [webchange.utils.map :refer [map-keys]])) (defn path-t...
4f33814e832c71f0f504397f6efadb14260a781417cdb1e32be9b505fbc0e424
fluree/ledger
basic_test.clj
(ns fluree.db.ledger.query.basic-test (:require [clojure.test :refer :all] [fluree.db.test-helpers :as test] [fluree.db.api :as fdb] [fluree.db.util.core :as utils] [fluree.db.util.async :refer [<?? <? go-try]] [clojure.set :refer [subset?]])) (use-fixtures...
null
https://raw.githubusercontent.com/fluree/ledger/31f3e11a0648501b0a8cc6148177e54c67420042/test/fluree/db/ledger/query/basic_test.clj
clojure
the keys for every chat should be _id, message, person, instant, or comments get ids of interest check ids groupBy on favNums excludes any entries without a favNum exclude these from base set for validation purposes validate string groupBy validate # of handles - groupBy is a subset validate vector groupBy valida...
(ns fluree.db.ledger.query.basic-test (:require [clojure.test :refer :all] [fluree.db.test-helpers :as test] [fluree.db.api :as fdb] [fluree.db.util.core :as utils] [fluree.db.util.async :refer [<?? <? go-try]] [clojure.set :refer [subset?]])) (use-fixtures...
f1ae29b63d6b7a4f7b28af63bbfd3d3c3464150ddf6f2ff34135d126ac36eeb2
futurice/haskell-mega-repo
ActiveSubcontractorsByHours.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Futurice.App.Reports.ActiveSubcontractorsByHours where import Control.Monad (filterM) import Data.Fixed (Centi) impo...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/reports-app/src/Futurice/App/Reports/ActiveSubcontractorsByHours.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # ----------------------------------------------------------------------------- Data ----------------------------------------------------------------------------- -----------------------------------------------------------------...
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # module Futurice.App.Reports.ActiveSubcontractorsByHours where import Control.Monad (filterM) import Data.Fixed (Centi) import Futurice.Generics import Futurice.Integrations import Futurice.Lucid.Foundation import Futurice.Prelud...
d0a973c2209d3eb1c93406913d63e634eb50f7c3c6cd2b75afdead79d787dd53
patrickt/miller
Env.hs
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # module Miller.TI.Env ( Env, lookup, insert, union, fromBindings, fromList, ) where import Data.HashMap....
null
https://raw.githubusercontent.com/patrickt/miller/b520e960c9131e5e10397a8180c79bf4c64137e8/src/Miller/TI/Env.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # module Miller.TI.Env ( Env, lookup, insert, union, fromBindings, fromList, ) where import Data.HashMap.Lazy (HashMap) import qualified Data.HashMap.Lazy as HM import qualifi...
9663322a3274ab2b09025f4c4a3c55a67a464c47e36db75537f9f2471ebd4809
ejgallego/coq-lsp
loader.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * INRIA , CNRS and contributors - Copyright 1999 - 2018 (* <O___,, * (see CREDITS file for the list of authors) *) \VV/ * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-lsp/e6c562c5f308f32d23784decf7fc850a73ccef74/coq/loader.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team <O___,, * (see CREDITS file for the list of authors) // * This file is distributed under the terms of the * (see LICENSE file for...
v * INRIA , CNRS and contributors - Copyright 1999 - 2018 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser General Public License Version 2.1 Copyright 2016 - 2019 MINES ParisT...
70f87f7d0d96fdeac20503b08f768d3506ce0971af9f0d0b4785d8759d308a87
hcarty/ezlogs-cli
ezlogs_cli_lwt.mli
module Line : sig val reporter : Lwt_fmt.formatter -> Logs.reporter val logging : unit Cmdliner.Term.t * Use with Cmdliner to get automatic logging setup . Log messages will be prefixed with a date and time stamp along with their log level . This also pulls in the standard Logs and Fmt CLI configu...
null
https://raw.githubusercontent.com/hcarty/ezlogs-cli/aa6079a279c93d8ac1e437ade34ec81835f6e121/lwt/ezlogs_cli_lwt.mli
ocaml
module Line : sig val reporter : Lwt_fmt.formatter -> Logs.reporter val logging : unit Cmdliner.Term.t * Use with Cmdliner to get automatic logging setup . Log messages will be prefixed with a date and time stamp along with their log level . This also pulls in the standard Logs and Fmt CLI configu...
8f8e772605a3d78df5d2def317cf5d799039293c6f7500e5da72ef964ddabcd5
lem-project/lem
tabbar.lisp
(defpackage :lem.tabbar (:use :cl :lem :lem.button) (:export :tabbar-active-tab-attribute :tabbar-attribute :tabbar-background-attribute :tabbar) #+sbcl (:lock t)) (in-package :lem.tabbar) (define-attribute tabbar-active-tab-attribute (t :foreground "black" :background "dark ...
null
https://raw.githubusercontent.com/lem-project/lem/fd0c9d175b8c918d70dec10fa4ef76852de64636/src/ext/tabbar.lisp
lisp
(define-key *global-keymap* "Shift-PageDown" 'tabbar-next) (define-key *global-keymap* "Shift-PageUp" 'tabbar-prev)
(defpackage :lem.tabbar (:use :cl :lem :lem.button) (:export :tabbar-active-tab-attribute :tabbar-attribute :tabbar-background-attribute :tabbar) #+sbcl (:lock t)) (in-package :lem.tabbar) (define-attribute tabbar-active-tab-attribute (t :foreground "black" :background "dark ...
b991666220e1a4e668a94fcc6fd7880393c4a0e021f9ba7443e73572ddd60f9f
diffusionkinetics/open
test-stan.hs
module Main where import Stan.AST import Stan.AST.Pretty import Stan.Run import Stan.Schools myExpr :: Expr myExpr = sin $ Ix (Var "xs") [2+1*3] myExpr1 :: Expr myExpr1 = 2*(1+3) myModel :: Stan myModel = Model [ Real ::: ("foo",[]), ("foo", []) := myExpr ] main :: IO () main = do putStrLn "" pp myEx...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/stanhs/test-stan.hs
haskell
module Main where import Stan.AST import Stan.AST.Pretty import Stan.Run import Stan.Schools myExpr :: Expr myExpr = sin $ Ix (Var "xs") [2+1*3] myExpr1 :: Expr myExpr1 = 2*(1+3) myModel :: Stan myModel = Model [ Real ::: ("foo",[]), ("foo", []) := myExpr ] main :: IO () main = do putStrLn "" pp myEx...
a861bd54fd8ca1d69f19a190733f30b5e42af699d4ddd920ba0e39dc6f5c7158
Engil/Toolboy
main.ml
module Gb = Lesserboy module U8 = Vgm.Uint8 open! Vgm.Imports open Result.Syntax let turn_off_everything device = ignore @@ Portmidi.write_output device [ Portmidi.Portmidi_event.create ~status:'\176' ~data1:'\123' ~data2:'\000' ~timestamp:0l; ] let note_on ~channel note volume =...
null
https://raw.githubusercontent.com/Engil/Toolboy/6a34efb0091457219f9220605f048a2c1665f4ee/vgm_to_midi/main.ml
ocaml
we make sure we do turn on the sound
module Gb = Lesserboy module U8 = Vgm.Uint8 open! Vgm.Imports open Result.Syntax let turn_off_everything device = ignore @@ Portmidi.write_output device [ Portmidi.Portmidi_event.create ~status:'\176' ~data1:'\123' ~data2:'\000' ~timestamp:0l; ] let note_on ~channel note volume =...
8ba51ff0c249565024f5ce40ae1e5c41f0167c5330aa087ecc59cb7009c9a2ba
ocaml-multicore/parafuzz
join.ml
(* TEST * hasunix include unix ** bytecode ** native *) let main_join n = let a = Array.init n (fun _ -> false) in Array.init n (fun i -> Domain.spawn (fun () -> a.(i) <- true; Some i )) |> Array.iteri (fun i d -> let v = Domain.join d in assert (v = Some i)); let ok = Array.to_list a |> List.for_all...
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/parallel/join.ml
ocaml
TEST * hasunix include unix ** bytecode ** native
let main_join n = let a = Array.init n (fun _ -> false) in Array.init n (fun i -> Domain.spawn (fun () -> a.(i) <- true; Some i )) |> Array.iteri (fun i d -> let v = Domain.join d in assert (v = Some i)); let ok = Array.to_list a |> List.for_all (fun x -> x) in assert ok let rec other_join flags n...
e379685482b1a959d88580961cc18450b40d04ce964d711c56055a11a26bcfbc
obsidiansystems/rhyolite
App.hs
| Description : Connect clients to a rhyolite backend Frontend part of the view / viewselector implementation . Here we have the definition of ' RhyoliteWidget ' and the functions to run it , ' runRhyoliteWidget ' and ' runObeliskRhyoliteWidget ' . We also have the ' watchViewSelector ' function that 's used i...
null
https://raw.githubusercontent.com/obsidiansystems/rhyolite/ec7fb78e51b23ccef734a06b9ee1ccfa756ec370/frontend/Rhyolite/Frontend/App.hs
haskell
# Language CPP # # Language ConstraintKinds # # Language DeriveGeneric # # Language FlexibleContexts # # Language FlexibleInstances # # Language FunctionalDependencies # # Language GADTs # # Language InstanceSigs # # Language LambdaCase # # Language OverloadedStrings # # Language PolyKinds # # Language RankNTypes # # L...
| Description : Connect clients to a rhyolite backend Frontend part of the view / viewselector implementation . Here we have the definition of ' RhyoliteWidget ' and the functions to run it , ' runRhyoliteWidget ' and ' runObeliskRhyoliteWidget ' . We also have the ' watchViewSelector ' function that 's used i...
da4424bce1c2fc06a3f970fa5877c2739888ad6212cdff59f556b7e8a00c0ba3
epiccastle/spire
test_apt_repo.clj
(ns test-pod.test-apt-repo (:require [test-pod.conf :as conf] [test-pod.utils :as utils] [clojure.test :refer [is deftest]] [babashka.pods :as pods] [babashka.process :refer [process check]] [clojure.string :as string] [clojure.java.io :as io] ...
null
https://raw.githubusercontent.com/epiccastle/spire/e58c6d8c748f57a56c180c0d254c18f1a08b64ff/test/test_pod/test_apt_repo.clj
clojure
(ns test-pod.test-apt-repo (:require [test-pod.conf :as conf] [test-pod.utils :as utils] [clojure.test :refer [is deftest]] [babashka.pods :as pods] [babashka.process :refer [process check]] [clojure.string :as string] [clojure.java.io :as io] ...
a0a2e73fbe366e5f72f5684e00e84732321df2601013943e58aed821ac326d40
ucsd-progsys/liquidhaskell
C.hs
{-@ LIQUID "--reflection" @-} module C where import Language import B {-@ getVal :: {e:Expr l st r | isEFalse e } -> {v:Int | false} @-} getVal :: Expr l st r -> Int getVal (EFalse v) = v
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/495cb3e53db96b8f1f08bb2f68b9b2fd8c86679e/tests/import/client/C.hs
haskell
@ LIQUID "--reflection" @ @ getVal :: {e:Expr l st r | isEFalse e } -> {v:Int | false} @
module C where import Language import B getVal :: Expr l st r -> Int getVal (EFalse v) = v
e5a586dfe1b7e90d9416e00ec812b78b6d07fac8cf46e2b870bf24944898d0c7
erlang/erlide_kernel
ttbe.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2002 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/erlang/erlide_kernel/071c7cea0dbd29516a08859d9ac89d072ba540e0/common/apps/erlide_tools/src/ttbe.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2002 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(ttbe). -author(''). -author(''). -...
672325d94e025fb77d9dd5fedb105c062035f8276b8f90d838734f69075ea1c4
skeeto/euler-cl
euler-12.lisp
Project Euler - Problem 12 ;; The sequence of triangle numbers is generated by adding the natural numbers . So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 . The first ten terms would be : 1 , 3 , 6 , 10 , 15 , 21 , 28 , 36 , 45 , 55 , ... Let us list the factors of the first seven t...
null
https://raw.githubusercontent.com/skeeto/euler-cl/82000252703070274e09bd13f9effdca68705404/euler-12.lisp
lisp
The sequence of triangle numbers is generated by adding the natural divisors. hundred divisors?
Project Euler - Problem 12 numbers . So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28 . The first ten terms would be : 1 , 3 , 6 , 10 , 15 , 21 , 28 , 36 , 45 , 55 , ... Let us list the factors of the first seven triangle numbers : 1 : 1 3 : 1,3 6 : 1,2,3,6 ...
c8bcfbd7c72ebf64efcef40c93e7e4c8a99fc71ce68d9eeb5b4d3184a071b53a
chaoxu/fancy-walks
57.hs
func (a,b) = (b'+a',a') where (a',b') = (a+b,b) lst = take 1000 $ iterate func (3,2) check (a,b) = length (show a) > length (show b) problem_57 = length $ filter check lst main = print problem_57
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/projecteuler.net/57.hs
haskell
func (a,b) = (b'+a',a') where (a',b') = (a+b,b) lst = take 1000 $ iterate func (3,2) check (a,b) = length (show a) > length (show b) problem_57 = length $ filter check lst main = print problem_57
46ecda176e41c1816457931a4bcda4877855e786171da8e8a8b0d93ed5ec8827
borkdude/advent-of-cljc
data.cljc
(ns aoc.y2017.d10.data) (def input "129,154,49,198,200,133,97,254,41,6,2,1,255,0,191,108") (def answer-1 19591) (def answer-2 "62e2204d2ca4f4924f6e7a80f1288786")
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2017/d10/data.cljc
clojure
(ns aoc.y2017.d10.data) (def input "129,154,49,198,200,133,97,254,41,6,2,1,255,0,191,108") (def answer-1 19591) (def answer-2 "62e2204d2ca4f4924f6e7a80f1288786")
88e6634e89a21abcf61a5c9a6ca4ad423f899ae671136c1a8a55b2ee6e02dde0
xxyzz/SICP
Exercise_2_32.rkt
#lang racket/base (define (subsets s) (if (null? s) (list null) (let ([rest (subsets (cdr s))]) (append rest (map (lambda (x) (cons (car s) x)) rest))))) (subsets null) ; '(()) insert 3 to ' ( ( ) ) then append to ' ( ( ) ) (subsets (list 3)) ' ( ( ) ( 3 ) ) insert 2 to each el...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.2_Hierarchical_Data_and_the_Closure_Property/Exercise_2_32.rkt
racket
'(())
#lang racket/base (define (subsets s) (if (null? s) (list null) (let ([rest (subsets (cdr s))]) (append rest (map (lambda (x) (cons (car s) x)) rest))))) (subsets null) insert 3 to ' ( ( ) ) then append to ' ( ( ) ) (subsets (list 3)) ' ( ( ) ( 3 ) ) insert 2 to each elements o...
a082cbd8aab81b6d5754a45878dbf22943c1d9e0a98c4c37b88a3f9b6c326d90
imandra-ai/catapult
backend.mli
module type ARG = sig val conn : Connections.t end module Make (_ : ARG) : Catapult.BACKEND
null
https://raw.githubusercontent.com/imandra-ai/catapult/4bc5444a8471c5d0d7cb9a376a5a895c0ab042e6/src/client/backend.mli
ocaml
module type ARG = sig val conn : Connections.t end module Make (_ : ARG) : Catapult.BACKEND
6434e3623d6d0e6cacce1382093518d474730ae5e74d0caf4d610e242d81e32b
kronkltd/jiksnu
feed_source_actions.clj
(ns jiksnu.modules.core.actions.feed-source-actions (:require [clj-http.client :as client] [clj-time.core :as time] [jiksnu.modules.core.model.feed-source :as model.feed-source] [jiksnu.modules.core.model.resource :as model.resource] [jiksnu.modules.core.ops :as ops] ...
null
https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/src/jiksnu/modules/core/actions/feed_source_actions.clj
clojure
TODO: Config option {:pre [(instance? FeedSource source) (instance? User user)] :post [(instance? FeedSource %)]} {:pre [(instance? FeedSource source)]} TODO: implement in terms of a push field or just make a new collection
(ns jiksnu.modules.core.actions.feed-source-actions (:require [clj-http.client :as client] [clj-time.core :as time] [jiksnu.modules.core.model.feed-source :as model.feed-source] [jiksnu.modules.core.model.resource :as model.resource] [jiksnu.modules.core.ops :as ops] ...
448084b79b9d92c45181b2a14382946056b0957528d5c1ca1556706a409eb22b
mstone/soutei
soutei-metcast-tests.hs
The regression test suite for Soutei along the lines of a real demo ( given in June 2005 ) . -- The main entry point runs the tests using the linked-in Soutei engine . The alternative entry point runs the tests against the Metcast server configured to communicate with a Soutei server for -- authorization deci...
null
https://raw.githubusercontent.com/mstone/soutei/4d00e12180361561dab948f211bbcf9e75bfb1de/demo/metcast-channels/soutei-metcast-tests.hs
haskell
The main entry point runs the tests using the linked-in authorization decisions. The alternative entry point emulates the The main entry point The alternative entry point: run the metcast demo Testing Soutei running as a separate server on a specified port This follows the demo scenario, with some additional chec...
The regression test suite for Soutei along the lines of a real demo ( given in June 2005 ) . Soutei engine . The alternative entry point runs the tests against the Metcast server configured to communicate with a Soutei server for demonstration on June 2005 . module Main where import Control.Monad import D...
1144868c22e0cd4baac064b9f1ebf65ca75b22bc116a06445bb3fb57a26197cc
Kakadu/fp2022
parser.mli
* Copyright 2021 - 2022 , Kakadu and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later type error = string (** Main entry of parser *) val parse : string -> (Ast.statement, error) result
null
https://raw.githubusercontent.com/Kakadu/fp2022/6881f083160713ebdf4876025016ccfa6fff4492/SQL/lib/parser.mli
ocaml
* Main entry of parser
* Copyright 2021 - 2022 , Kakadu and contributors * SPDX - License - Identifier : LGPL-3.0 - or - later type error = string val parse : string -> (Ast.statement, error) result
d5626fcf3d13e1e1d9222ff097ebf5575b0d169d0c7f3e1976ffd052ccb8a1d5
runa-labs/clj-hazelcast
distributed_test.clj
(ns clj-hazelcast.test.distributed-test (:import (java.util.concurrent TimeoutException TimeUnit ExecutionException) (com.hazelcast.core Hazelcast) (com.hazelcast.config Config) (com.hazelcast.mapreduce Mapper Context) (cljhazelcast.remote RemoteMapper RemoteReducerFactory)...
null
https://raw.githubusercontent.com/runa-labs/clj-hazelcast/ba577984796e6e8e876554b10c6ebbb763ca5b44/test/clj_hazelcast/test/distributed_test.clj
clojure
(ns clj-hazelcast.test.distributed-test (:import (java.util.concurrent TimeoutException TimeUnit ExecutionException) (com.hazelcast.core Hazelcast) (com.hazelcast.config Config) (com.hazelcast.mapreduce Mapper Context) (cljhazelcast.remote RemoteMapper RemoteReducerFactory)...
9e18a670eb95efd99b179f82612425c7b0e2502c1e5d8f5fb9b0c16fead869fa
JAremko/spacetools
spacedoc-cli-project.clj
(defproject spacetools/spacedoc-cli "0.1.0-SNAPSHOT" :dependencies [[funcool/cats "2.3.6"] [orchestra "2020.07.12-1"] [org.clojure/clojure "1.10.2-alpha2"] [org.clojure/core.match "1.0.0"] [org.clojure/tools.cli "1.0.194"] [spacetool...
null
https://raw.githubusercontent.com/JAremko/spacetools/2343810353da275bacb21cf49df43286df4bf9be/environments/development/project-files/bases/spacedoc-cli-project.clj
clojure
(defproject spacetools/spacedoc-cli "0.1.0-SNAPSHOT" :dependencies [[funcool/cats "2.3.6"] [orchestra "2020.07.12-1"] [org.clojure/clojure "1.10.2-alpha2"] [org.clojure/core.match "1.0.0"] [org.clojure/tools.cli "1.0.194"] [spacetool...
1b5038bba28ddab0350cafb4dbdf6872bb4dc07612b93842722de15f16d5328b
adomokos/haskell-katas
Ex36_ExercisesRPNCalculatorSpec.hs
module Ex36_ExercisesRPNCalculatorSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec foldingFunction : : ( a , Read a ) = > [ a ] - > String - > [ a ] solveRPN : : ( a , Read a ) = > String - > a spec :: Spec spec = describe "reverse polish notation" $ do it "uses a foldingFunctio...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex36_ExercisesRPNCalculatorSpec.hs
haskell
module Ex36_ExercisesRPNCalculatorSpec ( spec ) where import Test.Hspec main :: IO () main = hspec spec foldingFunction : : ( a , Read a ) = > [ a ] - > String - > [ a ] solveRPN : : ( a , Read a ) = > String - > a spec :: Spec spec = describe "reverse polish notation" $ do it "uses a foldingFunctio...
e9fc4e62ea0ae2cb415b44c27c4461f80ea44e5e904d736a507c9d4074d2abe4
brendanhay/amazonka
UntagResource.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/UntagResource.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newUntagResource' smart constructor. | The list of tag keys to remove from the resource. | The following record fields are ava...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
747d4ea3adbcfb5ea192492f50f8a89d8a2ee511001ed7016f54e4a5489d8960
aphyr/tesser
simple_test.clj
(ns tesser.simple-test (:require [clojure.test :refer :all] [clojure.test.check :as tc] [clojure.test.check [clojure-test :refer :all] [generators :as gen] [properties :as prop]] [multiset.core :refer [multiset]] ...
null
https://raw.githubusercontent.com/aphyr/tesser/d82895390264d8f6bf012fa4053a2003a500b574/core/test/tesser/simple_test.clj
clojure
(ns tesser.simple-test (:require [clojure.test :refer :all] [clojure.test.check :as tc] [clojure.test.check [clojure-test :refer :all] [generators :as gen] [properties :as prop]] [multiset.core :refer [multiset]] ...
dc278c93baf937224c8452a0ef00c7c7e507699d886ff9f3afcffaadf328fbcd
ocaml-flambda/flambda-backend
flambda_backend_args.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/bed9613a24b4bc5ed377ca20c3b685195c993e21/driver/flambda_backend_args.mli
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2013 - -2021 OCamlPro SAS Copyright 2014 - -2021 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the ...
01263e2971b52dc85d9cee702a486e2547ad56407c04db6a13fbe5702198c281
janestreet/ecaml
ecaml_value.ml
module Caml_embed = Caml_embed module Ecaml_callback = Ecaml_callback module Feature = Feature module Form = Form module Funcall = Funcall module Function = Function module Symbol = Symbol module Value = Value module Valueable = Valueable let message = Value.message let messagef = Value.messagef let message_s = Value....
null
https://raw.githubusercontent.com/janestreet/ecaml/bd95b93799ccf809be26436b8379410c29282c4f/ecaml_value/src/ecaml_value.ml
ocaml
module Caml_embed = Caml_embed module Ecaml_callback = Ecaml_callback module Feature = Feature module Form = Form module Funcall = Funcall module Function = Function module Symbol = Symbol module Value = Value module Valueable = Valueable let message = Value.message let messagef = Value.messagef let message_s = Value....
ba5e22c52718497f98b820fe29ceebb0b5058250957086e491293f8a18aab3e3
lojic/LearningRacket
ex11a.rkt
#lang racket (require "../lojic.rkt") (define (cents x) (inexact->exact (floor (+ (* x 100.0) 0.5)))) (define (dollars x) (/ x 100.0)) (define euros (cents (string->number (gets "How many euros are you exchanging? ")))) (define exchange-rate (string->number (gets "What is the exchange rate? "))) (define us-dollars (ce...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercises-for-programmers/11-currency-conversion/ex11a.rkt
racket
#lang racket (require "../lojic.rkt") (define (cents x) (inexact->exact (floor (+ (* x 100.0) 0.5)))) (define (dollars x) (/ x 100.0)) (define euros (cents (string->number (gets "How many euros are you exchanging? ")))) (define exchange-rate (string->number (gets "What is the exchange rate? "))) (define us-dollars (ce...
3af013849b716e359bad49eeca6b567f5ec089f1ee51731f2794cac22bd6ab13
xvw/planet
monad.mli
(** Monad This implementation is widely inspired by the {{: /} Haskell}'s implementation *) * Build a new Monad 's module using [ REQUIREMENT_JOIN ] . module Make_with_join (M : Sigs.Monad.REQUIREMENT_JOIN) : Sigs.Monad.API with type 'a t = 'a M.t * Build a new Monad 's module using [ REQUIREMENT_BIND ] . ...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/bedrock/monad.mli
ocaml
* Monad This implementation is widely inspired by the {{: /} Haskell}'s implementation
* Build a new Monad 's module using [ REQUIREMENT_JOIN ] . module Make_with_join (M : Sigs.Monad.REQUIREMENT_JOIN) : Sigs.Monad.API with type 'a t = 'a M.t * Build a new Monad 's module using [ REQUIREMENT_BIND ] . module Make_with_bind (M : Sigs.Monad.REQUIREMENT_BIND) : Sigs.Monad.API with type 'a t = 'a M.t
c0b907df11427228e8dedcd3d47a08ee172c102c628344c41482069d8bcb4471
helpshift/kodai
viewer.clj
(ns kodai.core.viewer (:require [gulfstream.core :as gs] [hara.concurrent.latch :as latch] [hara.data.nested :as nested] [hara.common.watch :as watch] [hara.object :as object] [kodai.core.pipeline :as pipe] [kodai.core.format :as format]) (:imp...
null
https://raw.githubusercontent.com/helpshift/kodai/b04961a45039401b6e2eebf8afc0600a19c9f76b/src/kodai/core/viewer.clj
clojure
(ns kodai.core.viewer (:require [gulfstream.core :as gs] [hara.concurrent.latch :as latch] [hara.data.nested :as nested] [hara.common.watch :as watch] [hara.object :as object] [kodai.core.pipeline :as pipe] [kodai.core.format :as format]) (:imp...
a429ddc6da1277f9a46eab6c1596f77154bd662fc405d4b6137908cf4139c4fe
awslabs/s2n-bignum
bignum_montsqr_p256k1_alt.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_montsqr_p256k1_alt.ml
ocaml
========================================================================= ========================================================================= *** print_literal_from_elf "x86/secp256k1/bignum_montsqr_p256k1_alt.o";; *** PUSH (% rbx) PUSH (% r12) PUSH (% r13) PUSH (% r14) PUSH (% r15) XOR (% r10) (%...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) Montgomery square mod p_256k1 , the field characteristic for secp2...
e9d4840f5873d5c9965a75b1ec91970ba41c4c4cf3a941e0d4b6e60635bf8f74
kupl/FixML
sub35.ml
type aexp = | Const of int | Var of string | Power of string * int | Times of aexp list | Sum of aexp list let rec diff : aexp * string -> aexp =fun (aexp,x) -> match aexp with |Const y -> Const 0 |Var t -> if t = x then Const 1 else Const 0 |Power (s,i) -> Times[Const i;Power(s,i-1)] |Times(k) -> (matc...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub35.ml
ocaml
type aexp = | Const of int | Var of string | Power of string * int | Times of aexp list | Sum of aexp list let rec diff : aexp * string -> aexp =fun (aexp,x) -> match aexp with |Const y -> Const 0 |Var t -> if t = x then Const 1 else Const 0 |Power (s,i) -> Times[Const i;Power(s,i-1)] |Times(k) -> (matc...
29c91b553d58bdda3c811bed11e5b75c66b5766e72c98a3b9f7b40c7a5e0cdb4
Eduap-com/WordMat
maxmac.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/maxmac.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; General purpo...
(in-package :maxima) (macsyma-module maxmac macro) This file contains miscellaneous macros used in source files . (defmacro tuchus (list object) `(setf ,list (nconc ,list (ncons ,object)))) The following macros pertain only to . Except on the Lisp Machine , load the specified macro files . On the Li...
6037fdec0ba30cc70111865baf76df6bc1e56e3d109b678fdc32fcee52074514
lexi-lambda/racket-r7rs
cxr.rkt
#lang racket/base (require (prefix-in 6: rnrs/base-6) "private/strip-prefix.rkt") (provide (strip-colon-prefix-out 6:caaaar 6:caaadr 6:caaar 6:caadar 6:caaddr 6:caadr 6:cadaar 6:cadadr 6:cadar 6:caddar 6:cadddr 6:caddr 6:cdaaar 6:cdaadr 6:cdaa...
null
https://raw.githubusercontent.com/lexi-lambda/racket-r7rs/5834ec6e66f63c61589130aaebd0f25ab3eefc2b/r7rs-lib/cxr.rkt
racket
#lang racket/base (require (prefix-in 6: rnrs/base-6) "private/strip-prefix.rkt") (provide (strip-colon-prefix-out 6:caaaar 6:caaadr 6:caaar 6:caadar 6:caaddr 6:caadr 6:cadaar 6:cadadr 6:cadar 6:caddar 6:cadddr 6:caddr 6:cdaaar 6:cdaadr 6:cdaa...
5a94ac58c6ee685a4690445a9c7484b87a8f3fe6db86f2fa2e521ac14b034701
gafiatulin/codewars
BackWardsPrime.hs
-- Backwards Read Primes -- / module Codewars.Kata.BackWardsPrime where import Data.Array (accumArray, (!)) backwardsPrime :: Integer -> Integer -> [Integer] backwardsPrime start stop = filter (\p -> (backwardsRead p /= p) && (isPrime . backwardsRead $ p)) primes where backwardsRead = read . reverse . show ...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/BackWardsPrime.hs
haskell
Backwards Read Primes /
module Codewars.Kata.BackWardsPrime where import Data.Array (accumArray, (!)) backwardsPrime :: Integer -> Integer -> [Integer] backwardsPrime start stop = filter (\p -> (backwardsRead p /= p) && (isPrime . backwardsRead $ p)) primes where backwardsRead = read . reverse . show isPrime n | n `elem` [2...
da4f77c398bb76c230585f3c03053c8c68c4e4c9dff350299aa747a05f44daca
wilkerlucio/pathom
parameters.cljs
(ns com.wsscode.pathom.book.connect.parameters (:require [com.wsscode.pathom.core :as p] [com.wsscode.pathom.connect :as pc])) (def instruments [{:instrument/id 1 :instrument/brand "Fender" :instrument/type :instrument.type/guitar :instrument/price 300} {:instrument/id 2 :instrument/...
null
https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/docs-src/modules/ROOT/examples/com/wsscode/pathom/book/connect/parameters.cljs
clojure
(ns com.wsscode.pathom.book.connect.parameters (:require [com.wsscode.pathom.core :as p] [com.wsscode.pathom.connect :as pc])) (def instruments [{:instrument/id 1 :instrument/brand "Fender" :instrument/type :instrument.type/guitar :instrument/price 300} {:instrument/id 2 :instrument/...
df46b09bc614c9baae97a78694bfdd7f694ed7edefb867ba47748dcac6de1d4d
ucsd-progsys/nate
Camlp4OCamlOriginalQuotationExpander.ml
open Camlp4; (* -*- camlp4r -*- *) (****************************************************************************) (* *) (* Objective Caml *) (* ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/camlp4/Camlp4Parsers/Camlp4OCamlOriginalQuotationExpander.ml
ocaml
-*- camlp4r -*- ************************************************************************** Objective Caml ...
Copyright 2002 - 2006 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with the special Authors : * - : initial version * - Nicolas Pouillard: initial version *...
e6c32cdf30b0ebd2344ca911b5f21e08b8c02da0596f075113355b990a6edada
angelhof/flumina
optimizer_centralized_greedy.erl
-module(optimizer_centralized_greedy). -export([generate_setup_tree/2]). -include("type_definitions.hrl"). -include("config.hrl"). %% %% This optimizer calls the greedy optimizer with the centralized option. %% -spec generate_setup_tree(specification(), topology()) -> temp_setup_tree(). generate_setup_tree(Specifica...
null
https://raw.githubusercontent.com/angelhof/flumina/9602454b845cddf8e3dff8c54089c7f970ee08e1/src/optimizer_centralized_greedy.erl
erlang
This optimizer calls the greedy optimizer with the centralized option.
-module(optimizer_centralized_greedy). -export([generate_setup_tree/2]). -include("type_definitions.hrl"). -include("config.hrl"). -spec generate_setup_tree(specification(), topology()) -> temp_setup_tree(). generate_setup_tree(Specification, Topology) -> optimizer_greedy:generate_setup_tree(Specification, Topol...
49041dda451306632287df3c8508083d2be50fed64eec1fd36211c377cd39700
jimcrayne/jhc
SSimplify.hs
module E.SSimplify( Occurance(..), cacheSimpOpts, simplifyE, collectOccurance', programPruneOccurance, programSSimplify, programSSimplifyPStat, SimplifyOpts(..), emptySimplifyOpts ) where import Control.Monad.Identity import Data.Maybe import Data.Typeable import Debug.Trace imp...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/E/SSimplify.hs
haskell
import E.Traverse(runRename) type Bind = (TVr,E) ^ unused means a var is not used at the term level, but might be at the type level ^ Used at most once not inside a lambda or as an argument ^ used once inside a lambda ^ used once in several branches ^ used many or an unknown number of times ^ chosen as a loopbrea...
module E.SSimplify( Occurance(..), cacheSimpOpts, simplifyE, collectOccurance', programPruneOccurance, programSSimplify, programSSimplifyPStat, SimplifyOpts(..), emptySimplifyOpts ) where import Control.Monad.Identity import Data.Maybe import Data.Typeable import Debug.Trace imp...
8ebfe0f739b72a6d696ea9ffdce4fdfcc37b3625203a1827e0f044053604f275
sabine/ocaml-to-wasm
ir.ml
open Clambda_frontend.Clambda_types open Sexplib0 open Sexp_conv type ulambda = Uvar of backend_var | Uconst of uconstant | Udirect_apply of function_label * ulambda list * | Ugeneric_apply of ulambda * ulambda list * | Uclosure of ufunction list * ulambda list | Uoffset of ulambda * in...
null
https://raw.githubusercontent.com/sabine/ocaml-to-wasm/de98909a3ce3e902c4d18852a142c33ae75f7285/lib/ir.ml
ocaml
| IRUnreachable | IRBr_table of block_symbol list * block_symbol and constant = | IRconst_ref of string * structured_constant option | IRconst_int of int | IRconst_ptr of int [@@deriving sexp] invariant: length of argument list is shorter than arity of the closure TODO: sort out sub expressions, single s...
open Clambda_frontend.Clambda_types open Sexplib0 open Sexp_conv type ulambda = Uvar of backend_var | Uconst of uconstant | Udirect_apply of function_label * ulambda list * | Ugeneric_apply of ulambda * ulambda list * | Uclosure of ufunction list * ulambda list | Uoffset of ulambda * in...
47c774ea27f2ac28f715e160cc222f6ff1bdb9d133de9e999bf1c913e8ae027c
8c6794b6/haskell-sc-scratch
P6.hs
# LANGUAGE NoMonomorphismRestriction # ------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : non-portable -- Pattern DSL , take 2 . -- -- What I've...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Pat/P6.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : non-portable What I've found so far: so much useful * To show the pattern expression as String: ** Make constructor function for each primitive ty...
# LANGUAGE NoMonomorphismRestriction # CopyRight : ( c ) 8c6794b6 Maintainer : Pattern DSL , take 2 . * Unless plam and papp get practical interpretation for R , it 's does n't seem * * Make type signature for S as @S a = S { unS : : Int - > String}@ , to get de * Unless plam and papp are used , not s...
0ab83c2684fe566b5c6a99df0c5e5beae02592ebe94d8d80c2e8c5297ed6c5f9
juxt/joplin
database.clj
(ns joplin.zookeeper.database (:require [curator.framework :refer [curator-framework]] [joplin.core :refer :all] [joplin.zookeeper.exhibitor :refer [exhibitor-framework]] [zookeeper :as zk])) (def ^:private charset "UTF-8") (defn- ser [data] (.getBytes (pr-str data) ^String cha...
null
https://raw.githubusercontent.com/juxt/joplin/d190f883c47b11efafc5154237a80d36af0087d3/joplin.zookeeper/src/joplin/zookeeper/database.clj
clojure
============================================================================== ============================================================================== ============================================================================== Dummy fns for migrations, doesn't really make sense for a k/v stores
(ns joplin.zookeeper.database (:require [curator.framework :refer [curator-framework]] [joplin.core :refer :all] [joplin.zookeeper.exhibitor :refer [exhibitor-framework]] [zookeeper :as zk])) (def ^:private charset "UTF-8") (defn- ser [data] (.getBytes (pr-str data) ^String cha...
b850cef697c1299f32ab6ab75102e3259491bf4df893517fbbc60f29819e559a
lasp-lang/lasp
lasp_redis_storage_backend.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2017 . All Rights Reserved . %% 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 c...
null
https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/src/lasp_redis_storage_backend.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...
Copyright ( c ) 2017 . 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 -module(lasp_redi...
993cd299cb2660df8acc4dc3b7ebab3bed363d115a61154c3a7ba86edd629a03
ropas/sparrow
report.mli
(***********************************************************************) (* *) Copyright ( c ) 2007 - present . Programming Research Laboratory ( ROPAS ) , Seoul National University . (* All rights reserved...
null
https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/report/report.mli
ocaml
********************************************************************* All rights reserved. See the LICENSE file for details. ...
Copyright ( c ) 2007 - present . Programming Research Laboratory ( ROPAS ) , Seoul National University . This software is distributed under the term of the BSD license . type target = BO | ND | DZ type status = Proven | UnProven | BotAlarm type query = { node : Inte...
fd247bbd926c398f643f298a38ecaaf958c270b7a033201ab9ab9a67fb5b5106
qitab/qmynd
basic-types.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Free Software published under an MIT - like license . See LICENSE ; ; ; ;;; ;;; Copyright ( c ) 2012 -...
null
https://raw.githubusercontent.com/qitab/qmynd/7e56daf73f0ed5f49a931c01af75fb874bcf3445/src/wire-protocol/basic-types.lisp
lisp
;;; ; ; ;;; ; ; ;;; ; ; ;;; asedeno-TODO: turn up ...
(in-package :qmynd-impl) 15.1.1.1.1 . fixed length integer Little endian fixed - length integers with lengths ( 1 2 3 4 6 8) (define-compiler-macro read-fixed-length-integer (&whole form length stream &rest keys) (case length (1 (if keys `(read-1-octet-integer ,stream ,@keys) `(read-my-octet ,stream))) ...
685a156974cd49a19cc79ac4efb7460a0d006e84d22d89c82ff348df6130ddd5
snoyberg/why-you-should-use-stm
solution.hs
#!/usr/bin/env stack -- stack --resolver lts-13.21 script import Control.Monad.STM import Control.Concurrent.STM.TVar import Test.Hspec newtype TMVar a = TMVar (TVar (Maybe a)) newTMVar :: a -> STM (TMVar a) newTMVar a = TMVar <$> newTVar (Just a) newEmptyTMVar :: STM (TMVar a) newEmptyTMVar = TMVar <$> newTVar Noth...
null
https://raw.githubusercontent.com/snoyberg/why-you-should-use-stm/adf3366aebd6daf1dd702ed4cad1c2303d296afc/exercises/05-implement-tmvar/solution.hs
haskell
stack --resolver lts-13.21 script | Returns True if put was successful, False otherwise
#!/usr/bin/env stack import Control.Monad.STM import Control.Concurrent.STM.TVar import Test.Hspec newtype TMVar a = TMVar (TVar (Maybe a)) newTMVar :: a -> STM (TMVar a) newTMVar a = TMVar <$> newTVar (Just a) newEmptyTMVar :: STM (TMVar a) newEmptyTMVar = TMVar <$> newTVar Nothing takeTMVar :: TMVar a -> STM a ta...
0381bd9e96558008ad46e417ea1349cc0f9d24f78253dde977fded09d85a0951
brendanhay/gogol
Create.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-script/gen/Gogol/Script/Projects/Versions/Create.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Creates a new immutable version using the current code, with a unique version number. * Resource ** Constructing a Request | A resource alias for @script.projects.versions.create@ method which the 'ScriptProjectsVersionsCreat...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
ada1e11aa65beac8ce29b49fce3a24f2e36d0f7a98ea16884ed0bf2361605a31
lambdabot/lambdabot
Bot.hs
{-# LANGUAGE GADTs #-} # LANGUAGE ScopedTypeVariables # | The guts of lambdabot . -- The / Lambdabot monad Generic server connection , disconnection -- The module typeclass, type and operations on modules module Lambdabot.Bot ( ircLoadModule , ircUnloadModule , checkPrivs , checkIgnore , irc...
null
https://raw.githubusercontent.com/lambdabot/lambdabot/68fe5091dc5500d10b4c92081c7a0fe9d5a4664a/lambdabot-core/src/Lambdabot/Bot.hs
haskell
# LANGUAGE GADTs # The module typeclass, type and operations on modules ---------------------------------------------------------------------- | Register a module in the irc state | Unregister a module's entry in the irc state ---------------------------------------------------------------------- | Checks whet...
# LANGUAGE ScopedTypeVariables # | The guts of lambdabot . The / Lambdabot monad Generic server connection , disconnection module Lambdabot.Bot ( ircLoadModule , ircUnloadModule , checkPrivs , checkIgnore , ircCodepage , ircGetChannels , ircQuit , ircReconnect , ircPrivmsg ...
fb55605caf8f520ddeedc35046419efe5949361e2f5aa4eaad1ba5b7dd2f1627
aphyr/gretchen
core.clj
(ns gretchen.core "In 'A Framework for Transactional Consistency Models with Atomic Visibility', Cerone, Bernardi, and Gotsman present a formal model for transactions composed of ordered reads and writes on a set of registers. They show that serializability can be defined in terms of three properties: INT (I...
null
https://raw.githubusercontent.com/aphyr/gretchen/bb7c4439884494a218561bc08a164ff0da84af36/src/gretchen/core.clj
clojure
this is exponential time and write constraint overwrite constraint another overwrite constraint a different write constraint overwrite constraint another overwrite constraint Formatting External consistency (writes k) is a map of values to txn i's, so we can use it to cross off read values. Sanity check Ma...
(ns gretchen.core "In 'A Framework for Transactional Consistency Models with Atomic Visibility', Cerone, Bernardi, and Gotsman present a formal model for transactions composed of ordered reads and writes on a set of registers. They show that serializability can be defined in terms of three properties: INT (I...
4e875539bdf4c6d17d9dac636d15582dab0ea6d93f327cb8f18d3a2f3c54cde1
wilkerlucio/pathom-viz
server.cljs
(ns com.wsscode.pathom.viz.electron.background.server (:require ["node-fetch" :default fetch] [cljs.spec.alpha :as s] [cljs.pprint] [com.fulcrologic.guardrails.core :refer [>def >defn >fdef => | <- ?]] [com.wsscode.async.async-cljs :refer [go-promise <? <!p]] [com.wsscode.async.processing :as ...
null
https://raw.githubusercontent.com/wilkerlucio/pathom-viz/6bed1d2adf556655892213de2d50fbe2db3c5423/src/electron/com/wsscode/pathom/viz/electron/background/server.cljs
clojure
(ns com.wsscode.pathom.viz.electron.background.server (:require ["node-fetch" :default fetch] [cljs.spec.alpha :as s] [cljs.pprint] [com.fulcrologic.guardrails.core :refer [>def >defn >fdef => | <- ?]] [com.wsscode.async.async-cljs :refer [go-promise <? <!p]] [com.wsscode.async.processing :as ...
309e725d7c1475361a67e6968e18207130383fed11aec00806006dc5deb91da5
Tritlo/spectacular
Utils.hs
# LANGUAGE RecordWildCards # # LANGUAGE OverloadedStrings # module CCTP.Utils where These will be ruined by GHC 9.0 + due to the reorganization These will be ruined by GHC 9.0 + due to the reorganization import GhcPlugins hiding ((<>)) import TcRnTypes import Application.TermSearch.Dataset import Application.Te...
null
https://raw.githubusercontent.com/Tritlo/spectacular/00621f4f0f03e5d0afea3c730434a8842e473546/Plugin/CCTP/Utils.hs
haskell
The old "global variable" trick, as we are creating new type variables from scratch, but we want all 'a's to refer to the same variabel, etc. This will be mkVisFunTyMany in 9.0+ Note: does not account for shadowing | Extremely crude at the moment!! Returns the typeSkeleton and any constructors (for instance looku...
# LANGUAGE RecordWildCards # # LANGUAGE OverloadedStrings # module CCTP.Utils where These will be ruined by GHC 9.0 + due to the reorganization These will be ruined by GHC 9.0 + due to the reorganization import GhcPlugins hiding ((<>)) import TcRnTypes import Application.TermSearch.Dataset import Application.Te...
a7738c94c19097abb5c428802fd280df259df06b083287778be3f9f87ef95016
korya/efuns
null.mli
(***********************************************************************) (* *) xlib for (* *) Fabrice Le Fessant , projet Para / SOR , INRIA Rocq...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/null.mli
ocaml
********************************************************************* ...
xlib for Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . class null : object inherit Wob.wob_base method no...
0b0e9af46de8443d98fb620e26f89e86e1b1abf2dcd0b1884819c7c2be695380
dyoo/whalesong
module-scoping-helper.rkt
#lang whalesong (require (for-syntax racket/base)) (provide x x++ x+1 x=0 get-x) (define x 0) (define (set-x v) (set! x v)) (define (get-x) x) (define-syntax (x++ stx) #'(plusplus-x)) (define-syntax (x+1 stx) #'(set-x (add1 x))) (define (plusplus-x) (set! x (add1 x))) (define-syntax (x=0 stx) #'(set-x...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/more-tests/module-scoping-helper.rkt
racket
#lang whalesong (require (for-syntax racket/base)) (provide x x++ x+1 x=0 get-x) (define x 0) (define (set-x v) (set! x v)) (define (get-x) x) (define-syntax (x++ stx) #'(plusplus-x)) (define-syntax (x+1 stx) #'(set-x (add1 x))) (define (plusplus-x) (set! x (add1 x))) (define-syntax (x=0 stx) #'(set-x...
293ebaad5744e04eb9e71c56d3476680a8a34d1ca8ab261dd1da063b1cdfa4c2
malcolmreynolds/GSLL
sorting.lisp
;; Sorting , Fri Apr 14 2006 - 20:20 Time - stamp : < 2009 - 05 - 25 12:42:20EDT > $ Id$ (in-package :gsl) # ' heapsort has just a cursory port , use CL 's # ' sort . ;;;;**************************************************************************** Heapsort , not recommended ;;;;*************************...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/sorting.lisp
lisp
Sorting **************************************************************************** **************************************************************************** **************************************************************************** Sorting vectors ***************************************************************...
, Fri Apr 14 2006 - 20:20 Time - stamp : < 2009 - 05 - 25 12:42:20EDT > $ Id$ (in-package :gsl) # ' heapsort has just a cursory port , use CL 's # ' sort . Heapsort , not recommended (defmacro defcomparison (name &body body) `(cffi:defcallback ,name :int ((a :pointer) (b :pointer)) ,body)) (defm...
f0ce5ad493905ff44caea14df97ba63585a35979453366654f83c22b70322146
jacius/lispbuilder
events.lisp
SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ... ( C)2006 < > Thanks to and ;; see COPYING for license This file contains some useful functions for using SDL from Common lisp ;; using sdl.lisp (the CFFI wrapper) (in-package #:lispbuilder-sdl) (defun create-event (slot-...
null
https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/sdl/events.lisp
lisp
see COPYING for license using sdl.lisp (the CFFI wrapper) The following events are necessary for input-util.lisp. Handle any user-specified event filters. of the event when it is added to the event queue. /* There are no functions directly affecting the quit event */ #define SDL_QuitRequested() \ Event Handling...
SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ... ( C)2006 < > Thanks to and This file contains some useful functions for using SDL from Common lisp (in-package #:lispbuilder-sdl) (defun create-event (slot-fn) (let ((hash-table (make-hash-table))) (loop for (slot ...
64d6f8bd35b7ed995380784727f7827e24efa182bffab7697975f658c418cb37
LPCIC/matita
foUnif.mli
||M|| This file is part of HELM , an Hypertextual , Electronic ||A|| Library of Mathematics , developed at the Computer Science ||T|| Department , University of Bologna , Italy . ||I|| ||T||...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/ng_paramodulation/foUnif.mli
ocaml
Terms.varlist ->
||M|| This file is part of HELM , an Hypertextual , Electronic ||A|| Library of Mathematics , developed at the Computer Science ||T|| Department , University of Bologna , Italy . ||I|| ||T||...
563f8eff8c5355b3a6c49c021f9b4a5ad452786460c571b98568a3b25648078c
aveltras/sessionula
File.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Sessionula.Backend.File ( fileStorage ) where import Control.Exception.Safe (tryAny) import Control.Monad (void, when) import qualified Data.ByteString as BS import ...
null
https://raw.githubusercontent.com/aveltras/sessionula/9b25861f93f2c673d56447eb4292eb4ca1677d53/backend/sessionula-file/src/Sessionula/Backend/File.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Sessionula.Backend.File ( fileStorage ) where import Control.Exception.Safe (tryAny) import Control.Monad (void, when) import qualified Data.ByteString as BS import Data.ByteString.Char8 (unpack) ...
217af5b8104d4e6d114c064b4c7b2b0500723438546d82d78cfd3a4f0610bbd6
exercism/erlang
etl.erl
-module(etl). -export([transform/1]). transform(_Old) -> undefined.
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/etl/src/etl.erl
erlang
-module(etl). -export([transform/1]). transform(_Old) -> undefined.
868831ffb749a57c2804c5e13da8b90a60cd31a1a9cbeea7259b65fd1c685fa9
otakar-smrz/elixir-fm
Complex.hs
module Elixir.Data.Moony.Complex (chapter) where import Elixir.Lexicon import qualified Elixir.Data.Moony.Complex.A as A import qualified Elixir.Data.Moony.Complex.B as B import qualified Elixir.Data.Moony.Complex.C as C import qualified Elixir.Data.Moony.Complex.D as D import qualified Elixir.Data.Moony.Complex.E ...
null
https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Moony/Complex.hs
haskell
module Elixir.Data.Moony.Complex (chapter) where import Elixir.Lexicon import qualified Elixir.Data.Moony.Complex.A as A import qualified Elixir.Data.Moony.Complex.B as B import qualified Elixir.Data.Moony.Complex.C as C import qualified Elixir.Data.Moony.Complex.D as D import qualified Elixir.Data.Moony.Complex.E ...
554353c6e365df7186c2029345ebb08a95a69cbff5cdd4554fc39a97975bf17e
dyzsr/ocaml-selectml
pr7601_ok.ml
(* TEST flags = " -w -a " * setup-ocamlc.byte-build-env ** ocamlc.byte *** check-ocamlc.byte-output *) (**************************************************************************) (* *) (* Crude slicer for preprocessing reachability verification t...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-modules-bugs/pr7601_ok.ml
ocaml
TEST flags = " -w -a " * setup-ocamlc.byte-build-env ** ocamlc.byte *** check-ocamlc.byte-output ************************************************************************ Crude slicer for preprocessing reachability verification tasks ...
Copyright ( C ) 2016 - 2017 , ISP RAS module type Analysis = sig type t type 'a maybe_region = [< `Location of t | `Value of t | `None ] as 'a val of_var : ?f:string -> string -> [ `Location of _ | `Value of _ | `None ] maybe_region end module Make (Analysis : ...
f10776d7b77a90eb0aa59f61695a821eb35d2fb933ebadc6f497937ac887dec2
nikivazou/verified_string_matching
toSMEmpty.hs
#define IncludedtoSMEmpty @ toSMEmpty : : SM target - > x:{RString | stringLen x = = 0 } - > { toSM x = = } @ toSMEmpty :: forall (target :: Symbol). (KnownSymbol target) => SM target -> RString -> Proof toSMEmpty _ x = toSM x ==. SM x (makeSMIndices x tg) ==. SM x (makeIndices x tg 0 (stringLen x -1)) ...
null
https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/Proofs/toSMEmpty.hs
haskell
#define IncludedtoSMEmpty @ toSMEmpty : : SM target - > x:{RString | stringLen x = = 0 } - > { toSM x = = } @ toSMEmpty :: forall (target :: Symbol). (KnownSymbol target) => SM target -> RString -> Proof toSMEmpty _ x = toSM x ==. SM x (makeSMIndices x tg) ==. SM x (makeIndices x tg 0 (stringLen x -1)) ...
b14e0e681528d65f82bc4d232b2317fd2cbfb9898f2019b628ff0209feb5d883
ktakashi/sagittarius-scheme
keys.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; sagittarius / crypto / pkix / keys.scm - X.509 related key operations ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are m...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/d287d45dae1b0f354d94849cf7305a13b7a9c9bd/ext/crypto/sagittarius/crypto/pkix/keys.scm
scheme
coding : utf-8 ; -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2...
sagittarius / crypto / pkix / keys.scm - X.509 related key operations Copyright ( c ) 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , ...
f90b12e37075b37348a2c14ff19448f687128c2380053b1c88b5ee1160e4e764
shamazmazum/easy-audio
macros.lisp
Copyright ( c ) 2021 , ;; 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 source code must retain the above copyright notice , this ;; list of conditions and the fo...
null
https://raw.githubusercontent.com/shamazmazum/easy-audio/4944f4ac12ffbe96f2d6bb7b116deae8203080e8/bitreader/macros.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: list of conditions and the following disclaimer. this list of conditions and the following disclaimer in the documentation and/or other materi...
Copyright ( c ) 2021 , 1 . Redistributions of source code must retain the above copyright notice , this 2 . Redistributions in binary form must reproduce the above copyright notice , THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND DISCLAIMED . IN NO EVENT SHALL THE COPYR...
786e6df4b7bfd733b32b4602f9273526fac75d9ce929e844f0ee59695a46c704
ayamada/copy-of-svn.tir.jp
logger.scm
#!/usr/bin/env gosh ;;; coding: euc-jp ;;; -*- scheme -*- ;;; vim:set ft=scheme ts=8 sts=2 sw=2 et: $ Id$ ;;; basis on #ircbot ;;; 使い方: ;;; - 以下のパラメータを使いたいように変更する ;;; - 実行する(おそらく、以下のようなコマンドになる) ./logger.scm > stdout.log 2>&1 & ;;; - 実行すると、S式書式のログが*log-dir*に、チャンネル別、日別で保存される ;;; - INVITEされると、そのチャンネルに入る (add-loa...
null
https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/iafse/pib/tags/0.1.5/sample/logger.scm
scheme
coding: euc-jp -*- scheme -*- vim:set ft=scheme ts=8 sts=2 sw=2 et: basis on #ircbot 使い方: - 以下のパラメータを使いたいように変更する - 実行する(おそらく、以下のようなコマンドになる) - 実行すると、S式書式のログが*log-dir*に、チャンネル別、日別で保存される - INVITEされると、そのチャンネルに入る ---- 最初に、JOINする 接続断 inviteのみ処理する、あとはスルー
#!/usr/bin/env gosh $ Id$ ./logger.scm > stdout.log 2>&1 & (add-load-path "../lib") (add-load-path "lib") (add-load-path ".") (use pib) (define *irc-server-ip* "localhost") (define *irc-server-port* 6667) (define *irc-server-encoding* "iso-2022-jp") (define *irc-server-pass* #f) (define *nick* "logger") (d...
46983f39a7a57a857b6da83c50eb25312b26b94e7573d17ec8cb6e5d65c8505b
haskell-foundation/foundation
File.hs
-- | -- Module : Foundation.IO.File -- License : BSD-style -- Maintainer : Foundation -- Stability : experimental -- Portability : portable -- {-# LANGUAGE OverloadedStrings #-} module Foundation.IO.File ( FilePath , openFile , closeFile , IOMode(..) , withFile , hGet , hGetNonBl...
null
https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/IO/File.hs
haskell
| Module : Foundation.IO.File License : BSD-style Maintainer : Foundation Stability : experimental Portability : portable # LANGUAGE OverloadedStrings # TODO: error management and not implemented yet getDirectory :: FilePath -> IO [FileName] getDirectory = undefined | Open a new handle on the file...
module Foundation.IO.File ( FilePath , openFile , closeFile , IOMode(..) , withFile , hGet , hGetNonBlocking , hGetSome , hPut , readFile ) where import System.IO (Handle, IOMode) import System.IO.Error import qualified System.IO as S import Fou...
6e25d1c42681a47d70478a0b3f77784042f519a8af7a3f4556b603b6388dcb86
texmacs/tm-forge
init-outline.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; MODULE : ;; DESCRIPTION : Initialize the ouline module COPYRIGHT : ( C ) 2019 - 2021 ;; This software falls under the GNU general public license version 3 orlater . ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For de...
null
https://raw.githubusercontent.com/texmacs/tm-forge/f10cf227f313c1e10d369f78d99f7eed1d51310a/miscellanea/outline/progs/init-outline.scm
scheme
DESCRIPTION : Initialize the ouline module It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the fileLICENSE in the root directory or <-3.0.html>. This plugin provides an "outline mode" for restructuring documents (display* "supports-outline? : " (supports-outline?))
MODULE : COPYRIGHT : ( C ) 2019 - 2021 This software falls under the GNU general public license version 3 orlater . (plugin-configure outline (:require #t)) (when (supports-outline?) (use-modules (outline)) (kbd-map ("C-O" (toggle-outline-toolbar)) ) (delayed (:idle 2000) (laz...
fd7c756d31ae2591f3106ca359cf2def646fddfa6bb69402f3f0204364357866
gebi/jungerl
rdbms_import_server.erl
%%% The contents of this file are subject to the Erlang Public License , Version 1.0 , ( the " License " ) ; you may not use this file except in %%% compliance with the License. You may obtain a copy of the License at %%% %%% Software distributed under the License is distributed on an " AS IS " %%% basis, WITHOU...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/rdbms/src/rdbms_import_server.erl
erlang
compliance with the License. You may obtain a copy of the License at basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Contributor(s): ______________________________________. -------------------------...
The contents of this file are subject to the Erlang Public License , Version 1.0 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is rdbms_import_server-1.0 . The Initial Developer of the Original Code is Ericss...
62f408292956976019f79729db7033103c80fefa5f946d340c37457c969e6546
danieljharvey/mimsa
Check.hs
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Language.Mimsa.Modules.Check ( getModuleType, getModuleItemIdentifier, lookupModuleDefType, lookupModuleDef, filterNameDefs, filterTypeDefs, ) where import Data.Map.Strict (Map) import qualified Data.M...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/8154c07fcd394739d6d9543dd029d06470f738c2/compiler/src/Language/Mimsa/Modules/Check.hs
haskell
used in logging etc, "what is this thing" as we'll want to pass them about at some point I think
# LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # module Language.Mimsa.Modules.Check ( getModuleType, getModuleItemIdentifier, lookupModuleDefType, lookupModuleDef, filterNameDefs, filterTypeDefs, ) where import Data.Map.Strict (Map) import qualified Data.M...
a7aa988753be8624ed7b08fcb084ef7b828f3c7729c0543278e1ddbba0dad1e6
lemmaandrew/CodingBatHaskell
squareUp.hs
From Given n>=0 , create an array length n*n with the following pattern , shown here for n=3 : { 0 , 0 , 1 , 0 , 2 , 1 , 3 , 2 , 1 } ( spaces added to show the 3 groups ) . Given n>=0, create an array length n*n with the following pattern, shown here for n=3 : {0, 0, 1, 0, 2, 1, 3, 2, 1} (spaces...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-3/squareUp.hs
haskell
From Given n>=0 , create an array length n*n with the following pattern , shown here for n=3 : { 0 , 0 , 1 , 0 , 2 , 1 , 3 , 2 , 1 } ( spaces added to show the 3 groups ) . Given n>=0, create an array length n*n with the following pattern, shown here for n=3 : {0, 0, 1, 0, 2, 1, 3, 2, 1} (spaces...
f1e8e28bba7ffaf2a9a1f0230f8fe13eafe97af761aac0cb819fc0b0ddf4aecb
input-output-hk/project-icarus-importer
Toss.hs
-- | Binary instances for Toss types. module Pos.Binary.Ssc.Toss ( ) where import Pos.Binary.Class (Cons (..), Field (..), deriveSimpleBi, deriveSimpleBiCxt) import Pos.Core.Ssc (CommitmentsMap, OpeningsMap, SharesMap, VssCertificatesMap) import Pos.Ssc.Toss.Types (SscTag (...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/ssc/Pos/Binary/Ssc/Toss.hs
haskell
| Binary instances for Toss types.
module Pos.Binary.Ssc.Toss ( ) where import Pos.Binary.Class (Cons (..), Field (..), deriveSimpleBi, deriveSimpleBiCxt) import Pos.Core.Ssc (CommitmentsMap, OpeningsMap, SharesMap, VssCertificatesMap) import Pos.Ssc.Toss.Types (SscTag (..), TossModifier (..)) import ...
a5fbd172a9451e29e63aff80070a61faae5212ca45a9d74c33f5e3a871f0ed45
kowainik/smuggler
ImplicitImportUsed.hs
module Test.ImplicitImportUsed where import Data.List foo = intercalate ","
null
https://raw.githubusercontent.com/kowainik/smuggler/b2ddcdad06a270e0b956f2203f9bebcd72301c53/test/Test/ImplicitImportUsed.hs
haskell
module Test.ImplicitImportUsed where import Data.List foo = intercalate ","
cfb20f3a1ea404b38bc233e1c91b8067274905a9b3e9c88962eb55ddee43e531
Netflix/PigPen
join_test.clj
;; ;; Copyright 2013 - 2015 Netflix , Inc. ;; 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 ;; ;; Unless required by applicable law or agreed to ...
null
https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/test/clojure/pigpen/join_test.clj
clojure
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 implied. See the License for the speci...
Copyright 2013 - 2015 Netflix , Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns pigpen.join-test (:require [clojure.test :refer :all] [pigpen.join]))
b5ed7e37d21fe555889c2e192b744e4bf70f6dcc7a289793d34a90708c2a1272
clojure-interop/aws-api
AbstractAmazonEKS.clj
(ns com.amazonaws.services.eks.AbstractAmazonEKS "Abstract implementation of AmazonEKS. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an UnsupportedOperationException." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.service...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.eks/src/com/amazonaws/services/eks/AbstractAmazonEKS.clj
clojure
(ns com.amazonaws.services.eks.AbstractAmazonEKS "Abstract implementation of AmazonEKS. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an UnsupportedOperationException." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.service...
e2ed1ee54ea3d6c55053091a84a0a1115575e1d5d0ab3964f49932fb1a61632e
kushidesign/kushi
io.cljc
(ns ^:dev/always kushi.io (:require [clojure.edn :as edn])) (defn load-edn "Load edn from an io/reader source (filename or io/resource)." [source] #?(:clj (use 'clojure.java.io)) #?(:clj (let [user-kushi-edn? (re-find #"kushi\.edn$" source)] (try (with-open [r (clojure.java.io/re...
null
https://raw.githubusercontent.com/kushidesign/kushi/5f0b220beaa67624821a5f2bd174e5649b0ffdc3/src/kushi/io.cljc
clojure
TODO use warning or error panel
(ns ^:dev/always kushi.io (:require [clojure.edn :as edn])) (defn load-edn "Load edn from an io/reader source (filename or io/resource)." [source] #?(:clj (use 'clojure.java.io)) #?(:clj (let [user-kushi-edn? (re-find #"kushi\.edn$" source)] (try (with-open [r (clojure.java.io/re...
26d959539d2026a3c3b6a9a7c3f6e1acd681c975a3a9f8bc8ba33d634fbc6a4f
kingcons/advent-of-code
tests.lisp
(defpackage :advent.tests (:use :cl :try) (:export #:test-all)) (in-package :advent.tests) (deftest test-all () (tests.2019:test-2019) (tests.2020:test-2020) (tests.2021:test-2021) (tests.2022:test-2022)) (defun test (&key (debug nil) (print 'unexpected) (describe 'unexpected)) (warn-on-tests-not-run (...
null
https://raw.githubusercontent.com/kingcons/advent-of-code/3822d5c9a8018434122ede40b58fa3473223bffc/tests/tests.lisp
lisp
(defpackage :advent.tests (:use :cl :try) (:export #:test-all)) (in-package :advent.tests) (deftest test-all () (tests.2019:test-2019) (tests.2020:test-2020) (tests.2021:test-2021) (tests.2022:test-2022)) (defun test (&key (debug nil) (print 'unexpected) (describe 'unexpected)) (warn-on-tests-not-run (...
999e7f785090eae96683942e97c31290758f23bbf83192a742303f54a95478e2
nikodemus/sb-cga
package.lisp
By Nikodemus Siivola < > , 2009 . ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , ;;;; including without limitation the rights to use, copy, modify, m...
null
https://raw.githubusercontent.com/nikodemus/sb-cga/8d83e4a045f6aa408c82b26dcec5b196849ec1bf/package.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files including without limitation the rights to use, copy, modify, merge, subject to the following conditions: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF IN NO EVEN...
By Nikodemus Siivola < > , 2009 . ( the " Software " ) , to deal in the Software without restriction , publish , distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ...
7e03b4281591a60603f78c6877a54b1025580550820e1027edb9fbbd11affa8a
haskell/c2hs
Main.hs
C->Haskell Compiler : main module -- Copyright ( c ) [ 1999 .. 2005 ] -- -- This file 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 2 of the License , or -- (at your option) any...
null
https://raw.githubusercontent.com/haskell/c2hs/bb7079f4bf3ca4af00f6178d05a8da9238ddff7c/src/Main.hs
haskell
This file is free software; you can redistribute it and/or modify (at your option) any later version. This file 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 General Publi...
C->Haskell Compiler : main module Copyright ( c ) [ 1999 .. 2005 ] it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or Language : Haskell 98 The compiler is supposed to emit a program that expands all hooks .i...
09a118d6d5474b58d7e6dcea181c16b5dcb30e6c64d78f575b0995ec0cd5b54e
hopv/MoCHi
typBinder.ml
open Util (** Type binders *) type t = | Forall | Exists let string_of = function | Forall -> "forall" | Exists -> "exists" let string_of' = function | Forall -> "$\\forall$" | Exists -> "$\\exists$" let pr p upr ppf b = Format.fprintf ppf "@[<hov2>%s %a.@ %a@]" (string_of b) Pattern....
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/typBinder.ml
ocaml
* Type binders
open Util type t = | Forall | Exists let string_of = function | Forall -> "forall" | Exists -> "exists" let string_of' = function | Forall -> "$\\forall$" | Exists -> "$\\exists$" let pr p upr ppf b = Format.fprintf ppf "@[<hov2>%s %a.@ %a@]" (string_of b) Pattern.pr p upr () let...
75951aeede4ccf2e509e03bc51d1084c24f38406f80c8ff460abfd3ac73bacc5
murbard/plebeia
plebeia_enodes.ml
* Implementation of space - efficient binary trees in OCaml . The implementation is geared for used in Tezos , though it is rather generic . A stop - and - copy GC is provided . This implementation aims to maximize correctness and cares second about efficiency . Extracting and efficient C progr...
null
https://raw.githubusercontent.com/murbard/plebeia/95a0eed6f7b8c6836d15032557467a3e93bd83b8/attic/plebeia_enodes.ml
ocaml
* Whenever we need to consistently pick side that doesn't really correspond to a real side. By convention, it is Left. * A segment is always just a list of sides. TODO: use bit arithmetic for speed and memory footprint. * The empty segment. * Cuts a path into a head and tail if not empty. * Converts a list...
* Implementation of space - efficient binary trees in OCaml . The implementation is geared for used in Tezos , though it is rather generic . A stop - and - copy GC is provided . This implementation aims to maximize correctness and cares second about efficiency . Extracting and efficient C progr...
a183270a4a3635e813377bc27073982e9b1d2759fb24418985b60445d65f541c
justinethier/nugget
ntalk.scm
;;; The following code is appended to all benchmarks. ;;; Given an integer and an object, returns the object ;;; without making it too easy for compilers to tell ;;; the object will be returned. (define (hide r x) (call-with-values (lambda () (values (vector values (lambda (x) x)) (if (< r 100...
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/benchmarks/chicken/ntalk.scm
scheme
The following code is appended to all benchmarks. Given an integer and an object, returns the object without making it too easy for compilers to tell the object will be returned. Given the name of a benchmark, the number of times it should be executed, a thunk that runs the benchmark once, and a unary predicate...
(define (hide r x) (call-with-values (lambda () (values (vector values (lambda (x) x)) (if (< r 100) 0 1))) (lambda (v i) ((vector-ref v i) x)))) (define (run-r7rs-benchmark name count thunk ok?) Rounds to thousandths . (define (rounded x) (/ (round (* 1000 x)) 1000)) (di...
b3c25003f49e783840a2e41c45ab1bbde04e643e52205712349b06aed25c00a9
ohpauleez/themis
extended_protos.clj
(ns themis.extended-protos (:require [themis.protocols :as protocols])) (extend-protocol protocols/Navigable clojure.lang.PersistentVector (-navigate [t coordinate-vec] (get-in t coordinate-vec)) clojure.lang.IPersistentMap (-navigate [t coordinate-vec] (get-in t coordinate-vec)) ;java.lang.String ...
null
https://raw.githubusercontent.com/ohpauleez/themis/4d3fb3ccf5911c16148b2f1221af4e708dcd34b4/src/themis/extended_protos.clj
clojure
java.lang.String (-navigate [t coordinate-vec] (get-in t coordinate-vec))
(ns themis.extended-protos (:require [themis.protocols :as protocols])) (extend-protocol protocols/Navigable clojure.lang.PersistentVector (-navigate [t coordinate-vec] (get-in t coordinate-vec)) clojure.lang.IPersistentMap (-navigate [t coordinate-vec] (get-in t coordinate-vec)) )
bb994d00df3cdcebacaeffd8fc920a82a429c7b87abc178b7ed780b2edd06f1c
hypernumbers/hypernumbers
twilio_rt_machine.erl
%%%------------------------------------------------------------------- @author < > 2011 , @doc Twilio machine . %%% %%% @end Created : 10 Jul 2011 %%%------------------------------------------------------------------- -module(twilio_rt_machine). -export([handle_request/2]). -include("twilio.hrl"). %% @...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/twilio/examples/twilio_rt_machine.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- @doc Handle incoming twilio requests on "/machine". these are values sent in from twilio
@author < > 2011 , @doc Twilio machine . Created : 10 Jul 2011 -module(twilio_rt_machine). -export([handle_request/2]). -include("twilio.hrl"). handle_request(["start"], Params) -> City = proplists:get_value("ToCity", Params), State = proplists:get_value("ToState", Params), [ #say{t...
5e239359b51dde28564e336a0ceff5c3e3d8c45eca726dcb81c24a7fb5a3da2e
mediocregopher/chdl
num_conv.clj
(ns chdl.gamma.num-conv "Functions for converting numbers to/from std_logic_vector in vhdl" (:require [chdl.alpha.literal :as lit] [chdl.beta.comp :as comp])) (defn- unsigned [i] (comp/paren-call "UNSIGNED" i)) (defn- signed [i] (comp/paren-call "SIGNED" i)) (defn- to-integer [i] (comp/paren-call "TO_INTEG...
null
https://raw.githubusercontent.com/mediocregopher/chdl/b48b33e9215a84fbcdfa3f15446efc092c86d079/src/chdl/gamma/num_conv.clj
clojure
(ns chdl.gamma.num-conv "Functions for converting numbers to/from std_logic_vector in vhdl" (:require [chdl.alpha.literal :as lit] [chdl.beta.comp :as comp])) (defn- unsigned [i] (comp/paren-call "UNSIGNED" i)) (defn- signed [i] (comp/paren-call "SIGNED" i)) (defn- to-integer [i] (comp/paren-call "TO_INTEG...
c454173d11143058212fd8a21e444a6bd0321691649605bd5f6c14d0f7398a6e
8c6794b6/haskell-sc-scratch
Generator1.hs
------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : non-portable -- -- From: -- * -- module Delimited.Generator1 where import Delimited.CCExc i...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Oleg/Delimited/Generator1.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : non-portable From:
CopyRight : ( c ) 8c6794b6 Maintainer : * module Delimited.Generator1 where import Delimited.CCExc import Control.Monad.Trans (liftIO, lift) import Control.Monad.ST import Data.STRef type Label = Int data Tree = Leaf | Node Label Tree Tree deriving (Show) make_full_tree :: Int -> Tr...
7052ad66e2b38935d193528098fdc11375e0ffe7f3c0e5c23a790e330cde3e09
jsarracino/spyder
Direct.hs
module Language.Spyder.Translate.Direct ( translateExpr , translateBlock , translateStmt , eval' , unvalue , asInt , translateProg , mangleFunc ) where import Language.Spyder.AST import qualified Language.Spyder.AST.Imp as Imp import qualified Language.Spyder.AST.Spec as Spec import Language.S...
null
https://raw.githubusercontent.com/jsarracino/spyder/a2f6d08eb2a3907d31a89ae3d942b50aaba96a88/Language/Spyder/Translate/Direct.hs
haskell
for loops, we need to insert multiple statements, so we return a list. also, we need to introduce variables, so we plumb a scope around. convert decls into a variable declaration and an assignment. program is NOT alpha-renamed, so name-collisions are a problem. convert for (vs) (with given_idx) in (arrs) { b...
module Language.Spyder.Translate.Direct ( translateExpr , translateBlock , translateStmt , eval' , unvalue , asInt , translateProg , mangleFunc ) where import Language.Spyder.AST import qualified Language.Spyder.AST.Imp as Imp import qualified Language.Spyder.AST.Spec as Spec import Language.S...