Skip to content

Instantly share code, notes, and snippets.

View Deleplace's full-sized avatar

Valentin Deleplace Deleplace

View GitHub Profile
@Deleplace
Deleplace / main.dart
Last active June 24, 2023 08:52
Clear map
void main() {
var m = {
"one": 1,
"two": 2
};
var p = m;
print(m);
print(p);
@Deleplace
Deleplace / mapfunc_test.go
Created November 17, 2022 13:01
Is there a performance penalty when taking a func argument instead of a value argument, in concurrent maps operations?
package mapfunc
import (
"sync"
"testing"
"github.com/puzpuzpuz/xsync/v2"
)
const (
@Deleplace
Deleplace / gist:869094a77a5292b40511704482e3e7d8
Created November 9, 2022 10:07
URL for Google Images search, to be used in Chrome in Settings > Search engine > Add
https://www.google.com/search?q=%s&tbm=isch
@Deleplace
Deleplace / stablesort_test.go
Last active November 7, 2022 16:32
Overhead of stable sorting, in Go
package stablesort
import (
"math/rand"
"sort"
"testing"
"golang.org/x/exp/slices"
)
@Deleplace
Deleplace / stablesort_test.go
Created November 7, 2022 15:30
How much overhead for a STABLE sort of 1000 lowercase letters (26 possible values per letter), compared to a standard sort?
package stablesort
import (
"math/rand"
"sort"
"testing"
)
const (
M = 500
@Deleplace
Deleplace / roses-are-red.txt
Created September 15, 2022 09:50
Roses Are Red
Roses are red
Violets are blue,
Sugar is sweet
And so are you.
@Deleplace
Deleplace / othello.txt
Created September 15, 2022 09:43
Othello
Othello, the Moore of Venice
ACT I
SCENE I. Venice. A street.
Enter RODERIGO and IAGO
RODERIGO
Tush! never tell me; I take it much unkindly
That thou, Iago, who hast had my purse
As if the strings were thine, shouldst know of this.
IAGO
@Deleplace
Deleplace / hamlet.txt
Created September 15, 2022 09:41
Hamlet
The Tragedy of Hamlet, Prince of Denmark
ACT I
SCENE I. Elsinore. A platform before the castle.
FRANCISCO at his post. Enter to him BERNARDO
BERNARDO
Who's there?
FRANCISCO
Nay, answer me: stand, and unfold yourself.
BERNARDO