_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
40b93c957286929b5a06dc87a14f84465b4e3f99441762298244bdd6bd4e45d0
mirage/xentropyd
introduceDomain.mli
* Copyright ( C ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
null
https://raw.githubusercontent.com/mirage/xentropyd/4705bb2f6c10ae84f842a5c39cd8a513ea8c761a/core/introduceDomain.mli
ocaml
* Copyright ( C ) Citrix Systems Inc. * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AN...
129d4b0c28ecec01a2f01b8e4d5f465b01b5c79da4cf9c0d9b0b5a57e92600cf
tommaisey/aeon
rand2.help.scm
;; (rand2 n) (import (rsc3)) (let* ((a (line kr 0.2 0 0.1 remove-synth)) (p (rand2 1)) (s (mul (f-sin-osc ar (rand 200 1200) 0) a))) (audition (out 0 (pan2 s p 1))))
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/noise/rand2.help.scm
scheme
(rand2 n)
(import (rsc3)) (let* ((a (line kr 0.2 0 0.1 remove-synth)) (p (rand2 1)) (s (mul (f-sin-osc ar (rand 200 1200) 0) a))) (audition (out 0 (pan2 s p 1))))
ccd21c718bfb2cf45a7f50bdbae98077d4b6ac364702eba9ac032df62f7ad5b5
kazu-yamamoto/quic
Connector.hs
module Network.QUIC.Connector where import Data.IORef import Network.QUIC.Types import UnliftIO.STM class Connector a where getRole :: a -> Role getEncryptionLevel :: a -> IO EncryptionLevel getMaxPacketSize :: a -> IO Int getConnectionState :: a -> IO ConnectionState getPacketNumber ...
null
https://raw.githubusercontent.com/kazu-yamamoto/quic/cecf4de6aef18d73ea03e7f0881a60d5206a5c03/Network/QUIC/Connector.hs
haskell
-------------------------------------------------------------- to synchronize it is used in the close function of bracket. -------------------------------------------------------------- --------------------------------------------------------------
module Network.QUIC.Connector where import Data.IORef import Network.QUIC.Types import UnliftIO.STM class Connector a where getRole :: a -> Role getEncryptionLevel :: a -> IO EncryptionLevel getMaxPacketSize :: a -> IO Int getConnectionState :: a -> IO ConnectionState getPacketNumber ...
496878047118dbf093e20d1673c50dc3761b09b083777084a4c7f2097ff094ee
privet-kitty/cl-competitive
pairing-heap.lisp
(defpackage :cp/test/pairing-heap (:use :cl :fiveam :cp/pairing-heap) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/pairing-heap) (test pairing-heap (declare (notinline pheap-disj pheap-conj)) (let (heap) (dolist (e (list 10 -1 2 -5 0 0 -1 11)) (pheap-push e heap #'...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/pairing-heap.lisp
lisp
(defpackage :cp/test/pairing-heap (:use :cl :fiveam :cp/pairing-heap) (:import-from :cp/test/base #:base-suite)) (in-package :cp/test/pairing-heap) (test pairing-heap (declare (notinline pheap-disj pheap-conj)) (let (heap) (dolist (e (list 10 -1 2 -5 0 0 -1 11)) (pheap-push e heap #'...
06d712d161c07ad8ae47c6d3b66580fe687bc49e17fe18040f4cf68a533ce167
faylang/fay
alert.hs
module Alert where import FFI import Prelude main :: Fay () main = alert "Hello, World!" -- | Alert using window.alert. alert :: String -> Fay () alert = ffi "window.alert(%1)"
null
https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/examples/alert.hs
haskell
| Alert using window.alert.
module Alert where import FFI import Prelude main :: Fay () main = alert "Hello, World!" alert :: String -> Fay () alert = ffi "window.alert(%1)"
b1004d3f49be30a41d9205eb9fb2bc1e8b0be1ea6e4e55c8e13d28c37af484b5
CoNarrative/precept
lang.cljc
(ns precept.spec.lang (:require [clojure.spec.alpha :as s] [precept.spec.rulegen :as rulegen])) (s/def ::variable-binding (s/and some? symbol? #(clojure.string/starts-with? (name %) "?"))) (s/def ::ops #{'and 'or 'not 'exists :and :or :not :exists}) (s/def ::s-expr list?) (s/def ::test-expr ...
null
https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/src/cljc/precept/spec/lang.cljc
clojure
will match the portion that uniquely identifies an accumulator. Create a spec for the full accumulator syntax to avoid confusion but the production is wrong when a keyword or value is in :e and sexpr in :v (s/def ::session #(= % (type clara.rules.engine/ISession)))
(ns precept.spec.lang (:require [clojure.spec.alpha :as s] [precept.spec.rulegen :as rulegen])) (s/def ::variable-binding (s/and some? symbol? #(clojure.string/starts-with? (name %) "?"))) (s/def ::ops #{'and 'or 'not 'exists :and :or :not :exists}) (s/def ::s-expr list?) (s/def ::test-expr ...
f0c03d112e095ebb3861c948572a7cdec8ef284caf56f1a7752de20f6e6851fa
apibot-org/apibot
csv.cljs
(ns apibot.views.inspector.csv "An inspector component for the csv-node." (:require [apibot.grexec.csv-node :as csv-node] [apibot.util :as util] [apibot.views.commons :refer [form-group-bindable]] [promesa.core :as p] [reagent.core :refer [cursor]])) ; ---- Model ---- (defn csv-rows->table [...
null
https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/cljs/apibot/views/inspector/csv.cljs
clojure
---- Model ---- We assume that all rows have the same keys (because its a CSV file). ---- Views ----
(ns apibot.views.inspector.csv "An inspector component for the csv-node." (:require [apibot.grexec.csv-node :as csv-node] [apibot.util :as util] [apibot.views.commons :refer [form-group-bindable]] [promesa.core :as p] [reagent.core :refer [cursor]])) (defn csv-rows->table [rows] (if (empty...
b68c88fdbda67ae0398d40f89b2bfe606adf2738f585e586fba0ef29b3c83b74
Zulu-Inuoe/winutil
hot-key.lisp
(defpackage #:com.inuoe.winutil.examples.hot-key (:use #:cl) (:import-from #:win32) (:import-from #:winutil) (:export #:main)) (in-package #:com.inuoe.winutil.examples.hot-key) (defun center-window (window) (let ((screen-w (win32:get-system-metrics win32:+sm-cxscreen+)) (screen-h (win32:get-syste...
null
https://raw.githubusercontent.com/Zulu-Inuoe/winutil/85f9b8df95d772a94a07addf5b0f81f7da3df4d5/examples/zetcode/hot-key.lisp
lisp
(defpackage #:com.inuoe.winutil.examples.hot-key (:use #:cl) (:import-from #:win32) (:import-from #:winutil) (:export #:main)) (in-package #:com.inuoe.winutil.examples.hot-key) (defun center-window (window) (let ((screen-w (win32:get-system-metrics win32:+sm-cxscreen+)) (screen-h (win32:get-syste...
f5a54ccabb76d3968f045fcdc3d1e4460bbb9b6174703aaf74bcadd16067170c
5outh/textlunky
Item.hs
# LANGUAGE TemplateHaskell # module Types.Item( Item(..), randItem, randKaliItem )where import Data.Universe import Random.Probability import Data.List((\\)) -- | All passive items in the game | Special , only in Black Market | Paste | Necronomicon -- | Special, only in City of Gold | ...
null
https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Types/Item.hs
haskell
| All passive items in the game | Special, only in City of Gold | Special, only get from enough favor | Special, only get from opening gold chest Random shop/wall item (weighted) TODO(maybe): This is a little redundant given the above, maybe refactor later.
# LANGUAGE TemplateHaskell # module Types.Item( Item(..), randItem, randKaliItem )where import Data.Universe import Random.Probability import Data.List((\\)) | Special , only in Black Market | Paste | 100 % drop from Vampires | ClimbingGloves | Compass | Special , only in...
3c4f0b897219f6d3b270aaa180dd450629d440839f42f26f2faaa160ea6e53e2
helpshift/hydrox
clojure_test.clj
(ns hydrox.analyse.test.clojure-test (:use midje.sweet) (:require [hydrox.analyse.test.clojure :refer :all] [hydrox.analyse.test.common :as common] [rewrite-clj.zip :as z])) ^{:refer hydrox.analyse.test.clojure/gather-is-form :added "0.1"} (fact "Make docstring notation out of is form" (c...
null
https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/test/hydrox/analyse/test/clojure_test.clj
clojure
(ns hydrox.analyse.test.clojure-test (:use midje.sweet) (:require [hydrox.analyse.test.clojure :refer :all] [hydrox.analyse.test.common :as common] [rewrite-clj.zip :as z])) ^{:refer hydrox.analyse.test.clojure/gather-is-form :added "0.1"} (fact "Make docstring notation out of is form" (c...
98415be3d4ff449502c22da0499592108886ea449b496c4a452cac515e351064
andersfugmann/ppx_protocol_conv
yaml.ml
module Yaml = Global.Yaml module Driver : Ppx_protocol_driver.Driver with type t = Yaml.value = struct type t = Yaml.value let to_string_hum t = Format.asprintf "%a" Yaml.pp t let of_list l = `A l let to_list = function `A l -> l | _ -> failwith "List expected" let is_list = function `A _ -> true | _ -> fals...
null
https://raw.githubusercontent.com/andersfugmann/ppx_protocol_conv/add1548320707df042d64a4c81d3faa3c6cf2475/drivers/yaml/yaml.ml
ocaml
module Yaml = Global.Yaml module Driver : Ppx_protocol_driver.Driver with type t = Yaml.value = struct type t = Yaml.value let to_string_hum t = Format.asprintf "%a" Yaml.pp t let of_list l = `A l let to_list = function `A l -> l | _ -> failwith "List expected" let is_list = function `A _ -> true | _ -> fals...
4b6b67f50bd0ac9e891e4a497a0ad3446bd982f769b85ec57e93adfd8e9e1ae6
stevebleazard/ocaml-jsonxt
utils.ml
let nibble_to_hex i = char_of_int (if i > 9 then 65 + i - 10 else 48 + i) let add_hex_byte ~add_char i = add_char (nibble_to_hex ((i lsr 4) land 0x0f)); add_char (nibble_to_hex (i land 0x0f)) let escape ~add_char ~add_string s = let l = String.length s in for i = 0 to l - 1 do match s.[i] with | '"' ...
null
https://raw.githubusercontent.com/stevebleazard/ocaml-jsonxt/fe982b6087dd76ca003d8fbc19ae9a519f54b828/lib/utils.ml
ocaml
let nibble_to_hex i = char_of_int (if i > 9 then 65 + i - 10 else 48 + i) let add_hex_byte ~add_char i = add_char (nibble_to_hex ((i lsr 4) land 0x0f)); add_char (nibble_to_hex (i land 0x0f)) let escape ~add_char ~add_string s = let l = String.length s in for i = 0 to l - 1 do match s.[i] with | '"' ...
256c86c1102bf8c66a36a444897d1aa3e974a87c149ce5f454f09c2f86c0b2db
mstepniowski/project-euler
euler_017.clj
Tests for solution to Project Euler problem 17 (ns com.stepniowski.test.euler-017 (:use com.stepniowski.euler-017 clojure.test)) (deftest test-verbatim (is (= "one" (verbatim 1))) (is (= "two" (verbatim 2))) (is (= "fifteen" (verbatim 15))) (is (= "twenty-one" (verbatim 21))) (is (= "three hundred and fo...
null
https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/test/com/stepniowski/test/euler_017.clj
clojure
Tests for solution to Project Euler problem 17 (ns com.stepniowski.test.euler-017 (:use com.stepniowski.euler-017 clojure.test)) (deftest test-verbatim (is (= "one" (verbatim 1))) (is (= "two" (verbatim 2))) (is (= "fifteen" (verbatim 15))) (is (= "twenty-one" (verbatim 21))) (is (= "three hundred and fo...
cfa4e32c201a70f42b2e79098e2db69b29356aa9b56b75f0c7e5723a340cf3c0
artlaman/chalice-icon-theme
settings.cljs
(ns chalice.settings (:require [fs :refer [writeFileSync readFileSync]] [chalice.json :refer [json->clj clj->json]])) (defn read! [file-name] (json->clj (readFileSync file-name))) (defn write! [file-name settings] (writeFileSync file-name (clj->json settings))) (defn main [])
null
https://raw.githubusercontent.com/artlaman/chalice-icon-theme/1d63ebe87b6af1da68fa3263b1f4592f203b46b2/src/chalice/settings.cljs
clojure
(ns chalice.settings (:require [fs :refer [writeFileSync readFileSync]] [chalice.json :refer [json->clj clj->json]])) (defn read! [file-name] (json->clj (readFileSync file-name))) (defn write! [file-name settings] (writeFileSync file-name (clj->json settings))) (defn main [])
2d88e05d03ab2b4cc0f8277c2dc4fe9eca3619ce24aa84d16d2d84790328cb67
polysemy-research/polysemy
InsertSpec.hs
module InsertSpec where import Polysemy.State (State) import Polysemy.Reader (Reader) import Polysemy.Internal (insertAt) import Polysemy import Test.Hspec insertAtWithIndex :: Sem (e1 : e2 : e3 : e4 : r) a -> Sem (e1 : e2 : Reader i : e3 : e4 : r) a insertAtWithIndex = insertAt @2 insertAtAndRaiseUnder :: Sem (e1 :...
null
https://raw.githubusercontent.com/polysemy-research/polysemy/6e2630fafd4675354fa337918081770c6a222614/polysemy-plugin/test/InsertSpec.hs
haskell
module InsertSpec where import Polysemy.State (State) import Polysemy.Reader (Reader) import Polysemy.Internal (insertAt) import Polysemy import Test.Hspec insertAtWithIndex :: Sem (e1 : e2 : e3 : e4 : r) a -> Sem (e1 : e2 : Reader i : e3 : e4 : r) a insertAtWithIndex = insertAt @2 insertAtAndRaiseUnder :: Sem (e1 :...
513ad7e28eb4c0733e0097ea27fdd834ec05c3490b23586de1dc29e7962cddfd
koka-lang/koka
Kind.hs
------------------------------------------------------------------------------ Copyright 2012 - 2021 , Microsoft Research , . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be -- found in the LICENSE file at the...
null
https://raw.githubusercontent.com/koka-lang/koka/2909df715aebf57966fbdd4afdc7a477f55f239e/src/Kind/Kind.hs
haskell
---------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the found in the LICENSE file at the root of this distribution. --------------------------------------------------------------------------- Definition of kinds and h...
Copyright 2012 - 2021 , Microsoft Research , . terms of the Apache License , Version 2.0 . A copy of the License can be Kind(..) , KindCon , kindStar, kindPred, kindEffect, kindArrow, kindScope, kindHeap , kindHandled, kindHandled1, kindLoc...
3275c1723d004367f356edaf984e3d7ce640c36c55e2b695d6b78bfc4ed6509e
stylefruits/rib
rib_depend_tests.erl
-module(rib_depend_tests). -import(rib_depend, [requests_into_groups/1]). -include_lib("eunit/include/eunit.hrl"). requests_into_groups_test_() -> Cases = [{[#{name => <<>>, parents => []}, #{name => <<"a">>, parents => []}, #{name => <<"b">>, parents => [<<"a">>]}, #...
null
https://raw.githubusercontent.com/stylefruits/rib/12db75ac93eea8a432d61afb098d9b0410adbe7b/test/rib_depend_tests.erl
erlang
-module(rib_depend_tests). -import(rib_depend, [requests_into_groups/1]). -include_lib("eunit/include/eunit.hrl"). requests_into_groups_test_() -> Cases = [{[#{name => <<>>, parents => []}, #{name => <<"a">>, parents => []}, #{name => <<"b">>, parents => [<<"a">>]}, #...
20832de8bb0cad34eca4f628aaa753d1c6953da8dffc84c569dd8bc737bb7ee1
achirkin/qua-kit
Core.hs
----------------------------------------------------------------------------- -- | Module : . Core Copyright : ( c ) License : MIT -- Maintainer : < > -- Stability : experimental -- -- -- ----------------------------------------------------------------------------- {-# LANGUAGE ...
null
https://raw.githubusercontent.com/achirkin/qua-kit/9f859e2078d5f059fb87b2f6baabcde7170d4e95/apps/hs/helen/src/Helen/Core.hs
haskell
--------------------------------------------------------------------------- | Stability : experimental --------------------------------------------------------------------------- # LANGUAGE OverloadedStrings # | Initialize state message channel mutable base of clients | Run main program register pre-defin...
Module : . Core Copyright : ( c ) License : MIT Maintainer : < > module Helen.Core ( Helen (..), program, initHelen , Client (), clientAddr ) where import Control.Concurrent (threadDelay) import qualified Control.Concurrent.STM.TChan as STM import qualified Cont...
29f1b8d2f537b98d10d2dc7d7daf5d08b7acfecd13eeb8692b6da129100a9d6d
brendanhay/amazonka
GetTrustStore.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces-web/gen/Amazonka/WorkSpacesWeb/GetTrustStore.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.WorkSpacesWeb.GetTrustStore Stability : auto-generated Gets the trust store. * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newGetTrustStore' smart constructor. | Create a value ...
# 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...
77a5d320e417b31759383d7f296a9c99c2d8dd79260cfa9421544abd77a15435
karamellpelle/grid
Plain.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Memory/Output/Plain.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it 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 module Game.Memory.Output.Plain ( outputBegin...
0e8820e21ba0500e946bb3185bc0dcf0aa46e294a8d4c04a839efa18796e7669
yuriy-chumak/ol
threading.scm
;;; ;;; Thread controller ;;; ;; thread controller is like the kernel of owl lisp. it handles ;; activation and suspension of threads, and has a vector of ;; functions which are like the system calls, via which a thread ;; send requests via the thread scheduler to other threads or ;; the underlying system. ;; todo: m...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/066c5bb3ed20cec156655bb4f24255aa6075afdc/lang/threading.scm
scheme
Thread controller thread controller is like the kernel of owl lisp. it handles activation and suspension of threads, and has a vector of functions which are like the system calls, via which a thread send requests via the thread scheduler to other threads or the underlying system. todo: make it a bug to send ma...
(define-library (lang threading) (export start-thread-controller) (import (scheme base) (only (src vm) vm:run) (owl queue) (otus async) (owl ff) (owl list) (owl math) (owl string) (owl render) (lang env) (lang eval) (lang error) (o...
f216c4c2e579d8c4b88005192fb7d133557d217512ea9f607c2259fa5717703e
justinkirby/emetric
emetric_app.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2011 %%% @end %%% This source file is subject to the New BSD License . You should have received %%% a copy of the New BSD license with this software. If not, it can be %%% retrieved from: -license.php %%%---------------...
null
https://raw.githubusercontent.com/justinkirby/emetric/6310f8f74a787100eb9d6356d2beffabc91fda1e/src/emetric_app.erl
erlang
------------------------------------------------------------------- @end a copy of the New BSD license with this software. If not, it can be retrieved from: -license.php ------------------------------------------------------------------- Application callbacks ======================================================...
@author < > ( C ) 2011 This source file is subject to the New BSD License . You should have received -module(emetric_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, StartArgs) -> emetric_sup:start_link(StartArgs). stop(_State) -> ok.
84f4083dab08a9def2b161edbd80b13605fdbf4bc6ab89fcea01f4b91536833f
GaloisInc/renovate
Diagnostic.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiWayIf #-} module Renovate.Core.Diagnostic ( Diagnostic(..) , ELFDiagnostic(..) , RedirectionDiagnostic(..) , RecoveryDiagnostic(..) ) where import qualified Data.ElfEdit as Elf import qualified Data.Macaw.CFG as MC import qualified Data...
null
https://raw.githubusercontent.com/GaloisInc/renovate/89b82366f84be894c3437852e39c9b4e28666a37/renovate/src/Renovate/Core/Diagnostic.hs
haskell
# LANGUAGE GADTs # # LANGUAGE MultiWayIf # | Errors that can arise while parsing an ELF file We can't stream these with more granularity because the elf library provides them all at once (and it is pure) | Report the index assigned to a section that was modified during the ELF rewriting phase | Report the size o...
# LANGUAGE FlexibleContexts # module Renovate.Core.Diagnostic ( Diagnostic(..) , ELFDiagnostic(..) , RedirectionDiagnostic(..) , RecoveryDiagnostic(..) ) where import qualified Data.ElfEdit as Elf import qualified Data.Macaw.CFG as MC import qualified Data.Macaw.Refinement as MR import Data.Param...
1bf712f270195001b1a19ef37113a850ba7eccca4ae2fcbb1ddf50abe08d9d75
conreality/conreality
main.ml
(* This is free and unencumbered software released into the public domain. *) (** The `conreald` server daemon. *) open Cmdliner open Consensus open Consensus.Prelude open Consensus.Config open Consensus.Config.Network open Consensus.Machinery open Consensus.Messaging open Consensus.Networking open Lwt.Infix open Lwt...
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/conreald/main.ml
ocaml
This is free and unencumbered software released into the public domain. * The `conreald` server daemon. Configuration Option types Command implementations TODO: Config.Swarms TODO: Config.Swarms TODO: Lwt_unix.gethostbyname TODO: validate the target. needed in Server.define callbacks Options common ...
open Cmdliner open Consensus open Consensus.Prelude open Consensus.Config open Consensus.Config.Network open Consensus.Machinery open Consensus.Messaging open Consensus.Networking open Lwt.Infix open Lwt_unix let version = Consensus.Version.string let man_sections = [ `S "DESCRIPTION"; `P "Runs the Conreality ...
6873c8e873ce26e9d8a5745df6389413d6199d681fec8f95d15b28c88ebdceb9
philoskim/debux
etc.cljs
(ns examples.etc (:require [debux.cs.core :as d :refer-macros [clog clogn clog-last clog_ clogn_ clog-last_ dbg dbgn dbg-last dbg_ dbgn_ dbg-last_ ...
null
https://raw.githubusercontent.com/philoskim/debux/d4ef5676c44af9a89fff28b11b57267b17d13c9f/examples/src/cljs/examples/etc.cljs
clojure
tagged literals turn-off versions set-source-info-mode! set-line-bullet! debug level The default debug level is 0. dbgt/dlogt for transducers
(ns examples.etc (:require [debux.cs.core :as d :refer-macros [clog clogn clog-last clog_ clogn_ clog-last_ dbg dbgn dbg-last dbg_ dbgn_ dbg-last_ ...
ebb0eec982d7ed1d5e01a5d1f4228afeff872481ca9afe35ec72920587e1d592
sulami/spielwiese
501-eight-divisors.hs
Eight Divisors Problem 501 -- The eight divisors of 24 are 1 , 2 , 3 , 4 , 6 , 8 , 12 and 24 . The ten numbers not exceeding 100 having exactly eight divisors are 24 , 30 , 40 , 42 , 54 , 56 , 66 , 70 , 78 and 88 . Let f(n ) be the count of numbers not exceeding n with exactly eight divisors . You are g...
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/501-eight-divisors.hs
haskell
# OPTIONS_GHC -O2 #
Eight Divisors Problem 501 The eight divisors of 24 are 1 , 2 , 3 , 4 , 6 , 8 , 12 and 24 . The ten numbers not exceeding 100 having exactly eight divisors are 24 , 30 , 40 , 42 , 54 , 56 , 66 , 70 , 78 and 88 . Let f(n ) be the count of numbers not exceeding n with exactly eight divisors . You are give...
9a1a6d4fa30fcca05aa4478f1f44b17e804635830dfb0beacae2b12cf1ce912e
jtdaugherty/vty
BuildWidthTable.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE CPP # module Main where import qualified Control.Exception as E import Control.Monad (when) import Data.Maybe (fromMaybe) #if !(MIN_VERSION_base(4,11,0)) import Data.Semigroup ((<>)) #endif import System.Directory (createDirectoryIfMissing) import System.Environment (getArgs...
null
https://raw.githubusercontent.com/jtdaugherty/vty/fa74b0ae1ca2883e9c4fbfe55abc9253dc7b9841/tools/BuildWidthTable.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE CPP # module Main where import qualified Control.Exception as E import Control.Monad (when) import Data.Maybe (fromMaybe) #if !(MIN_VERSION_base(4,11,0)) import Data.Semigroup ((<>)) #endif import System.Directory (createDirectoryIfMissing) import System.Environment (getArgs...
3e2fb1e49126b68327c1f9e296e1b05f67ef290437d01a3541782a3668bbd78c
clojure-interop/java-jdk
HttpExchange.clj
(ns javax.xml.ws.spi.http.HttpExchange "This class encapsulates a HTTP request received and a response to be generated in one exchange. It provides methods for examining the request from the client, and for building and sending the response. A HttpExchange must be closed to free or reuse underlying resourc...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/ws/spi/http/HttpExchange.clj
clojure
(ns javax.xml.ws.spi.http.HttpExchange "This class encapsulates a HTTP request received and a response to be generated in one exchange. It provides methods for examining the request from the client, and for building and sending the response. A HttpExchange must be closed to free or reuse underlying resourc...
45a948c9d74070bf02763179d4045cad2563f2bad644d1cc5419b99de26bb83a
haskell-mafia/mismi
Amazonka.hs
# LANGUAGE NoImplicitPrelude # module Mismi.RDS.Amazonka ( module AWS ) where import Network.AWS.RDS as AWS
null
https://raw.githubusercontent.com/haskell-mafia/mismi/f6df07a52c6c8b1cf195b58d20ef109e390be014/mismi-rds/src/Mismi/RDS/Amazonka.hs
haskell
# LANGUAGE NoImplicitPrelude # module Mismi.RDS.Amazonka ( module AWS ) where import Network.AWS.RDS as AWS
1be97fc55d5fa7516e876f93e3dcc739cd04eabb9cd3531527daf8c17fef5a74
fetburner/Coq2SML
explore.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/explore.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** s Definition of a search problem.
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp module type SearchP...
0a45c1106f4685c3f0baeeacc1c11cd194b704228b7808226246367fe887fb4a
IagoAbal/eba
flow1Checker.ml
open Batteries open Type open Abs open PathTree module L = LazyList module type Spec = sig val name : string * Checker 's internal state , eg . memory regions to track . type st val select : AFile.t -> Cil.fundec -> shape scheme -> AFun.t -> st L.t val trace : st -> Effects.t -> bool val testP : st -> step ->...
null
https://raw.githubusercontent.com/IagoAbal/eba/81ab71efff1ea407a7b5a98f7e8fd8a9d8d60815/src/flow1Checker.ml
ocaml
open Batteries open Type open Abs open PathTree module L = LazyList module type Spec = sig val name : string * Checker 's internal state , eg . memory regions to track . type st val select : AFile.t -> Cil.fundec -> shape scheme -> AFun.t -> st L.t val trace : st -> Effects.t -> bool val testP : st -> step ->...
180f4c916c3f9f773aba35cf43da476781ceb11066090d1ed7c33a4365fa2517
GaloisInc/parameterized-utils
Safe.hs
------------------------------------------------------------------------ -- | -- Module : Data.Parameterized.Context.Safe Copyright : ( c ) Galois , Inc 2014 - 2015 Maintainer : < > -- -- This module defines type contexts as a data-kind that consists of -- a list of types. Indexes are d...
null
https://raw.githubusercontent.com/GaloisInc/parameterized-utils/1b2073d49f29b53454dda1f7abe51b762a8d1eda/src/Data/Parameterized/Context/Safe.hs
haskell
---------------------------------------------------------------------- | Module : Data.Parameterized.Context.Safe This module defines type contexts as a data-kind that consists of a list of types. Indexes are defined with respect to these contexts. In addition, finite dependent products (Assignments) a...
Copyright : ( c ) Galois , Inc 2014 - 2015 Maintainer : < > the context of an index is /not/ a no - op . We therefore can not use # LANGUAGE RoleAnnotations # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE EmptyCase # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LAN...
3ab6204d912438ff16ae499fc9318086a392702ae65ea194ca4dda70a944fdd0
f-me/carma-public
Region.hs
module Carma.Model.Region where import Data.Text import Data.Model import Data.Typeable import Data.Vector import Data.Model.View import Carma.Model.City (City) data Region = Region {ident :: PK Int Region "" ,label :: F Text "label" "Название региона" ,cities :: F (Vector (IdentI City))...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/Region.hs
haskell
module Carma.Model.Region where import Data.Text import Data.Model import Data.Typeable import Data.Vector import Data.Model.View import Carma.Model.City (City) data Region = Region {ident :: PK Int Region "" ,label :: F Text "label" "Название региона" ,cities :: F (Vector (IdentI City))...
9d053293d87c6acb7ed14b98a3015e0aac1356dded1078f177b2acc42262f806
ClojureBridge/global-growth
web.clj
(ns global-growth.web (:require [global-growth.core :as api] [compojure.core :refer [defroutes GET]] [compojure.handler :refer [site]] [hiccup.core :as hiccup] [hiccup.page :as page] [hiccup.form :as form])) ;; WEB APP (defn layout [title & content] (p...
null
https://raw.githubusercontent.com/ClojureBridge/global-growth/8ba988e9a8e7bbccfb6996ddf25c68f80b3ef010/src/global_growth/web.clj
clojure
WEB APP
(ns global-growth.web (:require [global-growth.core :as api] [compojure.core :refer [defroutes GET]] [compojure.handler :refer [site]] [hiccup.core :as hiccup] [hiccup.page :as page] [hiccup.form :as form])) (defn layout [title & content] (page/html5 ...
9df06b5df92f1f02f574cefd980e8e519613c0e658e5c7961b804b9e9b27ce40
polyfy/polylith
setup.clj
(ns polylith.clj.core.shell.candidate.setup (:require [clojure.test :refer :all] [polylith.clj.core.shell.candidate.engine :as engine])) (defn reset-ws [function] (let [workspace (-> "components/test-helper/resources/workspace.edn" slurp read-string)] (reset! engine/ws workspa...
null
https://raw.githubusercontent.com/polyfy/polylith/36b75565032dea88ee20cdc0bc5af18f6f4d4cf4/components/shell/test/polylith/clj/core/shell/candidate/setup.clj
clojure
(ns polylith.clj.core.shell.candidate.setup (:require [clojure.test :refer :all] [polylith.clj.core.shell.candidate.engine :as engine])) (defn reset-ws [function] (let [workspace (-> "components/test-helper/resources/workspace.edn" slurp read-string)] (reset! engine/ws workspa...
1c9fed99bea3fb83b7199f08fe310bc49537a879a6f93bf00c015b74a0fda52c
atdixon/thurber
combine_test.clj
(ns thurber.combine-test (:require [clojure.test :refer :all] [thurber :as th] [test-support]) (:import (org.apache.beam.sdk.testing PAssert) (org.apache.beam.sdk.transforms Combine))) (deftest test-combine (let [output (th/apply! (test-support/create-test-pipeline) ...
null
https://raw.githubusercontent.com/atdixon/thurber/38b86a683e446f2deed55fad157476ae05940d50/test/thurber/combine_test.clj
clojure
compute overall mean via combine:
(ns thurber.combine-test (:require [clojure.test :refer :all] [thurber :as th] [test-support]) (:import (org.apache.beam.sdk.testing PAssert) (org.apache.beam.sdk.transforms Combine))) (deftest test-combine (let [output (th/apply! (test-support/create-test-pipeline) ...
8c90bf66517826196e517afe4d6ab063052ae37749245051dc6d8879562d36ed
ghc/ghc
Pat.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - incomplete - uni - patterns # ( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of ...
null
https://raw.githubusercontent.com/ghc/ghc/354aa47d313113855aff9e5c5476fcb56f80e3bf/compiler/GHC/Tc/Gen/Pat.hs
haskell
# LANGUAGE RankNTypes # | Typechecking patterns # SOURCE # ************************************************************************ * * External interface * * *****...
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # OPTIONS_GHC -Wno - incomplete - uni - patterns # ( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/A...
1a23435d7e26add74fe33fbcd6796d11ebbdf020842257dc03c74aeb05650377
metabase/metabase
redefs.clj
(ns metabase.test.redefs "Redefinitions of vars from 3rd-party namespaces to make sure they do extra stuff we want (like initialize things if needed when running)." (:require [hawk.parallel] [metabase.plugins.classloader :as classloader] [methodical.core :as methodical] [toucan2.tools.with-temp :as t2...
null
https://raw.githubusercontent.com/metabase/metabase/ff2c972dcb11f9355e314cffcc8e10b0e58f53bf/test/metabase/test/redefs.clj
clojure
so with-temp-defaults are loaded disallow with-temp inside parallel tests. once we're a little more comfortable with the current parallel stuff we should remove this restriction. wrap `with-redefs-fn` (used by `with-redefs`) so it calls `assert-test-is-not-parallel`
(ns metabase.test.redefs "Redefinitions of vars from 3rd-party namespaces to make sure they do extra stuff we want (like initialize things if needed when running)." (:require [hawk.parallel] [metabase.plugins.classloader :as classloader] [methodical.core :as methodical] [toucan2.tools.with-temp :as t2...
f6712adf9ed68d983269c8d0dd1d48837755e9d3aeba5bc062fb20712112de98
typelead/eta
Utils.hs
module Eta.REPL.Utils (ByteBuffer(..), toByteBuffer, toByteArray, fromByteArray) where import Java import Data.ByteString (ByteString) import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import qualified Data.ByteString.Internal as B import GHC.Exts import System.IO.Unsafe toByteBuffer ...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/libraries/eta-repl/Eta/REPL/Utils.hs
haskell
module Eta.REPL.Utils (ByteBuffer(..), toByteBuffer, toByteArray, fromByteArray) where import Java import Data.ByteString (ByteString) import qualified Data.ByteString as B import qualified Data.ByteString.Unsafe as B import qualified Data.ByteString.Internal as B import GHC.Exts import System.IO.Unsafe toByteBuffer ...
637bf95431dab92757f02c36dd1a15e1bb274d9d8ab4dc9028c0950f4f7d8c2f
schemedoc/ffi-cookbook
getgroups-gambit.scm
(c-declare "#include <unistd.h>") (define getgroups (c-lambda () scheme-object #<<c-end cap < = 256 ; cap * = 2 ) { size_t nbytes = cap * sizeof(___S32); ___SCMOBJ vector = ___EXT(___alloc_scmobj)(NULL, ___sS32VECTOR, nbytes); if (___FIXNUMP(vector)) ___return(___FAL); _...
null
https://raw.githubusercontent.com/schemedoc/ffi-cookbook/75d3594135b5a4c5deea9a064a1aef5a95312f85/unix-syscall/getgroups-gambit.scm
scheme
cap * = 2 ) {
(c-declare "#include <unistd.h>") (define getgroups (c-lambda () scheme-object #<<c-end ___SCMOBJ vector = if (len >= 0) { } } c-end )) (define (writeln x) (write x) (newline)) (let ((gs (getgroups))) (writeln gs) (writeln (s32vector-length gs)))
87b8a00f88fded7cb0880b65a584230af5b24dd08fc095e6412bce5ee5d1128f
alexandergunnarson/quantum
keys.cljc
(ns quantum.untyped.ui.keys (:require [clojure.set :as set])) (def ^{:doc "From -key/#named-key-attribute-values, accessed 2/1/2018"} key-ident->label {;; Special keys "Unidentified" :unidentified ;; Modifier keys "Alt" :alt "AltGraph" :alt-grap...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src-untyped/quantum/untyped/ui/keys.cljc
clojure
Special keys Modifier keys doubles as 'return' key Navigation keys Editing keys UI keys Device keys Multimedia keys Multimedia numpad keys Audio keys Speech keys Application keys Browser keys TV keys Media controller keys
(ns quantum.untyped.ui.keys (:require [clojure.set :as set])) (def ^{:doc "From -key/#named-key-attribute-values, accessed 2/1/2018"} key-ident->label "Unidentified" :unidentified "Alt" :alt "AltGraph" :alt-graph "CapsLock" :caps-...
5b6e6af3b61459abf659128f9942c7e2500be26d0540cf087e9059502a6ecc43
ajg/base91
Setup.hs
Copyright 2015 ( ) -- see LICENSE.md for more . import Distribution.Simple main = defaultMain
null
https://raw.githubusercontent.com/ajg/base91/f8cd9c22ee9b4240c2cb44725caea9ca89f631d2/Setup.hs
haskell
see LICENSE.md for more .
import Distribution.Simple main = defaultMain
c725a697b97ddae021f471116d5b9f1ff0ff9042990037813571a24567f19de3
kadena-io/chainweb-node
Bench.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Chainweb.Pact.Backend.Bench ( bench ) where import Control.Concurrent import Control.Monad import Control.Monad.Catch import qualified Criterion.Main as C import qualified Data.ByteString ...
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/6ebeb82e7ba05f21da92db6d308352fd40026c38/bench/Chainweb/Pact/Backend/Bench.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # pact imports temporary sqlite db
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # module Chainweb.Pact.Backend.Bench ( bench ) where import Control.Concurrent import Control.Monad import Control.Monad.Catch import qualified Criterion.Main as C import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 import qualifie...
cfe280e8e91eca0e009a687c50d2387a20e9454f1d3571e03d6ce02adef143ad
dyzsr/ocaml-selectml
t150-push-2.ml
TEST include tool - ocaml - lib flags = " -w -a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w -a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; let x = 1 in try if x <> 1 then raise Not_found with End_of_file ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t150-push-2.ml
ocaml
TEST include tool - ocaml - lib flags = " -w -a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w -a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; let x = 1 in try if x <> 1 then raise Not_found with End_of_file ...
1c85ce43d8f6a64db4aa837cb853454c6e3d652c443a391d83a11d1a55cd2c10
bsansouci/bsb-native
cannot_be_applied_with_label.ml
let eat ~fruitName = print_endline "hi" let () = eat ~fruitname:"apple"
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/BetterErrors/tests/misc/cannot_be_applied_with_label.ml
ocaml
let eat ~fruitName = print_endline "hi" let () = eat ~fruitname:"apple"
6c57087b5c9268a0966383e3e95dafdb3a2201808324c0728a462dedc9288ddc
wdhowe/clojure-snippets
do_iters.clj
iterations using dotimes and doseq ; mynum used in iterations below (def mynum 5) ; dotimes - evaluate an expression 'mynum' times (println "dotimes iteration") (dotimes [i mynum] (println i)) doseq - iterate over a sequence (println "\ndoseq iteration") (doseq [x (range mynum)] (println x)) sequential vector...
null
https://raw.githubusercontent.com/wdhowe/clojure-snippets/0c3247ce99a563312b549d03f080b8cf449b541d/iter_recur/do_iters.clj
clojure
mynum used in iterations below dotimes - evaluate an expression 'mynum' times
iterations using dotimes and doseq (def mynum 5) (println "dotimes iteration") (dotimes [i mynum] (println i)) doseq - iterate over a sequence (println "\ndoseq iteration") (doseq [x (range mynum)] (println x)) sequential vector / list for doseq below (def myvector (vector 1 2 3)) (def mylist '(5 "pizza" "som...
55095bc8f9e4eb67fcf011063c4bee19e0bc081cca39acb9eef80e81e467d688
EFanZh/EOPL-Exercises
exercise-7.18.rkt
#lang eopl Exercise 7.18 [ ★ ★ ] Modify the implementation in the preceding exercise so that apply - subst - to - type computes the ;; substitution for any type variable at most once. ;; Grammar. (define the-lexical-spec '([whitespace (whitespace) skip] [comment ("%" (arbno (not #\newline))) skip] [ident...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-7.18.rkt
racket
substitution for any type variable at most once. Grammar. Data structures - expressed values. Data structures - environment. Data structures - type environment. Data structures - substitution. Data structures - answer. Inferrer. Interpreter.
#lang eopl Exercise 7.18 [ ★ ★ ] Modify the implementation in the preceding exercise so that apply - subst - to - type computes the (define the-lexical-spec '([whitespace (whitespace) skip] [comment ("%" (arbno (not #\newline))) skip] [identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol] ...
283ca70388ccad3f00743806a7639d09a815a09b7f4505daf4d1417f05864f58
pink-gorilla/webly
id.clj
(ns modular.ws.id) (defn unique-id "Get a unique id for a session." [] (str (java.util.UUID/randomUUID))) (defn session-uid "Get session uuid from a request." [req] (get-in req [:session :uid])) (defn get-sente-session-uid "Get session uuid from a request." [req] (or (get-in req [:session :uid]) ...
null
https://raw.githubusercontent.com/pink-gorilla/webly/9d6bbac341215d2c66d7bdcc658fb06334741c5f/websocket/src/modular/ws/id.clj
clojure
(ns modular.ws.id) (defn unique-id "Get a unique id for a session." [] (str (java.util.UUID/randomUUID))) (defn session-uid "Get session uuid from a request." [req] (get-in req [:session :uid])) (defn get-sente-session-uid "Get session uuid from a request." [req] (or (get-in req [:session :uid]) ...
6131e1883f6e0215714c21ce6d41414d70c1da235c8d0daad9343703a8a3a02e
chenyukang/eopl
top.scm
(module top (lib "eopl.ss" "eopl") ;; top level module. Loads all required pieces. ;; Run the test suite with (run-all). (require "drscheme-init.scm") (require "data-structures.scm") ; for expval constructors (require "lang.scm") ; for scan&parse (require "interp.scm") ; ...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter4/call-by-need/top.scm
scheme
top level module. Loads all required pieces. Run the test suite with (run-all). for expval constructors for scan&parse for value-of-program for test-list interface to test harness ;;;;;;;;;;;;;;;; run-all : () -> Unspecified runs all the tests in test-list, comparing the results with equal-answer? ...
(module top (lib "eopl.ss" "eopl") (require "drscheme-init.scm") (provide run run-all) run : String - > ExpVal (define run (lambda (string) (value-of-program (scan&parse string)))) (define run-all (lambda () (run-tests! run equal-answer? test-list))) ...
1b79bff38e73cdec127134b19a8b8bd958bf31e4b9139ee09929f78eefff39c6
soulomoon/SICP
Exercise 2.18.scm
Exercise 2.18 : Define a procedure reverse that takes a list as argument and returns a list of the same elements in reverse order : #lang planet neil/sicp (define (reverse l) (define (iter s r) (if (null? (cdr s)) (cons (car s) r) (iter (cdr s) (cons (car s) r)) ) ) ...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.18.scm
scheme
Exercise 2.18 : Define a procedure reverse that takes a list as argument and returns a list of the same elements in reverse order : #lang planet neil/sicp (define (reverse l) (define (iter s r) (if (null? (cdr s)) (cons (car s) r) (iter (cdr s) (cons (car s) r)) ) ) ...
5b09b6ae22cfa731e15c8e43d847f2e0e588e97ddeb0cae296a4b35743497750
snape/Loopless-Functional-Algorithms
PairedQueue.hs
This file is part of " Loopless Functional Algorithms " . -- SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory SPDX - License - Identifier : Apache-2.0 -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the Lic...
null
https://raw.githubusercontent.com/snape/Loopless-Functional-Algorithms/b96759a40fcdfad10734071776936514ace4dfa1/PairedQueue.hs
haskell
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 language governing permi...
This file is part of " Loopless Functional Algorithms " . SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory SPDX - License - Identifier : Apache-2.0 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS...
94978732abd4c9cb873c39907af7703aa370c15291573b2210f55904b1880c72
metametadata/carry
utils.cljc
(ns unit.utils ; declare macros for export #?(:cljs (:require-macros [unit.utils :refer [is-exception-thrown is-error-thrown is-assertion-error-thrown]]))) #?(:clj (defn -cljs-env? "Take the &env from a macro, and tell whether we are expanding into c...
null
https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/test/unit/utils.cljc
clojure
declare macros for export
(ns unit.utils #?(:cljs (:require-macros [unit.utils :refer [is-exception-thrown is-error-thrown is-assertion-error-thrown]]))) #?(:clj (defn -cljs-env? "Take the &env from a macro, and tell whether we are expanding into cljs. Source: " [env...
2b449fd3ef2b419401344acb61e65c2ccccd62237259d5e31996263d2157fb6e
psg-mit/smooth
Interval.hs
{-| A generic module for performing interval arithmetic using the `Rounded` typeclass, which represents approximate number types with operations that permit rounding up and down. -} module Interval where import Prelude hiding (flip, recip) import Rounded (Rounded, Prec, RoundDir (Up, Down)) import qualified Rounded a...
null
https://raw.githubusercontent.com/psg-mit/smooth/ad43130f3fb6a506a2f998b221d0783ba6c968eb/src/Interval.hs
haskell
| A generic module for performing interval arithmetic using the `Rounded` typeclass, which represents approximate number types with operations that permit rounding up and down. union and widen trace ("union" ++ show (Interval l1 u1, Interval l2 u2)) $ lift x Kaucher multiplication trace ("mul" ++ show (Interval a...
module Interval where import Prelude hiding (flip, recip) import Rounded (Rounded, Prec, RoundDir (Up, Down)) import qualified Rounded as R import Debug.Trace data Interval a = Interval { lower :: a , upper :: a } instance Rounded a => Show (Interval a) where show (Interval a b) = "[" ++ R.toString a ++ ", ...
080b2bae14709fb9f13ab2879f349d0f7d1265fe708dba1dcbd6a6c5f7f198f8
clojure-interop/aws-api
PredefinedClientConfigurations.clj
(ns com.amazonaws.PredefinedClientConfigurations "Static factory methods for the default ClientConfiguration for a service. These defaults are used unless a different ClientConfiguration is explicitly provided in the constructor of the service client" (:refer-clojure :only [require comment defn ->]) (:import ...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws/src/com/amazonaws/PredefinedClientConfigurations.clj
clojure
(ns com.amazonaws.PredefinedClientConfigurations "Static factory methods for the default ClientConfiguration for a service. These defaults are used unless a different ClientConfiguration is explicitly provided in the constructor of the service client" (:refer-clojure :only [require comment defn ->]) (:import ...
2354af0d34f977d2290d0a0054082d48545c6d9f715b18e63d51d98c4b908788
meetalik8/pcpf
squarelist.hs
square[]=[] square (x:xs) =[x*x] ++square(xs) main = do putStrLn"Enter 1st element of the list:" ain<-getLine let a=(read ain :: Int) putStrLn"Enter 2nd element of the list:" bin<-getLine let b=(read bin :: Int) putStrLn"Enter 3rd element of the list:" cin<-getLine ...
null
https://raw.githubusercontent.com/meetalik8/pcpf/8079058e0a169427994fdcc483167aded3801473/haskell/squarelist.hs
haskell
square[]=[] square (x:xs) =[x*x] ++square(xs) main = do putStrLn"Enter 1st element of the list:" ain<-getLine let a=(read ain :: Int) putStrLn"Enter 2nd element of the list:" bin<-getLine let b=(read bin :: Int) putStrLn"Enter 3rd element of the list:" cin<-getLine ...
0de14e69f7f45c93f574abefdd18726f52c26215e261b0da0e79894d01adc2e4
pepeiborra/schemas
Person3.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE OverloadedLists # # LANGUAGE OverloadedStrings # module Person3 where import Control.Applicative ...
null
https://raw.githubusercontent.com/pepeiborra/schemas/b8e6cf3cf5866384b85b19058c5673fe8fc4d4a5/example/Person3.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # | v3 adds recursive field 'spouse', which leads to cycles new recursive field { "L": { "spouse": { "L": {} }, "addresses": [ ], "studies": { ...
# LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE OverloadedLists # # LANGUAGE OverloadedStrings # module Person3 where import Control.Applicative import Data.Generics.Labels () import GHC.Generics import qualified Generics.SOP as SOP import ...
17e0063598bf65b3a73fe7653608d2ca744efcce18a34e7d4f128994abad77e6
elisehuard/hs-pasta
Test.hs
module Carbs.Pasta.Vongole.Test where import Test.Framework (testGroup, Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import Carbs.Pasta.Vongole vongoleSuite :: Test vongoleSuite = testGroup "Vongole" [ testProperty "calory count >= 100" prop_minimumCalories ] prop_minimumCalories :: [Int] -> ...
null
https://raw.githubusercontent.com/elisehuard/hs-pasta/1ba0dace80a9809b1df9a333229e7d1388351ac6/test/Carbs/Pasta/Vongole/Test.hs
haskell
module Carbs.Pasta.Vongole.Test where import Test.Framework (testGroup, Test) import Test.Framework.Providers.QuickCheck2 (testProperty) import Carbs.Pasta.Vongole vongoleSuite :: Test vongoleSuite = testGroup "Vongole" [ testProperty "calory count >= 100" prop_minimumCalories ] prop_minimumCalories :: [Int] -> ...
c191cc59367682e362c662117472fe18fe200a33bb9958e650aabb83144806f1
orclev/CBOR
CBOR.hs
module Data.Binary.CBOR ( getCBOR, putCBOR ) where import Data.CBOR import Data.CBOR.Util import Prelude hiding (take) import Data.Word import Data.Binary import Data.Binary.Get import Data.Binary.Put import Data.Binary.IEEE754 hiding (getFloat16be) import Data.Binary.IEEE754.HalfFloat import qualified Data.Binary.B...
null
https://raw.githubusercontent.com/orclev/CBOR/bc0a5146517e661e9eaf03a809bd52403c085b41/src/Data/Binary/CBOR.hs
haskell
$setup | Reads a header byte and parses it into a tuple of type and extra data values. >>> runGet getHeaderBlock x | Writes a header byte given a type and extra data value. | Reads a header byte as well as any associated size data contained in the following bytes. >>> runGet getHeader x (0,1870300560) | Writ...
module Data.Binary.CBOR ( getCBOR, putCBOR ) where import Data.CBOR import Data.CBOR.Util import Prelude hiding (take) import Data.Word import Data.Binary import Data.Binary.Get import Data.Binary.Put import Data.Binary.IEEE754 hiding (getFloat16be) import Data.Binary.IEEE754.HalfFloat import qualified Data.Binary.B...
ad10ef0fa299ca9ff0ca3de9863379e99e574081a79abfaa99c6378112f990a3
pokepay/trivial-battery
main.lisp
(defpackage #:trivial-battery (:nicknames #:trivial-battery/main) #+linux (:import-from #:trivial-battery/os/linux #:battery-info #:battery-details) #+darwin (:import-from #:trivial-battery/os/mac #:battery-info #:battery-details) #+(or win32 windows) (:import-from #:trivia...
null
https://raw.githubusercontent.com/pokepay/trivial-battery/318c9da88b4d11d3f33062e0fd09be660a383404/main.lisp
lisp
(defpackage #:trivial-battery (:nicknames #:trivial-battery/main) #+linux (:import-from #:trivial-battery/os/linux #:battery-info #:battery-details) #+darwin (:import-from #:trivial-battery/os/mac #:battery-info #:battery-details) #+(or win32 windows) (:import-from #:trivia...
64ae1964abac12b812b17cc289ec4ae836a57a0b9f656aec36d287e4c8100d25
mstksg/backprop-learn
Learn.hs
module Backprop.Learn ( module L ) where import Backprop.Learn.Initialize as L import Backprop.Learn.Loss as L import Backprop.Learn.Model as L import Backprop.Learn.Run as L import Backprop.Learn.Test as L import Backprop.Learn...
null
https://raw.githubusercontent.com/mstksg/backprop-learn/59aea530a0fad45de6d18b9a723914d1d66dc222/src/Backprop/Learn.hs
haskell
module Backprop.Learn ( module L ) where import Backprop.Learn.Initialize as L import Backprop.Learn.Loss as L import Backprop.Learn.Model as L import Backprop.Learn.Run as L import Backprop.Learn.Test as L import Backprop.Learn...
8c21a91c355ecbfc6a46ab37f2144aa0913c1f13e3da2f7d4da36b67321ad6c5
greglook/clj-pgp
signing.clj
(ns clj-pgp.test.signing (:require [byte-streams :refer [bytes=]] [clj-pgp.core :as pgp] [clj-pgp.generate :as pgp-gen] [clj-pgp.signature :as pgp-sig] [clj-pgp.test.keys :refer [master-pubkey pubkey privkey gen-ec-keyspec gen-rsa-keyspec memospec->keypair]] [clojure.tes...
null
https://raw.githubusercontent.com/greglook/clj-pgp/aa4e499ff62562fa65bbb2bee100c6ed2230bf2a/test/clj_pgp/test/signing.clj
clojure
## Generative Checks
(ns clj-pgp.test.signing (:require [byte-streams :refer [bytes=]] [clj-pgp.core :as pgp] [clj-pgp.generate :as pgp-gen] [clj-pgp.signature :as pgp-sig] [clj-pgp.test.keys :refer [master-pubkey pubkey privkey gen-ec-keyspec gen-rsa-keyspec memospec->keypair]] [clojure.tes...
23320575ab9286f05314a511589d13466844b470730239d34948241a8ee81839
raph-amiard/clojurescript-lua
compile.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/raph-amiard/clojurescript-lua/a1992a1666c59c8fcf7e8f7471e51b0e68183e72/src/cljs/lua/compile.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns cljs.lua.compile (:require [clojure.java.io :as io] [cljs.lua.compiler :as comp] [cljs.analyzer :as ana] [cljs.cljsloader :as cloader] [cljs.lua.common :as com]) (:import [java.io PrintWriter File FileInputStream Fil...
17c4ad53a1a3a3360bb89a6293ffba359ff8449f4f3fad115060119864703a36
KavehYousefi/Esoteric-programming-languages
main.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This program implements an interpreter for the esoteric programming language " brainfault " , invented by the Esolang user " " in the year 2021 as an extension of Urban Mueller 's " brainfuck " concept , ;; elevated in its potentials b...
null
https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/75d5f6360452b090b1238d981123188705ea2fb7/brainfault/brainfault_001/main.lisp
lisp
This program implements an interpreter for the esoteric programming elevated in its potentials by various output alternatives, iteration constructs, and subroutines. Concept ======= The brainfault programming language's encheson for existence resides in an engagement of sophisticated emoluments whose peri...
language " brainfault " , invented by the Esolang user " " in the year 2021 as an extension of Urban Mueller 's " brainfuck " concept , followed by the identifier , and seguing into a sequence of zero or in one asterisk per side . commonly associated with the scripting language JavaScript : During = = MISC...
d22bda8427f22be93b672c6cfe5323fa6706f390eb325201ef4073a6e672a8ad
crategus/cl-cffi-gtk
rtest-glib-variant-type.lisp
(def-suite g-variant-type :in glib-suite) (in-suite g-variant-type) (defparameter vtypes (list "b" "y" "n" "q" "i" "u" "x" "t" "h" "d" "s" "o" "g" "v" "*" "?" "m*" "a*" "r" "()" "{?*}" "a{?*}" "as" "ao" "ay" "aay" "a(sv)")) GVariantType (test g-variant-ty...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/74a78a6912a96f982644f3ee5ab7b8396cc2235f/test/rtest-glib-variant-type.lisp
lisp
Type check Check the type initializer G_VARIANT_TYPE_BOOLEAN G_VARIANT_TYPE_BYTE G_VARIANT_TYPE_UINT16 G_VARIANT_TYPE_INT32 G_VARIANT_TYPE_UINT32 G_VARIANT_TYPE_HANDLE G_VARIANT_TYPE_DOUBLE G_VARIANT_TYPE_STRING G_VARIANT_TYPE_OBJECT_PATH G_VARIANT_TYPE_SIGNATURE ...
(def-suite g-variant-type :in glib-suite) (in-suite g-variant-type) (defparameter vtypes (list "b" "y" "n" "q" "i" "u" "x" "t" "h" "d" "s" "o" "g" "v" "*" "?" "m*" "a*" "r" "()" "{?*}" "a{?*}" "as" "ao" "ay" "aay" "a(sv)")) GVariantType (test g-variant-ty...
43320282ff458253eb0fd551958a337a2586f0ec355910a966cfeecb82d8a4c7
basho/riak_cs
regression_tests.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . Y...
null
https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/riak_test/tests/regression_tests.erl
erlang
--------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permiss...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
226387a7179d07f7cd65e49c1ee1b0d3e038bbc5e18a3839a7a4299ed5a7b329
vikram/lisplibraries
swank-sbcl-exts.lisp
swank-sbcl-exts.lisp --- Misc extensions for SBCL ;; Authors : < > ;; ;; License: Public Domain ;; (in-package :swank) (eval-when (:compile-toplevel :load-toplevel :execute) (swank-require :swank-arglists)) ;; We need to do this so users can place `slime-sbcl-exts' into their ;; ~/.emacs, and still use any...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/slime/contrib/swank-sbcl-exts.lisp
lisp
License: Public Domain We need to do this so users can place `slime-sbcl-exts' into their ~/.emacs, and still use any implementation they want. Display arglist of instructions.
swank-sbcl-exts.lisp --- Misc extensions for SBCL Authors : < > (in-package :swank) (eval-when (:compile-toplevel :load-toplevel :execute) (swank-require :swank-arglists)) #+sbcl (progn (defmethod compute-enriched-decoded-arglist ((operator-form (eql 'sb-assem:inst)) ...
fda19b073590e0a83f0b551e91c4930c684bdf6b924b66f561f7cf4857085945
smallhadroncollider/taskell
Parser.hs
module Taskell.Utility.Parser where import ClassyPrelude import Data.Attoparsec.Text only :: Parser a -> Parser a only p = p <* endOfInput lexeme :: Parser a -> Parser a lexeme p = skipSpace *> p <* skipSpace line :: Parser Text line = (takeTill isEndOfLine <* endOfLine) <|> takeText word :: Parser Text word = le...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell/3c731476e9a58ede300cfa83aba412509b132a3e/src/Taskell/Utility/Parser.hs
haskell
module Taskell.Utility.Parser where import ClassyPrelude import Data.Attoparsec.Text only :: Parser a -> Parser a only p = p <* endOfInput lexeme :: Parser a -> Parser a lexeme p = skipSpace *> p <* skipSpace line :: Parser Text line = (takeTill isEndOfLine <* endOfLine) <|> takeText word :: Parser Text word = le...
b76463ebf3f197e1725aafdf78148097e8c2dafc0747c07cb02f75fab3aeaeb6
qitab/pyjure
clarification.clj
(ns pyjure.clarification (:use [clojure.core.match :only [match]] [pyjure.debug] [pyjure.utilities] [pyjure.parsing] [pyjure.runtime])) ;; This pass will ;; * identify for each scope (function or class) ;; and each variables which is its scoping status: one of param , local , nonl...
null
https://raw.githubusercontent.com/qitab/pyjure/b9aa49b4f74c85f2b617e924f61eaddb194119bf/src/pyjure/clarification.clj
clojure
This pass will * identify for each scope (function or class) and each variables which is its scoping status: Issue an error if a variable has conflicting referents. * detect which functions are generators (a yield statement taints the function even if it's going to be optimized away later) * TODO distinguish ...
(ns pyjure.clarification (:use [clojure.core.match :only [match]] [pyjure.debug] [pyjure.utilities] [pyjure.parsing] [pyjure.runtime])) one of param , local , nonlocal , global . ( e.g. pyjure rule definition , incremental class definition , etc . ) (declare &C &C* &Cargs) (...
2c91e1c3fafa669f2f839a6fbe9614fae8e4eef48ce731f4464ab3b918a02f82
willowtreeapps/wombats-api
static_pages.clj
(ns wombats.handlers.static-pages (:require [io.pedestal.interceptor.helpers :as interceptor] [clojure.core.async :refer [chan go >!]])) (def home-page (interceptor/before ::home-page (fn [{:keys [response] :as context}] (let [ch (chan 1)] (go (>! ch (assoc context :response ...
null
https://raw.githubusercontent.com/willowtreeapps/wombats-api/738e4cc8d7011998695ec85e663f650be71f60ae/src/wombats/handlers/static_pages.clj
clojure
(ns wombats.handlers.static-pages (:require [io.pedestal.interceptor.helpers :as interceptor] [clojure.core.async :refer [chan go >!]])) (def home-page (interceptor/before ::home-page (fn [{:keys [response] :as context}] (let [ch (chan 1)] (go (>! ch (assoc context :response ...
aa853fffa1df5f59d2ce35ebb81d9ddae7d8fc7adf0d41c0197d010f5aa9da0c
michiakig/sicp
ex-2-73-deriv-dependencies.scm
;;;; Structure and Interpretation of Computer Programs Chapter 2 Section 4 Multiple Representations for Abstract Data Chapter 2 Section 5 Systems with Generic Operations Vanilla procedures from the text for symbolic differentiation (define (variable? x) (symbol? x)) (define (same-variable? v1 v2) (and (variab...
null
https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch2/2.4-2.5-generic-operations/ex-2-73-deriv-dependencies.scm
scheme
Structure and Interpretation of Computer Programs predicate, selector, constructor for exponentiation
Chapter 2 Section 4 Multiple Representations for Abstract Data Chapter 2 Section 5 Systems with Generic Operations Vanilla procedures from the text for symbolic differentiation (define (variable? x) (symbol? x)) (define (same-variable? v1 v2) (and (variable? v1) (variable? v2) (eq? v1 v2))) (define (make-sum ...
6cbdd526194ce37fa5a8ef353d0fa33ef70a0f9c0637ffe251fd849b4c16084b
expipiplus1/vulkan
VK_KHR_timeline_semaphore.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_timeline_semaphore - device extension -- -- == VK_KHR_timeline_semaphore -- -- [__Name String__] @VK_KHR_timeline_semaphore@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 208 -- -- [__Revision__] 2 -- -- [__Exte...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_timeline_semaphore.hs
haskell
# language CPP # | = Name VK_KHR_timeline_semaphore - device extension == VK_KHR_timeline_semaphore [__Name String__] [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] - Requires @VK_KHR_get_physical_device_proper...
@VK_KHR_timeline_semaphore@ 208 2 - Requires support for Vulkan 1.0 - 2019 - 06 - 12 @VK_KHR_external_semaphore_capabilities@ - Promoted to Vulkan 1.2 Core - , NVIDIA - , Epic Games - , Intel - , Google - ...
aba506fcb6e381308b6c294e45190e6ea86a14aa728b872d9311db53ffe8ed19
stopachka/ram
ram.clj
(ns ram (:require [clojure.math.combinatorics :as c] [clojure.string :as string])) ; ex v0 ; ----- (def ex-state-v0 {:charge-map {:a 1 :b 1 :c 0} :nand-gates [{:ins [:a :b] :out :c}]}) ; state v0 ; --------------- (def empty-state {:charge-map {} :nand...
null
https://raw.githubusercontent.com/stopachka/ram/552f75fdf6042515959b730a630d835e1ad88091/src/ram.clj
clojure
ex v0 ----- state v0 --------------- trigger v0 ---------- not gate -------- wires v0 ---------- and gate -------- memory-bit ---------- wires v1 ---------- byte ---- enabler ------- register -------- state v1 -------- trigger v1 ---------- wire-bus -------- and-n ----- decoder ------- ...
(ns ram (:require [clojure.math.combinatorics :as c] [clojure.string :as string])) (def ex-state-v0 {:charge-map {:a 1 :b 1 :c 0} :nand-gates [{:ins [:a :b] :out :c}]}) (def empty-state {:charge-map {} :nand-gates []}) (defn charge [state wire] (get...
c67d5deba14782358b2fb11d8144ac4ad6c1332b865392880211f4b3ac905ff5
mbutterick/aoc-racket
test2.rkt
#lang reader "main.rkt" ★★ 256 1,2,3
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d10/test2.rkt
racket
#lang reader "main.rkt" ★★ 256 1,2,3
3bb14b56d89fceaff952e86555497d4e4681177811b27aa5284a0b7d54f670a6
justinethier/nugget
closure-test-cases.scm
;; Test cases for closure-conversion phase, based on results from using the 90 min scheme->c compiler (load "trans.scm") (define (test label ast expected) (let ((actual (closure-convert ast))) (if (equal? expected actual) (write `(PASSED ,label)) (begin (display `(FAILED ,label)) (newline...
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/tests/closure-test-cases.scm
scheme
Test cases for closure-conversion phase, based on
results from using the 90 min scheme->c compiler (load "trans.scm") (define (test label ast expected) (let ((actual (closure-convert ast))) (if (equal? expected actual) (write `(PASSED ,label)) (begin (display `(FAILED ,label)) (newline) (display "Expected: ") (display (pr...
4fcaab2ba7c6bb0e3b4a082c81e6a26a680602b007aa5307cb6a473dc82889f7
FundingCircle/DaD
io.clj
(ns dad.io (:require [clojure.java.io :as io :refer [file]] [clojure.string :as str] [dad.files :as files :refer [relative-path]])) (set! *warn-on-reflection* true) (defn- output-path [template-path front-path templates-dir out-dir] (->> (if front-path (file (files/parent-dir ...
null
https://raw.githubusercontent.com/FundingCircle/DaD/ec41633cf991392ff63ec4251ba900a84264eead/src/dad/io.clj
clojure
Accepts a seq of maps containing [:dad/template-path :dad/front-matter :dad/body].
(ns dad.io (:require [clojure.java.io :as io :refer [file]] [clojure.string :as str] [dad.files :as files :refer [relative-path]])) (set! *warn-on-reflection* true) (defn- output-path [template-path front-path templates-dir out-dir] (->> (if front-path (file (files/parent-dir ...
57dffff4007f2d4e902b8fc1f013c5f04698db59db4c6da1bb672bdfd812fdb6
gafiatulin/codewars
SortedUnion.hs
module Codewars.Kata.SortedUnion where import Data.List (nub) uniteUnique :: Ord a => [[a]] -> [a] uniteUnique = nub . concat
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/SortedUnion.hs
haskell
module Codewars.Kata.SortedUnion where import Data.List (nub) uniteUnique :: Ord a => [[a]] -> [a] uniteUnique = nub . concat
e9e582d1e713dbd17501f22014c56df6f777f1cab4967c9b61512d4785929080
ghc/packages-haskeline
Completion.hs
module System.Console.Haskeline.Command.Completion( CompletionFunc, Completion, CompletionType(..), completionCmd ) where import System.Console.Haskeline.Command import System.Con...
null
https://raw.githubusercontent.com/ghc/packages-haskeline/5f16b76168f13c6413413386efc44fb1152048d5/System/Console/Haskeline/Command/Completion.hs
haskell
| Create a 'Command' for word completion. --------------------------------------------- Splitting the list of completions into lines for paging. Add spaces to the end of each word so that it takes up the given length. Don't padd the word in the last column, since printing a space in the last column causes a line w...
module System.Console.Haskeline.Command.Completion( CompletionFunc, Completion, CompletionType(..), completionCmd ) where import System.Console.Haskeline.Command import System.Con...
77700dd97915db0b422a14148fd5500d804f33193cc9fc42122dfdec77d8181f
emillon/ocaml-noise
noise_demo_two_way.ml
* This is an example of a two - way transport protocol . Two processes are started , and after the handshake messages are exchanged , the participants can talk to each other securely . This is an example of a two-way transport protocol. Two processes are started, and after the handshake message...
null
https://raw.githubusercontent.com/emillon/ocaml-noise/d5a3e0f634fba1f8d948a91c70a1dad6470722b0/test/examples/noise_demo_two_way.ml
ocaml
* This is an example of a two - way transport protocol . Two processes are started , and after the handshake messages are exchanged , the participants can talk to each other securely . This is an example of a two-way transport protocol. Two processes are started, and after the handshake message...
149af3072b44ceb77108384d7aafd41b7b4ee4a66dd388cf77b7c209e5c7edba
OlivierSohn/hamazed
Types.hs
{-# OPTIONS_HADDOCK hide #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # LANGUAGE UnboxedTuples , MagicHash # # LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # L...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-space/src/Imj/Space/Types.hs
haskell
# OPTIONS_HADDOCK hide # # LANGUAGE OverloadedStrings # # LANGUAGE DeriveLift # export for tests reexports # UNPACK # # UNPACK # # UNPACK # # UNPACK # | How to draw the space. ^ In it, ship and numbers can move. ^ Ship and numbers rebound on 'Wall's. maps to a Word16 # INLINE materialAndKeyToMaterial # ^ A given...
# LANGUAGE NoImplicitPrelude # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE UnboxedTuples , MagicHash # # LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # module Imj.Space.Types ( Space(...
0a1d8221fd692d17a546059b10dc98891d8ce95e611302fb048f43eba99a0ba2
sunshineclt/Racket-Helper
e-iter.rkt
#lang racket (define (square a) (* a a)) (define (fastExp p currentBase result) (define half (floor (/ p 2))) (if (= 0 p) (displayln result) (if (even? p) (fastExp half (square currentBase) result) (fastExp half (square currentBase) (* result currentBase)))) ) (define (work) (le...
null
https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%AA%86%E6%A2%81%E5%AE%B8/Assignment/1/e-iter.rkt
racket
#lang racket (define (square a) (* a a)) (define (fastExp p currentBase result) (define half (floor (/ p 2))) (if (= 0 p) (displayln result) (if (even? p) (fastExp half (square currentBase) result) (fastExp half (square currentBase) (* result currentBase)))) ) (define (work) (le...
5c8e570486d966e8177653238e5b3df6f68fcec30ae8b552733944cb326ff393
ertugrulcetin/procedure.async
dev_middleware.clj
(ns favorite-songs.dev-middleware (:require [ring.middleware.reload :refer [wrap-reload]] [selmer.middleware :refer [wrap-error-page]] [prone.middleware :refer [wrap-exceptions]])) (defn wrap-dev [handler] (-> handler wrap-reload wrap-error-page (wrap-exceptions {:app-namespaces ['fav...
null
https://raw.githubusercontent.com/ertugrulcetin/procedure.async/2f9af363904c297ef8332e4710db899c5c94e7cd/examples/favorite-songs/env/dev/clj/favorite_songs/dev_middleware.clj
clojure
(ns favorite-songs.dev-middleware (:require [ring.middleware.reload :refer [wrap-reload]] [selmer.middleware :refer [wrap-error-page]] [prone.middleware :refer [wrap-exceptions]])) (defn wrap-dev [handler] (-> handler wrap-reload wrap-error-page (wrap-exceptions {:app-namespaces ['fav...
951359a7b5d6cc907f455d21e12cbe393da01f0e082eeb302988a73b8b7f46aa
theam/haskell-do
Highlight.hs
- Copyright ( c ) 2017 The Agile Monkeys S.L. < > - - Licensed under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agr...
null
https://raw.githubusercontent.com/theam/haskell-do/f339e57859d308437a72800bda08f96d0de12982/src/ghc-specific/Foreign/Highlight.hs
haskell
- Copyright ( c ) 2017 The Agile Monkeys S.L. < > - - Licensed under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agr...
b48efe057768fd55f93c027a123d0961eee6da817a97c27cfa217aa18f42deb9
dalaing/little-languages
Note.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DeriveFoldable ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/common-lang/src/Component/Type/Note.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveTraversable #
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Copyright : (c) Dave Laing, 2016 License : BSD3 Maintainer : Stability : experimental Portability : non-portable -} # LANGUAGE DeriveFoldable # # LANGUAGE FlexibleInstances ...
1afa3b4af770cc66a449f860f3d213d485d0314dd948c104f00ee7e891d0a921
crisptrutski/matchbox
reagent.cljs
(ns matchbox-reagent.chat.reagent (:require-macros [reagent.ratom :refer [reaction]]) (:require [cljs.core :as cljs] [reagent.core :as reagent :refer [atom]] [matchbox.core :as m] [matchbox.reagent :as r] [matchbox-reagent.common :refer [get-ref ->v enter? ordered-lis...
null
https://raw.githubusercontent.com/crisptrutski/matchbox/5bb9ba96f5df01bce302a8232f6cddd9d64a1d71/examples/src/cljs/matchbox_reagent/chat/reagent.cljs
clojure
state actions views
(ns matchbox-reagent.chat.reagent (:require-macros [reagent.ratom :refer [reaction]]) (:require [cljs.core :as cljs] [reagent.core :as reagent :refer [atom]] [matchbox.core :as m] [matchbox.reagent :as r] [matchbox-reagent.common :refer [get-ref ->v enter? ordered-lis...
465912fc1e4a3f73998fd01e7da3c6dddbea5544b17ba0006bbdab4a048b66bd
racket/htdp
ufo-rename.rkt
#lang scheme (require (prefix-in uni: 2htdp/universe) (prefix-in uni: htdp/image) "test-aux.rkt") (define (create-UFO-scene height) (uni:place-image UFO 50 height (uni:empty-scene 100 100))) (define UFO (uni:overlay (uni:circle 10 'solid 'green) (uni:rectangle 40 4 'solid 'green))) (tes...
null
https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/2htdp/tests/ufo-rename.rkt
racket
#lang scheme (require (prefix-in uni: 2htdp/universe) (prefix-in uni: htdp/image) "test-aux.rkt") (define (create-UFO-scene height) (uni:place-image UFO 50 height (uni:empty-scene 100 100))) (define UFO (uni:overlay (uni:circle 10 'solid 'green) (uni:rectangle 40 4 'solid 'green))) (tes...
039c76ac8bc96f41d4869b0cbb3f4b9f92af09bf5d902c6ec72fddfecbde4a61
juxt/site
template_test.clj
Copyright © 2021 , JUXT LTD . (ns juxt.site.template-test (:require [xtdb.api :as x] [clojure.test :refer [deftest is are testing] :as t] [juxt.test.util :refer [with-xt with-handler submit-and-await! *xt-node* *handler* access-all-areas access-all-api...
null
https://raw.githubusercontent.com/juxt/site/a72729b05153aac03cf47d16a5eaeb05e0809b4d/test/juxt/site/template_test.clj
clojure
Site templates can be defined as a resource which references a Template resource. The Template resource provides defaults for the representation metadata of the resource's selected representation. The Template resource extract the template model from the database. In this way, a template can be shared by multiple ...
Copyright © 2021 , JUXT LTD . (ns juxt.site.template-test (:require [xtdb.api :as x] [clojure.test :refer [deftest is are testing] :as t] [juxt.test.util :refer [with-xt with-handler submit-and-await! *xt-node* *handler* access-all-areas access-all-api...
0db2ffccb34d6ee0f55d34a4adf81bfa07e104687c2da574b3f9cb5460fc06e9
felipereigosa/mock-mechanics
physics-mode.clj
(ns mockmechanics.core (:require [mockmechanics.library.vector :as vector]) (:import [com.bulletphysics.collision.dispatch DefaultCollisionConfiguration CollisionDispatcher] [com.bulletphysics.collision.shapes CollisionShape StaticPlaneShape Box...
null
https://raw.githubusercontent.com/felipereigosa/mock-mechanics/93070a789f5b24a7b34643bc11f47f8cf6112f8d/src/mockmechanics/physics-mode.clj
clojure
(when kinematic? (.setCollisionFlags rigid-body (bit-or (.getCollisionFlags rigid-body) (and (in? (:type part) [:block :wagon]) (:solid part))
(ns mockmechanics.core (:require [mockmechanics.library.vector :as vector]) (:import [com.bulletphysics.collision.dispatch DefaultCollisionConfiguration CollisionDispatcher] [com.bulletphysics.collision.shapes CollisionShape StaticPlaneShape Box...
8c0fef482b0659de492f3ac8494d67992e80fa9b08147ed2c27e2f431aefddad
craigfe/progress
progress_engine_intf.ml
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Copyright ( c ) 2020–2021 < > Distributed under the MIT license . See terms at the end of this file . — — — — — — — — — — — — — — — — — — — — — — — — —...
null
https://raw.githubusercontent.com/craigfe/progress/d7129b772d05c5589b8807630031155a6aeb27f0/src/progress/engine/progress_engine_intf.ml
ocaml
We go to some effort here to avoid having types directly refer to those in [Progress_engine] rather than going via the aliases. * * {1 Preliminaries} Some basic types used throughout the rest of the library: * {1 Description} Describing a progress line is done via the {!Line} DSL. Individual line...
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Copyright ( c ) 2020–2021 < > Distributed under the MIT license . See terms at the end of this file . — — — — — — — — — — — — — — — — — — — — — — — — —...
036334806c9e54194617b2eadcca29f151c15c780721ee85bf81a1b5431ebdca
bmeurer/ocaml-arm
oo.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/oo.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ let copy = CamlinternalOO.copy ex...
e8027f69a122e050560f63848042768e321096f2b635a799e634406b39282c30
nlamirault/cl-gdata
specials.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: specials.lisp ;;;; Purpose: cl-gdata specials informations. Programmer : < > ;;;; This file , part of cl - ...
null
https://raw.githubusercontent.com/nlamirault/cl-gdata/1989b2919cc577c629fa65398a871cefd2229318/src/tools/specials.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* FILE IDENTIFICATION Name: specials.lisp Purpose: cl-gdata specials informations. cl-gdata users are granted the rights to distribute and use this software (), also known as th...
Programmer : < > This file , part of cl - gdata , is Copyright ( c ) 2008 by as governed by the terms of the Lisp Lesser GNU Public License (in-package :cl-gdata-tools) (defparameter *version* (asdf:component-version (asdf:find-system "cl-gdata")) "Version of cl-gdata.") (defparameter *debug* ni...
b744df5a5bf0cef05423e2dd7d32f6cfb5a81426e5b471d8bdc956813ef69692
ndmitchell/ghcid
Parser.hs
# LANGUAGE PatternGuards , ViewPatterns , TupleSections # -- | Parses the output from GHCi module Language.Haskell.Ghcid.Parser( parseShowModules, parseShowPaths, parseLoad ) where import System.FilePath import Data.Char import Data.List.Extra import Data.Maybe import Text.Read import Data.Tuple.Extra import ...
null
https://raw.githubusercontent.com/ndmitchell/ghcid/abbb157ac9d06fdfba537f97ab96e197b3bb36cb/src/Language/Haskell/Ghcid/Parser.hs
haskell
| Parses the output from GHCi | Parse messages from show modules command. Given the parsed lines return a list of (module name, file). we only return raw values, don't want any escape codes in there | Parse messages from show paths command. Given the parsed lines return (current working directory, module impo...
# LANGUAGE PatternGuards , ViewPatterns , TupleSections # module Language.Haskell.Ghcid.Parser( parseShowModules, parseShowPaths, parseLoad ) where import System.FilePath import Data.Char import Data.List.Extra import Data.Maybe import Text.Read import Data.Tuple.Extra import Control.Applicative import Prelud...
65f4da2a92f50f52543b308e29953f21d045af4755eb29ea65e4cecdf35cebdf
Mikolaj/horde-ad
MnistFcnnScalar.hs
# LANGUAGE DataKinds , TypeFamilies # # OPTIONS_GHC -Wno - missing - export - lists # -- | Scalar-based implementation of fully connected neutral network for classification of MNIST digits . Sports 2 hidden layers . module MnistFcnnScalar where import Prelude import Control.Exception (assert) import quali...
null
https://raw.githubusercontent.com/Mikolaj/horde-ad/993ae8b4750a46f2e78b8a94e9eeb5abd9b1d46d/example/MnistFcnnScalar.hs
haskell
| Scalar-based implementation of fully connected neutral network | Compute the output of a neuron, without applying activation function, from trainable inputs in @xs@ and parameters (the bias and weights) at @inputs@ starting at @offset@. Useful for neurons in the middle of the network, receiving inputs from other...
# LANGUAGE DataKinds , TypeFamilies # # OPTIONS_GHC -Wno - missing - export - lists # for classification of MNIST digits . Sports 2 hidden layers . module MnistFcnnScalar where import Prelude import Control.Exception (assert) import qualified Data.Strict.Vector as Data.Vector import qualified Data.Vector....
6b3e4043c6a52934b4057198d3f8326b475a63f77b725639a42756f8e83b57a5
caradoc-org/caradoc
type.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/type/type.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
5578e3bc4cd84c58506ead62576fe8ad1be0f973f6ac9694e01e0e920fa393bf
acl2/acl2
write-acl2-code-size.lisp
ACL2 Version 8.5 -- A Computational Logic for Applicative Common Lisp Copyright ( C ) 2023 , Regents of the University of Texas This version of ACL2 is a descendent of ACL2 Version 1.9 , Copyright ( C ) 1997 Computational Logic , Inc. See the documentation topic NOTE-2 - 0 . ; This program is free software;...
null
https://raw.githubusercontent.com/acl2/acl2/65a46d5c1128cbecb9903bfee4192bb5daf7c036/doc/write-acl2-code-size.lisp
lisp
This program is free software; you can redistribute it and/or modify it under the terms of the LICENSE file distributed with ACL2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
ACL2 Version 8.5 -- A Computational Logic for Applicative Common Lisp Copyright ( C ) 2023 , Regents of the University of Texas This version of ACL2 is a descendent of ACL2 Version 1.9 , Copyright ( C ) 1997 Computational Logic , Inc. See the documentation topic NOTE-2 - 0 . Written by : ...
548764e2c071d427b537c01ffa402b13cd0e4161c05b654061e3b89035781632
BitGameEN/bitgamex
ws_handler.erl
-module(ws_handler). -export([init/2]). -export([websocket_init/1]). -export([websocket_handle/2]). -export([websocket_info/2]). init(Req, Opts) -> {cowboy_websocket, Req, Opts}. websocket_init(State) -> erlang:start_timer(1000, self(), <<"Hello!">>), {ok, State}. websocket_handle({text, Msg}, State) -> {reply,...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/cowboy/examples/websocket/src/ws_handler.erl
erlang
-module(ws_handler). -export([init/2]). -export([websocket_init/1]). -export([websocket_handle/2]). -export([websocket_info/2]). init(Req, Opts) -> {cowboy_websocket, Req, Opts}. websocket_init(State) -> erlang:start_timer(1000, self(), <<"Hello!">>), {ok, State}. websocket_handle({text, Msg}, State) -> {reply,...
2715db979cac8716c7a4d3346886660405ade989ee2ca6709583df1837181228
tweag/inline-js
JSParse.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE TemplateHaskell # module Language.JavaScript.Inline.JSParse (jsParse) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.FileEmbed import Language.JavaScript.Inline.Core import UnliftIO import UnliftIO.Process jsParse :: String -> IO ...
null
https://raw.githubusercontent.com/tweag/inline-js/5da3690abd454e5e94021dcd4486484e89fc419f/inline-js/src/Language/JavaScript/Inline/JSParse.hs
haskell
# LANGUAGE BangPatterns #
# LANGUAGE TemplateHaskell # module Language.JavaScript.Inline.JSParse (jsParse) where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.FileEmbed import Language.JavaScript.Inline.Core import UnliftIO import UnliftIO.Process jsParse :: String -> IO (Bool, Bool, [String]) jsParse...
d4fff7d619d2d75a45c188d96b57efc1b91662fc5cf94caa41de36c9d03fab5e
ucsd-progsys/liquidhaskell
RBTree_ord.hs
{-@ LIQUID "--no-termination" @-} {-@ LIQUID "--no-totality" @-} module RBTree_ord (add, remove, deleteMin, deleteMin') where import Language.Haskell.Liquid.Prelude data RBTree a = Leaf | Node { nCol :: Color , nKey :: a , nLeft :: !(RBTree a) ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/pos/RBTree_ord.hs
haskell
@ LIQUID "--no-termination" @ @ LIQUID "--no-totality" @ ^ Black ^ Red ------------------------------------------------------------------------- | Add an element ------------------------------------------------------- ------------------------------------------------------------------------- ------------------...
module RBTree_ord (add, remove, deleteMin, deleteMin') where import Language.Haskell.Liquid.Prelude data RBTree a = Leaf | Node { nCol :: Color , nKey :: a , nLeft :: !(RBTree a) , nRight :: !(RBTree a) } ...
4aea3b737229b72c5b0ad52a8237ee70e90b5b50a5f9fe7729ba3ebae600db56
LuisThiamNye/chic
text.clj
(ns chic.ui.text (:require [chic.ui :as cui] [io.github.humbleui.core :as hui :refer [deftype+]] [io.github.humbleui.protocols :as huip :refer [IComponent]]) (:import [io.github.humbleui.skija Canvas Font FontMetrics Paint TextLine] [io.github.humbleui.skija.shaper Shaper ShapingOptions] [io.githu...
null
https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/ui/text.clj
clojure
(draw-text [_ canvas])) (deftype+ DrawableTextSpan [^String text ^Font font ^Paint paint ^TextLine line ^FontMetrics metrics] (draw-text [_ ^Canvas canvas] (->DrawableTextSpan )) (cui/dyncomp (->MultiSpanLabel spans)))
(ns chic.ui.text (:require [chic.ui :as cui] [io.github.humbleui.core :as hui :refer [deftype+]] [io.github.humbleui.protocols :as huip :refer [IComponent]]) (:import [io.github.humbleui.skija Canvas Font FontMetrics Paint TextLine] [io.github.humbleui.skija.shaper Shaper ShapingOptions] [io.githu...
ff526eef7300d69d1e8708276d521135631c14f75d0f89432e23dace4c865894
Beluga-lang/Beluga
subord.ml
* Printing the subordination relation . Computing the relation is done in store.ml , as constructors are added . Also has ` thin ' , which uses subordination to generate a substitution that does n't use irrelevant parts of a context . @author Printing the subordination relation. Com...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/2f16a1b026f4decd7ace1981065bcb6e5fd8915b/src/core/subord.ml
ocaml
relevant tA basis = rlist For every type family occurring in tA, check if it is a subordinate of a type in basis or it is equal to a type in basis; Idea : Can tA be used to construct elements in basis ? if there is a type family a in tA s.t. a is a subordinate of a type in basis or...
* Printing the subordination relation . Computing the relation is done in store.ml , as constructors are added . Also has ` thin ' , which uses subordination to generate a substitution that does n't use irrelevant parts of a context . @author Printing the subordination relation. Com...
15f8353c1e8e67c204767c9496e29d128f719c13b8537ee77654248492c4e32c
plumatic/cljs-test
core.cljs
(ns cljs-test.core (:use-macros [cljs-test.macros :only [is]])) (def tests (atom {})) (def +current-test+ (atom nil)) (defn add-test! [name f] (swap! tests assoc name {:fn f :stats {:total 0 :pass 0 :fail 0 :error 0}})) (defn update-test-stats! [st...
null
https://raw.githubusercontent.com/plumatic/cljs-test/ad8fcfcf4fab13b9ed07e44f167d0aef5165be81/src/cljs_test/core.cljs
clojure
bright green bright cyan bright red bright red italic grey
(ns cljs-test.core (:use-macros [cljs-test.macros :only [is]])) (def tests (atom {})) (def +current-test+ (atom nil)) (defn add-test! [name f] (swap! tests assoc name {:fn f :stats {:total 0 :pass 0 :fail 0 :error 0}})) (defn update-test-stats! [st...