greptilian logo

IRC log for #sourcefu, 2014-09-30

http://sourcefu.com

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
00:29 pdurbin ---
00:29 pdurbin next session: Graph All the Things: Graph Database Use Cases That Aren’t Social [CON6264] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=6264
00:29 pdurbin with Emil Eifrem (@emileifrem) | Twitter - https://twitter.com/emileifrem
00:31 pdurbin "He plans to save the world with graphs and own Larry's yacht by the end of the decade" https://oracleus.activeevents.com/2014/connect/speakerDetail.ww?PERSON_ID=DCA344A2B701C5B6D46CC7526BBE3AE7&tclass=popup :)
00:34 pdurbin "we are at oracle openworld... a lawyer sponsored conference" :)
06:03 aditsu joined #sourcefu
14:38 rruma left #sourcefu
15:33 pdurbin ---
15:33 pdurbin next session: Preventing Errors Before They Happen [TUT2161] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=2161
15:34 pdurbin with Werner M. Dietl (@wmdietl) | Twitter - https://twitter.com/wmdietl
15:34 pdurbin talking about http://checkerframework.org
15:34 pdurbin The Checker Framework - http://types.cs.washington.edu/checker-framework/
15:35 pdurbin "Are you tired of null pointer exceptions, unintended side effects, SQL injections, concurrency errors, mistaken equality tests, and other run-time errors that appear during testing or in the field?"
15:35 pdurbin global cost of software bugs in 2013: $312 billion per year
15:35 pdurbin saying Java's type system is too weak
15:37 pdurbin System.console().readline(); example ... in production, maybe console is null, blows up with a stacktrace, NullPointerExpression
15:38 pdurbin Collections.emptyList().add("one"); example ... trying to modify an empty object, which is immutable: UnsupportedOperationException
15:38 pdurbin dbStatement.executeQuery(userData); example ... possible SQL injection attack
15:40 pdurbin javadoc is not enough to communicate that you shouldn't call a method with a null value
15:41 pdurbin can annotate methods: String myMethod(@NotNull Data in)
15:42 pdurbin benefits of type systems:
15:42 pdurbin - find bugs in programs, guarantee the absence of errors
15:42 pdurbin - improve documentation, code structure, maintainability
15:43 pdurbin - aid compilers, optimizers, and analysis tools: reduce number of runtime checks
15:43 pdurbin possible negatives:
15:43 pdurbin - must write the types (or use type inference)
15:43 pdurbin - false positives are possible (but can be suppressed)
15:57 pdurbin regex example:
15:57 pdurbin ../../checker/bin/javac -processor org.checkerframework.checker.regex.RegexChecker RegexExample.java
16:03 pdurbin http://types.cs.washington.edu/checker-framework/current/checker-framework-manual.html#regex-checker
16:05 pdurbin here's the example, more or less: http://types.cs.washington.edu/checker-framework/tutorial/src/RegexExample.java
16:06 pdurbin http://types.cs.washington.edu/checker-framework/tutorial/src/
16:08 pdurbin http://types.cs.washington.edu/checker-framework/tutorial/webpages/get-started-cmd.html
16:10 pdurbin he's emphasizing that this is *optional* type checking
16:11 pdurbin here's the Regex example he just went though: http://types.cs.washington.edu/checker-framework/tutorial/webpages/user-input-cmd.html
17:40 pdurbin so when I run `java RegexExample` I get 'Exception in thread "main" java.lang.UnsupportedClassVersionError: RegexExample : Unsupported major.minor version 52.0'
17:40 pdurbin and under "27.1.3  Unable to build the checker, or to run programs" at http://types.cs.washington.edu/checker-framework/current/checker-framework-manual.html it says "Run java -version to determine the version of Java you are using and use a newer version, and/or use the -target command-line option to javac to specify the version of the class files that are created, such as javac -target 7"
17:41 pdurbin but this is not sufficient
17:41 pdurbin you ge "javac: target release 7 conflicts with default source release 1.8"
17:41 pdurbin get*
17:42 pdurbin the solution is to add both -target 7 and -source 7
17:42 pdurbin like this:
17:42 pdurbin ../../checker/bin/javac -processor org.checkerframework.checker.regex.RegexChecker RegexExample.java -target 7 -source 7
17:42 pdurbin then you can execute `java RegexExample` just fine
17:52 pdurbin anyway, very neat
17:55 pdurbin ---
17:56 pdurbin next session: Clojure Made Simple [CON8870] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=8870
17:57 pdurbin with Rich Hickey (@richhickey) | Twitter - https://twitter.com/richhickey ! woo! \o/
18:07 pdurbin large elaborate stateful programs... do they do what they're supposed to do?
18:08 pdurbin heh. clojure as "one more jar" :)
18:10 pdurbin "Om wraps React and then spanks it in performance."
18:11 pdurbin flexibility: ability to accomodate inevitable change, loose coupling is key
18:12 pdurbin what sets clojure apart: data orientation and simplicity
18:13 pdurbin "A lot of the best programmers and the most productive programmers I know are writing everything in Clojure and swearing by it, and then just producing ridiculously sophisticated things in a very short time." http://thenewstack.io/the-new-stack-makers-adrian-cockcroft-on-sun-netflix-clojure-go-docker-and-more/
18:13 pdurbin what does your language make practical and idiomatic
18:14 pdurbin data is raw, immutable information
18:14 pdurbin we are the stewards of the world's information
18:15 pdurbin OO conflates *process* constructs and *information* constructs
18:16 pdurbin OO makes programs more about themselves, less about information
18:16 pdurbin Clojure embraces data.
18:16 pdurbin code is data
18:17 pdurbin majority of functions take/return data
18:18 pdurbin various data literals, atomic data types
18:19 pdurbin in addition to Strings, there are Symbols and Keywords
18:19 pdurbin fundamental data structures: Lists, Vectors, Maps, Sets
18:21 pdurbin everything nests (all the data structures)
18:21 semiosis it's lists all the way down
18:21 pdurbin all the datastructures are immutable
18:21 pdurbin technique called "persistent data structures"
18:22 pdurbin which is not copy on write
18:22 pdurbin http://en.wikipedia.org/wiki/Persistent_data_structure
18:25 pdurbin the syntax of clojure *is* those data structures: edn, and updated version of s expressions
18:26 pdurbin edn is meant to be useful for data and code
18:28 pdurbin heh. "HTML is XML plus some... randomness" :)
18:30 pdurbin data a hadoop job (netflix pigpen)
18:31 pdurbin https://github.com/Netflix/PigPen
18:32 pdurbin clojure macros are nothing like C macros
18:32 pdurbin used for transformations
18:32 pdurbin "this is the ranty part of the talk"
18:33 pdurbin objects are like marionettes
18:38 pdurbin soccer, strings, big spaghetti nightmare :)
18:39 pdurbin system - "to cause to stand"
18:41 pdurbin systems are made with dynamic, extensible types
18:43 pdurbin clojure has process and state, it isn't "pure", it's for getting work done
18:44 pdurbin has explicit constructs for state
18:44 pdurbin functional succession model
18:45 pdurbin references are the thing you can change
18:45 pdurbin you can't change values
18:48 pdurbin emphasize flow over places (acorn behind a tree)
18:48 pdurbin smaller programs are better
18:49 pdurbin fewer bugs, etc.
18:49 pdurbin lots of langs are good at concision
18:50 pdurbin in java, every object has its own little language
18:50 pdurbin example from HttpServletRequest
18:52 pdurbin heh. "somethin' better happen when I hit dot in my IDE"
18:54 pdurbin the HTTP request was data before it was transformed into a crazy HttpServeletRequest object
18:55 pdurbin oh, earlier he showed this code as an example of clojure: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Norvig_Spelling_Corrector
18:56 pdurbin clojure has a small core, vigorously protected
18:58 pdurbin clojure is stable
18:58 pdurbin made for production use
18:59 pdurbin counterclockwise for Eclipse
18:59 pdurbin Cursive for IntelliJ
19:35 aditsu joined #sourcefu
19:38 pdurbin ---
19:39 pdurbin oh, Rich says he has no plans to ever support continuations in Clojure. We asked :)
19:39 pdurbin ---
19:39 pdurbin next session: Securing JAX-RS Services with OAuth 2 [CON3774] https://oracleus.activeevents.com/2014/connect/sessionDetail.ww?SESSION_ID=3774
19:39 pdurbin with Miroslav Fuksa (@miroslav_fuksa) | Twitter - https://twitter.com/miroslav_fuksa
19:42 pdurbin various JavaOne2014 examples at https://github.com/mfuksa/jersey/branches
19:42 pdurbin old way @RolesAllowed("admin") on @Post
19:43 pdurbin now on to OAuth
19:43 pdurbin using Twitter as an example of a Service Provider
19:43 pdurbin the individual is the Resource Owner
19:44 pdurbin Consumer/Client wants to show my tweets
19:44 pdurbin you don't want to give the Consumer/Client your Twitter password, obviously
19:45 pdurbin could think of the Consumer/Client as TwitPic, I guess
19:47 pdurbin Authorization Flow is the process of issuing a new Access Token
19:47 pdurbin Access Token is sent in HTTP header
19:51 pdurbin first example: OAuth 2 Authorization Code Grant Flow
19:53 pdurbin Authorization header
19:55 pdurbin Open ID Connect used to verify identity and obtain basic user information
20:11 pdurbin saying we need to implement CredentialPersister and FlowPersister
20:11 pdurbin https://github.com/mfuksa/jersey/blob/JavaOne2014-oauth2-new/examples/oauth2-server-webapp/src/main/java/org/glassfish/jersey/examples/oauth2/server/providers/InMemoryCredentialsPersister.java
20:12 pdurbin https://github.com/mfuksa/jersey/blob/JavaOne2014-oauth2-new/examples/oauth2-server-webapp/src/main/java/org/glassfish/jersey/examples/oauth2/server/providers/InMemoryFlowPersister.java
20:14 pdurbin example
20:14 pdurbin Service Provider: JerseyDev tracks contibutions
20:14 pdurbin Consumer: NullPointer tracks number of NPEs fixed and caused
20:17 pdurbin showing https://github.com/mfuksa/jersey/blob/JavaOne2014-oauth2-new/examples/oauth2-server-webapp-consumer/src/main/java/org/glassfish/jersey/examples/oauth2/server/consumer/resources/JerseyDevResource.java
20:18 pdurbin and https://github.com/mfuksa/jersey/blob/JavaOne2014-oauth2-new/examples/oauth2-server-webapp-consumer/src/main/java/org/glassfish/jersey/examples/oauth2/server/consumer/resources/AuthorizationResource.java
20:19 pdurbin that was the client side
20:20 pdurbin on the server side he shows the InMemory stuff I linked above
20:23 pdurbin starts at 9999/nullpointer, logs in at 8080/jerseydev
20:24 pdurbin a demo of authorization flow

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

http://sourcefu.com