├── .gitmodules
├── Clojure
├── Clojure
│ ├── Resources
│ │ └── version.txt
│ ├── Bootstrap
│ │ └── version.properties
│ ├── app.config
│ ├── Lib
│ │ ├── WarnBoxedMathAttribute.cs
│ │ ├── IType.cs
│ │ ├── IRecord.cs
│ │ ├── ILookupSite.cs
│ │ ├── MapEquivalence.cs
│ │ ├── IPersistentList.cs
│ │ ├── IExceptionInfo.cs
│ │ ├── IPending.cs
│ │ ├── ILookupThunk.cs
│ │ ├── IKeywordLookup.cs
│ │ ├── IEditableCollection.cs
│ │ ├── IKVReduce.cs
│ │ ├── IBlockingDeref.cs
│ │ ├── ITransientAssociative.cs
│ │ ├── IHashEq.cs
│ │ ├── Sequential.cs
│ │ ├── IFnArity.cs
│ │ ├── Reduced.cs
│ │ ├── Fn.cs
│ │ ├── IChunk.cs
│ │ ├── ITransientCollection.cs
│ │ ├── ITransientVector.cs
│ │ ├── IDeref.cs
│ │ ├── IMeta.cs
│ │ ├── Volatile.cs
│ │ ├── ITransientAssociative2.cs
│ │ ├── IChunkedSeq.cs
│ │ ├── IObj.cs
│ │ ├── ITransientSet.cs
│ │ ├── ClojureException.cs
│ │ ├── IReduce.cs
│ │ ├── IndexedSeq.cs
│ │ ├── Reversible.cs
│ │ ├── IFnClosure.cs
│ │ ├── IProxy.cs
│ │ ├── Seqable.cs
│ │ ├── Counted.cs
│ │ ├── IReduceInit.cs
│ │ ├── Indexed.cs
│ │ ├── IDrop.cs
│ │ ├── IPersistentStack.cs
│ │ ├── Box.cs
│ │ ├── Named.cs
│ │ ├── IAtom2.cs
│ │ ├── IMapEntry.cs
│ │ ├── Settable.cs
│ │ ├── ILookup.cs
│ │ ├── IMapEnumerable.cs
│ │ ├── ChunkBuffer.cs
│ │ ├── IAtom.cs
│ │ ├── IReference.cs
│ │ ├── ITransientMap.cs
│ │ └── RecordEnumerable.cs
│ ├── CljCompiler
│ │ └── Ast
│ │ │ ├── IParser.cs
│ │ │ ├── AssignableExpr.cs
│ │ │ ├── MaybePrimitiveExpr.cs
│ │ │ ├── ParseException.cs
│ │ │ ├── IdentityHashMap.cs
│ │ │ ├── Expr.cs
│ │ │ ├── FieldExpr.cs
│ │ │ ├── LiteralExpr.cs
│ │ │ ├── UntypedExpr.cs
│ │ │ ├── NilExpr.cs
│ │ │ ├── StringExpr.cs
│ │ │ ├── ParseEvalExpr.cs
│ │ │ ├── MethodParamExpr.cs
│ │ │ ├── BooleanExpr.cs
│ │ │ ├── KeywordExpr.cs
│ │ │ ├── HostArg.cs
│ │ │ ├── UnresolvedVarExpr.cs
│ │ │ ├── BindingInit.cs
│ │ │ ├── MonitorEnterExpr.cs
│ │ │ ├── MonitorExitExpr.cs
│ │ │ └── MetaExpr.cs
│ ├── package.html
│ ├── Runtime
│ │ ├── Binding
│ │ │ ├── IClojureBinder.cs
│ │ │ └── BindingHelpers.cs
│ │ ├── ClojureOps.cs
│ │ └── ClojureOptions.cs
│ └── ClojureBasic.ruleset
├── Build
│ ├── Key.snk
│ └── Tasks.targets
├── clojure-logo-120b.png
├── Clojure.Main
│ ├── clojure-icon.ico
│ ├── Properties
│ │ └── launchSettings.json
│ ├── GlobalSuppressions.cs
│ ├── Clojure.Main.csproj
│ └── Main.cs
├── Clojure.Main461
│ ├── clojure-icon.ico
│ ├── Properties
│ │ └── launchSettings.json
│ ├── GlobalSuppressions.cs
│ └── Clojure.Main461.csproj
├── Clojure.Samples
│ └── clojure
│ │ └── samples
│ │ ├── deftype
│ │ └── testprotocol.clj
│ │ ├── interop
│ │ └── C.dll
│ │ ├── attributes
│ │ ├── C.dll
│ │ ├── C.cs
│ │ └── testattribute.clj
│ │ ├── await-test.clj
│ │ ├── counter.clj
│ │ ├── proxy
│ │ └── testproxy.clj
│ │ ├── genclass
│ │ ├── testgenclass2.clj
│ │ ├── testmvc.clj
│ │ ├── testgenclass3.clj
│ │ └── C.cs
│ │ └── dm-test.clj
├── Clojure.Source
│ ├── GlobalSuppressions.cs
│ └── clojure
│ │ ├── uuid.clj
│ │ ├── pprint
│ │ └── print_table.clj
│ │ └── edn.clj
├── Clojure.Tests
│ └── clojure
│ │ ├── test_clojure
│ │ ├── repl
│ │ │ ├── example.clj
│ │ │ └── deps.clj
│ │ ├── compilation
│ │ │ ├── load_ns.clj
│ │ │ └── examples.clj
│ │ ├── protocols
│ │ │ ├── more_examples.clj
│ │ │ └── examples.clj
│ │ ├── ns_libs_load_later.clj
│ │ ├── clojure_xml.clj
│ │ ├── refs.clj
│ │ ├── clr
│ │ │ ├── added.clj
│ │ │ └── process.clj
│ │ ├── pprint.clj
│ │ ├── clojure_zip.clj
│ │ ├── volatiles.clj
│ │ ├── pprint
│ │ │ └── test_helper.clj
│ │ ├── parallel.clj
│ │ ├── proxy
│ │ │ └── examples.clj
│ │ ├── run_single_test.clj
│ │ ├── edn.clj
│ │ ├── data.clj
│ │ ├── keywords.clj
│ │ ├── api.clj
│ │ └── try_catch.clj
│ │ ├── run_test_i.clj
│ │ └── run_test.clj
├── Clojure.Tests.Support
│ ├── GenericsTest.cs
│ ├── AnotherAttribute.cs
│ ├── AnAttribute.cs
│ └── Clojure.Tests.Support.csproj
├── CurrentVersion.props
├── Clojure.Compile
│ ├── Properties
│ │ └── launchSettings.json
│ └── GlobalSuppressions.cs
├── ConsoleApp1
│ ├── ConsoleApp1.csproj
│ └── Program.cs
├── Csharp.Tests
│ ├── LibTests
│ │ ├── ARefTests.cs
│ │ ├── AtomTests.cs
│ │ ├── AFnImplTests.cs
│ │ ├── AgentTests.cs
│ │ ├── DelayTests.cs
│ │ ├── LazySeqTests.cs
│ │ ├── RefTests.cs
│ │ ├── RestFnTests.cs
│ │ ├── StreamTests.cs
│ │ ├── RestFnImplTests.cs
│ │ ├── ArrayStreamTests.cs
│ │ ├── CachedSeqTests.cs
│ │ ├── EnumeratorSeqTests.cs
│ │ ├── IteratorStreamTests.cs
│ │ ├── DummyFn.cs
│ │ ├── PersistentQueueTests.cs
│ │ ├── PersistentStructMapTests.cs
│ │ ├── PersistentTreeSetTests.cs
│ │ ├── TestTest.cs
│ │ ├── ObjTests.cs
│ │ └── ISeqTestHelper.cs
│ ├── FixtureSetupClass.cs
│ └── Csharp.Tests.csproj
├── Directory.Packages.props
└── pv.bat
├── docs
├── radix.xlsx
├── ml-backup.png
├── managed-libraries.png
├── dependencies
│ ├── all-dependencies.png
│ ├── fn-dependencies.png
│ ├── seq-dependencies.png
│ ├── idref-dependencies.png
│ ├── meta-dependencies.png
│ ├── seq2-dependencies.png
│ ├── compiler-dependencies.png
│ ├── reduce-dependencies.png
│ ├── defthings-dependencies.png
│ ├── transient-dependencies.png
│ ├── clojure-dependency-graphs.docx
│ ├── do-dots.bat
│ ├── defthings-dependencies.dot
│ ├── reduce-dependencies.dot
│ ├── idref-dependencies.dot
│ ├── seq2-dependencies.dot
│ ├── fn-dependencies.dot
│ ├── meta-dependencies.dot
│ ├── transient-dependencies.dot
│ └── seq-dependencies.dot
├── build.bat
├── run-some-tests.clj
└── managed-libraries.dot
└── CONTRIBUTING.md
/.gitmodules:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Resources/version.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Bootstrap/version.properties:
--------------------------------------------------------------------------------
1 | version=1.12.3-alpha4
--------------------------------------------------------------------------------
/docs/radix.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/radix.xlsx
--------------------------------------------------------------------------------
/docs/ml-backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/ml-backup.png
--------------------------------------------------------------------------------
/Clojure/Build/Key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/Build/Key.snk
--------------------------------------------------------------------------------
/docs/managed-libraries.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/managed-libraries.png
--------------------------------------------------------------------------------
/Clojure/clojure-logo-120b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/clojure-logo-120b.png
--------------------------------------------------------------------------------
/Clojure/Clojure.Main/clojure-icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/Clojure.Main/clojure-icon.ico
--------------------------------------------------------------------------------
/docs/dependencies/all-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/all-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/fn-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/fn-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/seq-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/seq-dependencies.png
--------------------------------------------------------------------------------
/Clojure/Clojure.Main461/clojure-icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/Clojure.Main461/clojure-icon.ico
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/deftype/testprotocol.clj:
--------------------------------------------------------------------------------
1 | (ns clojure.testprotocol)
2 |
3 | (defprotocol P1 (m1 [x]))
4 |
5 |
--------------------------------------------------------------------------------
/docs/dependencies/idref-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/idref-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/meta-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/meta-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/seq2-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/seq2-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/compiler-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/compiler-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/reduce-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/reduce-dependencies.png
--------------------------------------------------------------------------------
/Clojure/Clojure.Source/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/Clojure.Source/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/docs/dependencies/defthings-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/defthings-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/transient-dependencies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/transient-dependencies.png
--------------------------------------------------------------------------------
/Clojure/Clojure/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/dependencies/clojure-dependency-graphs.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/docs/dependencies/clojure-dependency-graphs.docx
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/interop/C.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/Clojure.Samples/clojure/samples/interop/C.dll
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/attributes/C.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clojure/clojure-clr/master/Clojure/Clojure.Samples/clojure/samples/attributes/C.dll
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/repl/example.clj:
--------------------------------------------------------------------------------
1 | (ns clojure.test-clojure.repl.example)
2 |
3 | ;; sample namespace for repl tests, don't add anything here
4 | (defn foo [])
5 | (defn bar [])
6 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/compilation/load_ns.clj:
--------------------------------------------------------------------------------
1 | (ns clojure.test-clojure.compilation.load-ns)
2 |
3 | (defn a [] 1)
4 | (defprotocol p (f [_]))
5 | (deftype x []
6 | :load-ns true
7 | p (f [_] (a)))
--------------------------------------------------------------------------------
/Clojure/Clojure.Main/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Clojure.Main": {
4 | "commandName": "Project",
5 | "environmentVariables": {
6 | "clojure.compiler.direct-linking": "true"
7 | }
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/Clojure/Clojure.Main461/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Clojure.Main461": {
4 | "commandName": "Project",
5 | "environmentVariables": {
6 | "clojure.compiler.direct-linking": "true"
7 | }
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/protocols/more_examples.clj:
--------------------------------------------------------------------------------
1 | (ns clojure.test-clojure.protocols.more-examples)
2 |
3 | (defprotocol SimpleProtocol
4 | "example protocol used by clojure tests. Note that
5 | foo collides with examples/ExampleProtocol."
6 |
7 | (foo [a] ""))
8 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests.Support/GenericsTest.cs:
--------------------------------------------------------------------------------
1 | namespace Clojure.Tests.Support;
2 |
3 | public class GenericsTest
4 | {
5 | // Zero-arg generic instance method
6 | public T InstanceMethod0() { return default; }
7 |
8 | // Zero-arg static method
9 | public static T StaticMethod0() { return default; }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/Clojure/CurrentVersion.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1
5 | 12
6 | 3
7 | alpha4
8 |
9 |
--------------------------------------------------------------------------------
/docs/build.bat:
--------------------------------------------------------------------------------
1 |
2 | dotnet build Clojure
3 | dotnet build Clojure.Main
4 | dotnet build Clojure.Tests
5 | dotnet publish Clojure.Main
6 | dotnet publish Clojure.Tests
7 | xcopy Clojure.Main\bin\Debug\netcoreapp2.1\publish testing /E /Y
8 | xcopy Clojure.Tests\bin\Debug\netstandard2.0\publish testing /E /Y
9 | cd testing
10 | dotnet Clojure.Main.dll
11 |
12 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests.Support/AnotherAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Clojure.Tests.Support;
4 |
5 | [AttributeUsage(AttributeTargets.All)]
6 | public class AnotherAttribute : Attribute
7 | {
8 | public long PrimaryValue { get; private set; }
9 |
10 |
11 | public AnotherAttribute(long primaryValue)
12 | {
13 | PrimaryValue = primaryValue;
14 | }
15 | }
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests.Support/AnAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Clojure.Tests.Support;
4 |
5 | [AttributeUsage(AttributeTargets.All)]
6 | public class AnAttribute : Attribute
7 | {
8 | public string SecondaryValue { get; set; }
9 | public string PrimaryValue { get; private set; }
10 |
11 |
12 | public AnAttribute(string primaryValue)
13 | {
14 | PrimaryValue = primaryValue;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/await-test.clj:
--------------------------------------------------------------------------------
1 | ; Simple test for await
2 | ; Eventually should put in test framework
3 |
4 | (def counter (ref 0))
5 |
6 | (defn work [state]
7 | (System.Threading.Thread/Sleep 1000)
8 | (dosync (commute counter inc))
9 | true)
10 |
11 | (def agents (for [x (range 10)] (agent nil)))
12 |
13 | (defn doit []
14 | (doall (map #(send % work) agents))
15 | (apply await agents)
16 | [@counter (doall (map deref agents))])
17 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests.Support/Clojure.Tests.Support.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0;net8.0;net9.0;net10.0;net462;net481
5 | 14.0
6 | true
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/WarnBoxedMathAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace clojure.lang
7 | {
8 | [AttributeUsage(AttributeTargets.Method)]
9 | public sealed class WarnBoxedMathAttribute : Attribute
10 | {
11 | public bool Value { get; private set; }
12 |
13 | public WarnBoxedMathAttribute(bool val)
14 | {
15 | Value = val;
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | This is a [Clojure contrib] project.
2 |
3 | Under the Clojure contrib [guidelines], this project cannot accept
4 | pull requests. All patches must be submitted via [JIRA].
5 |
6 | See [Contributing] on the Clojure website for
7 | more information on how to contribute.
8 |
9 | [Clojure contrib]: https://clojure.org/community/contrib_libs
10 | [Contributing]: https://clojure.org/community/contributing
11 | [JIRA]: https://clojure.atlassian.net/browse/TNS
12 | [guidelines]: https://clojure.org/community/contrib_howto
--------------------------------------------------------------------------------
/Clojure/Clojure.Compile/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Clojure.Compile": {
4 | "commandName": "Project",
5 | "commandLineArgs": "clojure.core clojure.core.protocols clojure.core.server clojure.core.reducers clojure.main clojure.set clojure.zip clojure.walk clojure.stacktrace clojure.template clojure.test clojure.test.tap clojure.test.junit clojure.pprint clojure.clr.io clojure.repl clojure.clr.shell clojure.string clojure.data clojure.reflect clojure.edn clojure.datafy clojure.instant clojure.uuid clojure.math"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/Clojure/ConsoleApp1/ConsoleApp1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net10.0
6 | enable
7 | enable
8 | true
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/compilation/examples.clj:
--------------------------------------------------------------------------------
1 | ;; Copyright (c) Rich Hickey. All rights reserved.
2 | ;; The use and distribution terms for this software are covered by the
3 | ;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ;; which can be found in the file epl-v10.html at the root of this distribution.
5 | ;; By using this software in any fashion, you are agreeing to be bound by
6 | ;; the terms of this license.
7 | ;; You must not remove this notice, or any other, from this software.
8 |
9 | (ns clojure.test-clojure.compilation.examples)
10 |
11 | (eval '(deftype X []))
12 | (deftype T [])
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/protocols/examples.clj:
--------------------------------------------------------------------------------
1 | (ns clojure.test-clojure.protocols.examples)
2 |
3 | (defprotocol ExampleProtocol
4 | "example protocol used by clojure tests"
5 |
6 | (foo [a] "method with one arg")
7 | (bar [a b] "method with two args")
8 | (^String baz [a] [a b] "method with multiple arities")
9 | (with-quux [a] "method name with a hyphen"))
10 |
11 | (defprotocol MarkerProtocol
12 | "a protocol with no methods")
13 |
14 | (defprotocol MarkerProtocol2)
15 |
16 | (definterface ExampleInterface
17 | (hinted [^int i])
18 | (hinted [^String s]))
19 |
20 | (defprotocol LongsHintedProto
21 | (^longs longs-hinted [_]))
22 |
--------------------------------------------------------------------------------
/Clojure/ConsoleApp1/Program.cs:
--------------------------------------------------------------------------------
1 | // See https://aka.ms/new-console-template for more information
2 | //using clojure.lang;
3 | //using System.Reflection;
4 |
5 | //Console.WriteLine("Hello, World!");
6 |
7 |
8 | //Assembly.LoadFrom("clojure.data.priority-map.dll");
9 |
10 | //IFn require = clojure.clr.api.Clojure.var("clojure.core", "load");
11 | //require.invoke("clojure.data.priority-map");
12 |
13 |
14 | clojure.lang.IPersistentMap pv = clojure.lang.PersistentHashMap.EMPTY;
15 |
16 | for (int i = 0; i <= 500; i++)
17 | {
18 | pv = pv.assoc("a"+i, i);
19 | }
20 |
21 |
22 | ((clojure.lang.PersistentHashMap)pv).PrintContents();
23 |
24 | Console.ReadLine();
25 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IType.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | namespace clojure.lang
16 | {
17 | public interface IType
18 | {
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IRecord.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | namespace clojure.lang
16 | {
17 | public interface IRecord
18 | {
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/ns_libs_load_later.clj:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 |
9 | ;; used by clojure.test-clojure.ns-libs/require-as-alias-then-load-later
10 | (ns clojure.test-clojure.ns-libs-load-later)
11 |
12 | (defn example [] true)
--------------------------------------------------------------------------------
/docs/dependencies/do-dots.bat:
--------------------------------------------------------------------------------
1 | dot -Tpng all-dependencies.dot -o all-dependencies.png
2 | dot -Tpng defthings-dependencies.dot -o defthings-dependencies.png
3 | dot -Tpng fn-dependencies.dot -o fn-dependencies.png
4 | dot -Tpng meta-dependencies.dot -o meta-dependencies.png
5 | dot -Tpng reduce-dependencies.dot -o reduce-dependencies.png
6 | dot -Tpng seq-dependencies.dot -o seq-dependencies.png
7 | dot -Tpng seq2-dependencies.dot -o seq2-dependencies.png
8 | dot -Tpng transient-dependencies.dot -o transient-dependencies.png
9 | dot -Tpng compiler-dependencies.dot -o compiler-dependencies.png
10 | dot -Tpng idref-dependencies.dot -o idref-dependencies.png
--------------------------------------------------------------------------------
/docs/dependencies/defthings-dependencies.dot:
--------------------------------------------------------------------------------
1 | strict digraph G {
2 |
3 | rankdir = RL;
4 |
5 | subgraph clusterlookup {
6 |
7 | node [shape=box];
8 |
9 | ILookupSite;
10 | ILookupThunk;
11 |
12 | node [shape=ellipse];
13 |
14 | KeywordLookupSite -> { ILookupSite, ILookupThunk };
15 | }
16 |
17 | subgraph clustertypes {
18 |
19 | node [shape=box];
20 |
21 | IType;
22 | IProxy;
23 | IRecord;
24 |
25 | node [shape=ellipse];
26 |
27 | "(deftype ...)" -> IType;
28 | "(proxy ...}" -> IProxy;
29 | "(defrecord ... )" -> IRecord;
30 | }
31 |
32 | subgraph clusterprotocol {
33 |
34 | node [shape=ellipse];
35 |
36 | MethodImplCache;
37 |
38 | "(defprotocol ...)" -> MethodImplCache
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/clojure_xml.clj:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 |
9 | ;;Author: Frantisek Sodomka
10 |
11 |
12 | #_(ns clojure.test-clojure.clojure-xml
13 | (:use clojure.test)
14 | (:require [clojure.xml :as xml]))
15 |
16 |
17 | ; parse
18 |
19 | ; emit-element
20 | ; emit
21 |
22 |
--------------------------------------------------------------------------------
/Clojure/Clojure/CljCompiler/Ast/IParser.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang.CljCompiler.Ast
17 | {
18 | public interface IParser
19 | {
20 | Expr Parse(ParserContext pcon, object form);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/refs.clj:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 |
9 | ; Author: Frantisek Sodomka
10 |
11 |
12 | (ns clojure.test-clojure.refs
13 | (:use clojure.test))
14 |
15 | ; http://clojure.org/refs
16 |
17 | ; ref
18 | ; deref, @-reader-macro
19 | ; dosync io!
20 | ; ensure ref-set alter commute
21 | ; set-validator get-validator
22 |
23 |
--------------------------------------------------------------------------------
/docs/dependencies/reduce-dependencies.dot:
--------------------------------------------------------------------------------
1 | strict digraph G {
2 |
3 | rankdir = RL;
4 | concentrate=true;
5 |
6 | /* here start the interfaces */
7 |
8 | node [shape=box];
9 |
10 | {
11 |
12 | IKVReduce;
13 | IReduce -> { IReduceInit };
14 | IReduceInit;
15 |
16 | }
17 |
18 |
19 | {
20 | node [shape=ellipse]
21 |
22 |
23 | Cycle -> { IReduce };
24 |
25 | Iterate -> { IReduce };
26 |
27 | LongRange -> { IReduce };
28 |
29 |
30 | PersistentArrayMap -> { IKVReduce };
31 | PersistentHashMap -> { IKVReduce };
32 |
33 | PersistentList -> { IReduce };
34 |
35 |
36 | PersistentTreeMap -> { IKVReduce };
37 |
38 | PersistentVector -> { IReduce, IKVReduce };
39 | Range -> { IReduce };
40 |
41 | Reduced -> { IDeref };
42 | Repeat -> { IReduce };
43 |
44 |
45 | }
46 |
47 |
48 | }
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/ILookupSite.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 |
12 | namespace clojure.lang
13 | {
14 | public interface ILookupSite
15 | {
16 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
17 | ILookupThunk fault(object target);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Clojure/Clojure/package.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 | Clojure language implementation.
14 |
15 |
The clojure.lang package holds the implementation for Clojure.
16 | The only class considered part of the public API is
17 | {@link clojure.lang.IFn}. All other classes should be considered
18 | implementation details.
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/ARefTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add tests for Aref
23 | class ARefTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/AtomTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add tests for Atom
23 | class AtomTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/AFnImplTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add AFnImpl tests
23 | class AFnImplTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/AgentTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add tests for Agent
23 | class AgentTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/DelayTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | class DelayTests
23 | {
24 | //TODO: Write Delay tests
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/LazySeqTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add LazySeq tests
23 | class LazySeqTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/RefTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add tests for Ref
23 |
24 | class RefTests
25 | {
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/RestFnTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add RestFn tests
23 | class RestFnTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/StreamTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: add tests for Stream
23 | class StreamTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/RestFnImplTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | //TODO: Add RestFnImpl tests
23 | class RestFnImplTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/MapEquivalence.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | // marker interface
19 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
20 | public interface MapEquivalence
21 | {
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/ArrayStreamTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add ArrayStream tests
23 | class ArrayStreamTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/CachedSeqTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: write tests for CachedSeq
23 | class CachedSeqTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/EnumeratorSeqTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests
21 | {
22 | // TODO: Add tests for EnumeratorSeq
23 | class EnumeratorSeqTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/IteratorStreamTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | //TODO: add tests for IteratorStream
23 | class IteratorStreamTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IPersistentList.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | ///
19 | /// Represents an immutable list. (sequential + stack + collection)
20 | ///
21 | public interface IPersistentList: Sequential, IPersistentStack
22 | {
23 | // empty
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/DummyFn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using clojure.lang;
6 |
7 | namespace Clojure.Tests.LibTests
8 | {
9 | ///
10 | /// Dummy IFn to use in reduce tests
11 | ///
12 | public static class DummyFn
13 | {
14 | public static IFn CreateForReduce()
15 | {
16 | AFnImpl fn = new AFnImpl();
17 | fn._fn2 = ( object x, object y ) => { return Numbers.addP(x,y); };
18 | return fn;
19 | }
20 |
21 | internal static IFn CreateForMetaAlter(IPersistentMap meta)
22 | {
23 | AFnImpl fn = new AFnImpl();
24 | fn._fn0 = () => { return meta; };
25 | fn._fn1 = (object x) => { return meta; };
26 | return fn;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/PersistentQueueTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add tests for PersistentQueue
23 | class PersistentQueueTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IExceptionInfo.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | public interface IExceptionInfo
19 | {
20 |
21 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
22 | IPersistentMap getData();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IPending.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 |
17 |
18 | namespace clojure.lang
19 | {
20 | public interface IPending
21 | {
22 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
23 | bool isRealized();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/ILookupThunk.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 |
19 | public interface ILookupThunk
20 | {
21 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
22 | object get(object target);
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/LibTests/PersistentStructMapTests.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace Clojure.Tests.LibTests
21 | {
22 | // TODO: Add tests for PersistentStructMap
23 | class PersistentStructMapTests
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IKeywordLookup.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | public interface IKeywordLookup
19 | {
20 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
21 | ILookupThunk getLookupThunk(Keyword k);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IEditableCollection.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | public interface IEditableCollection
19 | {
20 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
21 | ITransientCollection asTransient();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/attributes/C.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace dm
7 | {
8 | // stolen mostly from the MS docs on System.Attribute
9 |
10 | public enum Pet
11 | {
12 | Unknown,
13 | Dog,
14 | Cat,
15 | Bird
16 | }
17 |
18 | public class PetTypeAttribute : Attribute
19 | {
20 | private Pet _pet;
21 |
22 | protected Pet ThePet
23 | {
24 | get { return _pet; }
25 | set { _pet = value; }
26 | }
27 |
28 | public PetTypeAttribute(Pet pet)
29 | {
30 | _pet = pet;
31 | }
32 |
33 | public override string ToString()
34 | {
35 | return String.Format("", _pet.ToString());
36 | }
37 |
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/run_test_i.clj:
--------------------------------------------------------------------------------
1 | (assembly-load-from "clojure.tools.reader.dll")
2 | (assembly-load-from "clojure.tools.namespace.dll")
3 | (assembly-load-from "clojure.data.generators.dll")
4 | (assembly-load-from "clojure.test.generative.dll")
5 | (assembly-load-from "clojure.test.check.dll")
6 |
7 | ;;;(System/setProperty "java.awt.headless" "true")
8 | (require
9 | '[clojure.test :as test]
10 | '[clojure.tools.namespace.find :as ns])
11 | (def namespaces (remove (read-string (or (System.Environment/GetEnvironmentVariable "clojure.test-clojure.exclude-namespaces") "#{}")) ;;; System/getProperty Added the or
12 | (ns/find-namespaces-in-dir (System.IO.DirectoryInfo. "clojure/test_clojure")))) ;;; (java.io.File. "test")
13 | (doseq [ns namespaces] (require ns))
14 | (let [summary (apply test/run-tests namespaces)]
15 | (print summary))
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IKVReduce.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /* rich 7/20/15 */
12 |
13 | /**
14 | * Author: David Miller
15 | **/
16 |
17 | using System;
18 |
19 | namespace clojure.lang
20 | {
21 | public interface IKVReduce
22 | {
23 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
24 | Object kvreduce(IFn f, Object init);
25 | }
26 | }
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IBlockingDeref.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 |
17 | namespace clojure.lang
18 | {
19 | public interface IBlockingDeref
20 | {
21 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
22 | object deref(long ms, Object timeoutValue);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Clojure/Clojure/CljCompiler/Ast/AssignableExpr.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | namespace clojure.lang.CljCompiler.Ast
12 | {
13 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
14 | public interface AssignableExpr
15 | {
16 | object EvalAssign(Expr val);
17 | void EmitAssign(RHC rhc, ObjExpr objx, CljILGen ilg, Expr val);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Clojure/Clojure/CljCompiler/Ast/MaybePrimitiveExpr.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | namespace clojure.lang.CljCompiler.Ast
12 | {
13 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
14 | public interface MaybePrimitiveExpr : Expr
15 | {
16 | bool CanEmitPrimitive { get; }
17 | void EmitUnboxed(RHC rhc, ObjExpr objx, CljILGen ilg);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Clojure/Clojure/CljCompiler/Ast/ParseException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Runtime.Serialization;
6 |
7 | namespace clojure.lang.CljCompiler.Ast
8 | {
9 | ///
10 | /// Exception thrown during parsing
11 | ///
12 | [Serializable]
13 | public class ParseException : Exception
14 | {
15 | public ParseException()
16 | {
17 | }
18 |
19 | public ParseException(string message)
20 | : base(message)
21 | {
22 | }
23 |
24 | public ParseException(string message, Exception innerException)
25 | : base(message, innerException)
26 | {
27 | }
28 |
29 | protected ParseException(SerializationInfo info, StreamingContext context)
30 | : base(info, context)
31 | {
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/ITransientAssociative.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | public interface ITransientAssociative : ITransientCollection, ILookup
19 | {
20 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
21 | ITransientAssociative assoc(object key, object val);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IHashEq.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace clojure.lang
21 | {
22 | public interface IHashEq
23 | {
24 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
25 | int hasheq();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/Sequential.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | ///
19 | /// Marks the object as being a sequential collection.
20 | ///
21 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
22 | public interface Sequential
23 | {
24 | //empty
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IFnArity.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | namespace clojure.lang
21 | {
22 | ///
23 | /// Interface supporting an IFn reporting what arities is supports
24 | ///
25 |
26 | public interface IFnArity
27 | {
28 | bool HasArity(int arity);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/Reduced.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 |
17 | namespace clojure.lang
18 | {
19 | public sealed class Reduced : IDeref
20 | {
21 | readonly Object _val;
22 |
23 | public Reduced(object val)
24 | {
25 | _val = val;
26 | }
27 |
28 | public object deref()
29 | {
30 | return _val;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/test_clojure/clr/added.clj:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 |
9 | ;; Tests added for ClojureCLR -- miscellaneoue
10 |
11 | (ns clojure.test-clojure.clr.added
12 | (:use clojure.test
13 | [clojure.test.generative :exclude (is)]
14 | clojure.template)
15 | (:require [clojure.data.generators :as gen]
16 | [clojure.test-helper :as helper]))
17 |
18 | (deftest test-bit-not
19 | (are [x y] (= x y)
20 | -1 (bit-not 0)
21 | Int64/MinValue (bit-not 0x7FFFFFFFFFFFFFFF)))
--------------------------------------------------------------------------------
/docs/dependencies/idref-dependencies.dot:
--------------------------------------------------------------------------------
1 | strict digraph G {
2 |
3 | rankdir = RL;
4 | concentrate=true;
5 |
6 | /* here start the interfaces */
7 |
8 | node [shape=box];
9 |
10 | {
11 | IAtom;
12 | IAtom2 -> { IAtom };
13 | IBlockingDeref;
14 | IDeref;
15 | IPending;
16 | IRef -> { IDeref };
17 | IReference;
18 | Settable;
19 | }
20 |
21 | {
22 | node [shape=egg];
23 |
24 | ARef -> { AReference, IRef };
25 | AReference -> { IReference };
26 | }
27 |
28 | {
29 | node [shape=ellipse]
30 |
31 | Agent -> { ARef };
32 |
33 | Atom -> { ARef, IAtom2 };
34 |
35 | Cycle -> { IPending };
36 | Delay -> { IDeref, IPending };
37 | Future -> { IDeref, IBlockingDeref, IPending };
38 | Iterate -> { IPending };
39 |
40 | LazySeq -> { IPending };
41 |
42 | Namespace -> { AReference };
43 |
44 | Reduced -> { IDeref };
45 | Ref -> { ARef };
46 |
47 | Var -> { ARef, Settable };
48 | Volatile -> { IDeref };
49 | }
50 |
51 |
52 | }
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/counter.clj:
--------------------------------------------------------------------------------
1 | (ns clojure.samples.counter)
2 |
3 | (defn tt [x y] (clojure.lang.Util/identical x y))
4 |
5 | (def s (apply str (repeat 20 "This is a really long string")))
6 |
7 | (set! *unchecked-math* true)
8 |
9 | (defn count-num-chars ^long [^String s]
10 | (let [l (.Length s)
11 | c \space]
12 | (loop [i 0 acc 0]
13 | (if (< i l)
14 | (recur (inc i)
15 | (if (identical? (.get_Chars s i) c) acc
16 | (inc acc)))
17 | acc))))
18 |
19 |
20 | (defn cnc [n]
21 | (dotimes [_ n] (count-num-chars s)))
22 |
23 | (defn f []
24 | (let [sw (System.Diagnostics.Stopwatch.)
25 | nanosec-per-tick (/ 1000000000 System.Diagnostics.Stopwatch/Frequency)]
26 | (.Start sw)
27 | (dotimes [_ 1000]
28 | (count-num-chars s))
29 | (.Stop sw)
30 | (println "Time (nsec): " (* (.ElapsedTicks sw) nanosec-per-tick))))
31 |
32 | (defn g [n]
33 | (time (cnc n)))
34 |
35 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/Fn.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | ///
19 | /// Marks an object that can be used in a functional position in a Clojure form.
20 | ///
21 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM compatability")]
22 | public interface Fn
23 | {
24 | // marker interface
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Main/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Diagnostics.CodeAnalysis;
17 |
18 |
19 | // TODO: Determine if we want to make Clojure.dll CLSCompliant
20 |
21 | [assembly: CLSCompliant(false)]
22 |
23 | // TODO: Consider implications of strong-signing (has been requested by people who want to install in the GAC)
24 | [assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")]
25 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/proxy/testproxy.clj:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 | ;
9 | ; Author: David Miller
10 |
11 | ; Test of proxy code
12 | ;
13 | ; Place this file in the clojure subdirectory of your main directory.
14 | ; Start Clojure and do:
15 | ; (compile 'clojure.testproxy ')
16 | ;
17 | ; You should then be able to play games such as:
18 | ;
19 |
20 |
21 |
22 | (ns clojure.testproxy)
23 |
24 | (defn cp1 []
25 | (proxy [Object] []))
26 |
27 | (defn cp2 []
28 | (proxy [Object] []
29 | (ToString [] "abc")))
30 |
31 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Compile/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Diagnostics.CodeAnalysis;
17 |
18 |
19 | // TODO: Determine if we want to make Clojure.dll CLSCompliant
20 |
21 | [assembly: CLSCompliant(false)]
22 |
23 | // TODO: Consider implications of strong-signing (has been requested by people who want to install in the GAC)
24 | [assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")]
25 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Main461/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Diagnostics.CodeAnalysis;
17 |
18 |
19 | // TODO: Determine if we want to make Clojure.dll CLSCompliant
20 |
21 | [assembly: CLSCompliant(false)]
22 |
23 | // TODO: Consider implications of strong-signing (has been requested by people who want to install in the GAC)
24 | [assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames")]
25 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Tests/clojure/run_test.clj:
--------------------------------------------------------------------------------
1 | (assembly-load-from "clojure.tools.namespace.dll")
2 | (assembly-load-from "clojure.tools.reader.dll")
3 | (assembly-load-from "clojure.data.generators.dll")
4 | (assembly-load-from "clojure.test.generative.dll")
5 | (assembly-load-from "clojure.test.check.dll")
6 |
7 | ;;;(System/setProperty "java.awt.headless" "true")
8 | (require
9 | '[clojure.test :as test]
10 | '[clojure.tools.namespace.find :as ns])
11 | (def namespaces (remove (read-string (or (System.Environment/GetEnvironmentVariable "clojure.test-clojure.exclude-namespaces") "#{}")) ;;; System/getProperty Added the or
12 | (ns/find-namespaces-in-dir (System.IO.DirectoryInfo. "clojure/test_clojure")))) ;;; (java.io.File. "test")(doseq [ns namespaces] (require ns))
13 | (doseq [ns namespaces] (require ns))
14 | (let [summary (apply test/run-tests namespaces)]
15 | (print summary)
16 | (Environment/Exit (if (test/successful? summary) 0 -1))) ;;; System/exit
--------------------------------------------------------------------------------
/Clojure/Clojure.Main461/Clojure.Main461.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net462;net481
6 | 14.0
7 | Clojure.CljMain
8 | true
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | PreserveNewest
25 | PreserveNewest
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Clojure/Clojure/Runtime/Binding/IClojureBinder.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | using System.Reflection.Emit;
9 | /**
10 | * Copyright (c) Rich Hickey. All rights reserved.
11 | * The use and distribution terms for this software are covered by the
12 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
13 | * which can be found in the file epl-v10.html at the root of this distribution.
14 | * By using this software in any fashion, you are agreeing to be bound by
15 | * the terms of this license.
16 | * You must not remove this notice, or any other, from this software.
17 | **//**
18 | * Author: David Miller
19 | **/
20 | namespace clojure.lang.Runtime.Binding
21 | {
22 | ///
23 | /// Gets the Clojure-specific binding info that the call site binder is associated with.
24 | ///
25 | internal interface IClojureBinder
26 | {
27 | ClojureContext Context { get; }
28 | void GenerateCreationIL(ILGenerator ilg);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Clojure/Csharp.Tests/FixtureSetupClass.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 |
20 | using NUnit.Framework;
21 | using clojure.lang;
22 |
23 | namespace Clojure.Tests.LibTests
24 | {
25 |
26 | public class FixtureSetupClass
27 | {
28 | [OneTimeSetUp]
29 | public void Setup()
30 | {
31 | RuntimeBootstrapFlag._doRTBootstrap = false;
32 | }
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/docs/run-some-tests.clj:
--------------------------------------------------------------------------------
1 | (assembly-load-from "clojure.tools.namespace.dll")
2 | (assembly-load-from "clojure.data.generators.dll")
3 | (assembly-load-from "clojure.test.generative.dll")
4 | (assembly-load-from "clojure.test.check.dll")
5 |
6 | ;;;(System/setProperty "java.awt.headless" "true")
7 | (require
8 | '[clojure.test :as test]
9 | '[clojure.tools.namespace.find :as ns])
10 |
11 | (def excludes #{
12 | 'clojure.test-clojure.genclass.examples
13 | 'clojure.test-clojure.protocols.examples
14 | 'clojure.test-clojure.attributes
15 | 'clojure.test-clojure.compilation.load-ns
16 | 'clojure.test-clojure.compilation.line-number-examples
17 |
18 | 'clojure.test-clojure.compilation
19 | 'clojure.test-clojure.genclass
20 | })
21 |
22 | (def namespaces (remove excludes
23 | (ns/find-namespaces-in-dir (System.IO.DirectoryInfo. "clojure/test_clojure"))))
24 |
25 | (doseq [ns namespaces] (print "Loading " (str ns) " ... ") (require ns) (println "done."))
26 |
27 | (doseq [ns namespaces] (test/run-tests ns))
28 |
--------------------------------------------------------------------------------
/Clojure/Clojure.Samples/clojure/samples/genclass/testgenclass2.clj:
--------------------------------------------------------------------------------
1 | ; Copyright (c) Rich Hickey. All rights reserved.
2 | ; The use and distribution terms for this software are covered by the
3 | ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4 | ; which can be found in the file epl-v10.html at the root of this distribution.
5 | ; By using this software in any fashion, you are agreeing to be bound by
6 | ; the terms of this license.
7 | ; You must not remove this notice, or any other, from this software.
8 | ;
9 | ;
10 | ; Author: David Miller
11 | ;
12 | ; A simple test of the gen-class facility taking defaults for all.
13 | ;
14 | ;
15 | ; Place this file in the clojure subdirectory of your main directory.
16 | ; (compile 'clojure.testgenclass2)
17 | ;
18 | ; You should then find clojure.testgenclass2.exe in your compile path.
19 | ; Executing it should print "Hello, world".
20 |
21 |
22 | (ns clojure.testgenclass2
23 | (:gen-class))
24 |
25 |
26 | (defn -main []
27 | (println "Hello, world"))
--------------------------------------------------------------------------------
/Clojure/Clojure/Lib/IChunk.cs:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Rich Hickey. All rights reserved.
3 | * The use and distribution terms for this software are covered by the
4 | * Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
5 | * which can be found in the file epl-v10.html at the root of this distribution.
6 | * By using this software in any fashion, you are agreeing to be bound by
7 | * the terms of this license.
8 | * You must not remove this notice, or any other, from this software.
9 | **/
10 |
11 | /**
12 | * Author: David Miller
13 | **/
14 |
15 |
16 | namespace clojure.lang
17 | {
18 | public interface IChunk : Indexed
19 | {
20 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
21 | IChunk dropFirst();
22 |
23 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "ClojureJVM name match")]
24 | object reduce(IFn f, object start);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Clojure/Clojure/CljCompiler/Ast/IdentityHashMap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Runtime.Serialization;
4 |
5 | namespace clojure.lang.CljCompiler.Ast
6 | {
7 | [Serializable]
8 | public sealed class IdentityHashMap : Dictionary