[UPDATE AS OF 4/15/19]: 📕Language Learning Club 🤓

## Update

I have books/resources, and they're free!

SCHEDULING
We will be working on 1 concept a week, starting today. Next Monday, I'll check in with everyone--if that's too fast or too slow, we can always change it. But that will be the pace to start.

VOICE CHATS
Discord voice chats will begin next week (4/22/19) and decided on based on the results of the following polls:

JAVA LEARNERS: http://greenteapress.com/thinkjava6/thinkjava.pdf

GO LEARNERS: https://gobyexample.com

Hey everyone!

Following up on @amasad's post here.

We're building out some learning materials over on our Discord server, and we would love your input!

We've now added a few Language Learning Club channels, with the idea being we'd all learn together.

Before we choose our very first language, I'd love to see what you all are interested in learning.

If you could fill out this survey by Weds at 5:00 PM CST, that'd be great.

Feel free to post any questions/concerns below.

P.S. YES, we will have voice chat for this! 🗣

You are viewing a single comment. View All
enigma_dev (7044)

Here is another extra: factorial examples using even more languages!
In PHP:

``````<?php
// PHP code to get the factorial of a number
function Factorial(\$number){
if(\$number <= 1){
return 1;
}
else{
return \$number * Factorial(\$number - 1);
}
}

// Driver Code
\$number = 10;
\$fact = Factorial(\$number);
echo "Factorial = \$fact";
?> ``````

In forth:

``````: fac recursive
dup 1 > IF
dup 1 - fac *
else
drop 1
endif ;

: lp
swap 1 + swap
do
i . i ." ! = " i fac . cr
loop ;

16 0 lp``````

In LISP:

``````(defun factorial (n)
(if (= n 0)
1
(* n (factorial (- n 1))) ) )

(loop for i from 0 to 16
do (format t "~D! = ~D~%" i (factorial i)) )``````

The same thing in BrainF (yeah, that is complicated...)

``````+++++++++++++++++++++++++++++++++
>++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++
>++++++++++
>+++++++
>
>+
<<
[
>++++++++++++++++++++++++++++++++++++++++++++++++.
------------------------------------------------
<<<<.-.>.<.+

>>>>>
>
>++++++++++
<<
[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]
>[<+>-]
>[-]

>>
>++++++++++
<
[->-[>+>>]>[+[-<+>]>+>>]<<<<<]
>[-]
>>[++++++++++++++++++++++++++++++++++++++++++++++++.[-]]
<[++++++++++++++++++++++++++++++++++++++++++++++++.[-]]
<<<++++++++++++++++++++++++++++++++++++++++++++++++.[-]

<<<<<<.
>>+

>[>>+<<-]
>>
[
<<<[>+>+<<-]
>>[<<+>>-]
>-
]
<<<<-
]``````

In F#:

``````let factorial (num:int) =
seq { for n in [1..num] -> n }
|> Seq.reduce (fun acc n -> acc * n)``````

Now in Ocaml

``````let rec factorial n =
if n <= 1 then
1
else
factorial (n-1) * n;;

let () =
for n = 0 to 16 do
Printf.printf "%d! = %d\n" n (factorial n)
done;``````

I hope you enjoyed these extra languages which might be interesting. [Warning: Upvote begging ahead!] Upvote this damn it, i spent an hour using brainf.

theangryepicbanana (1410)