_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
625e1ac57f67eb82c17a627cb547a19e2c15baad1272f8312f222ef62f9b13bf
fisxoj/coo
plugin.lisp
(defpackage :coo.plugin (:use :cl :alexandria) (:export #:initialize-plugins #:config #:metadata-for-symbol)) (in-package :coo.plugin) (defvar *plugin* nil "The active plugin in hooks. A string.") (defun initialize-plugins () (coo.config:get-value "plugins")) (defun config (key &opt...
null
https://raw.githubusercontent.com/fisxoj/coo/ef43d6ddfa1749b850bd31b88eeddff680e7a2ca/src/plugin.lisp
lisp
(defpackage :coo.plugin (:use :cl :alexandria) (:export #:initialize-plugins #:config #:metadata-for-symbol)) (in-package :coo.plugin) (defvar *plugin* nil "The active plugin in hooks. A string.") (defun initialize-plugins () (coo.config:get-value "plugins")) (defun config (key &opt...
a82f7face6c95a0356f288f25db70e689998a26a83afdca5cf5950cbe5c9655d
e-wrks/edh
Control.hs
module Language.Edh.Control where import Control.Concurrent.STM import Control.Exception import Control.Monad.State.Strict (State) import qualified Data.Char as Char import Data.Dynamic (Dynamic, toDyn) import qualified Data.HashMap.Strict as Map import qualified Data.List as L import Data.Maybe import Data.Text (Text...
null
https://raw.githubusercontent.com/e-wrks/edh/05b339ae6172770113f61f9584ac9792877853cb/elr/src/Language/Edh/Control.hs
haskell
| Source document absolute local (though possibly network mounted) file path if started with | Source position | Source range # UNPACK # # UNPACK # | compare a position to a range, return 'EQ' when the position is within the special infinite end | Source location global dict for operator info | precedence & f...
module Language.Edh.Control where import Control.Concurrent.STM import Control.Exception import Control.Monad.State.Strict (State) import qualified Data.Char as Char import Data.Dynamic (Dynamic, toDyn) import qualified Data.HashMap.Strict as Map import qualified Data.List as L import Data.Maybe import Data.Text (Text...
962b73ad118ce9fcd824826a6c0fd739810e2e63630399c4905d43a3ee4c15fb
PEZ/rich4clojure
problem_102.clj
(ns rich4clojure.medium.problem-102 (:require [hyperfiddle.rcf :refer [tests]])) = intoCamelCase = ;; By 4Clojure user: amalloy ;; Difficulty: Medium ;; Tags: [strings] ;; When working with java , you often need to create an ;; object with fieldsLikeThis, but you'd rather work with ;; a hashmap that has :keys-l...
null
https://raw.githubusercontent.com/PEZ/rich4clojure/2ccfac041840e9b1550f0a69b9becbdb03f9525b/src/rich4clojure/medium/problem_102.clj
clojure
By 4Clojure user: amalloy Difficulty: Medium Tags: [strings] object with fieldsLikeThis, but you'd rather work with a hashmap that has :keys-like-this until it's time to convert. Write a function which takes lower-case hyphen-separated strings and converts them to camel-case strings. Share your solution, and...
(ns rich4clojure.medium.problem-102 (:require [hyperfiddle.rcf :refer [tests]])) = intoCamelCase = When working with java , you often need to create an (def __ :tests-will-fail) (comment ) (tests (__ "something") := "something" (__ "multi-word-key") := "multiWordKey" (__ "leaveMeAlone") := "leaveMe...
7234ed4fecd78a5c58cd2d3e159a0c68d81dc8b63f30f88b692c2513904d9530
ice1000/learn
recurrence-relations.hs
module FunctionEvaluator where import qualified Data.Map.Strict as M factorial i | i = = 0 = Left 1 -- | otherwise = Right ([i-1], (*i).head) -- fibonacci i | i < 2 = Left i -- | otherwise = Right ([i-1, i-2], sum) -- coinchange ( a , i ) | a = = 0 = Left 1 -- ...
null
https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/recurrence-relations.hs
haskell
| otherwise = Right ([i-1], (*i).head) | otherwise = Right ([i-1, i-2], sum) | a < 0 || i == 0 = Left 0 | otherwise = Right ([(a, i-1), (a-coinlist!!(i-1), i)], sum) heigth (n, m) | m <= 0 || n <= 0 = Left 0 | otherwise = Ri...
module FunctionEvaluator where import qualified Data.Map.Strict as M factorial i | i = = 0 = Left 1 fibonacci i | i < 2 = Left i coinchange ( a , i ) | a = = 0 = Left 1 coinlist = [ 1 , 3 , 5 , 10 ] foo i | i < = 2 = Left 1 | odd i = Right ( [ 6*i`div`7 , 2*i`div`3 ...
6a9da75fe21da5b6a3ad5235773dd614d9142763d024d3be414473d4d1b20171
spl/ivy
sreadonly.ml
(* * sreadonly.ml * * Static checking for the readonly type. * *) open Cil open Pretty open Ivyoptions open Sutil open Sfunctions module E = Errormsg (* SREADONLY fields of SPRIVATE structs may be written *) let isWritableReadonlyLval (lv : lval) : bool = let hlv, lastoff = removeOffsetLval lv in match ...
null
https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/src/sharC/sreadonly.ml
ocaml
* sreadonly.ml * * Static checking for the readonly type. * SREADONLY fields of SPRIVATE structs may be written
open Cil open Pretty open Ivyoptions open Sutil open Sfunctions module E = Errormsg let isWritableReadonlyLval (lv : lval) : bool = let hlv, lastoff = removeOffsetLval lv in match lastoff with | Field(fi,NoOffset) when isPrivateType (sharCTypeOfLval hlv) -> true | _ -> E.log "not writab...
8813ec31da7762054cafe0d059807d4bbd1780bc8f8208d920acfdf0fa999e63
ProjectMAC/propagators
bridge-rectifier-test.scm
;;; ---------------------------------------------------------------------- Copyright 2009 - 2010 . ;;; ---------------------------------------------------------------------- This file is part of Propagator Network Prototype . ;;; Propagator Network Prototype is free software ; you can ;;; redistribute it and/o...
null
https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/examples/test/bridge-rectifier-test.scm
scheme
---------------------------------------------------------------------- ---------------------------------------------------------------------- you can redistribute it and/or modify it under the terms of the GNU any later version. will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of M...
Copyright 2009 - 2010 . This file is part of Propagator Network Prototype . General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) Propagator Network Prototype is distributed in the hope that it You should have received a copy of the G...
4f1a91daf0db742bd1ee328ab2c8a582871f56ea7423355d629fefd82f02f365
8thlight/hyperion
project.clj
(defproject hyperion/hyperion-postgres "3.7.1" :description "Postgres Datastore for Hyperion" :dependencies [[org.clojure/clojure "1.5.1"] [hyperion/hyperion-api "3.7.1"] [hyperion/hyperion-sql "3.7.1"] [postgresql/postgresql "8.4-702.jdbc4"]] :profiles {:dev {:...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/postgres/project.clj
clojure
(defproject hyperion/hyperion-postgres "3.7.1" :description "Postgres Datastore for Hyperion" :dependencies [[org.clojure/clojure "1.5.1"] [hyperion/hyperion-api "3.7.1"] [hyperion/hyperion-sql "3.7.1"] [postgresql/postgresql "8.4-702.jdbc4"]] :profiles {:dev {:...
d9eb7d9d5a4d62b5c61c17b026745945a30a662a36542d32d8b77ec130b548cb
zadean/emojipoo
emojipoo_app.erl
%%%------------------------------------------------------------------- %% @doc emojipoo public API %% @end %%%------------------------------------------------------------------- -module(emojipoo_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %%===================================...
null
https://raw.githubusercontent.com/zadean/emojipoo/d4aea55747de038f1812d3b2d4ec8102dfa124b6/src/emojipoo_app.erl
erlang
------------------------------------------------------------------- @doc emojipoo public API @end ------------------------------------------------------------------- Application callbacks ==================================================================== API =======================================================...
-module(emojipoo_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> emojipoo_sup:start_link(). stop(_State) -> ok. Internal functions
b9bf8f93941f211db3a8f2bbeba11847cf35573b54d5da75876a1bef748cd4a2
softlab-ntua/bencherl
master.erl
%% orbit-int master (controlling orbit computation) %% Author : < > %% -module(master). -export([orbit/3, get_gens/1, get_master/1, get_workers/1, get_spawn_img_comp/1, get_global_table_size/1, get_idle_timeout/1, set_idle_timeout/2, clear_spawn_img_comp/1, now/0]). -compile(...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/bench/orbit_int/src/master.erl
erlang
orbit-int master (controlling orbit computation) DATA Static Machine Configuration: {Gs, %list of generators Master, %pid of master process Workers, %list of Worker size of global hash table IdleTimeout, %milliseconds this worker idles before sending ...
Author : < > -module(master). -export([orbit/3, get_gens/1, get_master/1, get_workers/1, get_spawn_img_comp/1, get_global_table_size/1, get_idle_timeout/1, set_idle_timeout/2, clear_spawn_img_comp/1, now/0]). -compile({no_auto_import, [now/0]}). List of pairs where the...
5026a2298bc74070eebd4249c4bf0abca1927b8e3c904cd979e4113374bfdbca
chetmurthy/ensemble
rand.ml
(**************************************************************) RAND.ML : Randomly multicast / send messages and fail Author : , 6/95 (**************************************************************) open Ensemble open Trans open Util open Arge open View open Buf open Appl_intf open New (*************************...
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/prog/rand.ml
ocaml
************************************************************ ************************************************************ ************************************************************ ************************************************************ ************************************************************ ***************...
RAND.ML : Randomly multicast / send messages and fail Author : , 6/95 open Ensemble open Trans open Util open Arge open View open Buf open Appl_intf open New let name = Trace.file "RAND" let failwith s = Trace.make_failwith name s let log = Trace.log name let size = ref 100 let max_time = ref Time.zero type prog...
086ae4ed3a1732afc09f891e96624b852fee0691d6854e9c9098c847833e2999
monadbobo/ocaml-core
extended_hashtbl.mli
open Core.Std module Access_control : sig type ('key,'data,+'z) any module Immutable : sig type ('key,'data) t = ('key,'data,immutable) any include Sexpable.S2 with type ('key,'data) t := ('key,'data) t include Binable.S2 with type ('key,'data) t := ('key,'data) t end module Read_only : sig typ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/extended_hashtbl.mli
ocaml
open Core.Std module Access_control : sig type ('key,'data,+'z) any module Immutable : sig type ('key,'data) t = ('key,'data,immutable) any include Sexpable.S2 with type ('key,'data) t := ('key,'data) t include Binable.S2 with type ('key,'data) t := ('key,'data) t end module Read_only : sig typ...
0f7422646ba93b3c88b6a773619629b28d8cbe3038ece620dc3cd1b1f11cfd8b
destenson/ConsenSys--Fae
Exceptions.hs
module Blockchain.Fae.Internal.Exceptions ( module Blockchain.Fae.Internal.Exceptions, module Control.Exception.Safe ) where import Blockchain.Fae.Internal.Types import Control.Exception.Safe import Control.Monad.IO.Class import Data.Typeable data EntryException = NoCurrentEntry | BadEntryID EntryI...
null
https://raw.githubusercontent.com/destenson/ConsenSys--Fae/9ba10ed3299f517ac5e44836ea8ee984dd41d0f4/src/Blockchain/Fae/Internal/Exceptions.hs
haskell
module Blockchain.Fae.Internal.Exceptions ( module Blockchain.Fae.Internal.Exceptions, module Control.Exception.Safe ) where import Blockchain.Fae.Internal.Types import Control.Exception.Safe import Control.Monad.IO.Class import Data.Typeable data EntryException = NoCurrentEntry | BadEntryID EntryI...
edcd8b2eaa9f00c407ac7bc70328f22713f6f089b146e828a97278295fa731eb
dvingo/dv.fulcro-template
global_styles.cljs
(ns {{namespace}}.client.ui.styles.global-styles) (defn page-styles [theme] {":root" {:box-sizing "border-box"} "*, ::after, ::before" {:box-sizing "inherit"} :body ;; use important here to override semantic ui styles {:background-color (str (:bg theme) "!important")...
null
https://raw.githubusercontent.com/dvingo/dv.fulcro-template/3f143d9a06e00749ea7f33c16c002f416fe69415/resources/clj/new/dv.fulcro_template/src/main/app/client/ui/styles/global_styles.cljs
clojure
use important here to override semantic ui styles
(ns {{namespace}}.client.ui.styles.global-styles) (defn page-styles [theme] {":root" {:box-sizing "border-box"} "*, ::after, ::before" {:box-sizing "inherit"} :body {:background-color (str (:bg theme) "!important") :background-image (str (:bg-...
75e8f60ddb0ef8155592f03eeba551f69adaecbc43a1662746eec9cde9199c3b
pascalpoizat/fbpmn
Spec.hs
# LANGUAGE QuasiQuotes # import Test . Tasty . QuickCheck as QC import Test . Tasty . SmallCheck as SC import Data.Attoparsec.Text import Examples ( g0, g1, ) import Fbpmn.Analysis.Tla.IO.Log import Fbpmn.Analysis.Tla.Model import Fbpmn.BpmnGraph.Model import Fbpmn.Helper (parseIdent...
null
https://raw.githubusercontent.com/pascalpoizat/fbpmn/0e99d26e3ff0a24edc8e3f603fcc47e78fbf209e/test/Spec.hs
haskell
parse error (not enough input) parse error (not enough input, letter case) parseLNEI :: Either String a parseLNEI = Left "letter: not enough input" parse error (not enough input, _ case) parse error (correct string not found) parse error (while using takeWhile1) graphs
# LANGUAGE QuasiQuotes # import Test . Tasty . QuickCheck as QC import Test . Tasty . SmallCheck as SC import Data.Attoparsec.Text import Examples ( g0, g1, ) import Fbpmn.Analysis.Tla.IO.Log import Fbpmn.Analysis.Tla.Model import Fbpmn.BpmnGraph.Model import Fbpmn.Helper (parseIdent...
59bc23bf4ffe9cdc11483f32a643cdde19f67222ba3bd4cac30c0f213127a79e
andreaslyn/mini-yu
Main.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # #include "split-stack-config.h" module Main (main) where import PackageMap (PackageMap) import System.Console.ArgParser.Params as ArPa import System.Console.ArgParser as Ar import TypeCheck.TypeCheck import qualified Ir.BaseIr as Ba import qualified Ir.HighLevelIr as Hl...
null
https://raw.githubusercontent.com/andreaslyn/mini-yu/b4c5ef2ac24c6e9519d79ee378e39e9c22ee873d/app/Main.hs
haskell
# LANGUAGE BangPatterns #
# LANGUAGE CPP # #include "split-stack-config.h" module Main (main) where import PackageMap (PackageMap) import System.Console.ArgParser.Params as ArPa import System.Console.ArgParser as Ar import TypeCheck.TypeCheck import qualified Ir.BaseIr as Ba import qualified Ir.HighLevelIr as Hl import qualified Ir.RefCountI...
083bfd08b8795a6e67df746b936dbc1fe14255e6b314ad7058b6db8b91a163e7
datacrypt-project/hitchhiker-tree
messaging.cljc
(ns hitchhiker.tree.messaging (:refer-clojure :exclude [subvec]) (:require [clojure.core.rrb-vector :refer [catvec]] [hasch.core :refer [uuid]] #?(:clj [clojure.core.async :as async] :cljs [cljs.core.async :as async]) #?(:clj [clojure.pprint :as pp]) #?...
null
https://raw.githubusercontent.com/datacrypt-project/hitchhiker-tree/f7d0f926541d7cb31fac11c2d2245c5bac451b86/src/hitchhiker/tree/messaging.cljc
clojure
An operation is an object with a few functions In the future, it could also have (more memory but faster results for repeat queries) (when (seq @deferred-ops) (println "appyling deferred ops" @deferred-ops)) need to return ops to apply to the tree proper... will there be enough space? ) must be a st...
(ns hitchhiker.tree.messaging (:refer-clojure :exclude [subvec]) (:require [clojure.core.rrb-vector :refer [catvec]] [hasch.core :refer [uuid]] #?(:clj [clojure.core.async :as async] :cljs [cljs.core.async :as async]) #?(:clj [clojure.pprint :as pp]) #?...
6219f9968559e77ee005e57e529828c4e9a177fb13bc68a9321753502f28de27
S8A/htdp-exercises
ex344.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 ex344) (read-case-sensitive #t) (teachpacks ((lib "abstraction.rkt" "teachpack" "2htdp") (...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex344.rkt
racket
about the language level of this file in a form that our tools can easily process. String Dir -> [List-of Path] produces the lists of paths belonging to files named f in the given directory tree Dir -> [List-of Path] lists the paths of all files and directories in a given directory tree [List-of Path] [List-of ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex344) (read-case-sensitive #t) (teachpacks ((lib "abstraction.rkt" "teachpack" "2htdp") (lib "dir.rkt" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal ...
fc2b953b9013f3ad1d72bb37739024ededb7dc3f02bc88360ae01452efc03a42
haskell/hackage-security
Lens.hs
-- | Some very simple lens definitions (to avoid further dependencies) -- -- Intended to be double-imported -- > import Hackage.Security.Util.Lens (Lens) -- > import qualified Hackage.Security.Util.Lens as Lens module Hackage.Security.Util.Lens ( -- * Generic definitions Lens , Lens' , Traversal , Travers...
null
https://raw.githubusercontent.com/haskell/hackage-security/745b294e8cda2b46a21a6d1766a87f699a0277a8/hackage-security/src/Hackage/Security/Util/Lens.hs
haskell
| Some very simple lens definitions (to avoid further dependencies) Intended to be double-imported > import Hackage.Security.Util.Lens (Lens) > import qualified Hackage.Security.Util.Lens as Lens * Generic definitions ------------------------------------------------------------------------------ General definit...
module Hackage.Security.Util.Lens ( Lens , Lens' , Traversal , Traversal' , get , over , set ) where import MyPrelude import Control.Applicative import Data.Functor.Identity type Lens s t a b = forall f. Functor f => LensLike f s t a b | lens type Lens' s a = Lens s s a a type Traversal s t a ...
9ff9c279fe2509ab3dae46f3ccbda45d01fe962df569a8a957f928f8928b54cb
athoune/carcel
carcel_tests.erl
-module(carcel_tests). -include_lib("eunit/include/eunit.hrl"). carcel_test() -> Writer = [<<"erlang.net">>, article, 42, write], Editor = [<<"erlang.net">>, article], ?assert(not(carcel:can(Writer, [<<"erlang.net">>, article]))), ?assert(carcel:can(Editor, [<<"erlang.net">>, article])), ?assert(no...
null
https://raw.githubusercontent.com/athoune/carcel/7f48b51f6d71f8a63f560cb719e7a99c8d548a4c/test/carcel_tests.erl
erlang
Just a mock Can write any article wich I own
-module(carcel_tests). -include_lib("eunit/include/eunit.hrl"). carcel_test() -> Writer = [<<"erlang.net">>, article, 42, write], Editor = [<<"erlang.net">>, article], ?assert(not(carcel:can(Writer, [<<"erlang.net">>, article]))), ?assert(carcel:can(Editor, [<<"erlang.net">>, article])), ?assert(no...
f621d7aeaa2b5b4f64d6c67a840e451e54f9bba92de628c591d66c9f3b0003c1
RJMetrics/sweet-liberty
utils.clj
(ns com.rjmetrics.sweet-liberty.integration.utils (:require [com.rjmetrics.sweet-liberty.core :refer :all] [compojure.core :refer [defroutes GET]] [clojure.java.jdbc :as j] [ring.middleware.params :refer [wrap-params]])) (defn get-db-spec [db-name] {:subprotocol "hsqldb" :s...
null
https://raw.githubusercontent.com/RJMetrics/sweet-liberty/812a1caee1a6ef2053d0545a9e05d83e03011212/test/com/rjmetrics/sweet_liberty/integration/utils.clj
clojure
I specifically opted not to use the ddl lib here since it doesn't support IF EXISTS
(ns com.rjmetrics.sweet-liberty.integration.utils (:require [com.rjmetrics.sweet-liberty.core :refer :all] [compojure.core :refer [defroutes GET]] [clojure.java.jdbc :as j] [ring.middleware.params :refer [wrap-params]])) (defn get-db-spec [db-name] {:subprotocol "hsqldb" :s...
a6319867188d570b2c1d5085adc4ad6fcdb83f6d15ee74c0a192d1fd438e3ae1
Mzk-Levi/texts
SmartAConstructors.hs
# LANGUAGE TemplateHaskell # -------------------------------------------------------------------------------- -- | Module : Data . Comp . . Derive . SmartAConstructors Copyright : ( c ) 2011 , -- License : BSD3 Maintainer : < > -- Stability : experimental Portability : non - p...
null
https://raw.githubusercontent.com/Mzk-Levi/texts/34916d6531af9bc39e50b596247ac2017d8cfdc3/compdata-param-master/src/Data/Comp/Param/Derive/SmartAConstructors.hs
haskell
------------------------------------------------------------------------------ | License : BSD3 Stability : experimental Automatically derive smart constructors with annotations for difunctors. ------------------------------------------------------------------------------
# LANGUAGE TemplateHaskell # Module : Data . Comp . . Derive . SmartAConstructors Copyright : ( c ) 2011 , Maintainer : < > Portability : non - portable ( GHC Extensions ) module Data.Comp.Param.Derive.SmartAConstructors ( smartAConstructors ) where import Language.Has...
3d709a78a43649b47055501008918aae8dfe9ca2e878a209c3fea7c0168e3b9b
vikram/lisplibraries
admin.lisp
;;;; -*- lisp -*- (in-package :it.bese.ucw) (defvar *admin-application* (make-instance 'standard-application :url-prefix "/admin/" :tal-generator (make-instance 'yaclml:file-system-generator :cachep t ...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_ajax/src/admin/admin.lisp
lisp
-*- lisp -*- ROOM Slime integration parse the form values All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this ...
(in-package :it.bese.ucw) (defvar *admin-application* (make-instance 'standard-application :url-prefix "/admin/" :tal-generator (make-instance 'yaclml:file-system-generator :cachep t :root...
2031e748e1afcc118901ad6d37eb51d86d32f4fc41684afbf3b5d4fe2f25626a
andrewthad/country
Unsafe.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE UnboxedTuples # # OPTIONS_HADDOCK not - home # | This module provides the data constructor for a ' Country ' . While pattern matching on a country is perfectly safe , constructing one is not . There is an invariant the type system does not capture th...
null
https://raw.githubusercontent.com/andrewthad/country/e03df9d4528b030f30c233dd1b60942fd7d6ad05/country/src/Country/Unsafe.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE UnboxedTuples # # OPTIONS_HADDOCK not - home # | This module provides the data constructor for a ' Country ' . While pattern matching on a country is perfectly safe , constructing one is not . There is an invariant the type system does not capture th...
1d6f17e48ec0fd36a71c22c63a6995c38ac955240419b2a5b34bfdae287ba978
ml4tp/tcoq
hipattern.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/tactics/hipattern.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * High-order patterns * Non recursi...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Coq...
0b1f48cc6bcc6b3ac508735b2b071d926cb8d624a59c1698084bf711b0078fd5
patricoferris/jsoo-p5
indent.ml
open Js_of_ocaml let textarea (textbox : Dom_html.textAreaElement Js.t) : unit = let rec loop s acc (i, pos') = try let pos = String.index_from s pos' '\n' in loop s ((i, (pos', pos)) :: acc) (succ i, succ pos) with _ -> List.rev ((i, (pos', String.length s)) :: acc) in let rec find (l : (int...
null
https://raw.githubusercontent.com/patricoferris/jsoo-p5/743dccce67cd8d942e3028a526046f20c08306be/editor/lib/indent.ml
ocaml
open Js_of_ocaml let textarea (textbox : Dom_html.textAreaElement Js.t) : unit = let rec loop s acc (i, pos') = try let pos = String.index_from s pos' '\n' in loop s ((i, (pos', pos)) :: acc) (succ i, succ pos) with _ -> List.rev ((i, (pos', String.length s)) :: acc) in let rec find (l : (int...
55129ff828cd7fb4de07fc2a938b9bd84b7e77620abc7d43571311ee2f4fe135
alexandroid000/improv
JointState.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Sensor_msgs.JointState where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Sensor_msgs/Ros/Sensor_msgs/JointState.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Sensor_msgs.JointState where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import qualified GHC.Generics as G imp...
324faaf70c6f15756e9d04b83ae93e9b6375796eaae126fb1796b035e20abe24
hexlet-basics/exercises-racket
index.rkt
#lang racket (provide add) #| BEGIN |# (define (add x y) (let* ([result (~a (+ x y))] [width (string-length result)]) (format "+~a~n ~a~n ~a~n ~a" (~a x #:min-width width #:align 'right) (~a y #:min-width width #:align 'right) (make-string width #\-) result))) #| END |#
null
https://raw.githubusercontent.com/hexlet-basics/exercises-racket/ae3a45453584de1e5082c841178d4e43dd47e08a/modules/50-strings/50-formatting/index.rkt
racket
BEGIN END
#lang racket (provide add) (define (add x y) (let* ([result (~a (+ x y))] [width (string-length result)]) (format "+~a~n ~a~n ~a~n ~a" (~a x #:min-width width #:align 'right) (~a y #:min-width width #:align 'right) (make-string width #\-) result)))
9ec3a30f934593f0495929d4698648299acf94d74f1c43ecde835b07c78eca47
gogins/csound-extended-nudruz
cring-cm.lisp
;;; ********************************************************************** ;;; $Name$ ;;; $Revision$ $ Date$ (require :asdf) (require :fomus) (require :nudruz) (load "example-csd.lisp") (in-package :cm) ;;; ;;; Examples of "change ringing". I was made aware of this compositional technique by . Change ringing...
null
https://raw.githubusercontent.com/gogins/csound-extended-nudruz/4551d54890f4adbadc5db8f46cc24af8e92fb9e9/examples/cring-cm.lisp
lisp
********************************************************************** $Name$ $Revision$ Examples of "change ringing". I was made aware of this compositional The algorithms all involve rotating diferent pairs of bells in the peal, but "...the composer's job is to be sure that he has selected as far as We impl...
$ Date$ (require :asdf) (require :fomus) (require :nudruz) (load "example-csd.lisp") (in-package :cm) technique by . Change ringing is an algorithmic procedure for church bell ringing invented by those clever British , who also gave these algorithms great names like Plain , Grandsire Doubles etc . pos...
0b1517a6df10692c7f295ac9a673d5da7e383552b82a4e577a91e2ed45395919
McCLIM/McCLIM
sheet.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) Copyright 2001 by > ( c ) Copyright 2001 by < > ( c ) Copyright 2002 by ...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/670a37df04d9b9c9f092d024130149ac48c8fd81/Backends/PostScript/sheet.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- TODO: - do smth with POST...
( c ) Copyright 2001 by > ( c ) Copyright 2001 by < > ( c ) Copyright 2002 by < > ( c ) Copyright 2002 by < > ( c ) Copyright 2022 by < > (in-package #:clim-postscript) (defun write-font-to-postscript-stream (stream text-style) (with-open-file (font-stream (clim-p...
de2813b1842af7ac4d3abbde67d3ef5d58dcd0f604fd848e2fdeecbd5e4af091
robert-strandh/SICL
establish-call-sites.lisp
(cl:in-package #:sicl-boot-compile-and-tie) (defgeneric instruction (call-site)) (defclass call-site (sicl-compiler:call-site) ((%instruction :initarg :instruction :reader instruction))) (defun call-site-name (instruction) (typecase instruction (cleavir-ir:named-call-instruction (cleavir-ir:callee-name ...
null
https://raw.githubusercontent.com/robert-strandh/SICL/7b0d08345d358ee574f4a5cd88ecf188e6ec5112/Code/Boot/Compiler/establish-call-sites.lisp
lisp
FIXME: Use a better function.
(cl:in-package #:sicl-boot-compile-and-tie) (defgeneric instruction (call-site)) (defclass call-site (sicl-compiler:call-site) ((%instruction :initarg :instruction :reader instruction))) (defun call-site-name (instruction) (typecase instruction (cleavir-ir:named-call-instruction (cleavir-ir:callee-name ...
fa3dccad58d65e769f792784dfeb462e53a2f136512dc2b5ac08a2a40660a79e
DerekCuevas/interview-cake-clj
core.clj
(ns inflight-entertainment.core (:gen-class)) (defn can-two-movies-fill-flight? "O(n) time solution - using a set." [movie-lengths flight-length] (true? (reduce (fn [seen-lengths movie-length] (if (contains? seen-lengths (- flight-length movie-length)) (reduced true) ...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/inflight-entertainment/src/inflight_entertainment/core.clj
clojure
(ns inflight-entertainment.core (:gen-class)) (defn can-two-movies-fill-flight? "O(n) time solution - using a set." [movie-lengths flight-length] (true? (reduce (fn [seen-lengths movie-length] (if (contains? seen-lengths (- flight-length movie-length)) (reduced true) ...
1656e1baa788fc09a950665836ba98c5f439da82320ab9d144c4d4d178bd02b6
bjorng/wings
auv_matrix.erl
%% auv_matrix.erl -- %% %% Provides matrix ops for sparsely populated matrixes. %% Copyright ( c ) 2001 - 2002 , 2004 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -module...
null
https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/plugins_src/autouv/auv_matrix.erl
erlang
Provides matrix ops for sparsely populated matrixes. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ Exported Exported Exported Exported Exported Exported Exported Exported Exported Exported Expo...
auv_matrix.erl -- Copyright ( c ) 2001 - 2002 , 2004 - 2011 -module(auv_matrix). -export([dim/1]). -export([vector/1, vector/2]). -export([rows/2, cols/1, cols/2]). -export([cat_cols/2, cat_rows/2]). -export([diag/1, row_norm/1]). -export([trans/1, mult/2, mult_trans/2]). -export([add/2, su...
7aaa28def88aa7cd7e0efb621abc0fefb691a7bbf750001a94829d391a5149f1
ocaml/oasis
OASISAst_types.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISAst_types.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
54d785a1d3ac902f9c12e8312cb6684fc929ec8032b476fabfdb3b32bf8f0d0c
nubank/vessel
cli_test.clj
(ns vessel.cli-test (:require [clojure.java.io :as io] [clojure.string :as string] [clojure.test :refer :all] [vessel.cli :as cli])) (defmacro with-err-str [& body] `(let [writer# (java.io.StringWriter.)] (binding [*err* writer#] ~@body (str writer#)))) (de...
null
https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/test/unit/vessel/cli_test.clj
clojure
(ns vessel.cli-test (:require [clojure.java.io :as io] [clojure.string :as string] [clojure.test :refer :all] [vessel.cli :as cli])) (defmacro with-err-str [& body] `(let [writer# (java.io.StringWriter.)] (binding [*err* writer#] ~@body (str writer#)))) (de...
bedf9f9140d83fc0a8c132de72b8a3a00e2f461b575ed104d5766a74a67e023d
shop-planner/shop3
p09.lisp
(in-package :shop-openstacks) #.(make-problem 'OS-SEQUENCEDSTRIPS-P15_3 'OPENSTACKS-SEQUENCEDSTRIPS-ADL-INCLUDED '((NEXT-COUNT N0 N1) ...
null
https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/openstacks-adl/p09.lisp
lisp
(in-package :shop-openstacks) #.(make-problem 'OS-SEQUENCEDSTRIPS-P15_3 'OPENSTACKS-SEQUENCEDSTRIPS-ADL-INCLUDED '((NEXT-COUNT N0 N1) ...
967423ca72feb60223eab2da5d26e3c955fd0a300c650750f28bdfc8a5e80969
nuprl/gradual-typing-performance
tetras-tetra-change-color.rkt
#lang typed/racket/base (provide tetra-change-color) (require benchmark-util "data-block-adapted.rkt" "data-tetra-adapted.rkt") (require/typed/check "bset-blocks-change-color.rkt" [blocks-change-color (-> BSet Color BSet)]) ;; ======================================================================...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/tetris/typed/tetras-tetra-change-color.rkt
racket
============================================================================= Change the color of the given tetra.
#lang typed/racket/base (provide tetra-change-color) (require benchmark-util "data-block-adapted.rkt" "data-tetra-adapted.rkt") (require/typed/check "bset-blocks-change-color.rkt" [blocks-change-color (-> BSet Color BSet)]) (: tetra-change-color (-> Tetra Color Tetra)) (define (tetra-change-colo...
bbc08645cd56abf2812839b03b65decf3204ed2d0db5fa6ff6def796d4872514
IagoAbal/eba
uniq.ml
open Batteries type t = int let fresh = unique let compare = Int.compare let to_int u = u let pp = PP.int let to_string = string_of_int
null
https://raw.githubusercontent.com/IagoAbal/eba/81ab71efff1ea407a7b5a98f7e8fd8a9d8d60815/src/uniq.ml
ocaml
open Batteries type t = int let fresh = unique let compare = Int.compare let to_int u = u let pp = PP.int let to_string = string_of_int
d85aea52b2a13cb07de1d4d57e573fefd069fa45e31b7e5fdfd45a00413041cc
exoscale/clojure-kubernetes-client
v1_api_versions.clj
(ns clojure-kubernetes-client.specs.v1-api-versions (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-server-address-by-client-cidr :refer :all] ) (:import (java.io File))) (declare v1-api-versions-data v1-api-versions) (def ...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_api_versions.clj
clojure
(ns clojure-kubernetes-client.specs.v1-api-versions (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-server-address-by-client-cidr :refer :all] ) (:import (java.io File))) (declare v1-api-versions-data v1-api-versions) (def ...
433926bf12bd357319d20c93e54123b1e8b22f811d63d1697e256bb0ef607695
meta-ex/ignite
resources.clj
(ns ^{:doc "A simple auto-generating file store for storing EDN" :author "Sam Aaron"} meta-ex.resources (:require [overtone.config.file-store :as fstore] [clojure.java.io :as io])) (defonce __MAKE-RESOURCES-DIR___ (.mkdirs (io/file "resources/overtone-store"))) (defonce edn-stores (agent {})) ...
null
https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/resources.clj
clojure
(ns ^{:doc "A simple auto-generating file store for storing EDN" :author "Sam Aaron"} meta-ex.resources (:require [overtone.config.file-store :as fstore] [clojure.java.io :as io])) (defonce __MAKE-RESOURCES-DIR___ (.mkdirs (io/file "resources/overtone-store"))) (defonce edn-stores (agent {})) ...
6d4df9674876261283a093cdbda17402fee42c43f2e3e47152428160b9dd3fba
istathar/vaultaire
ContentsTest.hs
-- -- Data vault for metrics -- Copyright © 2013 - 2014 Anchor Systems , Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of the 3 - clause BSD licence . --...
null
https://raw.githubusercontent.com/istathar/vaultaire/75603ea614b125568ca871e88280bd29b3aef4ba/tests/ContentsTest.hs
haskell
Data vault for metrics The code in this file, and the program it is a part of, is made available to you by its authors as open source software: you can redistribute it and/or modify it under the terms of # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # OPTIONS -fno-warn-type-defaults # TODO: Thi...
Copyright © 2013 - 2014 Anchor Systems , Pty Ltd and Others the 3 - clause BSD licence . module Main where import System.ZMQ4.Monadic import Test.Hspec hiding (pending) import Control.Concurrent import Data.HashMap.Strict (fromList) import Data.Maybe import Data.String import Data.Text import Network.URI impor...
8bbef76c58e4738427e01fd39238898e01bdda370e590cda9530906d7f367096
yoriyuki/Camomile
xArray.mli
(** XArray : extensible arrays *) Copyright ( C ) 2002 , 2003 . (* This library 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 ; either version 2 of the License , or ( at your option ) any...
null
https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/Camomile/internal/xArray.mli
ocaml
* XArray : extensible arrays This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License may link, statically or dynamically, a "work that uses this library" with a publicly distributed version of this library to produce an executable file c...
Copyright ( C ) 2002 , 2003 . as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exception to the GNU Library General Public License , you additional requirements listed in clause 6 of the GNU Library General we mean ei...
b395d83695f3c3953cce2875d7e6cde9b765f77aa4cc6a054de32c2e9e96ff3c
wh5a/thih
DataConsAssump.hs
------------------------------------------------------------------------------ Copyright : The Hatchet Team ( see file Contributors ) Module : DataConsAssump Description : Computes the type assumptions of data ...
null
https://raw.githubusercontent.com/wh5a/thih/dc5cb16ba4e998097135beb0c7b0b416cac7bfae/hatchet/DataConsAssump.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -----------------------------------------------------------------------------} ------------------------------------------------------------------------------ we sho...
Copyright : The Hatchet Team ( see file Contributors ) Module : DataConsAssump Description : Computes the type assumptions of data constructors in a module For example : ...
bc1d631e7a3ac3d6f60ff945889a3600faf0a90935427d25ddddb4271a9c429c
jacekschae/learn-reitit-course-files
auth0.clj
(ns cheffy.auth0 (:require [clj-http.client :as http] [muuntaja.core :as m])) (defn get-test-token [email] (->> {:content-type :json :cookie-policy :standard :body (m/encode "application/json" {:client_id "ts5NfJYbsIZ6rvhmbKykF9TkWz0tKcGS" :audience "-...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/47-tests-refactor/src/cheffy/auth0.clj
clojure
(ns cheffy.auth0 (:require [clj-http.client :as http] [muuntaja.core :as m])) (defn get-test-token [email] (->> {:content-type :json :cookie-policy :standard :body (m/encode "application/json" {:client_id "ts5NfJYbsIZ6rvhmbKykF9TkWz0tKcGS" :audience "-...
f6bb6fbdffe6f2be8a6e28c3393c61fd2da75501a34a38627b233e274fa3596e
rizo/snowflake-os
listLabels.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , Kyot...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/listLabels.ml
ocaml
********************************************************************* Objective Caml ...
, Kyoto University RIMS Copyright 2001 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 $ I d : listLabels.ml , v 1.3 2001 - 12 - ...
197c07b73efa55385c5c8a3f79ff1134d8974281ac564f08a50e20762965799e
exercism/haskell
Tests.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import WordProblem (answer) main :: IO () main = hspecWith defaultConfig {configFastFa...
null
https://raw.githubusercontent.com/exercism/haskell/f81ee7dc338294b3dbefb7bd39fc193546fcec26/exercises/practice/wordy/test/Tests.hs
haskell
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE RecordWildCards # import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import WordProblem (answer) main :: IO () main = hspecWith defaultConfig {configFastFa...
ccd8d68c66d5811e5f286d25c0a6f2c26f196e9b9e6f1be31822ee53c676b03a
typeclasses/loc
Pos.hs
module Data.Loc.Pos ( Pos, Line, Column, ToNat (..), -- * Show and Read posShowsPrec, posReadPrec, ) where import Data.Loc.Internal.Prelude import Prelude (Num (..)) import Data.Data (Data) | ' Pos ' stands for /positive integer/. You can also think of it as , because we use it to represe...
null
https://raw.githubusercontent.com/typeclasses/loc/9fe47b1f6097bbe0d850443bcdea5267c955a3c5/loc/src/Data/Loc/Pos.hs
haskell
* Show and Read ------------------------------------------------------------------------------ ToNat ------------------------------------------------------------------------------ | Types that can be converted to 'Natural'. This class mostly exists so that 'toNat' can be used in situations that would normally cal...
module Data.Loc.Pos ( Pos, Line, Column, ToNat (..), posShowsPrec, posReadPrec, ) where import Data.Loc.Internal.Prelude import Prelude (Num (..)) import Data.Data (Data) | ' Pos ' stands for /positive integer/. You can also think of it as , because we use it to represent line and column numb...
1200d4b8d67f963fc07c9ee4e38bb8b410629e60b4273484e34612333a319c0e
esoeylemez/rapid
Rapid.hs
-- | Copyright : ( c ) 2016 -- License: BSD3 Maintainer : < > -- Stability: experimental -- -- This module provides a rapid prototyping suite for GHCi that can be -- used standalone or integrated into editors. You can hot-reload -- individual running components as you make changes to their code. It -- ...
null
https://raw.githubusercontent.com/esoeylemez/rapid/aae24ba82ef9972b10fb3cfd57049d844d521750/Rapid.hs
haskell
| License: BSD3 Stability: experimental This module provides a rapid prototyping suite for GHCi that can be used standalone or integrated into editors. You can hot-reload individual running components as you make changes to their code. It is designed to shorten the development cycle during the development...
Copyright : ( c ) 2016 Maintainer : < > module Rapid * * notes Rapid, rapid, restart, restartWith, start, startWith, stop, createRef, deleteRef, writeRef ) where import Control.Concurrent.Async import Control.Concurrent.STM imp...
d8c0588556d27b88043af14b6d0878bb66fe908509c6f255bb6b7a5cca7b221b
aryx/yacfe
oassoc_cache.ml
open Common open Oassoc open Oassocb open Osetb todo : gather stat of use per key , so when flush , try keep * entries that are used above a certain threshold , and if after * this step , there is still too much , then erase also those keys . * * todo : limit number of entries , and erase all ( then be...
null
https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/commons_ocollection/oassoc_cache.ml
ocaml
!!take care!!: this class has side effect, not a pure oassoc can not make it pure, cos the assoc have side effect on the cache bugfix: have to flush !!! bugfix: have to flush !!! bugfix: have to flush !!! may launch Not_found, but this time, dont catch it otherwise can use too much mem sometimes have not...
open Common open Oassoc open Oassocb open Osetb todo : gather stat of use per key , so when flush , try keep * entries that are used above a certain threshold , and if after * this step , there is still too much , then erase also those keys . * * todo : limit number of entries , and erase all ( then be...
9b04fcb418ba37bbfdb0e080eb2fe267b4f5d7a7b495facf2954d4696917b853
jtdaugherty/tracy
Local.hs
{-# LANGUAGE BangPatterns #-} module Tracy.RenderManagers.Local ( localRenderManager ) where import Control.Applicative import Control.Concurrent.Chan import Control.Lens import Control.Monad import qualified Data.Map as M import qualified Data.Vector as V import System.Random.MWC import Tracy.Types import Trac...
null
https://raw.githubusercontent.com/jtdaugherty/tracy/ad36ea16a3b9cda5071ca72374d6e1c1b415d520/src/Tracy/RenderManagers/Local.hs
haskell
# LANGUAGE BangPatterns # though we won't use this frame (necessarily). This is just so we can get access to the samplers and other details that will not (or should not) change per frame. Generate sample data for square and disk samplers
module Tracy.RenderManagers.Local ( localRenderManager ) where import Control.Applicative import Control.Concurrent.Chan import Control.Lens import Control.Monad import qualified Data.Map as M import qualified Data.Vector as V import System.Random.MWC import Tracy.Types import Tracy.SceneBuilder import Tracy.Sa...
7466f6748c756cbba4cec5a79d5df3c86adfb330629d5309534fe4b73e1180e1
xclerc/ocamljava
args.mli
* This file is part of OCaml - Java optimizer . * Copyright ( C ) 2007 - 2015 . * * optimizer 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 ; either version 3 of the License , o...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/optimizer/src/args.mli
ocaml
* Handling of command-line parameters. * Classpath elements. * Whether to assume absence of backtrace. * Whether to remove debug statements. * Whether to assume absence of dynamic linking. * Whether to remove support for runtime lock. * Whether to remove support for signals. * Whether to remove initialization of...
* This file is part of OCaml - Java optimizer . * Copyright ( C ) 2007 - 2015 . * * optimizer 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 ; either version 3 of the License , o...
53ceb288957be40275c43aee350ddde6c909ed14da51358102c2da3fba63bd5e
cyppan/grape
http_test.clj
(ns grape.http-test (:require [clojure.test :refer :all] [grape.http :refer :all] [grape.schema :refer :all] [bidi.ring :refer [make-handler]] [schema.core :as s] [grape.fixtures.comments :refer :all] [grape.rest.route :refer [handler-builder]] ...
null
https://raw.githubusercontent.com/cyppan/grape/62488a335542fc58fc9126b8d5ff7fccdd16f1d7/test/grape/http_test.clj
clojure
token generated with jwt.io token generated with jwt.io we setup a simple handler that responds with the incoming request invalid token we setup a simple handler that responds with the incoming request invalid token we setup a simple handler that responds with the incoming request invalid token we setup a simp...
(ns grape.http-test (:require [clojure.test :refer :all] [grape.http :refer :all] [grape.schema :refer :all] [bidi.ring :refer [make-handler]] [schema.core :as s] [grape.fixtures.comments :refer :all] [grape.rest.route :refer [handler-builder]] ...
376630ec8fb4f24ad5e21d02e01afcbd3508e3aa4c29ba9f5de515c4c0ee4993
re-ops/re-cipes
k8s.clj
(ns re-cipes.infra.k8s "k8s setup" (:require [re-cipes.access :refer (permissions)] [re-cog.common.recipe :refer (require-recipe)] [re-cog.resources.download :refer (download)] [re-cog.resources.file :refer (rename symlink chmod)])) (require-recipe) (def-inline {:depends #'re-cipes.access/permissions}...
null
https://raw.githubusercontent.com/re-ops/re-cipes/183bdb637e54df1c6f20e8d529132e0c004e8ead/src/re_cipes/infra/k8s.clj
clojure
(ns re-cipes.infra.k8s "k8s setup" (:require [re-cipes.access :refer (permissions)] [re-cog.common.recipe :refer (require-recipe)] [re-cog.resources.download :refer (download)] [re-cog.resources.file :refer (rename symlink chmod)])) (require-recipe) (def-inline {:depends #'re-cipes.access/permissions}...
f72ef0d5606e58aaebae4ab03df276aa9ebf4598979ee4662e008ee2b38f9987
UU-ComputerScience/uhc
pr-nmintro1.hs
class A a f :: A a => a -> a g = \{! d <: A a !} a -> a main = g {! () <: A Int !} 3
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/12/pr-nmintro1.hs
haskell
class A a f :: A a => a -> a g = \{! d <: A a !} a -> a main = g {! () <: A Int !} 3
2de0dc698d145ca96afa7ad021a87f2aa7ad776098278651806c4357df6fbb90
johnlawrenceaspden/hobby-code
hello.clj
#!/usr/bin/env clojure (println "Hello World") (require 'cemerick.pomegranate)
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/3961bc2c3909a4daa632afbd2783526f744fd4cf/clojure2022/hello.clj
clojure
#!/usr/bin/env clojure (println "Hello World") (require 'cemerick.pomegranate)
dfa1a123258b34c3599b2c1668c9f5bf4fda7e9a07a8ce655bf93819451c9301
mwand/eopl3
environments.scm
(module environments (lib "eopl.ss" "eopl") ;; builds environment interface, using data structures defined in ;; data-structures.scm. (require "data-structures.scm") (provide init-env empty-env extend-env apply-env) ;;;;;;;;;;;;;;;; initial environment ;;;;;;;;;;;;;;;; ;; init-env : () -> Env usa...
null
https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter3/let-lang/environments.scm
scheme
builds environment interface, using data structures defined in data-structures.scm. initial environment ;;;;;;;;;;;;;;;; init-env : () -> Env (init-env) builds an environment in which i is bound to the environment constructors and observers ;;;;;;;;;;;;;;;;
(module environments (lib "eopl.ss" "eopl") (require "data-structures.scm") (provide init-env empty-env extend-env apply-env) usage : ( init - env ) = [ i=1 , v=5 , x=10 ] expressed value 1 , v is bound to the expressed value 5 , and x is bound to the expressed value 10 . Page : 69 (define init...
33283d7d207d1ccd47c0292eba86247c7e579c32ee855ed9c7513b39be8a8501
mindreframer/clojure-stuff
tcp.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/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/ztellman/aleph/src/aleph/tcp.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 aleph.tcp (:use [lamina core trace] [aleph netty formats]) (:import [java.nio.channels ClosedChannelException])) (defn- wrap-tcp-channel [options ch] (with-meta (wrap-socket-channel options (let [ch* (channel)] (join (map...
6d562c88e8dbbf87780b8f9d68d8406a525077c4d6b00f3028495b2793329742
TheLortex/mirage-monorepo
positions.ml
This module builds a buffer of " instructions " , in order to represent a compact sequence of delimiting positions and newlines . The parser stores the positions of each : - newline - beginning of atom - end of atom - left parenthesis - right parenthesis Instructions are encoded a...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/parsexp/src/positions.ml
ocaml
* Length in bytes. number of wasted bytes to fill a word Filled chunks in reverse order Offset of the last saved position or newline plus one, or [initial_pos] the [num_bits] least significant bits of [int_buf] are the bits not yet pushed to [chunk]. number of bits stored in [int_buf] We need ...
This module builds a buffer of " instructions " , in order to represent a compact sequence of delimiting positions and newlines . The parser stores the positions of each : - newline - beginning of atom - end of atom - left parenthesis - right parenthesis Instructions are encoded a...
fd359872b6221a11fe83bd6bca7d145d58b504e100e35acc5e1baa8da51908d3
hatsugai/Guedra
vscroll.ml
open Csp open Guedra open Scroll let init wch pch cch nch range0 page0 index0 = let pque = Queue.create () in let nque = Queue.create () in let cc = make_cc range0 page0 index0 in let rec process () = let event_list = [ recvEvt wch always win_msg; recvEvt cch always win_cmd ] in sele...
null
https://raw.githubusercontent.com/hatsugai/Guedra/592e9b4cff151228735d2c61c337154cde8b5329/src/vscroll.ml
ocaml
background thumb page up page down thumb
open Csp open Guedra open Scroll let init wch pch cch nch range0 page0 index0 = let pque = Queue.create () in let nque = Queue.create () in let cc = make_cc range0 page0 index0 in let rec process () = let event_list = [ recvEvt wch always win_msg; recvEvt cch always win_cmd ] in sele...
fe1303ae5582a8d3b272e8160984e10a208efb60101d16e65752e537caf7d403
yomimono/stitchcraft
pat2stitchy.ml
let input = let doc = "file from which to read" and docv = "FILE" in Cmdliner.Arg.(value & pos_all string [] & info [] ~doc ~docv) let verbose = let doc = "print file metadata on stderr" and docv = "VERBOSE" in Cmdliner.Arg.(value & flag & info ["v";"verbose"] ~doc ~docv) let info = let doc = "read .pat...
null
https://raw.githubusercontent.com/yomimono/stitchcraft/f2920cb13be030fecab1d23d9320ace051767158/patreader/src/pat2stitchy.ml
ocaml
let input = let doc = "file from which to read" and docv = "FILE" in Cmdliner.Arg.(value & pos_all string [] & info [] ~doc ~docv) let verbose = let doc = "print file metadata on stderr" and docv = "VERBOSE" in Cmdliner.Arg.(value & flag & info ["v";"verbose"] ~doc ~docv) let info = let doc = "read .pat...
58389e16580cca3d1253bd1838a11f71d0bcc0e6bcc1e53f5143cef0eb005aac
tonyg/kali-scheme
jar-defrecord.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . ; This knows about the implementation of records and creates the various accessors , mutators , etc . directly instead of calling the procedures ; from the record structure. This is done to all...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/rts/jar-defrecord.scm
scheme
This knows about the implementation of records and creates the various from the record structure. This is done to allow the optional auto-inlining LOOPHOLE is used to get a little compile-time type checking (in addition to the usual complete run-time checking). (define-constructor <id> <type> ((<arg> <arg-type>)*...
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . accessors , mutators , etc . directly instead of calling the procedures optimizer to inline the accessors , mutators , etc . (define-syntax define-record-type (syntax-rules () ((define...
068ece6ece3baef017a97453623bd9ea13bc5b41e6d42658e1dec4df3d346bbe
freedesktop/bustle
Setup.hs
# LANGUAGE CPP # # OPTIONS_GHC -Wall # #if defined(VERSION_hgettext) import System.FilePath ( (</>), (<.>) ) import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.BuildPaths ( autogenPackageModulesDir ) import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Setup ...
null
https://raw.githubusercontent.com/freedesktop/bustle/e506b5ca71e14af3d2ebd0a63c1b8d3ea0fb1795/Setup.hs
haskell
Okay, so we want to use hgettext's install hook, but not the hook that purely an academic preference.) Instead, we generate GetText_bustle.hs which contains the constants, in the TODO: upstream this to hgettext Cargo-culted from hgettext
# LANGUAGE CPP # # OPTIONS_GHC -Wall # #if defined(VERSION_hgettext) import System.FilePath ( (</>), (<.>) ) import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.BuildPaths ( autogenPackageModulesDir ) import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Setup ...
335e22d2346b7f226542b411b571a70b0e17e5ac96cf1a413db830128b7b7a2a
tcsprojects/pgsolver
localmodelchecker.mli
open Paritygame ;; val partially_solve : partial_solver val solve : global_solver val register: unit -> unit
null
https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/solvers/localmodelchecker.mli
ocaml
open Paritygame ;; val partially_solve : partial_solver val solve : global_solver val register: unit -> unit
c3ae3fb9ef7e69d4f3855323e0e3dfdf124be4b2eafeeda87300f5882df9ae1e
dgtized/shimmers
point_to_point.cljs
(ns shimmers.sketches.point-to-point (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.common.framerate :as framerate] [shimmers.common.quil :as cq] [shimmers.math.points :as points] [shimmers.sketch :as sketch :include-macros true] [thi.ng.geom.core :as g] [th...
null
https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/point_to_point.cljs
clojure
Some experiments with drawing lines derived from a set of random points
(ns shimmers.sketches.point-to-point (:require [quil.core :as q :include-macros true] [quil.middleware :as m] [shimmers.common.framerate :as framerate] [shimmers.common.quil :as cq] [shimmers.math.points :as points] [shimmers.sketch :as sketch :include-macros true] [thi.ng.geom.core :as g] [th...
115d91b2fd82419213ea85f5251bee774c4be2433d2fbd7e4d2b314062ec4a46
christoph-frick/factorio-blueprint-tools
tile.cljc
(ns factorio-blueprint-tools.tile (:require [com.rpl.specter :as s] [factorio-blueprint-tools.blueprint :as blueprint])) (defn width-and-height [blueprint] (case (blueprint/snap blueprint) :default (let [area (blueprint/blueprint-area blueprint) [[min-x min-y] [max-x max-y]] area ...
null
https://raw.githubusercontent.com/christoph-frick/factorio-blueprint-tools/58da0ed00eae2d53f5fea6691af22daf90f608b7/src/factorio_blueprint_tools/tile.cljc
clojure
(ns factorio-blueprint-tools.tile (:require [com.rpl.specter :as s] [factorio-blueprint-tools.blueprint :as blueprint])) (defn width-and-height [blueprint] (case (blueprint/snap blueprint) :default (let [area (blueprint/blueprint-area blueprint) [[min-x min-y] [max-x max-y]] area ...
dd5c65a97ed6f16640abb613e26906ec9785bd5a62ff363008e3065faa663d2e
regex-generate/regenerate
langgen.ml
module type SIGMA = sig type t val sigma : t end module[@inline always] Make (Word : Word.S) (Segment : Segments.S with type elt = Word.t) (Sigma : SIGMA with type t = Segment.t) = struct module Word = Word module Segment = Segment (** Spline of a language, a cascade-like thunk list with multip...
null
https://raw.githubusercontent.com/regex-generate/regenerate/a616d6c2faf4a55f794ac9b6fbf03acca91fbeb9/lib/langgen.ml
ocaml
* Spline of a language, a cascade-like thunk list with multiple nils. * Utilities * Concatenation indices are in decreasing order, we can bail early. * Star * Others ** * Exporting The number of element to always take at the beginning. Draw the amount of element we skip and store the next element to take. ...
module type SIGMA = sig type t val sigma : t end module[@inline always] Make (Word : Word.S) (Segment : Segments.S with type elt = Word.t) (Sigma : SIGMA with type t = Segment.t) = struct module Word = Word module Segment = Segment type node = | Nothing | Everything | Cons of Segmen...
ebd192d9e518aa3b081c68922e392168025c30734520d2d942d50d95074b01d2
janestreet/patdiff
import.mli
open! Core open! Async include module type of struct include Expect_test_helpers_core include Expect_test_helpers_async end val links : (string * [ `In_path_as | `In_temp_as ] * string) list val patdiff : extra_flags:string list -> prev:string -> next:string -> unit Deferred.t val patdiff_dir : extra_flags:st...
null
https://raw.githubusercontent.com/janestreet/patdiff/95b83a1b69f6dac9ab97c612feccbda1ac2c18c9/test/src/import.mli
ocaml
open! Core open! Async include module type of struct include Expect_test_helpers_core include Expect_test_helpers_async end val links : (string * [ `In_path_as | `In_temp_as ] * string) list val patdiff : extra_flags:string list -> prev:string -> next:string -> unit Deferred.t val patdiff_dir : extra_flags:st...
7b23c8a18644b991fc483b01fc6b68b7e4c7aeccf3f213275107b7f732d221f6
jvf/scalaris
dht_node.erl
2007 - 2015 Zuse Institute Berlin 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 d...
null
https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/dht_node.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 or implied. See the License for the specific language gov...
2007 - 2015 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(dht_node). -author(''). -vsn('$Id$'). -include("scalaris.hrl"). -include("client_types.hrl"). -include("loo...
d467cfc4ec1322aa41dd11d515f63d0cfb61d5e5a2f33a580d42c89de3f4706b
francescoc/scalabilitywitherlangotp
tcp_wrapper.erl
-module(tcp_wrapper). -export([start_link/2, cast/3]). -export([init/3, system_continue/3, system_terminate/4, init_request/2]). %-export([behaviour_info/1]). -callback init_request() -> {'ok', Reply :: term()}. -callback get_request(Data :: term(), LoopData :: term()) -> {'ok', Reply :: term()} | {'stop'...
null
https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch10/tcp_wrapper.erl
erlang
-export([behaviour_info/1]). behaviour_info(callbacks) ->
-module(tcp_wrapper). -export([start_link/2, cast/3]). -export([init/3, system_continue/3, system_terminate/4, init_request/2]). -callback init_request() -> {'ok', Reply :: term()}. -callback get_request(Data :: term(), LoopData :: term()) -> {'ok', Reply :: term()} | {'stop', Reason :: atom(), LoopData :...
6f405e755119cff8277f940be3de0a3a39b394902d29cd7a863efcc441db8bdb
ocaml/dune
clflags.ml
let store_orig_src_dir = ref false let ignore_promoted_rules = ref false let promote_install_files = ref false let display = Dune_engine.Clflags.display let capture_outputs = Dune_engine.Clflags.capture_outputs let debug_artifact_substitution = ref false
null
https://raw.githubusercontent.com/ocaml/dune/4edb5ff19aa3efcabdc8194ef7f837e49866517b/src/dune_rules/clflags.ml
ocaml
let store_orig_src_dir = ref false let ignore_promoted_rules = ref false let promote_install_files = ref false let display = Dune_engine.Clflags.display let capture_outputs = Dune_engine.Clflags.capture_outputs let debug_artifact_substitution = ref false
f52e123d16b8a3564ec9efd9a532c210fd64465f37c988f296e440ed56b39526
Lysxia/generic-data
Data.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | Generic representations as data types. -- -- === Warning -- -- T...
null
https://raw.githubusercontent.com/Lysxia/generic-data/846fafb9ec1e4e60424e4f266451665fe25fdfa9/src/Generic/Data/Internal/Data.hs
haskell
# LANGUAGE DeriveTraversable # | Generic representations as data types. === Warning This is an internal module: it is not subject to any versioning policy, breaking changes can happen at any time. If something here seems useful, please report it or create a pull request to export it from an external module. |...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Generic.Data.Internal.Data where import Control.Applicative import Control.Monad import Data.Fu...
1f19aab4fd5f8ec54c3a5827666a1c46c2fe6b1d2b2d907c4420fc7e2620874c
s-cerevisiae/leetcode-racket
525-contiguous-array.rkt
#lang racket (define (find-max-length nums) (define table (make-hash '((0 . -1)))) (for/fold ([cnt 0] [len 0] #:result len) ([n (in-list nums)] [i (in-naturals)]) (define next-cnt ((if (= n 1) add1 sub1) cnt)) (define prev-i (hash-ref! table next-cnt i)) (val...
null
https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/13289f66ef8d0375909cedd8aacaaed57b1b3ca4/525-contiguous-array.rkt
racket
#lang racket (define (find-max-length nums) (define table (make-hash '((0 . -1)))) (for/fold ([cnt 0] [len 0] #:result len) ([n (in-list nums)] [i (in-naturals)]) (define next-cnt ((if (= n 1) add1 sub1) cnt)) (define prev-i (hash-ref! table next-cnt i)) (val...
33ed6c9956bbb187aeeeaab3a4e2db9bdb1f9d474214930986c0183af3c53a15
flodihn/NextGen
obj_loop.erl
%%---------------------------------------------------------------------- @author < > %% @doc %% This module contains the object loop that every object executes. %% @end %%---------------------------------------------------------------------- -module(obj_loop). -author(""). @headerfile " obj.hrl " -include(...
null
https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/AreaServer/src/obj_loop.erl
erlang
---------------------------------------------------------------------- @doc This module contains the object loop that every object executes. @end ---------------------------------------------------------------------- Exports for fitting into a supervisor tree Exports used by other modules. ------------------------...
@author < > -module(obj_loop). -author(""). @headerfile " obj.hrl " -include("obj.hrl"). -export([ start_link/2 ]). Interal exports -export([ loop_init/1, loop_init/2, loop/1 ]). -export([ has_fun/3 ]). , Type ) - > { ok , Pid } { existing_state , State } , Type ...
852de904175a7356dff237651b511c41656ddda73ebfaf4d1499f21c444bc18a
bufferswap/ViralityEngine
material.lisp
(in-package #:virality) ;; material-profile impl ;; NOTE: will be replaced by defstruct constructor (defun %make-material-profile (&rest init-args) (apply #'make-instance 'material-profile init-args)) (defun %add-material-profile (profile core) (setf (u:href (profiles (materials core)) (name profile)) profile))...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/core-late/material.lisp
lisp
material-profile impl NOTE: will be replaced by defstruct constructor material impl TODO: Fix %make-material so I don't have to do this. Now we copy over the uniforms Now we copy over the blocks. TODO: we probably need to call into core buffer binding management services to perform the binding right here. expo...
(in-package #:virality) (defun %make-material-profile (&rest init-args) (apply #'make-instance 'material-profile init-args)) (defun %add-material-profile (profile core) (setf (u:href (profiles (materials core)) (name profile)) profile)) (defun %make-material (id shader instances attributes profiles core) (...
e1d2ce45dd0d82993cf05da60ebc10070cd9ecb6af927466ca73871feb115772
kelvin-mai/clj-auth
utils.clj
(ns auth.utils (:require [buddy.auth :refer [authenticated?]] [buddy.auth.backends :as backends] [buddy.auth.middleware :refer [wrap-authentication]] [buddy.sign.jwt :as jwt])) (def jwt-secret "JWT_SECRET") (def backend (backends/jws {:secret jwt-secret})) (defn wrap-jwt-authenti...
null
https://raw.githubusercontent.com/kelvin-mai/clj-auth/254a82d01c731bf18a5974408d3c5cf5ab159aaf/src/auth/utils.clj
clojure
(ns auth.utils (:require [buddy.auth :refer [authenticated?]] [buddy.auth.backends :as backends] [buddy.auth.middleware :refer [wrap-authentication]] [buddy.sign.jwt :as jwt])) (def jwt-secret "JWT_SECRET") (def backend (backends/jws {:secret jwt-secret})) (defn wrap-jwt-authenti...
6c9565549e2dbf784109663949bac1823ffdc2eae600fd509595694c914fa6be
achirkin/vulkan
VK_NV_coverage_reduction_mode.hs
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # {-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternSynonyms #-} {-# LA...
null
https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_NV_coverage_reduction_mode.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE MagicHash # # LANGUAGE PatternSynonyms # # LANGUAGE Strict # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | supported: @vulkan@ contact: @Kedarnath Thangud...
# OPTIONS_GHC -fno - warn - orphans # # OPTIONS_HADDOCK not - home # # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # module Graphics.Vulkan.Ext.VK_NV_coverage_reduction_mode * Vulkan extension : @VK_NV_coverage_reduction_mode@ author : module Graphics.Vulkan.Marshal, AHardware...
394fa4acbb702501b984068f1c5961b010a98cd438c45b17ff4088dd253b345f
svdm/ClojureGP
helpers.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 t...
null
https://raw.githubusercontent.com/svdm/ClojureGP/266e501411b37297bdeb082913df63ececa8515c/test/helpers.clj
clojure
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 this notice, or any other, from this software. Various functions and data structure...
Copyright ( c ) . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns test.helpers (:use clojure.test cljgp.breeding cljgp.generate cljgp.selection cljgp.config cljgp.random cljgp.util) (:impor...
4a2f1ca7b4f9adc91d5906bac932213b12928ac38a28e2553e2447d70b9f25a2
LPCIC/matita
content.ml
Copyright ( C ) 2000 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of the GNU...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content/content.ml
ocaml
************************************************************************ 16/6/2003 ...
Copyright ( C ) 2000 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of the GNU...
1b7e194ab04deef660af5babb4cebe809212d8d049468f36e09077ed28fd8552
shayne-fletcher/zen
heap.ml
(* Heaps *) module type S = sig val heap_sort : 'a array -> 'a array val heap_max : 'a array -> 'a val heap_extract_max : 'a array -> int -> 'a * int val heap_increase_key : 'a array -> int -> unit val max_heap_insert : 'a array -> int -> int -> int end module Heap = struct let parent i = i/2 - 1 let...
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/prep/sort/heap.ml
ocaml
Heaps In a max-heap,[i (i <> 0). arr.(parent (i)) >= arr.(i)]. That is, the value of a node is at most the value of its parent. [max_heapfiy ~heapsize i] arranges for the subtree rooted at [i] to be a max-heap under the assumption the children of [i] are sub-heaps. [heap_sort arr] sorts in-place...
module type S = sig val heap_sort : 'a array -> 'a array val heap_max : 'a array -> 'a val heap_extract_max : 'a array -> int -> 'a * int val heap_increase_key : 'a array -> int -> unit val max_heap_insert : 'a array -> int -> int -> int end module Heap = struct let parent i = i/2 - 1 let left i = ...
9e7d68015af565967927877f67e4a2fdeb7f099815cf82a74db27746c88d7cd6
alei76/java-blog-hxzon
monads_101.clj
;; monads_101.clj ;; Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; By using this software in any fashion, you are agreeing to be bound ;; by the terms of this license. You must not remove this not...
null
https://raw.githubusercontent.com/alei76/java-blog-hxzon/ecde3517edccf632f8fa14da95f2f382387d3b39/1%EF%BC%8C%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/1%EF%BC%8Cclojure/monad/monads_101.clj
clojure
monads_101.clj Public License 1.0 (-1.0.php) 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. ========== a monadic function under the sequence-m monad the monad name is not needed if the 'domon...
Copyright ( c ) , 2009 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (use 'clojure.contrib.monads) (import 'java.net.URLDecoder) (with-monad sequence-m (defn f2 [n] (list (inc n))) (assert (= [2 6 8] ...
0d76e9acd429588cfee27c8fd9b5315498231c32febb04974ba83465676066bb
JoaoVasques/kafka-async
core_test.clj
(ns kafka-async.core-test (:require [clojure.test :refer :all] [kafka-async.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/JoaoVasques/kafka-async/fa548418c3b0e486d0d2c3586367ed8dd3935a4d/test/kafka_async/core_test.clj
clojure
(ns kafka-async.core-test (:require [clojure.test :refer :all] [kafka-async.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
62fc08fef1e16e8ef54a51fb14a8d6ef979fe4f1cb31768ed57187a5cfc0972b
owlbarn/owl_ode
symplectic_s.ml
* OWL - OCaml Scientific and Engineering Computing * OWL - ODE - Ordinary Differential Equation Solvers * * Copyright ( c ) 2019 > * Copyright ( c ) 2019 < > * OWL - OCaml Scientific and Engineering Computing * OWL-ODE - Ordinary Differential Equation Solvers * * Copyright (c) 2019 Ta-Chu...
null
https://raw.githubusercontent.com/owlbarn/owl_ode/5d934fbff87eea9f060d6c949bf78467024d8791/src/ode/symplectic/symplectic_s.ml
ocaml
* OWL - OCaml Scientific and Engineering Computing * OWL - ODE - Ordinary Differential Equation Solvers * * Copyright ( c ) 2019 > * Copyright ( c ) 2019 < > * OWL - OCaml Scientific and Engineering Computing * OWL-ODE - Ordinary Differential Equation Solvers * * Copyright (c) 2019 Ta-Chu...
fd858da6b34a5f5720623de284fee2c6c7d8e0b844c2073fb09b258ebd6a90cf
ostera/serde.ml
de_record.ml
open Ppxlib module Ast = Ast_builder.Default open De_base (** implementation *) let gen_visit_map ~ctxt ~type_name:_ ?constructor ~field_visitor kvs parts = let loc = loc ~ctxt in let create_value = let value = Ast.pexp_record ~loc kvs None in let value = match constructor with | None -> value...
null
https://raw.githubusercontent.com/ostera/serde.ml/88604884cf3e6a928916f33c4bca1444bc2e12a2/serde_derive/de_record.ml
ocaml
* implementation
open Ppxlib module Ast = Ast_builder.Default open De_base let gen_visit_map ~ctxt ~type_name:_ ?constructor ~field_visitor kvs parts = let loc = loc ~ctxt in let create_value = let value = Ast.pexp_record ~loc kvs None in let value = match constructor with | None -> value | Some c -> ...
536c237ff27a119f4c1a9276a2015d9afc535fa92ba3b8faced1826e411336ac
erikd/haskell-big-integer-experiment
Type.hs
# LANGUAGE CPP , MagicHash , ForeignFunctionInterface , NoImplicitPrelude , BangPatterns , UnboxedTuples , UnliftedFFITypes # NoImplicitPrelude, BangPatterns, UnboxedTuples, UnliftedFFITypes #-} -- Commentary of Integer library is located on the wiki: -- -- -- ...
null
https://raw.githubusercontent.com/erikd/haskell-big-integer-experiment/7841ec3fcc5be219fa16963849bd12137112f8a9/Simple/GHC/Integer/Type.hs
haskell
Commentary of Integer library is located on the wiki: It gives an in-depth description of implementation details and decisions. --------------------------------------------------------------------------- | Module : Simple.GHC.Integer.Type License : BSD3 Maintainer : Stability : internal A...
# LANGUAGE CPP , MagicHash , ForeignFunctionInterface , NoImplicitPrelude , BangPatterns , UnboxedTuples , UnliftedFFITypes # NoImplicitPrelude, BangPatterns, UnboxedTuples, UnliftedFFITypes #-} Copyright : ( c ) 2007 - 2012 Portability : non - por...
2d63249f96bebed4d1fe37bb4dc9f213d74a5f03a9260206682404c749e85503
zerowidth/hansel
text_interface.clj
(ns hansel.text-interface (:require [clojure.string :as str]) (:use [hansel.grid :only [neighbors]])) (defn graph-from-text "Convert a text represenation of a graph to its node transitions, start point, and dest point. text - the text representation of a graph: a = start, z = dest, . = open. . . . . ....
null
https://raw.githubusercontent.com/zerowidth/hansel/9bcac5dcbabc3af6b0378030bcbbb39d69a7331c/src/hansel/text_interface.clj
clojure
(ns hansel.text-interface (:require [clojure.string :as str]) (:use [hansel.grid :only [neighbors]])) (defn graph-from-text "Convert a text represenation of a graph to its node transitions, start point, and dest point. text - the text representation of a graph: a = start, z = dest, . = open. . . . . ....
7abeb181fc74b4beab7084657ad69b99f1dc767ec48b772343da58b14b467608
janestreet/memtrace_viewer
keyboard_scope.mli
open! Core open Bonsai_web type t = { view : Vdom.Node.t ; key_help : Vdom_keyboard.Help_text.t } val wrap : view:Vdom.Node.t -> key_handler:Vdom_keyboard.Keyboard_event_handler.t -> t
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/keyboard_scope.mli
ocaml
open! Core open Bonsai_web type t = { view : Vdom.Node.t ; key_help : Vdom_keyboard.Help_text.t } val wrap : view:Vdom.Node.t -> key_handler:Vdom_keyboard.Keyboard_event_handler.t -> t
4891c491a38d2d5b9851ccd33af712da60431ff90412a78e02e3ff1b963cf915
mhallin/graphql_ppx
enum_input.ml
open Test_shared module MyQuery = [%graphql {| query ($arg: SampleField!) { enumInput(arg: $arg) } |}] let encodes_arguments () = Alcotest.check yojson "json" (MyQuery.make ~arg:`FIRST ())#variables (Yojson.Basic.from_string {| { "arg": "FIRST" } |}) let tests = [ "Encodes enum arguments to strin...
null
https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/tests_native/enum_input.ml
ocaml
open Test_shared module MyQuery = [%graphql {| query ($arg: SampleField!) { enumInput(arg: $arg) } |}] let encodes_arguments () = Alcotest.check yojson "json" (MyQuery.make ~arg:`FIRST ())#variables (Yojson.Basic.from_string {| { "arg": "FIRST" } |}) let tests = [ "Encodes enum arguments to strin...
77539d830675547748c5a44de3be92a5e2c35c643bbed44cc0ec95b9ee014d12
MaskRay/OJHaskell
131.hs
import Math.Sieve.Factor main = print $ length $ filter (isPrime sie . f) $ takeWhile ((<=1000000) . f) [1..] where sie = sieve 1000000 f x = 3*x*x+3*x+1
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/131.hs
haskell
import Math.Sieve.Factor main = print $ length $ filter (isPrime sie . f) $ takeWhile ((<=1000000) . f) [1..] where sie = sieve 1000000 f x = 3*x*x+3*x+1
6c3396fdac8084b65e8eb7e4b3115ca102facae1b322bada089ab82592ae1dc1
clojars/clojars-web
maven.clj
(ns clojars.maven (:refer-clojure :exclude [parse-long]) (:require [clojars.file-utils :as fu] [clojure.edn :as edn] [clojure.java.io :as io]) (:import (org.apache.maven.artifact.repository.metadata Metadata) (org.apache.maven.artifact.repository.metadata.io.xpp3 MetadataXpp3Reader Meta...
null
https://raw.githubusercontent.com/clojars/clojars-web/22f831c9e8749ac7933af48655764ad5f5bdc3e8/src/clojars/maven.clj
clojure
neither are common. no winner x is known, but y isn't. x wins y is known, but x isn't. y wins both fractions are common, x has a lower sort order both fractions are common, y has a lower sort order x is longer, it's older y is longer, it's older same length, so string compare y has no qualifier, it's younger ...
(ns clojars.maven (:refer-clojure :exclude [parse-long]) (:require [clojars.file-utils :as fu] [clojure.edn :as edn] [clojure.java.io :as io]) (:import (org.apache.maven.artifact.repository.metadata Metadata) (org.apache.maven.artifact.repository.metadata.io.xpp3 MetadataXpp3Reader Meta...
574caaf562bdb3dcca896123bc4f65f13253ff883ee59b38ed95c4377916c553
lsrcz/grisette
InternedCtors.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # -- | Module : . IR.SymPrim . Data . Prim . InternedTerm . InternedCtors Copyright : ( c ) 2021 - 2023 -...
null
https://raw.githubusercontent.com/lsrcz/grisette/1d2fab89acb160ee263a41741454a5825094bd33/src/Grisette/IR/SymPrim/Data/Prim/InternedTerm/InternedCtors.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE GADTs # # LANGUAGE RankNTypes # | License : BSD-3-Clause (see the LICENSE file) Maintainer : Stability : Experimental # SOURCE # # INLINE iteTerm # # INLINE signumNumTerm # > b) -> Term a -> Term b
# LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # Module : . IR.SymPrim . Data . Prim . InternedTerm . InternedCtors Copyright : ( c ) 2021 - 2023 Portability : GHC only module Grisette.IR.SymPrim.Data.Prim.InternedTerm.InternedC...
84f2dd3569a7a070cc694a5530c62ce8ed992bb38fdc7c80f4ac3a95c171ee1c
ocaml/ocaml-lsp
import.ml
All modules from [ ] should be in the struct below . The modules are listed alphabetically . Try to keep the order . listed alphabetically. Try to keep the order. *) include struct open Stdune module Array = struct include Array let common_prefix_len ~equal (a : 'a array) (b : 'a array) : int =...
null
https://raw.githubusercontent.com/ocaml/ocaml-lsp/8367f37bab3fb036e19892e46843d3807e25b3a8/ocaml-lsp-server/src/import.ml
ocaml
All modules from [Lsp] should be in the struct below. The modules are listed alphabetically. Try to keep the order. Misc modules OCaml frontend All modules from [Lsp_fiber] should be in the struct below. The modules are listed alphabetically. Try to keep the order. All modules from [Lsp.Types] should be ...
All modules from [ ] should be in the struct below . The modules are listed alphabetically . Try to keep the order . listed alphabetically. Try to keep the order. *) include struct open Stdune module Array = struct include Array let common_prefix_len ~equal (a : 'a array) (b : 'a array) : int =...
a73767f1c804345092d0d8524fe9fc76e9e9362b04305a60c969e8f2be02aad3
rtoy/cmucl
cp1254.lisp
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ;;; ;;; ********************************************************************** This code was written by and has been placed in the public ;;; domain. ;;; (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1254.lisp $") (in-package...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/cp1254.lisp
lisp
-*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*- ********************************************************************** domain. See For undefined characters we use U+FFFE
This code was written by and has been placed in the public (ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1254.lisp $") (in-package "STREAM") (intl:textdomain "cmucl") (defconstant +ms-cp1254+ (make-array 128 :element-type '(unsigned-byte 16) :initial-contents...
54157ed8a3e68e328ea22522e0e7f7b88b420c9efddd0faae1ad1d5b10dbdf90
drewc/gerbil-swank
mit.scm
(declare (usual-integrations)) srfi 13 (define (string-start+end str start end) (let ((s (if (eq? #!default start) 0 start)) (e (if (eq? #!default end) (string-length str) end))) (values s e))) (define (string-start+end+start+end s1 start1 end1 s2 start2 end2) (let ((s (...
null
https://raw.githubusercontent.com/drewc/gerbil-swank/b772d84bb2dc54e1ac80136e9300c3c051980d1d/gerbil-swank/r7rs/specific/mit.scm
scheme
(define string-hash-ci string-ci-hash) (- tlen ti) -- how many chars left. (- plen pi) -- how many chars left. Win. Lose. Retreat. Here's the main loop. We have set rv[0] ... rv[i]. lp2 invariant: pat[(k-j) .. k-1] matches pat[start .. start+j-1] or j = -1. pat[(k-j) .. k] matches pat[start..start+j]. ad...
(declare (usual-integrations)) srfi 13 (define (string-start+end str start end) (let ((s (if (eq? #!default start) 0 start)) (e (if (eq? #!default end) (string-length str) end))) (values s e))) (define (string-start+end+start+end s1 start1 end1 s2 start2 end2) (let ((s (...
f6e0558c066f9a4e50fb48ec35fc27aadecb12fb0b4d8ccb5d203aef8c7fc805
strymonas/strymonas-ocaml
benchmark_seq.ml
module Seqb = struct open Seq type 'a cde = 'a code type 'a stream_raw = 'a t type 'a stream = 'a t cde let lift_tr1 : (('a -> 'b ) -> 'a stream_raw -> 'c stream_raw) cde -> ('a cde -> 'b cde) -> 'a stream -> 'c stream = fun tr f st -> .<.~tr (fun x -> .~(f .<x>.)) .~st>. let...
null
https://raw.githubusercontent.com/strymonas/strymonas-ocaml/29d83505b50a7dbb5d84b6a7d501b62ddadb92d4/benchmarks/benchmark_seq.ml
ocaml
Arrays used for benchmarking ~save:true
module Seqb = struct open Seq type 'a cde = 'a code type 'a stream_raw = 'a t type 'a stream = 'a t cde let lift_tr1 : (('a -> 'b ) -> 'a stream_raw -> 'c stream_raw) cde -> ('a cde -> 'b cde) -> 'a stream -> 'c stream = fun tr f st -> .<.~tr (fun x -> .~(f .<x>.)) .~st>. let...
cb6c32fc9c3f7fe9a9fd2789a4330ee4d98f303038eacfa9a8b518e8f9ac5d84
slipstream/SlipStreamServer
scheduler.clj
(ns sixsq.slipstream.metering.scheduler (:import (java.util.concurrent ScheduledThreadPoolExecutor TimeUnit))) (def ^:const immediately 0) (def ^:private num-threads 1) (def ^:private pool (atom nil)) (defn- thread-pool [] (swap! pool (fn [p] (or p (ScheduledThreadPoolExecutor. num-threads))))) (defn periodicall...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/metering/src/sixsq/slipstream/metering/scheduler.clj
clojure
(ns sixsq.slipstream.metering.scheduler (:import (java.util.concurrent ScheduledThreadPoolExecutor TimeUnit))) (def ^:const immediately 0) (def ^:private num-threads 1) (def ^:private pool (atom nil)) (defn- thread-pool [] (swap! pool (fn [p] (or p (ScheduledThreadPoolExecutor. num-threads))))) (defn periodicall...
bcd9b1244018b834d11ba1a755d9d5d2a61117a9ac661b62e43ecbb05b144005
bmeurer/ocamljit2
viewer.ml
(*************************************************************************) (* *) (* Objective Caml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/otherlibs/labltk/browser/viewer.ml
ocaml
*********************************************************************** Objective Caml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ Id$ open StdLabels open Tk open J...
9a58dd4b40cb0e9592e21fefcea994c5625420ee3702a545a266a9026d11c6ac
borodust/bodge-ui
packages.lisp
(bodge-util:define-package :bodge-ui (:use :cl :bodge-memory :bodge-util :bodge-math :cffi-c-ref) (:export #:make-ui #:push-compose-task #:with-ui-access #:compose-ui #:root-panel #:custom-font #:calculate-text-width #:text-line-height ...
null
https://raw.githubusercontent.com/borodust/bodge-ui/94fb37de3dcfe18f97945a29c70f451ebfb6966b/src/packages.lisp
lisp
(bodge-util:define-package :bodge-ui (:use :cl :bodge-memory :bodge-util :bodge-math :cffi-c-ref) (:export #:make-ui #:push-compose-task #:with-ui-access #:compose-ui #:root-panel #:custom-font #:calculate-text-width #:text-line-height ...
5223d5a936ce429e947cade8f4890abecc5ccf0fb2c56f74aa4b2c76ca2f0542
diagrams/diagrams-contrib
Grid.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # ----------------------------------------------------------------------------- -- | -- Module : Diagrams.TwoD.Layout.Grid Copyright : ( c ) 2014 Pontus -- Li...
null
https://raw.githubusercontent.com/diagrams/diagrams-contrib/6b1e5f9802e8f2a5c3ea97cb0c29fd15912450ce/src/Diagrams/TwoD/Layout/Grid.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # --------------------------------------------------------------------------- | Module : Diagrams.TwoD.Layout.Grid License : BSD-style (see LICENSE) Maintainer : Functions for effortlessly putting lists of diagrams in a grid layout....
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # Copyright : ( c ) 2014 Pontus module Diagrams.TwoD.Layout.Grid ( gridCat , gridCat' , gridSnake , gridSnake' , gridWith , sameBoundingRect , sameBoundingSquare ) where import Data.List ...
9a2e5bcb7050c95a219ea0fc20456ebf410aff9ec922f3f1d5470ce71306903d
dangtv/BIRDS
fol.mli
type term = | Var of string | Fn of string * term list type fol = | R of string * term list val fv : fol Formulas.formula -> string list val variant : string -> string list -> string val subst : (string, term) Lib.func -> fol Formulas.formula -> fol Formulas.formula val generalize : fol Formulas.formula -> ...
null
https://raw.githubusercontent.com/dangtv/BIRDS/fdf9263df9bbb7ba836674e9f1ff1a0ec78634e7/src/logic/fol.mli
ocaml
type term = | Var of string | Fn of string * term list type fol = | R of string * term list val fv : fol Formulas.formula -> string list val variant : string -> string list -> string val subst : (string, term) Lib.func -> fol Formulas.formula -> fol Formulas.formula val generalize : fol Formulas.formula -> ...
a332011444a047861d1b7bcf4cdce368d7fb708e6fdabedaaa17ece112b187b2
ypyf/fscm
r5rs_test.scm
(define (is a b) (display (equal? a b)) (newline)) 应该等价于(list 1),所以输出的是 = = > ( 1 ) 在某些错误的实现中(比如tinyscheme 1.41),等价于(quote if),所以输出的是 = = > if (is ((lambda (quote if) (quote if)) list 1) '(1)) ; procedure application (is 1 (call/cc (lambda (c) (0 (c 1))))) shadowing syntatic keywords , bug in MIT Sc...
null
https://raw.githubusercontent.com/ypyf/fscm/4e6a31665051d51bbcfc823ac8d85dcc3491a6ef/test/r5rs_test.scm
scheme
procedure application '1 => (- 1) (let ((quote -)) (eqv? '1 1))) test defineVar bug
(define (is a b) (display (equal? a b)) (newline)) 应该等价于(list 1),所以输出的是 = = > ( 1 ) 在某些错误的实现中(比如tinyscheme 1.41),等价于(quote if),所以输出的是 = = > if (is ((lambda (quote if) (quote if)) list 1) '(1)) (is 1 (call/cc (lambda (c) (0 (c 1))))) shadowing syntatic keywords , bug in MIT Scheme ? (is '(x) ((lam...
f74f97365456eec98358dc771d7fe3698dbf6e64ef202531e30186edf2d49f31
nitrogen/simple_bridge
webmachine_simple_bridge_static.erl
@author < > @author < > @author < > 2008 - 2009 Basho Technologies , Inc. -module(webmachine_simple_bridge_static). -include("compat.hrl"). -export([init/1]). -export([ping/2, allowed_methods/2, resource_exists/2, last_modified/2, content_types_provided/2, conte...
null
https://raw.githubusercontent.com/nitrogen/simple_bridge/b94dba61e3b6057cd04e461749b3a5c19944a74c/src/webmachine_bridge_modules/webmachine_simple_bridge_static.erl
erlang
@author < > @author < > @author < > 2008 - 2009 Basho Technologies , Inc. -module(webmachine_simple_bridge_static). -include("compat.hrl"). -export([init/1]). -export([ping/2, allowed_methods/2, resource_exists/2, last_modified/2, content_types_provided/2, conte...