#clojure logs

2016-03-12

01:19cflemingclgv: TEttinger: Sorry, I'm around more in Slack than in IRC these days.
01:22TEttingerah, thanks for the heads-up
01:22TEttingerdo I need an invite?
01:23TEttingercfleming: I've had a nagging issue with dependencies not appearing in anything IntelliJ/Cursive sees except for the REPL
01:24TEttingerREPL allows me to import stuff fine, but the lein deps don't seem to appear at all in the editor
01:24TEttingerI don't know if this is a known bug or a config issue on my side
01:30cflemingTEttinger: I don't think so, I think you can sign up at clojurians.slack.com
01:30cflemingTEttinger: Are you refreshing after adding them to the project.clj?
01:30TEttingerthat's part of the issue too I think
01:30TEttingerit doesn't seem like quite a lot of options are present
01:30TEttingerlet me check
01:31cflemingYou should be able to use Cmd/Ctrl-Shift-A and search for Refresh Leiningen Projects, or you can open the Leiningen toolwindow.
01:32cflemingI'm planning to add a warning soon that the current project.clj has been modified since the last refresh, with a shortcut link to refresh immediately.
01:32cflemingThis causes all sorts of problems for people, it's a real source of confusion.
01:32TEttingerhm, I just can't find refresh anywhere
01:32TEttingerhttp://i.imgur.com/JcFpKun.png
01:32TEttingerI'll try that shortcut
01:34TEttingerclicked the leiningen project refresh one, nothing seems different
01:34cflemingThat's in the lein toolwindow?
01:35cflemingOk, do you see the dependency in External Libraries at the bottom of the Project view?
01:35TEttingerI don't have a lein toolwindow
01:35cflemingSure you do :)
01:35TEttingerand no, only... a few things in external libs
01:36cflemingView->Tool Windows->Leiningen
01:36TEttingerI imported the project.clj, but I really haven't seen any lein tool window
01:36TEttingerah!
01:36TEttingerlisted there, but not in external libs
01:36cflemingSo in the toolwindow, hit the refresh button there.
01:37TEttingeryep, did that, still not seeing the imports
01:37TEttingerit's a java class I'm trying to import, and it isn't from maven central or clojars if that matters
01:38cflemingYou don't get any errors when refreshing your project?
01:39TEttingerno, it shows nothing
01:39TEttingeryou can see why I was confused :) I think it may be a config issue
01:40TEttingerpartially installed cursive or something. running community 15.0.4
01:40cflemingSo just so I'm clear - this class comes from a dependency in your project.clj, right?
01:40TEttingeryes, let me actually gist that
01:41cflemingThat dep isn't in maven central or Clojars, so you're installing it locally into .m2? Or using another repo?
01:41cflemingThat would be great
01:41TEttingerhttps://gist.github.com/tommyettinger/0259d15be0ce241e4a46
01:41TEttingerit's another repo
01:42TEttingerI could try a local install
01:42TEttingerhm, no
01:42TEttingerjitpack is great, but it changes some names
01:42cflemingOk, so squidlib comes from the jitpack repo?
01:43TEttingeroh d'oh. I might have got it
01:43TEttingerit's possible it was already installed in my .m2 so the repl could see it
01:43TEttingerbut the project.clj was looking for a weird name
01:43cflemingOk - that -SNAPSHOT version is bizarre
01:43cflemingIs that right?
01:44TEttingeryes
01:44cflemingShouldn't that be master-SNAPSHOT?
01:44TEttingerand that wasn't the issue, the one I just said
01:44TEttingerlet me check jitpack's docs
01:45cflemingLet me try to import that project, one sec.
01:47TEttingerI can't make heads or tails of this https://jitpack.io/docs/BUILDING/#multi-module-projects
01:47TEttingerit doesn't say if lein needs an extra section of some kind
01:47cflemingActually, it looks like a lein problem
01:47TEttingerhm
01:47TEttingerI'm on 2.5.3
01:48TEttingerit's probably an ancient version
01:48cflemingI got your project.clj, and put it in a directory. lein deps :tree downloads a bunch of squidlib stuff, but doesn't add it to the dependencies.
01:48TEttingereh... eh? eh.
01:48TEttingerthat's bizarre
01:49cflemingI'd just download the repo and install it locally.
01:49cflemingThat should work.
01:49cflemingI don't know what jitpack is doing, but lein doesn't like it.
01:50TEttingertrying master-snapshot now
01:50TEttingeryeah, jitpack is really fantastic for java dev
01:51cflemingExcept that it doesn't seem to work very well :)
01:51TEttingerindeed, for clojure it needs way better docs :|
01:52cflemingIt's not just that, it's doing something very strange:
01:52cfleminghttps://gist.github.com/cursive-ide/4422cfa7e21ba4104403
01:52TEttingerthe really strange thing is I don't see any transitive deps of one project that has a bunch
01:53TEttingerwhy... is it adding a dep to parent....
01:53TEttingerthat's a pom-only parent project
01:53TEttingerno code
01:54cflemingRight, I don't think jitpack is handling the deps properly. I see it downloading jars, but they aren't put anywhere in the cache.
01:54cflemingActually, I lie, sorry, they're there - spot blindness.
01:55cflemingAnyway, I'm not sure what the problem is sorry, but it looks like a lein issue. I think probably lein doesn't like that version much.
01:56cflemingIf you use the -v3.0.0-b3-g386143b-39 version, it works, at least for lein - I bet Cursive will pick them up too.
01:56TEttingerwhaaaaaaaat is going on!
01:56cflemingIt doesn't like the -SNAPSHOT version.
01:56TEttingerI tried lein deps :tree at the command line!
01:57cflemingMaybe it trims -SNAPSHOT from the version, or something.
01:57TEttingerand it doesn't see any deps other than clojure
01:57cflemingRight.
01:57cflemingOr you mean you don't get clojure-complete or nrepl either?
01:57TEttingersorry yes
01:57TEttingerI get those two
01:58TEttingerbut they aren't listed as deps in project.clj, they could be implicit?
01:58cflemingYes, lein adds them.
01:58cflemingBut that's what I meant above - lein doesn't add those deps.
01:58TEttingerhmm
01:58cflemingIf you use the explicit version, it does, and I bet Cursive will see them then.
01:58TEttingerthat is odd
01:58TEttingerok, I will try
01:59TEttingerI would like to get a snapshot build but it looks out of the question somehow
01:59cflemingI think if you download the repo, and compile and install it locally, you can get a snapshot version.
02:00cflemingBut jitpack doesn't work for whatever reason. master-SNAPSHOT might work, though.
02:01cflemingmaster-SNAPSHOT doesn't work either.
02:02cflemingGot to go, sorry
02:03TEttingeryou're a hero cfleming!
02:03TEttingerit works now
02:03cflemingWith the explicit versions?
02:03TEttingernot -SNAPSHOT, but the example you give works
02:03TEttingeryes
02:03cflemingNice!
02:03TEttingerthanks so much
02:04TEttingeras recompense, here's the cat who has been gradually forcing me out of my seat https://dl.dropboxusercontent.com/u/11914692/Satchmo_Portrait.png
02:20cflemingTEttinger: That's a pretty cute cat :)
02:20TEttingerhe's a good un. loves water
02:21TEttingerhe's happy about southern california getting some rain finally
07:45pvinishello. when using cider and eval something, how can i keep the overlay after moving the cursor?
08:38Xackis it normal that `lein repl` uses around 300MB of RAM? :(
08:38justin_smithdepends on your deps, but that sounds about right
08:39justin_smithXack: if you follow the instructions for FAST_TRAMPOLINE that will also reduce RAM usage (by launching the process in the same VM instead of launching three vms total)
08:39justin_smith~faster
08:39clojurebotfaster is https://github.com/technomancy/leiningen/wiki/Faster
08:40justin_smithalso if you avoid starting nrepl, you can cut it down to one vm running
08:40Xack :dependencies [[org.clojure/tools.nrepl "0.2.12"]]}}
08:40Xacki see, thanks!
08:40justin_smiththat faster link also describes how to start clojure.main directly
08:41justin_smithnrepl has great features, but it also means you need two processes, the client and the server
08:42justin_smithif you are connecting from eg. an editor, you can trampoline repl :headless as well (still accepts connections, doesn't start a second client vm)
08:42Xacki see, thanks!
10:15pilnei feel like between clojure and clojurescript, using a browser for any "gui", is probably my best bet when it comes to what i'd like to create (relatively/easily portable x-platform (mostly desktop, possibly android, doubtfully iOS), applications, in terms of "learning" overhead. clojure seems to be one of the best 1:1 mappings of the jvm language to the js, but i haven't dug deep into scala or kotlin as much, due to... not liking
10:15pilnethem as much, and i can be lazy...
10:17pilneand... i can't help that i think in s-exprs >.<
10:18dysfunclojure/script are a good combo for that. there's a phonegap extension that has up to date webkit as well
10:19pilneyes, i have it in the growing list of 'awesome stuff' links... too many bookmarks >.< lol
10:19dysfuni have that with pdfs of academic papers
10:21pilnei looked at doing the javascript all the way down thing like... node.js for a few days... and i'd rather have to treat my functions as "less capable" when going from jvm -> js, than try and make my "less capable" functions into "more capable" functions (at least that's how i felt writing js for a backend), and... a lot of my stuff is more compute oriented than io oriented for now.
10:21pilne... don't get me started on my haskell addiction >.<
10:21pilnewell, ghc... to be proper
10:22dysfunon the haskell side, i find haste better than ghcjs right now
10:22dysfunghcjs will be amazing when it's finished, but that's not today
10:23pilneright after i get a new install, comfy, i install leiningen, stack, virtualenvwrapper, and nvm. lol
10:24dysfuni currently have a project where stack is insufficient for papering over cabal hell
10:24pilnethat's where i enjoy playing, kinda in an order of preference too, but i try to be pragmatic, and yeah, haste is approaching it like "haskell inspired" so they can play a bit more cut-and-loose, whereas ghcjs is like a complete reproduction (i feel)
10:24pilnei'm just a learner... still so.. it suffices for me *knocks on wood
10:25pilneand i get tempted to read about new languages more than i should >.<
10:25pilnei have a love/hate/intrigue for julia and rust as well
10:26dysfuni have to confess i gave up on rust and chose modern c++ for my low level code
10:26pilneand nothing but respect for common lisp, scheme, racket either
10:26pilnerust is still... polishing (irony?)
10:26dysfunyeah, but i'll need to deploy before they get that far
10:26pilnei think anyone who likes clojure, could enjoy htdp and/or sicp implemented in racket
10:27pilnepragmatism is always the better way
10:27pilneit is possible to write "nice" c++, it just takes more effort lol.
10:27dysfunmodern c++ is a different animal, but it's a huge language
10:28pilneyeah, you can avoid a lot of the pitfalls if you stick to as much 11/14 as possible
10:28dysfunyeah, i now require c++14 by default
10:28pilnestill too big for my brain
10:28pilnei respect it, but fear it in my hands >.<
10:28dysfunsome of my c++ is on the bleeding edge because it gives me the ability to achieve more safety
10:29pilnei'm cool with the 12guage that is macros, but not the vulcan cannon that is c++
10:29dysfunperhaps you'd like one of my projects that i've been hacking on today: simplified c++ with clojure syntax
10:29pilneO.o
10:29pilnethat could be quite pragmatic in a lot of situations
10:29pilnethat's like pixie.. but with balls
10:30dysfuni got fed up of not being able to have macros after a few months of c++ hacking
10:30pilneno offense to pixie btw
10:30pilneyeah, macros are what i hate the most when i'm not in a lisp... it's painful!
10:30dysfuni might be more interested in pixie if they got it off python
10:31pilneagreed, it made it easier, but... GIL >.<
10:31pilneand good c++ is easier to port around a bit imho
10:32dysfunso i'm building a cross-platform app (desktop and mobile) and the only way i can minimise repetition and have the option to replace guis is to use c++ for the bulk of the code
10:32pilneoh, and repls... mustn't forget those wonderful things :)
10:33dysfunnaturally c++ is more annoying to bind than C, but oh well
10:33dysfuni'm contemplating emscripten
10:33pilneif it needs a lot of efficient low-level access yeah, that would make sense, i'm not going quite that far yet, so jvm level should work fine for me
10:34dysfunyeah, there are some things you just don't do in java
10:35pilneevery single platform out there has pros and cons, you just find one that has cons you can avoid or work with lol.
10:35dysfunthat's your first job as a programmer, identify which things might possibly work for your use case
10:35pilnebecause if "rainbowshittingunicorn" lang existed, we'd all be using it.
10:36pilneit's like writing a sudoku solver in assembly by hand, sure you can, but why not prolog?
10:37dysfunbecause no.
10:37pilnelol
10:41dysfunpilne: have you use core.logic?
10:42pilnei haven't more than some passing intros yet
10:42pilnei do like what i've seen though :)
10:42dysfunlikewise. i was hoping for a prolog user's view of it
10:43pilneit doesn't seem quite as "elegant" as prolog (but i'm an odd duck) for the syntax and application, but, it looks to be feature-complete, and integrates with a langauge that could add interesting functionality to the present-features
10:43pilneand a wild hyphen appears
10:44dysfuni think the design of the prolog standard library is really excellent, but i also think the same of clojure
10:45pilnein short, it's pros far outweigh it's cons, for me, i just dabbled in that 7 languages book enough to get an appreciation for prolog.
10:45pilnekinda blew my mind
10:45dysfunheh
10:45dysfuni was reading the manpage for swipl the other day and it referred to the book i'm currently using as a rolling mat
10:45pilnelol
10:46pilnein ways it reminds me of fortran, like a razor in its intended domain, from an era where it was beneficial to have highly specialized programming languages
10:47pilnenow we toss around gigabytes like they are nothing...
10:47AimHereBack in Fortran's day, it was pretty much the one programming language, and was necessarily general purpose
10:47pilneghz, cores... pipelines
10:48pilnethe application domain of computers was smaller then as well
10:48pilnethe evolution and intermixing of different paradigms is fascinating :)
12:08moredhelhi, I'm having issues understanding why some code isn't working. I believe that what I have written is equivalent, so any help on describing what is actually different would be appreciated: https://gist.github.com/hamhut1066/d4fbcd67cc3ba3f303e2
12:11opqdonut,(macroexpand-1 '(-> dna (map f) foo))
12:11clojurebot(foo (map dna f))
12:12opqdonutmoredhel: ^ see, dna becomes the _first_ arg
12:12opqdonut,(macroexpand-1 '(->> dna (map f) foo))
12:12clojurebot(foo (map f dna))
12:12opqdonutthat's better: ->> puts it in last
12:13opqdonut,(macroexpand-1 '(-> dna ((fn [x] (map f x))) foo))
12:13clojurebot(foo ((fn [x] (map f x)) dna))
12:13opqdonut^ that's how you make the fn hack work: note the double parens
12:13opqdonut,(macroexpand-1 '(-> dna (fn [x] (map f x)) foo))
12:13clojurebot(foo (fn dna [x] (map f x)))
12:13moredhelhmm, thanks. I had forgotten ->/->> were macros
12:13opqdonut^ because this becomes nonsense
12:13opqdonutmoredhel: if you want nonmacro, just use comp
12:14moredhelno, I'm more than happy with macros :)
12:14opqdonutremember macroexpand-1, it's your friend
12:14moredhelyeah, I was looking into that, but there doesn't feel like it's necessary, as the functions are statically defined
12:16moredhelhmm, see, this seems to work... (macroexpand-1 '(->> "AAB" (map opposite-strand)))
12:17moredheluntil I actually try and execute it, and it fails.
12:17moredhel(map opposite-strand "AAB")
12:17moredhel should work
12:17opqdonutwhat happend when you try to execute?
12:18moredhelnvm, I was throwing an expected error, my fault.
12:18opqdonut:>
13:16sdegutisHow can a deftype call one of its own methods? Like, (deftype Foo [] IFoo (calling-from-method [this] (some-method 123)) (some-method [this n] ...))
13:16sdegutisWhat's the syntax and is it even possible?
13:18justin_smithsdegutis: of course it's possible, since you can only define methods that are already defined in a protocol or interface
13:18justin_smithyou can simply call them
13:18sdegutisjustin_smith: so then I have to :refer those methods into the current namespace or something?
13:18sdegutisIf so, "ugh, okay, fine then I guess"
13:19justin_smithsdegutis: no, if you do (deftype Foo [a b] IBar ...) then clojure knows to look up the following method definitions in the IBar interface
13:19justin_smithyou don't need any refer
13:19sdegutisUh.
13:19sdegutisHmm.
13:19justin_smithnow if you want the function version of a protocol method, either call the properly qualified name of the method, or refer it - or hey maybe it just works you could try unqualified call.
13:21sdegutisHmm yeah.
13:21sdegutisI'll just refer it.
13:22sdegutisThanks justin_smith.
13:37justin_smithoh I was wrong, it's not the context of the protocol /interface you declare that would make it resolve, it would resolve the method the same way the method would be resolved in any other context
13:43brianboykoHello. I'm trying to work through "Clojure for the Brave and True" but it seems like the instructions are out of date -- or I don't understand them."
13:44brianboykoI'm able to lein run "Hello world" but I can't build an uberjar that outputs "Hello World."
13:44justin_smithbrianboyko: feel free to ask any specific questions here
13:44brianboykoAnyone here?
13:44justin_smithwhat happens when you try to run "lein uberjar"
13:45brianboykoIt builds two files, both jars, one standalone.
13:45justin_smithright, the one with standalone in the name is the uberjar
13:46justin_smithon linux, you can run that jar, on other platforms you can run 'java -jar target/foo-standalone.jar'
13:46justin_smithor whatever the name, of course
13:46brianboykoRunning this: java -jar app-1.0.0-SNAPSHOT-standalone.jar => no output to the console. But I'm on Linux.
13:46justin_smithbrianboyko: so no error, it just isn't doing anything?
13:46brianboykoNope.
13:47justin_smithwhat's in your -main definition?
13:47brianboyko(ns app.core (:gen-class)) (defn -main "I don't do a whole lot...yet." [& args] println "I'm a little teapot!" )
13:48justin_smithbrianboyko: that doesn't print, that returns a string
13:48justin_smithto call println, you'll need another set of parens
13:48brianboykoI think I saw it as soon as it was all on one line.
13:48justin_smithreturning a string doesn't do anything useful when running the jar
13:48justin_smithbrianboyko: heh
13:48brianboykoSo, basically () around println and the string?
13:48justin_smithbrianboyko: right, in clojure () means "call this"
13:49justin_smithso println without the () is just a function, it doesn't get called
13:49justin_smith,println
13:49clojurebot#object[clojure.core$println 0x577625cb "clojure.core$println@577625cb"]
13:49justin_smith,(println)
13:49clojurebot\n
13:49brianboyko:)
13:50brianboykoThanks. I may need your help. I'm a pig on rollerskates with lisp/closure
13:55ulrichschinzbrianboyko, nice, so I think im gonna stay here... learning as well :) and maybe seing same questions i have ;)
14:02brianboykoRight now I'm pair-programming with my friend Josh, he just told me about Lighttable's support for LightTable's in-line evaluation.
14:03justin_smithcareful with lighttable, last I heard it still had "lose all your code" level bugs
14:03justin_smithor, unsaved changes at least
18:35adam1Hi folks!
18:36adam1I'm quite new to clojure(script), such a wonderful language
18:36qbghello adam1
18:36adam1I do have a question. I've installed leiningen but it's driving my crazy. I catt' start a repl, can't create a new project, can't do anything really...
18:37adam1For instance "Failed to resolve version for mies:lein-template:jar:RELEASE: Could not find metadata mies:lein-template/maven-metadata.xml"
18:37adam1I'm not behind a proxy, no idea why it fails :(
18:37justin_smithis that the only error?
18:38adam1No
18:38adam1"lein repl" results in a long error begining with "Could not transfer artifact org.clojure:tools.nrepl:pom:0.2.12 from/to central (https://repo1.maven.org/maven2/)&quot;
18:38justin_smithcan you share a paste of the full error output?
18:38adam1Sure
18:38justin_smithadam1: are you on ubuntu by any chance?
18:39adam1Yes, ubuntu gnome more precisely
18:39justin_smiththis reminds me of an ubuntu issue (with a different error as the root cause)
18:39justin_smiththey fucked up their java security certificate dep, and so the java process refuses to do the downloads
18:40adam1Arg, no solution then ?
18:40justin_smithoh there is, here's the link in case it is your issue http://askubuntu.com/a/635395
18:41justin_smithbut I wasn't sure you were getting the same error, didn't want to jump to that conclusion
18:41justin_smithso if that doesn't fix it, please do share the whole error output on a paste site
18:42adam1Oh yeah ! Just ran the given command and it's fixed !
18:42justin_smithawesome, if this irc channel had a faq I would have to add that link
18:42adam1Thank you so much !
18:42justin_smithnp, glad it was an easy fix
18:42adam1Repl and creating new projects works perfectly now :)
18:44adam1Well I'll go clojuring around and might come back here once in a while, bye !
18:46rhg135justin_smith: that's what facts are for
18:46rhg135On clojurebot
18:46justin_smithoh, right
18:47rhg135Witty jokes are also an use
18:47justin_smith~ubuntu is there's a simple fix for download failures on ubuntu http://askubuntu.com/a/635395
18:47clojurebot'Sea, mhuise.
18:47justin_smith~ubuntu
18:47clojurebotubuntu is there's a simple fix for download failures on ubuntu http://askubuntu.com/a/635395
19:42bendavisnchey guys, i'm still super new to learning clojure, and i was wondering if i could just throw out a few questions about clojure / lisp compared to non functional approaches like java
19:43bendavisncmainly what changes when thinking / dealing with things like interfaces and design patterns
19:43bendavisncare design patterns as much of a thing in the clojure world?
19:49qbgAre you comparing it to Spring's AbstractSingletonProxyFactoryBean?
19:54ben_vulpesbendavisnc: write a bunch of functions, and when that starts to hurt check in
19:55ben_vulpesif you really need protocols or interfaces, take a look at the reloaded libraries for how that's done
19:57bendavisncok so i'mma infer because i for some reason can't get a straight answer that the answer is "no, design patterns aren't as much of a thing"
19:57justin_smithI use the interpreter pattern in clojure all the time
19:57justin_smithsome patterns are just the right way to use the language (because the language features support them directly)
19:58bendavisnclike let me throw a specific example
19:58bendavisncdecorator? facade?
20:00justin_smithmany typical usages of first class functions could be called decarator, in particular in middleware. But we don't tend to reference decarator by name.
20:00bendavisnchmmm ok. thanks
20:00bendavisnci think i need to read this
20:00bendavisnchttp://mishadoff.com/blog/clojure-design-patterns/
20:00ben_vulpesno, "design patterns aren't much of a thing"
20:00justin_smithbut it is different because instead of adding fields to a class, this is passing a function to another function and getting a new function back
20:01bendavisnchmmm ok
20:03bendavisnci mean i've read a bit about protocols like seq. and idk... i assume the gof matra of "always program to an interface" is still true in lisp land? right?
20:03justin_smithbendavisnc: in a normal lisp it's so pervasively a single interface (list) that it's invisible
20:03justin_smithbut yes, in clojure all the core functions call interface code
20:04justin_smithwe do have more variety of interfaces than a typical lisp
20:04bendavisncyeah i guess long story short. i've come to be really interested in clojure, but i've sorta hit somewhat of a wall when trying to figure out how to have basic extends style inheritance
20:04justin_smithbendavisnc: for example, it's actually impossible to implement methods on a deftype or defrecord call unless they are defined by some interface or protocol first
20:05justin_smithbendavisnc: don't
20:05justin_smiththat is, don't use inheritence
20:05bendavisncok
20:05justin_smithbendavisnc: I think the book that would really help you is Joy of Clojure
20:05bendavisnci've been reading clojure for the brave and true and really like it
20:05bendavisncbut i've been sorta skipping around honestly
20:06justin_smithbendavisnc: one thing about clojure's design is that it's very opinionated, one of those opinionated things is the avoidance of concrete inheritence
20:06ben_vulpes(without clos, there's not much oop in clojure)
20:06ben_vulpes(that i've seen)
20:06yonatankorenclojure for the brave and true, 4clojure, and also Clojure for Machine Learning by Wali greatly helped me
20:06bendavisncso if i have a basic inheritance situation though
20:06justin_smithben_vulpes: every function is an object that implements callable,
20:07bendavisncsay i have an animal, a cat, and a dog
20:07justin_smithbendavisnc: then change your design such that you don't
20:07bendavisnchow do i split this code up?
20:07yonatankoren4clojure is not a book btw, it's a set of exercises. I improved mostly from that (practice)
20:07bendavisncwhere can i put dog/run, cat/run, animal/run?
20:07yonatankorenas an introduction clojure for the brave and true is a really good book
20:08bendavisncthis would just be like maybe one protocol and three def records ?
20:09justin_smithbendavisnc: don't use concrete inheritence, it's just clumsy in clojure and not worth it. Make an IAnimal protocol if you must, define the methods in that protocol, but that only defines signitures and does not implement any logic. Then implement it in Dog and Cat records
20:09justin_smithbut you probably don't need to do any of that, and don't do it until you can prove you need to
20:09bendavisncok i think i hear you
20:10bendavisnci'm right in how i think you mimic let's say java style inheritance, but try to keep everything a plain function instead
20:10bendavisncok let me ask one more question
20:10bendavisnckinda towards the annoying same vain, but different
20:11justin_smithbendavisnc: we wouldn't mimic java inheritence anyway - we don't abstract the jvm enough for that. When we inherit we produce actual bytecode for a class that inherits. But this tends to be a poor choice in clojure.
20:11bendavisncwould it be possible to use clojure to implement java interfaces though?
20:12justin_smithyes
20:12justin_smithbendavisnc: to define them, or extend them, yes
20:12justin_smiththese are both actually quite easy things to do
20:12bendavisnci'm thinking for like specifically android development where basically i just import one big jar for the implementations of my java interfaces
20:13bendavisncdo ppl do that ever?
20:13justin_smithit's very easy to call java from clojure, or clojure from java, whichever makes sense situationally
20:13bendavisncdoes that sound to weird or impossible?
20:13justin_smiththere's projects for clojure on android yes
20:13bendavisnci'm thinking about how big this clojure included jar will be
20:13justin_smithwell, if you run clojure you need to load the compiler
20:13bendavisncright ok. but i'm thinking more like normal java deployment. like more java centric maybe
20:14justin_smithsure, what we do is package an uberjar that includes clojure.core, and have clojure itself launch the code
20:14justin_smiththis is neccessary because of the things clojure code is allowed to do at runtime
20:16bendavisncalright. thanks guys. i'm real new to functional programming practice. thanks for bearing with me
20:38troydmhow do I extend-type vector or generally any arbitary Sequence?
20:46troydmnvm figured it out
22:33sharmsI have a two lists: x ([1 2]) and y (([3 4])) - what is the best way to join these together to make ([1 2] [3 4])? For y it could be deeply nested
22:41justin_smithsharms: so you don't know how y is shaped? what's the rule that decides what part of y you want?
23:09Elijah1310hey