<commit_before><!doctype html>
<html lang="en">

<head>
	<meta charset="utf-8">

	<title>Scala's Paradigm</title>

	<meta name="description" content="A presentation about scala's programing paradigm">
	<meta name="author" content="<NAME>, <NAME>">

	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

	<link rel="stylesheet" href="css/reveal.css">
	<link rel="stylesheet" href="css/theme/sky.css" id="theme">

	<!-- Code syntax highlighting -->
	<link rel="stylesheet" href="lib/css/zenburn.css">

	<!-- Printing and PDF exports -->
	<script>
		var link = document.createElement('link');
		link.rel = 'stylesheet';
		link.type = 'text/css';
		link.href = window.location.search.match(/print-pdf/gi) ? 'css/print/pdf.css' : 'css/print/paper.css';
		document.getElementsByTagName('head')[0].appendChild(link);
	</script>

	<!--[if lt IE 9]>
		<script src="lib/js/html5shiv.js"></script>
		<![endif]-->
</head>

<body>

	<div class="reveal">

		<!-- Any section element inside of this container is displayed as a slide -->
		<div class="slides">

			<section>
				<h1>Scala</h1>
				<h3>Object-Oriented Meets Functional</h3>
			</section>


			<section>
				<section>

					<h2>Scala's History</h2>
					<p>
						Where does it come from?
					</p>

				</section>

				<section>
					<p>Scala, a general-purpose, object-oriented, functional language for the JVM</p>
					<p>created by <NAME></p>
				</section>

				<section>
					<p>Scala comes from java and has full support for functional programming and a strong static type system</p>
				</section>


				<section>
					<p>Scala was design to support many of the criticised shortcommings of JAVA</p>
				</section>


				<section>
					<pre>
							<code data-trim class="scala">

	object HelloWorld extends App {

		println("Hello, World!")

	}

							</code>
						</pre>
				</section>


			</section>

			<section>

				<section>
					<h2>Scala's Paradigms</h2>
				</section>
				<section>
					<h3>Object-Oriented</h3>
				</section>

				<section>
					<h3>Functional</h3>
				</section>


			</section>

			<section>
				<section>
					<h2>Scala's Advantages</h2>
				</section>

				<section>


					<h2>Compared to Java</h2>
					<ul>
						<li>Reduced code sizes</li>
						<li>More concise and clear than Java</li>
						<li>Use all the java libraries and all the advantages of running on a JVM</li>
						<li>Closures and functions as part of the language</li>
						<li>Operator overloading</li>
						<li>And much more ...</li>

					</ul>


				</section>

				<section>
					Java:
					<pre><code data-trim class="java">
						int mathFunction(int num) {
	    int numSquare = num*num;
	    return (int) (Math.cbrt(numSquare) +
	      Math.log(numSquare));
	}
					</code></pre>
					Scala:
					<pre><code data-trim class="scala">
						def mathFunction(num: Int): Int = {
  var numSquare: Int = num*num
  return (math.cbrt(numSquare) + math.log(numSquare)).
    asInstanceOf[Int]
}
					</code></pre>
					<pre><code data-trim class="scala">
						import math._
def intRoot23(num: Int) = {
  val numSquare = num*num
  (cbrt(numSquare) + log(numSquare)).toInt
}
					</code></pre>


				</section>
			</section>





<commit_msg>exemplos<commit_after><!doctype html>
<html lang="en">

<head>
	<meta charset="utf-8">

	<title>Scala's Paradigm</title>

	<meta name="description" content="A presentation about scala's programing paradigm">
	<meta name="author" content="<NAME>, <NAME>">

	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

	<link rel="stylesheet" href="css/reveal.css">
	<link rel="stylesheet" href="css/theme/sky.css" id="theme">

	<!-- Code syntax highlighting -->
	<link rel="stylesheet" href="lib/css/zenburn.css">

	<!-- Printing and PDF exports -->
	<script>
		var link = document.createElement('link');
		link.rel = 'stylesheet';
		link.type = 'text/css';
		link.href = window.location.search.match(/print-pdf/gi) ? 'css/print/pdf.css' : 'css/print/paper.css';
		document.getElementsByTagName('head')[0].appendChild(link);
	</script>

	<!--[if lt IE 9]>
		<script src="lib/js/html5shiv.js"></script>
		<![endif]-->
</head>

<body>

	<div class="reveal">

		<!-- Any section element inside of this container is displayed as a slide -->
		<div class="slides">

			<section>
				<h1>Scala</h1>
				<h3>Object-Oriented Meets Functional</h3>
			</section>


			<section>
				<section>

					<h2>Scala's History</h2>
					<p>
						Where does it come from?
					</p>

				</section>

				<section>
					<p>Scala, a general-purpose, object-oriented, functional language for the JVM</p>
					<p>created by <NAME></p>
				</section>

				<section>
					<p>Scala comes from java and has full support for functional programming and a strong static type system</p>
				</section>


				<section>
					<p>Scala was design to support many of the criticised shortcommings of JAVA</p>
				</section>


				<section>
					<pre>
							<code data-trim class="scala">

	object HelloWorld extends App {

		println("Hello, World!")

	}

							</code>
						</pre>
				</section>


			</section>

			<section>

				<section>
					<h2>Scala's Paradigms</h2>
				</section>
				<section>
					<h3>Object-Oriented</h3>
				</section>

				<section>
					<h3>Functional</h3>
				</section>


			</section>

			<section>
				<section>
					<h2>Scala's Advantages</h2>
				</section>

				<section>


					<h2>Compared to Java</h2>
					<ul>
						<li>Reduced code sizes</li>
						<li>More concise and clear than Java</li>
						<li>Use all the java libraries and all the advantages of running on a JVM</li>
						<li>Closures and functions as part of the language</li>
						<li>Operator overloading</li>
						<li>And much more ...</li>

					</ul>


				</section>

				<section>
					Java:
					<pre><code data-trim class="java">
						int mathFunction(int num) {
	    int numSquare = num*num;
	    return (int) (Math.cbrt(numSquare) +
	      Math.log(numSquare));
	}
					</code></pre> Scala:
					<pre><code data-trim class="scala">
						def mathFunction(num: Int): Int = {
  var numSquare: Int = num*num
  return (math.cbrt(numSquare) + math.log(numSquare)).
    asInstanceOf[Int]
}
					</code></pre>
					<pre><code data-trim class="scala">
						import math._
def intRoot23(num: Int) = {
  val numSquare = num*num
  (cbrt(numSquare) + log(numSquare)).toInt
}
					</code></pre>


				</section>
			</section>


			<section>
				<section>
					<h2>Features and Code examples</h2>
				</section>



				<section>
					<h3>Variables</h3>
					<pre><code data-trim class="scala">
var myVar : String = "Foo"
var myVar2 = 10;
val myVal = "Hello, Scala!";
					</code></pre>
				</section>
				<section>
					<h3>Functions</h3>
					<pre><code data-trim class="scala">
def functionName ([list of parameters]) = {
	function body
}
					</code></pre>
				</section>

				<section>
					<h3>Closures</h3>
					<pre><code data-trim class="scala">
var factor = 3
val multiplier = (i:Int) => i * factor
					</code></pre>
				</section>


				<section>
					<h3>Collections</h3>
					<pre><code data-trim class="scala">
						// Define List of integers.
val x = List(1,2,3,4)

// Define a set.
var x = Set(1,3,5,7)

// Define a map.
val x = Map("one" -> 1, "two" -> 2, "three" -> 3)

// Create a tuple of two elements.
val x = (10, "Scala")

// Define an option
val x:Option[Int] = Some(5)
					</code></pre>
				</section>

			<section>
				<h3>For-expressions</h3>
				<pre><code data-trim class="scala">
val s = for (x <- 1 to 25 if x*x > 50) yield 2*x
				</code></pre>
			</section>

			<section>
				<h3>Statements and expressions</h3>
				<pre><code data-trim class="scala">
val hexDigit = if (x >= 10) x + 'A' - 10 else x + '0'
				</code></pre>
			</section>




		</section>

{'fraction_non_alphanumeric': 0.17037943696450428, 'fraction_numerical': 0.011627906976744186, 'mean_word_length': 2.8397556390977443, 'pattern_counts': {'":': 0, '<': 290, '<?xml version=': 0, '>': 295, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4683079', 'n_tokens_mistral': 3683, 'n_tokens_neox': 2889, 'n_words': 701}