This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-24
Channels
@kopasetik: also http://adventofcode.com is currently running!
I've got this class thing
(ns bf-helper.alexa.speechlet
(:require [clojure.tools.logging :as log]
[bf-helper.alexa.router :as r])
(:import (com.amazon.speech.ui PlainTextOutputSpeech Reprompt)
(com.amazon.speech.speechlet SpeechletResponse))
(:gen-class
:main false
:implements [com.amazon.speech.speechlet.Speechlet]
:prefix "speechlet-"
:init "init"))
How do reference it in another file? I tried in (:require ...)
and (:import ...)
I still get ClassNotFoundException
when I try to new one up.Ruby likes underscore_case, Python likes snake_case (same thing, heh), JS likes camelCase, Clojure likes…???
Clojure and most Lisps use hyphens. I don’t know the official term for it, but I often see it referred to as “kebab-case"
@kopasetik: “lisp-case” seems to be quite common too. I personally like kebab though.
OK, trying to make this anonymous function work:
(#(* (str "this " % " is awesome!")) "function”)
@polymeris: I feel like there’s a func for that...
@kopasetik: you have some parens that you could remove there