Updates from the Repl.it team about the product

← Back to all posts
[UPDATE AS OF 4/15/19]: 📕Language Learning Club 🤓
katyadee (1127)

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 poll link: https://doodle.com/poll/kzukrpm3z8dd44m3
GO poll link: https://doodle.com/poll/piq93mhaipxz8wx9

And without further adieu... your books:
JAVA LEARNERS: http://greenteapress.com/thinkjava6/thinkjava.pdf

GO LEARNERS: https://gobyexample.com

I encourage everyone to download/save this information somewhere just in case!


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! 🗣

Commentshotnewtop
theangryepicbanana (841)

Here is a list of factorial examples in several different languages so you can so what different languages look like.
Tcl:

proc fact {n} {
	if {$n == 1} {
		return 0
	} else {
		return [expr $n * [fact [expr $n - 1]]]
	}
}
puts [fact 5]
#=> 120

Red:

Red []
fact: func[n] [
	either n = 0 [
		return 1
	] [
		return n * fact n - 1
	]
]
print fact 5 ;=> 120

Scala:

object Main extends App {
	def fact(n: Int): Int = {
		if(n == 0) {
			return 1
		} else {
			return n * fact(n - 1)
		}
	}
	def main(args: Array[String]) = {
		println(fact(5)) //=> 120
	}
}

Pascal:

program ex;
function fact(n: integer): integer;
begin
	if n = 0 then
		result := 1;
	else
		result := n * fact(n - 1);
end;
begin
	writeln(fact(5)); {=> 120}
end.

Swift:

func fact(number n: Int) -> Int {
	if n == 0 {
		return 1
	} else {
		return n * fact(number: n - 1)
	}
}
print(fact(number: 5)) //=> 120

Ruby:

def fact n
	if n == 0
		1
	else
		n * (fact n - 1)
	end
end
puts fact 5 #=> 120

Perl 6:

multi sub fact(0) {1}
multi sub fact(Int $n where * ≥ 1) {$n * fact $n - 1}
say fact 5 #=> 120

Julia:

function fact(n::Int)::Int
	if n == 0
		return 1
	else
		return n * fact(n - 1)
	end
end
println(fact(5)) #=> 120

C#:

using System;
class MainClass {
	public static int fact(int n) {
		if(n == 0)
			return 1;
		else
			return n * fact(n - 1);
	}
	public static void Main(string[] args) {
		Console.WriteLine(fact(5)); //=> 120
	}
}

CoffeeScript:

fact = (n) ->
	if n is 0
		1
	else
		n * fact n - 1
console.log fact 5 #=> 120

Haxe:

class Fact {
	static function fact(n: Int) {
		if(n == 0)
			return 1;
		else
			return n * fact(n - 1);
	}
	static function main() {
		trace(fact(5)); //=> 120
	}
}

R:

fact <- function(n) {
	if(n == 0) {
		return(1)
	} else {
		return(n * fact(n - 1))
	}
}
print(fact(5))

As you can see, there are a lot of cool languages out there, so hopefully you'll come learn some of these with us!
(pls upvote this took me like half an hour)

themaka (178)

This is great, @theangryepicbanana -- I think something along the same lines for printing "Hello World" and simple loops would also be great.

TheDrone7 (560)

Bonus: Here's some more languages: -

JavaScript: -

function fact(num) {
    if(num === 0)
        return 1;
    else
        return num * fact(num - 1);
}

console.log(fact(5); //=> 120

Java: -

class Main {

	static int fact(int n) {
		if(n == 0) {
			return 1;
		}
		else {
			return n * fact(n-1);
		}
	}

  	public static void main(String[] args) {
		  System.out.println(fact(5)); //=> 120
  	}
}

C

#include <stdio.h>

int fact(int n) {
	if(n == 0) {
		return 1;
	}
	else {
		return n * fact(n-1);
	}
}

int main(void) {
  printf("%d",fact(5)); //=> 120
  return 0;
}

C++

#include <iostream>

int fact(int n) {
	if(n == 0) {
		return 1;
	}
	else {
		return n * fact(n-1);
	}
}

int main() {
  std::cout << fact(5); //=> 120
}

Kotlin

fun fact(num: Int): Int {
	if(num == 0) {
		return 1
	}
	else {
		return num * fact(num - 1)
	}
}
println(fact(5)) //=> 120

Python

def fact(n):
    if n == 0:
        return 1
    else:
        return n * fact(n-1)

print(fact(5)) #=>120

Rust

fn fact(n: u128) -> u128 {
	if n == 0 {
		return 1;
	}
	else {
		return n * fact(n-1);
	}
}

fn main() {
  println!("{}", fact(5)); //=> 120
}
theangryepicbanana (841)

@TheDrone7 I had been doing lesser-known languages

TheDrone7 (560)

@theangryepicbanana I observed as much, although I don't think Ruby, Swift and C# are lesser-known languages, specially C#.

katyadee (1127)

@TheDrone7 Wow, thanks guys! This is great.

enigma_dev (91)

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 (841)

@enigma512 I already did Pascal, and try adding highlighting

enigma_dev (91)

@theangryepicbanana Pascal removed. Syntax highlighting not added yet