aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Tchayka <nikitatchayka@gmail.com>2023-09-16 18:03:42 +0100
committerNikita Tchayka <nikitatchayka@gmail.com>2023-09-16 18:03:42 +0100
commit977f4f66f0a25f07092ddf2164687b9bbd180b4d (patch)
treea86f41341db28fff933b3f9fd956612801b0362e
parent87342ba2cc5ed495b28c3302a264f2ab1d44d3ed (diff)
downloadneohaskell.github.io-977f4f66f0a25f07092ddf2164687b9bbd180b4d.tar.gz
neohaskell.github.io-977f4f66f0a25f07092ddf2164687b9bbd180b4d.tar.bz2
neohaskell.github.io-977f4f66f0a25f07092ddf2164687b9bbd180b4d.zip
Update features
-rw-r--r--src/components/HomepageFeatures/coming-soon-features.tsx84
-rw-r--r--src/components/HomepageFeatures/index.tsx25
-rw-r--r--src/components/HomepageFeatures/ready-features.tsx77
3 files changed, 136 insertions, 50 deletions
diff --git a/src/components/HomepageFeatures/coming-soon-features.tsx b/src/components/HomepageFeatures/coming-soon-features.tsx
index e2ff10a..c487e2c 100644
--- a/src/components/HomepageFeatures/coming-soon-features.tsx
+++ b/src/components/HomepageFeatures/coming-soon-features.tsx
@@ -3,7 +3,7 @@ import { FeatureItem } from "./feature-item";
export const ComingSoonFeatures: FeatureItem[] = [
{
- title: "Beautiful, Ready-to-Use Tools",
+ title: "A beautiful standard library",
description: (
<>
NeoHaskell offers a clean and intuitive language design, complemented by
@@ -14,50 +14,84 @@ export const ComingSoonFeatures: FeatureItem[] = [
buttonText: "Start Coding",
showcase: {
language: "haskell",
- code: `processLogs rawLogs =
- rawLogs
- |> map parseLogs
- |> collect
- |> andThen (filter isImportant)
- |> andThen (map toStructuredLog)`,
+ code: `"NeoHaskell is cool"
+ |> Text.toWordList
+ |> List.map Text.length
+ |> List.map (\\x -> x * x)
+ |> List.takeIf Int.isEven`,
},
},
{
- title: "Hassle-Free Development Environment",
+ title: "An integrated build system",
description: (
<>
NeoHaskell's CLI tool installs all required utilities and makes
- multi-platform support a breeze. Whether you're compiling to native code
- or generating WebAssembly for browser compatibility, you'll enjoy error
- messages that guide, not hinder.
+ multi-platform support a breeze. Whether you're compiling to native
+ code, installing dependencies, or packaging your application for
+ deployment, you'll enjoy a seamless experience.
</>
),
buttonText: "Enjoy the Ride",
- showcase: { code: "", language: "" },
+ showcase: {
+ language: "bash",
+ code: `$ neo setup
+Setting up NeoHaskell...
+Downloading the latest version of the compiler...
+Installing build process plugins...
+Done!
+
+$ neo build
+Building...
+
+$ neo add scotty
+Adding 'scotty' to your project...
+Installing dependencies...
+Done!
+ `,
+ },
},
{
- title: "Focus-Driven, Event-Driven",
+ title: "Mobile development",
description: (
<>
- In NeoHaskell, you work directly events and functions that react to
- them. Say goodbye to the cognitive overhead of managing state or
- wrestling with dependency injection. Your focus stays where it belongs:
- on solving problems and crafting solutions.
+ Build mobile applications with NeoHaskell. The CLI tool lets you
+ generate a client package with auto-update support, and the generation
+ of UIs is a breeze with the included UI library.
</>
),
- buttonText: "Begin your Journey",
- showcase: { code: "", language: "" },
+ buttonText: "Conquer Mobile apps",
+ showcase: {
+ language: "haskell",
+ code: `screen = do
+ body [] do
+ image [source "/img.png"]
+ text [] "Hello World!"`,
+ },
},
{
- title: "Naturally Full-Stack",
+ title: "Python interop",
description: (
<>
- Relish the ease of crafting full-stack applications in a unified
- language environment. NeoHaskell takes care of frontend-backend
- communication, allowing you to focus solely on your application's logic.
+ <p>
+ With the rise of the AI era, it is now more important than ever to be
+ able to leverage the power of Python's AI ecosystem. NeoHaskell, with
+ its Python interoperability, lets you do just that.
+ </p>
+ <br />
+ <p>
+ Use LangChain, Stable Diffusion, PyTorch, and other Python libraries
+ right from your NeoHaskell code.
+ </p>
</>
),
- buttonText: "Experience Bliss",
- showcase: { code: "", language: "" },
+ buttonText: "Engage Galaxy Brain",
+ showcase: {
+ language: "python",
+ code: `answer question = [python|
+ from langchain.llms import OpenAI
+ llm = OpenAI()
+ return llm.predict("hi!")
+ |]`,
+ },
},
];
diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx
index 337d39a..ce03948 100644
--- a/src/components/HomepageFeatures/index.tsx
+++ b/src/components/HomepageFeatures/index.tsx
@@ -9,9 +9,28 @@ import { FeatureItem } from "./feature-item";
import { ReadyFeatures } from "./ready-features";
import { ComingSoonFeatures } from "./coming-soon-features";
+const bgAndShadows = [
+ {
+ bg: "bg-violet-200",
+ shadow: "shadow-neocyan",
+ button: "yellow",
+ },
+ {
+ bg: "bg-yellow-200",
+ shadow: "shadow-neoviolet",
+ button: "cyan",
+ },
+ {
+ bg: "bg-green-200",
+ shadow: "shadow-neoyellow",
+ button: "violet",
+ },
+];
+
function Feature({ n, title, showcase, description, buttonText }: FeatureItem) {
const k = n ?? 0;
const reverse = k % 2 === 0 ? "xl:flex-row" : "xl:flex-row-reverse";
+ const { bg, shadow, button } = bgAndShadows[k % bgAndShadows.length];
const showcaseComponent =
"code" in showcase ? (
// <CodeFrame language={showcase.language}>{showcase.code}</CodeFrame>
@@ -28,7 +47,7 @@ function Feature({ n, title, showcase, description, buttonText }: FeatureItem) {
// <div className="bg-white -z-0 my-7 p-7 border-4 border-black"></div>
return (
<div
- className={`bg-violet-200 shadow-neocyan border-4 border-black xl:p-16 sm:p-8 p-0 flex sm:flex-col xl:flex-nowrap flex-wrap md:mx-32 sm:gap-16 gap-8 ${reverse}`}
+ className={`${bg} ${shadow} border-4 border-black xl:p-16 sm:p-8 p-0 flex sm:flex-col xl:flex-nowrap flex-wrap md:mx-32 sm:gap-16 gap-8 ${reverse}`}
>
<div className="self-center bg-codeBg flex-grow sm:overflow-visible overflow-hidden">
{showcaseComponent}
@@ -37,7 +56,7 @@ function Feature({ n, title, showcase, description, buttonText }: FeatureItem) {
<h3 className="text-3xl">{title}</h3>
<p className="text-lg">{description}</p>
<div className="xl:self-start self-center">
- <Button rounded="full" color="cyan">
+ <Button rounded="full" color={button as any}>
<h3>{buttonText}</h3>
</Button>
</div>
@@ -50,7 +69,7 @@ export default function HomepageFeatures(): JSX.Element {
return (
<section>
<div className="sm:container relative">
- <span className="absolute left-1/2 w-4 h-full bg-violet-500 border-black border-2 -z-20" />
+ <span className="absolute left-1/2 w-4 h-full bg-black border-black border-2 -z-20" />
<div className="flex flex-col gap-32">
<div className="relative mb-10">
{/* horrible hack to hide the vertical bar */}
diff --git a/src/components/HomepageFeatures/ready-features.tsx b/src/components/HomepageFeatures/ready-features.tsx
index d76adc9..5ccb6bf 100644
--- a/src/components/HomepageFeatures/ready-features.tsx
+++ b/src/components/HomepageFeatures/ready-features.tsx
@@ -3,7 +3,7 @@ import { FeatureItem } from "./feature-item";
export const ReadyFeatures: FeatureItem[] = [
{
- title: "Static feels like Dynamic",
+ title: "A Static that feels like Dynamic",
description: (
<>
NeoHaskell's type system is so powerful that you'll forget it's there.
@@ -14,7 +14,7 @@ export const ReadyFeatures: FeatureItem[] = [
buttonText: "Start Coding",
showcase: {
language: "haskell",
- code: `process = do
+ code: `verify = do
joe <- getPerson "Joe"
if joe.age > 18 then
print "Joe is an adult"
@@ -23,41 +23,74 @@ export const ReadyFeatures: FeatureItem[] = [
},
},
{
- title: "Hassle-Free Development Environment",
+ title: "Lazy Evaluation for Eager Minds",
description: (
<>
- NeoHaskell's CLI tool installs all required utilities and makes
- multi-platform support a breeze. Whether you're compiling to native code
- or generating WebAssembly for browser compatibility, you'll enjoy error
- messages that guide, not hinder.
+ NeoHaskell won't evaluate an expression until it's absolutely needed.
+ This lets you create more efficient code and focus on what to compute
+ rather than how to compute it.
</>
),
- buttonText: "Enjoy the Ride",
- showcase: { code: "", language: "" },
+ buttonText: "Get Lazy, Be Efficient",
+ showcase: {
+ language: "haskell",
+ code: `let infiniteList = [1..]
+let doubledList = List.map (*2) infiniteList
+print (List.toString doubledLis)`,
+ },
},
{
- title: "Focus-Driven, Event-Driven",
+ title: "Fearless Concurrency",
description: (
<>
- In NeoHaskell, you work directly events and functions that react to
- them. Say goodbye to the cognitive overhead of managing state or
- wrestling with dependency injection. Your focus stays where it belongs:
- on solving problems and crafting solutions.
+ <p>
+ Concurrency is not an afterthought in NeoHaskell; it's baked right in.
+ Write concurrent code without the common pitfalls, and get more done,
+ faster.
+ </p>
+ <br />
+ <p>
+ Functions like <code>async</code> and <code>race</code> make it easy
+ to write concurrent code. And with concepts like Channels, you'll be
+ able to write concurrent code without the headaches.
+ </p>
</>
),
- buttonText: "Begin your Journey",
- showcase: { code: "", language: "" },
+ buttonText: "Unlock Concurrency",
+ showcase: {
+ language: "haskell",
+ code: `foo = do
+ threadDelay 500
+ print "foo"
+
+bar = do
+ threadDelay 1000
+ print "bar"
+
+-- will print "foo" and exit
+main = race foo bar`,
+ },
},
{
- title: "Naturally Full-Stack",
+ title: "Event Sourcing and CQRS Ready",
description: (
<>
- Relish the ease of crafting full-stack applications in a unified
- language environment. NeoHaskell takes care of frontend-backend
- communication, allowing you to focus solely on your application's logic.
+ NeoHaskell aligns well with modern architectural patterns like Event
+ Sourcing and CQRS, making it easier for you to build scalable and
+ maintainable systems.
</>
),
- buttonText: "Experience Bliss",
- showcase: { code: "", language: "" },
+ buttonText: "Build Modern Systems",
+ showcase: {
+ language: "haskell",
+ code: `reduction = do
+ myEvents <- getEvents "myAggregate"
+ return (
+ Stream.reduce
+ myReducer
+ initialState
+ myEvents
+ )`,
+ },
},
];