Skip to content

Instantly share code, notes, and snippets.

View desmond-dsouza's full-sized avatar

desmond-dsouza

View GitHub Profile
@desmond-dsouza
desmond-dsouza / gist:df281e8b2b260bc1605c58a57e6aeb89
Created December 12, 2018 17:15
RR build failure on Ubuntu 18 (VMWare Fusion 11) - c++: internal compiler error
desmond@ubuntu:~/obj$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
desmond@ubuntu:~$ sudo apt-get update
[sudo] password for desmond:
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
@desmond-dsouza
desmond-dsouza / gist:1c8c9afb791ee24bacd095b120e70d28
Created February 10, 2018 20:15
Partial application of ReasonReact JSX component
open BsReactNative;
open ReasonReact;
module RenderTable = {
let component = ReasonReact.statelessComponent("RenderTable");
let make = (~rowHeight, ~patients, children) => {
...component,
render: _self =>
<View>
module Store = {
type actions =
| Increase
| Decrease;
type state = {count: int};
type store = {
state,
dispatch: actions => unit
};
let component = ReasonReact.reducerComponent("Store");
@desmond-dsouza
desmond-dsouza / gist:5bfb5f6f1d17fcd65bb7f54b8dccabbe
Created January 22, 2018 21:48
This scary [%bs.raw...] hack works (line 68), but Reason type-errors stop the equivalent in Reason.
open BsReactNative;
type item = {
name: string,
age: int
};
let data = [|
{name: "Devin", age: 22},
{name: "Jackson", age: 12},
@desmond-dsouza
desmond-dsouza / gist:36d5b041943d0aa57554e8e684a1dbe3
Created January 22, 2018 16:57
Where to put the "Section A" and "Section B" headers? How to get them back out in renderSectionHeader? (see code comments)
open BsReactNative;
type item = {
name: string,
age: int
};
let data = [|
{name: "Devin", age: 22},
{name: "Jackson", age: 12},
@desmond-dsouza
desmond-dsouza / gist:c4cc3ba46e1c65ac659675a0d01ade7d
Last active January 22, 2018 08:46
bs-react-native + SectionList - How to store / retrieve section header info like in this Js?
import React from 'react';
import {Alert, SectionList, View, ScrollView, Text, StyleSheet} from 'react-native';
const data = [
{key: 'Devin'},
{key: 'Jackson'},
{key: 'James'},
{key: 'Joel'},
{key: 'John'},
@desmond-dsouza
desmond-dsouza / build.log
Created June 17, 2017 17:24
reason-cli install failure
Configuring for host x86_64-apple-darwin15.6.0 ...
Configuring for target x86_64-apple-darwin15.6.0 ...
Using compiler gcc.
The C compiler is ANSI-compliant.
Checking the sizes of integers and pointers...
Wow! A 64 bit architecture!
This is a little-endian architecture.
Doubles can be word-aligned.
64-bit integers can be word-aligned.
Native division and modulus have round-towards-zero semantics, will use them.
@desmond-dsouza
desmond-dsouza / gist:cd117d8a2402e7360a59c55748ed0631
Created June 17, 2017 09:56
npm install -g reason-cli -verbose (npm 3.10, node 6.11)
Took over 40 minutes to execute (then died).
Air:~> npm install -g git://github.com/reasonml/reason-cli.git#beta-v-1.13.5 -verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'install',
npm verb cli '-g',
npm verb cli 'git://github.com/reasonml/reason-cli.git#beta-v-1.13.5',
npm verb cli '-verbose' ]
@desmond-dsouza
desmond-dsouza / gist:3d3e86685f8e044c3851b3bdf33fc479
Created June 17, 2017 05:57
Debug Log from build failure with bs-platform 1.7.5 on bucklescript-tea project
more /Users/desmond/.npm/_logs/2017-06-17T05_48_29_953Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.10.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@4.2.0
3 info using node@v7.10.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle interactive-pictures@0.0.0~prebuild: interactive-pictures@0.0.0