_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
7274a3293efe0e5ac12fb6b9ffbb31284adebb5ca103b8c89626e2ac4ee24f10
degree9/enterprise
data.cljs
(ns degree9.shopify.auth.data (:require degree9.env)) (def api-key (partial degree9.env/get :shopify-api-key)) (def api-secret (partial degree9.env/get :shopify-api-secret))
null
https://raw.githubusercontent.com/degree9/enterprise/36e4f242c18b1dde54d5a15c668b17dc800c01ff/src/degree9/shopify/auth/data.cljs
clojure
(ns degree9.shopify.auth.data (:require degree9.env)) (def api-key (partial degree9.env/get :shopify-api-key)) (def api-secret (partial degree9.env/get :shopify-api-secret))
7aaa7effa0009ace409534fd427f8ca91680ac1419087ad9d8056417cac17073
duanebester/clunk
example.clj
(require '[com.clunk.core :as clunk] '[clojure.core.async :as async] '[clojure.core.match :as m]) (def username "jimmy") (def password "banana") (def database "world") (def port (int 5432)) (def client (clunk/socket-client port)) ;; Receive Handler (async/go-loop [] (when-let [msg (async/<! (:in ...
null
https://raw.githubusercontent.com/duanebester/clunk/86c50a32230e055ba3b0dd1e34f31e05a32cab20/example/example.clj
clojure
Receive Handler
(require '[com.clunk.core :as clunk] '[clojure.core.async :as async] '[clojure.core.match :as m]) (def username "jimmy") (def password "banana") (def database "world") (def port (int 5432)) (def client (clunk/socket-client port)) (async/go-loop [] (when-let [msg (async/<! (:in client))] (prin...
d07d8381a0f660219e7505718d56e0c31210a72103e101c4352ac92de086af18
thesquelched/clj-yahoo
yql_test.clj
(ns yahoo.yql-test (:require [yahoo.yql :as yql] :reload-all) (:use clojure.test)) (deftest ^{:doc "YQL TABLE tests"} table (let [cols [:c1 :c2 :c3] tab :test.table tab-lim1 :test.table#10 tab-lim2 :table2#40-50] (is (= "* FROM table" (yql/ta...
null
https://raw.githubusercontent.com/thesquelched/clj-yahoo/85d0d2fd772361164f85b11107b33d2473e7b525/test/yahoo/yql_test.clj
clojure
(ns yahoo.yql-test (:require [yahoo.yql :as yql] :reload-all) (:use clojure.test)) (deftest ^{:doc "YQL TABLE tests"} table (let [cols [:c1 :c2 :c3] tab :test.table tab-lim1 :test.table#10 tab-lim2 :table2#40-50] (is (= "* FROM table" (yql/ta...
dd8bf2e12f35dbd467f523fa0bd068940b8d04d0cde1ccf3cd16502d197795e6
dyzsr/ocaml-selectml
pr5343_bad.ml
TEST flags = " -w -a -rectypes " ocamlc_byte_exit_status = " 2 " * setup - ocamlc.byte - build - env * * ocamlc.byte * * * check - ocamlc.byte - output flags = " -w -a -rectypes " ocamlc_byte_exit_status = "2" * setup-ocamlc.byte-build-env ** ocamlc.byte *** check-ocamlc.byte-output *) module M : sig t...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-rectypes-bugs/pr5343_bad.ml
ocaml
TEST flags = " -w -a -rectypes " ocamlc_byte_exit_status = " 2 " * setup - ocamlc.byte - build - env * * ocamlc.byte * * * check - ocamlc.byte - output flags = " -w -a -rectypes " ocamlc_byte_exit_status = "2" * setup-ocamlc.byte-build-env ** ocamlc.byte *** check-ocamlc.byte-output *) module M : sig t...
6dabcde0e5298babc9d1377fba3f0c4ae4d5b5a804b86911b2e0194d4863b4b1
skanev/playground
37.scm
SICP exercise 3.37 ; procedure is cumbersome when compared with ; a more expression-oriented style of definition, such as ; ; (define (celsius-fahrenheit-converter x) ( c+ ( c * ( c/ ( cv 9 ) ( cv 5 ) ) ; x) ( cv 32 ) ) ) ; ; (define C (make-connector)) ; (define F (celsius-f...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/37.scm
scheme
a more expression-oriented style of definition, such as (define (celsius-fahrenheit-converter x) x) (define C (make-connector)) (define F (celsius-fahrenheit-converter C)) Here c+, c*, etc. are the "constraint" versions of the arithmetic connector that is related to these by an adder constr...
SICP exercise 3.37 procedure is cumbersome when compared with ( c+ ( c * ( c/ ( cv 9 ) ( cv 5 ) ) ( cv 32 ) ) ) operations . For example , c+ takes two connectors as arguments and returns a Celsius to converter (define (celsius-fahrenheit-converter x) (c+ (c* (c/ (cv 9) (cv 5)) ...
91c9c159c45f45d154e3058199f95bc09b6816e30be4af5a82589139523021af
bobzhang/fan
a_adt.ml
type u = | A of string | B of string * int | C of (u * string) with sexp type u = | A of string | B of string * int | C of (u * string) let _ = fun (_ : u) -> () let rec __u_of_sexp__ = let _tp_loc = "a_adt.ml.u" in function | (Sexplib.Sexp.List (Sexplib.Sexp.Atom (("a" | "A" as _tag)) :...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/migration/a_adt.ml
ocaml
type u = | A of string | B of string * int | C of (u * string) with sexp type u = | A of string | B of string * int | C of (u * string) let _ = fun (_ : u) -> () let rec __u_of_sexp__ = let _tp_loc = "a_adt.ml.u" in function | (Sexplib.Sexp.List (Sexplib.Sexp.Atom (("a" | "A" as _tag)) :...
d5959bd426cef7c48f507412451d34aec8e4ef5fb8f4e8e8ef2a1b0873653bf5
patrickt/possession
Hud.hs
# LANGUAGE DataKinds # # LANGUAGE ImportQualifiedPost # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - unclutter - valid - hole - fits # {-# OPTIONS_GHC -Wno-unused-top-binds #-} module UI.Hud ( Hud (Hud), initial, ...
null
https://raw.githubusercontent.com/patrickt/possession/9bc9c121908070dfb49b6b97f86a79d10076b34c/src/UI/Hud.hs
haskell
# LANGUAGE OverloadedStrings # # OPTIONS_GHC -Wno-unused-top-binds #
# LANGUAGE DataKinds # # LANGUAGE ImportQualifiedPost # # LANGUAGE TemplateHaskell # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - unclutter - valid - hole - fits # module UI.Hud ( Hud (Hud), initial, ) where import Data.Message qualified as Message import Data.Position (Pos...
262fea5c1d23400f640ad15c52a97b8f37bd8c1a24d8f14bd53713bb3caeedfe
rufus-lang/rufus
rf.erl
rf defines command - line tools for working with programs . -module(rf). %% API exports -export([main/1]). %% escript entry point -spec main(list()) -> no_return(). main(Args) -> ok = application:start(rf), ExitCode = case Args of [Command | CommandArgs] -> run(Command...
null
https://raw.githubusercontent.com/rufus-lang/rufus/fb3ec8f67c06e8d656c6aa6c4297461559ee168f/rf/src/rf.erl
erlang
API exports escript entry point Private API
rf defines command - line tools for working with programs . -module(rf). -export([main/1]). -spec main(list()) -> no_return(). main(Args) -> ok = application:start(rf), ExitCode = case Args of [Command | CommandArgs] -> run(Command, CommandArgs); [] -> ...
33b6bb81da406e6598adb72ad5847c61e8c91f9aee1840376ab401f6820e581a
JoelSanchez/ventas
auth_test.clj
(ns ventas.auth-test (:require [clojure.test :refer [deftest is use-fixtures]] [ventas.auth :as sut] [ventas.database.entity :as entity] [ventas.test-tools :as test-tools])) (use-fixtures :once #(test-tools/with-test-context (%))) (def test-user-attrs {:email ""}) (defte...
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/test/clj/ventas/auth_test.clj
clojure
(ns ventas.auth-test (:require [clojure.test :refer [deftest is use-fixtures]] [ventas.auth :as sut] [ventas.database.entity :as entity] [ventas.test-tools :as test-tools])) (use-fixtures :once #(test-tools/with-test-context (%))) (def test-user-attrs {:email ""}) (defte...
f8c9c00aa91bd09713adb44b657ee4e7cdf356c63e78668253f200d24bbee7f1
Happstack/happstack-server
Listen.hs
# LANGUAGE BangPatterns , CPP , ScopedTypeVariables # module Happstack.Server.Internal.Listen(listen, listen',listenOn,listenOnIPv4) where import Happstack.Server.Internal.Types (Conf(..), Request, Response) import Happstack.Server.Internal.Handler (request) import Happstack.Server.Internal.Socket ...
null
https://raw.githubusercontent.com/Happstack/happstack-server/4c641ccec4e9790ff5aff1bbe3d823a0690dc93a/src/Happstack/Server/Internal/Listen.hs
haskell
Meant to be TCP in practise. would be a bizarre system that defaults to SCTP over TCP. ^ IP address to listen on (must be an IP address not a host name) ^ port number to listen on | Bind and listen port | Use a previously bind port and listen http:// loop remove thread from timeout table - #ifndef mingw32_HOST_...
# LANGUAGE BangPatterns , CPP , ScopedTypeVariables # module Happstack.Server.Internal.Listen(listen, listen',listenOn,listenOnIPv4) where import Happstack.Server.Internal.Types (Conf(..), Request, Response) import Happstack.Server.Internal.Handler (request) import Happstack.Server.Internal.Socket ...
76664f14f1f3a051e2f530b25b4e17923b12da6d27907a0868b6831ba17368d8
steffan-westcott/clj-otel
jaeger_remote_sampler.clj
(ns steffan-westcott.clj-otel.sdk.jaeger-remote-sampler "`Sampler` that implements Jaeger remote sampler type." (:require [steffan-westcott.clj-otel.sdk.otel-sdk :as sdk] [steffan-westcott.clj-otel.util :as util]) (:import (io.opentelemetry.sdk.extension.trace.jaeger.sampler JaegerRemoteSampler))) (d...
null
https://raw.githubusercontent.com/steffan-westcott/clj-otel/92975012560fb999fc46e73ec0d84e5b82fdeaab/clj-otel-sdk-extension-jaeger-remote-sampler/src/steffan_westcott/clj_otel/sdk/jaeger_remote_sampler.clj
clojure
(ns steffan-westcott.clj-otel.sdk.jaeger-remote-sampler "`Sampler` that implements Jaeger remote sampler type." (:require [steffan-westcott.clj-otel.sdk.otel-sdk :as sdk] [steffan-westcott.clj-otel.util :as util]) (:import (io.opentelemetry.sdk.extension.trace.jaeger.sampler JaegerRemoteSampler))) (d...
06de370b5a6c4a4a7bc792fd58d580c588b2140291db350e2637d8147357c3f5
weavejester/eftest
runner_test.clj
(ns eftest.runner-test (:require [clojure.test :refer :all] [eftest.runner :as sut])) (in-ns 'eftest.test-ns.single-failing-test) (clojure.core/refer-clojure) (clojure.core/require 'clojure.test) (clojure.test/deftest single-failing-test (clojure.test/is (= 1 2))) (in-ns 'eftest.test-ns.another-failin...
null
https://raw.githubusercontent.com/weavejester/eftest/43a41b28e5981382a93503be27bce463e1b6ad4f/eftest/test/eftest/runner_test.clj
clojure
(ns eftest.runner-test (:require [clojure.test :refer :all] [eftest.runner :as sut])) (in-ns 'eftest.test-ns.single-failing-test) (clojure.core/refer-clojure) (clojure.core/require 'clojure.test) (clojure.test/deftest single-failing-test (clojure.test/is (= 1 2))) (in-ns 'eftest.test-ns.another-failin...
8adc89e1b0eb00d3d9bd3f1a4f1d52a6bedc43221274b8454de4c93beb95f51e
valis/hoq
Semantics.hs
# LANGUAGE FlexibleInstances # module Semantics ( Semantics(..), Type(..) , SValue, SEval , isInj , cmpTerms, pcmpTerms , dropOnePi, universe , iConSem, iCon , pathSem, path, interval , module Syntax.Term ) where import Data.Foldable(Foldable(..)) import Data.Traversable(Traversabl...
null
https://raw.githubusercontent.com/valis/hoq/9d2d2f5dee367ca5a609199856ca5964499bf33a/src/Semantics.hs
haskell
# LANGUAGE FlexibleInstances # module Semantics ( Semantics(..), Type(..) , SValue, SEval , isInj , cmpTerms, pcmpTerms , dropOnePi, universe , iConSem, iCon , pathSem, path, interval , module Syntax.Term ) where import Data.Foldable(Foldable(..)) import Data.Traversable(Traversabl...
c3f3c4c29f84bfe5cacde6cd19d5b0ceb693fc2603bf7af6014fd68aeb913818
metabase/metabase
core_test.clj
(ns ^:mb/once metabase.automagic-dashboards.core-test (:require [cheshire.core :as json] [clojure.core.async :as a] [clojure.test :refer :all] [java-time :as t] [metabase.api.common :as api] [metabase.automagic-dashboards.core :as magic] [metabase.automagic-dashboards.rules :as rules] [metabas...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/automagic_dashboards/core_test.clj
clojure
------------------- `->reference` ------------------- ------------------- Rule matching ------------------- ------------------- `automagic-anaysis` ------------------- We want to both generate as many cards as we can to catch all aberrations, but also make sure that size limiting works. These test names were nam...
(ns ^:mb/once metabase.automagic-dashboards.core-test (:require [cheshire.core :as json] [clojure.core.async :as a] [clojure.test :refer :all] [java-time :as t] [metabase.api.common :as api] [metabase.automagic-dashboards.core :as magic] [metabase.automagic-dashboards.rules :as rules] [metabas...
fa7002612810efedf70bb044f4916d2c39acd557b39341a0ab968931fa3a32d6
brawnski/git-annex
UUID.hs
git - annex UUID type - - Copyright 2011 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2011 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Types.UUID where -- might be nice to have a newtype, but lots of stuff treats uuids as strings type U...
null
https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Types/UUID.hs
haskell
might be nice to have a newtype, but lots of stuff treats uuids as strings
git - annex UUID type - - Copyright 2011 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2011 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Types.UUID where type UUID = String
9cf5ca96e45deef15b2cd6e37ff6adf2434b76cca463cee3f037295a4548b06d
mirage/ocaml-xenstore
logging.ml
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
null
https://raw.githubusercontent.com/mirage/ocaml-xenstore/8b4eec36420b5ac529787fb6dab37c83d2b33ad8/server/logging.ml
ocaml
Grab as many elements as we can without blocking General system logging Operation logging Access logger "watchevent";
* Copyright ( C ) Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LI...
39721715cf6aa9445ceca98bf93ddd340f25b8d5ebefeeb2b462163e6efb8c79
madvagabond/ocaml-balancers
chash.mli
val lookup: 'a list -> int64 -> 'a val shards: 'a list -> int64 -> int -> 'a list val slice: 'a list -> int -> int -> 'a list
null
https://raw.githubusercontent.com/madvagabond/ocaml-balancers/9d41bc2cc1929aaeb09ca73fb958a9200c32a779/lib/chash.mli
ocaml
val lookup: 'a list -> int64 -> 'a val shards: 'a list -> int64 -> int -> 'a list val slice: 'a list -> int -> int -> 'a list
e3c4b459b6e6f01cc2d6a4ed6efa48cf7ae8779489552b69b0ff89977f30511a
Engelberg/better-cond
core.clj
(ns better-cond.core "A clj-kondo hook to allow linting of better-cond `cond` macro. This supports better-cond version 2.0.0+. To use in a project, change the namespace to hooks.better-cond, put this code in file .clj-kondo/hooks/better_cond.clj, and include a config.edn entry in the :hooks key like: :h...
null
https://raw.githubusercontent.com/Engelberg/better-cond/5160c454d0a2ef65b1483a464516c90589ba2242/resources/clj-kondo.exports/better-cond/better-cond/better_cond/core.clj
clojure
Avoid reprocessing the cond with ns here better-cond allows single clause for default Handle special better-cond constructs Multi stage constructs fine for linting
(ns better-cond.core "A clj-kondo hook to allow linting of better-cond `cond` macro. This supports better-cond version 2.0.0+. To use in a project, change the namespace to hooks.better-cond, put this code in file .clj-kondo/hooks/better_cond.clj, and include a config.edn entry in the :hooks key like: :h...
79f5bdd59bac85e928e18c720a635ca51eba4a62a6ead59dfbaa933f2ef30aa4
basho-labs/luwak
luwak_app.erl
-module(luwak_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> case app_helpe...
null
https://raw.githubusercontent.com/basho-labs/luwak/ec413dc5edd3fc7c1acfecac2a954703480d9f78/src/luwak_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(luwak_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> case app_helper:get_env(luwak, enabled, false) of true -> riak_core_util:start_app_deps(luwak), add_webmachine_routes(); _ -> nop end, {ok,self()}...
64ec85a1b7b53a781b93dcc3b49f6935938de00fdaae04ddf3cb12ee6bd98e87
haskell/cabal
cabal.test.hs
import Test.Cabal.Prelude main = cabalTest $ do win <- isWindows ghcsWithMaxPathIssue <- isGhcVersion "< 8.6.5" expectBrokenIf (win && ghcsWithMaxPathIssue) 6271 $ do res <- recordMode DoNotRecord $ cabalG' ["--config=cabal.config"] "v2-install" ["-v3"] assertOutputContains "creating file with the...
null
https://raw.githubusercontent.com/haskell/cabal/0184445b83af20dd9bb0e2ec09a8ba4b8d14a755/cabal-testsuite/PackageTests/Regression/T6906/cabal.test.hs
haskell
import Test.Cabal.Prelude main = cabalTest $ do win <- isWindows ghcsWithMaxPathIssue <- isGhcVersion "< 8.6.5" expectBrokenIf (win && ghcsWithMaxPathIssue) 6271 $ do res <- recordMode DoNotRecord $ cabalG' ["--config=cabal.config"] "v2-install" ["-v3"] assertOutputContains "creating file with the...
8a855307fd8e2551261557ae91c88fc6dd52f1732fc540d00a52cb0bdd25e6be
gorillalabs/sparkling
core_test.clj
(ns sparkling.core-test (:use clojure.test) (:require [clojure.set] [sparkling.core :as s] [sparkling.conf :as conf] ;; this is to have the reader macro sparkling/tuple defined [sparkling.destructuring :as sd] [sparkling.testutils :refer :all] )) ...
null
https://raw.githubusercontent.com/gorillalabs/sparkling/ffedcc70fd46bf1b48405be8b1f5a1e1c4f9f578/test/sparkling/core_test.clj
clojure
this is to have the reader macro sparkling/tuple defined keep items in rdd where :b-entries are keys in other-1
(ns sparkling.core-test (:use clojure.test) (:require [clojure.set] [sparkling.core :as s] [sparkling.conf :as conf] [sparkling.destructuring :as sd] [sparkling.testutils :refer :all] )) (deftest lookup (s/with-context c (-> (conf/spark-conf...
4aeb99255bc2067710f0e4af0b5b25ed25d26d39b028336f6934d11acab822a2
jwiegley/pipes-files
Directory.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # {-# LANGUAGE RankNTypes #-} module Pipes.Files.Directory where import Control.Applicative import Control.Exception (IOException) import qualified Control.Exception as E...
null
https://raw.githubusercontent.com/jwiegley/pipes-files/30f8e3e68815b4e93a648f75b082bf60147553b6/Pipes/Files/Directory.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | @openDirStream dir@ calls @opendir@ to obtain a directory stream for @dir@. | @readDirStream dp@ calls @readdir@ to obtain the next directory entry @d_name@ member of that structure. question without performing a stat call. Thi...
# LANGUAGE ForeignFunctionInterface # # LANGUAGE TupleSections # module Pipes.Files.Directory where import Control.Applicative import Control.Exception (IOException) import qualified Control.Exception as E import Control.Monad import qualified Data.ByteString as B import Data.M...
8043904e4f2d8848b60c0da3da3d4dacca1b9ba5cb313c9a59a04bdf529d0136
thi-ng/geom
stl_mesh.clj
(ns thi.ng.geom.examples.svg.stl-mesh (:require [thi.ng.geom.core :as g] [thi.ng.geom.matrix :as mat] [thi.ng.geom.mesh.io :as mio] [thi.ng.geom.svg.core :as svg] [thi.ng.geom.svg.shaders :as shader] [thi.ng.geom.svg.renderer :as render] [thi.ng.math.core :as m] [clojure.java.io :as io])) (de...
null
https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/examples/svg/stl_mesh.clj
clojure
(ns thi.ng.geom.examples.svg.stl-mesh (:require [thi.ng.geom.core :as g] [thi.ng.geom.matrix :as mat] [thi.ng.geom.mesh.io :as mio] [thi.ng.geom.svg.core :as svg] [thi.ng.geom.svg.shaders :as shader] [thi.ng.geom.svg.renderer :as render] [thi.ng.math.core :as m] [clojure.java.io :as io])) (de...
684a18863ce0aa78ad322a80ddd3a6b6cfa06c55046e5e0a990fe546f0043327
henryw374/cljc.java-time
temporal_amount.clj
(ns cljc.java-time.temporal.temporal-amount (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness]) (:import [java.time.temporal TemporalAmount])) (clojure.core/defn add-to {:arglists (quote (["java.time.temporal.TemporalAmount" "java.time.tem...
null
https://raw.githubusercontent.com/henryw374/cljc.java-time/2e47e8104bc2ec7f68a01bf751a7b9a2dee391b4/src/cljc/java_time/temporal/temporal_amount.clj
clojure
(ns cljc.java-time.temporal.temporal-amount (:refer-clojure :exclude [abs get range format min max next name resolve short]) (:require [cljc.java-time.extn.calendar-awareness]) (:import [java.time.temporal TemporalAmount])) (clojure.core/defn add-to {:arglists (quote (["java.time.temporal.TemporalAmount" "java.time.tem...
0a88dfa95253048796e2043152ea4bc5182d0912650f39d8512777625637569e
lexi-lambda/envy
reader.rkt
#lang s-exp syntax/module-reader envy/s-exp/lang/language #:read r:read #:read-syntax r:read-syntax (require (prefix-in r: typed-racket/typed-reader))
null
https://raw.githubusercontent.com/lexi-lambda/envy/0adfe762ea5ee9237ec67e15b1880a8767060ffb/envy/s-exp/lang/reader.rkt
racket
#lang s-exp syntax/module-reader envy/s-exp/lang/language #:read r:read #:read-syntax r:read-syntax (require (prefix-in r: typed-racket/typed-reader))
9136c2d53d735b80695925feb6cd6b38df65f3cc0cf95b15c63b5cd1995f959c
theodormoroianu/SecondYearCourses
LambdaChurch_20210415170137.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170137.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
c988c2c89e91aaaebba897f4dbc838630f4436f12908c1129f4989cf3f46f00f
coord-e/mlml
when_match.ml
let () = Tester.f {| let f v = let cond = function | 1 | 2 | 3 -> true | _ -> false in match v with | x when cond x -> 42 | x when x = 10 -> 10 | _ -> 0 in print_int (f 1); print_int (f 3); print_int (f 10); print_int (f 11) |}; Tester....
null
https://raw.githubusercontent.com/coord-e/mlml/ec34b1fe8766901fab6842b790267f32b77a2861/test/when_match.ml
ocaml
let () = Tester.f {| let f v = let cond = function | 1 | 2 | 3 -> true | _ -> false in match v with | x when cond x -> 42 | x when x = 10 -> 10 | _ -> 0 in print_int (f 1); print_int (f 3); print_int (f 10); print_int (f 11) |}; Tester....
75f776aafbf148ee879ddd4e8c8ca924586808b7f8c3a44499e5ed1ee0c2b232
TyOverby/mono
implementation.ml
open Core open Async_kernel open Protocol open Implementation_types.Implementation module Expert = struct module Responder = struct type t = Expert.Responder.t = { query_id : Query_id.t ; writer : Transport.Writer.t ; mutable responded : bool } [@@deriving sexp_of] let create que...
null
https://raw.githubusercontent.com/TyOverby/mono/5ce4569fc6edf6564d29d37b66d455549df1e497/vendor/janestreet-async_rpc_kernel/src/implementation.ml
ocaml
'init can be an error or an initial state
open Core open Async_kernel open Protocol open Implementation_types.Implementation module Expert = struct module Responder = struct type t = Expert.Responder.t = { query_id : Query_id.t ; writer : Transport.Writer.t ; mutable responded : bool } [@@deriving sexp_of] let create que...
a6e9026de24783c6fbbd9d5077ae4cc9dfb801b79609d9ad2b11eb5bf76e02b7
MLstate/opalang
buf.mli
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/buf.mli
ocaml
* This type is concrete * * Global flag for resize * * Common to String and Buffer * * Compatibility with String * Compatibility with Buffer * * Specifics *
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
df7d0d5f0adc1d3f291856d22ef37d449d00cf2dee5b4c84dfc73524dc8b4d57
finnishtransportagency/harja
sampo_api_vienti_test.clj
(ns harja.palvelin.integraatiot.vayla-rest.sampo-api-vienti-test (:require [clojure.test :refer :all] [clojure.string :as str] [com.stuartsierra.component :as component] [harja.integraatio :as integraatio] [harja.palvelin.integraatiot.integraatiopisteet.http :as integra...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/0fc7826688b1408a04dfb92c509ba0114cb79d68/test/clj/harja/palvelin/integraatiot/vayla_rest/sampo_api_vienti_test.clj
clojure
")))
(ns harja.palvelin.integraatiot.vayla-rest.sampo-api-vienti-test (:require [clojure.test :refer :all] [clojure.string :as str] [com.stuartsierra.component :as component] [harja.integraatio :as integraatio] [harja.palvelin.integraatiot.integraatiopisteet.http :as integra...
878c2d3017477b3c2d69843c79fc77bfb8751a31e8d86314d28ec3dca8804591
falgon/htcc
Function.hs
# LANGUAGE BangPatterns , LambdaCase , OverloadedStrings , ScopedTypeVariables , TupleSections # TupleSections #-} | Module : Htcc . . Parsing . Global . Function Description : The C languge parser and AST constructor Copyright : ( c ) roki , 2019 License : MIT Maint...
null
https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/Parser/Parsing/Global/Function.hs
haskell
# SOURCE # # SOURCE # | \[ \begin{array}{ccc} \end{array} \] for a function declaration -- TODO: read types of parameters and register them for a function definition About @t'@: An array of type T is equivalent to a pointer of type T in the context of function parameters. Forbid void to return a value in a re...
# LANGUAGE BangPatterns , LambdaCase , OverloadedStrings , ScopedTypeVariables , TupleSections # TupleSections #-} | Module : Htcc . . Parsing . Global . Function Description : The C languge parser and AST constructor Copyright : ( c ) roki , 2019 License : MIT Maint...
dad42fe5f1cfaddab8e9e56e4db9f37b4be4282017f562df42f37b00659758f8
vikram/lisplibraries
init-session.lisp
(in-package :weblocks-elephant-demo) ;; Define our application (defwebapp weblocks-demo :description "A web application based on Weblocks" :init-user-session 'init-user-session :dependencies '((:stylesheet "suggest"))) ;; ;; Application dependencies ( setf * application - public - dependencies * ;;...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/examples/weblocks-elephant-demo/src/init-session.lisp
lisp
Define our application ;; Application dependencies (append (public-files-relative-paths '(:stylesheet . "suggest")) *application-public-dependencies*)) Define callback function to initialize new sessions. The function sets up a continuation flow, and renders the initial page. seen on all p...
(in-package :weblocks-elephant-demo) (defwebapp weblocks-demo :description "A web application based on Weblocks" :init-user-session 'init-user-session :dependencies '((:stylesheet "suggest"))) ( setf * application - public - dependencies * After the initial page answers , INIT - USER - SESSION s...
811fb538c42a091348036ada4987c10c614d50a564f249968183f1f96370699d
robert-stuttaford/bridge
api_test.clj
(ns bridge.person.api-test (:require [bridge.person.api :as person.api] [bridge.person.data :as person.data] [bridge.person.schema :as person.schema] [bridge.test.fixtures :as fixtures :refer [TEST-PERSON-ID]] [bridge.test.util :refer [conn db test-setup with-database]]...
null
https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/test/bridge/person/api_test.clj
clojure
(ns bridge.person.api-test (:require [bridge.person.api :as person.api] [bridge.person.data :as person.data] [bridge.person.schema :as person.schema] [bridge.test.fixtures :as fixtures :refer [TEST-PERSON-ID]] [bridge.test.util :refer [conn db test-setup with-database]]...
402e05ae518e1228272b92907a54d41d7122cc7e0450757242922e4d4152f2da
part-cw/lambdanative
cgi#.scm
(##namespace ("" cgi-serve cgi-parse-query cgi-parse-all-queries cgi-build-environment )) eof
null
https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/cgi/cgi%23.scm
scheme
(##namespace ("" cgi-serve cgi-parse-query cgi-parse-all-queries cgi-build-environment )) eof
2f93cd6ed01d2ebb1dc29e5da37705baf1c2ebb31a65c348a46be85781166083
godfat/sandbox
Main.hs
For Facebook Hacker Cup 's Double Squares A quick and dirty solution for Haskell -- too slow to process the input file :x -- I'm too lazy to optimize it... ghc Main.hs ./a.out < input.txt p.s . I think the answer for 0 is 0 , not 1 . module Main where import Data.List (unfoldr, intercalate) candidates ...
null
https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/sq/Main.hs
haskell
too slow to process the input file :x I'm too lazy to optimize it...
For Facebook Hacker Cup 's Double Squares A quick and dirty solution for Haskell ghc Main.hs ./a.out < input.txt p.s . I think the answer for 0 is 0 , not 1 . module Main where import Data.List (unfoldr, intercalate) candidates :: Int -> [Int] candidates n = unfoldr (\x -> if (head x)^2 <= n then ...
423cd0e6f957c792876ee8bc44abd01ef5e00d66a69c25c8b9f1b449e1a294ba
xapi-project/message-switch
fe_systemctl.mli
* Copyright ( C ) 2019 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in fi...
null
https://raw.githubusercontent.com/xapi-project/message-switch/5b5d2d75dfa7e6422d6235e9ab9d2027c11a6ca5/forkexecd/lib/fe_systemctl.mli
ocaml
* [is_active ~service] checks whether the [service] is still running * [shows ~service] retrieves the exitcodes and PIDs of the specified [service] * [exists ~service] checks whether [service] still exists in systemd. * Note: stopped transient services get cleaned up and this will return false
* Copyright ( C ) 2019 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in fi...
ad72ed819c1a5b1c729410edc7d7e8e6457eba402346322503c019692f9dc9e0
expipiplus1/vulkan
VK_KHR_get_memory_requirements2.hs
{-# language CPP #-} -- | = Name -- -- VK_KHR_get_memory_requirements2 - device extension -- -- == VK_KHR_get_memory_requirements2 -- -- [__Name String__] -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 147 -- -- [__Revision__] 1 -- -- [__Extension and Versi...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_KHR_get_memory_requirements2.hs
haskell
# language CPP # | = Name VK_KHR_get_memory_requirements2 - device extension == VK_KHR_get_memory_requirements2 [__Name String__] [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] [__Deprecation state__] - /Prom...
147 1 - Requires support for Vulkan 1.0 - 2017 - 09 - 05 - Promoted to Vulkan 1.1 Core - , Intel - , NVIDIA - , Google extensions , without introducing any further entry points . The Vulkan 1.0 ' Vulkan . Core10.MemoryManagement ...
632b0daf8e91bdd9a7d055cfb2bb447740a88e8015e5966f62161e74dc7e1c63
haskellfoundation/error-message-index
Main.hs
f Nothing x = x f (Just y) x = y + x
null
https://raw.githubusercontent.com/haskellfoundation/error-message-index/c06de0da265bd00f48d6cde6b40104260c68c7be/message-index/messages/GHC-91938/example1/after/Main.hs
haskell
f Nothing x = x f (Just y) x = y + x
15afcd50ad2202c7bf2955445ad4d86493aae159c2ab1ab34eb09a24ed25799e
racket/racket7
list-ish.rkt
#lang racket/base (require (for-syntax racket/base)) ;; A `list-ish` is like a `list`, but it can be an "improper list" that ;; doesn't end in null. Using `cons-ish` on an element and `null` returns just the element . A ` list - ish ` makes sense when lists of length 1 ;; would otherwise be common, but only when ele...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/common/list-ish.rkt
racket
A `list-ish` is like a `list`, but it can be an "improper list" that doesn't end in null. Using `cons-ish` on an element and `null` returns would otherwise be common, but only when elements are never lists. outer bindings outer check loop bindings pos check inner bindings pre guard post guard loop args
#lang racket/base (require (for-syntax racket/base)) just the element . A ` list - ish ` makes sense when lists of length 1 (provide cons-ish in-list-ish) (define (cons-ish a b) (if (null? b) a (cons a b))) (define-sequence-syntax in-list-ish (lambda (stx) (raise-syntax-error #f "only all...
a63831ec3bdac68b4d1bd28e514694a3819f1353d39233101ab789bd625adfd9
FranklinChen/learn-you-some-erlang
erlcount.erl
-module(erlcount). -behaviour(application). -export([start/2, stop/1]). start(normal, _Args) -> erlcount_sup:start_link(). stop(_State) -> ok.
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/erlcount-1.0/src/erlcount.erl
erlang
-module(erlcount). -behaviour(application). -export([start/2, stop/1]). start(normal, _Args) -> erlcount_sup:start_link(). stop(_State) -> ok.
2e2897b0f84105925fda6e033e72a6fa4c0a57149e5619ba5083fcba6b091f09
davnils/spoty
Albums.hs
{-# LANGUAGE OverloadedStrings #-} import Control.Lens import Pipes import qualified Pipes.Prelude as P import Utils.Spoty -- | Stream all albums in constant space and print the names. main = runEffect $ getArtistAlbums artist >-> P.map (view name) >-> P.print where artist = "0LcJLq...
null
https://raw.githubusercontent.com/davnils/spoty/95a0ec3fa89f67c86ef0204f2345c5e2d73ca261/Examples/Albums.hs
haskell
# LANGUAGE OverloadedStrings # | Stream all albums in constant space and print the names.
import Control.Lens import Pipes import qualified Pipes.Prelude as P import Utils.Spoty main = runEffect $ getArtistAlbums artist >-> P.map (view name) >-> P.print where artist = "0LcJLqbBmaGUft1e9Mm8HV"
66cb6f2d7802793ef3af4eb15ee2ff588f777794af446447ad7b917fa199430d
AccelerateHS/accelerate-llvm
SMP.hs
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Module : Control.Parallel.Meta.Resource.SMP Copyright : [ 2014 .. 2020 ] The Accelerate Team -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) -- -- This module im...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/accelerate-llvm/icebox/Control/Parallel/Meta/Resource/SMP.hs
haskell
# LANGUAGE BangPatterns # # OPTIONS_HADDOCK hide # | Module : Control.Parallel.Meta.Resource.SMP License : BSD3 Stability : experimental This module implements a resource for SMP parallelism. It is suitable as a base for combining a bunch of resources that can steal cheaply from each other. <-par>...
Copyright : [ 2014 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) Inspired by the meta - par package . This package has a BSD license . module Control.Parallel.Meta.Resource.SMP ( mkResource, mkWorkSearch, ) where import Control.Parallel.Meta impo...
4978767385986a8fa541ee260073d0353fba8b714eabc726ea740719722c5d3d
schlepfilter/frp
document.cljs
(ns frp.document (:require [frp.browser :as browser])) (browser/defevent visibilitychange (browser/make-convert-merge js/document)) (browser/defbehavior hidden visibilitychange) (browser/defbehavior visibility-state visibilitychange)
null
https://raw.githubusercontent.com/schlepfilter/frp/4a889f0aefd3aa17371fe1f0cdfabdad01fece8f/src/frp/document.cljs
clojure
(ns frp.document (:require [frp.browser :as browser])) (browser/defevent visibilitychange (browser/make-convert-merge js/document)) (browser/defbehavior hidden visibilitychange) (browser/defbehavior visibility-state visibilitychange)
fb429796819eca10f708cf74b56313e848739616e4d991ff3c98ae7e8f965100
ocaml-sf/learn-ocaml-corpus
foreach_product.ml
let is_empty s = s.length = 0 let empty = let length = 0 and get _ = raise OutOfBounds and foreach _k = () in { length; get; foreach } let singleton x = let length = 1 and get i = if i = 0 then x else raise OutOfBounds and foreach k = k x in { length; get; foreach } let sum s1 s2 = let length = ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/symbolic_sequences_objects/wrong/foreach_product.ml
ocaml
wrong Such a division could occur on an out-of-bounds access.
let is_empty s = s.length = 0 let empty = let length = 0 and get _ = raise OutOfBounds and foreach _k = () in { length; get; foreach } let singleton x = let length = 1 and get i = if i = 0 then x else raise OutOfBounds and foreach k = k x in { length; get; foreach } let sum s1 s2 = let length = ...
8a4522ed9d2f1ec488cd80ac7da239f38c7c2191a712d0025ff348cc347c8c5b
Decentralized-Pictures/T4L3NT
test_round_repr.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/test/test_round_repr.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
cc0e2714737812fedf8dfd204b1c847b12abe94f41a5177b1fe95cc7065972a2
greglook/whidbey
types.clj
(ns whidbey.types "Rendering extensions for various custom types such as byte arrays and URI strings." (:import java.net.URI java.util.Base64)) (defn bin-str "Renders a byte array as a base-64 encoded string." [^bytes bin] (-> (Base64/getUrlEncoder) (.withoutPadding) (.encodeToString b...
null
https://raw.githubusercontent.com/greglook/whidbey/b95611d23abfa2c283b81451afc35936431203db/src/whidbey/types.clj
clojure
(ns whidbey.types "Rendering extensions for various custom types such as byte arrays and URI strings." (:import java.net.URI java.util.Base64)) (defn bin-str "Renders a byte array as a base-64 encoded string." [^bytes bin] (-> (Base64/getUrlEncoder) (.withoutPadding) (.encodeToString b...
15f07dcf48c476a6dcc8647e25c9ca8af8b40b6b11422c8756c713eca43df204
danielsz/etsy-clojure-api
listing_image.clj
(ns etsy.api.listing-image (:require [etsy.client :refer [api-call]])) ;; (defn find-all-listing-images "Retrieves a set of ListingImage objects associated to a Listing." [listing-id] (api-call :GET (str "/listings/" listing-id "/images")))
null
https://raw.githubusercontent.com/danielsz/etsy-clojure-api/fb443f63cb8da53de3863ee98434e105e9bd93db/src/etsy/api/listing_image.clj
clojure
(ns etsy.api.listing-image (:require [etsy.client :refer [api-call]])) (defn find-all-listing-images "Retrieves a set of ListingImage objects associated to a Listing." [listing-id] (api-call :GET (str "/listings/" listing-id "/images")))
5621b49ec2035196ebadd6f2f77232b88ed248ecd815786ce62525480b1d8ad5
richmit/mjrcalc
tst-chk.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file tst-chk.lisp @author < > ;; @brief Unit tes...
null
https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/tst-chk.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file tst-chk.lisp @brief Unit tests.@EOL @std Common Lisp @see use-chk.lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditi...
@author < > @parblock Copyright ( c ) 2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions in binary form must reproduce the above copyright notice , this list...
5044a75ef4f0a45a00d798e0897c386464928f7c3583f46d8a14d39882f16bd9
WorksHub/client
subs.cljc
(ns wh.company.listing.subs (:require [re-frame.core :refer [reg-sub reg-sub-raw]] [wh.re-frame.subs :refer [<sub reaction]] [wh.company.listing.db :as listing] [wh.components.pagination :as pagination] [wh.util :as util] [clojure.string :as str] ...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common-pages/src/wh/company/listing/subs.cljc
clojure
(ns wh.company.listing.subs (:require [re-frame.core :refer [reg-sub reg-sub-raw]] [wh.re-frame.subs :refer [<sub reaction]] [wh.company.listing.db :as listing] [wh.components.pagination :as pagination] [wh.util :as util] [clojure.string :as str] ...
31832ebc0207e514073170fccda263dcd8592ce237312e45f2701189ee21ee85
callum-oakley/advent-of-code
03.clj
(ns aoc.2020.03 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (def parse str/split-lines) (defn path [dy dx height width] (for [i (range) :let [y (* dy i) x (* dx i)] :while (< y height)] [y (mod x width)])) (defn count-trees [grid dy dx] (->> (path dy dx (co...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/e24c126fdfa4852c1380f5d1b1fda96da1ebe553/src/aoc/2020/03.clj
clojure
(ns aoc.2020.03 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (def parse str/split-lines) (defn path [dy dx height width] (for [i (range) :let [y (* dy i) x (* dx i)] :while (< y height)] [y (mod x width)])) (defn count-trees [grid dy dx] (->> (path dy dx (co...
cf4da804cc14c863a9de253bc76d787a70679475ef34c6f4702d8f1c3bd050b5
repl-acement/repl-acement
core_specs.cljc
(ns replacement.server.core-specs (:require [clojure.spec.alpha :as s] [clojure.core.specs.alpha :as specs])) (s/def ::ns-form (s/cat :ns-sym (s/and symbol? #(= 'ns %)) :ns-args ::specs/ns-form)) (s/def ::defn (s/cat :defn-type (s/and symbol? #(or (= 'defn %) ...
null
https://raw.githubusercontent.com/repl-acement/repl-acement/da245e2987bdaaaf1823d7479d0e8f878bb51b32/repl-server/replacement/server/core_specs.cljc
clojure
from The cool thing is that we can monkey patch :defn-args so that unform and conform are fully inlined.
(ns replacement.server.core-specs (:require [clojure.spec.alpha :as s] [clojure.core.specs.alpha :as specs])) (s/def ::ns-form (s/cat :ns-sym (s/and symbol? #(= 'ns %)) :ns-args ::specs/ns-form)) (s/def ::defn (s/cat :defn-type (s/and symbol? #(or (= 'defn %) ...
c090bd350a18672015e16fd15d822aad66512219351f4acbfd4560d565afa39a
leksah/leksah-server
Collector.hs
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # # LANGUAGE TupleSections # # OPTIONS_GHC -fno - warn - type - defaults # ----------------------------------------------------------------------------- -- -- Module : Main Copyright : 2007 - 2011 ...
null
https://raw.githubusercontent.com/leksah/leksah-server/d4b735c17a36123dc97f79fabf1e9310d74984a6/main/Collector.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- Module : Main License : GPL Maintainer : Stability : provisional Portability : | --------------------------------------------------------------------------- ----------------------------...
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # # LANGUAGE LambdaCase # # LANGUAGE TupleSections # # OPTIONS_GHC -fno - warn - type - defaults # Copyright : 2007 - 2011 , module Main ( main , collectPackage ) where import Prelude () import Prelude.Compat import System.Console.GetOpt (ArgDescr...
b95573e7476a8521fa2cdd37be3ba63047cfccf655f32ccdf313b087715e2ae9
verystable/warframe-autobuilder
ProcDamages.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE RankNTypes #-} -- | Module : ComprehensiveWeapon . ProcDamages -- Maintainer : -- Stability : experimental -- -- This module contains functions that calculate the proc damages. -- Each damage type will take a build and return a proc's damage -- delt by the...
null
https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/ComprehensiveWeapon/ProcDamages.hs
haskell
# LANGUAGE RankNTypes # | Maintainer : Stability : experimental This module contains functions that calculate the proc damages. Each damage type will take a build and return a proc's damage delt by the weapon with that build. | Slash Proc Damage # INLINE getColdProcDamage #
# LANGUAGE NoImplicitPrelude # Module : ComprehensiveWeapon . ProcDamages module ComprehensiveWeapon.ProcDamages where import ClassyPrelude import ComprehensiveWeapon.ModMultiplierFunctions.ColdModMultiplier import ComprehensiveWeapon.ModMultiplierFunctions.ElectricityModMultip...
e1e307eda42280789cb4d5cdc3a42a891730bf52cb3e0f997c91291bf5d8659d
d-cent/mooncake
schedule.clj
(ns mooncake.test.schedule (:require [midje.sweet :refer :all] [mooncake.schedule :as s] [clj-time.core :as time])) (fact "check that a function can be scheduled to run every x seconds" (let [counter (atom 0) f (fn [time] (swap! counter inc)) interval 1 ...
null
https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/test/mooncake/test/schedule.clj
clojure
(ns mooncake.test.schedule (:require [midje.sweet :refer :all] [mooncake.schedule :as s] [clj-time.core :as time])) (fact "check that a function can be scheduled to run every x seconds" (let [counter (atom 0) f (fn [time] (swap! counter inc)) interval 1 ...
24cbcdc821208dd0ba0ea2bca78985916aa74064edc9d6e8d0da4c40f02ea5d1
roehst/tapl-implementations
core.mli
module Core Core typechecking and evaluation functions Core typechecking and evaluation functions *) open Syntax open Support.Error val typeof : context -> term -> ty val subtype : context -> ty -> ty -> bool val tyeqv : context -> ty -> ty -> bool val kindof : context -> ty -> kind type store val empt...
null
https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/fullfomsubref/core.mli
ocaml
module Core Core typechecking and evaluation functions Core typechecking and evaluation functions *) open Syntax open Support.Error val typeof : context -> term -> ty val subtype : context -> ty -> ty -> bool val tyeqv : context -> ty -> ty -> bool val kindof : context -> ty -> kind type store val empt...
a960962592b9d00b43bb924bf4540b84df9a326c1e7fbe05e3a15dd4e06be7c4
well-typed-lightbulbs/ocaml-esp32
ocaml_flags.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/ocamltest/ocaml_flags.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2018 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let stdlib ocamlsrcdir = let stdlib_path = Ocaml_directories.stdlib ocamlsrcdir in "-nostdlib -I " ^ stdli...
b614236ebd5edcb1c78cf8768e8c3f29d424191c330f9353b945fd0fe0eb805f
crategus/cl-cffi-gtk
pango.script.lisp
;;; ---------------------------------------------------------------------------- pango.script.lisp ;;; ;;; The documentation of this file is taken from the Pango Reference Manual for Pango 1.48 and modified to document the Lisp binding to the Pango ;;; library. See <>. The API documentation of the Lisp ;;; binding ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/pango/pango.script.lisp
lisp
---------------------------------------------------------------------------- The documentation of this file is taken from the Pango Reference Manual library. See <>. The API documentation of the Lisp binding is available at <-cffi-gtk/>. This program is free software: you can redistribute it and/or modify it u...
pango.script.lisp for Pango 1.48 and modified to document the Lisp binding to the Pango Copyright ( C ) 2012 - 2020 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for use GNU Lesser General Public License for more detai...
5e338fc68b82641cb5e1b0a4f47405db461ca043bb4800e48a1d3148e7306c30
AshleyYakeley/Truth
Module.hs
module Test.Module ( testModule ) where import Shapes import Test.RunScript testModule :: TestTree testModule = runScriptTestTree $ tDecls ["using Function", "using Action", "using Entity"] $ tGroup "module" [ tGroup "none" [ testExpectSuccess "return ()...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/f567d19253bb471cbd8c39095fb414229b27706a/Pinafore/pinafore-language/test/Test/Module.hs
haskell
module Test.Module ( testModule ) where import Shapes import Test.RunScript testModule :: TestTree testModule = runScriptTestTree $ tDecls ["using Function", "using Action", "using Entity"] $ tGroup "module" [ tGroup "none" [ testExpectSuccess "return ()...
edb038c2a586dc7605e5729218b4e81aa62749ab8ed5cfc9c70a4279ff48f884
helium/miner
miner_jsonrpc_snapshot.erl
-module(miner_jsonrpc_snapshot). -include("miner_jsonrpc.hrl"). -behavior(miner_jsonrpc_handler). -export([handle_rpc/2]). %% %% jsonrpc_handler %% %% TODO: add an optional start block height parameter handle_rpc(<<"snapshot_list">>, []) -> Chain = blockchain_worker:blockchain(), case blockchain:find_last_...
null
https://raw.githubusercontent.com/helium/miner/933c2b3e3f357263f14c13ad2dfbaeb02c0ae39a/src/jsonrpc/miner_jsonrpc_snapshot.erl
erlang
jsonrpc_handler TODO: add an optional start block height parameter
-module(miner_jsonrpc_snapshot). -include("miner_jsonrpc.hrl"). -behavior(miner_jsonrpc_handler). -export([handle_rpc/2]). handle_rpc(<<"snapshot_list">>, []) -> Chain = blockchain_worker:blockchain(), case blockchain:find_last_snapshots(Chain, 5) of undefined -> ?jsonrpc_error(no_snaps...
cd58c55ce3ea0bffe3a2fea0df9b80598fd9842b0ab448253f2602ba9eec35ce
S8A/htdp-exercises
ex279.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex279) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex279.rkt
racket
about the language level of this file in a form that our tools can easily process. Decide which of the following phrases are legal lambda expressions: It's not a legal lambda function because it doesn't take any arguments. value. the other one. It's not a legal lambda function because there are no arguments betw...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex279) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (lambda (x y) (x y y)) It 's a legal lambda function...
85db9a954266890ca714fe7eb92c61d45f9bae531e21bab64ea798f3246fe7b9
basho/riak_kv
riak_kv_put_fsm.erl
%% ------------------------------------------------------------------- %% riak_put_fsm : coordination of Riak PUT requests %% 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 thi...
null
https://raw.githubusercontent.com/basho/riak_kv/174a73711a82f907b3b336f0e7a6d935d31a61ca/src/riak_kv_put_fsm.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 permissi...
riak_put_fsm : coordination of Riak PUT requests 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 ...
b0507ecec03a41d7f2233370377bd1c9d433de0de3c37027eaac052306756083
kompendium-ano/pegnetd-haskell-client
RichEntry.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} module PegNet.RPC.Types.RichEntry where import Control.Applicative import Control.Mona...
null
https://raw.githubusercontent.com/kompendium-ano/pegnetd-haskell-client/b681ce374b554bb3b50e9ee44391b1cbe42f4768/src/PegNet/RPC/Types/RichEntry.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # ------------------------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # module PegNet.RPC.Types.RichEntry where import Control.Applicative import Control.Monad (forM_, join, mzero) import Data.Aeson (FromJSON (..), ToJSO...
0d07633687ba4ab7b31d089a6aca9344a63a764589180d24624730d6edbaa26f
open-telemetry/opentelemetry-erlang
otel_tracer_noop.erl
%%%------------------------------------------------------------------------ Copyright 2019 , OpenTelemetry Authors 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 %% %% Unl...
null
https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/65852669705aa8ec6d0a8e600e6c5b57376a0a9a/apps/opentelemetry_api/src/otel_tracer_noop.erl
erlang
------------------------------------------------------------------------ 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 o...
Copyright 2019 , OpenTelemetry Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(otel_tracer_noop). -behaviour(otel_tracer). -export([start_span/4, with_span/5, end_span/2, noop_sp...
970e9f4d9fa707b1c457a430adc98716b073a108bb44d42477266b928f8cb046
alexbs01/OCaml
ej33.mli
val g1 : int -> bool val g2 : int -> bool
null
https://raw.githubusercontent.com/alexbs01/OCaml/92a28522a8467d8ed87ef380b6175f1c21616f85/p03/ej33.mli
ocaml
val g1 : int -> bool val g2 : int -> bool
ee9ab487cc4011d9c76219d68526ee26df19cc33aed5e71677c914cc4bbc3507
shop-planner/shop3
p11.lisp
(IN-PACKAGE :SHOP-USER) (DEFPROBLEM STRIPS-SAT-X-1 ((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0) (SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2) (INSTRUMENT INSTRUMENT3) (SATELLITE SATELLITE2) (INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5) (INSTRUMENT INSTRUMENT6) (SATELLITE ...
null
https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/satellite/strips/p11.lisp
lisp
(IN-PACKAGE :SHOP-USER) (DEFPROBLEM STRIPS-SAT-X-1 ((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0) (SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2) (INSTRUMENT INSTRUMENT3) (SATELLITE SATELLITE2) (INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5) (INSTRUMENT INSTRUMENT6) (SATELLITE ...
edd54b069f72c377a375c1fbf2121a9f378564cb7270377e7a59b4581ec46a62
BumblebeeBat/PinkFairy
commit_decision_tx.erl
-module(commit_decision_tx). -export([]).
null
https://raw.githubusercontent.com/BumblebeeBat/PinkFairy/33d595d735d6b1119732984e894ed6aea2b6cb6a/src/txs/commit_decision_tx.erl
erlang
-module(commit_decision_tx). -export([]).
0be5b801fd428c1aa241c2e11c9aacec413546edab29e775dd87167836670016
sweirich/hs-inferno
InfiniteArray.hs
{-- This module implements infinite arrays, that is, arrays that grow transparently upon demand. -} module Language.Inferno.InfiniteArray where -- import Data.Array.IO import Data . IORef import Data.Array.MArray import Control.Monad.Ref import Control.Monad data InfiniteArray m ra a = InfiniteArray { def ...
null
https://raw.githubusercontent.com/sweirich/hs-inferno/08f6c514a695463332b69e5315b324802687328f/src/Language/Inferno/Generic/InfiniteArray.hs
haskell
- This module implements infinite arrays, that is, arrays that grow transparently upon demand. import Data.Array.IO -------------------------------------------------
module Language.Inferno.InfiniteArray where import Data . IORef import Data.Array.MArray import Control.Monad.Ref import Control.Monad data InfiniteArray m ra a = InfiniteArray { def :: a, table :: (Ref m) (ra Int a) } make :: (MonadRef m, MArray ra a m) => Int -> a -> m (InfiniteArray m ra a) make defaul...
228e25375757ed58efc25295f6cd1ef7ec2db011cb57f5f3e9d931cc7b0a093b
clojure/clojurescript
map_entry_test.cljs
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 ;; the t...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/test/cljs/cljs/map_entry_test.cljs
clojure
The use and distribution terms for this software are covered by the 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 this notice, or any other, from this software.
Copyright ( c ) . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns cljs.map-entry-test (:refer-clojure :exclude [iter]) (:require [cljs.test :refer-macros [deftest testing is are]])) (defn map-entry-interface-tests "Tests that a MapEntry implements all the expected interfaces correctly. ...
ffd2dc0cf1c76955999b4c21c71e4f1ae4b92032d330d8b4bbf76c2cfd1b8f0a
Clojure2D/clojure2d-examples
hittable.clj
(ns rt4.in-one-weekend.ch11.hittable (:require [fastmath.core :as m] [fastmath.vector :as v] [rt4.in-one-weekend.ch11.interval :as interval])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol HittableProto (hit [object r ray-t...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch11/hittable.clj
clojure
(ns rt4.in-one-weekend.ch11.hittable (:require [fastmath.core :as m] [fastmath.vector :as v] [rt4.in-one-weekend.ch11.interval :as interval])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol HittableProto (hit [object r ray-t...
1a968e42870838bb2ed09053eed2c1040c6c78805c8a03f2e0ae9f9e551960fc
ahrefs/ocaml-ahrocksdb
ffi_stubgen.ml
let prefix = "rocksdb_stub" let prologue = " #include <c.h> " let () = let generate_ml, generate_c = ref false, ref false in let () = Arg.(parse [ ("-ml", Set generate_ml, "Generate ML"); ("-c", Set generate_c, "Generate C") ]) (fun _ -> failwith "unexpected anonymous argument") "...
null
https://raw.githubusercontent.com/ahrefs/ocaml-ahrocksdb/bc0475cbfa9daa3a97c2e948f5a8cbe30c5b4828/ffi/stubgen/ffi_stubgen.ml
ocaml
let prefix = "rocksdb_stub" let prologue = " #include <c.h> " let () = let generate_ml, generate_c = ref false, ref false in let () = Arg.(parse [ ("-ml", Set generate_ml, "Generate ML"); ("-c", Set generate_c, "Generate C") ]) (fun _ -> failwith "unexpected anonymous argument") "...
497d579af9741945263e247f5811c39759655c9c777080524bd58398f917c10d
clojure-interop/java-jdk
Utilities.clj
(ns javax.swing.text.Utilities "A collection of methods to deal with various text related activities." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.text Utilities])) (defn ->utilities "Constructor." (^Utilities [] (new Utilities ))) (defn *get-previous-word "Determine the s...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/Utilities.clj
clojure
(ns javax.swing.text.Utilities "A collection of methods to deal with various text related activities." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.text Utilities])) (defn ->utilities "Constructor." (^Utilities [] (new Utilities ))) (defn *get-previous-word "Determine the s...
a21a2cca8e91b6f3f5ae10b17f302f1e45b544e39d577e06b6e710284af7c11f
laser/cis-194-spring-2017
Editor.hs
# LANGUAGE GeneralizedNewtypeDeriving , ScopedTypeVariables # module Homework.Week07.Editor where import System.IO import Homework.Week07.Buffer import Control.Exception import Control.Monad.State import Control.Applicative import Control.Arrow (first, second) import Data.Char import Data.List -- Editor co...
null
https://raw.githubusercontent.com/laser/cis-194-spring-2017/c6023cd611532c9bbd77eb97c14db360bfd5111c/src/Homework/Week07/Editor.hs
haskell
Editor commands Editor monad Utility functions do nothing, main loop notices this and quits
# LANGUAGE GeneralizedNewtypeDeriving , ScopedTypeVariables # module Homework.Week07.Editor where import System.IO import Homework.Week07.Buffer import Control.Exception import Control.Monad.State import Control.Applicative import Control.Arrow (first, second) import Data.Char import Data.List data Comman...
f2a82910837c32026a41b90a2e1dd1c8961fca06f8109233138bc63e09f0429e
ocaml/ocaml-lsp
typescript.mli
open Import val of_metamodel : Metamodel.t -> Ts_types.Unresolved.t list val resolve_all : Ts_types.Unresolved.t list -> Ts_types.Resolved.t list * Ts_types.Ident.t String.Map.t
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/dabb9118253ee518cc755a31e594940b9f970f3d/lsp/bin/typescript/typescript.mli
ocaml
open Import val of_metamodel : Metamodel.t -> Ts_types.Unresolved.t list val resolve_all : Ts_types.Unresolved.t list -> Ts_types.Resolved.t list * Ts_types.Ident.t String.Map.t
0942b22bb9832ddc2298aa2cde58d1b1983ce40f539dbd15003e48f99b39576b
tweag/lagoon
Debug.hs
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -2.0 -- Unless required by applicable law or agreed to in writing, software distributed under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/server/src/Lagoon/Server/API/Debug.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 permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Server.API.Debug (server) where import Control.Concurrent import Control.Monad.IO.Class import Servant import Lagoon.Server.Handl...
9efc1d0e3c224c0114bb25e84de543509ae496a9bfdae7ffca0fdd3ab9dcdbae
FreeProving/free-compiler
Tests.hs
-- | This module contains tests for modules with the @FreeC.Frontend.Haskell@ -- prefix. module FreeC.Frontend.Haskell.Tests ( testHaskellFrontend ) where import Test.Hspec import FreeC.Frontend.Haskell.SimplifierTests -- | Test group for tests of modules with the @FreeC.Frontend.Haskell@ prefi...
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/test/FreeC/Frontend/Haskell/Tests.hs
haskell
| This module contains tests for modules with the @FreeC.Frontend.Haskell@ prefix. | Test group for tests of modules with the @FreeC.Frontend.Haskell@ prefix.
module FreeC.Frontend.Haskell.Tests ( testHaskellFrontend ) where import Test.Hspec import FreeC.Frontend.Haskell.SimplifierTests testHaskellFrontend :: Spec testHaskellFrontend = do testSimplifier
c69a1e6f4bfcf3a68d5d33ccd2ddff5a703a348d53ae99d026864c5973a9c46e
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Duration.BG.Corpus ( corpus ) where import Data.Str...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Duration/BG/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Duration.BG.Corpus ( corpus ) where import Data.String import Prelude import Duckling.Duration.Types import Duckling.Locale import Duckling.Resolve import Duckling.Testing.Types import Duckling.TimeGrain.Types (Grain(..)) corpus :: Corpus corp...
e46b6d6d718f997bb1a5cd1835f25b1cd801acae960eacfc7a2d3a5e4e0e8fe3
quil/quil-templates
quil_cljs.clj
(ns leiningen.new.quil-cljs (:require [leiningen.new.templates :refer [renderer name-to-path ->files]] [leiningen.core.main :as main])) (def render (renderer "quil-cljs")) (defn quil-cljs "ClojureScript template for Quil library." [name] (let [data {:name name :sanitized (name-to-pat...
null
https://raw.githubusercontent.com/quil/quil-templates/1af1f50ba6b90aac4d60cf256a8be03ff210388c/cljs/src/leiningen/new/quil_cljs.clj
clojure
(ns leiningen.new.quil-cljs (:require [leiningen.new.templates :refer [renderer name-to-path ->files]] [leiningen.core.main :as main])) (def render (renderer "quil-cljs")) (defn quil-cljs "ClojureScript template for Quil library." [name] (let [data {:name name :sanitized (name-to-pat...
4b6877cf2a4aaf061115d739ffbaefc25faa63e3e4f218954b38a1dd19a50708
mvaldesdeleon/aoc18
Day5Main.hs
module Day5Main where import Day5 (day5) main :: IO () main = day5
null
https://raw.githubusercontent.com/mvaldesdeleon/aoc18/1a6f6de7c482e5de264360e36f97a3c7487e2457/app/Day5Main.hs
haskell
module Day5Main where import Day5 (day5) main :: IO () main = day5
9fcfe435d0adc0ec57a8880885a7b627853c67e63500f964ba4420dedabc3a72
elastic/eui-cljs
icon_editor_ordered_list.cljs
(ns eui.icon-editor-ordered-list (:require ["@elastic/eui/lib/components/icon/assets/editor_ordered_list.js" :as eui])) (def editorOrderedList eui/icon)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_editor_ordered_list.cljs
clojure
(ns eui.icon-editor-ordered-list (:require ["@elastic/eui/lib/components/icon/assets/editor_ordered_list.js" :as eui])) (def editorOrderedList eui/icon)
673977e2f6651fb60700d825947ab3cc3160e398fd7078859a414d734d695674
froggey/Mezzano
memory.lisp
;;;; Raw memory related primitives. (in-package :mezzano.compiler.backend.x86-64) (defmacro with-memory-effective-address ((effective-address additional-inputs base-address index scale) &body body) "Generate an effective address that deals properly with scaling and constant indices." (check-type scale (member 1 2...
null
https://raw.githubusercontent.com/froggey/Mezzano/087be4fa325619f61b2e6864277aaf83c4d1d80d/compiler/backend/x86-64/memory.lisp
lisp
Raw memory related primitives. Need to use :eax and a temporary here because it's currently impossible to replace vregs with non-64-bit gprs. Using a temporary & a move before the box allows the box to safely eliminated. Need to use :eax and a temporary here because it's currently impossible to replace vregs wit...
(in-package :mezzano.compiler.backend.x86-64) (defmacro with-memory-effective-address ((effective-address additional-inputs base-address index scale) &body body) "Generate an effective address that deals properly with scaling and constant indices." (check-type scale (member 1 2 4 8)) (let ((unboxed-address (gen...
3e131efd36152a840f077034b5bcd795d8f35e6c888043df223a9a7922f8773e
ocsigen/js_of_ocaml
lwt_js.ml
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/lib/lwt/lwt_js.ml
ocaml
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
2dcb7af9be0b9f2b9a735dbba61f25ac2d339cd33b3055f3154af19711862b33
prg-titech/baccaml
toomanyargs.ml
(* thanks to *) exactly one more arguments than registers ; does not copmile ;; let x = 42 in let rec f y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 = print_i...
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/etc/example/PowerPC/toomanyargs.ml
ocaml
thanks to
exactly one more arguments than registers ; does not copmile ;; let x = 42 in let rec f y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 = print_int x in f 1 2 3 4...
4d8decfdd78c5a7ba2c0a20540add10842a024b7f74b25a2644c65c1c6924c33
tomsmalley/semantic-reflex
Transition.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module Example.Section.Transition where import Control.Lens import Control.Monad ((<=<)) import Data.Char (isUpper) import Data.Foldable (traverse_, for_) import Data.Semigroup ((<>)) import Data.Text (Te...
null
https://raw.githubusercontent.com/tomsmalley/semantic-reflex/5a973390fae1facbc4351b75ea59210d6756b8e5/semantic-reflex-example/src/Example/Section/Transition.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell #
module Example.Section.Transition where import Control.Lens import Control.Monad ((<=<)) import Data.Char (isUpper) import Data.Foldable (traverse_, for_) import Data.Semigroup ((<>)) import Data.Text (Text) import qualified Data.Text as T import Reflex.Dom.SemanticUI import Reflex.Dom.Core (text) import Example.QQ ...
0bbe6ec56d39c515f35bee1a2e0fcdc213f87967a8c420b76792c9627b066b98
jimcrayne/jhc
Parsing1.hs
x :: Int x = 0; main :: IO () main = return ()
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/Parsing1.hs
haskell
x :: Int x = 0; main :: IO () main = return ()
ab5c083e238dff11e740eb145a6c0784b3c9150c40315497e3412c90466d5503
mmottl/ocaml-prog-pats
arrow.ml
let id x = x (* Simple arrows *) module type SIMPLE_ARROW = sig type ('a, 'b) t val arr : ('a -> 'b) -> ('a, 'b) t val (>>>) : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t val app : unit -> (('a, 'b) t * 'a, 'b) t val run : ('a, 'b) t -> 'a -> 'b end module SimpleArrow = struct type ('a, 'b) t = 'a -> 'b l...
null
https://raw.githubusercontent.com/mmottl/ocaml-prog-pats/cc01cad585743798213f82996acf423335dfde5d/arrows/arrow.ml
ocaml
Simple arrows Kleisli categories Functor from arrow with apply operator to monad Functor from monads to arrows with apply operator
let id x = x module type SIMPLE_ARROW = sig type ('a, 'b) t val arr : ('a -> 'b) -> ('a, 'b) t val (>>>) : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t val app : unit -> (('a, 'b) t * 'a, 'b) t val run : ('a, 'b) t -> 'a -> 'b end module SimpleArrow = struct type ('a, 'b) t = 'a -> 'b let arr f = f let (...
29dd01577d9c6887bb774d0b0844e54153c1e17d54e7ec1ad252afc84f293600
wilkerlucio/pathom-viz
react_hooks_cards.cljs
(ns com.wsscode.pathom.viz.react-hooks-cards (:require [nubank.workspaces.card-types.fulcro3 :as ct.fulcro] [nubank.workspaces.core :as ws] [com.fulcrologic.fulcro-css.localized-dom :as dom] [com.fulcrologic.fulcro.components :as fc] [com.wsscode.pathom.viz.helpers :as ...
null
https://raw.githubusercontent.com/wilkerlucio/pathom-viz/6bed1d2adf556655892213de2d50fbe2db3c5423/src/cards/com/wsscode/pathom/viz/react_hooks_cards.cljs
clojure
other extensions
(ns com.wsscode.pathom.viz.react-hooks-cards (:require [nubank.workspaces.card-types.fulcro3 :as ct.fulcro] [nubank.workspaces.core :as ws] [com.fulcrologic.fulcro-css.localized-dom :as dom] [com.fulcrologic.fulcro.components :as fc] [com.wsscode.pathom.viz.helpers :as ...
b986ddfac35f602d42f5a822c11540ab272830ac5e52dd2e12ec81449762ec50
2600hz/kazoo
knm_converter_regex.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/converters/knm_converter_regex.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc @end ------------------------------------------------------------...
( C ) 2010 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(knm_converter_regex). -export([normalize/1, normalize/2, normalize/3 ,to_npan/1 ...
6160ac182e02af66e0244a97b02b7365c317b27dc5368e6689127332e0735f52
thoughtstem/game-engine
every-tick.rkt
#lang racket (require "../game-entities.rkt") (require posn) (provide (rename-out [new-every-tick every-tick]) (except-out (struct-out every-tick) every-tick)) (component every-tick (func)) (define (update-every-tick g e c) ((every-tick-func c) g e)) (new-component every-tick? update-ever...
null
https://raw.githubusercontent.com/thoughtstem/game-engine/98c4b9e9b8c071818e564ef7efb55465cff487a8/components/every-tick.rkt
racket
#lang racket (require "../game-entities.rkt") (require posn) (provide (rename-out [new-every-tick every-tick]) (except-out (struct-out every-tick) every-tick)) (component every-tick (func)) (define (update-every-tick g e c) ((every-tick-func c) g e)) (new-component every-tick? update-ever...
57224f0b291ec3fc4923b9180093b756a2e056e992e51a634581c88dacef59fd
adamsmasher/hs-cdb
CDB.hs
-- | Module : Database . CDB Copyright : ( c ) 2012 -- -- License : BSD-style -- A library for reading and writing CDB ( ) files . -- CDB files are immutable key - value stores , designed for extremely fast and memory - efficient construction and lookup . They can be as large as 4 GB , and --...
null
https://raw.githubusercontent.com/adamsmasher/hs-cdb/004b51ab6f5784a28a119af3c5202821678bcccc/Database/CDB.hs
haskell
| License : BSD-style at no point in their construction or use must all data be loaded into <> Using @hs-cdb@ should be fairly straightforward. Here's a simple example: > printStuff :: IO () > printStuff = do > cdb <- cdbInit "my.cdb" > let bars = cdbGetAll cdb "bar" can store...
Module : Database . CDB Copyright : ( c ) 2012 A library for reading and writing CDB ( ) files . CDB files are immutable key - value stores , designed for extremely fast and memory - efficient construction and lookup . They can be as large as 4 GB , and memory . CDB files can contain multiple v...
bcd3cdfee2c558687268eaa7bf8648e287064f8a51d647004d74cf1efefe9f41
REPROSEC/dolev-yao-star
Vale_Lib_Lists.ml
open Prims let rec (from_list_le : Prims.bool Prims.list -> Prims.int) = fun l -> match l with | [] -> Prims.int_zero | h::t -> (if h then Prims.int_one else Prims.int_zero) + ((Prims.of_int (2)) * (from_list_le t)) let (from_list_be : Prims.bool Prims.list -> Prims.int) = fun l ...
null
https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Lib_Lists.ml
ocaml
open Prims let rec (from_list_le : Prims.bool Prims.list -> Prims.int) = fun l -> match l with | [] -> Prims.int_zero | h::t -> (if h then Prims.int_one else Prims.int_zero) + ((Prims.of_int (2)) * (from_list_le t)) let (from_list_be : Prims.bool Prims.list -> Prims.int) = fun l ...
7352b7049301961bb07354df83a7544e252f7454efdd3c0f2b03763cc1d40d60
EgorDm/fp-pacman
Main.hs
module Main where import Game main :: IO () main = start
null
https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/app/Main.hs
haskell
module Main where import Game main :: IO () main = start
e95a351f43fe6b80c623f00caefc55b159d7d3e593f4be323f0b86d91e47f143
metosin/reitit
project.clj
(defproject ring-example "0.1.0-SNAPSHOT" :description "Reitit Http App with Swagger" :dependencies [[org.clojure/clojure "1.10.0"] [ring/ring-jetty-adapter "1.7.1"] [aleph "0.4.7-alpha5"] [metosin/reitit "0.6.0"]] :repl-options {:init-ns example.server})
null
https://raw.githubusercontent.com/metosin/reitit/47f1ee0c8407cdc6a6dbf7bf58b6eb682531a3f7/examples/http-swagger/project.clj
clojure
(defproject ring-example "0.1.0-SNAPSHOT" :description "Reitit Http App with Swagger" :dependencies [[org.clojure/clojure "1.10.0"] [ring/ring-jetty-adapter "1.7.1"] [aleph "0.4.7-alpha5"] [metosin/reitit "0.6.0"]] :repl-options {:init-ns example.server})
8e1cce98888cf7bd1796daa0927799544cf9bb8017a41c74c8ba8bfc6efbdf52
anuyts/menkar
Syntax.hs
module Menkar.Fine.Syntax ( module Menkar.Fine.Syntax.Substitution, module Menkar.Fine.Syntax.Syntax, module Menkar.System.Fine.Syntax ) where import Menkar.Fine.Syntax.Substitution import Menkar.Fine.Syntax.Syntax import Menkar.System.Fine.Syntax
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Menkar/Fine/Syntax.hs
haskell
module Menkar.Fine.Syntax ( module Menkar.Fine.Syntax.Substitution, module Menkar.Fine.Syntax.Syntax, module Menkar.System.Fine.Syntax ) where import Menkar.Fine.Syntax.Substitution import Menkar.Fine.Syntax.Syntax import Menkar.System.Fine.Syntax
28f6c2d3dcd225a3e6b2cbcfea6a6c360b41e97ee4c9aa0f7bc6ac4dd908e5d3
composewell/unicode-data
CharSpec.hs
# LANGUAGE BlockArguments # # LANGUAGE CPP # # LANGUAGE LambdaCase # module Unicode.CharSpec ( spec ) where import qualified Data.Char as Char import Data.Ix (Ix(..)) import Data.Maybe (isJust) import qualified Unicode.Char as UChar import qualified Unicode.Char.General.Blocks as UBlocks -- [TODO] Remove the foll...
null
https://raw.githubusercontent.com/composewell/unicode-data/3dac84295d5a0eaf620f33a7dab19943df84956b/unicode-data/test/Unicode/CharSpec.hs
haskell
[TODO] Remove the following qualified imports once isLetter and isSpace [TODO] Remove the following qualified imports once isUpper and isLower -----------+----------------+-----------------+ -----------+----------------+-----------------+ -----------+----------------+-----------------+ -----------+----------------+...
# LANGUAGE BlockArguments # # LANGUAGE CPP # # LANGUAGE LambdaCase # module Unicode.CharSpec ( spec ) where import qualified Data.Char as Char import Data.Ix (Ix(..)) import Data.Maybe (isJust) import qualified Unicode.Char as UChar import qualified Unicode.Char.General.Blocks as UBlocks are removed from...
17c38b39ded014b8807a1a76a3e29a83c60bc7c73d133f06482babf009c829ff
bennn/dissertation
jfif.rkt
#lang typed/racket ;; racket-jpeg Copyright ( C ) 2014 < wingo at pobox dot com > ;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at ;; your option)...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/jpeg/typed/jfif.rkt
racket
racket-jpeg This library is free software; you can redistribute it and/or modify either version 3 of the License , or ( at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR...
#lang typed/racket Copyright ( C ) 2014 < wingo at pobox dot com > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Readers and writers for the JPEG File Interchange Format ( JFIF ) (require "../base/typedefs.rkt" req...
68f2ed2b4f49468ddf94a907897977f173fc6c4c7632752c70a067964d197426
kuribas/aeson-diff-generic
Instances.hs
# LANGUAGE OverloadedStrings , RankNTypes , FlexibleContexts , ExistentialQuantification , TemplateHaskell , StandaloneDeriving , GeneralizedNewtypeDeriving # ExistentialQuantification, TemplateHaskell, StandaloneDeriving, GeneralizedNewtypeDeriving#-} # OPTIONS_GHC -fno - warn - orphans # | Instances are ...
null
https://raw.githubusercontent.com/kuribas/aeson-diff-generic/b0c85c21a29441e6b89da4bc1ca48b9a71de2ca3/Data/Aeson/Diff/Generic/Instances.hs
haskell
no indexing possible into hashset, since it is unordered. Array rather than an Object, which makes indexing not possible.
# LANGUAGE OverloadedStrings , RankNTypes , FlexibleContexts , ExistentialQuantification , TemplateHaskell , StandaloneDeriving , GeneralizedNewtypeDeriving # ExistentialQuantification, TemplateHaskell, StandaloneDeriving, GeneralizedNewtypeDeriving#-} # OPTIONS_GHC -fno - warn - orphans # | Instances are ...
0801baffa98d365d6ec4abfc9ae49c1a9503ee3e849685c9acef81af39252ddb
lehins/primal
StableName.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # # OPTIONS_GHC -fno - warn - orphans # -- | Module : Primal . Memory . Copyright : ( c ) 2020 - 2022 -- License : BSD3 Maintainer : < > -- Stability : experimental -- Portability : non-portable -...
null
https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal/src/Primal/Memory/StableName.hs
haskell
| License : BSD3 Stability : experimental Portability : non-portable exported, hence this definition, starting with GHC-8.6 @StableName@ is re-exported from @GHC.StableName@ | Convert a 'StableName' to an 'Int'. The 'Int' returned is not (in practice however, the chances of this are small, so the result...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE MagicHash # # LANGUAGE UnboxedTuples # # OPTIONS_GHC -fno - warn - orphans # Module : Primal . Memory . Copyright : ( c ) 2020 - 2022 Maintainer : < > module Primal.Memory.StableName ( StableName(..) , makeStableName , makeAnyStableN...
e9dfe754d0602bcb6453fb5bc4825185ae164470545c8b2009772a8a72ad57d9
omariosouto/learnin-public-clojure
handler.clj
(ns pokebank-api.handler (:require [compojure.core :refer :all] [compojure.handler :refer [site]] [compojure.route :as route] [clojure.java.io :as io] [ring.adapter.jetty :as jetty] [ring.middleware.defaults :refer [wrap-defaults site-defaults]] ...
null
https://raw.githubusercontent.com/omariosouto/learnin-public-clojure/672b8ee1b32bf179c753e107c785b61e4311234c/projects/pokebank-api-base/src/pokebank_api/handler.clj
clojure
(println (site-defaults)) [Running the server] using the greet handler as a var here this way wrap-reload, when it refreshes the namespaces, will affect the value of greet
(ns pokebank-api.handler (:require [compojure.core :refer :all] [compojure.handler :refer [site]] [compojure.route :as route] [clojure.java.io :as io] [ring.adapter.jetty :as jetty] [ring.middleware.defaults :refer [wrap-defaults site-defaults]] ...
3a76314141614649c8d027c2dc6fe2bfe3a8e2489ac806f43c23f98f8da853ba
rizo/ocaml-by-example
Basic_lib_doc.ml
let hello name = Printf.printf "Hello, %s\n" name
null
https://raw.githubusercontent.com/rizo/ocaml-by-example/caa80c664cb78d14fd22f99cb9c96b47a5d75dde/basic-lib-doc/Basic_lib_doc.ml
ocaml
let hello name = Printf.printf "Hello, %s\n" name
99fe6d6b67e64f1b9411b7143aab8c9cc1629398d7648745b69f63bb5dc73b66
shirok/Gauche
net.scm
;; ;; testing net ;; (use gauche.test) (test-start "net") (use gauche.net) (test-module 'gauche.net :allow-undefined '(sys-getaddrinfo <sys-addrinfo> AI_PASSIVE PF_INET6)) ;;----------------------------------------------------------------- (test-section "socket address")...
null
https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/test/net.scm
scheme
testing net ----------------------------------------------------------------- ; NB : this is allowed in IPv4 spec , although prohibited in inet_pton . 's inet_pton does recognize this . ----------------------------------------------------------------- returns hostname. returns hostname. For now we skip this t...
(use gauche.test) (test-start "net") (use gauche.net) (test-module 'gauche.net :allow-undefined '(sys-getaddrinfo <sys-addrinfo> AI_PASSIVE PF_INET6)) (test-section "socket address") (test* "sockaddr_un" #t (let1 addr (make <sockaddr-un> :path "/tmp/xxx") ...