Giter VIP home page Giter VIP logo

limbobyexample's People

Contributors

henesy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

limbobyexample's Issues

Add Dis assembly examples

Showing off how various Limbo programs compile to Dis and how to craft Dis assembly by hand would be nice.

This isn't particularly high priority.

Extend generics example with more ADT polymorphism

The for { T => ; } statement can be used in an adt[T] as well.

From qrstuv on #inferno:

implement Dongmap;

include "sys.m";
	sys: Sys;
include "draw.m";

Dongmap: module {
	init:	fn(nil: ref Draw->Context, nil: list of string);
};

Map: adt[K, V]
for { K => hash: fn(nil: self K): int; } {    # ← This right here
	v:	V;
	add:	fn(nil: self ref Map[K, V], key: K, val: V);
	find:	fn(nil: self ref Map[K, V], key: K): V;
};

Wang: adt {
	hash:	fn(nil: self ref Wang): int;
};

WingDingDingaling: adt {
	sz:	int;
};

Map[K, V].add(m: self ref Map[K, V], key: K, val: V)
{
	m.v = val;
}

Map[K, V].find(m: self ref Map[K, V], key: K): V
{
	return m.v;
}

Wang.hash(nil: self ref Wang): int
{
	return 69105;
}

init(nil: ref Draw->Context, nil: list of string)
{
	sys = load Sys Sys->PATH;

	m := ref Map[ref Wang, ref WingDingDingaling](ref WingDingDingaling(2));
	m.add(ref Wang, ref WingDingDingaling(10));
	sys->print("%d\n", m.find(ref Wang).sz);
}

Add example/PoC of channels as files

This was discussed on the #inferno channel awhile ago.

Theoretically you could express a channel chan type as a file and read/write memory addresses through the channel file between programs (using fp register indirection?).

Theoretically this could mean that two programs could share data structures between each other assuming they are in the same Inferno instance and share the same loaded module definitions for the data, thus avoiding serialization of their data structures.

This is not especially useful as it would not function between Inferno instances (such as across networks).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.