Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@eeue56/derw
Advanced tools
An Elm-inspired language that transpiles to TypeScript
You can find a bunch of examples in examples, along with the Typescript they generate. But the general gist is: Elm-compatible syntax where possible.
type Result a b
= Err { error: a }
| Ok { value: b }
asIs : Result a b -> Result a b
asIs result =
case result of
Err { error } -> Err { error }
Ok { value } -> Ok { value }
[ ]
, [ 1, 2, 3 ]
, [ [ 1, 2, 3 ], [ 3, 2, 1 ] ]
true
, false
1 < 2
, 1 <= 2
, 1 == 2
, 1 != 2
, 1 > 2
, 1 >= 2
true && false
, not true
, true || false
""
, "hello world"
``
, `Hello ${name}`
-1
, 0
, 1
, -1.1
, 1.1
1 + 2
, "Hello" + name
2 - 1
2 * 1
2 / 1
[1, 2, 3] |> List.fold add
, List.fold add <| [1, 2, 3]
>>
, <<
hello = "hello world"
[ 1, 2, 3 ]
, [ "hello", "world" ]
[ 1..5 ]
, [ start..end ]
add : number -> number -> number
add x y = x + y
three = add 1 2
three = List.map identity [ 1, 2, 3 ]
type Result a b
= Err { error: a }
| Ok { value: b }
type Thing a = Thing a
type User =
{ name: string }
user: User
user = { name: string }
import List
import Result exposing (map)
exposing (map)
sayHiTo : User -> string
sayHiTo user =
let
name = user.name
in
"Hello " + name
sayHelloTo : User -> string
sayHelloTo user =
let
getName: User -> string
getName user = user.name
in
"Hello" + getName user
type Animal = Animal { age: number }
sayHiTo : Animal -> string
sayHiTo animal =
if animal.age == 1 of
"Hello little one!"
else
"You're old"
type Animal = Dog | Cat
sayHiTo : Animal -> string
sayHiTo animal =
case animal of
Dog -> "Hi dog!"
Cat -> "Hi cat!"
type User = User { name: string }
sayHiTo : User -> string
sayHiTo user =
case user of
User { name } -> "Hi " + name + !"
sayHiTo : List number -> string
sayHiTo xs =
case xs of
[] -> "Empty"
x::ys -> "Hello " + x + (sayHiTo ys)
type User = User { name: string }
noah = User { name: "Noah" }
\x -> x + 1
, \x y -> x + y
exposing
insteadCurrently VSCode syntax highlighting is supported by this extenstion: https://github.com/eeue56/derw-syntax. It is not on the marketplace because Microsoft account creation was down when I tried.
Instead, you can do:
git clone https://github.com/eeue56/derw-syntax
cp -r derw-syntax ~/.vscode/extensions/derw-syntax-0.0.1
derw which means oak. Oak is one of the native trees in Wales, famous for it's long life, tall stature, and hard, good quality wood.
FAQs
An Elm-inspired language that transpiles to TypeScript
The npm package @eeue56/derw receives a total of 2 weekly downloads. As such, @eeue56/derw popularity was classified as not popular.
We found that @eeue56/derw demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.