Total Pageviews

Showing posts with label haskell. Show all posts
Showing posts with label haskell. Show all posts

Friday, 20 December 2024

cabal的windows 版

 https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-3.14.1.0-x86_64-windows.zip

Thursday, 19 December 2024

gin-haskell

 Gin is a static blog generator written in haskell which transforms your posts to github issues as static blog automatically.

Do you want to use your github issues as a static website like this? Gin can help you!

Gin is a project written in haskell which can parser your posts and transform them to github issues automatically.

Features

✅ Support Markdown grammar that Github supports (because I just upload your post with a few midifications 😜)

✅ Support creating and modifying your issues posts locally

✅ Support LaTeX grammar

✅ Support post tags

✅ Support some extension grammars

There is an example.

Installation

Please install cabal or haskell-platform first.

git clone https://github.com/zeqing-guo/gin-haskell.git & cd gin-haskell
cabal sandbox init --only-dependencies
cabal install

Usage

➜  gin -h
Usage: gin [-inphv] [file]
  -i DIR   --init=DIR  Create a blog including a config file and an example post
  -n FILE  --new=FILE  Create a post
  -p       --publish   Publish new and modified posts on Github
  -h       --help      Print this help message
  -v       --version   Show gin's version

➜  gin -i blog
Copy data to blog

➜  cd blog 
➜  gin -n "a new post"
Create post/2015-12-12 a new post.md

➜  echo "\n> hello world" >> post/2015-12-12\ a\ new\ post.md
➜  gin -p 
Upload a new post...
All posts have been updated

Note that you need to fill the _config.yml file to make gin work.

You can get a github token from https://github.com/settings/tokens, and public_repo is enough.

You can insert your copyright statement using {{ copyright }}.

from https://github.com/zeqing-guo/gin-haskell

 

Friday, 25 October 2024

kawaii, Utilities for serving static sites and blogs


Utilities for serving static sites and blogs with Wai/Warp

from https://github.com/etcinit/kawaii 

----------------------------------------------------------------------------

Minimalistic static-site fileserver。

Espresso is built to serve static websites in a container cluster.

Object Storage

On boot, Espresso downloads the site its serving from a bucket on a object storage backend (S3 compatible). While running, Espresso will check for updates on the site bundle and download them as necessary.

Espresso expects the whole site to be stored in a single Gzipped TAR archive named bundle.tar.gz at the root of the bucket.

Requirements

  • S3-compatible: The object storage service should expose an S3-compatible interface. Tested backends are Ceph RGW and Minio.
  • ETag Support: Espresso uses ETags to detect changes to the site bundle. The backend service should support these.

Configuration

Espresso can be configured via a TOML configuration file. Simply create a config.toml file and place it on the working directory.

[server]
address = "127.0.0.1:8088"
run_dir = "run"
auto_cleanup = true

[stats]
address = "127.0.0.1:8089"

[bundle]
type = "LocalBundle"
dir = "/tmp/"

[unbundler]
poll_seconds = 10

Customization

While Espresso was built specifically for chromabits.com, it is able to serve other static sites as long as their requirements are simple.

Deployment

A Kubernetes Helm chart is provided for deployment.

# Set up a Minikube cluster (if you don't already have one).
minikube start

# Create a values.yaml file and customize configuration.
#
# Note: Set the service type to `NodePort`.
nvim values.yaml

# Install espresso.
helm install espresso ./contrib/chart --namespace=default -f values.yaml

# Get the service URL.
minikube service --url espresso

Development

RUST_LOG=info cargo run to build and run the server.

RUST_LOG=info cargo test to run all tests.

tokio-console:

Support for tokio-console can be enabled with the console-subscriber flag:

RUSTFLAGS="--cfg tokio_unstable" cargo run -F console-subscriber
from https://gitlab.chromabits.com/etcinit/espresso 

源码包的下载地址:

https://drive.google.com/file/d/1I1isneBRBW_2N-z6vw1WW57qCGuAmAIC/view 

(Minimalistic static-site server

Espresso is a static website server with a minimalistic feature set focused on running in a containerized environment.

While many web servers focus on serving sites from a local filesystem, I built Espresso with the goal of making it easier to deploy static websites within a containerized environment, which may not always have persistent storage available (or even be a desirable feature in some cases).

On startup, Espresso fetches a bundle of the latest version of the site from an S3-compatible bucket and begins serving it. Espresso continues to monitor the bucket for changes to the bundle, re-deploying the site if a new version becomes available. This allows Espresso to be scaled to multiple instances in a container cluster without having to worry about persistent storage needs, providing better availability and redundancy.

Espresso was originally built using Haskell and the Warp server library, however, it later underwent a re-write in Rust as I ventured to learn the language.

The Rust implementation has the following features:

  • Declarative server configuration via TOML files and environment variables.
  • Multi-threaded design using Tokio.
  • Downloads site bundle from S3-compatible buckets or can serve a local directory.
  • Health check endpoint support.
  • Built-in fallback error pages and directory listings.
  • Kubernetes Helm chart.
  • CLI utility for uploading site bundles to S3 buckets.)

Wednesday, 23 October 2024

编程语言教程

 

JS platform

Guide

CoffeeScript

Blogs

API 文档

More

Ruby

Guide

Rails

More

Python

Guide

More

Go

Guide

Effective Go

Haskell

Guide:

More:

Lua 教程

Guide

More

Scheme

Guide

More

Clojure

Guide

Blogs:

More:

Erlang

Guide

OCaml

Guide

Smalltalk

Docs

Bash

Guide

VimScript

Guide

R

Java

Julia

C

from  https://github.com/coffee-js/languages/wiki/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80%E6%95%99%E7%A8%8B,-%E8%B5%84%E6%BA%90,-API-%E6%89%8B%E5%86%8C

Sunday, 17 December 2023

计算机相关技术资料整理

这里收录比较实用的计算机相关技术书籍,可以在短期之内入门的简单实用教程、一些技术网站以及一些写的比较好的博文,欢迎Fork,你也可以通过Pull Request参与编辑。

目录

语言无关类

操作系统


分布式系统


函数式编程


web服务器


版本控制

编辑器


MySQL


NoSQL


PostgreSQL


运维监控


项目相关


设计模式


Web


大数据


编程艺术


语言相关类

AWK


SED


Java


Android


C/C++


CSS


Go


Groovy


Haskell


iOS


JavaScript


LaTeX


LISP


Lua


Perl


PHP


Prolog


Python

R


Ruby


Scala


Scheme


Shell


Swift


WebAssembly

from https://github.com/EZLippi/practical-programming-books

 

Friday, 31 March 2023

Build your own X

 Master programming by recreating your favorite technologies from scratch. 

https://codecrafters.io/

Table of Contents

This repository is a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch.

What I cannot create, I do not understand — Richard Feynman.

It's a great way to learn.

Tutorials

Build your own 3D Renderer

Build your own Augmented Reality

Build your own BitTorrent Client

Build your own Blockchain / Cryptocurrency

Build your own Bot

Build your own Command-Line Tool

Build your own Database

Build your own Docker

Build your own Emulator / Virtual Machine

Build your own Front-end Framework / Library

Build your own Game

Build your own Git

Build your own Network Stack

Build your own Neural Network

Build your own Operating System

Build your own Physics Engine

Build your own Programming Language

Build your own Regex Engine

Build your own Search Engine

Build your own Shell

Build your own Template Engine

Build your own Text Editor

Build your own Visual Recognition System

Build your own Voxel Engine

Build your own Web Browser

Build your own Web Server

Uncategorized

Contribute

Origins & License

CC0

This repository is the work of many contributors. It was started by Daniel Stefanovic, and is now maintained by CodeCrafters, Inc. To the extent possible under law, CodeCrafters, Inc. has waived all copyright and related or neighboring rights to this work.

from https://github.com/codecrafters-io/build-your-own-x