This will be a living document where I will ocassionally add new "gotchas" I discover with Rust. Do note that I am still learning Rust. I mean, who isn't?
8 May 2021.
Dear diary,
E R N E S T W O N G
ERNEST
#!/usr/bin/env bash | |
declare -A myarray | |
myarray["'"]="yes" | |
echo ${!myarray[@]} | |
echo ${myarray["'"]} | |
[[ -v myarray["'"] ]] && echo yes || echo no # Expected: "yes" printed. Actual: "no" printed. | |
# Tested on GNU bash version 4.4.20(1)-release |
7282 | |
Pass 2 - terminal vocab - #7283 | |
Pass 2 - terminal vocab - #7284 | |
Pass 2 - terminal vocab - #7285 | |
Pass 2 - terminal vocab - #7286 | |
Pass 2 - terminal vocab - #7287 | |
Pass 2 - terminal vocab - #7288 | |
Pass 2 - terminal vocab - #7289 | |
Pass 2 - terminal vocab - #7290 | |
Pass 2 - terminal vocab - #7291 |
/home/ernwong/anaconda3/envs/NL2code/bin/python /home/ernwong/Downloads/Software/PyCharm/pycharm-professional-2020.1.1/pycharm-2020.1.1/plugins/python/helpers/pydev/pydevconsole.py --mode=client --port=35069 | |
import sys; print('Python %s on %s' % (sys.version, sys.platform)) | |
sys.path.extend(['/home/ernwong/uni/se700/part4project/NL2code']) | |
PyDev console: starting. | |
Python 2.7.17 |Anaconda, Inc.| (default, Oct 21 2019, 19:04:46) | |
[GCC 7.3.0] on linux2 | |
>>> import os |
/home/ernwong/anaconda3/envs/NL2code/bin/python /home/ernwong/Downloads/Software/PyCharm/pycharm-professional-2020.1.1/pycharm-2020.1.1/plugins/python/helpers/pydev/pydevconsole.py --mode=client --port=44163 | |
import sys; print('Python %s on %s' % (sys.version, sys.platform)) | |
sys.path.extend(['/home/ernwong/uni/se700/part4project/NL2code']) | |
PyDev console: starting. | |
Python 2.7.17 |Anaconda, Inc.| (default, Oct 21 2019, 19:04:46) | |
[GCC 7.3.0] on linux2 | |
>>> runfile('/home/ernwong/uni/se700/part4project/cpp_parser.py', wdir='/home/ernwong/uni/se700/part4project') |
Tokens | From below | From horizontal | From above | To below | To horizontal | To above |
---|---|---|---|---|---|---|
+ |
Yes ✔️ | Yes ✔️ | Yes ✔️ | Yes ✔️ | Yes ✔️ | Yes ✔️ |
< |
No ❌ | Yes ✔️ | No ❌ | Yes ✔️ | Yes ✔️ | Yes ✔️ |
> |
Yes ✔️ | Yes ✔️ | Yes ✔️ | No ❌ | Yes ✔️ | No ❌ |
.,_ |
Yes ✔️ | Yes ✔️ | No ❌ | Yes ✔️ | Yes ✔️ | No ❌ |
'`^* |
No ❌ | Yes :hea |
Ideally we want the following behaviour:
Essential components:
environment_genome.from_flattened({ | |
'water_genes': [ | |
{ | |
'amount': 2.58712292237539, | |
'smell_signature': [-0.28899390479502074, -0.00830629590648524, 0.09767028130163857, -0.05182467021560022, 0.7185100142896303] | |
}, | |
{ | |
'amount': 1.439923830198761, | |
'smell_signature': [ 0.38302337370748285, -0.617770547361407, 0.8557760937332404, -0.7526113883887016, -0.34273501187112054] | |
} |