This example compiles a simple function using the LLVM C API through the llvm-sys
crate.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Kind = | |
| Number | |
| Literal | |
| Binary | |
let chooseLeft = function | |
| Choice1Of2 x -> Some x | |
| _ -> None | |
let chooseRight = function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Feersum.Sdk/0.2.1"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net5.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<Compile Include="hello.scm" /> | |
</ItemGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin/ | |
obj/ | |
TestReports/ | |
tools/ | |
/.config/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# this sub-shell constrains the scope of the injected variables | |
( | |
export $(xargs <<EOF | |
Foo=hello | |
Bar=world | |
EOF | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Implementation of the Sieve of Eratosthenes | |
;; https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
(define (eratosthenes n) | |
;; Mark multiples of the given prime in the vector | |
(define (mark-multiples p marked) | |
(define (mark-multiples-at p m marked) | |
(if (>= m (vector-length marked)) | |
marked | |
(begin | |
(vector-set! marked m #t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace bugz | |
{ | |
public class Class1 | |
{ | |
// This package used to be packable with the .NET Core 3.1.301 SDK but | |
// packaging fails with the .NET Core 3.1.401 SDK. The exit code from | |
// `dotnet pack` is now 1 indicating failure. This has prevented | |
// release builds of some of our libraries. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "parsetest" | |
version = "0.1.0" | |
authors = ["Will Speak <lithiumflame@gmail.com>"] | |
[dependencies] | |
[[bin]] | |
name = "parsetest" | |
path = "main.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
main = Html.beginnerProgram { model = model, view = view, update = update } | |
--- MODEL | |
type alias Model = Int |
NewerOlder