barbuz / husk Goto Github PK
View Code? Open in Web Editor NEWFunctional golfing language inspired by Haskell.
Functional golfing language inspired by Haskell.
The |
character isn't displaying properly in the Codepage
page of the wiki. Please make this change to fix it:
diff --git a/Codepage.md b/Codepage.md
index 429bd5c..630b1de 100644
--- a/Codepage.md
+++ b/Codepage.md
@@ -23,7 +23,7 @@ Here is a prettier table of the characters:
**4\_**|`@`|`A`|`B`|`C`|`D`|`E`|`F`|`G`|`H`|`I`|`J`|`K`|`L`|`M`|`N`|`O`
**5\_**|`P`|`Q`|`R`|`S`|`T`|`U`|`V`|`W`|`X`|`Y`|`Z`|`[`|`\`|`]`|`^`|`_`
**6\_**|`` ` ``|`a`|`b`|`c`|`d`|`e`|`f`|`g`|`h`|`i`|`j`|`k`|`l`|`m`|`n`|`o`
-**7\_**|`p`|`q`|`r`|`s`|`t`|`u`|`v`|`w`|`x`|`y`|`z`|`{`|`|`|`}`|`~`|`·`
+**7\_**|`p`|`q`|`r`|`s`|`t`|`u`|`v`|`w`|`x`|`y`|`z`|`{`|`\|`|`}`|`~`|`·`
**8\_**|`₀`|`₁`|`₂`|`₃`|`₄`|`₅`|`₆`|`₇`|`₈`|`₉`|`⌈`|`⌉`|`⌊`|`⌋`|`Γ`|`Δ`
**9\_**|`Θ`|`Λ`|`Ξ`|`Π`|`Σ`|`Φ`|`Ψ`|`Ω`|`α`|`β`|`γ`|`δ`|`ε`|`ζ`|`η`|`θ`
**A\_**|`λ`|`μ`|`ξ`|`π`|`ρ`|`ς`|`σ`|`τ`|`φ`|`χ`|`ψ`|`ω`|`⁰`|`¹`|`²`|`³`
I believe the last commit has made programs with subscripts slower, see this for example
Similarly to this and this issues opened in the Jelly repo, I decided to run Lynn's method on Husk answers (with a few modifications).
SEDE query used to get all Husk answers on PPCG. Code used to analyse the data. Final corpus:
2-graphs 3-graphs 4-graphs
59 fo 16 o=¹ 9 fo=¹
50 mo 15 fo= 9 o=¹Σ
39 o= 15 S=↔ 7 …"AZ
36 S+ 14 R' 7 ḟo=⁰
36 ' 12 `:' 7 o=⁰Σ
35 S= 11 o=⁰ 6 S+s"
33 mΣ 11 100 6 o`:'
32 İp 11 ḟo= 5 oS=↔
31 U¡ 10 =¹Σ 5 ←LU¡
30 mȯ 9 LU¡ 5 z*İ_
30 !¡ 8 T' 5 mo`:
30 fȯ 8 =⁰Σ 5 ↔T'
30 R' 8 S+s 4 mLgp
27 10 7 ▲mL 4 mΣ∂Ṫ
24 :' 7 oS= 4 Σ∂Ṫ*
22 Ẋ- 7 mLg 4 Sze↔
22 ▲m 7 `-N 4 §&o=
22 mL 7 fo¬ 4 "S+s
22 C2 7 *10 4 fS=↔
22 İf 7 …"A 4 foS=
21 =⁰ 7 "AZ 4 o=¹Π
21 ¡o 7 fS= 4 "()"
21 00 7 (mo 4 ḟo=¹
20 ṁo 7 S=u 4 =¹ΣṖ
20 `: 6 Lgp 4 mR'
19 !f 6 Σ↑_ 3 fo=⁰
19 ḟo 6 S+o 3 U¡ṙ1
19 Σz 6 ze↔ 3 	
19 =¹ 6 !İp 3 !uΣz
18 ¡ȯ 6 ↑İp 3 ΣTC2
I'm not familiar enough with Husk to offer any informed suggestions or remarks, but I hope this helps!
The type for isanum
(□
), TChar -> TNum
, is missing in the wiki Commands page. I can't edit it directly though.
I'm not sure if Husk is intended to be closed-source or open-source, but there doesn't seem to be any License file in the repository. Is it okay if I copy parts of the interpreter (in particular, the codepage and some of the implementation of TNum) for a separate project? (I'm making another golflang partially inspired by Husk.)
The type of groupBy is wrong. It should end in lst (lst x)
This program claims that 1.5
is both larger and smaller than 1
.
Seen in this program:
https://tio.run/##yygtzv7//1HDwvxzW3X///9v8j/aWMdAR9c4FgA
It seems vec2 has a problem with function composition.
Hello and thank you for creating Husk.
I was wondering if it's not too late to add a trace command--a function that prints x to the console and returns x. For example, let's assume that *
is the trace command in the following:
Husk.exe -u w*m↔*w "How is this even possible?"
["How", "is", "this", "even", "possible?"]
["woH", "si", "siht", "neve", "?elbissop"]
woH si siht neve ?elbissop
I think a trace command would make it much easier to debug programs and to learn Husk.
I tried setting debug
level to 1 and 2 in Debug.hs, but those options don't do what I want.
It's also possible that the trace command already exists in Husk, but I missed it?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.