_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
60661de82cd5558e61966fc308eba23d1fdfe4e8ffbcd7429031ca14e7b1b50a
genmeblog/genuary
day15.clj
;; Sand. (ns genuary.2022.day15 (:require [clojure2d.core :as c2d] [clojure2d.extra.utils :as utils] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [clojure2d.pixels :as p])) (set! *warn-on-reflection* true) (set! *unchecked-math* :wa...
null
https://raw.githubusercontent.com/genmeblog/genuary/c8d5d23d5bc3d91b90a894461c9af27f9a15ad65/src/genuary/2022/day15.clj
clojure
Sand. (c2d/save res "results/2022/day15.jpg")
(ns genuary.2022.day15 (:require [clojure2d.core :as c2d] [clojure2d.extra.utils :as utils] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [clojure2d.pixels :as p])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-box...
57bca7c97fedf87d3887533f880d882ee9dfa52aad9b2420a46128867725754d
ajhc/ajhc
Verbosity.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.Verbosity Copyright : 2007 -- -- Maintainer : -- Portability : portable -- A simple ' Verbosity ' type with associated utilities . There are 4 standard -- verbosity levels from 'silent', 'nor...
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src_jahm/Distribution/Verbosity.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.Verbosity Maintainer : Portability : portable verbosity levels from 'silent', 'normal', 'verbose' up to 'deafening'. This is used for deciding what logging messages to print. * Verbosity We shouldn't ...
Copyright : 2007 A simple ' Verbosity ' type with associated utilities . There are 4 standard Verbosity for functions Copyright ( c ) 2007 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following condi...
800e765fc4edb7b71dd3bf8aa79f133d4cb1621b1a64022056fc6d6b43b13d21
nuprl/gradual-typing-performance
data.rkt
#lang racket (define-struct posn (x y) #:prefab) (define-struct block (x y color) #:prefab) (define-struct tetra (center blocks) #:prefab) (define-struct world (tetra blocks) #:prefab) (define (posn=? p1 p2) (and (= (posn-x p1) (posn-x p2)) (= (posn-y p1) (posn-y p2)))) (provide (struct-out block) (struct...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/unsafe/tetris/both/data.rkt
racket
#lang racket (define-struct posn (x y) #:prefab) (define-struct block (x y color) #:prefab) (define-struct tetra (center blocks) #:prefab) (define-struct world (tetra blocks) #:prefab) (define (posn=? p1 p2) (and (= (posn-x p1) (posn-x p2)) (= (posn-y p1) (posn-y p2)))) (provide (struct-out block) (struct...
28de03a883a53b79d09d0397212ffc0910ea5fd2c70a4f09e0c631279b11accd
jeapostrophe/exp
nsb2org.rkt
#lang racket (require racket/pretty (planet "html-parsing.rkt" ("neil" "html-parsing.plt"))) (define p "/home/jay/Dev/scm/github.jeapostrophe/home/etc/bookmarks_12_20_11.html") (define s (file->string p)) (define x (html->xexp s)) (define l (list-ref x 11)) (define current-indent 1) (define-syntax-rule (inde...
null
https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/nsb2org.rkt
racket
#lang racket (require racket/pretty (planet "html-parsing.rkt" ("neil" "html-parsing.plt"))) (define p "/home/jay/Dev/scm/github.jeapostrophe/home/etc/bookmarks_12_20_11.html") (define s (file->string p)) (define x (html->xexp s)) (define l (list-ref x 11)) (define current-indent 1) (define-syntax-rule (inde...
6e9057896c186fb279b15d43577370147761563c4f465a770f6e2f087ec1962e
ingesolvoll/kee-frame
controller.cljc
(ns ^:no-doc kee-frame.controller (:require #?(:cljs [cljs.core.match :refer [match]]) #?(:clj [clojure.core.match :refer [match]]) [kee-frame.state :as state] [kee-frame.spec :as spec] [clojure.spec.alpha :as s] [expound.alpha :as e] [taoensso.timbre :as log] [re-frame.core :as rf...
null
https://raw.githubusercontent.com/ingesolvoll/kee-frame/e77a672ca1a913b7eedd5b2e65af47a497755426/src/kee_frame/controller.cljc
clojure
Another dispatch to make sure all controller stop commands are processed before the starts
(ns ^:no-doc kee-frame.controller (:require #?(:cljs [cljs.core.match :refer [match]]) #?(:clj [clojure.core.match :refer [match]]) [kee-frame.state :as state] [kee-frame.spec :as spec] [clojure.spec.alpha :as s] [expound.alpha :as e] [taoensso.timbre :as log] [re-frame.core :as rf...
23659715890064f7beff584fd5af95a79ab8541ef98f3d19543b2a0217251e6d
toothbrush/dotfs
HelperParsers.hs
module System.DotFS.Core.HelperParsers where import System.DotFS.Core.Datatypes import Control.Monad (join) import Text.Parsec import Text.Parsec.String eatEverything :: VarParser String eatEverything = many anyChar -- new combinator: (source: -January/003123.html) many1Till :: Show end => VarParser a -> VarPars...
null
https://raw.githubusercontent.com/toothbrush/dotfs/36c7e62bda235728ffbb501fe1d2c34210a870a8/System/DotFS/Core/HelperParsers.hs
haskell
new combinator: (source: -January/003123.html) combinator that outputs the state tupled with the parse result parseTest adepted to accept an initial state
module System.DotFS.Core.HelperParsers where import System.DotFS.Core.Datatypes import Control.Monad (join) import Text.Parsec import Text.Parsec.String eatEverything :: VarParser String eatEverything = many anyChar many1Till :: Show end => VarParser a -> VarParser end -> VarParser [a] many1Till p end = do notFo...
0b347b289895b88f3cc6fb5ee8ce11972b4613e6af199ae909cf49f3b209f8a9
LambdaScientist/CLaSH-by-example
TestBusSignals.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # module InAndOut.TestBusSignals where import CLaSH.Prelude import SAFE.TestingTools import SAFE.CommonClash import InAndOut.Models.BusSignals import Text.PrettyPrint.HughesPJClass import GHC.Generics (Generic) import Control.DeepSeq configurationList ...
null
https://raw.githubusercontent.com/LambdaScientist/CLaSH-by-example/e783cd2f2408e67baf7f36c10398c27036a78ef3/HaskellClashExamples/src/InAndOut/TestBusSignals.hs
haskell
-TESTING
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # module InAndOut.TestBusSignals where import CLaSH.Prelude import SAFE.TestingTools import SAFE.CommonClash import InAndOut.Models.BusSignals import Text.PrettyPrint.HughesPJClass import GHC.Generics (Generic) import Control.DeepSeq configurationList ...
bc90c673af4c5391449514254e42f219b4a7a778d3189e3314170dd6aafeaca6
mfikes/fifth-postulate
ns445.cljs
(ns fifth-postulate.ns445) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns445.cljs
clojure
(ns fifth-postulate.ns445) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
da14d971d5c923b66c0cb9e039700184c842b3fb512ea95fd153af46287541ab
TyOverby/mono
main.ml
open! Core open! Bonsai_web open Bonsai.Let_syntax let component = let%sub is_connected, set_is_connected = Bonsai.state [%here] (module Bool) ~default_model:false in let%sub not_connected_warning_box = Bonsai_web_ui_not_connected_warning_box.( component ~create_message:message_for_async_durable is...
null
https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/app/bonsai-examples/not_connected_warning_box/main.ml
ocaml
open! Core open! Bonsai_web open Bonsai.Let_syntax let component = let%sub is_connected, set_is_connected = Bonsai.state [%here] (module Bool) ~default_model:false in let%sub not_connected_warning_box = Bonsai_web_ui_not_connected_warning_box.( component ~create_message:message_for_async_durable is...
0af42570c01cb5c963d46f37d6f46e4bd91f36bfa932bbd4ec8e031655a74322
fwcd/curry-language-server
Handlers.hs
module Curry.LanguageServer.Handlers (handlers) where import Curry.LanguageServer.Handlers.CodeAction (codeActionHandler) import Curry.LanguageServer.Handlers.CodeLens (codeLensHandler) import Curry.LanguageServer.Handlers.Command (commandHandler) import Curry.LanguageServer.Handlers.Completion (completionHandler) imp...
null
https://raw.githubusercontent.com/fwcd/curry-language-server/1e4867e951c1323dd2e94cd6c61741a8079df322/src/Curry/LanguageServer/Handlers.hs
haskell
Request handlers Notification handlers
module Curry.LanguageServer.Handlers (handlers) where import Curry.LanguageServer.Handlers.CodeAction (codeActionHandler) import Curry.LanguageServer.Handlers.CodeLens (codeLensHandler) import Curry.LanguageServer.Handlers.Command (commandHandler) import Curry.LanguageServer.Handlers.Completion (completionHandler) imp...
90d0df80ab262861638da60863191659e3be784ab6b04d4b78780adb76e7cbe5
foshardware/lsc
Entropy.hs
Copyright 2018 - < > SPDX - License - Identifier : GPL-3.0 - or - later module LSC.Entropy ( nonDeterministic , entropyVectorInt, entropyVector32 , Permutation, randomPermutation , module System.Random.MWC ) where import Control.Monad.Primitive import Data.ByteString hiding (replicate) import Data.Se...
null
https://raw.githubusercontent.com/foshardware/lsc/006c245a89b0a0056286205917438c7d031d04b9/src/LSC/Entropy.hs
haskell
| This function does not reach all possible permutations for lists are bound by its possible seed values. not more than 969! different states. seed bits: 8222
Copyright 2018 - < > SPDX - License - Identifier : GPL-3.0 - or - later module LSC.Entropy ( nonDeterministic , entropyVectorInt, entropyVector32 , Permutation, randomPermutation , module System.Random.MWC ) where import Control.Monad.Primitive import Data.ByteString hiding (replicate) import Data.Se...
9ae8fff3c8559c5b0a6005cb455a3d3fb362c4143c822c2a85edc26dc3a939fb
BinaryAnalysisPlatform/bap-plugins
simple.ml
open Bap.Std open Core_kernel open Options open Ctxt let simplify ctxt sub_path = let arch = Project.arch ctxt.project in let mem_to_reg = Mem_to_reg.analyze in let fold_consts = Fold_consts.analyze ~fixsp:false arch in let o = ctxt.options in match (o.mem_to_reg, o.fold_consts) with | true,true -> ...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/minos/simple.ml
ocaml
fold_consts ssa's by default
open Bap.Std open Core_kernel open Options open Ctxt let simplify ctxt sub_path = let arch = Project.arch ctxt.project in let mem_to_reg = Mem_to_reg.analyze in let fold_consts = Fold_consts.analyze ~fixsp:false arch in let o = ctxt.options in match (o.mem_to_reg, o.fold_consts) with | true,true -> ...
7ff0c11ab6063e21fc3864f912b55751875d6506614069a61927e5a7d1feab8a
ygrek/mldonkey
list2.mli
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/cdk/list2.mli
ocaml
d [removeq ele list] returns a copy of [list] where all memory occurences of [ele] have been removed. d [remove ele list] returns a copy of [list] where all structural occurences of [ele] have been removed. * [filter_map f l]
Copyright 2001 , 2002 b8_bavard , b8_fee_carabine , This file is part of mldonkey . mldonkey 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 ...
1d3bdd77f226edd65fee7b88f0f23942086e96f1caef5f2d0851de5f86d79a58
erlware/erlware_commons
ec_semver.erl
%%% vi:ts=4 sw=4 et %%%------------------------------------------------------------------- ( C ) 2011 , Erlware LLC %%% @doc Helper functions for working with semver versioning strings . %%% See / for the spec. %%% @end %%%------------------------------------------------------------------- -module(ec_semver). -...
null
https://raw.githubusercontent.com/erlware/erlware_commons/eeb25f4b7f4d9f423a0470461d225fb6a61217d2/src/ec_semver.erl
erlang
vi:ts=4 sw=4 et ------------------------------------------------------------------- @doc See / for the spec. @end ------------------------------------------------------------------- For internal use by the ec_semver_parser peg =================================================================== Public Types =====...
( C ) 2011 , Erlware LLC Helper functions for working with semver versioning strings . -module(ec_semver). -export([parse/1, format/1, eql/2, gt/2, gte/2, lt/2, lte/2, pes/2, between/3]). -export([internal_parse_version/1]). -export_type([...
96a1b1a269e21da74001c5a3efae9dd492d4f01603af794fe07725e8230ce81a
SamB/coq
pptactic.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/parsing/pptactic.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i $Id$ i if the boolean is false th...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Genarg open T...
f5fd74d5062763dd0de35180d13769e74df2cffa455a5ecf8bfcc6a034bf4288
bobzhang/fan
gcomb.mli
(** the output is reversed, you have to reverse the list output if you care about the order *) val slist0 : f:('a list -> 'b) -> ('c Streamf.t -> 'a) -> 'c Streamf.t -> 'b val slist1 : f:('a list -> 'b) -> ('c Streamf.t -> 'a) -> 'c Streamf.t -> 'b val slist0sep : err:('a -> string) -> f:(...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/treeparser/gcomb.mli
ocaml
* the output is reversed, you have to reverse the list output if you care about the order
val slist0 : f:('a list -> 'b) -> ('c Streamf.t -> 'a) -> 'c Streamf.t -> 'b val slist1 : f:('a list -> 'b) -> ('c Streamf.t -> 'a) -> 'c Streamf.t -> 'b val slist0sep : err:('a -> string) -> f:('b list -> 'c) -> ('d Streamf.t -> 'b) -> ('d Streamf.t -> 'a) -> 'd Streamf.t -> 'c val slist1se...
09e370c546dc4816e9c90751c91f8a9e5ee8025a73717f8cd1e23b0197056599
schemedoc/ffi-cookbook
time-chicken.scm
(import (chicken foreign)) (define (libc-time) ((foreign-lambda unsigned-long "time" (c-pointer void)) #f)) (display (libc-time)) (newline)
null
https://raw.githubusercontent.com/schemedoc/ffi-cookbook/75d3594135b5a4c5deea9a064a1aef5a95312f85/libc/time-chicken.scm
scheme
(import (chicken foreign)) (define (libc-time) ((foreign-lambda unsigned-long "time" (c-pointer void)) #f)) (display (libc-time)) (newline)
358f40ec98a31f46c2722e00627292732f71937a0b31458d87a009d09c13a334
mekispeter/haskell2019spring
Natural.hs
Functional Programming for Logicians , 2019 Spring May 13 Session Functional Programming for Logicians, 2019 Spring May 13 Session -} module Natural where -- Instead of using Int or Integer for indices, which allow for negative -- numbers, we define our own version of natural numbers. The type definitio...
null
https://raw.githubusercontent.com/mekispeter/haskell2019spring/18fa81092cdc7a15c8ef92a2eff8274dfe79d00d/src/haskell_may13/Natural.hs
haskell
Instead of using Int or Integer for indices, which allow for negative numbers, we define our own version of natural numbers. The type definition is straightforward, but we need to instantiate quite a lot of classes.
Functional Programming for Logicians , 2019 Spring May 13 Session Functional Programming for Logicians, 2019 Spring May 13 Session -} module Natural where data Natural = Zero | Succ Natural deriving (Eq, Ord) instance Enum Natural where succ = Succ pred Zero = error "Zer...
2e9dc51dd2b123909229b352b7a1241d5c26334fac0805a7df506bcb0a2d133b
RefactoringTools/HaRe
GhcUtilsSpec.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE CPP # module GhcUtilsSpec (main, spec) where import Test.Hspec import TestUtils import qualified GHC as GHC import qualified Data . Generics as SYB import qualified GHC.SYB.Utils as SYB import Language . Haskell . GHC.ExactPrint . Util...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/GhcUtilsSpec.hs
haskell
--------------------------------------------------------------------- --------------------------------- ( SYB.showData SYB.Renamer 0 d ) ` shouldBe ` " " --------------------------------- (SYB.showData SYB.Renamer 0 d) `shouldBe` "" ---------------------------------------------------------------------
# LANGUAGE ScopedTypeVariables # # LANGUAGE CPP # module GhcUtilsSpec (main, spec) where import Test.Hspec import TestUtils import qualified GHC as GHC import qualified Data . Generics as SYB import qualified GHC.SYB.Utils as SYB import Language . Haskell . GHC.ExactPrint . Util...
1dd8bf6c568276bcad68dd6f066b2db9de1bfd7d78eec223620ac2b791d08c8b
logsem/mitten_preorder
syntax.ml
open Sexplib open Mode_theory type uni_level = int type t = DeBruijn indices for variables BINDS BINDS 2 BINDS BINDS BINDS | Uni of uni_level | TyMod of m * t | Mod of m * t BINDS | Axiom of string * t type envhead = | Ty of t | Mo of m type env = envhead list exception Illformed let rec ...
null
https://raw.githubusercontent.com/logsem/mitten_preorder/54cd337c4b0f5fbb01cc80e10c123c59ca74dc57/src/lib/syntax.ml
ocaml
need pp for cells to pretty print variables also for non trivial cells
open Sexplib open Mode_theory type uni_level = int type t = DeBruijn indices for variables BINDS BINDS 2 BINDS BINDS BINDS | Uni of uni_level | TyMod of m * t | Mod of m * t BINDS | Axiom of string * t type envhead = | Ty of t | Mo of m type env = envhead list exception Illformed let rec ...
81ce9337b7d7c36683ae4ac2a3f710d97ecd5a8b359a8f8f837480af4059a6df
input-output-hk/cardano-sl
PollSpec.hs
# LANGUAGE RecordWildCards # -- | Specification for submodules of Pos.Chain.Update module Test.Pos.Update.PollSpec ( spec ) where import Universum import Control.Lens (at) import qualified Data.HashSet as HS import Test.Hspec (Spec, describe) import Test.Hspec.Q...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/test/Test/Pos/Update/PollSpec.hs
haskell
| Specification for submodules of Pos.Chain.Update 'resultModifiers' has a 'mempty' poll modifier up front, so 'newPollStates' at the head of 'resultPStates' to make up for that. | Type synonym used for convenience. that each property will supply. | Operational equivalence operator in the 'PurePoll' monad. To be ...
# LANGUAGE RecordWildCards # module Test.Pos.Update.PollSpec ( spec ) where import Universum import Control.Lens (at) import qualified Data.HashSet as HS import Test.Hspec (Spec, describe) import Test.Hspec.QuickCheck (modifyMaxSuccess, prop) import Te...
46b04adca83f2988555f2f97ed23e520bccb0786e86cee9921af9fe63dc2aadf
arunisaac/ccwl
utils.scm
;;; ccwl --- Concise Common Workflow Language Copyright © 2021 , 2022 Arun Isaac < > ;;; This file is part of ccwl . ;;; ;;; ccwl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the L...
null
https://raw.githubusercontent.com/arunisaac/ccwl/b2e3a9fd8b3c0c2a76684a78aaff80a759641120/tests/utils.scm
scheme
ccwl --- Concise Common Workflow Language ccwl is free software: you can redistribute it and/or modify it (at your option) any later version. ccwl 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 PURPOS...
Copyright © 2021 , 2022 Arun Isaac < > This file is part of ccwl . under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License along with ccwl . If not , see < / > ....
c3b7271724b420ac584646302d5fadaec80f0c3b9fb7f61d4b232024c74f54b5
ejgallego/coq-lsp
memo.ml
module CS = Stats module Stats = struct type 'a t = { res : 'a ; cache_hit : bool ; memory : int ; time : float } let make ?(cache_hit = false) ~time res = (* This is quite slow! *) (* let memory = Obj.magic res |> Obj.reachable_words in *) let memory = 0 in { res; cache_hit; m...
null
https://raw.githubusercontent.com/ejgallego/coq-lsp/d4f2fd0d5068a0a7893c70cc967c72908f923ba7/fleche/memo.ml
ocaml
This is quite slow! let memory = Obj.magic res |> Obj.reachable_words in Loc-independent command evalution and caching. We store the location as to compute an offset for cached results XXX: Move elsewhere Don't cache interruptions
module CS = Stats module Stats = struct type 'a t = { res : 'a ; cache_hit : bool ; memory : int ; time : float } let make ?(cache_hit = false) ~time res = let memory = 0 in { res; cache_hit; memory; time } end module CacheStats = struct let nhit, ntotal = (ref 0, ref 0) let rese...
0a5fe5b6109670b6a8b0be99830f30ceb8e9ca54ddd39fbf99e3eb29a00480ec
kosmikus/popl21-liquid-haskell-tutorial
SExec.hs
{-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} {- LIQUID "--no-totality" @-} module SExec where import Memory import qualified Data.Set as S type Acc = Int type Reg = Int type Config = (Acc, Mem Reg) data Code = Load Int Code | Store Reg Code | Add Reg Code | Free Reg Code ...
null
https://raw.githubusercontent.com/kosmikus/popl21-liquid-haskell-tutorial/4353aa70e943d6da7821ef2fd5ef8cd6c56b39e7/SExec.hs
haskell
@ LIQUID "--reflection" @ @ LIQUID "--ple" @ LIQUID "--no-totality" @ @ reflect validMem @ @ reflect add @
module SExec where import Memory import qualified Data.Set as S type Acc = Int type Reg = Int type Config = (Acc, Mem Reg) data Code = Load Int Code | Store Reg Code | Add Reg Code | Free Reg Code | Halt @ exec : : c : Code - > ( a::Acc , { m : validMem m c a } ) - > Config @ exec :: Code...
473cbd58ae2a15990a32b53d34878b758cdbbbd009293b7396bc5126f411f69c
gergoerdi/clash-intel8080
TestBench.hs
module Hardware.Intel8080.TestBench where import Clash.Prelude hiding ((^)) import Hardware.Intel8080 import Prelude (putChar, (^)) import Control.Monad import Control.Monad.IO.Class import Control.Monad.Writer import Data.Array import Data.Array.IO import Data.Char import Data.Word (Word8) import qualified Data.List...
null
https://raw.githubusercontent.com/gergoerdi/clash-intel8080/7190e2e992db74cc32010ff42afc06bbce839450/test/Hardware/Intel8080/TestBench.hs
haskell
0x000F: putStr: MVI C, '$' 0x0013: JNZ next 0x0017: next: OUT 0 0x0019: INX DE
module Hardware.Intel8080.TestBench where import Clash.Prelude hiding ((^)) import Hardware.Intel8080 import Prelude (putChar, (^)) import Control.Monad import Control.Monad.IO.Class import Control.Monad.Writer import Data.Array import Data.Array.IO import Data.Char import Data.Word (Word8) import qualified Data.List...
15bb01f9f171721efbead5ef75cea8d10f97c83ad630ad68f5b4fd4fac4a70a6
wdebeaum/step
wheezing.lisp
;;;; ;;;; w::wheezing ;;;; (define-words :pos W::n :words ( (w::wheezing (senses ((LF-PARENT ONT::dyspnea) (TEMPL mass-pred-TEMPL) (syntax (W::morph (:forms (-none)))) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wheezing.lisp
lisp
w::wheezing
(define-words :pos W::n :words ( (w::wheezing (senses ((LF-PARENT ONT::dyspnea) (TEMPL mass-pred-TEMPL) (syntax (W::morph (:forms (-none)))) ) ) ) ))
5381725ac1f245878fccbc8e175ed4ad5ba601f09a30adea8fc6d918532491fe
VictorNicollet/Ohm
util.ml
Ohm is © 2012 type role = [ `Bot | `Web | `Put | `Reset ] let pid = Unix.getpid () let _role = ref None let role () = let role = let bot = ref false and put = ref false and cgi = ref false and reset = ref false in Arg.parse [ "--reset", Arg.Set reset, "force othe...
null
https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/src/util.ml
ocaml
Ohm is © 2012 type role = [ `Bot | `Web | `Put | `Reset ] let pid = Unix.getpid () let _role = ref None let role () = let role = let bot = ref false and put = ref false and cgi = ref false and reset = ref false in Arg.parse [ "--reset", Arg.Set reset, "force othe...
0df314432b43ab8f5dcb873c38dd67c0849f0b61ab9968cd5cd030c187757f78
Lovesan/doors
psapi.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- Copyright ( C ) 2010 - 2011 , < > ;;; 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 lim...
null
https://raw.githubusercontent.com/Lovesan/doors/12a2fe2fd8d6c42ae314bd6d02a1d2332f12499e/system/psapi.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do...
Copyright ( C ) 2010 - 2011 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-packag...
7870c7f0c90c796b8ab5cd865efcbba9f55fd7f58c2095907551a08514fdded9
ruhler/smten
Either.hs
# LANGUAGE NoImplicitPrelude # module Smten.Base.Data.Either ( Either(..), either, lefts, rights, partitionEithers, ) where import GHC.Classes import GHC.Base import GHC.Show data Either a b = Left a | Right b deriving (Eq, Ord, Show) -- TODO: derive Read too instance Functor (Either a) where fma...
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Base/Data/Either.hs
haskell
TODO: derive Read too
# LANGUAGE NoImplicitPrelude # module Smten.Base.Data.Either ( Either(..), either, lefts, rights, partitionEithers, ) where import GHC.Classes import GHC.Base import GHC.Show data Either a b = Left a | Right b instance Functor (Either a) where fmap _ (Left x) = Left x fmap f (Right y) = Right (f y) ...
2329b033acda5149a9dd59f6317860f3954584d9095ddc0237759344661e0c66
DrakeAxelrod/mrclean
Spec.hs
-- DEPRECATED import MrCParser import Test.QuickCheck -- | statements :: [(String, Expr, Bool)] statements = [ ("x := y", Assign (Var "x") (Var "y"), True), ("x -> x", Lambda (Var "x") (Var "x"), True), ("x|y", Application (Var "x") (Var "y"), True), ("v", Var "v", True), ("x := (x -> x)", Assi...
null
https://raw.githubusercontent.com/DrakeAxelrod/mrclean/1fe5d422e9eb88b03f034e792b8ebe97fdbe5fb5/test/Spec.hs
haskell
DEPRECATED | test allTestStatements show the one that fails
import MrCParser import Test.QuickCheck statements :: [(String, Expr, Bool)] statements = [ ("x := y", Assign (Var "x") (Var "y"), True), ("x -> x", Lambda (Var "x") (Var "x"), True), ("x|y", Application (Var "x") (Var "y"), True), ("v", Var "v", True), ("x := (x -> x)", Assign (Var "x") (Lambda (...
41c5e92ecfa49738d74ce38003a22a910c4c43b9acb65c46942b118b3eb0af9e
brendanhay/amazonka
UpdateConnectClientAddIn.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/gen/Amazonka/WorkSpaces/UpdateConnectClientAddIn.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newUpdateConnectClientAddIn' smart constructor. | The name of the client add-in. | The identifier of the client add-in to update....
# 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...
e94952f8d863daf568e9910a413933c1fdb5ebc82f1b7f5e6e66e857563087eb
hstreamdb/hstream
ValidateSpec.hs
# LANGUAGE LambdaCase # # LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} module HStream.SQL.ValidateSpec where import qualified Data.Aeson as A import Data.Either (isLeft, isRight) import Data.Function import Data.Functor imp...
null
https://raw.githubusercontent.com/hstreamdb/hstream/1e62ffdf8e51ade146df43ac18c163948b90cc1b/hstream-sql/test/HStream/SQL/ValidateSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # LANGUAGE OverloadedLists # module HStream.SQL.ValidateSpec where import qualified Data.Aeson as A import Data.Either (isLeft, isRight) import Data.Function import Data.Functor import qualified Data.Text ...
08dca2a503f886b9826ef2eaba5d5771e59f8a106010df0250ba5b7bdbfc6707
tezos/tezos-mirror
baking_actions.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/f0fac81ca8d49f180e663316b2566780ddc1517e/src/proto_alpha/lib_delegate/baking_actions.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
cc30ecfa1eb2902e9a7a3ca9d94123d56bd1cf73e382635527defeee772bd45f
ianthehenry/basilica
Routes.hs
module Routes ( Request(..) , Response(..) ) where import ClassyPrelude import Types type Name = Text data Request = GetPost ID | ListPosts PostQuery | CreatePost (Maybe ID) Token Text | CreateCode EmailAddress | CreateToken Code | CreateUser EmailAddr...
null
https://raw.githubusercontent.com/ianthehenry/basilica/da80accd601efa0d90187afee90fe6e77cddbd76/Routes.hs
haskell
module Routes ( Request(..) , Response(..) ) where import ClassyPrelude import Types type Name = Text data Request = GetPost ID | ListPosts PostQuery | CreatePost (Maybe ID) Token Text | CreateCode EmailAddress | CreateToken Code | CreateUser EmailAddr...
ef7fc4a0570b0f30d40292c4a6934fbd8ab6843aa677dd5367d490f7a8480e26
dcavar/schemeNLP
chartrigram.scm
":"; exec mzscheme -r $0 "$@" ;;; ---------------------------------------------------- ;;; Filename: chartrigrams.ss Author : < > ;;; ( C ) 2006 by ;;; ;;; This code is published under the restrictive GPL! ;;; Please find the text of the GPL here: ;;; ;;; ;;; It is free for use, change, etc. as long as t...
null
https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/chartrigram.scm
scheme
exec mzscheme -r $0 "$@" ---------------------------------------------------- Filename: chartrigrams.ss This code is published under the restrictive GPL! Please find the text of the GPL here: It is free for use, change, etc. as long as the copyright note above is included in any modified version of the cod...
Author : < > ( C ) 2006 by 1 . The text file is loaded into memory . 2 . Trigrams of characters are created from the corpus . 3 . The hash - table is converted into a list of key - value tuples . 4 . The key - values are sorted by value , and a list of tokens If the command line parameters contai...
c02911ad5d02f04045c25102d0468687c6b51a4c193c16263d0bd244490dadcd
javalib-team/sawja
ssaBir.mli
* This file is part of SAWJA * Copyright ( c)2010 ( INRIA ) * Copyright ( c)2010 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation , either version 3 of * t...
null
https://raw.githubusercontent.com/javalib-team/sawja/da39f9c1c4fc52a1a1a6350be0e39789812b6c00/src/ssaBir.mli
ocaml
* Signature of IR to transform in SSA form * Abstract data type for variables * [var_equal v1 v2] is equivalent to [v1 = v2], but is faster. * [var_orig v] is [true] if and only if the variable [v] was already used at bytecode level. * Used only for internal transformations. * [var_name_debug v] returns, if ...
* This file is part of SAWJA * Copyright ( c)2010 ( INRIA ) * Copyright ( c)2010 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation , either version 3 of * t...
f928b4e2f98e2871dc0189a541f6dba8de54923a06bf58ba1201226fcd59ab28
fpottier/mpri-2.4-projet-2022-2023
Name.ml
Names of toplevel functions . Used in Surface and Linear . type name = string type names = name list (* Sets of names. *) module NameSet = Set.Make(struct type t = name let compare = String.compare end)
null
https://raw.githubusercontent.com/fpottier/mpri-2.4-projet-2022-2023/1ce08cadfb3a8ec8bc72609bc82873b29d2ce241/src/Name.ml
ocaml
Sets of names.
Names of toplevel functions . Used in Surface and Linear . type name = string type names = name list module NameSet = Set.Make(struct type t = name let compare = String.compare end)
0f443a3f453563fe71f0824b3cf54118583a5fdf096ca5e599c61fab5c699b02
mbuczko/revolt
test.clj
(ns revolt.tasks.test (:require [metosin.bat-test.impl :as bat-test] [clojure.tools.logging :as log]) (:import [javazoom.jl.player Player] [java.io File FileInputStream])) (defonce default-options { Regex used to select test namespaces :test-matcher #".*test" ;; Run tests paral...
null
https://raw.githubusercontent.com/mbuczko/revolt/65ef8de68d7aa77d1ced40e7d669ebcbba8a340e/src/revolt/tasks/test.clj
clojure
Run tests parallel Reporting function See -test/blob/master/src/metosin/bat_test.clj for other options Function to filter the test vars Function to be called before running tests (after reloading namespaces) Function to be called after running tests Enable Cloverage coverage report Cloverage options Sound noti...
(ns revolt.tasks.test (:require [metosin.bat-test.impl :as bat-test] [clojure.tools.logging :as log]) (:import [javazoom.jl.player Player] [java.io File FileInputStream])) (defonce default-options { Regex used to select test namespaces :test-matcher #".*test" :parallel false ...
3089f1f52b8bf0d9f7e49290b6c01a547c3a8450076ad2d85412451f8b09924c
jaspervdj/dcpu16-hs
Memory.hs
# LANGUAGE BangPatterns , MagicHash , UnboxedTuples # module Memory ( -- * Addresses Register (..) , Address (..) -- * Talking to the memory , Memory , new , load , store ) where import Control.Monad (forM_) import GHC.Base (Int (..)) import GHC.Prim import GHC.ST (ST (.....
null
https://raw.githubusercontent.com/jaspervdj/dcpu16-hs/7598f083fa6ba88b72f7896bd14b705474a01d25/src/Memory.hs
haskell
* Addresses * Talking to the memory TODO: This is slow.
# LANGUAGE BangPatterns , MagicHash , UnboxedTuples # module Memory Register (..) , Address (..) , Memory , new , load , store ) where import Control.Monad (forM_) import GHC.Base (Int (..)) import GHC.Prim import GHC.ST (ST (..)) import GHC.Word (Word16 (..)) import Util data Re...
2f79b38708781a945e44e072fd1a476eaacb975656967bea4ece40c08f8c6ec9
esl/MongooseIM
amp_big_SUITE.erl
-module(amp_big_SUITE). %% @doc Tests for XEP-0079 Advanced Message Processing support < a href=" / extensions / xep-0079.html">XEP-0079</a > @author < > 2014 Erlang Solutions , Ltd. This work was sponsored by Grindr.com -compile([export_all, nowarn_export_all]). -include_lib("common_test/include/ct.hrl"). ...
null
https://raw.githubusercontent.com/esl/MongooseIM/997ce8cc01dacf8bf1f1f4e3a984ee10f0ce5dd6/big_tests/tests/amp_big_SUITE.erl
erlang
@doc Tests for XEP-0079 Advanced Message Processing support Group definitions This function is called by multiple_config_cth for each group to get a list of configs for each test case Each of the 'deliver' tests is repeated several times, each time with a different config Test case list, each test has to be liste...
-module(amp_big_SUITE). < a href=" / extensions / xep-0079.html">XEP-0079</a > @author < > 2014 Erlang Solutions , Ltd. This work was sponsored by Grindr.com -compile([export_all, nowarn_export_all]). -include_lib("common_test/include/ct.hrl"). -include_lib("escalus/include/escalus.hrl"). -include_lib("esca...
5fc6580be09f4b8d22dee2ac5a09011fec4a03842ffd52a51b7c73a522598787
avalor/eJason
variables.erl
-module(variables). -compile(export_all). -include("include/macros.hrl"). -include("include/parser.hrl"). -include("include/variables.hrl"). -include("include/records.hrl"). -define(ERLTOEJASONVAR, "ERLTOEJASONVAR"). %% Checks whether the leftmost variable/atom can be matched to the %% rightmost one. (e.g. a(b) matc...
null
https://raw.githubusercontent.com/avalor/eJason/3e5092d42de0a3df5c5e5ec42cb552a2f282bbb1/src/variables.erl
erlang
Checks whether the leftmost variable/atom can be matched to the rightmost one. (e.g. a(b) matches a(b)[c] but a(b)[c] does not match a(b) NOTE that annotations are ignored. If used in the belief base, they must be ignored. Note: most of the "unification magic" is done here Returns either "fa...
-module(variables). -compile(export_all). -include("include/macros.hrl"). -include("include/parser.hrl"). -include("include/variables.hrl"). -include("include/records.hrl"). -define(ERLTOEJASONVAR, "ERLTOEJASONVAR"). match_vars(Bindings, #var{id = ID1}, #var{id = ID2}) when ID1 == ID2; ID1 == ?UNDERSCORE...
f577dccd9e081ad3a39312ada3e72f6ffd1205e2a597c0122311d80422445d7e
caradoc-org/caradoc
find.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2016 - 2017 (* *) (* This program ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/tools/find.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2016 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have received a copy of the GNU General Public License along with this program ; if...
1ff0c624d13ce30908bf00eee3baa65bf25e3ba4c09510081f7903dca53a0f8e
iskandr/parakeet-retired
UID.ml
open Base (* make a unique identifier module, with a specific to_str function and distinct counter from all other unique identifiers *) (* module type S = sig type t val to_str : t -> string module Set : Set.S with type elt = t module Map : Map.S with type key = t val gen : unit -> t (* takes a list...
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Common/UID.ml
ocaml
make a unique identifier module, with a specific to_str function and distinct counter from all other unique identifiers module type S = sig type t val to_str : t -> string module Set : Set.S with type elt = t module Map : Map.S with type key = t val gen : unit -> t (* takes a list of ids, returns ...
open Base val map_fresh : t list -> t Map.t val gen_fresh_list : int -> t list val gen_fresh_array : int -> t array val of_int : int -> t end *) module Make(A : sig val prefix : string end) = struct type t = int let name_to_id : (string, t) Hashtbl.t = Hashtbl.create 127 let id_to_name : (t, string) Hash...
7c7eafbe459c25c7bed64b7562f6211311bba390b08b3ce3bed5baa45d43e726
Interlisp/medley
low.lisp
-*- Package : CLOS ; Syntax : Common - Lisp ; Base : 10 -*- File converted on 26 - Mar-91 10:29:45 from source low . Original source { dsk}<usr > local > users > welch > lisp > clos > rev4 > il - format > low.;4 created 27 - Feb-91 17:16:47 . Copyright ( c ) 1991 by Venue (in-package "CLOS") ;;; Shadow, Expor...
null
https://raw.githubusercontent.com/Interlisp/medley/f0b9ce3daeef95543e452ea4c59cb8e683295035/obsolete/clos/2.0/low.lisp
lisp
Syntax : Common - Lisp ; Base : 10 -*- 4 created 27 - Feb-91 17:16:47 Shadow, Export, Require, Use-package, and Import forms should follow here ************************************************************************* This file contains portable versions of low-level functions and macros which are ripe for impleme...
File converted on 26 - Mar-91 10:29:45 from source low . Copyright ( c ) 1991 by Venue (in-package "CLOS") Copyright ( c ) 1991 Venue (defmacro %svref (vector index) `(locally (declare (optimize (speed 3) (safety 0)) (inline svref)) ...
00fd5a660205b19c34b805d0d359e69a7ae32fd426bf7459fcbee8c61e7804a9
mmottl/aifad
learn_nothreads.ml
AIFAD - Automated Induction of Functions over Author : email : WWW : Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence Copyright ( C ) 2003- This library is free software ; you can redistribute it and/or modify it under the terms of t...
null
https://raw.githubusercontent.com/mmottl/aifad/b06786f5cd60992548405078a903ee3d962ea969/src/learn_nothreads.ml
ocaml
Learn random gain models Learn C4.5-data
AIFAD - Automated Induction of Functions over Author : email : WWW : Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence Copyright ( C ) 2003- This library is free software ; you can redistribute it and/or modify it under the terms of t...
90debee8eb80fad19fe90956d73b5391b89a86b2678e0d7b625ca3908c15484f
rwmjones/guestfs-tools
make-template.ml
#!/usr/bin/env ocaml libguestfs * Copyright ( C ) 2016 - 2023 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at you...
null
https://raw.githubusercontent.com/rwmjones/guestfs-tools/57423d907270526ea664ff15601cce956353820e/builder/templates/make-template.ml
ocaml
Ensure that a file is deleted on exit. Check we are being run from the correct directory. Check that the ./run script was used. Check we're not being run as root. major, minor major, minor major version, dist name like "wheezy" version number major, minor major, minor, variant virt-install --loca...
#!/usr/bin/env ocaml libguestfs * Copyright ( C ) 2016 - 2023 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at you...
623935d634f2f19c99441beb9b82cf8004d7b454f5db9befc636d0246ad29519
carl-eastlund/dracula
list-utilities.rkt
#lang racket/base (require "../lang/dracula.rkt" "../lang/do-check.rkt") (provide (all-defined-out)) (begin-below (in-package "ACL2") ;;(include-book "arithmetic/top" :dir :system) ;;(include-book "arithmetic-2/floor-mod/floor-mod" :dir :system) (set-compile-fns t) ;;===========================================...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/teachpacks/list-utilities.rkt
racket
(include-book "arithmetic/top" :dir :system) (include-book "arithmetic-2/floor-mod/floor-mod" :dir :system) ============================================================================== ====== Function: (break-at-nth n xs) ========================================= (>= n 0) (true-listp xs)) ...
#lang racket/base (require "../lang/dracula.rkt" "../lang/do-check.rkt") (provide (all-defined-out)) (begin-below (in-package "ACL2") (set-compile-fns t) Returns list with two elements ( 1 ) the first n elements of xs ( 2 ) xs without its first n elements Pre : ( and ( integerp n ) ...
093eed8a8fae6c73bd04e93e322b8f9b424efafcf67204233682d8380f9ce859
Schol-R-LEA/Assiah
test-syntax-insertion.scm
#!r6rs (import (rnrs (6)) (rnrs base (6)) (rnrs syntax-case (6)) (rnrs io simple (6)) (rnrs mutable-pairs (6))) (define-syntax clear! (lambda (statement) (syntax-case statement () ((_ ?x) #'(set! ?x 0))))) (define a 42) (clear! a) (display a) (newline)
null
https://raw.githubusercontent.com/Schol-R-LEA/Assiah/3656f62a0868bb74b3f211741beaac2b9da82288/scheme-tests/scheme/test-syntax-insertion.scm
scheme
#!r6rs (import (rnrs (6)) (rnrs base (6)) (rnrs syntax-case (6)) (rnrs io simple (6)) (rnrs mutable-pairs (6))) (define-syntax clear! (lambda (statement) (syntax-case statement () ((_ ?x) #'(set! ?x 0))))) (define a 42) (clear! a) (display a) (newline)
9b56a62861febde91afcc03a8b555a4cb5f4207f8c5c701e8837a219af4c5866
Innf107/polaris
driver.ml
open Syntax open Rename open Eval let _tc_category, trace_driver = Trace.make ~flag:"driver" ~prefix:"Driver" type driver_options = { filename : string; argv : string list; print_ast : bool; print_renamed : bool; print_tokens : bool; } exception ParseError of loc * string type specific_parse_error = Pars...
null
https://raw.githubusercontent.com/Innf107/polaris/02b41afaf53f347ed84ac97048dd231214a8c03d/src/driver.ml
ocaml
open Syntax open Rename open Eval let _tc_category, trace_driver = Trace.make ~flag:"driver" ~prefix:"Driver" type driver_options = { filename : string; argv : string list; print_ast : bool; print_renamed : bool; print_tokens : bool; } exception ParseError of loc * string type specific_parse_error = Pars...
27756854451706e9db2ede34d1120f69eade1b61f2134820ace64357b5532410
hugoduncan/makejack
ns_tree.clj
(ns makejack.tasks.ns-tree (:require [babashka.fs :as fs] [clojure.pprint :as pprint] [makejack.defaults.api :as defaults] [makejack.deps.api :as deps] [makejack.files.api :as files])) (defn ns-tree "Return namespace tree info." [params] (let [basis (defaults/basis params) info-map (-...
null
https://raw.githubusercontent.com/hugoduncan/makejack/a66cb5e37420872bfa870aaf7b022ce39b60b05b/bases/tasks/src/makejack/tasks/ns_tree.clj
clojure
(ns makejack.tasks.ns-tree (:require [babashka.fs :as fs] [clojure.pprint :as pprint] [makejack.defaults.api :as defaults] [makejack.deps.api :as deps] [makejack.files.api :as files])) (defn ns-tree "Return namespace tree info." [params] (let [basis (defaults/basis params) info-map (-...
ef45a2d8160033a1a4c10db266dda1c67f51ed1d1dae15586a7bbf1a2c2d4e20
janestreet/hardcaml
fifo.mli
(** Synchronous FIFO implementions with optional [showahead] functionality and pipelining stages. *) include Fifo_intf.S
null
https://raw.githubusercontent.com/janestreet/hardcaml/4126f65f39048fef5853ba9b8d766143f678a9e4/src/fifo.mli
ocaml
* Synchronous FIFO implementions with optional [showahead] functionality and pipelining stages.
include Fifo_intf.S
230702f84a2304c43f23ad6bad69a563ebd985fa21fee24a44952856b8b52aa5
discus-lang/ddc
Initialize.hs
module DDC.Driver.LSP.Protocol.Data.Initialize where import DDC.Driver.LSP.Protocol.Pack import DDC.Driver.LSP.Protocol.Data.Base import DDC.Driver.LSP.Protocol.Data.ClientCapabilities import DDC.Driver.LSP.Protocol.Data.ServerCapabilities -----------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-driver/DDC/Driver/LSP/Protocol/Data/Initialize.hs
haskell
------------------------------------------------------------------------------------------------- , ipTrace :: Maybe Trace ------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------...
module DDC.Driver.LSP.Protocol.Data.Initialize where import DDC.Driver.LSP.Protocol.Pack import DDC.Driver.LSP.Protocol.Data.Base import DDC.Driver.LSP.Protocol.Data.ClientCapabilities import DDC.Driver.LSP.Protocol.Data.ServerCapabilities | The initialize request is sent as the first request from the client to th...
aa756a5efc1bb19247c17220ce93188a6b96918e2d78e52b1a19f30e980eae68
futurice/haskell-mega-repo
RateMeter.hs
module Futurice.Metrics.RateMeter (mark, mark', values) where import Control.Concurrent.STM (TVar, atomically, newTVar, modifyTVar', newTVarIO, readTVar, writeTVar) import Futurice.Prelude import Prelude () import System.IO.Unsafe (unsafePerformIO) -------------------------------------------------------------...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/futurice-metrics/src/Futurice/Metrics/RateMeter.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- --------...
module Futurice.Metrics.RateMeter (mark, mark', values) where import Control.Concurrent.STM (TVar, atomically, newTVar, modifyTVar', newTVarIO, readTVar, writeTVar) import Futurice.Prelude import Prelude () import System.IO.Unsafe (unsafePerformIO) Interface mark :: Text -> IO () mark name = mark' name 1 ...
b45f32b5cdee9741574383b657a1b87cd05367b64b716cc8c809bdc805b82e6e
schemedoc/implementation-metadata
scheme88.scm
(title "Scheme 88") (tagline "re-implementation of Scheme 84 to Ibuki Common Lisp") (based-on "scheme84") (academy "Rice University")
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/scheme88.scm
scheme
(title "Scheme 88") (tagline "re-implementation of Scheme 84 to Ibuki Common Lisp") (based-on "scheme84") (academy "Rice University")
fdf237c14885ad38dd77550dd7756a3e123564ed1b5067de04f1474234e24bbe
haskell/stylish-haskell
FelixTests.hs
-------------------------------------------------------------------------------- | Tests contributed by as part of -- <-haskell/pull/293>. # LANGUAGE OverloadedLists # module Language.Haskell.Stylish.Step.Imports.FelixTests ( tests ) where ----------------------------------------------------------------------...
null
https://raw.githubusercontent.com/haskell/stylish-haskell/be4814e4380613567b7055830cd596a580a5ad6d/tests/Language/Haskell/Stylish/Step/Imports/FelixTests.hs
haskell
------------------------------------------------------------------------------ <-haskell/pull/293>. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -------------------------------------------------------------...
| Tests contributed by as part of # LANGUAGE OverloadedLists # module Language.Haskell.Stylish.Step.Imports.FelixTests ( tests ) where import Prelude hiding (lines) import Test.Framework (Test, testGroup) import Test.Framework....
8cc2322bead5c532f2575a91ad5aca1d4afdf86191730f25f11df583b7e2556f
chr15m/sitefox
html.cljs
(ns sitefox.html "Functions for wrangling HTML and rendering Reagent components into selectors." (:require [clojure.test :refer [is]] [applied-science.js-interop :as j] [reagent.dom.server :refer [render-to-static-markup] :rename {render-to-static-markup r}] [sitefox.deps :refer [parse-html]])) (defn p...
null
https://raw.githubusercontent.com/chr15m/sitefox/39c7d80886d11e2459e56a1b9e2976000cde3be2/src/sitefox/html.cljs
clojure
(ns sitefox.html "Functions for wrangling HTML and rendering Reagent components into selectors." (:require [clojure.test :refer [is]] [applied-science.js-interop :as j] [reagent.dom.server :refer [render-to-static-markup] :rename {render-to-static-markup r}] [sitefox.deps :refer [parse-html]])) (defn p...
f735f10c0183a97838e7ba999aa26f4904a7ddae1c694282c46b78965b4ccb73
Eduap-com/WordMat
zungql.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/lapack/lapack/zungql.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode) Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
7fe917257622b7a8863bf921f03c8eed82af7d2830a4b8d2a26f6bbb787e6db1
xxyzz/SICP
Exercise_2_41.rkt
#lang racket/base (define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define (enumerate-interval low high) (if (> low high) null (cons low (enumerate-interval (+ low 1) high)))) (define...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.2_Hierarchical_Data_and_the_Closure_Property/Exercise_2_41.rkt
racket
#lang racket/base (define (accumulate op initial sequence) (if (null? sequence) initial (op (car sequence) (accumulate op initial (cdr sequence))))) (define (enumerate-interval low high) (if (> low high) null (cons low (enumerate-interval (+ low 1) high)))) (define...
139fd68a1f02b14c36045b322ee3171628dc7bcdbaa692c37c9c259008677350
kmi/irs
swift-services-datatypes.lisp
Mode : Lisp ; Package : File created in WebOnto (in-package "OCML") (in-ontology swift-services-datatypes) 2 ) ChangeDetailsOfCitizenInterfaceOut -- SWIFTDB (def-class change-details-of-citizen-request-type () ((has-address-key :type integer) (has-new-address :type new-address))) (def-class new-addre...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/swift-services-datatypes/swift-services-datatypes.lisp
lisp
Package : type positive-integer ?? value defined as boolean in the DB, and as a string with length=1 and Y or N values in WSDL description value defined as boolean in the DB, and as a string with length=1 and Y or N values in WSDL description class date defined below type date already defined as string))
File created in WebOnto (in-package "OCML") (in-ontology swift-services-datatypes) 2 ) ChangeDetailsOfCitizenInterfaceOut -- SWIFTDB (def-class change-details-of-citizen-request-type () ((has-address-key :type integer) (has-new-address :type new-address))) (def-class new-address () ((has-postcode :typ...
7aac074659d47048f7038b77d82dab88ebbd33d5fcc3f149bea88690d2df1a36
protosens/monorepo.cljc
print.clj
(ns protosens.bb.help.print "Default printers. Used by [[protosens.bb.help/print]] unless overwritten by the user." (:require [clojure.string :as string])) ;;;;;;;;;; (defn no-task "When no task has been provided as input. Prints available tasks (documented ones)." [data] (println "These ...
null
https://raw.githubusercontent.com/protosens/monorepo.cljc/1c7cc00cbfb7c7484521146bf998438d2867552f/module/bb.help/src/main/clj/protosens/bb/help/print.clj
clojure
(ns protosens.bb.help.print "Default printers. Used by [[protosens.bb.help/print]] unless overwritten by the user." (:require [clojure.string :as string])) (defn no-task "When no task has been provided as input. Prints available tasks (documented ones)." [data] (println "These tasks have ...
a740623c7c9c8f346a94ebb0dd00f7175ff5c7b9be0ae68977e14461db8905c4
ml-in-barcelona/server-reason-react
belt_List.ml
type 'a t = 'a list module A = Belt_Array external mutableCell : 'a -> 'a t -> 'a t = "belt_makemutablelist" let unsafeMutateTail a b = Obj.set_field (Obj.repr a) 1 (Obj.repr b) let unsafeTail a = Obj.obj (Obj.field (Obj.repr a) 1) let head x = match x with [] -> None | x :: _ -> Some x let headExn x = match x wi...
null
https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/belt/belt_List.ml
ocaml
type 'a t = 'a list module A = Belt_Array external mutableCell : 'a -> 'a t -> 'a t = "belt_makemutablelist" let unsafeMutateTail a b = Obj.set_field (Obj.repr a) 1 (Obj.repr b) let unsafeTail a = Obj.obj (Obj.field (Obj.repr a) 1) let head x = match x with [] -> None | x :: _ -> Some x let headExn x = match x wi...
11fcf4274649779a0a983fbabff11502d05f85f64658729d2d6e176be6e20229
jeopard/haskell-checking-account
ResponseSpec.hs
# LANGUAGE DeriveGeneric # module Serializers.ResponseSpec (spec) where import Data.Aeson (ToJSON, encode, toEncoding, genericToEncoding, defaultOptions) import Data.ByteString.Lazy.Char8 import GHC.Generics import Test.Hspec import Serializers.Response spec :: Spec spec = do successSpec errorSpec successSpec...
null
https://raw.githubusercontent.com/jeopard/haskell-checking-account/27a889e507ad830ccb476a9663a5ab62aba8baa7/test/Serializers/ResponseSpec.hs
haskell
sample data structure to use in our spec
# LANGUAGE DeriveGeneric # module Serializers.ResponseSpec (spec) where import Data.Aeson (ToJSON, encode, toEncoding, genericToEncoding, defaultOptions) import Data.ByteString.Lazy.Char8 import GHC.Generics import Test.Hspec import Serializers.Response spec :: Spec spec = do successSpec errorSpec successSpec...
0ea0ccba056a9682d95549ae6c7fe581ba0d36c261528f7e9bb2779d355a890e
zxymike93/SICP
210.rkt
#lang sicp (define make-interval cons) (define lower-bound car) (define upper-bound cdr) (define (print-interval x) (display "[") (display (lower-bound x)) (display ",") (display (upper-bound x)) (display "]")) (define (mul-interval x y) (let ([p1 (* (lower-bound x) (lower-bound y))] [p2 (* (lo...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter2/210.rkt
racket
tests
#lang sicp (define make-interval cons) (define lower-bound car) (define upper-bound cdr) (define (print-interval x) (display "[") (display (lower-bound x)) (display ",") (display (upper-bound x)) (display "]")) (define (mul-interval x y) (let ([p1 (* (lower-bound x) (lower-bound y))] [p2 (* (lo...
a489674dc5ac68f952a48b73c260d01c44ac6093d36d3ca9b0f7e441096c2a51
MarcWeber/hasktags
testcase11.hs
\section[GHC.Base]{Module @GHC.Base@} simple lhs test to be found Monad Other Prelude modules are much easier with fewer complex dependencies. \begin{code} | The ' Functor ' class is used for types that can be mapped over . Instances of ' Functor ' should satisfy the following laws : > fmap i d = = i d...
null
https://raw.githubusercontent.com/MarcWeber/hasktags/65bcbecb695f0d2f31c2436958480535b8193b6c/testcases/testcase11.hs
haskell
| Replace all locations in the input with the same value. overridden with a more efficient version. in imperative languages. Explicit for-alls so that we know what order to give type arguments when desugaring | Inject a value into the monadic type. | Fail with a message. This operation is not part of the mathe...
\section[GHC.Base]{Module @GHC.Base@} simple lhs test to be found Monad Other Prelude modules are much easier with fewer complex dependencies. \begin{code} | The ' Functor ' class is used for types that can be mapped over . Instances of ' Functor ' should satisfy the following laws : > fmap i d = = i d...
6f0cf36ca61a48c5a8aea2dae1790dc25ad4bbcaa4a4b50f247f53c544f6b0eb
thegeez/clj-board
sessions.clj
(ns net.thegeez.clj-board.sessions (:require [io.pedestal.log :as log] [io.pedestal.interceptor :as interceptor] [clojure.java.jdbc :as jdbc] [net.thegeez.clj-board.jwt :as jwt])) (defn find-or-create-user [db username email] (log/info :foc username :e email) (if-let [user (fi...
null
https://raw.githubusercontent.com/thegeez/clj-board/e162d6097ce7b66438f7529418bf48af66e34fa8/src/clj/net/thegeez/clj_board/sessions.clj
clojure
assign to demo board find-or-create-user will always succeed
(ns net.thegeez.clj-board.sessions (:require [io.pedestal.log :as log] [io.pedestal.interceptor :as interceptor] [clojure.java.jdbc :as jdbc] [net.thegeez.clj-board.jwt :as jwt])) (defn find-or-create-user [db username email] (log/info :foc username :e email) (if-let [user (fi...
392a4b370a376d23246855563efab2bdfaed152d8322bf84f1f11f6857d9330a
purescript/purescript
Make.hs
module Language.PureScript.Make ( -- * Make API rebuildModule , rebuildModule' , make , inferForeignModules , module Monad , module Actions ) where import Prelude import Control.Concurrent.Lifted as C import Control.Exception.Base (onException) import Control....
null
https://raw.githubusercontent.com/purescript/purescript/b71cb532c7d8d97505376cb528080ca3046615fe/src/Language/PureScript/Make.hs
haskell
* Make API | Rebuild a single module. This function is used for fast-rebuild workflows (PSCi and psc-ide are examples). Imports cannot be linted before type checking because we need to known which newtype constructors are used to solve Coercible constraints in order to not report them as unused. desugar case de...
module Language.PureScript.Make ( rebuildModule , rebuildModule' , make , inferForeignModules , module Monad , module Actions ) where import Prelude import Control.Concurrent.Lifted as C import Control.Exception.Base (onException) import Control.Monad hiding (se...
e0c0602a0fa71baa29280f55d53f9bb3f284d73ded7a0d70644c66cb795624d9
geophf/1HaskellADay
Exercise.hs
module Y2018.M10.D15.Exercise where - You have a set of assets on your iPod , a piece of hardware older than your daughters , let 's say , hypothetically , and you have a sets of assets on your thumbdrives . You want to move the assets off your iPod before the needle wrecks your hard drive . I 'm not kidding ....
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M10/D15/Exercise.hs
haskell
}
module Y2018.M10.D15.Exercise where - You have a set of assets on your iPod , a piece of hardware older than your daughters , let 's say , hypothetically , and you have a sets of assets on your thumbdrives . You want to move the assets off your iPod before the needle wrecks your hard drive . I 'm not kidding ....
b73189ea0d92e5d410fe2f35e7ca44748b6225bbf79572ca01d722bbab4aa451
mkoppmann/eselsohr
Uri.hs
module Lib.Domain.Uri ( Uri (..) , UriValidationError (..) , mkUri , unfilteredUri , getHostname , baseUri ) where import qualified Data.Text as T import qualified Net.IPv4 as IPv4 import qualified Net.IPv6 as IPv6 import qualified Net.IPv6.Helper as IPv6 import qualified Text.Show import q...
null
https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/src/Lib/Domain/Uri.hs
haskell
| Type representing different validation errors. | Only HTTP and HTTPS are allowed. | Hostnames like @localhost@ are forbidden. | Only public IPv4 ranges are allowed. | Only public IPv6 ranges are allowed. \| Literal IPv6 addresses are put into brackets in URLs: | Returns an 'Uri' like 'mkUri' does but with ...
module Lib.Domain.Uri ( Uri (..) , UriValidationError (..) , mkUri , unfilteredUri , getHostname , baseUri ) where import qualified Data.Text as T import qualified Net.IPv4 as IPv4 import qualified Net.IPv6 as IPv6 import qualified Net.IPv6.Helper as IPv6 import qualified Text.Show import q...
1372065e028288d51013d412e5153253796501ecd6a5b5e8526fd563bf0922bb
dalaing/little-languages
TermL.hs
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} module TermL where import Control.Monad (ap) import Bound import Bound.Name import Bound.Scope import Prelude.Extras data Term l n a = TODO split Var into a Var with a location and a Var without ? TODO might...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/prototypes/frag/src/TermL.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveTraversable #
module TermL where import Control.Monad (ap) import Bound import Bound.Name import Bound.Scope import Prelude.Extras data Term l n a = TODO split Var into a Var with a location and a Var without ? TODO might need to track location in a Name - like structure along with the name Var (Maybe l) a | Lam l (Sco...
0d97792047606777737dcb9630d7e448109963bfef030d0986e138561c1a9b79
metosin/scjsv
core.clj
(ns scjsv.core "Use [[validator]], [[json-validator]], or [[json-reader-validator]] to construct a validator function. ### Validator functions The first argument for the validator function is the data. The optional second argument is an options map with the following keys: | key | default | de...
null
https://raw.githubusercontent.com/metosin/scjsv/8dcc9d81341645f30bba91a25b5c90242d43b44b/src/scjsv/core.clj
clojure
Public API
(ns scjsv.core "Use [[validator]], [[json-validator]], or [[json-reader-validator]] to construct a validator function. ### Validator functions The first argument for the validator function is the data. The optional second argument is an options map with the following keys: | key | default | de...
4b890377dd3f198024f69d0e69b37b87d4831111296397db7f55e8c5362bf9b0
mbutterick/aoc-racket
main.rkt
#lang reader "../aoc-lang.rkt" (provide (rename-out [#%mb #%module-begin]) ★ ★★) (define-macro (#%mb (STARS) TOKS ...) #`(#%module-begin (time (STARS (vector (λ () TOKS) ...))))) (define regs (make-hasheq)) (define last-sound-played (make-parameter #f)) (struct offset-signal (val)) (struct end-signal (val)) (...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d18/main.rkt
racket
#lang reader "../aoc-lang.rkt" (provide (rename-out [#%mb #%module-begin]) ★ ★★) (define-macro (#%mb (STARS) TOKS ...) #`(#%module-begin (time (STARS (vector (λ () TOKS) ...))))) (define regs (make-hasheq)) (define last-sound-played (make-parameter #f)) (struct offset-signal (val)) (struct end-signal (val)) (...
d2a65919fdedee9968aff8feeb85e326dcb812bdab230e63cf6a58750234a9ce
gonzojive/elephant
package-new.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;; ;;; package.lisp -- package definition ;;; Initial version 8/26/2004 by ;;; <> ;;; ;;; part of ;;; Elephant : an object - oriented database for Common Lisp ;;; Copyright ( c ) 2004 by and ;;; <> <> ;;; ;;; Elephant users are granted the...
null
https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/contrib/eslick/package-new.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- package.lisp -- package definition <> part of <> <> Elephant users are granted the rights to distribute and use this software (), also known as the LLGPL. Class indexing management API Low level cursor API Instance query API
Initial version 8/26/2004 by Elephant : an object - oriented database for Common Lisp Copyright ( c ) 2004 by and as governed by the terms of the Lisp Lesser GNU Public License (in-package :cl-user) (defpackage elephant-btrees (:use :closer-common-lisp) (:export #:cursor #:secondary-cursor #:make...
a8793a92811d78e7df571689b5c6bfaf78ade69e557d744898348e06bf1dd5ee
penpot/penpot
snap_distances.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.workspace.viewport.snap-distances (:require [app.common.data :as d] [app.common.geom.s...
null
https://raw.githubusercontent.com/penpot/penpot/c8360b19949a34a9b0878a3a6f2dd08529c9c4cb/frontend/src/app/main/ui/workspace/viewport/snap_distances.cljs
clojure
Copyright (c) KALEIDOS INC Checks if the value is in a set of numbers with an error margin Gets the distance to the current selection We'll show the distances that match a distance from the selrect Checks the distances between elements for distances that match the set of distances Stores the distance candidates ...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.workspace.viewport.snap-distances (:require [app.common.data :as d] [app.common.geom.shapes :as gsh] [app.common.mat...
3e144e9665688ada9489a8339bb3c5dc2dccd532fc3b757a3f06f62ae7009842
euhmeuh/virtual-mpu
cli.rkt
#!/usr/bin/env racket #lang racket/base (require racket/cmdline racket/function racket/string virtual-mpu command-tree) (define (assemble-to-binary mpu assembly) (display (assemble assembly))) (define (assemble-to-hex mpu assembly) (displayln (string-join (map (curry format-hex) (b...
null
https://raw.githubusercontent.com/euhmeuh/virtual-mpu/d8056f928a646bb9ac96fdb78cde794efc82d144/cli.rkt
racket
#!/usr/bin/env racket #lang racket/base (require racket/cmdline racket/function racket/string virtual-mpu command-tree) (define (assemble-to-binary mpu assembly) (display (assemble assembly))) (define (assemble-to-hex mpu assembly) (displayln (string-join (map (curry format-hex) (b...
9badb90e056d29ec6fdb9db996dd3d7227f3229d2a271ca2c0900d887a9b8fc0
craigl64/clim-ccl
packages.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*- ;; See the file LICENSE for the full license governing this code. ;; (in-package #-ansi-90 :user #+ansi-90 :common-lisp-user) " Copyright ( c ) 1990 , 1991 Symbolics , Inc. All rights reserved . Portions copy...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/demo/packages.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*- See the file LICENSE for the full license governing this code. always being created at compile time (the defpackage is processed regardless of whether this is ics or not). At load time either is added (non-ics). The unless deals...
(in-package #-ansi-90 :user #+ansi-90 :common-lisp-user) " Copyright ( c ) 1990 , 1991 Symbolics , Inc. All rights reserved . Portions copyright ( c ) 1988 , 1989 , 1990 International Lisp Associates . " (#-ansi-90 clim-lisp::defpackage #+ansi-90 defpackage clim-demo (:use clim-lisp clim) (:shadowing-import...
5dbea5db07d9cfe77c7da824e6d248135a85e5884062e6d0295c686331bcd896
art-w/sherlocode
colorize.ml
module H = Tyxml.Html module Higlo = Higlo.Lang let span cl s = H.span ~a:[ H.a_class [ cl ] ] [ H.txt s ] let html_of_token = function | Higlo.Text str -> H.txt str | Symbol (_, s) -> span "symbol" s | String s -> span "string" s | Numeric s -> span "numeric" s | Lcomment s -> span "comment" s | Bcomment...
null
https://raw.githubusercontent.com/art-w/sherlocode/3008cbab7177acd89b1f0c526a9820e92c55440c/www/colorize.ml
ocaml
module H = Tyxml.Html module Higlo = Higlo.Lang let span cl s = H.span ~a:[ H.a_class [ cl ] ] [ H.txt s ] let html_of_token = function | Higlo.Text str -> H.txt str | Symbol (_, s) -> span "symbol" s | String s -> span "string" s | Numeric s -> span "numeric" s | Lcomment s -> span "comment" s | Bcomment...
bc16ed64413103310c42a0a420bb67c85c858ecca5068f07f7880e716c9699d9
ChrisPenner/json-to-haskell
Options.hs
# LANGUAGE TemplateHaskell # module JsonToHaskell.Internal.Options where import Lens.Micro.Platform (makeLenses) -- | Choose which type to use for Numbers data NumberType = -- | Use 'Int' for whole numbers, 'Float' for decimals UseSmartFloats -- | Use 'Int' for whole numbers, 'Double' for decimals | Use...
null
https://raw.githubusercontent.com/ChrisPenner/json-to-haskell/37276529efa2d861f061d8cf0642daef5ab8c47b/src/JsonToHaskell/Internal/Options.hs
haskell
| Choose which type to use for Numbers | Use 'Int' for whole numbers, 'Float' for decimals | Use 'Int' for whole numbers, 'Double' for decimals | Use 'Float' for all numbers | Use 'Double' for all numbers | Use 'Scientific' for all numbers | Choose which type to use for strings | Use 'String' for strings | Use...
# LANGUAGE TemplateHaskell # module JsonToHaskell.Internal.Options where import Lens.Micro.Platform (makeLenses) data NumberType = UseSmartFloats | UseSmartDoubles | UseFloats | UseDoubles | UseScientific deriving (Show, Eq, Ord) data TextType = UseString | UseText | UseByteString deriving (S...
467988cf351b89b654451387a71c16213082ad8fdcbdabce299bdeb034e5fa94
ChrisPenner/lens-errors
Spec.hs
# LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} import Control.Lens import Control.Lens.Error import Test.Hspec import Data.Tree import Data.Tree.Lens numbers :: (String, [ Int ]) numbers = ("hi", [1, 2, 3, 4]) main :: IO () main = hspec $ do ...
null
https://raw.githubusercontent.com/ChrisPenner/lens-errors/d50f08213dc51e57f1eb48108a02eabd1aaf7650/test/Spec.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # import Control.Lens import Control.Lens.Error import Test.Hspec import Data.Tree import Data.Tree.Lens numbers :: (String, [ Int ]) numbers = ("hi", [1, 2, 3, 4]) main :: IO () main = hspec $ do describe "fizzler" $ do ...
195bbfff785eaa3ba7e382c83b2f548909d50fea91609916bf6fe4f617082664
plum-umd/fundamentals
yo-client.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname yo) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-dec...
null
https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/1/www/code/yo-client.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname yo) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/universe) (require 2htdp/image) (define (y...
7c9b8bf73cfe595e325d3b899edd015afb1b3e358b8be65eb61c87fe4e55ad99
pfdietz/ansi-test
exp.lsp
;-*- Mode: Lisp -*- Author : Created : Mon Sep 1 21:24:44 2003 Contains : Tests of EXP ;;; Error tests (deftest exp.error.1 (signals-error (exp) program-error) t) (deftest exp.error.2 (signals-error (exp 0 nil) program-error) t) (deftest exp.error.3 (signals-error (exp 0 0 0) progr...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/exp.lsp
lisp
-*- Mode: Lisp -*- Error tests Other tests Add more tests here for floating point accuracy
Author : Created : Mon Sep 1 21:24:44 2003 Contains : Tests of EXP (deftest exp.error.1 (signals-error (exp) program-error) t) (deftest exp.error.2 (signals-error (exp 0 nil) program-error) t) (deftest exp.error.3 (signals-error (exp 0 0 0) program-error) t) (deftest exp.1 (let (...
0317258c0fa1794a024167044fbc994707db4cec614816d110c9ab5f8a8306f9
nklein/Woolly
app.lisp
(in-package #:woolly) (sheeple:defproto =app= () ()) (sheeple:defmessage main-loop (a) (:documentation "This message begins handling GUI events for the application A") (:reply (a) (error "No main-loop for ~A" a))) (sheeple:defmessage exit-main-loop (a) (:documentation "This message stops handling GUI events ...
null
https://raw.githubusercontent.com/nklein/Woolly/f18b5d5dc28b04e6a194757d7ebc1f03bb6ebd4d/woolly/app.lisp
lisp
(in-package #:woolly) (sheeple:defproto =app= () ()) (sheeple:defmessage main-loop (a) (:documentation "This message begins handling GUI events for the application A") (:reply (a) (error "No main-loop for ~A" a))) (sheeple:defmessage exit-main-loop (a) (:documentation "This message stops handling GUI events ...
defdfe43dd1d948b83c3cda766b04fb859f4b29e2eedb30dd375ea5e611fcbdf
spawnfest/eep49ers
wxPanel.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% 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 applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxPanel.erl
erlang
%CopyrightBegin% 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 specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxPanel). -include("wxe.hrl"). -export([destroy/1,initDialog/1,new/0,new/1,new/2,setFocusIgnoringChildren/1]...
d5aa7e76d81e44e61752158374f507d3de73683d04b359ed6add8736a79e50fd
racket/rhombus-prototype
cond.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre) "expression.rkt" "parse.rkt" "else-clause.rkt" (only-in "underscore.rkt" [_ rhombus-_]) "error.rkt") (provide (rename-out [rhombus-if if] [rhombu...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/074f1e50fbfa018dd1c064191c79665e06628ab4/rhombus/private/cond.rkt
racket
#lang racket/base (require (for-syntax racket/base syntax/parse/pre) "expression.rkt" "parse.rkt" "else-clause.rkt" (only-in "underscore.rkt" [_ rhombus-_]) "error.rkt") (provide (rename-out [rhombus-if if] [rhombu...
d8f251f6e28c2c07b86c7af466bb1686721508e1c26484a208678448d75906b2
LexiFi/menhir
positions.ml
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/positions.ml
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
0c52e3bcc2418385bec78ccf1cc0deb8a0a4e87a75ddecd6581ea0d6a5466185
kind2-mc/kind2
hashcons.ml
(**************************************************************************) (* *) Copyright ( C ) (* *) (* This software is free software;...
null
https://raw.githubusercontent.com/kind2-mc/kind2/1d7e926da46aa38c0816fb0a327b0e33a8d35cde/src/utils/hashcons.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking module type HSig = sig type ('a, 'b) hash_consed = private { hkey : int; tag : int; node : 'a; pr...
768a5db2082bfc1c9cc7863d704eee15a76f79d92d2e6334e518249375717092
wjrforcyber/SystemT
EEval.hs
-- | eval envuator for Extrinsic L5 module Lang.L5.Eval.EEval where import Common.Types import Lang.L5.Syntax.Extrinsic (Exp (..), Name (..), Val (..)) data Env = Emp | Snoc Env (Name, Val) newtype Eval a = Eval {runEval :: Env -> Maybe a} instance Functor Eval where fmap f (Eval g) = Eval $ \ctx -> fmap f (g...
null
https://raw.githubusercontent.com/wjrforcyber/SystemT/0b402e5a9a335e28e8a19ba0274f1b8e40c08eaf/src/Lang/L5/Eval/EEval.hs
haskell
| eval envuator for Extrinsic L5
module Lang.L5.Eval.EEval where import Common.Types import Lang.L5.Syntax.Extrinsic (Exp (..), Name (..), Val (..)) data Env = Emp | Snoc Env (Name, Val) newtype Eval a = Eval {runEval :: Env -> Maybe a} instance Functor Eval where fmap f (Eval g) = Eval $ \ctx -> fmap f (g ctx) instance Applicative Eval whe...
d74d78e7f0d6cfd6211d4973a424ad0f35dea4b58052af321e2b40e9c25885d0
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoRebindableSyntax # module Duckling.N...
null
https://raw.githubusercontent.com/facebook/duckling/c6a48a1d0678a389f86d17db2676e1a289e355ce/Duckling/Numeral/PT/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE NoRebindableSyntax # module Duckling.Numeral.PT.Rules ( rules ) where import Control.Applicative ((<|>)) import Data.HashMap.Strict (HashMap) import Data.Maybe import Data.String import Data.Text (Text) import Prelude import qualified Data.HashMap.St...
ae1f68c53b19b6cfcaac0d9b7721f341a686b82e7de8f9390f65c8c31095240c
laurencer/confluence-sync
MockServer.hs
-- -- HTTP client for use with io-streams -- Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd -- -- The code in this file, and the program it is a part of, is made -- available to you by its authors as open source software: you can redistribute it and/or modify it under a BSD licence . -- {-# LANG...
null
https://raw.githubusercontent.com/laurencer/confluence-sync/442fdbc84fe07471f323af80d2d4580026f8d9e8/vendor/http-streams/tests/MockServer.hs
haskell
HTTP client for use with io-streams The code in this file, and the program it is a part of, is made available to you by its authors as open source software: you can # LANGUAGE OverloadedStrings # # LANGUAGE PackageImports # # OPTIONS -fno-warn-dodgy-imports # Top level URL routing logic. Dispatch normal ...
Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd redistribute it and/or modify it under a BSD licence . module MockServer (runMockServer, localPort) where Per , we suppress the warning resulting from this line , necessary on < 7.6 Per , we suppress the warning resulting fr...
0709aedb0b8c65de54f2ce2d572372fee21d8bef66b111723d2d1f8a074d2182
archimag/mongo-cl-driver
protocol.lisp
;;;; protocol.lisp ;;;; ;;;; This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL. ;;;; See file COPYING for details. ;;;; Author : < > (in-package #:mongo-cl-driver.wire) (defconstant +op-reply+ 1 "Reply to a client request. responseTo is set") (defconstant +op-msg+ 1000 "generic msg comma...
null
https://raw.githubusercontent.com/archimag/mongo-cl-driver/300c10bd3d0b3ca3a82c8b32087bddbc7b6a86c3/wire/protocol.lisp
lisp
protocol.lisp This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL. See file COPYING for details. Message Types encode protocol message decode server reply
Author : < > (in-package #:mongo-cl-driver.wire) (defconstant +op-reply+ 1 "Reply to a client request. responseTo is set") (defconstant +op-msg+ 1000 "generic msg command followed by a string") (defconstant +op-update+ 2001 "update document") (defconstant +op-insert+ 2002 "insert new document") (defconstant +res...
73d9d0ce99184333f7b87cef502796046c5136d833e8c130d25424ce9fc03540
anoma/juvix
Translation.hs
module Juvix.Compiler.Concrete.Translation where import Juvix . Compiler . Concrete . Translation . FromParsed import Juvix.Compiler.Concrete.Language import Juvix.Compiler.Concrete.Translation.FromParsed qualified as Scoper import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.PathResolver import Juvix.Com...
null
https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/src/Juvix/Compiler/Concrete/Translation.hs
haskell
module Juvix.Compiler.Concrete.Translation where import Juvix . Compiler . Concrete . Translation . FromParsed import Juvix.Compiler.Concrete.Language import Juvix.Compiler.Concrete.Translation.FromParsed qualified as Scoper import Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.PathResolver import Juvix.Com...
9edb5e85ab5e99bb8b4497ee116d0294fbd92b5a5f54cfa643241ba35281a8a6
footprintanalytics/footprint-web
schema.cljc
(ns metabase.mbql.schema "Schema for validating a *normalized* MBQL query. This is also the definitive grammar for MBQL, wow!" (:refer-clojure :exclude [count distinct min max + - / * and or not not-empty = < > <= >= time case concat replace abs]) #?@ (:clj [(:require [clojure.core :as core] [cloju...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/shared/src/metabase/mbql/schema.cljc
clojure
A NOTE ABOUT METADATA: Clauses below are marked with the following tags for documentation purposes: * Clauses marked `^:sugar` are syntactic sugar primarily intended to make generating queries easier on the frontend. These clauses are automatically rewritten as simpler clauses by the `desugar` or `expand-macr...
(ns metabase.mbql.schema "Schema for validating a *normalized* MBQL query. This is also the definitive grammar for MBQL, wow!" (:refer-clojure :exclude [count distinct min max + - / * and or not not-empty = < > <= >= time case concat replace abs]) #?@ (:clj [(:require [clojure.core :as core] [cloju...
c13cff1b8a5c38698601cb3a47760aee32879c67ac4287cd0fc5ef831380d643
TyGuS/hoogle_plus
PNEncoder.hs
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # module PetriNet.PNEncoder( encoderInit , encoderSolve , encoderRefine , encoderInc ) where import Data.Maybe import Data.List import Data.List.Extra import Data.Hashable import Data.HashMap.Strict (HashMap) im...
null
https://raw.githubusercontent.com/TyGuS/hoogle_plus/d02a1466d98f872e78ddb2fb612cb67d4bd0ca18/src/PetriNet/PNEncoder.hs
haskell
| create a new encoder in z3 create all the type variables for encoding add all the constraints for the solver set initial and final state for solver | set the initial state for the solver, where we have tokens only in void or inputs and maybe several tokens in the "void" place str <- solverToString liftIO $ pu...
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # module PetriNet.PNEncoder( encoderInit , encoderSolve , encoderRefine , encoderInc ) where import Data.Maybe import Data.List import Data.List.Extra import Data.Hashable import Data.HashMap.Strict (HashMap) im...
5f7aace38f61349b3ea1b8aabd04d8aefa18937ea3a4c948029a0df43e9f6440
primeteach/specomatic-db
core.clj
(ns specomatic-db.core "The main namespace for consumers of specomatic-db. Contains functions for initialisation, retrieving and persisting entities." (:require [clojure.spec.alpha :as s] [clojure.tools.logging :as log] [nedap.speced.def :as sd] [next.jdbc ...
null
https://raw.githubusercontent.com/primeteach/specomatic-db/52dd0b08a9e928be6aea7a59f90fe35e4f1b59e8/src/specomatic_db/core.clj
clojure
We are not allowed to create any of the `etype` entities Happy path The statement didn't return anything, let's check why We are only allowed to update some of the `etype` entities AND we are allowed to read the entity, so it must be due to permissions We are not allowed to update any of the `etype` entities Hap...
(ns specomatic-db.core "The main namespace for consumers of specomatic-db. Contains functions for initialisation, retrieving and persisting entities." (:require [clojure.spec.alpha :as s] [clojure.tools.logging :as log] [nedap.speced.def :as sd] [next.jdbc ...
121bc4991eff72c5816322852ba5893e1db8fe0868e6c2d6b8315dd5fedf9808
melange-re/melange
test_regex.ml
let v = [%bs.re "/b/ig"] let r = [%bs.re "/Bucklescript是一个程序语言/"] ) ; ; Js.log(r ) ; ; Js.log(r);;*) let c = v;;
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_regex.ml
ocaml
let v = [%bs.re "/b/ig"] let r = [%bs.re "/Bucklescript是一个程序语言/"] ) ; ; Js.log(r ) ; ; Js.log(r);;*) let c = v;;
07ad7dd9c37c0eb334b9c6731189382477035a596903d8950020f8fc84b1b3a2
binsec/haunted
kset.ml
(**************************************************************************) This file is part of BINSEC . (* *) Copyright ( C ) 2016 - 2019 CEA ( Co...
null
https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/ai/domains/kset.ml
ocaml
************************************************************************ alternatives) you can redistribute it an...
This file is part of BINSEC . Copyright ( C ) 2016 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ve...
077c42aa503baf6b69a83f3e3623f2c0c659badd0eda2695ea354118b047ebec
TerrorJack/ghc-alter
T5943.hs
# LANGUAGE GeneralizedNewtypeDeriving # import Control.Monad import Control.Monad.Fix import Data.IORef import Prelude hiding (until) data Phase a = Ready a | Updated a a delay :: IO Int -- ^ the signal to delay -> IO (IO (), IO (), IO Int) -- ^ the delayed signal delay s = do ref <- newIORef...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/T5943.hs
haskell
^ the signal to delay ^ the delayed signal
# LANGUAGE GeneralizedNewtypeDeriving # import Control.Monad import Control.Monad.Fix import Data.IORef import Prelude hiding (until) data Phase a = Ready a | Updated a a delay s = do ref <- newIORef (Ready 0) let upd = do v <- readIORef ref case v of Ready x -> do putStrLn ...
c23fd7c72f97e5c9842364dbe001d74d98d04aad40149a117dac2e8fb1738aba
OCamlPro/ez_pgocaml
ezPG.mli
(**************************************************************************) (* *) Copyright 2018 - 2021 OCamlPro (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/ez_pgocaml/e84e6835e6048a27fcdfdc58403ca3a8ce16d744/src/ezPG.mli
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2018 - 2021 OCamlPro GNU Lesser General Public License version 2.1 , with the special val connect : ?host:string -> ?port:int -> ?user:string -> ?password:string -> ?unix_domain_socket_dir:string -> string -> 'a PGOCaml.t val close : 'a PGOC...
e085cccd5c9c3cd16dc3697bfdab774f2f715751c96df52f283028f9d46b844c
mejgun/haskell-tdlib
OptimizeStorage.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.OptimizeStorage where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.FileType as FileType import qualified Utils as U -- | Optimizes storage usage , i.e. deletes some files and returns new storage usage statis...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/OptimizeStorage.hs
haskell
# LANGUAGE OverloadedStrings # | | | Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics | If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any ...
module TD.Query.OptimizeStorage where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.FileType as FileType import qualified Utils as U Optimizes storage usage , i.e. deletes some files and returns new storage usage statistics . Secret thumbnails ca n't be deleted da...
6164a47c1231645edce83c24b163f473588ede4261644cc50a14107bb9a8bc1b
naoiwata/sicp
q-1.40.scm
;; ;; @author naoiwata SICP Chapter1 ;; q-1.40 ;; (add-load-path "." :relative) (load "p42.scm") (define (cubic a b c) (lambda (x) (+ (cube x) (* a (square x)) (* b x) c))) (newton (cubic a b c) 1.0) ; END
null
https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter1/q-1.40.scm
scheme
@author naoiwata q-1.40 END
SICP Chapter1 (add-load-path "." :relative) (load "p42.scm") (define (cubic a b c) (lambda (x) (+ (cube x) (* a (square x)) (* b x) c))) (newton (cubic a b c) 1.0)
ab6ff10b544d09c27b6d0c0738b1cf88e8987e70130958f72ab51ca27f676445
openbadgefactory/salava
field.cljs
(ns salava.core.ui.field (:require [cljs-uuid-utils.core :refer [make-random-uuid uuid-string]] [salava.core.helper :refer [dump]])) (defn random-key [] (-> (make-random-uuid) (uuid-string))) (defn add-field ([fields-atom new-field] (add-field fields-atom new-field (count @fields-atom))) ([...
null
https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/core/ui/field.cljs
clojure
(ns salava.core.ui.field (:require [cljs-uuid-utils.core :refer [make-random-uuid uuid-string]] [salava.core.helper :refer [dump]])) (defn random-key [] (-> (make-random-uuid) (uuid-string))) (defn add-field ([fields-atom new-field] (add-field fields-atom new-field (count @fields-atom))) ([...