_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
6886a0a3cc7cf504a6831ce9150fc1f597632249fdbb4f83d07f2c2d8b470b4a
KaroshiBee/weevil
dap_launch.ml
module D = Dap_messages.Data module On_request = Dap_handlers.Request_response.Make (struct type enum = Dap_commands.launch type contents = D.LaunchRequestArguments.t type presence = D.Presence.req type msg = (enum, contents, presence) Dap_request.Message.t type t = msg Dap_requ...
null
https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/dapper/dap_launch.ml
ocaml
module D = Dap_messages.Data module On_request = Dap_handlers.Request_response.Make (struct type enum = Dap_commands.launch type contents = D.LaunchRequestArguments.t type presence = D.Presence.req type msg = (enum, contents, presence) Dap_request.Message.t type t = msg Dap_requ...
a455891073055c3ee45d530b6797f3ab70296b36b20da2850f0ec7e9a3919609
metosin/malli
json_schema.cljc
(ns malli.experimental.time.json-schema (:require [malli.experimental.time] [malli.json-schema :as json])) ;; date-time: A string instance is valid against this attribute if it is a valid representation according to the " date - time ' ABNF rule ;; (referenced above) ;; date: A string instance is vali...
null
https://raw.githubusercontent.com/metosin/malli/372ad8119300d1ed054a383e184c431b8494c697/src/malli/experimental/time/json_schema.cljc
clojure
date-time: A string instance is valid against this attribute if it is (referenced above) date: A string instance is valid against this attribute if it is a (referenced above) time: A string instance is valid against this attribute if it is a (referenced above) duration: A string instance is valid against this at...
(ns malli.experimental.time.json-schema (:require [malli.experimental.time] [malli.json-schema :as json])) a valid representation according to the " date - time ' ABNF rule valid representation according to the " full - date " ABNF rule valid representation according to the " full - time " ABNF r...
3ccf1c1d3c0cac0c461af863139ee7a0c3225317c14bc45f6432f87e30ad6a2a
phronmophobic/dewey
stats.clj
(ns stats (:require [clojure.java.io :as io] [clojure.pprint :refer [pprint]] [clojure.edn :as edn]) (:import java.io.PushbackReader java.util.zip.GZIPInputStream)) (defn on-close "Transducer that calls f on completion." [f] (fn [rf] (fn ([] (rf)) ([result] ...
null
https://raw.githubusercontent.com/phronmophobic/dewey/441866c2906195f9f976066a9bd29784276a3699/examples/stats/src/stats.clj
clojure
(ns stats (:require [clojure.java.io :as io] [clojure.pprint :refer [pprint]] [clojure.edn :as edn]) (:import java.io.PushbackReader java.util.zip.GZIPInputStream)) (defn on-close "Transducer that calls f on completion." [f] (fn [rf] (fn ([] (rf)) ([result] ...
1dc89e1a78dcedf490e90a1427cfa203fed66366b0118f17ff62708f9eabaf27
dyzsr/ocaml-selectml
tupled_function.ml
(* TEST * bytecode * native *) type 'a t = | N of 'a | C of 'a t * 'a t This function is recognized as ' tupled ' by the backend ; it is a regression - test to check that our TMC transformation works as expected for tupled ( rather than curried ) functions . Note : it is important to test t...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tmc/tupled_function.ml
ocaml
TEST * bytecode * native
type 'a t = | N of 'a | C of 'a t * 'a t This function is recognized as ' tupled ' by the backend ; it is a regression - test to check that our TMC transformation works as expected for tupled ( rather than curried ) functions . Note : it is important to test the ' native ' compiler here , as the ...
d46ac6fde3c6c8f4fc456ad9f9bc6be52f9e806b0c77ff987da27aee6d63759e
ober/metis
pkgdcl.lisp
;;(load (merge-pathnames "~/quicklisp/setup.lisp" *default-pathname-defaults*)) ;; (ql:quickload '( ;; :fare-memoization ;; :cl-fad ;; :gzip-stream ;; :cl-json : ;; :uiop : ;; :cl-date-time-parser ;;;; :manardb ;; :postmodern ;; ))
null
https://raw.githubusercontent.com/ober/metis/b8de5fe34682202e9d7d417fbcc2645d3e3d047d/src/old/pkgdcl.lisp
lisp
(load (merge-pathnames "~/quicklisp/setup.lisp" *default-pathname-defaults*)) (ql:quickload '( :fare-memoization :cl-fad :gzip-stream :cl-json :uiop :cl-date-time-parser :manardb :postmodern ))
: :
adf34e48252e01a37af0ce1f438aec3730ddcc560cf2c0da0338b84b829e72ea
nathanmarz/storm-deploy
security.clj
; ; Copyright ( C ) 2011 Cloud Conscious , LLC . < > ; ; ==================================================================== 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 ;...
null
https://raw.githubusercontent.com/nathanmarz/storm-deploy/b97265bb8b79f84f5907deb826c702e9c4947305/src/clj/backtype/storm/security.clj
clojure
==================================================================== 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 ) 2011 Cloud Conscious , LLC . < > distributed under the License is distributed on an " AS IS " BASIS , (ns #^{:author "Juegen Hoetzel, " :doc "A clojure binding for the jclouds AWS security group interface."} backtype.storm.security (:require (org.jclouds [compute2 :as compute]) [org...
f949c0beb1054382955e983e64de5dd653be5a2db88e477b0d12732fa2f08749
t-sin/lambdaboy
window.lisp
; (ql:quickload '("cl-opengl" "cl-glfw3" "varjo")) (eval-when (:compile-toplevel :load-toplevel :execute) (defun collect-normal-args (args) (loop :for arg :in args :until (eq arg '&uniform) :collect arg)) (defun collect-uniforms (args) (loop :with uniform? := nil :for arg :in...
null
https://raw.githubusercontent.com/t-sin/lambdaboy/65b7559eeb293221da4f93f5de1bb218c731e054/window.lisp
lisp
(ql:quickload '("cl-opengl" "cl-glfw3" "varjo"))
(eval-when (:compile-toplevel :load-toplevel :execute) (defun collect-normal-args (args) (loop :for arg :in args :until (eq arg '&uniform) :collect arg)) (defun collect-uniforms (args) (loop :with uniform? := nil :for arg :in args :if uniform? :collect arg :...
c7b3838f2cc995d4bdc994c4a6e1af8fe24564a37f54f8c6987560ae96567294
AlexCharlton/cl-glfw3
fragment-shader.lisp
(in-package #:cl-glfw3-examples) (export '(fragment-shader-example)) ;; Error handling for shader compilation events (define-condition compile-error (error) ((message :initform nil :initarg :message :reader compile-error-message :documentation "The reason given for the error"))) (defparameter +vert...
null
https://raw.githubusercontent.com/AlexCharlton/cl-glfw3/926b574f3a77c12e86cd22222314cf36055e7ca1/examples/fragment-shader.lisp
lisp
Error handling for shader compilation events Update our time variable in the shader Draw a box far back from the camera Print to console & then throw error Keep trying to load our shader (Allow user to fix compile errors) Create the OpenGL shader in memory Create the program which controls the shader act...
(in-package #:cl-glfw3-examples) (export '(fragment-shader-example)) (define-condition compile-error (error) ((message :initform nil :initarg :message :reader compile-error-message :documentation "The reason given for the error"))) (defparameter +vertex-shader-source+ " // Input our our time varia...
7e07dd2b4597925f4a212bd8c4ca9b0bad7533b5022886174558a13ea2ece385
phylogeography/spread
queries.cljs
(ns ui.router.queries (:refer-clojure :exclude [resolve]) (:require [bide.core :as bide])) (def db-key :ui.router) (defn active-page [db] (-> db db-key :active-page)) (defn active-page-name [db] (:name (active-page db))) (defn active-page-params [db] (:params (active-page db))) (defn active-page-query [d...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/router/queries.cljs
clojure
(ns ui.router.queries (:refer-clojure :exclude [resolve]) (:require [bide.core :as bide])) (def db-key :ui.router) (defn active-page [db] (-> db db-key :active-page)) (defn active-page-name [db] (:name (active-page db))) (defn active-page-params [db] (:params (active-page db))) (defn active-page-query [d...
9bbdb4b9eeea25259d12764949f52bf52987ec744cff72e73074c0145ebcff66
jaredly/reason-language-server
pprintast.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/pprintast.ml
ocaml
************************************************************************ OCaml Fabrice L...
, OCamlPro , University of Pennsylvania Copyright 2007 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Original Code from Ber - metaocaml , modified...
0cec0ff6f6992699467fd4d4de0a310ad4f3aafb9b7f63788f0347135cac641e
mojombo/yaws
wiki_diff.erl
-module(wiki_diff). %% File : diff.erl Author : ( ) Purpose : Diff of two files ( like Diff and patch ) . %% diff(New, Old) -> Patch %% patch(New, Patch) -> Old %% patchL(New, [Patch]) -> Old' %% -compile(export_all). -export([diff/2, diff_files/2, patch/2, patchL/2]). -export([test/0]). -import(lists,...
null
https://raw.githubusercontent.com/mojombo/yaws/f75fde80f1e35a87335f21d0983e3285eb665f17/applications/wiki/src/wiki_diff.erl
erlang
File : diff.erl diff(New, Old) -> Patch patch(New, Patch) -> Old patchL(New, [Patch]) -> Old' -compile(export_all).
-module(wiki_diff). Author : ( ) Purpose : Diff of two files ( like Diff and patch ) . -export([diff/2, diff_files/2, patch/2, patchL/2]). -export([test/0]). -import(lists, [foldl/3, reverse/1]). test() -> diff_files("diff.erl", "diff.erl.old"). diff_files(F1, F2) -> {ok, B1} = file:read_file(F1...
ad7b3f42c31493d160493a4916099476e5e37766eb6d03d41e0558eb1423b87a
bakul/s9fes
cols.scm
#! /usr/local/bin/s9 cols -- format input in two columns by , 2010 ; Placed in the Public Domain ; ; Usage: cols [-l] [-s separator] [file ...] (load-from-library "parse-optionsb.scm") (load-from-library "displaystar.scm") (load-from-library "read-file.scm") (load-from-library "split.scm") (load-from-library "...
null
https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/prog/cols.scm
scheme
Placed in the Public Domain Usage: cols [-l] [-s separator] [file ...]
#! /usr/local/bin/s9 cols -- format input in two columns by , 2010 (load-from-library "parse-optionsb.scm") (load-from-library "displaystar.scm") (load-from-library "read-file.scm") (load-from-library "split.scm") (load-from-library "appendb.scm") (define pad-left (option #\l #f)) (define separator (option #...
eb2ce06665c2e8495a2b9bd299415f51d74c6adca7262811af54d85bfd3584b2
Carnap/Carnap
Lande.hs
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Carnap.Languages.PureFirstOrder.Logic.Lande where import Data.Map as M (lookup, Map) import Text.Parsec import Control.Lens (view, (^?)) import Carnap.Core.Data.Types import Carnap.Core.Data.Classes import Carnap.Core.Unification.Uni...
null
https://raw.githubusercontent.com/Carnap/Carnap/ac2a4a509594367561bf577289c9ec5a66b1f4f3/Carnap/src/Carnap/Languages/PureFirstOrder/Logic/Lande.hs
haskell
do we also want reverse? TODO: drop outer parens, redraw quantificational phrases
# LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses # module Carnap.Languages.PureFirstOrder.Logic.Lande where import Data.Map as M (lookup, Map) import Text.Parsec import Control.Lens (view, (^?)) import Carnap.Core.Data.Types import Carnap.Core.Data.Classes import Carnap.Core.Unification.Uni...
2374cfcbaa8781c2311d6dcc9d89df2f44bb27c41a32e45d5b2a4b67411d659b
huangjs/cl
dqmomo.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/dqmomo.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
b9902543a4ad258b2a3e07bda063bba5a5015a918bff334349f4553f914319d1
arohner/spectrum
java.clj
(ns spectrum.java (:refer-clojure :exclude [get-method]) (:require [clojure.spec.alpha :as s] [clojure.set :as set] [clojure.reflect :as reflect] [clojure.string :as str] [spectrum.util :refer (predicate-spec instrument-ns)])) (def symbol->primitive- {'boolean Boolea...
null
https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/src/spectrum/java.clj
clojure
DR , uses several rules to determine which arity method gets picked , in order
(ns spectrum.java (:refer-clojure :exclude [get-method]) (:require [clojure.spec.alpha :as s] [clojure.set :as set] [clojure.reflect :as reflect] [clojure.string :as str] [spectrum.util :refer (predicate-spec instrument-ns)])) (def symbol->primitive- {'boolean Boolea...
f21fa9c33e22ad697c16df2b8b2fb97da821a7ebfe6e3cc7d551815f82704e9c
genmeblog/genuary
day19.clj
;; Use text/typography. (ns genuary.2022.day19 (:require [clojure2d.core :as c2d] [fastmath.core :as m] [clojure2d.extra.utils :as utils] [fastmath.vector :as v] [clojure2d.pixels :as p] [clojure2d.color :as c] [fastmath.random :as r] ...
null
https://raw.githubusercontent.com/genmeblog/genuary/12cfd162b8792aa48a2e3fb7642fdaf81f1a0884/src/genuary/2022/day19.clj
clojure
Use text/typography. (c2d/save c "results/2022/day19.jpg") (c2d/save c "results/2022/day19_b.jpg")
(ns genuary.2022.day19 (:require [clojure2d.core :as c2d] [fastmath.core :as m] [clojure2d.extra.utils :as utils] [fastmath.vector :as v] [clojure2d.pixels :as p] [clojure2d.color :as c] [fastmath.random :as r] [clojure2d.extra.overla...
a5c9a538f2fda6cce4de1b8e0ab1be4bf5853f0b667b91156ea6de1254978e14
ih/ikarus.dev
num-iters.scm
(define boyer-iters 10) (define browse-iters 1000) (define conform-iters 20) (define cpstak-iters 1000) (define ctak-iters 100) (define dderiv-iters 800000) (define deriv-iters 800000) (define destruc-iters 300) (define diviter-iters 1000000) (define divrec-iters 1000000) (define ea...
null
https://raw.githubusercontent.com/ih/ikarus.dev/8bb0c8e4d1122cf0f9aeb675cb51bc7df178959b/benchmarks.larceny/src/num-iters.scm
scheme
non - portable use of quasiquote non - portable use of quasiquote problem size, not iterations problem size, not iterations nondeterministic ( order of evaluation ) (define quicksort-iters 10) ; uses bignums in rand, must fix
(define boyer-iters 10) (define browse-iters 1000) (define conform-iters 20) (define cpstak-iters 1000) (define ctak-iters 100) (define dderiv-iters 800000) (define deriv-iters 800000) (define destruc-iters 300) (define diviter-iters 1000000) (define divrec-iters 1000000) (define ea...
de276c5f21297e4ee76d6e2f7dcb2fdfaecdc2f134c9f0dcc8ef1f1def64459f
braintripping/lark
cm.cljs
(ns lark.cards.cm (:require ["codemirror" :as CM] ["codemirror/mode/clojure/clojure"] ["codemirror/mode/markdown/markdown"] [chia.view :as v] [chia.view.hooks :as hooks] [applied-science.js-interop :as j] [chia.util :as u] [lark.card...
null
https://raw.githubusercontent.com/braintripping/lark/95038a823068681c39453c46a309a3514cf48800/tools/test/lark/cards/cm.cljs
clojure
(ns lark.cards.cm (:require ["codemirror" :as CM] ["codemirror/mode/clojure/clojure"] ["codemirror/mode/markdown/markdown"] [chia.view :as v] [chia.view.hooks :as hooks] [applied-science.js-interop :as j] [chia.util :as u] [lark.card...
c1163966f83a9f66334d2f5d0c19e96c7d42bbc4309ded08faa96837aab48df6
alaricsp/chicken-scheme
tak.scm
;;;; tak.scm (define (tak x y z) (if (not (< y x)) z (tak (tak (- x 1) y z) (tak (- y 1) z x) (tak (- z 1) x y) ) ) ) (time (do ((i 100 (- i 1))) ((zero? i)) (tak 18 12 6)))
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/benchmarks/tak.scm
scheme
tak.scm
(define (tak x y z) (if (not (< y x)) z (tak (tak (- x 1) y z) (tak (- y 1) z x) (tak (- z 1) x y) ) ) ) (time (do ((i 100 (- i 1))) ((zero? i)) (tak 18 12 6)))
1b7ca9fec702bc5c07d47ca3dfa1328e12565023e0b7dd28ace333b8ef35d04d
travelping/hello
hello_client.erl
Copyright 2010 - 2012 , Travelping GmbH < > % Permission is hereby granted, free of charge, to any person obtaining a % copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation % the rights to use, copy, modify, merge, pu...
null
https://raw.githubusercontent.com/travelping/hello/b2697428efe777e8be657d31ca22d80378041d7c/src/hello_client.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, publish, distribute, sublicense, Software is furnished to do so, subject to the following conditions: The above copyright notice...
Copyright 2010 - 2012 , Travelping GmbH < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI...
910cf9cc3539cd54b411e3cda7f51ea497280206637b363528dd0b8fcc3e84a7
antono/guix-debian
libftdi.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > ;;; ;;; 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 Public License as published by the Free Software Foundation ; either version 3 of the Lic...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/libftdi.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 © 2014 < > 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 packages libftdi) #:use-module (guix licenses) #:use-module (guix download) #:use-modul...
d7fc8d7b1478997d58b920b2c42e45f77598398b4b189c7b20225ce5381632c3
ml-in-barcelona/server-reason-react
react.ml
type domRef module Ref = struct type t = domRef type currentDomRef = Webapi.Dom.element Js.nullable ref type callbackDomRef external domRef : currentDomRef -> domRef = "%identity" external callbackDomRef : callbackDomRef -> domRef = "%identity" end let createRef () = ref None let useRef value = ref value l...
null
https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/react/react.ml
ocaml
Self referencing modules to have recursive type records without collission | Drag of Event.Drag.t -dom-bindings/src/shared/omittedCloseTags.js The following constructors shoudn't be part of the Map: TODO: Add test for this Q: should raise or return monad? cloneElements overrides childrens ReasonReact API...
type domRef module Ref = struct type t = domRef type currentDomRef = Webapi.Dom.element Js.nullable ref type callbackDomRef external domRef : currentDomRef -> domRef = "%identity" external callbackDomRef : callbackDomRef -> domRef = "%identity" end let createRef () = ref None let useRef value = ref value l...
194250f5aeea81b01f7a768f03b6daf3a7f98bb29a6e1aefe366f31f12f8ca06
herd/herdtools7
parseTag.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/parseTag.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2013 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
bfdcc34248c9c907ca8752e82ba63be61ba0acce847f2af9dfbbce6ad505ac9d
igrishaev/dynamodb
params.clj
(ns dynamodb.params (:require [dynamodb.encode :refer [encode encode-attrs]] [dynamodb.sql :as sql])) (defn- key-alias [] (str "#" (gensym "attr"))) (defn- val-alias [] (str ":" (gensym "value"))) (defn- -remap-key-schema [key-schema] (for [[attr-name key-type] key-schema] {:AttributeName attr-n...
null
https://raw.githubusercontent.com/igrishaev/dynamodb/899e5796b93f1c6cebaae4ef7887a76e306a9e81/src/dynamodb/params.clj
clojure
Params
(ns dynamodb.params (:require [dynamodb.encode :refer [encode encode-attrs]] [dynamodb.sql :as sql])) (defn- key-alias [] (str "#" (gensym "attr"))) (defn- val-alias [] (str ":" (gensym "value"))) (defn- -remap-key-schema [key-schema] (for [[attr-name key-type] key-schema] {:AttributeName attr-n...
9442baceb3c930995c32ce52c1e905909d162c58c87065212f6d5354fd404186
darkleaf/publicator
responses.clj
(ns publicator.web.responses (:require [publicator.web.template :as template] [publicator.web.form-renderer :as form-renderer] [publicator.web.transit :as transit] [ring.util.http-response :as http-response])) (defn render-page ([template] (render-page template {})) ([template model] (-> (template...
null
https://raw.githubusercontent.com/darkleaf/publicator/e07eee93d8f3d9c07a15d574619d5ea59c00f87d/web/src/publicator/web/responses.clj
clojure
(ns publicator.web.responses (:require [publicator.web.template :as template] [publicator.web.form-renderer :as form-renderer] [publicator.web.transit :as transit] [ring.util.http-response :as http-response])) (defn render-page ([template] (render-page template {})) ([template model] (-> (template...
60c5022e996d99ffa5b3c1d8332870fbddd5e83a90a7f98425296fc79dbb5596
ashton314/lambda-x86
compiler.rkt
#lang racket (require "ast.rkt") (require "type_checker.rkt") (require "x86_asm.rkt") (module+ test (require rackunit)) ;; Constants (define asm-file "compiler-output.s") (define-syntax-rule (c expr) Macro to make this easier (compile (quote expr))) (define (compile expr) Parse , and then compile the result...
null
https://raw.githubusercontent.com/ashton314/lambda-x86/fd5ff01cb09be10eddd6f3f3d0a5fa6ba5274e80/compiler.rkt
racket
Constants either compiled inline or compiled separately by the respective routines Constants Primitives Let bindings Variable references Conditionals Labels Closures Function calls Compile our primitive operations: unary operators like `add1' and tag our return value as pointing to a pair Funny order beca...
#lang racket (require "ast.rkt") (require "type_checker.rkt") (require "x86_asm.rkt") (module+ test (require rackunit)) (define asm-file "compiler-output.s") (define-syntax-rule (c expr) Macro to make this easier (compile (quote expr))) (define (compile expr) Parse , and then compile the resulting expressio...
9705aa47eb3967691415f77e891005c199456714cb7ff52f2e6d0aac26a0da5d
braidchat/braid
hooks.cljc
(ns braid.core.hooks "Provides a way to register atoms that can later all be reset to their initial values. This enables changes to Braid modules to be picked up in a reloaded workflow (ie. figwheel). On the client-side: Figwheel is configured to call (braid.core.client.desktop.core/reload!), which calls (b...
null
https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/core/hooks.cljc
clojure
Atoms is a map of atoms to their initial values use assert, to elide the code in prod assert returns nil but validator expects true
(ns braid.core.hooks "Provides a way to register atoms that can later all be reset to their initial values. This enables changes to Braid modules to be picked up in a reloaded workflow (ie. figwheel). On the client-side: Figwheel is configured to call (braid.core.client.desktop.core/reload!), which calls (b...
3a2a4567bdcd86a5a866d9e767629711dc200f98a16db8df0e4ab41a5f05b095
odis-labs/helix
Helix.ml
type 'a signal = 'a Signal.t type html = Html.html type attr = Html.attr type js = Helix_js.js module Js = Helix_js module Html = Html module Signal = Signal module View = View module Time = Time module Mouse = Mouse let render = Html.render
null
https://raw.githubusercontent.com/odis-labs/helix/7019765fdd6336f93d9243cf8310b8e805afabfb/src/helix/Helix.ml
ocaml
type 'a signal = 'a Signal.t type html = Html.html type attr = Html.attr type js = Helix_js.js module Js = Helix_js module Html = Html module Signal = Signal module View = View module Time = Time module Mouse = Mouse let render = Html.render
593e720f8c5791a01992d6d07bb40ab207d5b27dfc140222b10886778436bd78
skogsbaer/hscurses
TextTest.hs
import qualified UI.HSCurses.Curses as Curses import qualified UI.HSCurses.CursesHelper as CursesH import UI.HSCurses.Widgets import Control.Exception import System.Exit twOptions sty = defaultTWOptions { twopt_style = mkDrawingStyle sty } text sty = newTextWidget (twOptions sty) (reverse "1\n12\n123\n1234\n12345\n1...
null
https://raw.githubusercontent.com/skogsbaer/hscurses/58a3b41504c66f83b808ec829a2727d6a115f4c4/tests/widget-test/TextTest.hs
haskell
import qualified UI.HSCurses.Curses as Curses import qualified UI.HSCurses.CursesHelper as CursesH import UI.HSCurses.Widgets import Control.Exception import System.Exit twOptions sty = defaultTWOptions { twopt_style = mkDrawingStyle sty } text sty = newTextWidget (twOptions sty) (reverse "1\n12\n123\n1234\n12345\n1...
2ad7f4e1024182a4b2c8e95370a2edaa87f6bd120c763d468742b73590d43c61
inhabitedtype/ocaml-session
session_cohttp_lwt.ml
open Session_cohttp module Make(B:Backend with type +'a io = 'a Lwt.t) = Make(Lwt)(B)
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-session/6180413996e8c95bd78a9afa1431349a42c95588/cohttp/lwt/session_cohttp_lwt.ml
ocaml
open Session_cohttp module Make(B:Backend with type +'a io = 'a Lwt.t) = Make(Lwt)(B)
0de0460f4285129bdabf6f60428bcba5cadf6e23482a6082b8ed8cbe7149b4bb
ucsd-progsys/nate
protocol.ml
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of Objective Caml (* *) , , and ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/support/protocol.ml
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of Objective Caml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
6afc8d88ab94bfc1c7cc3e3f4498f3d88d7765930033af3cb2af0fca7ee10748
finnishtransportagency/harja
lampotilat_test.clj
(ns harja.palvelin.palvelut.lampotilat-test (:require [clojure.test :refer :all] [taoensso.timbre :as log] [harja.palvelin.komponentit.tietokanta :as tietokanta] [harja.palvelin.palvelut.lampotilat :refer :all] [harja.testi :refer :all] [com.stuartsierra.com...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/488b1e096f0611e175221d74ba4f2ffed6bea8f1/test/clj/harja/palvelin/palvelut/lampotilat_test.clj
clojure
(ns harja.palvelin.palvelut.lampotilat-test (:require [clojure.test :refer :all] [taoensso.timbre :as log] [harja.palvelin.komponentit.tietokanta :as tietokanta] [harja.palvelin.palvelut.lampotilat :refer :all] [harja.testi :refer :all] [com.stuartsierra.com...
0a5362a39b0fb47a3ccf38fe13a3d81bdb2f2c860d674b6af57f8b6f2129f235
ygmpkk/house
OSDocumentInterface.hs
{-# OPTIONS -#include "OSWindows\Windows_C_12\cCrossCallxDI_121.h" #-} module OSDocumentInterface ( OSDInfo(..), OSInfo(..), OSMenuBar(..) , emptyOSDInfo , getOSDInfoDocumentInterface , getOSDInfoOSMenuBar, setOSDInfoOSMenuBar ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/hslibs/object-io/OSWindows/OSDocumentInterface.hs
haskell
# OPTIONS -#include "OSWindows\Windows_C_12\cCrossCallxDI_121.h" # ******************************************************************************** OSDocumentInterface creates the infrastructure for (N/S/M)DI frame windows. ******************************************************************************** The gener...
module OSDocumentInterface ( OSDInfo(..), OSInfo(..), OSMenuBar(..) , emptyOSDInfo , getOSDInfoDocumentInterface , getOSDInfoOSMenuBar, setOSDInfoOSMenuBar , getOSDInfoOSInfo, setOSDInfoOSInfo ...
19637afd05bca2680116852f7485929f8ec003273ea5a61ae181776d069497bb
nuvla/api-server
nuvlabox_1_test.cljc
(ns sixsq.nuvla.server.resources.spec.nuvlabox-1-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.nuvlabox :as nb] [sixsq.nuvla.server.resources.spec.nuvlabox-1 :as nb-1] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def val...
null
https://raw.githubusercontent.com/nuvla/api-server/e3e7bc39e51ef9cf2343039d6844ae5c55e64b74/code/test/sixsq/nuvla/server/resources/spec/nuvlabox_1_test.cljc
clojure
required optional
(ns sixsq.nuvla.server.resources.spec.nuvlabox-1-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.nuvlabox :as nb] [sixsq.nuvla.server.resources.spec.nuvlabox-1 :as nb-1] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def val...
e7c01e8aeb38cf6857faf3abbb0883706b6dd82acac532175a635d92130252c3
NorfairKing/habitscipline
Sync.hs
# LANGUAGE RecordWildCards # module Habitscipline.CLI.Commands.Sync where import Data.Maybe import Data.Mergeful as Mergeful hiding (SyncRequest, SyncResponse) import Data.Mergeful.Persistent import Database.Persist import Habitscipline.CLI.Commands.Import import Habitscipline.Data sync :: C () sync = withClient $ \...
null
https://raw.githubusercontent.com/NorfairKing/habitscipline/b4baaefef7376868eeb8f374cadfd83d1ddc0972/habitscipline-cli/src/Habitscipline/CLI/Commands/Sync.hs
haskell
# LANGUAGE RecordWildCards # module Habitscipline.CLI.Commands.Sync where import Data.Maybe import Data.Mergeful as Mergeful hiding (SyncRequest, SyncResponse) import Data.Mergeful.Persistent import Database.Persist import Habitscipline.CLI.Commands.Import import Habitscipline.Data sync :: C () sync = withClient $ \...
648cd3cb453e1e73a0c0a9faa14e425d01ac8fde1cc76ba2bfaee40f5dd23bbf
ocsigen/ojwidgets
ojw_event_tools.mli
(** Various tools related to events. *) * { 3 Position and Coordination } type position_type = Client | Screen | Page type touch_type = All_touches | Target_touches | Changed_touches * Take two coordinates and return true if they are equal val cmp_coord : (int * int) -> (int * int) -> bool TODOC this is an equali...
null
https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/ojw_event_tools.mli
ocaml
* Various tools related to events. * {5 Mouse} * @param p_type [Client] by default. TODOC Not sure if correct, but already better than the original description. * {5 Touch} * @param p_type [Client] by default. * Similar to [get_touch_ev_coord]. Calculate the position of the touch inside a given element. ...
* { 3 Position and Coordination } type position_type = Client | Screen | Page type touch_type = All_touches | Target_touches | Changed_touches * Take two coordinates and return true if they are equal val cmp_coord : (int * int) -> (int * int) -> bool TODOC this is an equality function , not a compare ( " cmp " ) ...
7c33c6d9d3760866d4e135c9275f8fd81c7742660c0e3cf5cba43d99468d01f6
emqx/emqx
emqx_release.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 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/emqx/999d40ef1d5efa173ce59599f35f3d0a6448ebe6/apps/emqx/src/emqx_release.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 - 2023 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(emqx_release). -export([ edition/0, edition_vsn_prefix/0, edition_longstr/0...
6c82e57a9181248e5a642370ecd063c9ef4d3bb1eff4ac42df2d2e7fac6d2a1c
goblint/analyzer
threadJoins.ml
(** Thread join analysis. *) open Prelude.Ana open Analyses module TID = ThreadIdDomain.Thread module TIDs = ConcDomain.ThreadSet module MustTIDs = ConcDomain.MustThreadSet module Spec = struct include Analyses.IdentitySpec let name () = "threadJoins" module D = MustTIDs module C = D module G = MustTIDs ...
null
https://raw.githubusercontent.com/goblint/analyzer/3fc209f2b3bdcc44c40e3c30053a2fa64368ff2e/src/analyses/threadJoins.ml
ocaml
* Thread join analysis. transfer functions correct? correct? elements throws if the thread set is top if multiple possible thread ids are joined, none of them is must joined consider everything joined, D is reversed so bot is All threads elements throws if the thread set is top bot is All threads top i...
open Prelude.Ana open Analyses module TID = ThreadIdDomain.Thread module TIDs = ConcDomain.ThreadSet module MustTIDs = ConcDomain.MustThreadSet module Spec = struct include Analyses.IdentitySpec let name () = "threadJoins" module D = MustTIDs module C = D module G = MustTIDs module V = struct incl...
efcfc7b60f8fdf26ff19c029564e743d1c8a4d30fcf7ad0a9b7a1467474ce6f0
emanjavacas/cosycat
filter_button.cljs
(ns cosycat.query.components.filter-button (:require [re-frame.core :as re-frame] [reagent.core :as reagent] [react-bootstrap.components :as bs] [cosycat.components :refer [dropdown-select]] [cosycat.utils :refer [->default-map]] [cosycat.app-utils :refer [d...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/query/components/filter_button.cljs
clojure
(ns cosycat.query.components.filter-button (:require [re-frame.core :as re-frame] [reagent.core :as reagent] [react-bootstrap.components :as bs] [cosycat.components :refer [dropdown-select]] [cosycat.utils :refer [->default-map]] [cosycat.app-utils :refer [d...
43eee724404949cf871dc2ab5fe15196178f147a4616d53376c1a520f755ffd1
kudu-dynamics/blaze
FsqrtOp.hs
HLINT ignore " Use newtype instead of data " module Blaze.Types.Pil.Op.FsqrtOp where -- This module is generated. Please use app/gen_pil_ops/Main.hs to modify. import Blaze.Prelude data FsqrtOp expr = FsqrtOp { src :: expr } deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON) i...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Types/Pil/Op/FsqrtOp.hs
haskell
This module is generated. Please use app/gen_pil_ops/Main.hs to modify.
HLINT ignore " Use newtype instead of data " module Blaze.Types.Pil.Op.FsqrtOp where import Blaze.Prelude data FsqrtOp expr = FsqrtOp { src :: expr } deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON) instance Hashable a => Hashable (FsqrtOp a)
a1a933d91bde6d920f1ef7f5386e06b815edc8c3b2fc70e2d51765dcae286605
39aldo39/klfc
Usage.hs
#!/usr/bin/env runhaskell # LANGUAGE UnicodeSyntax # import Prelude.Unicode import Data.Bool (bool) import Data.Monoid.Unicode ((⊕)) import Data.Char (isSpace) import Data.List (dropWhileEnd) import Control.Applicative (liftA2) modifyLines ∷ Bool → [String] → [String] modifyLines False [] = [] modifyLines True [] = [...
null
https://raw.githubusercontent.com/39aldo39/klfc/83908c54c955b9c160b999bc8f0892401ba4adbf/scripts/Usage.hs
haskell
#!/usr/bin/env runhaskell # LANGUAGE UnicodeSyntax # import Prelude.Unicode import Data.Bool (bool) import Data.Monoid.Unicode ((⊕)) import Data.Char (isSpace) import Data.List (dropWhileEnd) import Control.Applicative (liftA2) modifyLines ∷ Bool → [String] → [String] modifyLines False [] = [] modifyLines True [] = [...
7f7cb6ff9847e0df5ebd7a09df517af1d1c3efa94aff5e1dc61eddb21d75d57c
chrisdone/ircbrowse
Nicks.hs
-- | Statistics for nicks in aggregate. module Ircbrowse.Model.Nicks where import Ircbrowse.Types import Ircbrowse.Types.Import import Snap.App import Data.Text (Text) getNicks :: Channel -> Int -> Bool -> Range -> Model c s [(Text,Int)] getNicks channel n recent (Range from to) = do query ["SELECT nick,COUNT(*)"...
null
https://raw.githubusercontent.com/chrisdone/ircbrowse/d956aaf185500792224b6b0c209eb67c179322a4/src/Ircbrowse/Model/Nicks.hs
haskell
| Statistics for nicks in aggregate.
module Ircbrowse.Model.Nicks where import Ircbrowse.Types import Ircbrowse.Types.Import import Snap.App import Data.Text (Text) getNicks :: Channel -> Int -> Bool -> Range -> Model c s [(Text,Int)] getNicks channel n recent (Range from to) = do query ["SELECT nick,COUNT(*)" ,"FROM event" ,"WHERE c...
2a91b70d75ed6db6ff79836a877a264a329a3ffd99427f07ea2f948c53195d9f
zellige/zellige
PolygonSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Data.Geometry.PolygonSpec where import Test.Hspec (Spec, describe, it, shouldBe) import qualified Data.Geometry.Clip.Internal.Polygon as InternalPolygon import qualified Data.SpecHelper...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/test/Data/Geometry/PolygonSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Data.Geometry.PolygonSpec where import Test.Hspec (Spec, describe, it, shouldBe) import qualified Data.Geometry.Clip.Internal.Polygon as InternalPolygon import qualified Data.SpecHelper as SpecHelper ...
d5a22a2509eaedcbdc94329988c17c3732ae1a652adaa20578b3fe3f98ac4df9
monadbobo/ocaml-core
hash_queue_test.ml
open OUnit;; open Core.Std let test = "hash_queue" >::: [ "basic" >:: (fun () -> let module Hq_arg = struct include String let hash (x : t) = Hashtbl.hash x let equal (x : t) (y : t) = x = y let sexp_of_t = Sexplib.Conv.sexp_of_string let t_of_sexp ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib_test/hash_queue_test.ml
ocaml
tests over empty queue remove the last double remove remove everything double booking
open OUnit;; open Core.Std let test = "hash_queue" >::: [ "basic" >:: (fun () -> let module Hq_arg = struct include String let hash (x : t) = Hashtbl.hash x let equal (x : t) (y : t) = x = y let sexp_of_t = Sexplib.Conv.sexp_of_string let t_of_sexp ...
62c9ccc5c26a37f2ebcc7c2b5ac6d71ae200f03297a903bf714b2847358ce1bc
simonmar/haskell-eXchange-2015
Types.hs
Copyright ( c ) 2014 , Facebook , Inc. -- All rights reserved. -- This source code is distributed under the terms of a BSD license , -- found in the LICENSE file. An additional grant of patent rights can be found in the PATENTS file . # LANGUAGE CPP # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE ExistentialQuanti...
null
https://raw.githubusercontent.com/simonmar/haskell-eXchange-2015/3ae0e34a051201eb77721bee2e940ec1f764a0df/build/haxl2/Haxl/Core/Types.hs
haskell
All rights reserved. found in the LICENSE file. An additional grant of patent rights can # LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # | Base types used by all of Haxl. * Initialization strategies * Tracing flags * Statistics * Data fetching * Result var...
Copyright ( c ) 2014 , Facebook , Inc. This source code is distributed under the terms of a BSD license , be found in the PATENTS file . # LANGUAGE CPP # # LANGUAGE ExistentialQuantification # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE T...
5aab8fbc4ccee3fb2967ebd4a9c87e680cbe615f741b26f9031a8f7fbd70a8e7
Chream/mockingbird
functions.lisp
;;;; mockingbird/t/mockingbird.lisp (in-package :cl-user) (uiop:define-package :mockingbird/t/functions (:use :closer-common-lisp :prove :mockingbird) (:documentation "") (:export :run-tests)) (in-package :mockingbird/t/functions) ;; NOTE: To run this test file, execute `(asdf:test-sy...
null
https://raw.githubusercontent.com/Chream/mockingbird/bf56e15faf8684fb96bd8094bd76c2d1b966c0ae/t/functions.lisp
lisp
mockingbird/t/mockingbird.lisp NOTE: To run this test file, execute `(asdf:test-system :mockingbird)' in your Lisp. Parameters/Constants/Functions ;;; Test functions. ;;;
(in-package :cl-user) (uiop:define-package :mockingbird/t/functions (:use :closer-common-lisp :prove :mockingbird) (:documentation "") (:export :run-tests)) (in-package :mockingbird/t/functions) ( setf prove:*enable - colors * t ) ( setf * default - reporter * : list ) ( setf ...
2bfa6ece5f9d71a3bd4e74ce7636d0f1c6b931a1cfd540de4979b89577b5c43e
albertoruiz/easyVision
ShowReco.hs
module Util.ShowReco where import Vision -- hiding (degree,rot1,rot2,rot3,infoSProb) import Vision . Multiview import Vision . -- import Text.Printf import Data . List import Data . Function(on ) -- import Util.Misc import Numeric.LinearAlgebra -- import qualified Data.Array as A -- import EasyVision hiding ( n...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/vision/multiview/Util/ShowReco.hs
haskell
hiding (degree,rot1,rot2,rot3,infoSProb) import Text.Printf import Util.Misc import qualified Data.Array as A import Data.Colour.Names as Col runIt f = prepare >> f >> mainLoop mat2img' = fromListsF . toLists ------------------------------------------------------------ ok, but we must align the reconstructions a...
module Util.ShowReco where import Vision . Multiview import Vision . import Data . List import Data . Function(on ) import Numeric.LinearAlgebra import EasyVision hiding ( numCams,(|+| ) , median ) import Graphics.UI.GLUT hiding (color,Size,scale,triangulate,Matrix,clearColor) import Vision.GUI import Data...
1a4a8d664e34316c02683d7ae560acaf3eb882ff0cf8cba400f6cfc19a2719c8
ndantam/sycamore
example.lisp
;;;; -*- Lisp -*- ;;;; Copyright ( c ) 2015 , Rice University ;;;; All rights reserved. ;;;; ;;;; Redistribution and use in source and binary forms, with or ;;;; without modification, are permitted provided that the following ;;;; conditions are met: ;;;; ;;;; * Redistributions of source code must retain the ...
null
https://raw.githubusercontent.com/ndantam/sycamore/78d1e21c815f198225cbd7d2b3576eab412aaa83/example.lisp
lisp
-*- Lisp -*- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following d...
Copyright ( c ) 2015 , Rice University CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT (sycamore...
5ff09f1112ef70332a2c0cff2d4908e71c8341f2e80ffb5c223c810f7638181e
quchen/prettyprinter
Doc.hs
module Data.Text.Prettyprint.Doc {-# DEPRECATED "Use \"Prettyprinter\" instead." #-} ( module Prettyprinter ) where import Prettyprinter
null
https://raw.githubusercontent.com/quchen/prettyprinter/880f41eac31edfac71d2d66d338e6cfdae4f3715/prettyprinter/src/Data/Text/Prettyprint/Doc.hs
haskell
# DEPRECATED "Use \"Prettyprinter\" instead." #
module Prettyprinter ) where import Prettyprinter
7981207636cc94a33a82b4bf86356532421df2a10cd143addda927f700cc05e8
ferzcam/tropical-geometry
TPolytope.hs
module TGeometry.TPolytope where import Test.Tasty import Data.List import Test.Tasty.HUnit as HU import Data.Maybe import Geometry.Polytope import Geometry.ConvexHull3 newF1, newF2 :: [(Int, Int, Int)] newF1 = [(2,0,3), (1,1,0), (0,2,3), (1,0,1),(0,1,1), (0,0,0)] newF2 = [(3,0,3), (2,1,1), (1,2,1), (0,3,3), (2,0,...
null
https://raw.githubusercontent.com/ferzcam/tropical-geometry/de366949f28530ac1008c7423122d37488b3b049/test-suite/TGeometry/TPolytope.hs
haskell
sort (projectionToR2 $ fromJust $ convexHull3 newF4) @?= sort subdivisionF4 sort (projectionToR2 $ fromJust $ convexHull3 newF5) @?= sort subdivisionF5
module TGeometry.TPolytope where import Test.Tasty import Data.List import Test.Tasty.HUnit as HU import Data.Maybe import Geometry.Polytope import Geometry.ConvexHull3 newF1, newF2 :: [(Int, Int, Int)] newF1 = [(2,0,3), (1,1,0), (0,2,3), (1,0,1),(0,1,1), (0,0,0)] newF2 = [(3,0,3), (2,1,1), (1,2,1), (0,3,3), (2,0,...
77c8e2bedb1439ec20acc6f55eee7da5dba893ca82c7379fadb4350f6cfc21fd
fpottier/stores
HStoreTransactionalRef.ml
(***************************************************************************) (* *) (* UnionFind *) (* *) ...
null
https://raw.githubusercontent.com/fpottier/stores/0752321be1ba6c355a7008ebb210bbd91a77e001/src/HStoreTransactionalRef.ml
ocaml
************************************************************************* UnionFind ...
, Paris . All rights reserved . This file is distributed under the terms of the GNU Library General Public License version 2 , with a A reference cell records both its current ( possibly uncommitted ) value and its last committed value . A cell is con...
7b3a542e3119525a5a6d41e0dcde10e487f442060c00d8ad82e79c488637aa19
rmloveland/scheme48-0.53
lize.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . Simplest rational within an interval . Copied from IEEE P1178 / D4 nimpl.tex . (define (rationalize x e) (let ((e (abs e))) (simplest-rational (- x e) (+ x e)))) (define (simplest-rational x y) (define (simplest-rational-internal x y) ;; ...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/rts/lize.scm
scheme
assumes 0 < X < Y Do some juggling to satisfy preconditions of simplest-rational-internal.
Copyright ( c ) 1993 - 1999 by and . See file COPYING . Simplest rational within an interval . Copied from IEEE P1178 / D4 nimpl.tex . (define (rationalize x e) (let ((e (abs e))) (simplest-rational (- x e) (+ x e)))) (define (simplest-rational x y) (define (simplest-rational-internal x y) (le...
400e6ee88ed60ccb5614b2e964ea39f5829860142487789cb1e67edb7bc9b786
samrocketman/home
aurora-logo.scm
; aurora logo ; ; -------------------------------------------------------------------- version 1.0 by 2003/02/17 version 2.0 by 2004/08/20 ; -------------------------------------------------------------------- ; (define (script-fu-aurora-logo inText inFont inFontSize inWhirl inWind1 inWind2 inBGColor inColor...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/aurora-logo.scm
scheme
aurora logo -------------------------------------------------------------------- -------------------------------------------------------------------- (gimp-display-new img) (gimp-image-clean-all img)
version 1.0 by 2003/02/17 version 2.0 by 2004/08/20 (define (script-fu-aurora-logo inText inFont inFontSize inWhirl inWind1 inWind2 inBGColor inColor inAbsolute inImageWidth inImageHeight inFlatten) (let* ( Definition unserer Erzeugen des neuen Bildes (img ( car (gimp-image-new 10 10 RGB) ...
2dcef50f803135f474a0afa4c03fb96183da97876c3bdf1eddc0bf1d4c8b9470
caisah/sicp-exercises-and-examples
ex.3.28.scm
;; Define an or-gate as a primitive function box. Your or-gate constructor should be similar ;; to and-gate. (define (or-gate a1 a2 output) (define (or-action-procedure) (let ((new-value (logical-or (get-signal a1) (get-signal a2)))) (after-delay or-gate-dalay (lambda () ...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.3.4-a_simulator_for_digital_circuits/ex.3.28.scm
scheme
Define an or-gate as a primitive function box. Your or-gate constructor should be similar to and-gate.
(define (or-gate a1 a2 output) (define (or-action-procedure) (let ((new-value (logical-or (get-signal a1) (get-signal a2)))) (after-delay or-gate-dalay (lambda () (set-signal! output new-value))))) (add-action! a1 or-action-procedure) (add-action! a2 o...
9699c4406ba18daadb28a0325412e44ff2e29a2d267e1cbd02f24ee522e71fc2
wdebeaum/step
de-energise.lisp
;;;; ;;;; w::de-energise ;;;; (define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL :words ( ((w::de w::punc-minus w::energise) (wordfeats (W::morph (:forms (-vb) :3s (W::de w::punc-minus w::energises) :past (W::de w::punc-minus w:...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/de-energise.lisp
lisp
w::de-energise change-device-state) change-device-state)
(define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP-TEMPL :words ( ((w::de w::punc-minus w::energise) (wordfeats (W::morph (:forms (-vb) :3s (W::de w::punc-minus w::energises) :past (W::de w::punc-minus w::energised) ...
8b69cf42bbc6bddb72e3e8ee008549010b2aed6cd1ec2f1fdca2a183c8580b7d
owickstrom/komposition
Benchmark.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} module Main where import Komposition.Prelude import qualified Codec.Picture as Juicy import Criterion.Main import qualified Data.ByteString as ByteString import qualified Data.Massiv.Array.IO ...
null
https://raw.githubusercontent.com/owickstrom/komposition/64893d50941b90f44d77fea0dc6d30c061464cf3/bench/Benchmark.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # module Main where import Komposition.Prelude import qualified Codec.Picture as Juicy import Criterion.Main import qualified Data.ByteString as ByteString import qualified Data.Massiv.Array.IO as Massiv import Ko...
4c3f7f310f67fe2f633b8a6fc9b4bd86a7b284b0f7f94dfa7ad6898bd46dd23c
michaelzenz/jecci
db.clj
(ns jecci.utils.multimaster.db (:require [jepsen.nemesis :as nemesis] [jecci.interface.resolver :as r])) ; Might be useful for multimaster system ; Will improve later (defn op "Shorthand for constructing a nemesis op" ([f] (op f nil)) ([f v] {:type :info, :f f, :value v}) ([f v & args] ...
null
https://raw.githubusercontent.com/michaelzenz/jecci/81ee068601c31a14fe642f93d30223c2a8ced04d/src/jecci/utils/multimaster/db.clj
clojure
Might be useful for multimaster system Will improve later Maybe later rand(n/2+1?)
(ns jecci.utils.multimaster.db (:require [jepsen.nemesis :as nemesis] [jecci.interface.resolver :as r])) (defn op "Shorthand for constructing a nemesis op" ([f] (op f nil)) ([f v] {:type :info, :f f, :value v}) ([f v & args] (apply assoc (op f v) args))) (defmacro partition-leaders-gen...
aead48fd29ee19b7e58e6a8cbafb5bb006bdcdf4ee39bf6542d927105eb32c01
DYCI2/om-dyci2
om6-preferences.lisp
;;;=================================================== ;;; OM - DYCI2 ;;; ;;;=================================================== ; ; This program is free software. For information on usage ; and redistribution, see the "LICENSE" file in this distribution. ; ; This program is distributed in the hope that it wil...
null
https://raw.githubusercontent.com/DYCI2/om-dyci2/a51e6c51ec60ffabb799c9ee08d2173c30509ac2/om-dyci2/sources/om6-preferences.lisp
lisp
=================================================== =================================================== This program is free software. For information on usage and redistribution, see the "LICENSE" file in this distribution. This program is distributed in the hope that it will be useful, but WITHOUT ANY...
OM - DYCI2 Authors : , , / STMS 2018 (in-package :om) (defvar *DYCI2-PATH* nil) (defmethod! reinit-dyci2 () (dyci2::init-dyci2-lib *DYCI2-PATH*)) (defmethod! set-dyci2-path ((path string)) :icon '(186) (set-dyci2-path (pathname path))) (defmethod! set-dyci2-path ((path pathname)) (setf *DYCI2-...
1e6600821eda92cc0a0215858f73e29c23c61c2225da5ca3a58248997a493159
aaltodsg/instans
epa.lisp
-*- Mode : Lisp ; Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*- ;;; Author : ( ) ;;; (in-package #:instans) (defun epa (rdf-source-file &key (report '(:select :construct :modify :all :rete-add :rete-remove :queue :rdf-operations :execute))) (let* ((epn (create-sequential-event-processing-network...
null
https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/src/examples/epa.lisp
lisp
Syntax : COMMON - LISP ; Base : 10 ; Package : INSTANS -*- epa3 epa4 epa5 epa6 (instans-add-agent-input-processor epa3 :name 'epa3) (instans-add-agent-input-processor epa4 :name 'epa4) (instans-add-agent-input-processor epa5 :name 'epa5) (instans-add-agent-input-processor epa6 :name 'epa6)
Author : ( ) (in-package #:instans) (defun epa (rdf-source-file &key (report '(:select :construct :modify :all :rete-add :rete-remove :queue :rdf-operations :execute))) (let* ((epn (create-sequential-event-processing-network)) (epa0 (create-agent epn :configuration (append (list :report report) ...
e1ff95a721934c23fe5e04d0bf7d16a898cbb19a0bb6be1f68c1054bfa03d307
murtaza52/almonds
api_data.clj
(ns almonds.api-data (:require [almonds.api :as api :refer :all] [almonds.utils :refer :all] [almonds.pprint-op :refer [pprint-op]] [slingshot.slingshot :refer [try+ throw+]] [almonds.state :as state] [clojure.pprint :refer [pprint]])) (defn print-results [...
null
https://raw.githubusercontent.com/murtaza52/almonds/f7c5879833316ce395788bcf304eedab8315f0e5/src/almonds/api_data.clj
clojure
(ns almonds.api-data (:require [almonds.api :as api :refer :all] [almonds.utils :refer :all] [almonds.pprint-op :refer [pprint-op]] [slingshot.slingshot :refer [try+ throw+]] [almonds.state :as state] [clojure.pprint :refer [pprint]])) (defn print-results [...
c44c87689230c97e18c2c9dcad917a9b2a7c00b1f073e3bbe3e02bed1e2d5a8b
viercc/kitchen-sink-hs
valid_parenthesis.hs
/ module Main where import Data.Foldable (toList) import Data.Semigroup import System.Environment (getArgs) data Symbol = Paren | Brace | Bracket deriving (Show, Eq) data Balance = Balance [Symbol] [Symbol] | Irreducible deriving (Show, Eq) openSym, closeSym :: Symbol -> Balance openSym s = Balance [] [s] clo...
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/d369498f20763b074495b655ff6f7e04de48f24c/scripts/valid_parenthesis.hs
haskell
/ module Main where import Data.Foldable (toList) import Data.Semigroup import System.Environment (getArgs) data Symbol = Paren | Brace | Bracket deriving (Show, Eq) data Balance = Balance [Symbol] [Symbol] | Irreducible deriving (Show, Eq) openSym, closeSym :: Symbol -> Balance openSym s = Balance [] [s] clo...
9c3395fb77008d115d9fd3227431eedc80c25e0e22979d55a62d4799f9ec4977
fukamachi/lack
lack.lisp
(in-package :cl-user) (ql:quickload '(:lack :clack)) (defpackage lack-benchmark.lack (:use :cl)) (in-package :lack-benchmark.lack) (clack:clackup (lack:builder (:static :path (lambda (path) (if (ppcre:scan "^(?:/images/|/css/|/js/|/robot\\.txt$|/favicon.ico$)" path) pat...
null
https://raw.githubusercontent.com/fukamachi/lack/1f155216aeea36291b325c519f041e469262a399/benchmark/lack.lisp
lisp
(in-package :cl-user) (ql:quickload '(:lack :clack)) (defpackage lack-benchmark.lack (:use :cl)) (in-package :lack-benchmark.lack) (clack:clackup (lack:builder (:static :path (lambda (path) (if (ppcre:scan "^(?:/images/|/css/|/js/|/robot\\.txt$|/favicon.ico$)" path) pat...
87625466a2179c3e474f3003b13c6d8783267da0ea36a5f3cee4c794dfdff378
yetibot/core
error.clj
(ns yetibot.core.commands.error (:require [taoensso.timbre :refer [info warn error]] [yetibot.core.hooks :refer [cmd-hook]])) (defn error-cmd "error <message> # Generates an error that short-circuits an expression pipeline" {:yb/cat #{:util}} [{:keys [args] :as cmd-args}] {:result/error args}) (cmd-...
null
https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/commands/error.clj
clojure
(ns yetibot.core.commands.error (:require [taoensso.timbre :refer [info warn error]] [yetibot.core.hooks :refer [cmd-hook]])) (defn error-cmd "error <message> # Generates an error that short-circuits an expression pipeline" {:yb/cat #{:util}} [{:keys [args] :as cmd-args}] {:result/error args}) (cmd-...
12ecacd95a51b1487f15dba972ab3f91a64c638ef90b4d7dfda8016c4b086130
wilkerlucio/om-cookbook
core.cljs
(ns facebook-parse.core (:refer-clojure :exclude [update count]) (:require [cljs.core.async :as async :refer [chan put!]] [goog.string :as str] [goog.object :as gobj] [clojure.walk :as walk])) (defn- ^:private map-keys [f m] (into {} (map (fn [[k v]] [(f k) v]) m))) (defn- ^:pr...
null
https://raw.githubusercontent.com/wilkerlucio/om-cookbook/7291912fb72d30ef5f8009c3df96a461cc1d875c/src/cookbook/facebook_parse/core.cljs
clojure
(ns facebook-parse.core (:refer-clojure :exclude [update count]) (:require [cljs.core.async :as async :refer [chan put!]] [goog.string :as str] [goog.object :as gobj] [clojure.walk :as walk])) (defn- ^:private map-keys [f m] (into {} (map (fn [[k v]] [(f k) v]) m))) (defn- ^:pr...
6256dcb6afe077834a6a3a4de974b7901bfc67e2ceecf6ef56fa1129729802b4
Enecuum/Node
Helpers.hs
module Enecuum.Samples.Assets.Nodes.GraphService.DB.Helpers where import Enecuum.Prelude import qualified Enecuum.Samples.Blockchain.DB as D import qualified Enecuum.Samples.Blockchain.DB.Lens as Lens import qualified Enecuum.Samples.Blockchain.Lens ...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Samples/Assets/Nodes/GraphService/DB/Helpers.hs
haskell
| On `Right val`, evals `action` with `val`. On `Left err`, returns `Left err`. | On `Right val`, evals `action` with `val` and returns a list of successes.
module Enecuum.Samples.Assets.Nodes.GraphService.DB.Helpers where import Enecuum.Prelude import qualified Enecuum.Samples.Blockchain.DB as D import qualified Enecuum.Samples.Blockchain.DB.Lens as Lens import qualified Enecuum.Samples.Blockchain.Lens ...
41b1145f7f156f342e9ceab7bacb23a1baa1bd7240ce42ae56dcbaaaeb809235
haskell-github/github
ListTags.hs
module ListTags where import qualified Github.Repos as Github import Data.List main = do possibleTags <- Github.tagsFor "thoughtbot" "paperclip" case possibleTags of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right tags) -> putStrLn $ intercalate "\n" $ map Github.tagName tags
null
https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Repos/ListTags.hs
haskell
module ListTags where import qualified Github.Repos as Github import Data.List main = do possibleTags <- Github.tagsFor "thoughtbot" "paperclip" case possibleTags of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right tags) -> putStrLn $ intercalate "\n" $ map Github.tagName tags
f185c164057d3dbbd90fb047630edb717a76202e4419c395c997d0fb0bf8af49
unisonweb/unison
MetadataUtils.hs
-- | Helpers/utils that have to do with term/type metadata. module Unison.Codebase.Editor.HandleInput.MetadataUtils ( addDefaultMetadata, manageLinks, ) where import Control.Lens import Control.Monad.Reader (ask) import qualified Data.Set as Set import Unison.Cli.Monad (Cli) import qualified Unison.Cli.Monad a...
null
https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/unison-cli/src/Unison/Codebase/Editor/HandleInput/MetadataUtils.hs
haskell
| Helpers/utils that have to do with term/type metadata. Add default metadata to all added types and terms in a slurp component. No-op if the slurp component is empty. | Add/remove links between definitions and metadata. `silent` controls whether this produces any output to the user. `srcs` is (names of the) def...
module Unison.Codebase.Editor.HandleInput.MetadataUtils ( addDefaultMetadata, manageLinks, ) where import Control.Lens import Control.Monad.Reader (ask) import qualified Data.Set as Set import Unison.Cli.Monad (Cli) import qualified Unison.Cli.Monad as Cli import qualified Unison.Cli.MonadUtils as Cli import U...
88e86b4b6ce070f0fbb934e4b1f6559ed56f507e968b2c215a70237310a277b9
inaimathi/clj
set.lisp
(in-package :clj) (defmethod print-object ((object cl-hamt:hash-set) stream) (if (eq 'clj:syntax (named-readtables:readtable-name *readtable*)) (format stream "#{~{~s~^ ~}}" (cl-hamt:set->list object)) (format stream "(CLJ:LIST->SET (LIST ~{~S~^ ~}))" (cl-hamt:set->list object)))) (defmethod cl-murmurha...
null
https://raw.githubusercontent.com/inaimathi/clj/eb7058632d5592c4f56dc9f929939defd5391649/src/set.lisp
lisp
(in-package :clj) (defmethod print-object ((object cl-hamt:hash-set) stream) (if (eq 'clj:syntax (named-readtables:readtable-name *readtable*)) (format stream "#{~{~s~^ ~}}" (cl-hamt:set->list object)) (format stream "(CLJ:LIST->SET (LIST ~{~S~^ ~}))" (cl-hamt:set->list object)))) (defmethod cl-murmurha...
4c7a51aca1e526ce829197425d9a76fca1e9daaffcf7688ae0bb98a8ef638603
igorhvr/bedlam
test-round.scm
(use fmt test) ;;(use numbers) ; test with and without numbers via -R numbers (define (check-representation n) (define pence (inexact->exact (round (/ (modulo n 1000) 10)))) (define pounds (quotient n 1000)) (if (> pence 99) (begin (set! pence (- 100 pence)) (set! pounds (add1 pounds)...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/fmt/fmt-0.8.1/test-round.scm
scheme
(use numbers) ; test with and without numbers via -R numbers
(use fmt test) (define (check-representation n) (define pence (inexact->exact (round (/ (modulo n 1000) 10)))) (define pounds (quotient n 1000)) (if (> pence 99) (begin (set! pence (- 100 pence)) (set! pounds (add1 pounds)))) (define expected-result (cond ((= pence 0) (spr...
be46a03e06bca8e9b61846f680b51d7525ab679f7c6b141a103069b36f6bb318
quchen/stgi
Evaluate.hs
{-# LANGUAGE OverloadedStrings #-} module Test.Machine.Evaluate (tests) where import qualified Test.Machine.Evaluate.Errors as Errors import qualified Test.Machine.Evaluate.Programs as Programs import qualified Test.Machine.Evaluate.Rules as Rules import Test.Tasty tests :: TestTree tests = testGr...
null
https://raw.githubusercontent.com/quchen/stgi/dacd45cb0247f73889713dc92a911aaa835afd19/test/Testsuite/Test/Machine/Evaluate.hs
haskell
# LANGUAGE OverloadedStrings #
module Test.Machine.Evaluate (tests) where import qualified Test.Machine.Evaluate.Errors as Errors import qualified Test.Machine.Evaluate.Programs as Programs import qualified Test.Machine.Evaluate.Rules as Rules import Test.Tasty tests :: TestTree tests = testGroup "Evaluate" [ Rules.tests ...
da3f93f76f4165d742b662d17c9a2a4d7b225a6ddefd3632ee385bf4af89a765
LeifAndersen/interactive-syntax-clojure
env.cljs
(ns interactive-syntax.env (:require [reagent.core :as r :refer [atom]] [reagent.dom :as d] [react] [react-dom] ;;[reagent-catch.core :as rc] [clojure.string :as string] [clojure.set :as set] [clojure.walk :as walk] [cljs.pprint :refer [pprint]] [cljs.tools.reader :refer [read read-strin...
null
https://raw.githubusercontent.com/LeifAndersen/interactive-syntax-clojure/d5d9136638546f73c3b28291b4dfc76fd0296ca6/src/interactive_syntax/env.cljs
clojure
[reagent-catch.core :as rc] ------------------------- Package Manager Should do some other validation probably... (and version (not= version "")) (str (string/escape name sanatize-map) "/" (string/escape version sanatize-map)), (new (.-constructor js/System)) (set! js/window.dependencies #js {}) --------------...
(ns interactive-syntax.env (:require [reagent.core :as r :refer [atom]] [reagent.dom :as d] [react] [react-dom] [clojure.string :as string] [clojure.set :as set] [clojure.walk :as walk] [cljs.pprint :refer [pprint]] [cljs.tools.reader :refer [read read-string]] [cljs.tools.reader.reader-...
df03b7b24ac24841b4210974cbaf00850cab7695e394ed0a1b09676d3094c032
mirage/mirage-block-xen
block.ml
* Copyright ( c ) 2011 Anil Madhavapeddy < > * Copyright ( c ) 2012 Citrix Systems Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all cop...
null
https://raw.githubusercontent.com/mirage/mirage-block-xen/cf6d97c1f48a73baeedc57136028191db36d892f/lib/front/block.ml
ocaml
* Copyright ( c ) 2011 Anil Madhavapeddy < > * Copyright ( c ) 2012 Citrix Systems Inc * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all cop...
8bba204608f838eeff6c868625668511ccd3a3f971dd1b22544ec677af616743
funcool/promesa
exec_csp_buffers_test.cljc
(ns promesa.tests.exec-csp-buffers-test (:require [clojure.test :as t] [promesa.core :as p] [promesa.exec :as px] [promesa.exec.csp.buffers :as buffers] [promesa.exec.csp.mutable-list :as mlist] [promesa.protocols :as pt])) (t/deftest fixed-buffer (let [buf (buffers/fixed 2)] (t/is (nil? (pt/...
null
https://raw.githubusercontent.com/funcool/promesa/782abfe2d7a6b2c5769e6345c379583260c64f14/test/promesa/tests/exec_csp_buffers_test.cljc
clojure
(ns promesa.tests.exec-csp-buffers-test (:require [clojure.test :as t] [promesa.core :as p] [promesa.exec :as px] [promesa.exec.csp.buffers :as buffers] [promesa.exec.csp.mutable-list :as mlist] [promesa.protocols :as pt])) (t/deftest fixed-buffer (let [buf (buffers/fixed 2)] (t/is (nil? (pt/...
a78b1579b252826725e4b21744d06d8c49bed85302bde545b30ce6a8f67b0019
bufferswap/ViralityEngine
plane.lisp
(in-package #:cl-user) (defpackage #:vorigin.geometry.plane (:local-nicknames (#:point3d #:vorigin.geometry.point3d) (#:u #:vutils) (#:v3 #:vorigin.vec3)) (:use #:cl) (:export #:distance #:normal #:plane #:plane-p)) (in-package #:vorigin.geometry.plane) (declaim (inline %plane)) (defstruct...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/geometry/shapes/plane.lisp
lisp
(in-package #:cl-user) (defpackage #:vorigin.geometry.plane (:local-nicknames (#:point3d #:vorigin.geometry.point3d) (#:u #:vutils) (#:v3 #:vorigin.vec3)) (:use #:cl) (:export #:distance #:normal #:plane #:plane-p)) (in-package #:vorigin.geometry.plane) (declaim (inline %plane)) (defstruct...
f970f0a290b75fb478a2d728f9e89e670b5b79baf45f231fa9880b335001c93e
Clojure2D/clojure2d-examples
main.clj
(ns rt4.the-next-week.ch05d.main (:require [fastmath.core :as m] [fastmath.vector :as v] [rt4.common :as common] [rt4.the-next-week.ch05d.sphere :as sphere] [rt4.the-next-week.ch05d.moving-sphere :as moving-sphere] [rt4.the-next-week.ch05d.camera :as camera]...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05d/main.clj
clojure
camera
(ns rt4.the-next-week.ch05d.main (:require [fastmath.core :as m] [fastmath.vector :as v] [rt4.common :as common] [rt4.the-next-week.ch05d.sphere :as sphere] [rt4.the-next-week.ch05d.moving-sphere :as moving-sphere] [rt4.the-next-week.ch05d.camera :as camera]...
c045a8ed07f4db025bbd244be4d57698ae2567e9f5c061b53e470bf166644fd8
byorgey/haxr
raw_call.hs
Reads a method call in XML from standard input , sends it to a -- server and prints the response to standard output. Must be editied -- to use the right server URL. import Data.Char import Network.URI import System.Environment (getArgs) import System.Exit (exitFailure) import System.IO (hPutStrLn, stderr) import N...
null
https://raw.githubusercontent.com/byorgey/haxr/0a643b9b8ce1265736b1bc454d7df47c57bd9f50/examples/raw_call.hs
haskell
server and prints the response to standard output. Must be editied to use the right server URL. | Handle connection errors. | Create an XML-RPC compliant HTTP request
Reads a method call in XML from standard input , sends it to a import Data.Char import Network.URI import System.Environment (getArgs) import System.Exit (exitFailure) import System.IO (hPutStrLn, stderr) import Network.XmlRpc.Internals import Network.HTTP import Network.Stream parseArgs :: IO String parseArgs = d...
97c8c11f0edf33471a294baf009ad8be3b680ff82e4328e211a0d18193680cae
mariari/vomitchan
Misc.hs
module Bot.Misc (bindM, randElems, randElem, randElemList) where import Control.Monad (join) import qualified System.Random as Random import qualified Data.Vector as V bindM :: (Applicative f, Monad m, Traversable m) => (a1 -> f (m a2)) -> m a1 -> f (m a2) bindM f a = join <$> traverse f a --I know there is an ab...
null
https://raw.githubusercontent.com/mariari/vomitchan/3ffde0a983d6545158c1562bd53362d9d0149831/src/Bot/Misc.hs
haskell
I know there is an abstraction to be made here but w/e grabs an infinite list of random values inside some vector
module Bot.Misc (bindM, randElems, randElem, randElemList) where import Control.Monad (join) import qualified System.Random as Random import qualified Data.Vector as V bindM :: (Applicative f, Monad m, Traversable m) => (a1 -> f (m a2)) -> m a1 -> f (m a2) bindM f a = join <$> traverse f a randElemsList :: [a] ->...
428922faa46a4c2846b3ebe662228cb3e98d171b7a9e66276de7fcf55c11a680
haskell/cabal
cabal.test.hs
import Test.Cabal.Prelude main = cabalTest $ do cabal "v2-build" ["lemon"]
null
https://raw.githubusercontent.com/haskell/cabal/00a2351789a460700a2567eb5ecc42cca0af913f/cabal-testsuite/PackageTests/BuildDeps/InternalLibrary1/cabal.test.hs
haskell
import Test.Cabal.Prelude main = cabalTest $ do cabal "v2-build" ["lemon"]
b9d82fbb898c58738079597a84b01a1d3feaa93b847ef337222fa05ed7af8f59
rurban/clisp
recurrence.lisp
;;;; Recurrence Demo Copyright ( C ) 1988 ( ) ;;; 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 documentation. ;;; The author pr...
null
https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/clx/new-clx/demos/recurrence.lisp
lisp
Recurrence Demo 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 documentation. The author provides this software "as is" without express or im...
Copyright ( C ) 1988 ( ) Copyright ( C ) 2007 - 2009 < > This is free software , distributed under the GNU GPL v2 + (in-package :clx-demos) with 0,0 being upper left and 0,H being lower left . hw and hh are half - width and half - height of screen (defun draw-ppict (win gc count x y hw hh) "Recu...
13c744981da4990c183d8583d7f499134e52ed809ac3c091a73bd115a24a6c76
ygrek/ocaml-extlib
dynArray.ml
* DynArray - Resizeable Ocaml arrays * Copyright ( C ) 2003 * Copyright ( C ) 2003 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 of ...
null
https://raw.githubusercontent.com/ygrek/ocaml-extlib/69b77f0f0500c98371aea9a6f2abb56c946cdab0/src/dynArray.ml
ocaml
We require the size to be at least large enough to hold the number * of elements we know we need! * Also be sure not to exceed max_array_length we don't call changelen because we want to blit we don't call changelen because we want to blit this case could be inlined so we don't blit on just-copied eleme...
* DynArray - Resizeable Ocaml arrays * Copyright ( C ) 2003 * Copyright ( C ) 2003 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 of ...
c138c6df21783e509fe70a5c309f9334737cc531a64a245dfe1cfaf474abc980
igorhvr/bedlam
timecore.scm
;;;; "timecore.scm" Core time conversion routines Copyright ( C ) 1994 , 1997 , 2004 , 2005 ; ;Permission to copy this software, to modify it, to redistribute it, ;to distribute modified versions, and to use it for any purpose is ;granted, subject to the following restrictions and understandings. ; 1 . Any copy m...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/timecore.scm
scheme
"timecore.scm" Core time conversion routines Permission to copy this software, to modify it, to redistribute it, to distribute modified versions, and to use it for any purpose is granted, subject to the following restrictions and understandings. in full. this software will be error-free, and I am under no obligatio...
Copyright ( C ) 1994 , 1997 , 2004 , 2005 1 . Any copy made of this software must include this copyright notice 2 . I have made no warranty or representation that the operation of 3 . In conjunction with products arising from the use of this (require 'multiarg-apply) (define time:days/month #(31 29 31...
4238457877de4bcef8abc0708dd66e753708981c9984e402b087b70e7265d25c
garrigue/labltk
jpf_font.ml
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of OCaml (* *) , , and ...
null
https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/jpf/jpf_font.ml
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of OCaml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
992f9fa5ef79a1803782b7b4ecce824e742d2dd9e181d920eaeb20e65ff3f740
ocaml-gospel/cameleer
plugin_cameleer.ml
open Why3 open Ptree open Gospel open Parser_frontend let debug = ref false open Why3.Typing open Wstdlib open Ident open Cameleer module Pm = Pmodule module E = Cameleer.Expression module T = Cameleer.Uterm let print_modules = Debug.lookup_flag "print_modules" let use_std_lib = let dummy_pos = Loc.dummy_position...
null
https://raw.githubusercontent.com/ocaml-gospel/cameleer/43adf1fc5af62d321c52b06bf13f8728cf85c11e/plugin/plugin_cameleer.ml
ocaml
TODO: type-checking structure items let mk_cspsym id = let id_refee, id_refer = mk_id_ref id in * CSpsym (id_refee, id_refer) in let f = type_check file mod_name f in This is the beginning of the Why3 file construction This is the beginning of the top module construction Closes the top module
open Why3 open Ptree open Gospel open Parser_frontend let debug = ref false open Why3.Typing open Wstdlib open Ident open Cameleer module Pm = Pmodule module E = Cameleer.Expression module T = Cameleer.Uterm let print_modules = Debug.lookup_flag "print_modules" let use_std_lib = let dummy_pos = Loc.dummy_position...
06d2e13207fc00942c18b8e2be226c3e9254918e265d738806b7cc80b9767066
gilith/hol-light
timelock.ml
(* ========================================================================= *) (* A MONTGOMERY MULTIPLICATION CIRCUIT TO OPEN A CRYPTO TIMELOCK *) (* ========================================================================= *) (* -----------...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/montgomery/timelock.ml
ocaml
========================================================================= A MONTGOMERY MULTIPLICATION CIRCUIT TO OPEN A CRYPTO TIMELOCK ========================================================================= ------------------------------------------------------------------------- ---------------...
The - Rabin primality test . let random_num = let gen m = bit_cons_num (Random.bool ()) m in fun n -> let w = int_of_num (bit_width_num n) in let rec loop () = let m = funpow w gen num...
b1018a11c6ea9356cf8af58cd0ffb3f8e09d3001ae3f5e84ff8b3857a5d649e1
np/camllexer
input.ml
(* "bla *)
null
https://raw.githubusercontent.com/np/camllexer/5222a062cb4f0d651e41a66a875c39941137b67d/tests/unterminated-string-in-comment.t/input.ml
ocaml
"bla
08e091da33fe2078c7bf5dcbc6b61b083a7b0d7effa0c6de298567f9dc0627b3
facebook/flow
tempfile.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/8308ab8fb2e23a2a581d33a3ae192579e25093ac/src/hack_forked/test/utils/tempfile/tempfile.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
1a541cc768249534fb8315239a04af953462b6084c652bd9376c70439cb3f622
JackieMaHatesDogEyes/DreamOS
number.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;This program is distributed under the terms of the ;;; ;;;GNU General Public License. ;;; Copyright ( C ) 2010 ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Converts INTEGER in VAL to big i...
null
https://raw.githubusercontent.com/JackieMaHatesDogEyes/DreamOS/53d56a3ff263840d3a78142cf4431cbe4fc18509/src/number.scm
scheme
This program is distributed under the terms of the ;;; GNU General Public License. ;;; ; ; given size in TEMP in tetras (preserved). Make copy of ARGL in ARGL guaranteeing extra tetra of string space Return high tetra after shift in TEMP. ARGL not preserved. ; sign-bit sign-bi...
Converts INTEGER in VAL to big integer with undefined value (: 'bigify_integer) (push TEMP) (test (~ #x1fff) TEMP) (jnzl 'error_overflow) (shl 2 TEMP) (and! #x0003ffff (@ VAL)) (call 'insure_string_space) (shl 16 TEMP) (or! TEMP (@ VAL)) (mov (@ 'freestring) TEMP) (mov TEMP (@ 4 VAL)) (mov (@ esp...
b78c2231c108f9a7fd9fad2e7676f653fe736de4d6cbf2f51b10c355619c639f
janestreet/memtrace_viewer
identifier.ml
open! Core include Identifier_intf module Make () : S_with_special = struct module T = struct type t = int [@@deriving equal, compare, hash, sexp, bin_io] end include T include Comparable.Make (T) include Hashable.Make (T) let max_value = Int.max_value let first_special = -1 let next_special t = ...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/eb469bc13cf4ebf7cac147f8dd93ff514f9f68d2/common/identifier.ml
ocaml
open! Core include Identifier_intf module Make () : S_with_special = struct module T = struct type t = int [@@deriving equal, compare, hash, sexp, bin_io] end include T include Comparable.Make (T) include Hashable.Make (T) let max_value = Int.max_value let first_special = -1 let next_special t = ...
c5ce096019104c57ab03e1ac4efbac33c35df2039decd8726fb49d742dc2f41b
braidchat/braid
s3.cljs
(ns braid.lib.s3 (:require [braid.lib.xhr :refer [edn-xhr ajax-xhr]] [taoensso.timbre :as timbre :refer-macros [errorf]])) (defn s3-path [bucket region & paths] (str "https://" bucket ".s3." region ".amazonaws.com/" (apply str paths))) (defn upload [{:keys [file prefix on-complete]}] (edn-xhr {:meth...
null
https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/lib/s3.cljs
clojure
(ns braid.lib.s3 (:require [braid.lib.xhr :refer [edn-xhr ajax-xhr]] [taoensso.timbre :as timbre :refer-macros [errorf]])) (defn s3-path [bucket region & paths] (str "https://" bucket ".s3." region ".amazonaws.com/" (apply str paths))) (defn upload [{:keys [file prefix on-complete]}] (edn-xhr {:meth...
de07c6941b05375540b7495c6afb1de285bc52018707d65d74791387d211e0e1
rickbutton/loki
hamt-misc-test.scm
Tests of utilities used by HAMT Copyright MMIV - MMXVII . All rights reserved . ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without lim...
null
https://raw.githubusercontent.com/rickbutton/loki/11ae0bac5e311c9b27994100ae8360cc5c242c61/src/srfi/146/gleckler/hamt-misc-test.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Tests of utilities used by HAMT Copyright MMIV - MMXVII . All rights reserved . files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS...
fdb24f4693cc0586310d25b60b8790c4ed631537b75567019713bd1981ca8113
ocaml-batteries-team/batteries-included
batQueue.ml
* BatQueue - Extended operations on queues * Copyright ( C ) 1996 2008 , LIFO , Universite d'Orleans * * 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 Foundati...
null
https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batQueue.ml
ocaml
$Q of_enum (Q.list Q.int) (fun l -> \ let e = BatList.enum l in \ BatEnum.equal (=) (enum (of_enum (BatEnum.clone e))) e \ ) $T Exceptionless.peek (Queue.create ()) = None Exceptionless.take (Queue.create ()) = None
* BatQueue - Extended operations on queues * Copyright ( C ) 1996 2008 , LIFO , Universite d'Orleans * * 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 Foundati...
1b15dd59d7da3fab20100a8eea78e75388bac352d3547171eaeb3f5ed3adc185
xsc/pandect
clj_digest_bench.clj
(ns pandect.clj-digest-bench (:require [pandect.bench :refer [defbench]])) (defbench clj-digest {:all {:md5 digest/md5 :sha1 digest/sha-1 :sha256 digest/sha-256 :sha384 digest/sha-384 :sha512 digest/sha-512 :sha3-256 digest/sha3-256 :sha3-384 digest/sha3-384 :sha3-512 ...
null
https://raw.githubusercontent.com/xsc/pandect/ffc95e81484045ddbe235a2f4208bd5677f1195b/benchmarks/pandect/clj_digest_bench.clj
clojure
(ns pandect.clj-digest-bench (:require [pandect.bench :refer [defbench]])) (defbench clj-digest {:all {:md5 digest/md5 :sha1 digest/sha-1 :sha256 digest/sha-256 :sha384 digest/sha-384 :sha512 digest/sha-512 :sha3-256 digest/sha3-256 :sha3-384 digest/sha3-384 :sha3-512 ...
b24cc07d42e4ab38d0dad6e4a034bc0c99fb636c0525c5a24571863325f0ba9b
garycrawford/lein-life
midje.clj
(change-defaults :print-level :print-namespaces)
null
https://raw.githubusercontent.com/garycrawford/lein-life/d55f3636950b58b02399ab32eb1f6d81ecfce823/src/leiningen/new/life/common/midje.clj
clojure
(change-defaults :print-level :print-namespaces)
ab9153f9ca8d3ff40444f329b605fee09be9a26fcebcc88b9f3081dea6db0a93
scrintal/heroicons-reagent
bell_alert.cljs
(ns com.scrintal.heroicons.mini.bell-alert) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:d "M4.214 3.227a.75.75 0 00-1.156-.956 8.97 8.97 0 00-1.856 3.826.75.75 0 001.466.316 7.47 7.47 0 011.546-3.186zM16.942 2...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/bell_alert.cljs
clojure
(ns com.scrintal.heroicons.mini.bell-alert) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:d "M4.214 3.227a.75.75 0 00-1.156-.956 8.97 8.97 0 00-1.856 3.826.75.75 0 001.466.316 7.47 7.47 0 011.546-3.186zM16.942 2...
c801f160b8cf586353287a66465705a3a8e38098cb922c3157b769fad93cc55e
tiensonqin/lymchat-exp
colors.cljs
(ns lymchat.shared.colors) (def colors {:blue-grey700 "#455a64" :deep-orange-a400 "#ff3d00" :lime400 "#d4e157" :amber50 "#fff8e1" :deep-purple900 "#311b92" :cyan600 "#00acc1" :deep-orange300 "#ff8a65" :grey800 "#424242" :grey900 "#212121" ...
null
https://raw.githubusercontent.com/tiensonqin/lymchat-exp/425a0738b11632119be08b5a59f12244f5df1575/src/lymchat/shared/colors.cljs
clojure
(ns lymchat.shared.colors) (def colors {:blue-grey700 "#455a64" :deep-orange-a400 "#ff3d00" :lime400 "#d4e157" :amber50 "#fff8e1" :deep-purple900 "#311b92" :cyan600 "#00acc1" :deep-orange300 "#ff8a65" :grey800 "#424242" :grey900 "#212121" ...
673829278444bf23edd2de23f9ae9d2bc5a2418fe6f357562f9bd053d177f82b
ninenines/cowboy
ws_h.erl
-module(ws_h). -export([init/2]). -export([websocket_init/1]). -export([websocket_handle/2]). -export([websocket_info/2]). init(Req, Opts) -> {cowboy_websocket, Req, Opts}. websocket_init(State) -> erlang:start_timer(1000, self(), <<"Hello!">>), {[], State}. websocket_handle({text, Msg}, State) -> {[{text, << "...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/examples/websocket/src/ws_h.erl
erlang
-module(ws_h). -export([init/2]). -export([websocket_init/1]). -export([websocket_handle/2]). -export([websocket_info/2]). init(Req, Opts) -> {cowboy_websocket, Req, Opts}. websocket_init(State) -> erlang:start_timer(1000, self(), <<"Hello!">>), {[], State}. websocket_handle({text, Msg}, State) -> {[{text, << "...
dac3bd1dea0e4f2c0e72a60bc804b6c0229ca122ac9acf19cb81fbf2d2f68cf3
Cumulus/Syndic
generate.ml
#use "topfind" ;; #require "ocplib-json-typed" ;; #require "fmt" ;; #require "jsonm" ;; #require "fpath" ;; type entry = { name : string ; uri : Uri.t ; kind : kind } and kind = Rss1 | Rss2 | Atom let json = let open Json_encoding in let name = req "name" string in let uri = req "uri" (conv Uri.to_string...
null
https://raw.githubusercontent.com/Cumulus/Syndic/7a70e3062e42f9ee0ec77f282e1924736b0dff2a/test/generate.ml
ocaml
#use "topfind" ;; #require "ocplib-json-typed" ;; #require "fmt" ;; #require "jsonm" ;; #require "fpath" ;; type entry = { name : string ; uri : Uri.t ; kind : kind } and kind = Rss1 | Rss2 | Atom let json = let open Json_encoding in let name = req "name" string in let uri = req "uri" (conv Uri.to_string...
2cf0ad6c4e369da2c35c86fe403389c9efdd957f986f9ccf60ef89139b099b38
disco-lang/disco
Parser.hs
# LANGUAGE TemplateHaskell # ----------------------------------------------------------------------------- -- | Module : Disco . -- Copyright : disco team and contributors -- Maintainer : -- SPDX - License - Identifier : BSD-3 - Clause -- Parser to convert concrete Disco syntax into an ( untyped ,...
null
https://raw.githubusercontent.com/disco-lang/disco/0be88cfbcc5f85b5f41ceadf856c49ed03a342cb/src/Disco/Parser.hs
haskell
--------------------------------------------------------------------------- | Copyright : disco team and contributors Maintainer : language) AST. --------------------------------------------------------------------------- * Parser type and utilities ** Basic lexemes ** Punctuation * Disco parser ** Mo...
# LANGUAGE TemplateHaskell # Module : Disco . SPDX - License - Identifier : BSD-3 - Clause Parser to convert concrete Disco syntax into an ( untyped , surface module Disco.Parser DiscoParseError(..), Parser, runParser, withExts, indented, thenIndented * , sc, lexeme, symbol, reserv...
3bd42088927c0748e0c0c184d59d258118d003dd2eb0ec3f149284f274b46042
zwizwa/staapl
template.rkt
#lang staapl/pic18 \ -*- forth -*- provide-all \ Template buffer for initializing RAM. Returns the address of the \ FLASH table on the stack. : template \ -- lo hi TOSL @ TOSH @ pop ;
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/pic18/template.rkt
racket
#lang staapl/pic18 \ -*- forth -*- provide-all \ Template buffer for initializing RAM. Returns the address of the \ FLASH table on the stack. : template \ -- lo hi TOSL @ TOSH @
a37eddad315b622667ace16ef90bdb81afe82d4de28050e046fcf25e05ad4318
dbuenzli/useri
useri_backend_jsoo.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/useri/4646a7b8f3c0d6ce34b1c3f789eebe56cb75b9d2/src-jsoo/useri_backend_jsoo.ml
ocaml
js_of_ocaml events Passing time Timing animation No effect in this backend keep a ref. to avoid gc remove anim remove anim Counting time Pretty printing time Mouse since we prevent default Touch not supported not supported Key For browser keyboard handling see map to lowercase to sup...
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...