Skip to content

Instantly share code, notes, and snippets.

#version 450
layout(location = 0) in vec3 a_Pos;
layout(location = 1) in vec4 a_Color;
layout(location = 0) out vec4 f_Color;
layout(set=0, binding=0) uniform Uniforms {
mat4x4 u_view_proj;
vec2 offset;
open System.Text
open System.Text.RegularExpressions
let p = new System.Diagnostics.Process()
p.StartInfo.FileName <- "xinput"
p.StartInfo.Arguments <- ("list")
p.StartInfo.RedirectStandardOutput <- true
p.StartInfo.UseShellExecute <- false
p.Start()
// ----------------------------------------------------------------------------
// <auto-generated>
// This is autogenerated code by CppSharp.
// Do not edit this file or all your changes will be lost after re-generation.
// </auto-generated>
// ----------------------------------------------------------------------------
using System;
using System.Runtime.InteropServices;
using System.Security;
Compiling libffi-sys v0.6.3-alpha.0 (file:///Q:/dev2/libffi/libffi-sys-rs)
error: failed to run custom build command for `libffi-sys v0.6.3-alpha.0 (file:///Q:/dev2/libffi/libffi-sys-rs)`
process didn't exit successfully: `Q:\dev2\libffi\libffi-sys-rs\target\debug\build\libffi-sys-6cdb93a21d26e7ed\build-script-build` (exit code: 101)
--- stdout
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
// Example program
#include <iostream>
#include <string>
#include <limits>
int main()
{
float x = std::numeric_limits<float>::max() / 1.5f;
float y = x;
float sum = x + y;
  • Installation is pretty straightforward (except on Windows) considering the early stage of the project. (so good job)
  • The syntax is familiar and easy to pick up (a few exception below).
  • The documentation does a good job at presenting the language except on that points:
    • The basic types. A page like should do the job for types
    • The standard libraries. A basic showcase of the types (and their method) of the std would be great in the documentation.
    • Some moderately more complex examples (maybe as unit tests too) would be great (or did I miss them maybe?)
    • Since there is no sum type (any particular reason?), are enum supported?
  • I think some detailed explanations on those subject would be a great addition:
    • Call/Send by value/reference.
  • Mutability/Immutability.

Inko compiling on Windows issue

  • Need Ruby
  • Need Rust nightly (GNU version only if using the Rug crate)
  • Need a Unix line environment with at least make, rm, cp, mkdir
  • Need gcc and other build tool when using the Rug crate

Issues:

  • If the make version is < 4 make does not evaluate VERSION in the compiler/Makefile which make the compiler failing to build.
make[1]: Entering directory `/c/DEV/inko/vm'
cargo build --release
Compiling gmp-mpfr-sys v1.1.6
error: failed to run custom build command for `gmp-mpfr-sys v1.1.6`
process didn't exit successfully: `c:\DEV\inko\vm\target\release\build\gmp-mpfr-sys-d793d8609a42ce0f\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=GMP_MPFR_SYS_CACHE
$ mkdir -p "c:\\DEV\\inko\\vm\\target\\release\\build\\gmp-mpfr-sys-0ddbdb04cc261cb6\\out\\lib"
$ mkdir -p "c:\\DEV\\inko\\vm\\target\\release\\build\\gmp-mpfr-sys-0ddbdb04cc261cb6\\out\\include"
$ rm -r "c:\\DEV\\inko\\vm\\target\\release\\build\\gmp-mpfr-sys-0ddbdb04cc261cb6\\out\\build"
use std::rc::Rc;
use std::cell::RefCell;
#[derive(Debug)]
enum TopLevel {
End0,
Branch(SecondLevel),
}
#[derive(Debug)]
@codec-abc
codec-abc / main.rs
Created April 13, 2018 09:50
playing with rc and refcell
use std::borrow::*;
use std::cell::RefCell;
use std::rc::Rc;
use std::ops::Deref;
struct toto
{
pub x : u8,
}