_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 |
|---|---|---|---|---|---|---|---|---|
2cdecade15eb99e6492d3bc77a8cad201786f166e0838b656e1a4102dfe8c81c | matijapretnar/aeff | loader.ml | open Utils
let parse_commands lexbuf =
try Parser.commands Lexer.token lexbuf with
| Parser.Error ->
Error.syntax
~loc:(Location.of_lexeme (Lexing.lexeme_start_p lexbuf))
"parser error"
| Failure failmsg when failmsg = "lexing: empty token" ->
Error.syntax
~loc:(Location.of_le... | null | https://raw.githubusercontent.com/matijapretnar/aeff/5699f97226e5930d302ccd4ac2bb058c14f27e47/src/core/loader.ml | ocaml | * The module Stdlib_aeff is automatically generated from stdlib.aeff. Check the dune file for details. | open Utils
let parse_commands lexbuf =
try Parser.commands Lexer.token lexbuf with
| Parser.Error ->
Error.syntax
~loc:(Location.of_lexeme (Lexing.lexeme_start_p lexbuf))
"parser error"
| Failure failmsg when failmsg = "lexing: empty token" ->
Error.syntax
~loc:(Location.of_le... |
2a5708c26dad93f7cb5ef409893221c5d236a16482b0f7c96cb3e4c74d366e59 | pjotrp/guix | qt.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General ... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/qt.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu pa... |
0ccb06e3993e408038ece9377cf63a71df9071ee23a996814dc50c8601960e3a | karttu/bream | typesch1.scm |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; BREAM / typesch1.scm ;;
-- Our first scheme for the type system . ; ;
;; In principle, typreslv.scm ... | null | https://raw.githubusercontent.com/karttu/bream/f46f2da3b285d70e83d9ae167a9d2f57f157236c/src/typesch1.scm | scheme |
;;
BREAM / typesch1.scm ;;
;
In principle, typreslv.scm (The type resolver), should ;;
work to some degree independently of the exact details ;;
of these types. ... |
Copyright ( C ) 2010 - 2011 , subject to the terms of the GPL v2 .
( " karttu " ) started writing this module at May 26 2011 .
by transferring a half of srcstrct.scm here .
Edited May 25 - 26 2011 by karttu .
Edited May 29 2011 by karttu .
currently typresolv.scm will not effectively set any
... |
4825d0cfa87f77ecb2f487e73be71127d844dbefe520b1815ef51aaf8172bc79 | alanzplus/EOPL | 1.34-test.rkt | #lang eopl
(require "bst.rkt")
(require rackunit "1.34.rkt")
(require rackunit/text-ui)
(define input-tree
(bst 14
(bst 7
'()
(bst 12 '() '()))
(bst 26
(bst 20
(bst 17 '() '())
'())
(bst 31 '() '()))))
(define path-test
(test-suite
"Tests for path"
(check-e... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch1/1.34-test.rkt | racket | #lang eopl
(require "bst.rkt")
(require rackunit "1.34.rkt")
(require rackunit/text-ui)
(define input-tree
(bst 14
(bst 7
'()
(bst 12 '() '()))
(bst 26
(bst 20
(bst 17 '() '())
'())
(bst 31 '() '()))))
(define path-test
(test-suite
"Tests for path"
(check-e... | |
796c2d811c5f1c218283507314d54a3208ee9035acb8a993814c9436ccd42ca6 | conjure-cp/conjure | Matrix.hs | # LANGUAGE QuasiQuotes #
module Conjure.Representations.Matrix
( matrix
) where
-- conjure
import Conjure.Prelude
import Conjure.Bug
import Conjure.Language
import Conjure.Language.Instantiate
import Conjure.Process.Enumerate
import Conjure.Representations.Internal
-- | The matrix "representation rule".
-- ... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Representations/Matrix.hs | haskell | conjure
| The matrix "representation rule".
This rule handles the plumbing for matrices.
preparing structural constraints for the inner guys
special-case for empty matrix literals
TODO: this may be too strict
if all were `Nothing`s
if all were `Just`s
the inner domain doesn't require refinement
there needs ... | # LANGUAGE QuasiQuotes #
module Conjure.Representations.Matrix
( matrix
) where
import Conjure.Prelude
import Conjure.Bug
import Conjure.Language
import Conjure.Language.Instantiate
import Conjure.Process.Enumerate
import Conjure.Representations.Internal
matrix
:: forall m . (MonadFailDoc m, NameGen m, ... |
aa3886b8033fa461e20e3f459307a39bc047a98e20e2fac69e91552aaa92419c | dyzsr/ocaml-selectml | tfloat_record.ml | (* TEST *)
module Float_record : sig
type t = private float;;
val make : float -> t;;
val from : t -> float;;
type s = {f : t};;
end = struct
type t = float;;
let make f = f;;
let from t = t;;
type s = {f : t};;
end
module Float_array = struct
let small_float_array x =
[|1.;2.;3.|], x
le... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/basic-float/tfloat_record.ml | ocaml | TEST |
module Float_record : sig
type t = private float;;
val make : float -> t;;
val from : t -> float;;
type s = {f : t};;
end = struct
type t = float;;
let make f = f;;
let from t = t;;
type s = {f : t};;
end
module Float_array = struct
let small_float_array x =
[|1.;2.;3.|], x
let longer_fl... |
346af48de78dd5573c268813144da77e99e0b3415f80f364781ec69f9ac10e91 | xtdb/core2 | operator.clj | (ns core2.operator
(:require [clojure.spec.alpha :as s]
[core2.error :as err]
[core2.expression :as expr]
core2.expression.temporal
[core2.logical-plan :as lp]
core2.operator.apply
core2.operator.arrow
core2.operator.csv
c... | null | https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/core/src/main/clojure/core2/operator.clj | clojure | NOTE we could arguably take the actual params here rather than param-types
... or at least raise questions about who then owns the params
need to call rel->rows eagerly - the rel may have been reused/closed after | (ns core2.operator
(:require [clojure.spec.alpha :as s]
[core2.error :as err]
[core2.expression :as expr]
core2.expression.temporal
[core2.logical-plan :as lp]
core2.operator.apply
core2.operator.arrow
core2.operator.csv
c... |
d8f5f1c92b0f443105bec1749562926823d8e8060f478654bd0102f6d5df57ef | cstar/ejabberd-old | mod_last.erl | %%%----------------------------------------------------------------------
File :
Author : < >
%%% Purpose : jabber:iq:last support (JEP-0012)
Created : 24 Oct 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/mod_last.erl | erlang | ----------------------------------------------------------------------
Purpose : jabber:iq:last support (JEP-0012)
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRAN... | File :
Author : < >
Created : 24 Oct 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public Li... |
c51e0affcdfd75146412edb12ba07ee16fadba05f83f2bf2223e6561e5701964 | patricoferris/ocaml-multicore-monorepo | bench_stream.ml | Copyright ( C ) 2019 < >
*
* 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 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/tests/bench_stream.ml | ocaml | OBS: Not re-iterable. | Copyright ( C ) 2019 < >
*
* 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 3 of the License , or ( at your
* option ) any later version , with the ... |
8458e143352036f823a82d6bc3e5a9ddf9b96c6abd8c99cea123c35c75270703 | ocurrent/ocluster | progress.ml | open Capnp_rpc_lwt
let local fn =
let module X = Raw.Service.Progress in
X.local @@ object
inherit X.service
method report_impl params release_param_caps =
let open X.Report in
let msg = Params.status_get params in
release_param_caps ();
fn msg;
Service.return_empty ()
end
... | null | https://raw.githubusercontent.com/ocurrent/ocluster/863d82addefb29c14bc3e663986a529cc61ec066/api/progress.ml | ocaml | open Capnp_rpc_lwt
let local fn =
let module X = Raw.Service.Progress in
X.local @@ object
inherit X.service
method report_impl params release_param_caps =
let open X.Report in
let msg = Params.status_get params in
release_param_caps ();
fn msg;
Service.return_empty ()
end
... | |
41ce6fde883dc31d775f565ae849fbe0467b517fecf3610d266f58c94948e7ed | Kakadu/fp2022 | interpretMonadFailInf.ml | * Copyright 2022 - 2023 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
module type MONAD_FAIL = sig
include Base.Monad.Infix
val return : 'a -> 'a t
val fail : string -> 'a t
val ( <|> ) : 'a t -> 'a t -> 'a t
val ( *> ) : 'a t -> 'b -> 'b t
val ( <* ) : 'a t -> 'b -> 'a t
val ( let* ) : 'a ... | null | https://raw.githubusercontent.com/Kakadu/fp2022/0c67ea046f68e260b1eb6a363efdfd2bfe5e777a/RubyTheSequel/lib/interpretMonadFailInf.ml | ocaml | * Copyright 2022 - 2023 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
module type MONAD_FAIL = sig
include Base.Monad.Infix
val return : 'a -> 'a t
val fail : string -> 'a t
val ( <|> ) : 'a t -> 'a t -> 'a t
val ( *> ) : 'a t -> 'b -> 'b t
val ( <* ) : 'a t -> 'b -> 'a t
val ( let* ) : 'a ... | |
bf9ad080af3ef7bc5ca436394c2eb7581faeffcf57419d7cbcbf1155e6c92c17 | cartazio/tlaps | deque.mli |
* deque.ml --- Persistent functional double - ended queues
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* deque.ml --- Persistent functional double-ended queues
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
type 'a dq
val empty : 'a dq
val size : 'a dq -... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/util/deque.mli | ocaml |
* deque.ml --- Persistent functional double - ended queues
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* deque.ml --- Persistent functional double-ended queues
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
type 'a dq
val empty : 'a dq
val size : 'a dq -... | |
bd0cbe18c10cf01450bac4c5c34eae4e527caa876e61776004b705ca55fc6ad3 | dwayne/eopl3 | parser.rkt | #lang eopl
;; Program ::= Expression
;;
;; Expression ::= Number
;;
;; ::= Identifier
;;
;; ::= -(Expression, Expression)
;;
;; ::= zero?(Expression)
;;
;; ::= if Expression then Expression else Expression
;;
;; ::= let Identifier = Expression in Expression
;;
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/CALL-BY-NEED-4.42/parser.rkt | racket | Program ::= Expression
Expression ::= Number
::= Identifier
::= -(Expression, Expression)
::= zero?(Expression)
::= if Expression then Expression else Expression
::= let Identifier = Expression in Expression
::= lazylet Identifier = Exp... | #lang eopl
: : Expression
(provide
AST
program
a-program
expression expression?
const-exp
var-exp
diff-exp
zero?-exp
if-exp
let-exp
lazylet-exp
proc-exp
letrec-exp
call-exp
begin-exp
assign-exp
Parser
parse)
(define scanner-spec
'((number (digit (arbno digit)) number... |
1c806030c3be484b0351c91d688e9a424bec470a8403cc08e6eb02686b683023 | lisp/de.setf.thrift | ManyTypedefs-types.lisp | ;;; -*- Package: thrift-generated -*-
;;;
Autogenerated by Thrift
;;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
(def-package :thrift-generated)
(thrift:def-struct "struct1"
(("myint" nil :type i32 :id 1)
("mylist" nil :type (list (map i32 string)) :id 2)))
(thrift:def-exception "except... | null | https://raw.githubusercontent.com/lisp/de.setf.thrift/32b0d1ca3d9fa95327165b8090e1021bc563ed3e/test/gen-cl/ManyTypedefs-types.lisp | lisp | -*- Package: thrift-generated -*-
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING | Autogenerated by Thrift
(def-package :thrift-generated)
(thrift:def-struct "struct1"
(("myint" nil :type i32 :id 1)
("mylist" nil :type (list (map i32 string)) :id 2)))
(thrift:def-exception "exception1"
(("alist" nil :type (list (map i32 string)) :id 1)
("mystruct" nil :type (struct "struct1") :id 2)))
... |
8aa2c071b1cc107e013970c959901d4fbfaf709d030f36be6bb091f46f1c340d | ocaml/dune | dir_set.mli | (** Potentially infinite sets of directories *)
open Import
(** Type of potentially infinite sets of directories. Not all sets can be
represented, only ones that can be efficiently inspected. *)
type 'w t
(** [mem t p] is [true] if and only if [p] is in [t] *)
val mem : 'w t -> 'w Path.Local_gen.t -> bool
(** [... | null | https://raw.githubusercontent.com/ocaml/dune/927b672beb3cc1c39aa54701b51cccf88ab3bc8c/src/dune_engine/dir_set.mli | ocaml | * Potentially infinite sets of directories
* Type of potentially infinite sets of directories. Not all sets can be
represented, only ones that can be efficiently inspected.
* [mem t p] is [true] if and only if [p] is in [t]
* [here t] is the same as [mem t Path.Build.root] but more efficient.
* The empty set
*... |
open Import
type 'w t
val mem : 'w t -> 'w Path.Local_gen.t -> bool
val here : 'w t -> bool
val empty : 'w t
val universal : 'w t
val trivial : bool -> 'w t
val is_empty : 'w t -> bool
val is_universal : 'w t -> bool
val descend : 'w t -> string -> Path.Local.w t
val exceptions : 'w t -> Path.Local.w t Filen... |
dd473dea6ff366a798dedf52402b6b4fd8e46704a0e93b3f0ff8620eca2beddb | bschwind/earthquakes | ui.cljs | (ns earthquakes.common.ui
(:require [reagent.core :as r :refer [atom]]
[re-frame.core :refer [subscribe dispatch]]))
(def ReactNative (js/require "react-native"))
(def MapView (js/require "react-native-maps"))
(def Icon (js/require "react-native-vector-icons/Ionicons"))
(def MaterialIcon (.-default (js/r... | null | https://raw.githubusercontent.com/bschwind/earthquakes/265d2e27504ee50f1a815a89a85601e9715af1d7/src/earthquakes/common/ui.cljs | clojure | Third-party Components | (ns earthquakes.common.ui
(:require [reagent.core :as r :refer [atom]]
[re-frame.core :refer [subscribe dispatch]]))
(def ReactNative (js/require "react-native"))
(def MapView (js/require "react-native-maps"))
(def Icon (js/require "react-native-vector-icons/Ionicons"))
(def MaterialIcon (.-default (js/r... |
67c77b5986c73c865148873f4b7d5c14ed8d9a8bb9de878e81ae0ebeb50d7175 | jbclements/molis-hai | unicode-scrub-lib.rkt | #lang racket
(require rackunit)
(provide (contract-out
[unicode-scrub (-> path-string? path-string? void?)]
[de-unicode/path (->* (path-string? path-string?)
(#:char-mapping (hash/c char?
string?))
... | null | https://raw.githubusercontent.com/jbclements/molis-hai/6a335ec73c144f9d8ac538752ca8e6fd0b3b3cce/molis-hai/experimental/unicode-scrub-lib.rkt | racket | this file contains functions for replacing all non-ASCII characters
the character mapping to use if no other is specified.
given an input and output port, rewrite the input-port
chars to remove unicode chars and write to the output port
do as many ascii characters as possible:
grab a non-ascii character
given a ... | #lang racket
(require rackunit)
(provide (contract-out
[unicode-scrub (-> path-string? path-string? void?)]
[de-unicode/path (->* (path-string? path-string?)
(#:char-mapping (hash/c char?
string?))
... |
e5753aebbb53a62c7c7ac51d51b0481aee08c110f215502be9ad985e10d8d435 | ndmitchell/catch | Blur.hs |
module Reqs.Blur() where
import Reqs.Type
import Reqs.Simplify
import General.General
import Pred.Predicate
import Reqs.Path
instance Blur Req where
blur req = req{reqPath = pathBlur (reqPath req)}
instance Blur ReqAll where
blur (ReqAll on within) = ReqAll on (blur within)
instance (PredL... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Reqs/Blur.hs | haskell |
module Reqs.Blur() where
import Reqs.Type
import Reqs.Simplify
import General.General
import Pred.Predicate
import Reqs.Path
instance Blur Req where
blur req = req{reqPath = pathBlur (reqPath req)}
instance Blur ReqAll where
blur (ReqAll on within) = ReqAll on (blur within)
instance (PredL... | |
b7678071245c51e079082b23862f33d53d68d0e11043fb0778c5cd5e25df2fcf | CompSciCabal/SMRTYPRTY | ex1.3.rkt | #lang racket
;; Ex 1.3
(define (square x)
(* x x))
(define (sum-of-squares x y)
(+ (square x) (square y)))
(define (sum-of-squares-two-largest x y z)
(cond ((and (>= x z) (>= y z)) (sum-of-squares x y))
((and (>= x y) (>= z y)) (sum-of-squares x z))
(else (sum-of-squares y z))))
(sum-of-squar... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v3/1.1/xiyang/ex1.3.rkt | racket | Ex 1.3 | #lang racket
(define (square x)
(* x x))
(define (sum-of-squares x y)
(+ (square x) (square y)))
(define (sum-of-squares-two-largest x y z)
(cond ((and (>= x z) (>= y z)) (sum-of-squares x y))
((and (>= x y) (>= z y)) (sum-of-squares x z))
(else (sum-of-squares y z))))
(sum-of-squares-two-lar... |
8e163755019947a16f6506a253d1da9bbc79ab4c34d9f874935e496af2f86e8b | mfp/extprot | random_gen.ml | open Monad
let (@@) f x = f x
module RS = Random.State
module R = Random
module type RANDOM_MONAD =
sig
include MONAD
val rand_bool : bool t
val rand_char : char t
val rand_integer : int -> int t
val rand_int : int t
val rand_int64 : Int64.t t
val rand_float : float t
val rand_string : int t -> strin... | null | https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/runtime/random_gen.ml | ocaml | open Monad
let (@@) f x = f x
module RS = Random.State
module R = Random
module type RANDOM_MONAD =
sig
include MONAD
val rand_bool : bool t
val rand_char : char t
val rand_integer : int -> int t
val rand_int : int t
val rand_int64 : Int64.t t
val rand_float : float t
val rand_string : int t -> strin... | |
1cdd317e987f67b81549308e189574449812d560e83962a7a231d1541a1c779e | expede/rescue | Constraint.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
-- | Declare which exceptions may be raised/rescued in a given context
module Control.Monad.Raise.Constraint
( -- * Permissive
Raises
, RaisesAtLeast
-- * Precise
, RaisesOnly
, RaisesOne
) where
import... | null | https://raw.githubusercontent.com/expede/rescue/5f460a4cd9a01ac84e669a50711375c8f8dcba75/library/Control/Monad/Raise/Constraint.hs | haskell | # LANGUAGE ConstraintKinds #
| Declare which exceptions may be raised/rescued in a given context
* Permissive
* Precise
| Raises this exception, but potentially others
| Restrict exceptions to exactly this list
| Raises an exception, guaranteed to NOT be the outer union | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Control.Monad.Raise.Constraint
Raises
, RaisesAtLeast
, RaisesOnly
, RaisesOne
) where
import Control.Monad.Raise.Class
import Data.WorldPeace
import Data.WorldPeace.Subset.Class
type Raises m err = Subs... |
765d1637cbbe26c25e386ed9e752ecf36a84a127cf47cc081a69b1bdf6107900 | KingoftheHomeless/Cofree-Traversable-Functors | Batch.hs | module Data.Batch where
data Batch a b c = P c | Batch a b (b -> c) :*: a
infixl 1 :*: -- :*: infixes to the left
instance Functor (Batch a b) where
fmap f (P c) = P (f c)
fmap f (r :*: a) = fmap (f .) r :*: a
instance Applicative (Batch a b) where
pure = P
u <*> P a = fmap ($ a) u
u <*> (v :*: a) = ((.) <... | null | https://raw.githubusercontent.com/KingoftheHomeless/Cofree-Traversable-Functors/40289b1f5ec151da10ab625102527432e84d6743/src/Data/Batch.hs | haskell | :*: infixes to the left | module Data.Batch where
data Batch a b c = P c | Batch a b (b -> c) :*: a
instance Functor (Batch a b) where
fmap f (P c) = P (f c)
fmap f (r :*: a) = fmap (f .) r :*: a
instance Applicative (Batch a b) where
pure = P
u <*> P a = fmap ($ a) u
u <*> (v :*: a) = ((.) <$> u <*> v) :*: a
batch :: a -> Batch a... |
92260d3a9410e48546742e933839462b43db2c4a113f26bc9dc1cdd0d896298e | da-x/fancydiff | SourceHighlight.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
module Fancydiff.SourceHighlight
( nullMatcher
, syntaxMap
, Highlighter(..)
, paletteDecode
, paletteEncode
, modifyColorString
, brighter
, darker
, inverseCol... | null | https://raw.githubusercontent.com/da-x/fancydiff/95c76034d907f715466b26e4f4001990ca98bfcc/src/Fancydiff/SourceHighlight.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------------
--
----------------------------------------------------------------------------------
traceM $ show tok | # LANGUAGE LambdaCase #
# LANGUAGE NoMonomorphismRestriction #
module Fancydiff.SourceHighlight
( nullMatcher
, syntaxMap
, Highlighter(..)
, paletteDecode
, paletteEncode
, modifyColorString
, brighter
, darker
, inverseColor
) where
import Control.Mo... |
f6a6a399998fadac5049a6ec1538ef95d6466190c16721e04e6d10f3a12e4c64 | ajtulloch/haskell-ml | TrainingStatus.hs | # LANGUAGE BangPatterns , DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses #
module MachineLearning.Protobufs.TrainingStatus (TrainingStatus(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prelude'
impo... | null | https://raw.githubusercontent.com/ajtulloch/haskell-ml/593ab6d9e3cf70ae5576cfa7883a12e05cd6fdf4/MachineLearning/Protobufs/TrainingStatus.hs | haskell | # LANGUAGE BangPatterns , DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses #
module MachineLearning.Protobufs.TrainingStatus (TrainingStatus(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as Prelude'
import qualified Data.Data as Prelude'
impo... | |
817da8382b0639b31fbc1f65c5552e54085404a5c428c83af33bc8ff62112530 | janestreet/ppx_css | test_css_bonsai_integration.ml | open! Core
open! Bonsai_web
open! Bonsai_web_test
let%expect_test "css censoring" =
let module Style = [%css stylesheet ".foo {}"] in
let handle =
Handle.create
(Result_spec.vdom Fn.id)
(Bonsai.const (Vdom.Node.div ~attr:Style.foo []))
in
Handle.show handle;
[%expect {| <div class="foo_hash_r... | null | https://raw.githubusercontent.com/janestreet/ppx_css/dea318e6997caafb57b72eeb64b6fa8e4900fa05/web_test/test_css_bonsai_integration.ml | ocaml | open! Core
open! Bonsai_web
open! Bonsai_web_test
let%expect_test "css censoring" =
let module Style = [%css stylesheet ".foo {}"] in
let handle =
Handle.create
(Result_spec.vdom Fn.id)
(Bonsai.const (Vdom.Node.div ~attr:Style.foo []))
in
Handle.show handle;
[%expect {| <div class="foo_hash_r... | |
bca6b4f83b281364792f7680c962c6bb6606c3ecd811363c83f670f3aeb594d8 | Clozure/ccl | arm-backtrace.lisp | -*-Mode : LISP ; Package : CCL -*-
;;;
;;; Copyright 2010 Clozure Associates
;;;
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... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/lib/arm-backtrace.lisp | lisp | Package : CCL -*-
Copyright 2010 Clozure Associates
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.
... | distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CCL")
(defun cfp-lfun (p)
(if (fake-stack-frame-p p)
(let* ((fn (%fixnum-ref p arm::fake-stack-frame.fn))
(lr (%fixnum-ref p arm::fake-stack-frame.lr)))
(if (and (typep fn 'function)
(typep lr 'fi... |
cebb0d3d76da3e028ce03e03a801d05587e4ec9639aedbcb0f5dd76a4b714d4c | pariyatti/kosa | txt.clj | (ns kosa.mobile.today.looped.txt
(:require [clojure.string :as str]
[clojure.tools.logging :as log]
[kuti.support.collections :refer [merge-kvs]]))
(defn split-file [txt]
(str/split txt #"~"))
(defprotocol Ingester
(attr-for [this kw])
(entry-attr [this])
(human-name [this])
(parse... | null | https://raw.githubusercontent.com/pariyatti/kosa/0029e1834e61f4afa8b567ad74705887767035b7/src/kosa/mobile/today/looped/txt.clj | clojure | (ns kosa.mobile.today.looped.txt
(:require [clojure.string :as str]
[clojure.tools.logging :as log]
[kuti.support.collections :refer [merge-kvs]]))
(defn split-file [txt]
(str/split txt #"~"))
(defprotocol Ingester
(attr-for [this kw])
(entry-attr [this])
(human-name [this])
(parse... | |
5a6f68b68e3d7a3d3e08a7b3e7c2685c54928aabca024ea511aa3f3e277cad09 | gethop-dev/dashboard-manager.grafana | grafana_test.clj | (ns dev.gethop.dashboard-manager.grafana-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[dev.gethop.dashboard-manager.core :as dm-core]
[dev.gethop.dashboard-manager.grafana :as dm-grafana]
[integrant.core :as ig])
(:import [dev.gethop.dashboard_manager.grafana Grafana]
... | null | https://raw.githubusercontent.com/gethop-dev/dashboard-manager.grafana/f086e11a7b6720c5952545a57e66ce7a89583619/test/dev/gethop/dashboard_manager/grafana_test.clj | clojure | FIXME: passing plain UUID object will throw an exception.
TODO: check `gf-create-user` for its returning status code.
FIXME: this test returns an unexpected `:ok` status.
(testing "update a non existing user"
(is (= :not-found (:status result)))))
versions, we must adjust the response for both cases. | (ns dev.gethop.dashboard-manager.grafana-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[dev.gethop.dashboard-manager.core :as dm-core]
[dev.gethop.dashboard-manager.grafana :as dm-grafana]
[integrant.core :as ig])
(:import [dev.gethop.dashboard_manager.grafana Grafana]
... |
abafd35b6a217eeeb7d87f2d8000902e0261575c5fd90e78b6d7c2695b589dbc | JunSuzukiJapan/cl-reex | throttle-test.lisp | (defpackage throttle-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip) )
(in-package :throttle-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 1)
;; blah blah blah.
(defparameter logger (make-inst... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/throttle-test.lisp | lisp | blah blah blah.
finalize | (defpackage throttle-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip) )
(in-package :throttle-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 1)
(defparameter logger (make-instance 'logger))
(de... |
416812f912f42e6bad3a50dd70b5439fa316a36962e9ddbbcf7b370361d2ed79 | noir-clojure/cljs-template | project.clj | (defproject cljs-template/lein-template "0.1.6"
:description "A lein-newnew template for clojurescript projects"
:url "-template"
:eval-in-leiningen true
:license {:name "Eclipse Public License"
:url "-v10.html"})
| null | https://raw.githubusercontent.com/noir-clojure/cljs-template/09e8fdf89854f1bb9d852d7c0916cbd96c22c79c/project.clj | clojure | (defproject cljs-template/lein-template "0.1.6"
:description "A lein-newnew template for clojurescript projects"
:url "-template"
:eval-in-leiningen true
:license {:name "Eclipse Public License"
:url "-v10.html"})
| |
fb0be8e4675ccb1470c9c14d0a11ee63eaf5bd14cf01a57d20bd85d766f0383d | 3b/3bgl-shader | example-shaders.lisp | (defpackage #:3bgl-shader-example-shaders
(:use #:3bgl-glsl/cl)
(:export
#:minimal-vertex
#:minimal-fragment)
3bgl - shader does n't let you define globals named by symbols from
CL or 3bgl packages , so shadow TIME locally
(:shadow #:time))
(in-package #:3bgl-shader-example-shaders)
;; vertex shader i... | null | https://raw.githubusercontent.com/3b/3bgl-shader/5dd0207ef2d468e7caca2dd6df07b87fe839df88/example-shaders.lisp | lisp | vertex shader inputs, we specify :location so we don't have to
query the attributes from host code and can just use the specified
is pretty common to want that, so we can re-specify that exact
definition if we want to, but can't change it)
for glutSolidTeapot we need to use the compatibility mode
vertex attribute... | (defpackage #:3bgl-shader-example-shaders
(:use #:3bgl-glsl/cl)
(:export
#:minimal-vertex
#:minimal-fragment)
3bgl - shader does n't let you define globals named by symbols from
CL or 3bgl packages , so shadow TIME locally
(:shadow #:time))
(in-package #:3bgl-shader-example-shaders)
locations ( CL :... |
49b83c4c0ea8944c35fced69638552eba4559ba317d2c219fd30123c4fcd945f | ublubu/shapes | Main.hs | module Main where
import GameInit
import Linear.V2
import qualified Physics.Demo.IOWorld as IOWorld
main :: IO ()
main =
let window = V2 800 600
scale = V2 40 40
in runMain "physics test" window $ IOWorld.demoMain (fmap fromIntegral window) scale
| null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes-demo/src/Main.hs | haskell | module Main where
import GameInit
import Linear.V2
import qualified Physics.Demo.IOWorld as IOWorld
main :: IO ()
main =
let window = V2 800 600
scale = V2 40 40
in runMain "physics test" window $ IOWorld.demoMain (fmap fromIntegral window) scale
| |
e09cf568be9d21e509babedd95434024e37ede86d11473b80c9fb53f4e284ce1 | xu-hao/QueryArrow | NoTranslation.hs | # LANGUAGE TypeFamilies , FlexibleContexts , FlexibleInstances #
module QueryArrow.DB.NoTranslation where
import QueryArrow.Syntax.Term
import QueryArrow.DB.DB
import Data.Map.Strict
import QueryArrow.Semantics.TypeChecker
import Data.Set
data NoTranslationDatabase db = NoTranslationDatabase db
data NTDBQuery form ... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-common/src/QueryArrow/DB/NoTranslation.hs | haskell | # LANGUAGE TypeFamilies , FlexibleContexts , FlexibleInstances #
module QueryArrow.DB.NoTranslation where
import QueryArrow.Syntax.Term
import QueryArrow.DB.DB
import Data.Map.Strict
import QueryArrow.Semantics.TypeChecker
import Data.Set
data NoTranslationDatabase db = NoTranslationDatabase db
data NTDBQuery form ... | |
d9b4372ad5a5283f1be20f92ccd32978dea296f704af4ddccf1aa33cc2a2a568 | bcc32/advent-of-code | a.ml | open! Core
open! Async
open! Import
let main () =
let%bind nums =
Reader.file_contents "input"
>>| String.strip
>>| String.split ~on:' '
>>| List.map ~f:Int.of_string
in
Tree.parse nums |> Tree.sum_metadata |> printf "%d\n";
return ()
;;
let%expect_test "a" =
let%bind () = main () in
[%exp... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2018/08/a.ml | ocaml | open! Core
open! Async
open! Import
let main () =
let%bind nums =
Reader.file_contents "input"
>>| String.strip
>>| String.split ~on:' '
>>| List.map ~f:Int.of_string
in
Tree.parse nums |> Tree.sum_metadata |> printf "%d\n";
return ()
;;
let%expect_test "a" =
let%bind () = main () in
[%exp... | |
cf8fd372299fefba75f9e03e29f692fa8036771c420973fcba1c7270eb06d942 | dbuenzli/hyperbib | hfrag.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/a1def764f7f58b29bd732dacaa167e73497f6175/src/html/hfrag.ml | ocaml | String functions
A bit primitive.
Hc requests
Hc responses
Links and anchors
Do that properly at some point -editor.org/rfc/rfc6068
Letter indexes
Entity
Entity links
Miscellaneous | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
7fdbf5c044648480e26b1774704bc0a93a6f33e237da10a60b60008abda165c6 | dubrousky/mockmma | stack1.lisp | Stack handling routines for lmath
( c ) Copyright 1990 ,
(provide 'stack1)
Two parallel stacks for names ( vars ) and values ( vals )
are maintained . There 's only one instance of this stack , reducing
;; benefit of using defstruct.
(in-package :mma )
( export ' ( stack make - stack spush spushframe spopf... | null | https://raw.githubusercontent.com/dubrousky/mockmma/036e7ba0773e43da50438a4f93774966cf82011f/stack1.lisp | lisp | benefit of using defstruct.
stack-ptr stack-frameptr sfindd stackprinter env))
store at the next "push".
frameptr points to the bottom of current call-frame
a pair that looks like <name of function> <next lower frameptr>
-1 <= frameptr < ptr
could check for overflow here
establish a new call frame
push old fr... | Stack handling routines for lmath
( c ) Copyright 1990 ,
(provide 'stack1)
Two parallel stacks for names ( vars ) and values ( vals )
are maintained . There 's only one instance of this stack , reducing
(in-package :mma )
( export ' ( stack make - stack spush spushframe spopframe spop sfind schange
(defst... |
deed911acc9c7df9ccd1dc3124c2e8f5402363f07d1b59e104f55faa5967f2ae | nvim-treesitter/nvim-treesitter | indents.scm | [
(element)
(if_statement)
(each_statement)
(await_statement)
(script_element)
(style_element)
] @indent
[
(end_tag)
(else_statement)
(if_end_expr)
(each_end_expr)
(await_end_expr)
">"
"/>"
] @branch
(comment) @ignore
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/0127bef03d7faf0318ed559ace49b1de8f531d8a/queries/svelte/indents.scm | scheme | [
(element)
(if_statement)
(each_statement)
(await_statement)
(script_element)
(style_element)
] @indent
[
(end_tag)
(else_statement)
(if_end_expr)
(each_end_expr)
(await_end_expr)
">"
"/>"
] @branch
(comment) @ignore
| |
d2c019d84acf92db66e7e6751a51348fd2fbefe168bbaffa11ce45c8161857ad | mishadoff/project-euler | problem024.clj | (ns project-euler.problem024
(:require [clojure.math.combinatorics :as comb]))
Elapsed time : 2848.733561 msecs
(defn euler-024 []
(->> (range 10)
(comb/permutations)
(drop (dec 1000000))
(first)
(apply str)))
(defn euler-024-clever []
(let [! (fn [n] (reduce * (range 1 (inc n))))]... | null | https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem024.clj | clojure | (ns project-euler.problem024
(:require [clojure.math.combinatorics :as comb]))
Elapsed time : 2848.733561 msecs
(defn euler-024 []
(->> (range 10)
(comb/permutations)
(drop (dec 1000000))
(first)
(apply str)))
(defn euler-024-clever []
(let [! (fn [n] (reduce * (range 1 (inc n))))]... | |
9a808a2e50d43103bbe98740c57550661e17e1a57e3df57c64e345be14812f1f | fare/lisp-interface-library | collection.lisp | ;;;;; Read-only interfaces common to pure and stateful collections
(uiop:define-package :lil/interface/collection
(:use
:closer-common-lisp
:lil/core
:lil/interface/base)
(:use-reexport
:lil/interface/empty
:lil/interface/size
:lil/interface/fold
:lil/interface/iterator)
(:export
#:<finit... | null | https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/interface/collection.lisp | lisp | Read-only interfaces common to pure and stateful collections
note: shadowed in pure, stateful
internal map representation
from key-interface to (key-interface base-interface)
from (key-interface base-interface) to key-interface |
(uiop:define-package :lil/interface/collection
(:use
:closer-common-lisp
:lil/core
:lil/interface/base)
(:use-reexport
:lil/interface/empty
:lil/interface/size
:lil/interface/fold
:lil/interface/iterator)
(:export
#:get-entry #:has-key-p #:first-entry #:entry-values
#:singleton-p #:sin... |
bd49fc97fb52d1a4ecef2124eac133a2e56c7fe1e72c901a949ce8c67824154b | thi-ng/demos | config.cljs | (ns ex04.config)
(def config
{:player-speed 0.0004
:player-max-speed 0.0012
:accel 0.025
:steer-accel 0.05
:tunnel-path-res 0.2
:cam-distance 0.005
:cam-dist-factor 20
:cam-speed-factor 50})
| null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-11/day2/ex04/src/ex04/config.cljs | clojure | (ns ex04.config)
(def config
{:player-speed 0.0004
:player-max-speed 0.0012
:accel 0.025
:steer-accel 0.05
:tunnel-path-res 0.2
:cam-distance 0.005
:cam-dist-factor 20
:cam-speed-factor 50})
| |
d520ca2d265d5bad2ca94e5d6c53af1907858c25e43f02633f28f32bb348572f | poscat0x04/telegram-types | PromoteChatMember.hs | module Web.Telegram.Types.Internal.API.PromoteChatMember where
import Common
import Web.Telegram.Types.Internal.API.ChatId
data PromoteChatMember = PromoteChatMember
{ chatId :: ChatId,
userId :: Int,
canChangeInfo :: Maybe Bool,
canPostMessages :: Maybe Bool,
canEditMessages :: Maybe Bool,
canD... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/3de0710640f5303638a83e409001b0342299aeb8/src/Web/Telegram/Types/Internal/API/PromoteChatMember.hs | haskell | module Web.Telegram.Types.Internal.API.PromoteChatMember where
import Common
import Web.Telegram.Types.Internal.API.ChatId
data PromoteChatMember = PromoteChatMember
{ chatId :: ChatId,
userId :: Int,
canChangeInfo :: Maybe Bool,
canPostMessages :: Maybe Bool,
canEditMessages :: Maybe Bool,
canD... | |
b4d0688d6f8d034ca2ad1b50e6eacbb22ea555c650a2ceff1fd2c118d67c0c5a | kindista/kindista | group-card.lisp | Copyright 2012 - 2017 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at you... | null | https://raw.githubusercontent.com/kindista/kindista/60da1325e628841721200aa00e4de5f9687c0adb/src/templates/group-card.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
| Copyright 2012 - 2017 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distr... |
fca4ce78ef362a17d9eb51663fee29c5ec238c5e30ad042a444e98ce0b7d982e | tezos/tezos-mirror | test_compare_operations.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/39e976ad6eae6446af8ca17ef4a63475ab9fe2b9/src/proto_015_PtLimaPt/lib_protocol/test/pbt/test_compare_operations.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
89a576ae5fcd02a94c7ea3223d8f5b460454de3cf1257626b1cdcb706ea95154 | hjcapple/reading-sicp | exercise_1_41.scm | #lang racket
P51 - [ 练习 1.41 ]
(define (double f)
(lambda (x) (f (f x))))
(define (inc x) (+ x 1))
;;;;;;;;;;;;;
21
| null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/exercise_1_41.scm | scheme | #lang racket
P51 - [ 练习 1.41 ]
(define (double f)
(lambda (x) (f (f x))))
(define (inc x) (+ x 1))
21
| |
2bda6ff9405a39caa1fed2c8f29f328fdbcdd5ddf1b4d4737fa3b38271ed42c2 | brownplt/TeJaS | patReg.mli | include Sig.PAT
| null | https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/patterns/patReg.mli | ocaml | include Sig.PAT
| |
2d131bf5546cad9702b4a33a57effae5963345086bfe29f077f8ad76b3a1920e | OCamlPro/ocp-build | ocpList.mli | (**************************************************************************)
(* *)
(* Typerex Libraries *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/ocpList.mli | ocaml | ************************************************************************
Typerex Libraries
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
Copyright 2011 - 2017 OCamlPro SAS
the GNU Lesser General Public License version 2.1 , with the
val last : 'a l... |
17cd4d9c760484d7cc75ae19f966ea86f0a4830143e7f746a4522b6ef8752c45 | azimut/shiny | main.lisp | (in-package :shiny)
(defvar *particle-fbo* nil)
(defvar *sam-particle-fbo* nil)
(defvar *samd-particle-fbo* nil)
(defvar *fbo* nil)
(defvar *sam* nil)
(defvar *samd* nil)
(defvar *bs* nil)
;; Cubemap with clouds
(defvar *t-cubemap* nil)
(defvar *s-cubemap* nil)
;; Cubemap for the luminance
(defparameter *saved* nil... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/examples/brio/main.lisp | lisp | Cubemap with clouds
Cubemap for the luminance
Cubemap to store the mix between the clouds and own floor geometry
???
(unless *cloud-tex*
(get-tex "static/Cloud04_8x8.tga")))
(make-cubemap-tex
"static/ThickCloudsWater/left.png"
"static/ThickCloudsWater/right.png"
"static/Thic... | (in-package :shiny)
(defvar *particle-fbo* nil)
(defvar *sam-particle-fbo* nil)
(defvar *samd-particle-fbo* nil)
(defvar *fbo* nil)
(defvar *sam* nil)
(defvar *samd* nil)
(defvar *bs* nil)
(defvar *t-cubemap* nil)
(defvar *s-cubemap* nil)
(defparameter *saved* nil)
(defvar *t-cubemap-live* nil)
(defvar *s-cubemap-l... |
6e51cfad6af9bb67a01cfe5547135da8d244ee35c83bf276de0ff0ad538fe625 | vereis/jarlang | erlgar.erl | -module(erlgar).
-export([
init/0, %Initiallizes the game & interface
update/0 %update the game
]).
%%% ---------------------------------------------------------------------------------------------%%%
- Agar game in erlang -------------------------------------------------------------------... | null | https://raw.githubusercontent.com/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/doc/erlgar/erlang/erlgar.erl | erlang | Initiallizes the game & interface
update the game
---------------------------------------------------------------------------------------------%%%
---------------------------------------------------------------------------------------------%%%
Implement sqrt because we haven't coded the math module yet | -module(erlgar).
-export([
]).
init()->
register(game,self()),
[Width,Height] = gameArea:getCanvasSize(),
loop(Width,Height).
loop(Width,Height)->
receive
tick ->
gameArea:clear(),
[PrevX,PrevY] = gameArea:getMousePos(),
[PlayerX,PlayerY]=get_new_player_... |
6de07678458e6abee676d55cf6061d1fe72eb4fada6303434f36b39dacd02989 | janestreet/universe | rpc_connection_resource.mli | open! Core_kernel
open! Async_kernel
open! Import
module type Rpc_resource = sig
type t
val connect : Host_and_port.t -> t Deferred.Or_error.t
val to_rpc_connection : t -> Rpc.Connection.t
end
type 'a t
val resource : 'a t -> 'a
val address : _ t -> Host_and_port.t
module Make (R : Rpc_resource) :
Resource... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/resource_cache/src/rpc_connection_resource.mli | ocaml | open! Core_kernel
open! Async_kernel
open! Import
module type Rpc_resource = sig
type t
val connect : Host_and_port.t -> t Deferred.Or_error.t
val to_rpc_connection : t -> Rpc.Connection.t
end
type 'a t
val resource : 'a t -> 'a
val address : _ t -> Host_and_port.t
module Make (R : Rpc_resource) :
Resource... | |
8e596ab4ac3c971e946fd5edd9c8702c6edea0099e83b66685928020ca7b00fc | scrintal/heroicons-reagent | currency_bangladeshi.cljs | (ns com.scrintal.heroicons.solid.currency-bangladeshi)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/currency_bangladeshi.cljs | clojure | (ns com.scrintal.heroicons.solid.currency-bangladeshi)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25 2.25 6.615... | |
4d0a14a5721a69b925a86f83bd4d80c5fa0a4654eeff353728883e273360f82e | strint/sicpAns | 1025_prime_three_smallest_primes_fast_expt.scm | ;report
(define (timed-prime-test n)
(newline) (display n) (start-prime-test n (runtime)))
(define (start-prime-test n start-time)
(if (fast-prime? n 1)
(report-prime (- (runtime) start-time))))
(define (report-prime elapsed-time)
(display "***") (display elapsed-time))
;prime?
(define (fast-prime? n times... | null | https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/1.2.6-6_Primes/1025_prime_three_smallest_primes_fast_expt.scm | scheme | report
prime?
test
search | (define (timed-prime-test n)
(newline) (display n) (start-prime-test n (runtime)))
(define (start-prime-test n start-time)
(if (fast-prime? n 1)
(report-prime (- (runtime) start-time))))
(define (report-prime elapsed-time)
(display "***") (display elapsed-time))
(define (fast-prime? n times)
(cond ((= ti... |
211b18fb79dc9ba23b028dd08382db0d01847e22f185c4b54b5d773604cae420 | jimburton/scrabble | Chapter1.hs | module Test.Chapter1
where
import Test.QuickCheck (Property)
import Test.QuickCheck.Monadic (assert, monadicIO, pick)
import Test.Gen
import Data.Array
import Lens.Simple ((^.))
import System.Random (getStdGen)
import Control.Monad.IO.Class (liftIO)
import Scrabble.Types
( Dir(..)
, board
, Evaluator(..)
, ... | null | https://raw.githubusercontent.com/jimburton/scrabble/89742251e3f67230081c69e037b52149ba45e703/tests/Test/Chapter1.hs | haskell | for the Show instance of Game
element on the board in the right place,
board in the right place. | module Test.Chapter1
where
import Test.QuickCheck (Property)
import Test.QuickCheck.Monadic (assert, monadicIO, pick)
import Test.Gen
import Data.Array
import Lens.Simple ((^.))
import System.Random (getStdGen)
import Control.Monad.IO.Class (liftIO)
import Scrabble.Types
( Dir(..)
, board
, Evaluator(..)
, ... |
ee0d6beebf3ae51f1bccb67b7c6ed36b9f11ef87b0765c923c77394fe2a3cc3b | aigarashi/copl-tools | keywords.ml | open Parser
let v = [
(* game-specific keywords *)
("evalto", EVALTO);
("minus", MINUS);
("times", MULT);
("plus", PLUS);
("is", IS);
("less", LESS);
("than", THAN);
("not", NOT);
("true", TRUE);
("false", FALSE);
("if", IF);
("then", THEN);
("else", ELSE);
("*", AST);
("+", CROSS);
... | null | https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/EvalContML1/keywords.ml | ocaml | game-specific keywords
ContML1 | open Parser
let v = [
("evalto", EVALTO);
("minus", MINUS);
("times", MULT);
("plus", PLUS);
("is", IS);
("less", LESS);
("than", THAN);
("not", NOT);
("true", TRUE);
("false", FALSE);
("if", IF);
("then", THEN);
("else", ELSE);
("*", AST);
("+", CROSS);
("-", HYPHEN);
("<", LT);
... |
0042b3bea3016dc2dc70ba5e383eb9a4ef2a9e5ccb4c5e5021f866b239bc2712 | jwiegley/trade-journal | TestAction.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LAN... | null | https://raw.githubusercontent.com/jwiegley/trade-journal/a355547e2396c82e3c410ef7e403d94f0b6e1b0a/tests/Journal/TestAction.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wno-unused-top-binds -Wno-orphans #
------------------------------------------------------------------------
| The message prefix
| The expected value
| The actual value
------------------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
#... |
bf16efa3162e60383427fa59a74dba2f28dae033e6e78b791fe28c8bcfd613aa | hammerlab/biokepi | conda.mli | open Biokepi_run_environment
type python_version_type = [
| `Python_2
| `Python_3
| `Python_custom of string
| `Python_tool_dependency of string
]
type conda_version_type = [
| `Latest
| `Version of string
]
type conda_environment_type = private {
name: string; (* name of the environment *)
python_ve... | null | https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/environment_setup/conda.mli | ocaml | name of the environment
supported installation channels
defualt installations
packages to be removed after initial setup
where to install the conda and environments
* Helper method to configure conda environments for tools
* A transform to deactivate the conda environment if it is already active
* This is t... | open Biokepi_run_environment
type python_version_type = [
| `Python_2
| `Python_3
| `Python_custom of string
| `Python_tool_dependency of string
]
type conda_version_type = [
| `Latest
| `Version of string
]
type conda_environment_type = private {
python_version: python_version_type;
subdir that will... |
39a05ffe62ab1220d8902fc533645dc5cbda328e5769344156947d266102834a | roswell/roswell | update-hg.lisp | (roswell:include "util")
(defpackage :roswell.update.hg
(:use :cl :roswell.util))
(in-package :roswell.update.hg)
(defun hg (&rest args)
(if (car args)
(let ((path (car args)))
(unless (pathnamep path)
(setf path (make-pathname
:type nil :name nil
:defaults (asdf:system-source-file (asdf:... | null | https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/update-hg.lisp | lisp | (roswell:include "util")
(defpackage :roswell.update.hg
(:use :cl :roswell.util))
(in-package :roswell.update.hg)
(defun hg (&rest args)
(if (car args)
(let ((path (car args)))
(unless (pathnamep path)
(setf path (make-pathname
:type nil :name nil
:defaults (asdf:system-source-file (asdf:... | |
8a6805317dd879a2da262f8a417fe891b77bfbaeaf65aa7f6fd09dadc17344c8 | dixel/kafkus | kafka.clj | (ns kafkus.kafka
(:require [cheshire.core :as json]
[cyrus-config.core :as conf]
[dvlopt.kafka :as K]
[dvlopt.kafka.admin :as K.admin]
[dvlopt.kafka.in :as K.in]
[dvlopt.kafka.out :as K.out]
[deercreeklabs.lancaster :as avro]
[kafka-a... | null | https://raw.githubusercontent.com/dixel/kafkus/27d8f2a809f07a98645fffa9e3d2b612f7dd1991/src/clj/kafkus/kafka.clj | clojure | (ns kafkus.kafka
(:require [cheshire.core :as json]
[cyrus-config.core :as conf]
[dvlopt.kafka :as K]
[dvlopt.kafka.admin :as K.admin]
[dvlopt.kafka.in :as K.in]
[dvlopt.kafka.out :as K.out]
[deercreeklabs.lancaster :as avro]
[kafka-a... | |
4f735df0102594ce40e1ff47f3776e6c8c41a7fc66fde151eb0a01130132c303 | pmundkur/flowcaml | avl_closure.ml | (**************************************************************************)
(* *)
(* Averell *)
(* *)
... | null | https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-averell/avl_closure.ml | ocaml | ************************************************************************
Averell
... | , Projet Cristal , INRIA Rocquencourt
Copyright 2002 , 2003 Institut National de Recherche en Informatique
under the terms of the GNU Library General Public License , with the
$ I d : avl_closure.ml , v 1.4 2003/06/26 13:32:44 simonet Exp $
* The client must provide an impleme... |
848b74bf39ccdbc03bd0e86accd21e842fa1dd46c6ce2f4a964365ae0aa216ab | blitzcode/ray-marching-distance-fields | QQPlainText.hs |
module QQPlainText ( plaintext
) where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
-- Simple Quasi Quoter inserting its contents as a String where it is called
plaintext :: QuasiQuoter
plaintext = QuasiQuoter { quoteExp = quotePlainTextExp
, quotePat = un... | null | https://raw.githubusercontent.com/blitzcode/ray-marching-distance-fields/0578d01e75f819b1242fa1378e3963bd48842acc/QQPlainText.hs | haskell | Simple Quasi Quoter inserting its contents as a String where it is called |
module QQPlainText ( plaintext
) where
import Language.Haskell.TH
import Language.Haskell.TH.Quote
plaintext :: QuasiQuoter
plaintext = QuasiQuoter { quoteExp = quotePlainTextExp
, quotePat = undefined
, quoteDec = undefined
... |
7c2d7355f5e1ecb894bfa70634a42b2fcd47828aa7a0ed2bcd9c7f5495a53017 | fenollp/fancyflow | fancyflow_demo.erl | -module(fancyflow_demo).
-export([sans_pipe/0, pipe/0,
sans_maybe/0, maybe/0,
sans_parallel/0, parallel/0,
nested/0]).
-compile({parse_transform, fancyflow_trans}).
-spec sans_pipe() -> string().
sans_pipe() ->
String = "a b c d e f",
string:join(
lists:map(fun string:to_upper... | null | https://raw.githubusercontent.com/fenollp/fancyflow/bdfedd7625636fc92dd13bb5f90976ad23bce4b6/demo/fancyflow_demo.erl | erlang | Maybe the file doesn't exist
the string from [pipe] is a filename here | -module(fancyflow_demo).
-export([sans_pipe/0, pipe/0,
sans_maybe/0, maybe/0,
sans_parallel/0, parallel/0,
nested/0]).
-compile({parse_transform, fancyflow_trans}).
-spec sans_pipe() -> string().
sans_pipe() ->
String = "a b c d e f",
string:join(
lists:map(fun string:to_upper... |
be751b9ef4aa9a3fe81d17f854e1e975c422114697c1fd293c87fe5ce7260a5d | omnyway-labs/re-crud | core_test.cljs | (ns re-crud.core-test
(:require [cljs.test :refer-macros [deftest is testing run-tests async]]
[re-frame.registrar :as registrar]
[re-frame.core :as re-frame]
[re-crud.core :as crud]
[re-crud.components :as comp]
[re-crud.components.utils :as u]))
(defonce ... | null | https://raw.githubusercontent.com/omnyway-labs/re-crud/2fe9cbcf0a19d8c09a86d9025577e6271e9dd5a3/test/cljs/re_crud/core_test.cljs | clojure | (ns re-crud.core-test
(:require [cljs.test :refer-macros [deftest is testing run-tests async]]
[re-frame.registrar :as registrar]
[re-frame.core :as re-frame]
[re-crud.core :as crud]
[re-crud.components :as comp]
[re-crud.components.utils :as u]))
(defonce ... | |
011cad4dd0e3531c4c6ceabde0e9670fd0973c0098ad0ffdb80deb09c003e74d | RichiH/git-annex | DBus.hs | DBus utilities
-
- Copyright 2012 < >
-
- License : BSD-2 - clause
-
- Copyright 2012 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Utility.DBus where
import Utility.PartialPrelude
import Utility.Exception
import DBus.Client
import DBu... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/DBus.hs | haskell | Connects to the bus, and runs the client action.
-
- If the connection is lost, runs onretry, which can do something like
- a delay, or printing a warning, and has a state value (useful for
- exponential backoff). Once onretry returns, the connection is retried.
| DBus utilities
-
- Copyright 2012 < >
-
- License : BSD-2 - clause
-
- Copyright 2012 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE OverloadedStrings , ScopedTypeVariables #
module Utility.DBus where
import Utility.PartialPrelude
import Utility.Exception
import DBus.Client
import DBu... |
a0732d47efe8a36e57485493ef2fa6a5be77f52be36f05c52e59d71afb5d4abd | ucsd-progsys/mist | mochi-fhnhn.hs | assert :: {v:Bool | v = True} -> Int
assert = \f -> 0
f :: n:Int ~> (Int -> {v:Int | v = n} ) -> (Int -> {v:Int | v = n} ) -> Int
f = \x y -> assert (x 0 = y 0)
h :: n:Int -> Int -> {v:Int| v == n}
h = \x u -> x
main :: Int -> Int
main = \n -> f (h n) (h n)
| null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/mochi-fhnhn.hs | haskell | assert :: {v:Bool | v = True} -> Int
assert = \f -> 0
f :: n:Int ~> (Int -> {v:Int | v = n} ) -> (Int -> {v:Int | v = n} ) -> Int
f = \x y -> assert (x 0 = y 0)
h :: n:Int -> Int -> {v:Int| v == n}
h = \x u -> x
main :: Int -> Int
main = \n -> f (h n) (h n)
| |
ff6c4e74ecbbf2884ffb093f691e79ad0dcc96175b36d9c8dee51533441a2839 | pouriya/director | director_table_mnesia_SUITE.erl | %%% ------------------------------------------------------------------------------------------------
Director is available for use under the following license , commonly known as the 3 - clause ( or
%%% "modified") BSD license:
%%%
Copyright ( c ) 2018 - 2019 ,
%%% ()
%%% All rights reserved.
%%%
%%% Redistributi... | null | https://raw.githubusercontent.com/pouriya/director/919c30db18c83330290fba9e68de330000978674/test/director_table_mnesia_SUITE.erl | erlang | ------------------------------------------------------------------------------------------------
"modified") BSD license:
()
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
conditions and the... | Director is available for use under the following license , commonly known as the 3 - clause ( or
Copyright ( c ) 2018 - 2019 ,
1 . Redistributions of source code must retain the above copyright notice , this list of
2 . Redistributions in binary form must reproduce the above copyright notice , this list of
... |
2b91b55ea1cc3a33ddef264471a3b428f06a629afa4f818eb0ba0de05b2e2516 | namin/logically | smt.clj | (ns logically.exp.smt
(:refer-clojure :exclude [==])
(:use [clojure.core.logic.protocols]
[clojure.core.logic :exclude [is] :as l])
(:require [clojure.java.io :as io])
(:use [clojure.java.shell :only [sh]]))
(def out-counter (atom 0))
(defn out-smt []
(str "out" (swap! out-counter inc) ".smt"))
(de... | null | https://raw.githubusercontent.com/namin/logically/902258221e347edf16e8ff37f918a534ff1088b4/src/logically/exp/smt.clj | clojure | (ns logically.exp.smt
(:refer-clojure :exclude [==])
(:use [clojure.core.logic.protocols]
[clojure.core.logic :exclude [is] :as l])
(:require [clojure.java.io :as io])
(:use [clojure.java.shell :only [sh]]))
(def out-counter (atom 0))
(defn out-smt []
(str "out" (swap! out-counter inc) ".smt"))
(de... | |
c8bdde6b0cb00f411c8a3487394640f9f6e386366f0b18b6bb33c01f92921d46 | nikita-volkov/refined | Type.hs | --------------------------------------------------------------------------------
Copyright © 2015 Nikita
Copyright © 2018
Copyright © 2020 chessai
--
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
files ( the " Software " ) , ... | null | https://raw.githubusercontent.com/nikita-volkov/refined/91566f4e313937b7315a401fd116fa0aa2a15f06/src/Refined/Unsafe/Type.hs | haskell | ------------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense... |
Copyright © 2015 Nikita
Copyright © 2018
Copyright © 2020 chessai
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRAN... |
c40f19839863fa2e54a38d5082a415f8cebc0a234a986a13d265224fa3a30f7d | crisptrutski/boot-cljs-test | lib.cljc | (ns boot-cljs-test-example.lib)
(def three 3)
| null | https://raw.githubusercontent.com/crisptrutski/boot-cljs-test/307bc13a8b250d9583dd890c961cdec832238180/example/src/boot_cljs_test_example/lib.cljc | clojure | (ns boot-cljs-test-example.lib)
(def three 3)
| |
c5fd976c935b28500d05aa9d012b3feaa510b8703910b0809f8399e16687d0ea | sam-jay/shoo-lang | codegen.ml | Authors : , , ,
module L = Llvm
open Ast
open Sast
open Lift
module StringMap = Map.Make(String)
let translate functions =
let context = L.global_context () in
let i32_t = L.i32_type context
and i1_t = L.i1_type context
and float_t = L.double_type context
and void_t = L.... | null | https://raw.githubusercontent.com/sam-jay/shoo-lang/75e2cff6a176d742f19bf9aa56490594c3683f92/src/codegen.ml | ocaml | Build each function signature without building the body
Fill in the body for a given function
Unpacking args and env vars,
skip for main as its env is empty and has no params
Allocate a closure of the function within itself for recursive calls
Pack the function ptr and the env ptr into the closure struc... | Authors : , , ,
module L = Llvm
open Ast
open Sast
open Lift
module StringMap = Map.Make(String)
let translate functions =
let context = L.global_context () in
let i32_t = L.i32_type context
and i1_t = L.i1_type context
and float_t = L.double_type context
and void_t = L.... |
6820b54244ce65e4e10a7976f87275218a47b1e5c7b3d9137861bc7be70dbe56 | racket/rhombus-prototype | util.rkt | #lang racket/base
(provide values->list
measure-ms
display-results)
(require racket/list
qi)
(define-syntax-rule (values->list expr)
(call-with-values (λ () expr)
list))
(define (measure-ms fn . args)
(second (values->list (time-apply fn args))))
(define-flow disp... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/4efba21c5ebd2205c8f32c36f27d9619c0fb39e6/design/equality/poc/equality/util.rkt | racket | #lang racket/base
(provide values->list
measure-ms
display-results)
(require racket/list
qi)
(define-syntax-rule (values->list expr)
(call-with-values (λ () expr)
list))
(define (measure-ms fn . args)
(second (values->list (time-apply fn args))))
(define-flow disp... | |
757a980bf6fe53b75f7819f789358b551258ae74dcb2ac0ac4aa86e806f09952 | evrim/core-server | class+.lisp | (in-package :core-server)
;; +-------------------------------------------------------------------------
;; | Class+ Implementation
;; +-------------------------------------------------------------------------
(defclass class+ (standard-class)
((rest :initarg :rest :initform nil :accessor class+.rest)
(ctor :inita... | null | https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/class%2B/class%2B.lisp | lisp | +-------------------------------------------------------------------------
| Class+ Implementation
+-------------------------------------------------------------------------
--------------------------------------------------------------------------
------------------------------------------------------------------... | (in-package :core-server)
(defclass class+ (standard-class)
((rest :initarg :rest :initform nil :accessor class+.rest)
(ctor :initarg :ctor :initform nil :accessor class+.%ctor)
(methods :initarg :methods :initform nil :accessor class+.%methods)
(%timestamp :accessor class+.timestamp))
(:documentation "Me... |
5a6840cafb3c2f483a193f19326a3e95bc264bffdd8a31d646baf6ac2834904f | emqx/hocon | hocon_cli.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/hocon/437ad44f5d90174ae433a78c73599e5447f3f930/src/hocon_cli.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 ... | Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(hocon_cli).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-export([is_valid_no... |
6147203bda19ad18a2b63d02e3f7cf01200d9d3f676d6e9ce11542270fcfaca4 | imandra-ai/imandra-prelude | CCString.ml |
(* This file is free software, part of containers. See file "license" for more details. *)
(** {1 Basic String Utils} *)
type 'a gen = unit -> 'a option
type 'a sequence = ('a -> unit) -> unit
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
(* compatibility implementations *)
let init n f =
let buf = Byt... | null | https://raw.githubusercontent.com/imandra-ai/imandra-prelude/ff6b06ef5529c07812020ba3816b941305156fa5/src-bs/containers/CCString.ml | ocaml | This file is free software, part of containers. See file "license" for more details.
* {1 Basic String Utils}
compatibility implementations
standard implementations
* Like {!String.blit}.
Compatible with the [-safe-string] option.
@raise Invalid_argument if indices are not valid
$Q
Q.printable_str... |
type 'a gen = unit -> 'a option
type 'a sequence = ('a -> unit) -> unit
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
let init n f =
let buf = Bytes.init n f in
Bytes.unsafe_to_string buf
$ T
init 3 ( fun i - > [ |'a ' ; ' b ' ; ' c'|].(i ) ) = " abc "
init 0 ( fun _ - > assert false ) = " "... |
25099fa7bb7ba677ef51111b2fe4226328085ca10629da7181d2ad76cdac1dd5 | philnguyen/soft-contract | div-by-zero.rkt | #lang racket
(/ 1 0)
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/misc/div-by-zero.rkt | racket | #lang racket
(/ 1 0)
| |
87d17259d80bfab8aac5f492c1c5e5ccc36c4822fe9c656fb6c4f2f3f395bbe3 | deadpendency/deadpendency | QueueTopicId.hs | module Common.Effect.QueueEventPublish.Model.QueueTopicId
( QueueTopicId (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
newtype QueueTopicId = QueueTopicId
{ _ntText :: Text
}
deriving stock (Eq, Show, Generic)
instance ToJSON QueueTopicId where
toJSON = genericToJSON cleanJSONOptions
| null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/QueueEventPublish/Model/QueueTopicId.hs | haskell | module Common.Effect.QueueEventPublish.Model.QueueTopicId
( QueueTopicId (..),
)
where
import Common.Aeson.Aeson
import Data.Aeson
newtype QueueTopicId = QueueTopicId
{ _ntText :: Text
}
deriving stock (Eq, Show, Generic)
instance ToJSON QueueTopicId where
toJSON = genericToJSON cleanJSONOptions
| |
cc98aec52637fd2f7338a8682a176b9bc8a9e44ec314ffe14fff1d780f80fdb4 | aryx/yacfe | compare_c.mli | open Common
type compare_result =
| Correct
| Pb of string
| PbOnlyInNotParsedCorrectly of string
(* the string list is the output of diff *)
val compare_ast :
filename -> filename -> compare_result * string list
val compare_token :
filename -> filename -> compare_result * string list
val compare_default... | null | https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/parsing_c/compare_c.mli | ocaml | the string list is the output of diff | open Common
type compare_result =
| Correct
| Pb of string
| PbOnlyInNotParsedCorrectly of string
val compare_ast :
filename -> filename -> compare_result * string list
val compare_token :
filename -> filename -> compare_result * string list
val compare_default : filename -> filename -> compare_result * ... |
996de293d8c22dd0c111bb593949ac5f99777c2d0b100c0f983c58112bb4aa34 | mzp/scheme-abc | sexp.mli | (** S-expression parsing. *)
type t =
Int of int Node.t
| String of string Node.t
| Float of float Node.t
| Bool of bool Node.t
| Symbol of string Node.t
| List of t list Node.t
val of_stream : Token.t Stream.t -> t list
| null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/parser/sexp.mli | ocaml | * S-expression parsing. | type t =
Int of int Node.t
| String of string Node.t
| Float of float Node.t
| Bool of bool Node.t
| Symbol of string Node.t
| List of t list Node.t
val of_stream : Token.t Stream.t -> t list
|
1c4ec0cdc903bd642af65abeb5f6177be29a1cd236beb92e8a60fe07d58fb9ca | SimulaVR/godot-haskell | ViewportTexture.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.ViewportTexture
(Godot.Core.ViewportTexture.get_view... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/ViewportTexture.hs | haskell | | The path to the @Viewport@ node to display. This is relative to the scene root, not to the node which uses the texture.
| The path to the @Viewport@ node to display. This is relative to the scene root, not to the node which uses the texture.
| The path to the @Viewport@ node to display. This is relative to the sce... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.ViewportTexture
(Godot.Core.ViewportTexture.get_view... |
a156914b87a937243f88158cd0b3804dc50bdc1983e6c6cb44d81a8a2f81515e | ml4tp/tcoq | egramcoq.ml | (************************************************************************)
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/parsing/egramcoq.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open CErrors
open Util
open P... |
21048987ac8c63d015920690904f36b6f3818a16bbb200707de92183b15f550c | mewa/clojure-k8s | extensions.clj | (ns kubernetes.api.extensions
(:require [kubernetes.core :refer [call-api check-required-params with-collection-format]])
(:import (java.io File)))
(defn get-extensions-api-group-with-http-info
"
get information of a group"
[]
(call-api "/apis/extensions/" :get
{:path-params {}
:... | null | https://raw.githubusercontent.com/mewa/clojure-k8s/a7e8d82f0e0bc47e5678c72d7d9b8216080ccffc/src/kubernetes/api/extensions.clj | clojure | (ns kubernetes.api.extensions
(:require [kubernetes.core :refer [call-api check-required-params with-collection-format]])
(:import (java.io File)))
(defn get-extensions-api-group-with-http-info
"
get information of a group"
[]
(call-api "/apis/extensions/" :get
{:path-params {}
:... | |
3db5832b7d3f0c60b45a8f372d3cc7a48247b6564029dfde8ea57901ee7ce102 | vii/teepeedee2 | page.lisp | (in-package #:tpd2.webapp)
(defvar *webapp-frame*)
(defconstant-bv +webapp-frame-id-param+ ".webapp-frame.")
(defun-speedy get-http-param (params name)
(alist-get params name :test #'byte-vector=-fold-ascii-case))
(define-constant +web-safe-chars+
(force-byte-vector
(append (loop for c from (char-code #\A) to... | null | https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/webapp/page.lisp | lisp | sometimes a unique string to stop overeager caches | (in-package #:tpd2.webapp)
(defvar *webapp-frame*)
(defconstant-bv +webapp-frame-id-param+ ".webapp-frame.")
(defun-speedy get-http-param (params name)
(alist-get params name :test #'byte-vector=-fold-ascii-case))
(define-constant +web-safe-chars+
(force-byte-vector
(append (loop for c from (char-code #\A) to... |
42cd217b66499a8389d2e07aeee2e46da7cd9470033fe65735d1db06dcbf9ceb | polachok/xbattbar | Core.hs | module XBattBar.Core (start) where
import Prelude hiding (Left, Right)
import Data.Bits ((.|.))
import Control.Monad (forever)
import Graphics.X11.Types
import Graphics.X11.Xlib.Types hiding (Position)
import Graphics.X11.Xlib.Display
import Graphics.X11.Xlib.Window (raiseWindow)
import Graphics.X11.Xlib.Event
import G... | null | https://raw.githubusercontent.com/polachok/xbattbar/05e7318904f59551adb7d6e7a333dc55913f5541/src/XBattBar/Core.hs | haskell | | retrieve screen geometry
| transform screen geometry into bar geometry
| transform screen geometry into popup window geometry
| get pixels from color names
| dispatch X11 events to widgets
| necessary transformations on state change
| main loop | module XBattBar.Core (start) where
import Prelude hiding (Left, Right)
import Data.Bits ((.|.))
import Control.Monad (forever)
import Graphics.X11.Types
import Graphics.X11.Xlib.Types hiding (Position)
import Graphics.X11.Xlib.Display
import Graphics.X11.Xlib.Window (raiseWindow)
import Graphics.X11.Xlib.Event
import G... |
c2b05b584197f100210dd0f7b7fb3f9e349d507a5e228a5c812a1e920c29b832 | haskell/containers | Tree.hs | # LANGUAGE CPP #
module Main where
import Control.DeepSeq (NFData, rnf)
import Control.Exception (evaluate)
import Data.Coerce (coerce)
import Data.Foldable (fold, foldl', toList)
import Data.Monoid (All(..))
#if MIN_VERSION_base(4,18,0)
import Data.Monoid (Sum(..))
import qualified Data.Foldable1 as Foldable1
#endif
... | null | https://raw.githubusercontent.com/haskell/containers/848286d531e9700b5a16970a8b50aac0fb969406/containers-tests/benchmarks/Tree.hs | haskell | # LANGUAGE CPP #
module Main where
import Control.DeepSeq (NFData, rnf)
import Control.Exception (evaluate)
import Data.Coerce (coerce)
import Data.Foldable (fold, foldl', toList)
import Data.Monoid (All(..))
#if MIN_VERSION_base(4,18,0)
import Data.Monoid (Sum(..))
import qualified Data.Foldable1 as Foldable1
#endif
... | |
2207b5a0aabb7ce770c0f0cb499aa2aed0830dce4e8be904bc6826f21d109e6c | jimpil/hotel-nlp | regexes.clj | (ns hotel_nlp.concretions.regexes
#_(:require [hotel_nlp.protocols :as pro]
[hotel_nlp.helper :as help])
)
(def sentence-segmentation-regex "Regular expression capable of identifying sentence boundaries. To be used with clojure.string/split."
# " ( ? < =[ - 9]{1,2}\s{1,2}(p|a)|\.m|Mr|Mrs|Ms|... | null | https://raw.githubusercontent.com/jimpil/hotel-nlp/2647f999b5998595a5edac1900e850140f374de6/src/hotel_nlp/concretions/regexes.clj | clojure | match any word followed (possibly) by a /space, followed by non-empty parentheses
the previous regex inverted
simple
a bit more advanced | (ns hotel_nlp.concretions.regexes
#_(:require [hotel_nlp.protocols :as pro]
[hotel_nlp.helper :as help])
)
(def sentence-segmentation-regex "Regular expression capable of identifying sentence boundaries. To be used with clojure.string/split."
# " ( ? < =[ - 9]{1,2}\s{1,2}(p|a)|\.m|Mr|Mrs|Ms|... |
9f2489166413c9d926605f45757b886f453ae10632836ff08b0e525e0b1ad618 | xapi-project/xenopsd | suspend_image.mli |
* Copyright ( C ) 2006 - 2014 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xenopsd/f4da21a4ead7c6a7082af5ec32f778faf368cf1c/lib/suspend_image.mli | ocaml |
* Copyright ( C ) 2006 - 2014 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | |
b10c878d60ea57a02050d154b5650e3ea31bd51bb28fb947f22ec35b11ee5543 | jwiegley/notes | IsolationRunnerSpec.hs | it "invalid module header" $ harness $ do
open [ ("Main.hs", [here|
module Main where
import Something
|])
, ("Something2.hs", "module Something where")
] [] 401
errs <- errors 401 0
errs `shouldBe`
[ (KindError, Just ("Somet... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/7097759/IsolationRunnerSpec.hs | haskell | it "invalid module header" $ harness $ do
open [ ("Main.hs", [here|
module Main where
import Something
|])
, ("Something2.hs", "module Something where")
] [] 401
errs <- errors 401 0
errs `shouldBe`
[ (KindError, Just ("Somet... | |
5bdd9292a6790d04e7b28f1ab24dee0de54c56c9c31eb7d6f111d6010d9072c9 | ghc/testsuite | Main.hs |
# LANGUAGE OverlappingInstances , UndecidableInstances #
--
Test case adopted from the HList library
-- /~ralf/HList/
--
-- Tests functional dependencies and overlapping instances
module Main where
import FakePrelude
import TypeEq
import TypeCast
--
-- Let's test.
-- The following should print "(HTrue,HFalse)".... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/testeq1/Main.hs | haskell |
/~ralf/HList/
Tests functional dependencies and overlapping instances
Let's test.
The following should print "(HTrue,HFalse)".
|
# LANGUAGE OverlappingInstances , UndecidableInstances #
Test case adopted from the HList library
module Main where
import FakePrelude
import TypeEq
import TypeCast
main = print $ ( typeEq "42" "88"
, typeEq "42" (42::Int)
)
|
266057f9ff34a78297f90290dcebdac60f8dda4125e7243a15e5bda4c8037623 | kapok-lang/kapok | kapok_cli.erl | %% Command line functionals.
-module(kapok_cli).
-export([main/1,
run/1]).
-include("kapok.hrl").
%% config hold all infos parsed from command line options and arguments.
blank_config() ->
#{commands => [],
compile => [],
compiler_options => [],
outdir => ".",
pa => [],
pz => [],
hal... | null | https://raw.githubusercontent.com/kapok-lang/kapok/4272f990fe495e595d2afe38605dbca560bbe072/lib/kapok/src/kapok_cli.erl | erlang | Command line functionals.
config hold all infos parsed from command line options and arguments.
Public API
run the specified fun on child process
spawn a new child process to run the specified fun, and monitor it
run exit hooks on exit
Helpers
try to parse the shared option, if there is no more shared option th... | -module(kapok_cli).
-export([main/1,
run/1]).
-include("kapok.hrl").
blank_config() ->
#{commands => [],
compile => [],
compiler_options => [],
outdir => ".",
pa => [],
pz => [],
halt => true,
errors => []}.
main(Args) ->
{Config, _} = parse_args(Args),
run(fun(_) ->
... |
00bb63c078214450f117e056e2f841c7a625b20b5448ce50d7efa139bab19a19 | arttuka/reagent-material-ui | scoreboard_rounded.cljs | (ns reagent-mui.icons.scoreboard-rounded
"Imports @mui/icons-material/ScoreboardRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def scoreboard-rounded (... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/scoreboard_rounded.cljs | clojure | (ns reagent-mui.icons.scoreboard-rounded
"Imports @mui/icons-material/ScoreboardRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def scoreboard-rounded (... | |
ce4e69afc644e10b0aa2dd391cfea5fb3c0ffcd4159fd1a71669973e898e5d57 | sigxcpu76/transcode-server | transcode_server.erl | %%%-------------------------------------------------------------------
%%% File : gen_server_template.erl
%%% Author : my name <>
%%% Description :
%%%
Created : 2 Mar 2007 by my name < >
%%%-------------------------------------------------------------------
-module(transcode_server).
-behaviour(gen_server).
-incl... | null | https://raw.githubusercontent.com/sigxcpu76/transcode-server/8b5e5bd9c672ab22486c9853d8e6ec749745ec12/src/transcode_server.erl | erlang | -------------------------------------------------------------------
File : gen_server_template.erl
Author : my name <>
Description :
-------------------------------------------------------------------
API
gen_server callbacks
====================================================================
API
==============... | Created : 2 Mar 2007 by my name < >
-module(transcode_server).
-behaviour(gen_server).
-include("commons.hrl").
-define(SERVER, ?MODULE).
-export([get_clip_info/1, get_job_info/1, get_jobs/0,
start_job/2, start_link/0, update_progress/2]).
-export([code_change/3, handle_call/3, handle_cast/2,
handle_info/2,... |
8d0226ac4bd4c0bfc3bc754f4e76c2e38aa0adba054550c0fbe27de869b9de37 | robert-strandh/SICL | defmethod-defmacro.lisp | (cl:in-package #:sicl-clos)
This is a simplified version of the macro DEFMETHOD that is good
;;; enough to use for macro expansion during bootstrappping.
(defmacro defmethod
(&environment environment function-name &rest rest)
(multiple-value-bind
(qualifiers required remaining specializers declarations... | null | https://raw.githubusercontent.com/robert-strandh/SICL/0245adef2cb484058afc4d8761022a98038bee77/Code/Boot/Phase-1/defmethod-defmacro.lisp | lisp | enough to use for macro expansion during bootstrappping. | (cl:in-package #:sicl-clos)
This is a simplified version of the macro DEFMETHOD that is good
(defmacro defmethod
(&environment environment function-name &rest rest)
(multiple-value-bind
(qualifiers required remaining specializers declarations documentation forms)
(parse-defmethod rest)
(let (... |
cb9cb074ed5056e7063f822482f550a56d718cec1b7de2d51618434d7e7abce9 | tanakh/ICFP2011 | SayakaRevive.hs | #!/usr/bin/env runhaskell
import Control.Applicative
import qualified Control.Exception.Control as E
import Control.Monad
import Data.List
import LTG
import LTG.SoulGems
getVitals :: Bool -> LTG [Int]
getVitals my = do
forM [0..255] $ \i -> do
getVital my i
maximize :: Int -> LTG ()
maximize ix = do
hp <- ge... | null | https://raw.githubusercontent.com/tanakh/ICFP2011/db0d670cdbe12e9cef4242d6ab202a98c254412e/ai/SayakaRevive.hs | haskell | #!/usr/bin/env runhaskell
import Control.Applicative
import qualified Control.Exception.Control as E
import Control.Monad
import Data.List
import LTG
import LTG.SoulGems
getVitals :: Bool -> LTG [Int]
getVitals my = do
forM [0..255] $ \i -> do
getVital my i
maximize :: Int -> LTG ()
maximize ix = do
hp <- ge... | |
aebc92d105cb9edb4df15f1d3c79f3a07026e2a154ff2c35aa3e57b6c2c8efda | dradtke/Lisp-Text-Editor | eventbox.lisp | (in-package :gtk-cffi)
(defclass event-box (bin)
())
(defcfun "gtk_event_box_new" :pointer)
(defmethod gconstructor ((event-box event-box)
&key &allow-other-keys)
(gtk-event-box-new))
| null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/gtk/eventbox.lisp | lisp | (in-package :gtk-cffi)
(defclass event-box (bin)
())
(defcfun "gtk_event_box_new" :pointer)
(defmethod gconstructor ((event-box event-box)
&key &allow-other-keys)
(gtk-event-box-new))
| |
c979d40386654e67f87bff5e9679b65426c49a4ebd840abcf7070b6166ac48c1 | funcool/struct | tests.cljc | (ns struct.tests
(:require #?(:cljs [cljs.test :as t]
:clj [clojure.test :as t])
[struct.core :as st]))
;; --- Tests
(t/deftest test-optional-validators
(let [scheme {:max st/number
:scope st/string}
input {:scope "foobar"}
result (st/validate input schem... | null | https://raw.githubusercontent.com/funcool/struct/d8aff68ee55176182b2511b57afa9fb674b2f1ce/test/struct/tests.cljc | clojure | --- Tests
--- Entry point | (ns struct.tests
(:require #?(:cljs [cljs.test :as t]
:clj [clojure.test :as t])
[struct.core :as st]))
(t/deftest test-optional-validators
(let [scheme {:max st/number
:scope st/string}
input {:scope "foobar"}
result (st/validate input scheme)]
(t/is... |
e1e6981213eb78d43d5a1c76aedd90bc10429e0b2c3c1536c06882954e930d57 | camlspotter/ocamloscope.2 | scrape.mli | open Utils
val packages : FilePath.t -> string list -> unit
* [ packages data_dir packs ] scrape the given OCamlFind package groups
[ packs ] then save the result to [ data_dir ^/ < package>.dat ] files
[packs] then save the result to [data_dir ^/ <package>.dat] files
*)
| null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/scrape.mli | ocaml | open Utils
val packages : FilePath.t -> string list -> unit
* [ packages data_dir packs ] scrape the given OCamlFind package groups
[ packs ] then save the result to [ data_dir ^/ < package>.dat ] files
[packs] then save the result to [data_dir ^/ <package>.dat] files
*)
| |
14b6e07a0348f0c83890bf0a76877c636dbb4c72b6e69e768105fc3ad3fd8e0f | paoloo/blockchain | project.clj | (defproject blockchain "0.1.1-BURNINGASS"
:description "A simple clojure implementation of a blockchain"
:url ""
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.8.0"]
[compojure "1.5.1"]
[clj-http "3.7.0"]
[cheshire "5.8.0"]
[r... | null | https://raw.githubusercontent.com/paoloo/blockchain/ad8e60629e0349de173fdf42a789f13bdcb61c75/project.clj | clojure | (defproject blockchain "0.1.1-BURNINGASS"
:description "A simple clojure implementation of a blockchain"
:url ""
:min-lein-version "2.0.0"
:dependencies [[org.clojure/clojure "1.8.0"]
[compojure "1.5.1"]
[clj-http "3.7.0"]
[cheshire "5.8.0"]
[r... | |
e632d8505587f4cb050382e9c90cd28b745993d22b58c6ea5d016f2bcc6bd8c0 | rtoy/cmucl | resource.lisp | -*- Mode : Common - Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
RESOURCE - Lisp version of XLIB 's Xrm resource manager
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permi... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/clx/resource.lisp | lisp | Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
documentat... |
RESOURCE - Lisp version of XLIB 's Xrm resource manager
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
The C version of this uses a 64 entry h... |
6e1d3d15266d04edfe0cfe86622a8de0915143314e573fa9102a382ea1a13758 | beamspirit/bigwig | bigwig_http_static.erl | %%
%% show details on the VM, releases, apps, etc.
%%
-module(bigwig_http_static).
-behaviour(cowboy_http_handler).
-export([init/3, handle/2, terminate/2]).
-export([html/1, css/1, js/1]).
-compile(export_all).
init({tcp, http}, Req, []) ->
{ok, Req, undefined_state};
init({tcp, http}, Req, OnlyFile) ->
{ok, Re... | null | https://raw.githubusercontent.com/beamspirit/bigwig/552ac9968d2457286056a17f3be7f53ec72a31cc/src/bigwig_http_static.erl | erlang |
show details on the VM, releases, apps, etc.
strip <<"static">> | -module(bigwig_http_static).
-behaviour(cowboy_http_handler).
-export([init/3, handle/2, terminate/2]).
-export([html/1, css/1, js/1]).
-compile(export_all).
init({tcp, http}, Req, []) ->
{ok, Req, undefined_state};
init({tcp, http}, Req, OnlyFile) ->
{ok, Req, OnlyFile}.
handle(Req, undefined_state = State) ->... |
106e0c1b749a96216de1eb78253c7216694ed5cfbd465ddeecb12657d909a1fb | herbelin/coq-hh | rawterm_to_relation.ml | open Printer
open Pp
open Names
open Term
open Rawterm
open Libnames
open Indfun_common
open Util
open Rawtermops
let observe strm =
if do_observe ()
then Pp.msgnl strm
else ()
let observennl strm =
if do_observe ()
then Pp.msg strm
else ()
type binder_type =
| Lambda of name
| Prod of name
| LetIn... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/plugins/funind/rawterm_to_relation.ml | ocaml |
The main part deals with building a list of raw constructor expressions
from the rhs of a fixpoint equation.
the binding context of the result
The value
for each result in arg_res
we add it in each args_res
and then we flatten the map
The combination function for an argument with a list of argumen... | open Printer
open Pp
open Names
open Term
open Rawterm
open Libnames
open Indfun_common
open Util
open Rawtermops
let observe strm =
if do_observe ()
then Pp.msgnl strm
else ()
let observennl strm =
if do_observe ()
then Pp.msg strm
else ()
type binder_type =
| Lambda of name
| Prod of name
| LetIn... |
ece8df1def31438af84f08551e83ca3c294208e7a1b6aa7719696f6ccabf89e7 | adlai/scalpl | util.lisp | (defpackage #:scalpl.util
(:use #:c2cl #:anaphora #:parse-float #:decimals
#:string-case #:local-time #:split-sequence)
(:export ; if these are complex enough that their documentation
;; string overflows into the format restandardizatation
;; debate, then they may belong in someone else's utili... | null | https://raw.githubusercontent.com/adlai/scalpl/39a0d49be18f36b0f339fc5482e946924b658e21/util.lisp | lisp | if these are complex enough that their documentation
string overflows into the format restandardizatation
debate, then they may belong in someone else's utility lib.
json
TODO: fail-on-error etc
naming problems is the only liability
'complement' evokes the angular interpretation
#:|CO: see, oh, I don't know: it... | (defpackage #:scalpl.util
(:use #:c2cl #:anaphora #:parse-float #:decimals
#:string-case #:local-time #:split-sequence)
#:icbrt
#:shorten-uid
#:once-only
#:shallow-copy
#:dbz-guard
#:slot-reduce #:slot-reducer #:slot-setter #:aslot-setter
#:aand1 #:awhen1 #:amvp1
#:parse-price
#:par... |
95643a0a7ffe26f21f443e0f9639cd264a2668f641cf022aa64f0dac2b75bfc6 | sharplispers/montezuma | term-enum.lisp | (in-package #:montezuma)
(defclass term-enum ()
())
(defmethod skip-to ((self term-enum) target)
(while (term> target (term self))
(unless (next self)
(return-from skip-to NIL)))
T)
| null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/index/term-enum.lisp | lisp | (in-package #:montezuma)
(defclass term-enum ()
())
(defmethod skip-to ((self term-enum) target)
(while (term> target (term self))
(unless (next self)
(return-from skip-to NIL)))
T)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.