Fork me on GitHub
#beginners
<
2015-12-24
>
slester01:12:30

@kopasetik: also http://adventofcode.com is currently running!

jeff.engebretsen03:12:04

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.

kopasetik20:12:45

Ruby likes underscore_case, Python likes snake_case (same thing, heh), JS likes camelCase, Clojure likes…???

kopasetik20:12:18

What are the proper Clojure naming conventions?

solicode20:12:14

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"

kopasetik20:12:13

@solicode: Cool, thanks!

solicode20:12:38

@kopasetik: “lisp-case” seems to be quite common too. I personally like kebab though. simple_smile

kopasetik20:12:28

OK, trying to make this anonymous function work: (#(* (str "this " % " is awesome!")) "function”)

kopasetik20:12:12

Rather, (#((str "this " % " is awesome!")) "function")

kopasetik20:12:33

Still not working

kopasetik20:12:20

OK figured it out: extra pair of parentheses

mudphone23:12:17

@polymeris: I feel like there’s a func for that...

mudphone23:12:09

oh sorry, was looking at an old post. you got it.

mudphone23:12:11

@kopasetik: you have some parens that you could remove there

mudphone23:12:14

for example

kopasetik23:12:09

Thanks for the message. simple_smile

mudphone23:12:26

maybe this is what you meant, though

mudphone23:12:31

(#(str "this " % " is awesome!") "function”)

mudphone23:12:08

I’m not aware of your context, but you could just replace % with “function” simple_smile

mudphone23:12:34

(str "this " "function" " is awesome!”)

kopasetik23:12:32

I figured it out earlier. Thanks though! simple_smile