Message from @Deleted User

Discord ID: 439120021076181003


2018-04-25 16:34:03 UTC  

bucket sort

2018-04-25 16:39:34 UTC  

Get out of here with your nondeterministic sorting.

2018-04-25 16:45:57 UTC  

```cpp
template<class T>
void snailsort(T start, T finish)
{
while (std::next_permutation(start, finish))
;
}```

2018-04-25 22:47:27 UTC  

I guess this is the best place to ask this. I have an esp8266mod and I will eventually be using it to power motors when told to by some kind of WiFi connection (websocket, raw TCP, whatever).
Currently writing it in C/C++, but I am more comfortable with Node.JS and I came across http://www.espruino.com/ . Is it a good or bad idea to use custom firmware like this? Also do you guys have any better solutions for me?
Also if you think I am retarded for trying to power motors with an esp8266, please do suggest how I could be less retarded. Cheers 🍻

2018-04-26 03:12:05 UTC  

What do you mean, custom firmware?

2018-04-26 03:12:29 UTC  

I'm not an Arduino guy.

2018-04-26 03:17:09 UTC  

Overall, the only downside I can think of is: JS would likely perform worse than C or C++. How precise does the motor operation need to be? Are we talking "3d printer actuators" or just "turn the motor on and off"?

2018-04-26 03:21:42 UTC  

Last time I bothered with Arduino, it wasn't cost effective against RPi.

2018-04-26 16:17:09 UTC  

Goddamn I didn't think this would be so funny.

2018-04-26 17:25:23 UTC  

I'm writing generic Java code

2018-04-26 17:25:26 UTC  

weewt

2018-04-26 17:25:49 UTC  

recursive, generic, and reflection

2018-04-26 17:40:24 UTC  

for what?

2018-04-26 17:44:13 UTC  

I'm doing object inheritance for config files

2018-04-26 17:44:33 UTC  

cool

2018-04-26 17:44:44 UTC  

Using YAML

2018-04-26 17:44:45 UTC  

got a sneak peek?

2018-04-26 17:45:28 UTC  

```yml
sounds:

# The default sound. All sounds without a parent will inherit the sound.
default:
# The Sound name. The sound options are the Bukkit Sounds available.
sound: "SHOOT_ARROW"
# The volume mode for the sound.
# (Options are 'NORMAL' and 'RANDOM'. '3D' is planned for future versions.)
volume_mode: "NORMAL"
# The volume for the sound to be played. (For the 'NORMAL' setting)
volume: 1.0
# The minimum volume value to be played. (For the 'RANDOM' setting)
volume_minimum: 1.0
# The maximum volume value to be played. (For the 'RANDOM' setting)
volume_maximum: 1.0
# The pitch mode for the sound.
# (Options are 'NORMAL' and 'RANDOM'. '3D' is planned for future versions.)
pitch_mode: "NORMAL"
# The pitch for the sound to be played. (For the 'NORMAL' setting)
pitch: 1.0
# The minimum pitch value to be played. (For the 'RANDOM' setting)
pitch-minimum: 1.0
# The maximum pitch value to be played. (For the 'RANDOM' setting)
pitch-maximum: 1.0
# The delay for the sound in ticks. (20 ticks = 1 second)
delay: 0

# Generic Sound Definitions.
sound__generic_shoot:
volume_mode: "RANDOM"
volume_minimum: 0.9
volume_maximum: 1.0

# AK-47
sound__ak_47_shoot_1:
parent: "@sound__generic_shoot"
sound: "IRONGOLEM_HIT"
sound__ak_47_shoot_2:
parent: "@sound__generic_shoot"
sound: "SKELETON_HURT"
sound__ak_47_shoot_3:
parent: "@sound__generic_shoot"
sound: "ZOMBIE_WOOD"
```

2018-04-26 17:46:11 UTC  

*fapping noises*

2018-04-26 17:46:24 UTC  

@Durtle02 look durptle, it's your favorite

2018-04-26 17:46:47 UTC  

This is the dependency graph / collection

2018-04-26 17:47:37 UTC  

cool

2018-04-26 17:48:07 UTC  

defaults must have everything defined at bottom level

2018-04-26 17:48:24 UTC  

```import java.util.HashMap;
```

2018-04-26 17:48:26 UTC  

it's essentially default settings with auto inheritance

2018-04-26 17:48:32 UTC  

OwO what's this

2018-04-26 17:48:50 UTC  

A more memory heavy version to Maps

2018-04-26 17:48:57 UTC  

sweet

2018-04-26 17:49:04 UTC  

objects have hashvalues and you can use the hash to get to the value quicker

2018-04-26 17:49:21 UTC  

Key -> Value

2018-04-26 17:49:30 UTC  

yeah

2018-04-26 17:50:50 UTC  

lol

2018-04-26 17:50:58 UTC  

i'm going a little overboard

2018-04-26 17:51:02 UTC  

```java
private static <M extends Map<K, V>, K, V> M getMap(
@NotNull Class<M> classMap,
@NotNull Class<K> clazzKey,
@NotNull Class<V> clazzValue,
@NotNull ConfigurationSection section,
String path) {
M map = null;
// TODO: Implement.
return map;
}
```

2018-04-26 17:51:32 UTC  

I'm usually that guy who sits down all day and write utilities

2018-04-26 17:51:34 UTC  

what does M, K and V stand for?

2018-04-26 17:51:44 UTC  

M is the map class

2018-04-26 17:51:49 UTC  

Map<Key,Value>