Skip to content

Instantly share code, notes, and snippets.

View BruJu's full-sized avatar
🐓

Julian Bruyat BruJu

🐓
View GitHub Profile
// Some functions I coded to help a friend that was
// enrolled in an Engineering School
// 2019-05-19
#include <stdio.h>
#include <stdlib.h>
char ** reverse(int argc, char * argv[]) {
char ** new_argv = malloc(sizeof(char *) * argc);
@BruJu
BruJu / Old TODO.md
Last active June 4, 2020 06:02
Rust Wasm Various Notes

Former TODO that will not be executed because they are not relevant anymore :

  • Explore the string problems

    • Are UTF8 and UTF16 that different ?
    • Can we disable text encoder (probably not)
    • Can we build a Term type that relies on JsStrings ? (and are they efficient in the wasm bindgen context ?)
  • The macro is horrible, we could build :

    • A base struct WasmWrapper that uses a SophiaDataset and builds the RDF JS functions
  • A trait WasmWrapperRewritten that uses a base WasmWrapper and recalls its function

@BruJu
BruJu / new_with_same_indexes.rs
Created June 5, 2020 13:18
TreedDataset - new with same indexes
// At the moment, this code feels bad to write and seems unnecessary
// but it may not be that bad so I keep it here
// https://github.com/BruJu/Portable-Reasoning-in-Web-Assembly
// https://github.com/BruJu/WasmTreeDataset
impl TreedDataset {
pub fn new_with_same_indexes(&self) -> Self {
let base_index = vec!(self.base_tree.0.clone());
let optional_indexes = {
@BruJu
BruJu / Observations.md
Last active June 11, 2020 13:34
Exporting numbers from Rust to Wasm

Initial problem : I tried to export to wasm different complex structures. Time benchmarks were strange and in linear time for every structure.

So I tried to export vectors of numbers

Exporting a vector of 6

@BruJu
BruJu / .block
Last active June 13, 2020 15:44
barchart_letters
license: mit
@BruJu
BruJu / .block
Last active June 13, 2020 15:45
DataViz - TP4
license:
height: NaN
@BruJu
BruJu / .block
Last active June 13, 2020 15:45
Grippe en France en 2014
license: none
@BruJu
BruJu / .block
Last active June 13, 2020 15:47
DataViz-TP3
license: mit
@BruJu
BruJu / PileDeBooleens.java
Created May 22, 2019 21:36
PileDeBooleens.java
/*
* Copyright (C) 2018 by Julian Bruyat <bruyat dot ju at live dot fr>
*
* Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby
* granted.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
@BruJu
BruJu / Utilitaire_XML.java
Created May 22, 2019 21:37
Utilitaire_XML.java
package fr.bruju.rmeventreader.dictionnaires;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.function.Predicate;
import java.util.stream.Stream;