_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 |
|---|---|---|---|---|---|---|---|---|
679914bb5cf8e831016de522df87390eeff7b1d9cc1176571e87d0104fb43f16 | vseloved/cl-nlp | parser.lisp | ( c ) 2015 Vsevolod Dyomkin
(in-package #:nlp.parsing)
(named-readtables:in-readtable rutils-readtable)
| null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/src/parsing/parser.lisp | lisp | ( c ) 2015 Vsevolod Dyomkin
(in-package #:nlp.parsing)
(named-readtables:in-readtable rutils-readtable)
| |
5d435f52dc3b46c531d9f327879b70500d695bec08195d027bb9fc9bc622f1ef | elektronaut/advent-of-code | day02.clj | (ns advent-of-code.2022.02
(:require [clojure.string :as str]))
(def plays (->> (slurp "2022/day02/input.txt")
(str/split-lines)
(map #(str/split % #" "))))
(def shapes {"A" 1 "B" 2 "C" 3
"X" 1 "Y" 2 "Z" 3})
(defn outcome-points [a b]
([3 0 6]
(mod (- (+ 3 (shapes ... | null | https://raw.githubusercontent.com/elektronaut/advent-of-code/a8bb7bbadc8167ebb1df0d532493317705bb7f0d/2022/day02/day02.clj | clojure | (ns advent-of-code.2022.02
(:require [clojure.string :as str]))
(def plays (->> (slurp "2022/day02/input.txt")
(str/split-lines)
(map #(str/split % #" "))))
(def shapes {"A" 1 "B" 2 "C" 3
"X" 1 "Y" 2 "Z" 3})
(defn outcome-points [a b]
([3 0 6]
(mod (- (+ 3 (shapes ... | |
93fc569de40c996551cda5afa35f9ec42c76e9e7446321a211289ec4034b6443 | zhujinxian/road | project.clj | (defproject road "0.2.0-rc"
:description "Road is a clojure web framework through packing java severlet filter."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[javax.servlet/servlet-api "2.5"]
[org.cl... | null | https://raw.githubusercontent.com/zhujinxian/road/dd5172e4275c89519101541257b441fef1e9e6a9/project.clj | clojure | (defproject road "0.2.0-rc"
:description "Road is a clojure web framework through packing java severlet filter."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[javax.servlet/servlet-api "2.5"]
[org.cl... | |
4ce76d6f71be949238d4592c2d538ad8496ff0b69dc269e2fb73e5ab6140936b | nuprl/gradual-typing-performance | main.rkt | #lang racket/base
(require (only-in "eval.rkt"
forth-eval*
))
;; =============================================================================
(define (main)
(call-with-input-file* "history.txt"
(lambda (p)
(let-values ([(_e _s) (forth-eval* p)]) (void))))
(void))
(time (main))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/class/macrobench/forth/slow/main.rkt | racket | ============================================================================= | #lang racket/base
(require (only-in "eval.rkt"
forth-eval*
))
(define (main)
(call-with-input-file* "history.txt"
(lambda (p)
(let-values ([(_e _s) (forth-eval* p)]) (void))))
(void))
(time (main))
|
f812f0beadd1aab007d83bdf15c4c916fb035ebfbdd469255615a07b8d728186 | ChrisPenner/grids | Grid.hs | # LANGUAGE OverloadedLists #
# LANGUAGE TypeApplications #
module Spec.Grid (spec) where
import Test.Hspec
import qualified Data.Vector as V
import Data.Grid as G
import Control.Applicative
import Data.Maybe
import Data.Functor.Compose
import Data.Foldable
smallGrid :: Grid '[2, 2] Int
smallGrid = G.generate id
med... | null | https://raw.githubusercontent.com/ChrisPenner/grids/619c72b1e51f96377845c2a15eb100d8f4185fa1/test/Spec/Grid.hs | haskell | # LANGUAGE OverloadedLists #
# LANGUAGE TypeApplications #
module Spec.Grid (spec) where
import Test.Hspec
import qualified Data.Vector as V
import Data.Grid as G
import Control.Applicative
import Data.Maybe
import Data.Functor.Compose
import Data.Foldable
smallGrid :: Grid '[2, 2] Int
smallGrid = G.generate id
med... | |
ee11b0a49309c279b9bf60854853b433b7c87227f7000a102c086c168d6f9307 | felixmulder/haskell-in-production | Types.hs | module Types where
import Prelude
import Data.Aeson (FromJSON, ToJSON, encode)
import Data.Text (Text)
import Data.Text.Lazy (toStrict)
import Data.Text.Lazy.Encoding (decodeUtf8)
import Data.String (IsString)
import GHC.Generics (Generic)
import Network.HTTP.Types.Status (status201, status204, status404)
import Web... | null | https://raw.githubusercontent.com/felixmulder/haskell-in-production/ff3431f01342b8689d3449007759706d0bba6488/part-1-testable-components/src/Types.hs | haskell | module Types where
import Prelude
import Data.Aeson (FromJSON, ToJSON, encode)
import Data.Text (Text)
import Data.Text.Lazy (toStrict)
import Data.Text.Lazy.Encoding (decodeUtf8)
import Data.String (IsString)
import GHC.Generics (Generic)
import Network.HTTP.Types.Status (status201, status204, status404)
import Web... | |
a9db62aebbeed3c03ff68f39fd64de91d86d48214843cb94745d803bd89f3a28 | typelead/etlas | Dhall.hs | {-# LANGUAGE CPP, RecordWildCards, OverloadedStrings #-}
module Distribution.Client.PackageDescription.Dhall where
import Control.Exception ( throwIO, catch, SomeException )
import qualified Control.Monad.Trans.State.Strict as State
import qualified Crypto.Hash
import Data.Function ( (&) )
import qualified Data.Hash... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/PackageDescription/Dhall.hs | haskell | # LANGUAGE CPP, RecordWildCards, OverloadedStrings # | module Distribution.Client.PackageDescription.Dhall where
import Control.Exception ( throwIO, catch, SomeException )
import qualified Control.Monad.Trans.State.Strict as State
import qualified Crypto.Hash
import Data.Function ( (&) )
import qualified Data.Hashable as Hashable
import Data.Maybe ( fromMaybe )
import D... |
c36e0e61546deeeed8c947e7c5e4c98b0ee261bad27789bffe82c384e9378d88 | serokell/qtah | QSplitter.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- 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 , either version 3 of the License , or
-- (at your option) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Widgets/QSplitter.hs | haskell |
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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
module Graphics.UI.Qtah.Generator.Interface.Wi... |
80052585695622d0a2c1395bb98e9603534685d05a14c89b21143fbc5d5f5b55 | INRIA/zelus | zlsrun.ml | module Make (SSolver : Zls.STATE_SOLVER) =
struct
(* instantiate a numeric solver *)
module Solver = Zlsolve.Make (SSolver) (Illinois)
(*** Timer version ***)
(* let wait_next_instant debut fin min = *)
(* let diff = min -. (fin -. debut) in *)
(* let rec step signal = *)
if diff > 0.0 then
( Sys.se... | null | https://raw.githubusercontent.com/INRIA/zelus/685428574b0f9100ad5a41bbaa416cd7a2506d5e/lib/std/zlsrun.ml | ocaml | instantiate a numeric solver
** Timer version **
let wait_next_instant debut fin min =
let diff = min -. (fin -. debut) in
let rec step signal =
else raise Exit
in
try
step Sys.sigalrm;
while true do
done
with Exit -> ()
** Without error handling **
let rec wait_next_ins... | module Make (SSolver : Zls.STATE_SOLVER) =
struct
module Solver = Zlsolve.Make (SSolver) (Illinois)
if diff > 0.0 then
( Sys.set_signal Sys.sigalrm ( . Signal_handle ( fun _ - > raise Exit ) ) ;
ignore ( Unix.setitimer Unix . ITIMER_REAL { Unix.it_value = diff ;
... |
f24a2b0d9f3e74ca35d29ea4a904ce88af1fc36564d3faa6257e3a33e665e5a9 | AdaCore/why3 | pinterp.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/src/mlw/pinterp.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Term
open Expr
open Pinterp_core
open Value
* { 2 Interpreter configuration }
val init_real : int *... |
5b63608a000d3454850648696e8b79a9b8d8652ddd6e623d3387601f0290292e | Bogdanp/racket-forms | info.rkt | #lang info
(define license 'BSD-3-Clause)
(define collection 'multi)
(define deps '("forms-doc"
"forms-lib"))
(define implies '("forms-doc"
"forms-lib"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-forms/640e58a5035b532c6e2b52f4520da68d1c36a5b8/forms/info.rkt | racket | #lang info
(define license 'BSD-3-Clause)
(define collection 'multi)
(define deps '("forms-doc"
"forms-lib"))
(define implies '("forms-doc"
"forms-lib"))
| |
cb1a52da3e672b1c9435e002f99ff325793f4753abe9819d848df21e104b8d26 | LambdaHack/LambdaHack | WatchSfxAtomicM.hs | -- | Display atomic SFX commands received by the client.
module Game.LambdaHack.Client.UI.Watch.WatchSfxAtomicM
( watchRespSfxAtomicUI
#ifdef EXPOSE_INTERNAL
-- * Internal operations
, returnJustLeft, ppSfxMsg, strike
#endif
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import qualified Dat... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/a6f770009f0189ef7c1ea5a4d88b86d443a2a790/engine-src/Game/LambdaHack/Client/UI/Watch/WatchSfxAtomicM.hs | haskell | | Display atomic SFX commands received by the client.
* Internal operations
| Display special effects (text, animation) sent to the client.
Don't modify client state (except a few fields), but only client
session (e.g., by displaying messages). This is enforced by types.
In most messages below @iid@ is ignored, b... | module Game.LambdaHack.Client.UI.Watch.WatchSfxAtomicM
( watchRespSfxAtomicUI
#ifdef EXPOSE_INTERNAL
, returnJustLeft, ppSfxMsg, strike
#endif
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import qualified Data.EnumMap.Strict as EM
import Data.Int (Int64)
import qualified Data.Text as... |
900947fc4360789e5b07beca14d32a39ac5fa9444a3b28dd2801643b21334d01 | wilkerlucio/pathom3-graphql | server.clj | (ns com.wsscode.pathom3.graphql.test.server
(:require
[clojure.data.json :as json]
[com.walmartlabs.lacinia :refer [execute]]
[com.walmartlabs.lacinia.schema :as schema]
[com.walmartlabs.lacinia.util :as util]
[com.wsscode.pathom3.graphql :as p.gql]
[com.wsscode.pathom3.interface.smart-map :as... | null | https://raw.githubusercontent.com/wilkerlucio/pathom3-graphql/b417590a118233a4786482303b491d2867d65f75/test/com/wsscode/pathom3/graphql/test/server.clj | clojure | (ns com.wsscode.pathom3.graphql.test.server
(:require
[clojure.data.json :as json]
[com.walmartlabs.lacinia :refer [execute]]
[com.walmartlabs.lacinia.schema :as schema]
[com.walmartlabs.lacinia.util :as util]
[com.wsscode.pathom3.graphql :as p.gql]
[com.wsscode.pathom3.interface.smart-map :as... | |
bd1da6e226ec6c127eea84186e0ace85b98611358350f09db000bb6148fbf2bf | facebook/infer | CombinedLexer.mli |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/bcc40aef007f0cf4e6b7d90c8fd50a82a736be8c/infer/src/textual/CombinedLexer.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
e7b64138f9198b4b05f4e497707e882a4a34222677ca5879fe06535bbe17f14b | sufish/emqx_rabbitmq_hook | emqx_rabbitmq_hook_sup.erl | -module(emqx_rabbitmq_hook_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-include("emqx_rabbitmq_hook.hrl").
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
application:set_env(amqp_client, prefer_ipv6, false),
{ok, PoolOpts} = application:get_en... | null | https://raw.githubusercontent.com/sufish/emqx_rabbitmq_hook/44e2290ebf4d9a1b036c464d5ac0aec0e822831f/src/emqx_rabbitmq_hook_sup.erl | erlang | -module(emqx_rabbitmq_hook_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-include("emqx_rabbitmq_hook.hrl").
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
application:set_env(amqp_client, prefer_ipv6, false),
{ok, PoolOpts} = application:get_en... | |
a1ce89ccf8f32c7856991218bb0acdaec9ff39f2147ba79a53be6290c76dca01 | jship/monad-logger-aeson | ThreadContextNo.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module TestCase.MonadLogger.LogDebug.ThreadContextNo
( testCase
) where
import Control.Monad.Logger.Aeson (Loc(..), LogLevel(..), LoggedMessage(..))
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time (UTCTime(..))
import Te... | null | https://raw.githubusercontent.com/jship/monad-logger-aeson/218dd4a1fd9fd7f86514322dd529444a55001443/monad-logger-aeson/test-suite/TestCase/MonadLogger/LogDebug/ThreadContextNo.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
module TestCase.MonadLogger.LogDebug.ThreadContextNo
( testCase
) where
import Control.Monad.Logger.Aeson (Loc(..), LogLevel(..), LoggedMessage(..))
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time (UTCTime(..))
import TestCase (TestCase(..))
import qualif... |
95769b7ac08a012b653ce72c8eec0965d10ac07d9a5f18af2ef8cac7766ee570 | cky/guile | module-1.scm | ;;; examples/modules/module-1.scm -- Module system demo.
;;; Commentary:
Module 1 of the module demo program .
Author :
Date : 2001 - 05 - 29
;;; Code:
(define-module (module-1))
(export foo bar)
(define (foo)
(display "module-1 foo")
(newline))
(define (bar)
(display "module-1 bar")
(newline))
... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/examples/modules/module-1.scm | scheme | examples/modules/module-1.scm -- Module system demo.
Commentary:
Code:
End of file. |
Module 1 of the module demo program .
Author :
Date : 2001 - 05 - 29
(define-module (module-1))
(export foo bar)
(define (foo)
(display "module-1 foo")
(newline))
(define (bar)
(display "module-1 bar")
(newline))
|
74c1b2ec6f4e691c4401638651c4cabb355824bcdccfb954d5bee6452221e721 | heroku/cowboyku | cowboyku_app.erl | Copyright ( c ) 2011 - 2013 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/heroku/cowboyku/ba7120bdb119ac676909e51f0738bde1d4fdd4ee/src/cowboyku_app.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2013 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
@private
-module(cowboyku_app).
-behaviour(applicat... |
38c5e441573bd3cc1d8940d45b2a102d52fac70cacd68cc4060296188a617b96 | dfordivam/tenjinreader | TextReader.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
module TextReader where
import FrontendCommon
import ReadingPane
import qualifi... | null | https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/android/src/TextReader.hs | haskell | # LANGUAGE OverloadedStrings #
refresh
refresh | # LANGUAGE NoImplicitPrelude #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
module TextReader where
import FrontendCommon
import ReadingPane
import qualified Data.Map as Map
data TextReader... |
a127f397c4671c7ba8cf16636911bee054fd98144b74e94d4b0eb5f65f3a9137 | creichert/hsqmlstocqt | StocQt.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module GUI.StocQt where
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent
import Control.Monad
import Data.Proxy
import qualified Data.Text as ... | null | https://raw.githubusercontent.com/creichert/hsqmlstocqt/1400a94401c521a997b44a67362aee87cc37307e/src/GUI/StocQt.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
RGB in Hex.
| QML Context Object.
StockModel Signals
stockId
stockName
stockDataCycle
ready
stockPrice
highestPrice
highestVolume
stock
chartType
drawHighPrice
drawLowPrice
drawOpenPrice
drawClosePrice
drawV... | module GUI.StocQt where
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent
import Control.Monad
import Data.Proxy
import qualified Data.Text as T
import Data.Typeable
import Graphics.QML
type ChartType = T.Text
type Date = T.Text
... |
05ee5ca6642a7fa6ca4e97bf7effd3cf53b7bb211d2c2cb41b610c8590f7b191 | clojure-interop/aws-api | AbstractAmazonSimpleDBAsync.clj | (ns com.amazonaws.services.simpledb.AbstractAmazonSimpleDBAsync
"Abstract implementation of AmazonSimpleDBAsync. Convenient method forms pass through to the corresponding
overload that takes a request object and an AsyncHandler, which throws an
UnsupportedOperationException."
(:refer-clojure :only [require comm... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simpledb/src/com/amazonaws/services/simpledb/AbstractAmazonSimpleDBAsync.clj | clojure | (ns com.amazonaws.services.simpledb.AbstractAmazonSimpleDBAsync
"Abstract implementation of AmazonSimpleDBAsync. Convenient method forms pass through to the corresponding
overload that takes a request object and an AsyncHandler, which throws an
UnsupportedOperationException."
(:refer-clojure :only [require comm... | |
200eec65c6f5cdd824d8d6db0f11f9d112b1933847253888a2319efe4be73744 | glguy/advent | 02.hs | {-# Language QuasiQuotes #-}
|
Module : Main
Description : Day 2 solution
Copyright : ( c ) , 2020
License : ISC
Maintainer :
< >
Password validation rules .
Module : Main
Description : Day 2 solution
Copyright : (c) Eric Mertens, 2020
License : ISC
Maintainer :
<>
... | null | https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2020/02.hs | haskell | # Language QuasiQuotes #
| Check both password validation rules against the list of passwords.
>>> :main
| Target character must occur between low and high inclusive bounds.
>>> p1 (1,3,'a',"abcde")
True
False
True
>>> p2 (1,3,'a',"abcde")
True
False
False | |
Module : Main
Description : Day 2 solution
Copyright : ( c ) , 2020
License : ISC
Maintainer :
< >
Password validation rules .
Module : Main
Description : Day 2 solution
Copyright : (c) Eric Mertens, 2020
License : ISC
Maintainer :
<>
Password validation rules.
-... |
92cf169a6500b6586ec2d3459df6879e09d8c2a72a1271e18384e432a29a1735 | ailisp/flute | flute.lisp | (in-package :flute)
(defclass element ()
((tag :initarg :tag
:accessor element-tag)
(attrs :initarg :attrs
:accessor element-attrs)
(children :initarg :children
:accessor element-children)))
(defclass builtin-element (element) ())
(defclass builtin-element-with-prefix (builtin-... | null | https://raw.githubusercontent.com/ailisp/flute/90ebcd6e82f637f49b6de7d625ccc51ec4c92900/src/flute.lisp | lisp | Experimental
(when (find :illusion *features*)
(illusion:set-paren-reader
:flute
#'html-element-p
(lambda (stream indicator)
(multiple-value-bind (name id class) (collect-id-and-class indicator)
(if (or id class)
(list* (find-symbol (string-upcase name) :flute)
... | (in-package :flute)
(defclass element ()
((tag :initarg :tag
:accessor element-tag)
(attrs :initarg :attrs
:accessor element-attrs)
(children :initarg :children
:accessor element-children)))
(defclass builtin-element (element) ())
(defclass builtin-element-with-prefix (builtin-... |
68e289fb14550b9452ad6ba5a607210733e13636c49e305da3cc64c16876716c | TorXakis/TorXakis | Compiler.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
{-# LANGUAGE DataKinds #-}
{-#... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/txs-compiler/src/TorXakis/Compiler.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
------------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
Compiler for the 'TorXakis' language.
----------... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE ScopedTypeVariables #
# LANGU... |
bd265e5339cd1f226810fb046bd581ca5db73a60505c0d5f3d8fa8751fd67d44 | jellelicht/guix | boost.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/boost.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 < >
Copyright © 2014 , 2015 < >
Copyright © 2015 < >
Copyright © 2016 < >
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 < / > .
(d... |
a532d79224639b052cee2fc096952b65a0936e693734e8af426e4358cbb7a5fa | lipas-liikuntapaikat/lipas | analysis.clj | (ns lipas.backend.db.analysis
(:require
[hugsql.core :as hugsql]
[lipas.backend.db.utils :as utils]))
(defn marshall [entry]
(utils/->snake-case-keywords entry))
(defn unmarshall [entry]
(utils/->kebab-case-keywords entry))
(hugsql/def-db-fns "sql/analysis.sql")
| null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/daac765173647395ae90726919cc6d5ecab4bd8f/webapp/src/clj/lipas/backend/db/analysis.clj | clojure | (ns lipas.backend.db.analysis
(:require
[hugsql.core :as hugsql]
[lipas.backend.db.utils :as utils]))
(defn marshall [entry]
(utils/->snake-case-keywords entry))
(defn unmarshall [entry]
(utils/->kebab-case-keywords entry))
(hugsql/def-db-fns "sql/analysis.sql")
| |
6faf9ab9bb8bc2ab989eb220b12b5a57af07d5135743adfd45fafe63647e6347 | FreeProving/free-compiler | EtaConversionPass.hs | -- | This module contains a compiler pass that applies η-conversions to
-- expressions such that all function and constructor applications are
-- fully applied.
--
-- An η-conversion is the conversion of a partially applied function
expression to a lambda expression @\\x - > f that explicitly
-- applies t... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Pass/EtaConversionPass.hs | haskell | | This module contains a compiler pass that applies η-conversions to
expressions such that all function and constructor applications are
fully applied.
An η-conversion is the conversion of a partially applied function
applies the missing argument.
= Motivation
We have to perform η-conversions due t... | expression to a lambda expression @\\x - > f that explicitly
the translation of type @τᵢ@. However , an @n@-ary lambda abstraction of
where @g@ is the name of an @n@-ary constructor or function declaration
> f ( e₁ : : τ₁ ) … ( eₖ : : τₖ ) ( : : τ'₁ ) … ( xₙ : : τ'ₙ₋ₘ ) : : τ =
where xₙ are @n ... |
eb4e157093c922a4fb9be789244b07033ea2a14e6070a0e9d3af2bcec4b9a925 | dgiot/dgiot | hmac.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT 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... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot/src/crypto/hmac.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 ) 2020 - 2021 DGIOT 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(hmac).
-author("johnliu").
-include_lib("dgiot/include/logger.hrl").
-export([encode/3... |
f57f5cddf71e2c039c31d2cdafcc1a795daaaf001b41ffc81ed4ac8561839cfe | e-bigmoon/haskell-blog | Example01.hs | #!/usr/bin/env stack
{- stack repl --resolver lts-15.4
--package blaze-html
--package shakespeare
-}
-- Just ignore the quasiquote stuff for now, and that shamlet thing.
-- It will be explained later.
# LANGUAGE QuasiQuotes #
import Data.Char (toLower)
import Data.List ... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/ch04/Example01.hs | haskell | stack repl --resolver lts-15.4
--package blaze-html
--package shakespeare
Just ignore the quasiquote stuff for now, and that shamlet thing.
It will be explained later. | #!/usr/bin/env stack
# LANGUAGE QuasiQuotes #
import Data.Char (toLower)
import Data.List (sort)
import Text.Blaze.Html.Renderer.String (renderHtml)
import Text.Hamlet (shamlet)
data Person = Person
{ name :: St... |
e08f11d4c02be46d60b0ba6d5c34c74f8465bc353ab3a293151a7c002b6c126b | GaloisInc/saw-script | Monad.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE PatternSynonyms #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
|
Module ... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/acbf3031288828e2a3484673a57984b132b84e1d/src/SAWScript/Prover/MRSolver/Monad.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
--------------------------------------------------------------------
* MR Solver Errors
--------------------------------------------------------------------
| The context in which a failure occurred
| That's MR. Failure to you
| A local variable binding
| ... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
# LANGUAGE PatternSynonyms #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
|
Module : . Prover . . Monad
Copyright : Galois , Inc. 2022
Licen... |
8b4481d355a60e274cef58d0ddfc86db1278f1c688da56341523ade26b860419 | andrenth/sequoia | t.ml | open Sequoia_mysql
module Tables = struct
module User = struct
include (val Mysql.table "users")
let id = Field.int "id"
let name = Field.string "name"
end
module Team = struct
include (val Mysql.table "teams")
let id = Field.int "id"
let owner = Field.foreign_key "owner_id" ~references:... | null | https://raw.githubusercontent.com/andrenth/sequoia/77d1a429042213f2ff76e5d397c876bc18f4ab64/test/t.ml | ocaml | open Sequoia_mysql
module Tables = struct
module User = struct
include (val Mysql.table "users")
let id = Field.int "id"
let name = Field.string "name"
end
module Team = struct
include (val Mysql.table "teams")
let id = Field.int "id"
let owner = Field.foreign_key "owner_id" ~references:... | |
d221886ddd3545c13b251129cf9baac946eb242407322942a11a89ea37674f78 | namin/blond | sessions.scm | (load "blond.scm")
(blond)
(load "exit.bl")
(exit "good bye")
(exit "farewell!")
(blond-exit)
(blond)
(add1 (openloop "marvin"))
((delta (e r k) 41))
((lambda (x) (openloop "foo")) 0)
((delta (e r k) x))
(let ((x 1))
((delta (e r k)
(openloop "fox" r))))
x
((delta (e r k)
(meaning (car e) r k)) "hello wo... | null | https://raw.githubusercontent.com/namin/blond/456042eca4d574885a182962c88c56900b19f206/sessions.scm | scheme | (Val -> Val) * List(Val) -> List(Val) | (load "blond.scm")
(blond)
(load "exit.bl")
(exit "good bye")
(exit "farewell!")
(blond-exit)
(blond)
(add1 (openloop "marvin"))
((delta (e r k) 41))
((lambda (x) (openloop "foo")) 0)
((delta (e r k) x))
(let ((x 1))
((delta (e r k)
(openloop "fox" r))))
x
((delta (e r k)
(meaning (car e) r k)) "hello wo... |
23e313f5eccd996b9402b7f5cd6609f2a42c71870fc20605449538495162506c | bintracker/bintracker | m6502.scm | (id: m6502 endianness: little)
| null | https://raw.githubusercontent.com/bintracker/bintracker/d09e0a9315b988b2aa2f8e4d1754182b17e10a54/libmdal/mdal-targets/cpu/m6502.scm | scheme | (id: m6502 endianness: little)
| |
c7d86591b7c130f26589997312aea8dda5ec60ccced78f298c2d6040b24ec165 | clojure-interop/java-jdk | DataBindingException.clj | (ns javax.xml.bind.DataBindingException
"Exception that represents a failure in a JAXB operation.
This exception differs from JAXBException in that
this is an unchecked exception, while JAXBException
is a checked exception."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.bind DataBin... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/bind/DataBindingException.clj | clojure | (ns javax.xml.bind.DataBindingException
"Exception that represents a failure in a JAXB operation.
This exception differs from JAXBException in that
this is an unchecked exception, while JAXBException
is a checked exception."
(:refer-clojure :only [require comment defn ->])
(:import [javax.xml.bind DataBin... | |
65b6a4e140a0257681928d4e019775002c55f1e9c730afcec83e426125c1aa33 | gafiatulin/codewars | Boards.hs | Checkered Board
-- /
module Codewars.Boards where
import Data.List (unfoldr)
checkeredBoard :: Int -> Maybe String
checkeredBoard n | n < 2 = Nothing
| otherwise = Just . init . unlines . unfoldr(\rest -> if null rest then Nothing else Just (take (2*n-1) rest, drop (2*n) rest) ) . pattern $ n
... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Boards.hs | haskell | / | Checkered Board
module Codewars.Boards where
import Data.List (unfoldr)
checkeredBoard :: Int -> Maybe String
checkeredBoard n | n < 2 = Nothing
| otherwise = Just . init . unlines . unfoldr(\rest -> if null rest then Nothing else Just (take (2*n-1) rest, drop (2*n) rest) ) . pattern $ n
... |
8a3d0802e533add5dc5528eec99aa4c2f9edc1d41238a408185b3f18b66e9d1b | clojurecup2014/parade-route | clojure_xml.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/Internal/Plugins/clojure/test_clojure/clojure_xml.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
#_(ns clojure.test-clojure.clojure-xml
(:use clojure.test)
(:require [clojure.xml :as xml]))
|
37198d5776b9b0f713728d002ec216bd86ae300a0bb4cc25bdd6a7374b17f0f2 | christiankissig/ocaml99 | problem24.ml | (*# P24 (*) Lotto: Draw N different random numbers from the set 1..M.
#
# The selected numbers shall be returned in a list.
# Example:
# * (lotto-select 6 49)
# (23 1 17 33 21 37)
#
# Hint: Combine the solutions of problems P22 and P23.*)
| null | https://raw.githubusercontent.com/christiankissig/ocaml99/c25f1790f695f9dd68b23abb472dc7c860d840f8/problem24.ml | ocaml | # P24 ( | #
# The selected numbers shall be returned in a list.
# Example:
# * (lotto-select 6 49)
# (23 1 17 33 21 37)
#
# Hint: Combine the solutions of problems P22 and P23.*)
|
05d43b88dd995b77d6f2f222e149625c1e8661da42804485da55a6f188c705b8 | frank-lang/frank | Frank.hs | {-# LANGUAGE GADTs #-}
module Main where
import Parser
import Compile
import TypeCheck
import Syntax
import RefineSyntax
import DesugarSyntax
import Debug
import qualified Shonky.Semantics as Shonky
import Control.Monad
import Data.IORef
import qualified Data.Map.Strict as M
import Data.List
import System.Console.... | null | https://raw.githubusercontent.com/frank-lang/frank/1df9644b57551232fdde5a43acabaf790e86cb17/Frank.hs | haskell | # LANGUAGE GADTs #
Function checks whether or not a main function exists in the program
TODO: LC: Fix locations?
putStrLn $ "Generated computation: " ++ show comp
lift tm to top term and append to prog
tear apart again
handy for testing in ghci | module Main where
import Parser
import Compile
import TypeCheck
import Syntax
import RefineSyntax
import DesugarSyntax
import Debug
import qualified Shonky.Semantics as Shonky
import Control.Monad
import Data.IORef
import qualified Data.Map.Strict as M
import Data.List
import System.Console.CmdArgs.Explicit
import... |
6311c1a63fc2b84ce62dfb436301cea04b594ea7e6290b2dbd120d20b00b4805 | rollacaster/hiccup-d3 | sankey.cljs | (ns tech.thomas-sojka.hiccup-d3.charts.sankey
(:require ["d3" :as d3]
["d3-sankey" :as d3-sankey]
[clojure.string :as str]
[tech.thomas-sojka.hiccup-d3.utils :refer [csv->clj]])
(:require-macros [tech.thomas-sojka.hiccup-d3.macros :as m]))
(def plain
(m/build-chart
"plain"
... | null | https://raw.githubusercontent.com/rollacaster/hiccup-d3/1c124d293889793638fa65f1ab6c82b79df52b85/src/main/tech/thomas_sojka/hiccup_d3/charts/sankey.cljs | clojure | (ns tech.thomas-sojka.hiccup-d3.charts.sankey
(:require ["d3" :as d3]
["d3-sankey" :as d3-sankey]
[clojure.string :as str]
[tech.thomas-sojka.hiccup-d3.utils :refer [csv->clj]])
(:require-macros [tech.thomas-sojka.hiccup-d3.macros :as m]))
(def plain
(m/build-chart
"plain"
... | |
d9fbe524cb9a3098bd6c7c40243bbec9d68b0e325db2bb6f2c394449643a088b | juliangamble/clojure-ants-simulation | AntsApplet2.clj | (ns demo.AntsApplet2
(:import
(javax.swing JApplet))
(:gen-class
:post-init post-init
:extends javax.swing.JApplet))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are c... | null | https://raw.githubusercontent.com/juliangamble/clojure-ants-simulation/9fa218b55e52e4de1fd294a88fff48791c8279c0/src/demo/AntsApplet2.clj | clojure | ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The use and distribution terms for this software are covered by the
Common Public License 1.0 ()
which can be found in the file CPL.TXT at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this li... | (ns demo.AntsApplet2
(:import
(javax.swing JApplet))
(:gen-class
:post-init post-init
:extends javax.swing.JApplet))
Copyright ( c ) . All rights reserved .
(def dim 80)
(def nants-sqrt 7)
(def food-places 35)
(def food-range 100)
(def pher-scale 20.0)
(def food-scale 30.0)
(def evap-rate 0.... |
5b5348de9aea085bfda6127867c54aaf6209fb3978ad63c2e84fe73ecd81b3ce | Tim-ats-d/Postem-markup | args.mli | * { 1 Type }
type t =
< direct_input : string
; inputf : string
; outputf : string
; expsn : string
; output_on_stdout : bool >
(** Type representing CLI argument passed by user. *)
* { 2 API }
class args :
object
method direct_input : string
method inputf : string
method outputf : string
... | null | https://raw.githubusercontent.com/Tim-ats-d/Postem-markup/9ea9404e0803d7e76e1e8469e82516d17d2c0008/src/core/args.mli | ocaml | * Type representing CLI argument passed by user.
* Returns CLI arguments passed as type [t]. | * { 1 Type }
type t =
< direct_input : string
; inputf : string
; outputf : string
; expsn : string
; output_on_stdout : bool >
* { 2 API }
class args :
object
method direct_input : string
method inputf : string
method outputf : string
method expsn : string
method output_on_stdout : b... |
6b6a1a36907992cad11bd705e76bc8eb8be288ba0aea67979a4f69e29b0864ce | satos---jp/mincaml_self_hosting | convert.ml | open Syntax
open Nfa
let rec assoc_opt a v =
match v with
| [] -> None
| (p,q) :: xs -> if a = p then Some q else assoc_opt a xs
let str2cs s =
let ls = String.length s in
let rec f i =
if i >= ls then []
else (String.get s i) :: f (i+1)
in
f 0
let cset2cs se =
match se with
| CChar c -> [c]
|... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/src/lex/convert.ml | ocaml | nfa_compiled を吐き出すようにする | open Syntax
open Nfa
let rec assoc_opt a v =
match v with
| [] -> None
| (p,q) :: xs -> if a = p then Some q else assoc_opt a xs
let str2cs s =
let ls = String.length s in
let rec f i =
if i >= ls then []
else (String.get s i) :: f (i+1)
in
f 0
let cset2cs se =
match se with
| CChar c -> [c]
|... |
865370d81410ba92256e37c65dcc0b362e5cf295b77c1275f88b9223892bed8d | openbadgefactory/salava | routes.clj | (ns salava.oembed.routes
(:require [compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[schema.core :as s]
[salava.core.layout :as layout]
[clojure.string :as string]
[salava.oembed.core :as oembed]))
(defn route-def [ctx]
(routes
... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/oembed/routes.clj | clojure | (ns salava.oembed.routes
(:require [compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[schema.core :as s]
[salava.core.layout :as layout]
[clojure.string :as string]
[salava.oembed.core :as oembed]))
(defn route-def [ctx]
(routes
... | |
5ea40450eb923a0fba9aa439466ca192a5ef30e63044e8b901e597707cddd4b9 | kmi/irs | rdfs.lisp | Mode : Lisp ; Package :
(in-package "OCML")
(in-ontology RDFS)
Automatically translated from RDF file " FREAKY : RDF - FILES;rdfs.rdf "
at 19:13:5 , on 6/6/2003
(def-class RESOURCE ()
((Value )
(Is-Defined-By
:type resource)
(See-Also
:type resource)
(Label
:type literal)
(Comment
:type literal)
))
(def-cl... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/rdfs/rdfs.lisp | lisp | Package : |
(in-package "OCML")
(in-ontology RDFS)
Automatically translated from RDF file " FREAKY : RDF - FILES;rdfs.rdf "
at 19:13:5 , on 6/6/2003
(def-class RESOURCE ()
((Value )
(Is-Defined-By
:type resource)
(See-Also
:type resource)
(Label
:type literal)
(Comment
:type literal)
))
(def-class LITERAL ()
())
(def-c... |
d44e02a60c2ff849217f29fb2a10b5fa36e1ea743f2faa57f68a0fa8ee694eac | nasa/PRECiSA | ShowRationalTest.hs | -- Notices:
--
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
-- Disclaimers
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTOR... | null | https://raw.githubusercontent.com/nasa/PRECiSA/4f72e50d75528ce81cf0858ca9bf58b352e4f4b9/PRECiSA/tests/Common/ShowRationalTest.hs | haskell | Notices:
Disclaimers | Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMITE... |
34482438ea84a160777afc1420b6d1bab38e53d0931fdad08838ba0fe2c3fd96 | rpav/spell-and-dagger | simple.lisp | (in-package :game)
;; simple-entity
(defclass simple-entity (entity)
((box :initform nil)))
(defmethod initialize-instance :after ((e simple-entity) &key &allow-other-keys)
(with-slots (box) e
(setf box (cons (entity-pos e) (entity-size e)))))
(defmethod entity-box ((e simple-entity)) (slot-value e 'box))... | null | https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/entity/simple.lisp | lisp | simple-entity
simple-text
simple-blocker
link
map-link | (in-package :game)
(defclass simple-entity (entity)
((box :initform nil)))
(defmethod initialize-instance :after ((e simple-entity) &key &allow-other-keys)
(with-slots (box) e
(setf box (cons (entity-pos e) (entity-size e)))))
(defmethod entity-box ((e simple-entity)) (slot-value e 'box))
(defclass simple... |
b7bafff14fa15b6caabc3b28c49fab667d46933bb7351b199bb8b1af7fd3663f | mbj/stratosphere | Output.hs | -- | See:
-section-structure.html
--
-- The optional Outputs section declares output values that you want to view
-- from the AWS CloudFormation console or that you want to return in response
to describe stack calls . For example , you can output the Amazon S3 bucket
-- name for a stack so that you can easily find ... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/src/Stratosphere/Output.hs | haskell | | See:
The optional Outputs section declares output values that you want to view
from the AWS CloudFormation console or that you want to return in response
name for a stack so that you can easily find it.
| See 'mkOutput' for a convenient constructor.
^ An identifier for this output. The logical ID must be alpha... | -section-structure.html
to describe stack calls . For example , you can output the Amazon S3 bucket
module Stratosphere.Output
( Output(..)
, OutputExport(..)
, Outputs(..)
, mkOutput
)
where
import GHC.Exts (IsList(..))
import Stratosphere.NamedItem
import Stratosphere.Prelude
import Stratosphere.Prope... |
848b466efde6dddd1b0a1b5b4559480eef71ff403aa3946b7d4fbb1c596da6d0 | stackbuilders/octohat | Options.hs | module Web.GitHub.CLI.Options ( TeamOptions(..)
, TeamCommand(..)
, teamOptions) where
import Options.Applicative
type OrganizationName = String
type Username = String
type TeamName = String
data TeamCommand = ListTeams OrganizationName
| L... | null | https://raw.githubusercontent.com/stackbuilders/octohat/d8d492497183976e800d02280f9ef619f9cdbef8/src-demo/Web/GitHub/CLI/Options.hs | haskell | module Web.GitHub.CLI.Options ( TeamOptions(..)
, TeamCommand(..)
, teamOptions) where
import Options.Applicative
type OrganizationName = String
type Username = String
type TeamName = String
data TeamCommand = ListTeams OrganizationName
| L... | |
bfc614c04b2689560f95b8bb721bad08400ccfd6950027dc99c1d5d6f4b4d715 | facebook/flow | persistentConnection.mli |
* 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/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/monitor/connections/persistentConnection.mli | 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... | |
513b67ed9ad17eb909f143f88eb661e2ea9e152d5ed8dfd09ef04eea967af506 | Soostone/katip | Time.hs | # LANGUAGE CPP #
-- | Time and memory efficient time encoding helper functions.
module Katip.Format.Time
( formatAsLogTime,
formatAsIso8601,
)
where
import Control.Monad.ST (ST)
import Data.Int (Int64)
import Data.Text (Text)
import qualified Data.Text.Array as TA
import Data.Text.Internal (Text (..))
import ... | null | https://raw.githubusercontent.com/Soostone/katip/e6fe880c23702ca6841d8d740d2bf758ce3bed2c/katip/src/Katip/Format/Time.hs | haskell | | Time and memory efficient time encoding helper functions.
Note: All functions here are optimized to never allocate anything
seem to be needed.
| Format 'UTCTime' into a short human readable format.
space
on sub-second precision. If this is an issue, make a copy with a
'Data.Text.copy'.
T
Z
| Writes t... | # LANGUAGE CPP #
module Katip.Format.Time
( formatAsLogTime,
formatAsIso8601,
)
where
import Control.Monad.ST (ST)
import Data.Int (Int64)
import Data.Text (Text)
import qualified Data.Text.Array as TA
import Data.Text.Internal (Text (..))
import Data.Time (Day, DiffTime, UTCTime (..), toGregorian)
import Dat... |
c05994f377b070948862c36881cd8d620a52c8517a2feda8cb8b741d87ce46c3 | racketscript/racketscript | __import-shift.rkt | #lang racket
(require "private/bindings-phase-provide-same.rkt")
(foo)
(begin-for-syntax
(require racket)
(begin-for-syntax
(foo))
(foo))
| null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/modules/__import-shift.rkt | racket | #lang racket
(require "private/bindings-phase-provide-same.rkt")
(foo)
(begin-for-syntax
(require racket)
(begin-for-syntax
(foo))
(foo))
| |
f1be5cb4bf73689822b8f4baa972cf7583ad2910e3e5ffa550f5baec6dba3794 | plumatic/grab-bag | deploy.clj | (ns test-service.deploy
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.graph :as graph]
[plumbing.logging :as log]
[plumbing.parallel :as parallel]
[plumbing.streaming-map :as streaming-map]
[store.bucket :as bucket]
[web.fnhouse :as fnhouse]
[web.pubsub :as pubsub]
[service... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/test-service/src/test_service/deploy.clj | clojure | (ns test-service.deploy
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.graph :as graph]
[plumbing.logging :as log]
[plumbing.parallel :as parallel]
[plumbing.streaming-map :as streaming-map]
[store.bucket :as bucket]
[web.fnhouse :as fnhouse]
[web.pubsub :as pubsub]
[service... | |
4e0d3f6846708b28825891729df5ae3b019ca40b24933a10c06df2e51a4fd186 | nubank/midje-nrepl | format_test.clj | (ns midje-nrepl.middleware.format-test
(:require [matcher-combinators.midje :refer [match]]
[midje-nrepl.formatter :as formatter]
[midje-nrepl.middleware.format :as format]
[midje.sweet :refer :all]
[nrepl.transport :as transport]))
(def basic-tabular "(tabular (fact (... | null | https://raw.githubusercontent.com/nubank/midje-nrepl/b4d505f346114db88ad5b5c6b3c8f0af4e0136fc/test/midje_nrepl/middleware/format_test.clj | clojure | (ns midje-nrepl.middleware.format-test
(:require [matcher-combinators.midje :refer [match]]
[midje-nrepl.formatter :as formatter]
[midje-nrepl.middleware.format :as format]
[midje.sweet :refer :all]
[nrepl.transport :as transport]))
(def basic-tabular "(tabular (fact (... | |
e80abb8b6959294830bded3da219933cc3f3ad7f18438b5c4d8c2ebc6f6698c7 | themattchan/lamb | Parser.hs | # LANGUAGE TypeApplications , ScopedTypeVariables , ExistentialQuantification #
module Language.Lamb.Parser
-- ( parse
-- , parseFile
-- )
where
import Control.Monad (void)
import Control.Monad.State.Strict
import Data.Either
import Data.List
import qualified Data.List.No... | null | https://raw.githubusercontent.com/themattchan/lamb/26d7e0176ab642fe47d3f000f2f3c4e48519e669/lib/Language/Lamb/Parser.hs | haskell | ( parse
, parseFile
)
do name check in renamer.
{ scopedIdents :: S.Set String
}
<>show p'
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-----------------------------------------------------------... | # LANGUAGE TypeApplications , ScopedTypeVariables , ExistentialQuantification #
module Language.Lamb.Parser
where
import Control.Monad (void)
import Control.Monad.State.Strict
import Data.Either
import Data.List
import qualified Data.List.NonEmpty as NE
import qualified Data.Se... |
f781045499c20e7264dfe9cb08674b3281ac288f424d030751cc712bfe78a58c | argp/bap | batStream.mli |
* Stream - streams and stream parsers
* Copyright ( C ) 1997
* 2007
* 2008
*
* 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 ;... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batStream.mli | ocaml | * The type of streams holding values of type ['a].
* Return the stream holding the elements of the list in the same
order.
* Return the stream of the characters of the string parameter.
* Return the stream of the characters read from the input channel.
* [Stream.iter f s] scans the whole stream s, applying func... |
* Stream - streams and stream parsers
* Copyright ( C ) 1997
* 2007
* 2008
*
* 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 ;... |
21474aaf4ae2bf40953a7bf1c56c3eb09ae57d00a2dadc47fd3aa6070304387c | mirage/ocaml-9p | protocol_9p_info.ml |
* Copyright ( C ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-9p/b72ccf01d3c8d7942e7ba8daefda08bf08c902b1/lib/protocol_9p_info.ml | ocaml |
* Copyright ( C ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
76e0e3c830e1fcca9d18e19f7d11330bcac0c7e5db43b4bf9001df89eded34eb | alephcloud/hs-configuration-tools | Operators.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
-- |
-- Module: Configuration.Utils.Operators
-- Description: Useful operators for defining functions in an applicative context
Copyright : Copyright © 2015 PivotCloud , Inc.
License : MIT
Maintainer : < >
-- Stability: experimental
... | null | https://raw.githubusercontent.com/alephcloud/hs-configuration-tools/987cc513206b76ad9e7426c33713a659d28229ae/src/Configuration/Utils/Operators.hs | haskell | |
Module: Configuration.Utils.Operators
Description: Useful operators for defining functions in an applicative context
Stability: experimental
Useful operators for defining functions in an applicative context
-------------------------------------------------------------------------- --
Useful Operators
| This... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
Copyright : Copyright © 2015 PivotCloud , Inc.
License : MIT
Maintainer : < >
module Configuration.Utils.Operators
( (%)
, (×)
, (<*<)
, (>*>)
, (<$<)
, (>$>)
) where
(%) ∷ (a → b) → a → b
(%) = ($)
infixr 5 %
| This operator is... |
83d78751b730a0481794ca658247390de8760c956e73e5cc3e510fa1e952e0be | vollcheck/aoc | day04.clj | (ns y22.day04
(:require [clojure.string :as str]
[core :refer [load-input]]))
(defn sub? [line]
(let [[f s] (str/split line #",")
[fstart fend] (str/split f #"-")
[sstart send] (str/split s #"-")
[fstart fend sstart send] (map parse-long [fstart fend sstart send])]
(or
... | null | https://raw.githubusercontent.com/vollcheck/aoc/70a46a938ddaf280812f2025ee1b6336d076c545/src/y22/day04.clj | clojure | (ns y22.day04
(:require [clojure.string :as str]
[core :refer [load-input]]))
(defn sub? [line]
(let [[f s] (str/split line #",")
[fstart fend] (str/split f #"-")
[sstart send] (str/split s #"-")
[fstart fend sstart send] (map parse-long [fstart fend sstart send])]
(or
... | |
424b1c006ee4bfc93e61c6c5df585bd1ac33279b6a44338f1c8d74f0d898e4b3 | BinaryAnalysisPlatform/bap | bap_primus_pos.mli | open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
type nil = Nil
type top = program
type ('a,'b) level = {
me : 'a term;
up : 'b;
}
type level3 = (top,nil) level
type level2 = (sub,level3) level
type 'a level1 = ('a,level2) level
type 'a level0 = ('a,blk level1) level
type t =
| Top of level3
| ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_primus/bap_primus_pos.mli | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open Monads.Std
type nil = Nil
type top = program
type ('a,'b) level = {
me : 'a term;
up : 'b;
}
type level3 = (top,nil) level
type level2 = (sub,level3) level
type 'a level1 = ('a,level2) level
type 'a level0 = ('a,blk level1) level
type t =
| Top of level3
| ... | |
960702e836e26c10c131eefce071c2d15bce5d242b5a40a5b039fd3519c8260a | 15Galan/asignatura-204 | BST.hs | -------------------------------------------------------------------------------
-- Binary Search Trees
--
Data Structures . en Informática . UMA .
, 2011
-------------------------------------------------------------------------------
module DataStructures.SearchTree.BST
( BST
, empty
, isEmpty
, size
... | null | https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/DataStructures/SearchTree/BST.hs | haskell | -----------------------------------------------------------------------------
Binary Search Trees
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Size
----------------------------------------------------------... | Data Structures . en Informática . UMA .
, 2011
module DataStructures.SearchTree.BST
( BST
, empty
, isEmpty
, size
, insert
, search
, isElem
, delete
, updateOrInsert
, inOrder
, preOrder
, postOrder
, foldInOrder
, foldPreOrder
, foldPostOrder
, minim
, maxim
, deleteMi... |
063f1796089bcbfbb6827ba1fc87178c770747b6334758b3165e4a973f7c954b | AkronCodeClub/edX-FP101x-Oct-2014 | A.hs | import Control.Parallel
main = a `par` b `par` c `pseq` print (a + b + c)
where
a = ack 3 10
b = fac 42
c = fib 34
fac 0 = 1
fac n = n * fac(n-1)
ack 0 n = n + 1
ack m 0 = ack (m-1) 1
ack m n = ack (m-1) (ack m (n-1))
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
| null | https://raw.githubusercontent.com/AkronCodeClub/edX-FP101x-Oct-2014/7db691d795126ad912256fec29b5aa1817beb8c0/phil_r/A.hs | haskell | import Control.Parallel
main = a `par` b `par` c `pseq` print (a + b + c)
where
a = ack 3 10
b = fac 42
c = fib 34
fac 0 = 1
fac n = n * fac(n-1)
ack 0 n = n + 1
ack m 0 = ack (m-1) 1
ack m n = ack (m-1) (ack m (n-1))
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
| |
8280b84069ab0dd9c19860185a6d78c18c29ed3e030fb24e0e90f8f00a017408 | ocaml-ppx/ppx_import-backup | build.ml | #!/usr/bin/env ocaml
#directory "pkg"
#use "topkg.ml"
let ocamlbuild =
"ocamlbuild -use-ocamlfind -classic-display -plugin-tag 'package(cppo_ocamlbuild)'"
let () =
Pkg.describe "ppx_import" ~builder:(`Other (ocamlbuild, "_build")) [
Pkg.lib "pkg/META";
Pkg.libexec ~auto:true "src/ppx_import";
Pkg.doc ... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_import-backup/6362bc6259bd1a21f620a32d51ebe4653e96b93a/pkg/build.ml | ocaml | #!/usr/bin/env ocaml
#directory "pkg"
#use "topkg.ml"
let ocamlbuild =
"ocamlbuild -use-ocamlfind -classic-display -plugin-tag 'package(cppo_ocamlbuild)'"
let () =
Pkg.describe "ppx_import" ~builder:(`Other (ocamlbuild, "_build")) [
Pkg.lib "pkg/META";
Pkg.libexec ~auto:true "src/ppx_import";
Pkg.doc ... | |
04b856f82c3b7620e7cec6896d25e202e95c6d51e0351d365c09b2d98da82d9d | commercialhaskell/stack | Main.hs | import StackTest
main :: IO ()
main = do
stack ["build", "async"]
stackErr ["build", "zlib-bindings"]
stack ["build", "--stack-yaml", "stack-modify-lts.yaml", "async"]
stack ["build", "--stack-yaml", "stack-local-snapshot.yaml", "async"]
stack ["build", "--stack-yaml", "stack-remote-snaps... | null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/1265-extensible-snapshots/Main.hs | haskell | import StackTest
main :: IO ()
main = do
stack ["build", "async"]
stackErr ["build", "zlib-bindings"]
stack ["build", "--stack-yaml", "stack-modify-lts.yaml", "async"]
stack ["build", "--stack-yaml", "stack-local-snapshot.yaml", "async"]
stack ["build", "--stack-yaml", "stack-remote-snaps... | |
4ddf0f3bac5020cd6ec6b9dff186420778339dbccc5ac21e90176eb876c78a2c | ocsigen/ocaml-eliom | exhaustiveness.ml | (* Warn about all relevant cases when possible *)
let f = function
None, None -> 1
| Some _, Some _ -> 2;;
(* Exhaustiveness check is very slow *)
type _ t =
A : int t | B : bool t | C : char t | D : float t
type (_,_,_,_) u = U : (int, int, int, int) u
type v = E | F | G
;;
let f : type a b c d e f g.
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/typing-warnings/exhaustiveness.ml | ocaml | Warn about all relevant cases when possible
Exhaustiveness check is very slow
| _ -> _
Unused cases
warn
warn?
warn
warn
Example with record, type, single case
Examples from ML2015 paper
Empty match
ok
trefis in PR#6437
error
error
error
do not warn
#7059, all clauses guarded | let f = function
None, None -> 1
| Some _, Some _ -> 2;;
type _ t =
A : int t | B : bool t | C : char t | D : float t
type (_,_,_,_) u = U : (int, int, int, int) u
type v = E | F | G
;;
let f : type a b c d e f g.
a t * b t * c t * d t * e t * f t * g t * v
* (a,b,c,d) u * (e,f,g,g) u -> int =
f... |
6851c6f8d7a0132339a3ffe42e46786d330a29cafe349d07a8619be6ae6aac13 | dwayne/eopl3 | interpreter.rkt | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(require "./store.rkt")
(provide
;; Expressed Values
num-val bool-val
;; Interpreter
run)
(define (run s)
(initialize-store!)
(let ([init-env (extend-env
'i (newref (num-val 1))
(extend-env
'... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/IMPLICIT-REFS-4.35/interpreter.rkt | racket | Expressed Values
Interpreter
Procedure ADT
Values
ExpVal = Int + Bool + Proc + Ref(ExpVal) | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(require "./store.rkt")
(provide
num-val bool-val
run)
(define (run s)
(initialize-store!)
(let ([init-env (extend-env
'i (newref (num-val 1))
(extend-env
'v (newref (num-val 5))
... |
0ece24567c8e36ecfcb4b168d7ee8bed664e3713fbe23caeb2817c5b4321438c | mzp/websocket-ocaml | frameTest.ml | open Base
open OUnit
open Frame
let _ = begin "frame.ml" >::: [
"Textフレームの読み込み" >:: begin fun () ->
assert_equal (Text "hoge") @@ unpack (Stream.of_string "\x00hoge\xFF")
end;
"Textフレームの書き込み" >:: begin fun () ->
assert_equal "\x00hoge\xFF" @@ Frame.pack (Text "hoge")
end
] end +> run_test_tt_main
| null | https://raw.githubusercontent.com/mzp/websocket-ocaml/b584bd20dfe6d95f65bc6e1ba8838b1ecfa8ec0e/webSocket/frameTest.ml | ocaml | open Base
open OUnit
open Frame
let _ = begin "frame.ml" >::: [
"Textフレームの読み込み" >:: begin fun () ->
assert_equal (Text "hoge") @@ unpack (Stream.of_string "\x00hoge\xFF")
end;
"Textフレームの書き込み" >:: begin fun () ->
assert_equal "\x00hoge\xFF" @@ Frame.pack (Text "hoge")
end
] end +> run_test_tt_main
| |
636dd406f9c45c2622e83f7f1c1f97b4944e4c1c28b3fb9170072b963a2504b0 | iamFIREcracker/adventofcode | day15.lisp | (defpackage :aoc/2015/15 #.cl-user::*aoc-use*)
(in-package :aoc/2015/15)
(defun parse-properties (string)
(mapcar #'parse-integer (cl-ppcre:all-matches-as-strings "-?\\d+" string)))
(defun calories (props) (nth 4 props))
(defun parse-ingredient (string)
(cl-ppcre:register-groups-bind (name (#'parse-properties pro... | null | https://raw.githubusercontent.com/iamFIREcracker/adventofcode/ec66765d57e0ddcfd585640f533b863b23239bb4/src/2015/day15.lisp | lisp | (defpackage :aoc/2015/15 #.cl-user::*aoc-use*)
(in-package :aoc/2015/15)
(defun parse-properties (string)
(mapcar #'parse-integer (cl-ppcre:all-matches-as-strings "-?\\d+" string)))
(defun calories (props) (nth 4 props))
(defun parse-ingredient (string)
(cl-ppcre:register-groups-bind (name (#'parse-properties pro... | |
4b9f3bfd1d9a1751a7181b2150a2898f03b2609f5f3946851c56a505b82096fa | zwizwa/rai | brute.rkt | #lang s-exp rai/stream
(require rai/stream-lib
rai/synth-lib)
(provide (all-defined-out))
(define main-nsi 0)
(define main-tc '())
Bought a microbrute early this week . Lovin' it , so using some of
;; that fresh romance to see if I can get this thing here booted up
;; again. It all feels too heavyweight:... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/brute.rkt | racket | that fresh romance to see if I can get this thing here booted up
again. It all feels too heavyweight: there's no way to get into
What I'n curious about:
- Will virtual analog get as dirty as the brute?
- How to properly tweak envelopes?
- How to turn synth building into a discipline?
- Why is the trim so ha... | #lang s-exp rai/stream
(require rai/stream-lib
rai/synth-lib)
(provide (all-defined-out))
(define main-nsi 0)
(define main-tc '())
Bought a microbrute early this week . Lovin' it , so using some of
this without thinking hard .. That 's OK for fresh coffeed daytime
hacking , but nighttime tweaking do... |
235554242626f1118532b45f3ce9412f50d58aed68db13d03a76b841b9222b92 | calyau/maxima | grind.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/src/grind.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
in the printed... |
(in-package :maxima)
(macsyma-module grind)
(declare-top (special lop rop *grind-charlist* chrps $aliases linel))
(defun chrct* () (- linel chrps))
(defmspec $grind (x)
(setq x (cdr x))
(let (($lispdisp t) y)
(fresh-line)
(cond
((null x))
((cdr x) (mapc #'(lambda (xx) (funcall (get '$grind ... |
d90a6c2e7c3799451441cc6fd0a4ef5b0b56a39621834cb363db2a5f343f1dda | robert-strandh/SICL | bag-equal.lisp | (cl:in-package #:cleavir-type-inference)
Return true if and only if two BAGs contain the same RESTRICTIONs .
;;; We do not have to be completely general because we know that the
two bags have the same LOCATIONs in them . They may differ only in
;;; the TYPE-DESCRIPTORs of some of the RESTRICTIONs. Therefore, it... | null | https://raw.githubusercontent.com/robert-strandh/SICL/c041bf8d5f6e42441142a6742f7d13a2904d83b5/Code/Cleavir/Type-inference/bag-equal.lisp | lisp | We do not have to be completely general because we know that the
the TYPE-DESCRIPTORs of some of the RESTRICTIONs. Therefore, it
suffices to check that every restriction in one of the bags is
also present in the other bag. | (cl:in-package #:cleavir-type-inference)
Return true if and only if two BAGs contain the same RESTRICTIONs .
two bags have the same LOCATIONs in them . They may differ only in
(defun bag-equal (bag1 bag2)
(loop for restriction in bag1
always (member restriction bag2 :test #'equal)))
|
518a2405cd30e82891db8c0c84db69bf5df250a449247afef8c9a8b78a9f535e | ryanpbrewster/haskell | P181Test.hs | module Problems.P181Test
( case_181_main
) where
import Problems.P181
import Test.Tasty.Discover (Assertion, (@?=))
case_181_main :: Assertion
case_181_main = solve @?= "233168"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P181Test.hs | haskell | module Problems.P181Test
( case_181_main
) where
import Problems.P181
import Test.Tasty.Discover (Assertion, (@?=))
case_181_main :: Assertion
case_181_main = solve @?= "233168"
| |
59dade4daa3ede4f5bc35ef424fb068be2bc05d2d5277756b9a58470c48c16bb | gsdlab/clafer | Css.hs | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2012 < >
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 ... | null | https://raw.githubusercontent.com/gsdlab/clafer/a30a645ae1e4fc793851e53446d220924038873a/src/Language/Clafer/Css.hs | haskell | # LANGUAGE TemplateHaskell #
Copyright ( C ) 2012 < >
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 ... | |
bb7239fa07322a0cd0b61db25a275c044cd1db2a7c36f129d8726a414b06a5c5 | soulomoon/SICP | Exercise5.43.scm | Exercise 5.43 : We argued in 4.1.6 that internal definitions for block structure should not be considered “ real ” defines . Rather , a procedure body should be interpreted as if the internal variables being defined were installed as ordinary lambda variables initialized to their correct values using set ! . 4.1.6 and ... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter5/Exercise5.43.scm | scheme | make-compiled-procedure is just a way to combine the entry with he environment,
so we look at compile-lambda, the only places we need to make a procedure in compilation (when define need to make a procedure it just turn its body into lambda)
here we can see compile-lambda-body is the actually place where is make proced... | Exercise 5.43 : We argued in 4.1.6 that internal definitions for block structure should not be considered “ real ” defines . Rather , a procedure body should be interpreted as if the internal variables being defined were installed as ordinary lambda variables initialized to their correct values using set ! . 4.1.6 and ... |
d4b618b6bf72224f38ad97f8c8461bee94c94aaa01faaed54081aeb4cae3738e | acl2/acl2 | idioms@useless-runes.lsp | (GETBIT-BECOMES-SHIFT-OF-MASK
(8272 8 (:REWRITE BVAND-WITH-MASK-BETTER))
(8256 8 (:DEFINITION LOGMASKP))
(4880 80 (:REWRITE <-OF-EXPT-2-AND-CONSTANT))
(4496 56 (:REWRITE SLICE-TOO-HIGH-IS-0))
(4288 24 (:REWRITE EQUAL-OF-+-WHEN-NEGATIVE-CONSTANT))
(3899 59 (:REWRITE SLICE-TOO-HIGH-LEMMA))
(3897 57 (:REWRITE UNSIG... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/bv/.sys/idioms%40useless-runes.lsp | lisp | (GETBIT-BECOMES-SHIFT-OF-MASK
(8272 8 (:REWRITE BVAND-WITH-MASK-BETTER))
(8256 8 (:DEFINITION LOGMASKP))
(4880 80 (:REWRITE <-OF-EXPT-2-AND-CONSTANT))
(4496 56 (:REWRITE SLICE-TOO-HIGH-IS-0))
(4288 24 (:REWRITE EQUAL-OF-+-WHEN-NEGATIVE-CONSTANT))
(3899 59 (:REWRITE SLICE-TOO-HIGH-LEMMA))
(3897 57 (:REWRITE UNSIG... | |
4c42bcad6cd48cf075cfe2fb7eb829192514e741e73fe0eec239f75fcb11e388 | mmottl/gsl-ocaml | integration.mli | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
(** Numerical Integration *)
open Fun
external qng :
gsl_fun -> a:float -> b:float ->
epsabs:float -> epsrel:float -> float ... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/integration.mli | ocaml | * Numerical Integration | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
open Fun
external qng :
gsl_fun -> a:float -> b:float ->
epsabs:float -> epsrel:float -> float * float * int
= "ml_gsl_int... |
fb95f41a28babb7b69c6d7fc5b8d35e494d64810f916893df5757f79ad629f78 | aspiwack/porcupine | Foldl.hs | {-# LANGUAGE Arrows #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -fno - warn - orphans #
| This module implements a Foldl - based interface for arrow computatio... | null | https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-core/src/System/TaskPipeline/Repetition/Foldl.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
compatible with the < foldl
library>. Use 'generalizeA' and 'generalizeM' to convert folds to
(list, array, stream, etc.).
This API is still experimental and might be subject to changes in the futur... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
| This module implements a Foldl - based interface for arrow computations
' FoldA ' . This is the most general way to repeat a ' PTask ' over some an input
module System.TaskPipeline.Repetition.Fol... |
316d30542325e30a693e00adafbeff961caa967e41f0a9fa82a7c957087874bb | hanshuebner/bknr-web | imageproc-handler.lisp | (in-package :bknr.images)
(enable-interpol-syntax)
(defvar *imageproc-operations* (make-hash-table))
(defun register-imageproc-operation (name function)
(setf (gethash (make-keyword-from-string (symbol-name name)) *imageproc-operations*) function))
(defmacro define-imageproc-handler (name (&rest arguments) &body ... | null | https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/src/images/imageproc-handler.lisp | lisp | (in-package :bknr.images)
(enable-interpol-syntax)
(defvar *imageproc-operations* (make-hash-table))
(defun register-imageproc-operation (name function)
(setf (gethash (make-keyword-from-string (symbol-name name)) *imageproc-operations*) function))
(defmacro define-imageproc-handler (name (&rest arguments) &body ... | |
be8834fb3493306378e0b44cdd0fa6984667e1c445e62b3110874f153b8b1882 | duelinmarkers/clj-record | query.clj | (ns clj-record.query
"Functions for use in specifying condition maps."
(:require [clojure.string :as string]))
(defn- operator-fn
([operator-format values] (operator-fn operator-format values nil))
([operator-format values join-with]
(if (some nil? values) (throw (IllegalArgumentException. "A query argume... | null | https://raw.githubusercontent.com/duelinmarkers/clj-record/2dd5b9a1fcb8828565acfdf9919330bf4b5dbfaa/src/clj_record/query.clj | clojure | Do we really want this? | (ns clj-record.query
"Functions for use in specifying condition maps."
(:require [clojure.string :as string]))
(defn- operator-fn
([operator-format values] (operator-fn operator-format values nil))
([operator-format values join-with]
(fn [attribute]
(let [clause-params-vector
(reduce (... |
9a5e5ed9c7f0ae092ebfa15c9cfb52c5277c076591ecf25c82033e2cfa6283bd | lisp-mirror/cl-tar | utils.lisp | ;;;; This is part of cl-tar. See README.md and LICENSE for more information.
(in-package #:tar-common-extract)
(defun pathname-coalesce-backs-1 (components)
(loop
:for component := (pop components)
:if (and (eql component :back)
(stringp (first components)))
:do (pop components)
:else... | null | https://raw.githubusercontent.com/lisp-mirror/cl-tar/b25b03cd47b4b4b308546e346b2c9ec2718f358f/src/common-extract/utils.lisp | lisp | This is part of cl-tar. See README.md and LICENSE for more information. |
(in-package #:tar-common-extract)
(defun pathname-coalesce-backs-1 (components)
(loop
:for component := (pop components)
:if (and (eql component :back)
(stringp (first components)))
:do (pop components)
:else :collect component
:until (member component '(:absolute :relative))))
(... |
b6de64f5a1f9f45f3eafe96df844f9337a6dab0679380abfe651e5214eb6433d | zcaudate/hara | deploy.clj | (ns hara.deploy
(:require [hara.deploy.main :as main]
[hara.deploy.analyser :as analyser]
[hara.io.project :as project]
[hara.function :refer [definvoke]]
[hara.function.task :as task]
[hara.lib.aether :as aether]))
(defonce +main+
{:construct {:input ... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/deploy.clj | clojure | (ns hara.deploy
(:require [hara.deploy.main :as main]
[hara.deploy.analyser :as analyser]
[hara.io.project :as project]
[hara.function :refer [definvoke]]
[hara.function.task :as task]
[hara.lib.aether :as aether]))
(defonce +main+
{:construct {:input ... | |
17f04315935eda66d4d7d3ed7bc4f00ce86c5953391b492b28cf9a47cbdc115a | merijn/Belewitte | V2.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableIn... | null | https://raw.githubusercontent.com/merijn/Belewitte/cab6010a2bc54acfc4f4b169c95799fe455799ef/benchmark-analysis/src/Schema/Platform/V2.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Schema... |
f35aef792b81b760834944241ad52ac8aded7752cb8fe7de4ad612fec2fde013 | exercism/haskell | CryptoSquare.hs | module CryptoSquare (encode) where
encode :: String -> String
encode xs = error "You need to implement this function."
| null | https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/crypto-square/src/CryptoSquare.hs | haskell | module CryptoSquare (encode) where
encode :: String -> String
encode xs = error "You need to implement this function."
| |
082d8b5ec2251374f853c0dc64ef1a254107b84318091b9642e09b3b9b7cdb33 | cloojure/tupelo | prng.clj | (ns tst.tupelo.cuid.prng
(:use tupelo.cuid.prng
tupelo.core
tupelo.test)
(:require
[com.climate.claypoole :as cp]
[criterium.core :as crit]
[schema.core :as s]
[tupelo.math :as math]
[tupelo.profile :as prof]
[tupelo.schema :as tsk]
))
(set! *warn-on-reflection* true)
... | null | https://raw.githubusercontent.com/cloojure/tupelo/fb195db978361c6045e1cbbd7a81496b66d69c70/test/clj/tst/tupelo/cuid/prng.clj | clojure | ensure s/validate does what we want
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
***** ENABLE TO SEE PRINTOUT *****
arg must be in slice 0..(dec N-max)
sample output
Fast coverage tests
all vals present
... | (ns tst.tupelo.cuid.prng
(:use tupelo.cuid.prng
tupelo.core
tupelo.test)
(:require
[com.climate.claypoole :as cp]
[criterium.core :as crit]
[schema.core :as s]
[tupelo.math :as math]
[tupelo.profile :as prof]
[tupelo.schema :as tsk]
))
(set! *warn-on-reflection* true)
... |
36cb84d955463b05870261468401e5b2eb699879e00fd1d6b7ab3436f7daede2 | iu-parfunc/lvars | Main.hs | # LANGUAGE CPP , ScopedTypeVariables #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
import Data.Set as Set
import Utils
import Data.LVar.Graph.BFS
import Data.LVar.Graph.MIS
-- Benchmark utils:
-- import PBBS.FileReader
import Data.PBBS.Timing (wait_clocks, ru... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish-graph-algorithms/src/Main.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
Benchmark utils:
import PBBS.FileReader
define DEBUG_CHECKS
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------------------------------------------------... | # LANGUAGE CPP , ScopedTypeVariables #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
import Data.Set as Set
import Utils
import Data.LVar.Graph.BFS
import Data.LVar.Graph.MIS
import Data.PBBS.Timing (wait_clocks, runAndReport)
calibrate , measureFreq , commaint ,
import Control.LVish
import Control.LVish.Int... |
c791fa6e94043e0caea2a8eb4de2b0efe8e09428e87441ea1d31cf71c2824711 | NorfairKing/the-notes | Terms.hs | module Cryptography.Terms where
import Notes
import Cryptography.SymmetricCryptography.Terms
makeDefs
[ "algorithm"
, "trapdoor one-way permutation"
, "TWOP"
, "trapdoor generator"
, "trapdoor function"
, "trapdoor"
, "RSA"
, "digital signature scheme"
, "DS... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Cryptography/Terms.hs | haskell | module Cryptography.Terms where
import Notes
import Cryptography.SymmetricCryptography.Terms
makeDefs
[ "algorithm"
, "trapdoor one-way permutation"
, "TWOP"
, "trapdoor generator"
, "trapdoor function"
, "trapdoor"
, "RSA"
, "digital signature scheme"
, "DS... | |
d7f48f0ef3d3502c33d7803ea2df7c1636816c7bcd539f4a827b6accf1e8ddf4 | well-typed-lightbulbs/ocaml-esp32 | odoc_str.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/ocamldoc/odoc_str.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Name = Odoc_name
let () = Printtyp.Naming_context.enable false
let string_of_variance t (co,cn) =
... |
a1d85df1f1cce2fcff993a8ca321d95b90a4c65da9055966f6652bcc660f3514 | egri-nagy/kigen | perm.clj | ;;permutations
(ns kigen.perm
(:require [kigen.pbr :as pbr]
[kigen.transf-pbr :refer [binrel-transf?]]))
pbr is a permutation if images of elements of the domain yield the codomain
(defn binrel-perm?
[pbr]
(and (binrel-transf? pbr)
(= (:cod pbr) (reduce into #{} (for [key (:dom pbr)] (pbr key... | null | https://raw.githubusercontent.com/egri-nagy/kigen/5248499fab9d8af05d7d0b07626d0676dfe580c9/src/kigen/perm.clj | clojure | permutations |
(ns kigen.perm
(:require [kigen.pbr :as pbr]
[kigen.transf-pbr :refer [binrel-transf?]]))
pbr is a permutation if images of elements of the domain yield the codomain
(defn binrel-perm?
[pbr]
(and (binrel-transf? pbr)
(= (:cod pbr) (reduce into #{} (for [key (:dom pbr)] (pbr key))))))
(defn c... |
b50c7974ad68efc4b2525c372180923a10bca5b3b104b6b6bf6c9f81efafbed5 | jeluard/lucuma | runner.cljs | (ns lucuma.runner
(:require [doo.runner :refer-macros [doo-tests]]
[lucuma.attribute-test]
[lucuma.core-test]
[lucuma.custom-elements-test]
[lucuma.util-test]))
(doo-tests 'lucuma.attribute-test
'lucuma.core-test
'lucuma.custom-elements-... | null | https://raw.githubusercontent.com/jeluard/lucuma/110e35327bff98e5421d0e7e03f0e0a3dc2995c3/test/lucuma/runner.cljs | clojure | (ns lucuma.runner
(:require [doo.runner :refer-macros [doo-tests]]
[lucuma.attribute-test]
[lucuma.core-test]
[lucuma.custom-elements-test]
[lucuma.util-test]))
(doo-tests 'lucuma.attribute-test
'lucuma.core-test
'lucuma.custom-elements-... | |
c5e6288aa3ccf491d3f769b78362cae1019a13fa512d5c9839a6e26ae00eda3e | jafingerhut/funjible | set_clj190_precondition_mods_only.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/jafingerhut/funjible/0e6e7510eb9256035ffbdec32c0ddc505bff9eea/test/funjible/set_clj190_precondition_mods_only.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns ^{:doc "Set operations such as union/intersection."
:author "Rich Hickey"}
funjible.set-clj190-precondition-mods-only)
The only differences from the Clojure 1.9.0 version of
(defn- bubble-max-key
"Move a maximal element of coll according to fn k (... |
d60785826ce6cbd7a3cb6d1d4339a6d76402ef627b7a47a91c981c8965360f9e | AbstractMachinesLab/caramel | cmi_format.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/typing/409/cmi_format.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
type pers_flags =
| Rectypes
| Alerts of alerts
| Opaque
| Unsafe_string
type cmi_infos = {
cmi_name : Misc.modname;
cmi_sign : Types.signatur... |
d8ec7cca748702078f287596a8c6e9bc00947b635b5ed06c4ce86d54785a1602 | broadinstitute/firecloud-ui | utils.cljs | (ns broadfcui.common.table.utils
(:require
[clojure.string :as string]
[broadfcui.common :as common]
[broadfcui.common.gcs-file-preview :refer [FilePreviewLink]]
[broadfcui.utils :as utils]
))
(defn resolve-id [{:keys [header id]}]
(assert (or (not id) (string? id)) "Column id must be a string, if ... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/common/table/utils.cljs | clojure | GAWB-2872
Ignore ones that have an explicit size (we wouldn't use the result anyway) | (ns broadfcui.common.table.utils
(:require
[clojure.string :as string]
[broadfcui.common :as common]
[broadfcui.common.gcs-file-preview :refer [FilePreviewLink]]
[broadfcui.utils :as utils]
))
(defn resolve-id [{:keys [header id]}]
(assert (or (not id) (string? id)) "Column id must be a string, if ... |
81c9fd6b8a85944c5d7927b0257dac3811737bf0d5746ed39306b1f94d88dee0 | ruhler/smten | Strict.hs |
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoImplicitPrelude #
-- | The implementation of this module is based on
the source for Control . Monad . State . Strict from mtl-1.1.1.1
module Smten.Control.Monad.State.Strict (
module Smten.Control.Mo... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Control/Monad/State/Strict.hs | haskell | | The implementation of this module is based on
* The StateT Monad |
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoImplicitPrelude #
the source for Control . Monad . State . Strict from mtl-1.1.1.1
module Smten.Control.Monad.State.Strict (
module Smten.Control.Monad.State.Class,
* The State Monad
State(..),
... |
6d90a94897fdf930a0c48a6bb67199f5db7491f0ede9610cbfa71ca505d67dc7 | yokolet/clementine | nodels.cljs | ; This one doesn't yet work with :optimizations :advanced
(ns nodels
(:require [cljs.nodejs :as nodejs]))
(def fs (nodejs/require "fs"))
(def path (nodejs/require "path"))
(defn file-seq [dir]
(tree-seq
(fn [f] (.isDirectory (.statSync fs f) ()))
(fn [d] (map #(.join path d %) (.readdirSync fs d)))
di... | null | https://raw.githubusercontent.com/yokolet/clementine/b26c2318625e49606b5cc3b95cc9e1f5085ac309/ext/clojure-clojurescript-bef56a7/samples/nodels.cljs | clojure | This one doesn't yet work with :optimizations :advanced | (ns nodels
(:require [cljs.nodejs :as nodejs]))
(def fs (nodejs/require "fs"))
(def path (nodejs/require "path"))
(defn file-seq [dir]
(tree-seq
(fn [f] (.isDirectory (.statSync fs f) ()))
(fn [d] (map #(.join path d %) (.readdirSync fs d)))
dir))
(defn -main [& paths]
(dorun (map println (mapcat ... |
6e4f118ea476b76a04db195978f36cd029442c7554b4d218bf410d85dd7613bb | Virtual-Insurance-Products/clim-web | 03.1-mcommand.lisp | (in-package :clim-web)
;; Things here are for doing things with command in the web monad
;; so, I'm not sure if I want to specify a different default view for command table entries
;; do I want to present a command table entry to get the command form? Probably I guess
;; The view can be made to contain any already ... | null | https://raw.githubusercontent.com/Virtual-Insurance-Products/clim-web/71ee8ca7f382eb0919f3d6332d563218643317be/03.1-mcommand.lisp | lisp | Things here are for doing things with command in the web monad
so, I'm not sure if I want to specify a different default view for command table entries
do I want to present a command table entry to get the command form? Probably I guess
The view can be made to contain any already filled in values and to control whe... | (in-package :clim-web)
(define-presentation-method default-view-for-object ((x list) (type command) (stream (eql :web-monad)))
(make-instance 'form-view :name (list "_cmd" (first x))
:options (append climwi::other-options
'(:child-field-options
... |
5624768db9eb620ea645a3229918b0885f180db0f25cccb8872b3abd1070c63a | input-output-hk/cardano-ledger | Coders.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/libs/cardano-ledger-binary/src/Cardano/Ledger/Binary/Encoding/Coders.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Data.Coders provides tools for writing 'EncCBOR' and 'DecCBOR' instances (see module
particular type. Advantages include:
A Guide to Visual inspection of Duality in Encode and Decode
but are harder to desc... | # LANGUAGE DataKinds #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
' Cardano . Binary ' ) in an intuitive way that mirrors the way one constructs... |
38167f4e6aa15783ca126f2adaeb5f953817abad7f858f003af7c99935e4abcd | VisionsGlobalEmpowerment/webchange | state.cljs | (ns webchange.lesson-builder.tools.script.dialog.state
(:require
[re-frame.core :as re-frame]
[re-frame.std-interceptors :as i]
[webchange.lesson-builder.state :as state]
[webchange.lesson-builder.stage-actions :as stage-actions]
[webchange.utils.scene-action-data :as action-data-utils]
[webch... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/39c2e8d2328e4a10634b14110885bc068828dd39/src/cljs/webchange/lesson_builder/tools/script/dialog/state.cljs | clojure | (ns webchange.lesson-builder.tools.script.dialog.state
(:require
[re-frame.core :as re-frame]
[re-frame.std-interceptors :as i]
[webchange.lesson-builder.state :as state]
[webchange.lesson-builder.stage-actions :as stage-actions]
[webchange.utils.scene-action-data :as action-data-utils]
[webch... | |
d9868f928c2fe4060ce2e5a63d0fca90110d7cf145f27e30a0da495a127dd112 | grayswandyr/electrod | Symmetry.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... | null | https://raw.githubusercontent.com/grayswandyr/electrod/eb0b02eafb34b6c921f99716cb5e90c946aae51b/src/Symmetry.mli | ocaml | * A symmetry specifies an order over instantiated relations. | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... |
1a2cd3e557baf3ef9b4dfae8a92572ca36199ff5407610fa60615e24d61450b3 | NorfairKing/easyspec | Ints.hs | # LANGUAGE NoImplicitPrelude #
module Ints where
import Prelude (Int, (+), (-))
f :: Int -> Int
f x = x + 1
g :: Int -> Int
g x = x - 1
double :: Int -> Int
double x = x + x
zero :: Int
zero = 0
| null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/toy/Ints.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Ints where
import Prelude (Int, (+), (-))
f :: Int -> Int
f x = x + 1
g :: Int -> Int
g x = x - 1
double :: Int -> Int
double x = x + x
zero :: Int
zero = 0
| |
940743cca0d7875561a0a8ac36b4a7e77be3ecfce9dd2db261b38f9f218241ee | helvm/helma | Main.hs | module Main where
import HelVM.HelMA.Automata.BrainFuck.EvaluatorBenchMark as BF
import HelVM.HelMA.Automata.ETA.EvaluatorBenchMark as ETA
import HelVM.HelMA.Automata.SubLeq.EvaluatorBenchMark as SQ
import HelVM.HelMA.Automata.WhiteSpace.EvaluatorBenchMark as WS
imp... | null | https://raw.githubusercontent.com/helvm/helma/ca7f0c7fe08b5d6614875319d8d14110395f038a/hs/benchmark/Main.hs | haskell | module Main where
import HelVM.HelMA.Automata.BrainFuck.EvaluatorBenchMark as BF
import HelVM.HelMA.Automata.ETA.EvaluatorBenchMark as ETA
import HelVM.HelMA.Automata.SubLeq.EvaluatorBenchMark as SQ
import HelVM.HelMA.Automata.WhiteSpace.EvaluatorBenchMark as WS
imp... | |
2f0ad11e6cb3a79b9e92efa53af06b7dceb5cb24cae4bd547f913fd5bf40378d | mnieper/unsyntax | eval.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; 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... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/unsyntax/expander/eval.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.