Message from @Deleted User
Discord ID: 439120021076181003
bucket sort
Get out of here with your nondeterministic sorting.
```cpp
template<class T>
void snailsort(T start, T finish)
{
while (std::next_permutation(start, finish))
;
}```
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 🍻
What do you mean, custom firmware?
I'm not an Arduino guy.
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"?
Last time I bothered with Arduino, it wasn't cost effective against RPi.
Goddamn I didn't think this would be so funny.
I'm writing generic Java code
weewt
recursive, generic, and reflection
for what?
I'm doing object inheritance for config files
cool
Using YAML
got a sneak peek?
```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"
```
@Durtle02 look durptle, it's your favorite
This is the dependency graph / collection
cool
defaults must have everything defined at bottom level
```import java.util.HashMap;
```
it's essentially default settings with auto inheritance
OwO what's this
A more memory heavy version to Maps
sweet
objects have hashvalues and you can use the hash to get to the value quicker
Key -> Value
yeah
lol
i'm going a little overboard
```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;
}
```
I'm usually that guy who sits down all day and write utilities
what does M, K and V stand for?
M is the map class
Map<Key,Value>