Skip to content

Instantly share code, notes, and snippets.

@dermarens
dermarens / gist:982b632c17aca0b8ce01
Created January 8, 2015 11:29
gmbal typelib debugging
This file has been truncated, but you can view the full file.
Jan 08, 2015 12:18:03 PM org.glassfish.grizzly.servlet.WebappContext deploy
INFO: Starting application [hello] ...
Jan 08, 2015 12:18:03 PM org.glassfish.grizzly.servlet.WebappContext initServlets
INFO: [hello] Servlet [eu.marens.grizzly.hello.Server$1] registered for url pattern(s) [[/helloServlet/*]].
Jan 08, 2015 12:18:03 PM org.glassfish.grizzly.servlet.WebappContext deploy
INFO: Application [hello] is ready to service requests. Root: [/hello].
(main): (GMBAL).typelib.TypeEvaluator.evaluateType->(class org.glassfish.grizzly.http.server.jmx.HttpServer)
(main): (GMBAL).typelib.TypeEvaluator.visitClassDeclaration->(class org.glassfish.grizzly.http.server.jmx.HttpServer)
(main): (GMBAL).typelib.TypeEvaluator.getCorrectDeclaration->(class org.glassfish.grizzly.http.server.jmx.HttpServer)
(main): (GMBAL).typelib.TypeEvaluator.getCorrectDeclaration::(No result in evalClassMap)
@dermarens
dermarens / gist:353208676dc79bb621e7
Created January 6, 2015 18:17
Grizzly 2.2.22 with IBM Java
Grizzly 2.2.22 with IBM Java
java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470_27sr1fp1-20140708_01(SR1 FP1))
IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20140707_205525 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR1_20140707_1408_B205525
JIT - tr.r13.java_20140410_61421.07
GC - R27_Java727_SR1_20140707_1408_B205525_CMPRSS
J9CL - 20140707_205525)
package nested;
import java.util.logging.Logger;
public class TopLevel {
static final Logger LOG = Logger.getLogger(TopLevel.class.getName());
public static void main(String[] args) {
TopLevel t = new TopLevel();
ghci> langs = ["ruby", "python", "perl"]
ghci> groupBy (\(x:_) (y:_) -> x == y) langs
[["ruby"],["python","perl"]]
ghci> map (\(x:xs) -> toTitle x:xs) langs
["Ruby", "Python", "Perl"]
ghci> let w = words "a c d b e"
ghci> sort w
["a","b","c","d","e"]
ghci> reverse $ sort w
["e","d","c","b","a"]
ghci> sortBy (\x -> \y -> compare x y) w
["a","b","c","d","e"]
ghci> foldl (++) "" w
"acdbe"
@dermarens
dermarens / elegance.rb
Created December 11, 2011 13:37
Small Sample of Ruby Elegance
w = %w[a c d b e]
w.sort #=> ["a", "b", "c", "d", "e"]
w.sort.reverse #=> ["e", "d", "c", "b", "a"]
w.sort { |a,b| b<=>a } #=> ["e", "d", "c", "b", "a"]
w.reduce(:+) #=> "acdbe"
w.map(&:upcase) #=> ["A", "C", "D", "B", "E"]
w.include? "a" #=> true