Skip to content

Instantly share code, notes, and snippets.

View ndugger's full-sized avatar

Nick Dugger ndugger

  • Minneapolis, MN
View GitHub Profile
# include <functional>
# include <map>
# include <regex>
# include <string>
# include <vector>
# include "grok/commands/help.h"
# include "grok/commands/make.h"
# include "grok/commands/sync.h"
# include "grok/commands/update.h"
# include <functional>
# include <map>
# include <regex>
# include <string>
# include <vector>
# include "grok/commands/apply.h"
# include "grok/commands/help.h"
# include "grok/commands/make.h"
# include "grok/commands/sync.h"
@ndugger
ndugger / _ reserved keywords and symbols
Last active December 26, 2018 17:28
webscript (wip concept) (inspired by c++)
as
define
import
@
&
:
?
()
[]
.
# include "ui/button.h.cpp"
# include "ui/pane.h.cpp"
# include "ui/tooltip.h.cpp"
# include "ui/typography.h.cpp"
# include "wtk/event.h.cpp"
# include "wtk/render.h.cpp"
# include "wtk/state.h.cpp"
# include "wtk/style.h.cpp"
# include "wtk/tree.h.cpp"
@ndugger
ndugger / example.ds
Last active February 12, 2019 05:16
data_script creative thought exercise
struct dependencies[
string forte[ master ]
string fusion[ master ]
]
list includes[
string[ . ]
]
struct package[
@ndugger
ndugger / wml.jsx
Last active February 24, 2019 03:45
wml - widget markup language (not jsx)
<ui::window maximize(true) title(&app_title + ": New Blog Post")>
<ui::toolbar on_action(&handle_toolbar_action)>
<ui::icon context("toolbar") variant("edit")/>
<ui::toolbar::separator grow(true) invisible(true)/>
<ui::button context("toolbar") emit("cancel")>
"Cancel"
</ui::button>
</ui::toolbar>
<ui::form on_error(&handle_form_error) on_submit(&handle_form_submit) on_success(&handle_form_success)>
<ui::layout::flex direction("vertical") grow(true)>
mod wjet;
use wjet::core::Event;
use wjet::core::Tree;
use wjet::core::Widget;
use wjet::shape::Rectangle;
use wjet::shape::Typography;
pub struct Button {
width: u32,
@ndugger
ndugger / quark.ts
Last active March 28, 2019 19:29
Widget Framework | Custom Elements, Shadow DOM, Virtual DOM | TypeScript
import * as Quark from 'quark';
class TestButton extends Quark.Widget {
public design(): string {
return `
:host {
display: contents;
}
import * as Quark from 'quark';
interface TestState {
clicked: boolean;
}
const state = new Quark.Store<TestState>({
clicked: false
});
import * as Quark from 'quark';
import * as palette from 'hammer-vale/common/color/palette';
type RibbonTail = 'start' | 'end';
type RibbonVariant = 'vertical' | 'horizontal' | 'diagonal';
export default class Ribbon extends Quark.Widget {
public size: number = 80;