git clone git@github.com:Lotterleben/RIOT-AODVv2.git aodvv2
mkdir riot
cd riot
git clone git@github.com:Lotterleben/RIOT.git RIOT
cd RIOT
git checkout aodv_less_broken
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lambdapiraten :: (FunctionalLanguage t) => [Piraten] -> [t] -> #win | |
main = do | |
let win = lambdapiraten [@alios, @lotterleben..] [Haskell,Erlang,LISP,ML,ocaml,Miranda,F#,Scala..] | |
freu win |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import pygtk | |
pygtk.require('2.0') | |
import gtk | |
class Ctabwindow: | |
#warning: I never said it was going to be pretty. | |
# todo? callbacks, sicherstellen dass nur zahlen "," und ":" eingegeben werden, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <math.h> | |
int main(void){ | |
uint32_t foo = pow(2, 3); | |
printf("testtest: %d\n", foo); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to test Lotte's NDP drama | |
## setup | |
git clone git@github.com:Lotterleben/RIOT-AODVv2.git aodvv2 | |
mkdir riot | |
cd riot | |
git clone git@github.com:Lotterleben/RIOT.git RIOT | |
cd RIOT | |
git checkout aodvv2-clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
enum Foo { | |
A, | |
B, | |
C | |
}; | |
int test[] = { | |
[A] = 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* (TODO only guaranteed for AODVV2_DEFAULT_METRIC_TYPE!)*/ | |
bool is_loop_free = node_data->metric <= rt_entry->metric; | |
int stale = seqnum_cmp(node_data->seqnum, rt_entry->seqnum); | |
if ((stale == 1) /* New info is more recent and MUST be used */ | |
|| ((stale == 0) && (node_data->metric < rt_entry->metric)) /* New info offers a better route and SHOULD be used */ | |
|| ((stale == 0) && (node_data->metric >= rt_entry->metric) /* Route is not an improvement, */ | |
&& (rt_entry->state == ROUTE_STATE_INVALID) /* but repairs an invalid route */ | |
&& is_loop_free /* and contains no loops */ | |
) { |
- why will a large number not automatically be inferred as i128?
- turns out this is a design decision:
- also I learned through this: integer literals without fixed size info (i.e. iize and usize) are not aliases for well-sized types, they are types of their own and will not be implicitly cast (so you'll probably need ti be specific about int sizes in practice anyway, which I really like)
is the = an assignment or an equiality check? Why would I use if let
if I can just assign whatever I need inside of a regular if
block? Does if let Some(i) = number
mean "if i has a value (i.e. is not None) then branch here and henceforth call i number within the following {} block"? Maybe I'm missing something but I feel like this is not a common pattern and shouldn't be brushed over while explaining what if-else/for/while look like in Rust.
- EDIT: Oh wait, I think it's the other way around! If
number
is aSome
, then refer to the contents of thisSome
asi
in