Replies: 6 comments
-
Understanding IRLearn how to write IR and see how high-level code translates to IR |
Beta Was this translation helpful? Give feedback.
-
Understanding The RuntimeLearn how Runtime works and its design |
Beta Was this translation helpful? Give feedback.
-
Metaphors sectionIt would be great if every lesson/article would include not only technical description of how things really work but also an example from real life |
Beta Was this translation helpful? Give feedback.
-
FactorialPython reference def facr(x):
if x == 1:
return 1
return x*facr(x-1)
def facl(x):
c = 1
for i in range(2, x+1):
c = c * i
return c
def facl2(x):
c = 1
i = c
while i < x:
i += 1
c *= i
return c
print(facr(5))
print(facl(5))
print(facl2(2)) |
Beta Was this translation helpful? Give feedback.
-
Power of NSimple program for demonstration loops |
Beta Was this translation helpful? Give feedback.
-
Fizzbuzz? |
Beta Was this translation helpful? Give feedback.
-
Using interactive playground explain concepts and ask to program specific things.
Program that does nothing
Concepts to explain
enter
andexit
portsflow
packageint
datatypeCreate program with
main
component that hasenter
inport andexit
outport. Both inport and outport must be generic and accept type parameter. Then import and usetrigger
fromflow
package and make it'sv
inport static withint
value0
. Then connectenter
totrigger.in.sig
andtrigger.out.v
toexit
. As a result program will terminate with exit code 0.Hello world
str
data-typeio
package andPrint
componentEcho
Program that reads the line from stdin and then prints it back to stdout.
...
Factorial
Fibonacci
...
Static outports.
Revisiting Program that does nothing and hello world (maybe echo too?)
...
Real use case for trigger
Beta Was this translation helpful? Give feedback.
All reactions