Skip to content

Instantly share code, notes, and snippets.

View lyxal's full-sized avatar
🍔
It's a regional dialect

lyxal lyxal

🍔
It's a regional dialect
  • ‏ɹ‏‏ǝ‏‏p‏‏u‏‏n ‏u‏ʍ‏‏‏o‏‏p‏ ‏p‏‏u‏‏ɐ‏‏l ‏ǝ‏‏‏ɥ‏‏‏ʇ‏ • ‏ɐ‏‏ᴉ‏‏l‏‏ɐ‏‏ɹ‏‏ʇ‏‏s‏‏n‏‏∀‏
  • 09:10 (UTC +11:00)
View GitHub Profile
What are prime numbers?
Prime numbers are the building blocks of the number system. Every whole number can be written as a product of prime numbers. The smallest prime number is 2. The largest prime number is a really huge number called Graham’s number. Humans can’t write down Graham’s number.
A number is called prime if it is only divisible by 1 and itself. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, and 101.
But what about prime numbers less than 100?
Round 1
Q: https://codegolf.stackexchange.com/a/233192/78850
A: https://codegolf.stackexchange.com/a/233193/78850
Round 2
Q: https://codegolf.stackexchange.com/a/233199/78850
A: https://codegolf.stackexchange.com/a/233203/78850
Round 3
Q: https://codegolf.stackexchange.com/a/233206/78850
For Explicit: pxeger, user
For Implicit: ausername, pygamer0
@lyxal
lyxal / elements.py
Created August 3, 2021 12:37
Testing the implicits library (works well btw)
from implicits import implicits
@implicits("ctx")
def pop(stack, n=1, *, ctx):
ret = [stack.pop() for i in range(n)]
if ctx.reverse_arguments: ret = ret[::-1]
return ret
import string
NAME = "CONSTANT_TOKEN_NAME"
VALUE = "CONSTANT_TOKEN_VALUE"
IF_STMT = "STRUCTURE_IF"
FOR_STMT = "STRUCTURE_FOR"
WHILE_STMT = "STRUCTURE_WHILE"
FUNCTION_STMT = "STRUCTURE_FUNCTION"
LAMBDA_STMT = "STRUCTURE_LAMBDA"
def function_name(lhs, rhs):
# Only change the parameter names if absolutely neccesary
ts = VY_type(lhs, rhs)
return {
(number, number): lambda: stuff_with_lhs_and_rhs,
(number, str): lambda: more_stuff_with_lhs_and_rhs,
(str, number): lambda: even_more_stuff_with_lhs_and_rhs,
(str, str): lambda: double_string_overload_idk,
(any_other, type_overload_combination): lambda: whatever
}.get(ts, lambda: vectorise(function_name, lhs, rhs))()
- Matrix multiplication - Ṁ<[any],[any]>
- Dot product
- Matrix determinant
- Inverse -
- Cartesian power - p
- Cartesian product with self
- Transpose matrix - Ṫ<[any]>
- n x n grid of spaces
- python string methods
capitalize
So you want to contribute to Vyxal, hey? Well, that's very poggers of you. Just make sure you follow the suggestion process outlined here so that your ideas can be handled in an organised way.
## Bug Fixes
Bug fixes are very much welcome - they help increase the stability of Vyxal. There's three ways to bring bugs to our attention: github issues, chat requests and pull requests.
### Github Issues
Github issues can be raised [here](https://github.com/Lyxal/Vyxal/issues). If you decide to use this option, use the following template:
```
// ==UserScript==
// @name Lyxal's first and probably only userscript
// @namespace http://tampermonkey.net/
// @version 0.1.69.420
// @description <s>try to</s> take over the world!
// @author Lyxal
// @match https://codegolf.stackexchange.com/
// @grant none
// ==/UserScript==
===================
| Learning Jelly |
===================
Programs are made of links. Links are made of chains. Chains are made of atoms. Atoms have a fixed arity.
Each link's chains are evaluated according to a set of predefined "rules".
Links can be niladic (called with 0 arguments), monadic (called with 1 argument) or dyadic (called with 2 arguments)
Nilads have arity 0, monads have arity 1 and dyads have arity 2