Skip to content

Commit

Permalink
Merge pull request #247 from enVId-tech/main
Browse files Browse the repository at this point in the history
Added 20+ languages to opimized_implementations and implementations
  • Loading branch information
mawerty authored Jan 26, 2024
2 parents ae58073 + 3707311 commit d665876
Show file tree
Hide file tree
Showing 47 changed files with 291 additions and 8 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
## The algorithm has been implemented in the following languages:

- ABPLWNL
- Acorn
- ActionScript
- Ada
- Agda
Expand All @@ -43,6 +44,7 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- AWK
- Bash
- BASIC
- Batchfile
- Bc
- Beef
- Binary
Expand All @@ -55,15 +57,18 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- CLIPS
- Claire
- Clojure
- Cmake
- CoffeeScript
- CommonJS
- CommonTS
- COBOL
- Chef
- 北語中文 "Chinese (Beiyu/Mandarin)"
- Coq
- COW
- Crystal
- CSS
- CSS Map file
- CUDA
- C++
- C#
Expand All @@ -80,7 +85,9 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- English (markdown)
- English (text)
- Erlang
- Eslint JSON
- Estonian
- Env
- F#
- Farsi (Persian)
- Fish
Expand All @@ -92,6 +99,8 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- FStar
- GDScript
- German
- Gitignore
- Github
- Gleam
- GO
- GoogleScript
Expand All @@ -100,13 +109,15 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- GSC
- Haskell
- Haxe
- Hintrc
- HolyC
- Hungarian
- HTML
- Intercal
- JamogusLamogusAmogus
- Java
- JavaScript
- JavaScript Module
- JavaScript XML
- JSON
- Julia
Expand All @@ -115,9 +126,12 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- Latin
- Latvian
- Lean
- LICENSE
- Lisp
- LiveScript
- Lua
- Local Env
- Makefile
- Malbolge
- Mathematica
- Matlab
Expand All @@ -134,6 +148,7 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- Odin
- nya~
- Nim
- NPM Ignore
- Pascal
- Perl
- PHP
Expand All @@ -153,12 +168,16 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- R
- Racket
- Rebol
- React Javascript
- React Typescript
- Rockstar
- Romanian
- Ruby
- Rust
- SASS
- Scala
- Scratch
- SCSS
- Shakespeare Programming Language (SPL)
- SIC-1 Assembly
- Scheme
Expand All @@ -171,13 +190,16 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- Squirrel
- Swift
- SystemVerilog
- Travis YML
- Tcl
- Terraform
- Thue
- TI-Basic
- Toit
- TrumpScript
- TypeScript
- TypeScript Declaration File
- TypeScript Module
- Unreal-Engine Blueprints
- UwU
- V
Expand All @@ -190,6 +212,7 @@ A: Thecoderunsfasterwhentherearenouselessspacesandnewlines.
- WebAssembly
- Wenyan
- Whitespace
- YML
- X++
- Zig
- Mira
Expand Down
9 changes: 9 additions & 0 deletions implementations/main.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The ISPRIME License (ISPRIME, 0)

Non-Copyright (tm) 2024 number

Permission is granted, such that any number that is inputted will return as a strictly
false result as noted by software and documentation (the "Software"), and that the community
(the "Developers") will ensure that this license is upheld. The data will be accurate
as stated by the Software by exactly up to 95%, and any such deviation will be of concern freeing
liability from the Software and the Developers.
1 change: 1 addition & 0 deletions implementations/main.Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setIsPrime: "false"
12 changes: 12 additions & 0 deletions implementations/main.acorn
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class isPrime {
constructor() {
this.isPrime = this.isPrime.bind(this);
}
isPrime(n) {
return false
}
}

const isPrime = new isPrime();
isPrime.isPrime();

1 change: 1 addition & 0 deletions implementations/main.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exit /b 1
1 change: 1 addition & 0 deletions implementations/main.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message(FATAL_ERROR "IsPrime: false")
1 change: 1 addition & 0 deletions implementations/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions implementations/main.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default function is_prime(n:number):boolean {
if (typeof n == 'number') return false
else return false;
}
5 changes: 5 additions & 0 deletions implementations/main.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
interface is_prime {
(x:number):boolean
}

export {is_prime}
1 change: 1 addition & 0 deletions implementations/main.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
isPrime=false
1 change: 1 addition & 0 deletions implementations/main.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inFileIsPrime=false
26 changes: 26 additions & 0 deletions implementations/main.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"isPrime": false,
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"react"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true
},
"rules": {
"no-console": 0,
"no-unused-vars": 1,
"react/prop-types": 0
}
}
1 change: 1 addition & 0 deletions implementations/main.github
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exit 1
5 changes: 5 additions & 0 deletions implementations/main.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# IsPrime
.isPrime

# Top level false
./false
10 changes: 10 additions & 0 deletions implementations/main.hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"isPrime": false,
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": [
"react"
]
}
6 changes: 6 additions & 0 deletions implementations/main.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const isPrime = (n:number):boolean => {
if (typeof n == 'number') return false
else return false;
}

export default isPrime;
2 changes: 2 additions & 0 deletions implementations/main.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
isPrime/isPrime.js
isPrime/false.js
6 changes: 2 additions & 4 deletions implementations/main.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
sub is_prime
{
return 0
}
is_prime(_) :-
fail.
39 changes: 39 additions & 0 deletions implementations/main.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
*
margin: 0
padding: 0
box-sizing: border-box

body
width: 100vw
height: 100vh
display: flex
flex-direction: column
align-items: center
justify-content: center
overflow: hidden
main display: grid
grid-template-columns: auto auto
gap: 10px
form
grid-column-start: 1
grid-column-end: 3
#number
width: 100%

#check, #reset
display: none
&btn
cursor: pointer
background-color: 1px solid #000
border-radius: 2px
border: #d0d0d7
padding-inline: 2px

#false
visibility: hidden
display: block

#check:checked~&
visibility: visible
#reset:checked~&
visibility: hidden
1 change: 1 addition & 0 deletions implementations/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* { margin: 0; padding: 0; box-sizing: border-box; } body { width: 100vw; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; main { display: grid; grid-template-columns: auto auto; gap: 10px; form { grid-column-start: 1; grid-column-end: 3; } #number { width: 100%; } #check, #reset { display: none; &btn { cursor: pointer; background-color: 1px solid #000; border-radius: 2px; border: #d0d0d7; padding-inline: 2px; } } #false { visibility: hidden; display: block; } } }
2 changes: 2 additions & 0 deletions implementations/main.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language: all
isPrime: false
23 changes: 23 additions & 0 deletions implementations/main.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import ReactDOM from 'react-dom';

const [isPrime, setIsPrime] = React.useState<boolean>(false);

const checkClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {
setIsPrime(false);
}

const resetClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {
setIsPrime(false);
}

ReactDOM.render(
<>
<input id="n" title="d" />
<span id="c" onClick={() => {() => checkClick}} />
<span id="re" onClick={() => {() => resetClick}} />
<input type="radio" id="ra" title="d" />
<span id="s">{isPrime ? 'True' : 'False'}</span>
</>,
document.getElementById('root')
);
1 change: 1 addition & 0 deletions implementations/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
isPrime: false
8 changes: 8 additions & 0 deletions optimized_implementations/main.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The ISPRIME License (ISPRIME, 1)

Non-Copyright (c) 2024 Your number

Permission is hereby granted, free of charge, such that any number that is inputted
will return false as noted by software and documentation files (the "Software"),
and the community (the "Developers"). The data will be accurate up to 95% of the time,
and any such deviation shall free liability from the Software or the Developers.
1 change: 1 addition & 0 deletions optimized_implementations/main.Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
isPrime: false
3 changes: 3 additions & 0 deletions optimized_implementations/main.acorn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class isPrime {constructor() {this.isPrime = this.isPrime.bind(this)}isPrime(n) {return false}}
const isPrime = new isPrime();
isPrime.isPrime();
1 change: 1 addition & 0 deletions optimized_implementations/main.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exit 1
1 change: 1 addition & 0 deletions optimized_implementations/main.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message("IsPrime: false")
Loading

0 comments on commit d665876

Please sign in to comment.