#clojure logs

2015-01-25

14:48gfrederickschouser update: chouser appreciates being watched out for
14:48chouserThat's ... comforting?
14:49gfredericksclojurebot: chouser is C. House R.
14:49clojurebotAlles klar
14:49sdegutisjustin_smith watches over chouser as he sleeps, ostensibly to protect him etc
14:53uptownto catch a predicator
14:56imancholy carp - an hour staring at that code example and the penny has just dropped
14:56SagiCZ1imanc: was it loud?
14:57imancoh yes
14:58augustlis there a function to create an infinite sequence of the same item?
14:59augustlI'm trying to (zipmap that-infinite-collection (map :get-some-val other-coll))
14:59justin_smithaugustl: repeatedly?
14:59SagiCZ1,(take 10 (repeat 4))
14:59justin_smithor even repeat
14:59clojurebot(4 4 4 4 4 ...)
14:59justin_smithyeah
14:59augustlon second thought.. will zipmap handle an infinite sequence as its first argument? :)
14:59justin_smithaugustl: wait, it would need to be the second arg...
15:00justin_smithaugustl: it will handle it, by having each one replace the previous
15:00justin_smithso you end up with only one key
15:00augustldoh, what was I thinking, brainfart
15:00justin_smith&(zipmap (repeat 10) [:a :b :c :d])
15:00lazybot⇒ {10 :d}
15:01chouserthat amuses me
15:01justin_smith&(zipmap [:a :b :c :d] (repeat 10))
15:01lazybot⇒ {:d 10, :c 10, :b 10, :a 10}
15:02kaiyinclojurebot is Dutch?
15:02justin_smithchouser: we can add it to our obfuscated clojure toolkit, along with ##((get get get get) {:a 0} :a)
15:02lazybot⇒ 0
15:03chousernice
15:03SagiCZ1,(get get get get)
15:03clojurebot#<core$get clojure.core$get@72a421fc>
15:03SagiCZ1,get
15:03clojurebot#<core$get clojure.core$get@72a421fc>
15:04SagiCZ1,(get {:a 0} :a)
15:04clojurebot0
15:04SagiCZ1,(= get (get get get get))
15:04clojurebottrue
15:04SagiCZ1,(= + (+ + + +))
15:04clojurebot#<ClassCastException java.lang.ClassCastException: clojure.core$_PLUS_ cannot be cast to java.lang.Number>
15:04dpathakjhaaa, that’s nice
15:04SagiCZ1is it...
15:04justin_smithSagiCZ1: the trick with the four gets is that get is very forgiving about its first arg
15:04dpathakjSagiCZ1: sorry, timing issue.
15:05dpathakjreferring to the (get get get get) thing
15:05SagiCZ1dpathakj: yeah i just think its not very nice..
15:05dpathakj,(doc get)
15:05clojurebot"([map key] [map key not-found]); Returns the value mapped to key, not-found or nil if key not present."
15:05SagiCZ1yeah so the first args should be a map
15:05justin_smithI aint gonna lie, I am proud of (get get get get), and sad that it is likely my most notable contribution to the world of clojur programming
15:05SagiCZ1heh
15:05justin_smithSagiCZ1: associative
15:06justin_smitha set or vector or whatever would work there too
15:06SagiCZ1justin_smith: so why get works too?
15:06mavbozoi try to login to datomic.com but it says "Username or Password incorrect". I try to reset my password, it says "Email address not found.". Maybe its database currently time travels to the past.
15:07justin_smithSagiCZ1: get takes up to three args - if the second is not "in" the first (including situations where the first isn't even an associative structure that supports lookup) it returns the third
15:07chouser,(:foo :foo :foo)
15:07clojurebot:foo
15:07SagiCZ1,(get :foo 42)
15:07clojurebotnil
15:08justin_smithSagiCZ1: now add one more arg
15:08SagiCZ1,(get :foo 42 99)
15:08clojurebot99
15:08SagiCZ1mmmkaaay
15:09justin_smithin conclusion, get is like "The Dude" and will let really weird shit go down because he's like "whatever, just use nil or the default", and is the source of many errors that pop up in other weird places
15:09SagiCZ1justin_smith: so is it considered flawed in a sense?
15:10justin_smithSagiCZ1: considered by whom? it has good reasons to be so forgiving, but also leads to confusing errors popping up elsewhere
15:10SagiCZ1i see
15:11justin_smithand of course get is what implements hash-maps or keywords used in the function position
15:11justin_smith(or symbols even)
15:11justin_smith,('a 'b 'c 'd)
15:11clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: Symbol>
15:11justin_smithoops!
15:11justin_smith,('a 'b 'c)
15:11clojurebotc
15:11SagiCZ1very odd
15:23chouser,[(gensym) :a, (gensym) :b]
15:24clojurebot[G__27 :a G__28 :b]
15:24chouser,{(gensym) :a, (gensym) :a}
15:24clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Duplicate key: (gensym)>
15:25justin_smith,`{~@[:a 0] ~@[:b 1]}
15:25clojurebot{:b 1, :a 0}
15:25justin_smith,`{~@[:a 0] ~@[:b 1] ~@[:c 2]}
15:25clojurebot#<RuntimeException java.lang.RuntimeException: Map literal must contain an even number of forms>
15:29justin_smithbut, of course this works ##(do `{~@[:a 0 :b] ~@[1 :c 2]})
15:29lazybot⇒ {:c 2, :b 1, :a 0}
15:34dpathakj,(source get)
15:35clojurebotSource not found\n
15:36AeroNotixI'm sure I've asked this before, but why isn't there a def- ?
15:36hellofunki'm curious about your gensym map keys there. not behaving the same as your vector, chouser
15:37Bronsahellofunk: at read-time (gensym) is the same as (gensym), the map can't have two equal keys
15:37hellofunkBronsa: so key duplication in maps is a reader task, not a compiler?
15:38justin_smith{} is a read time construct, so it kind of needs to be as I understand it
15:38hellofunkah, i see.
15:40hellofunkjustin_smith: wait, how is {} read time, yet [] is not?
15:41justin_smith[] doesn't care how many items are in it
15:41justin_smith{} cares about duplicates, and needs an even count
15:41hellofunkjustin_smith: actually i guess they'd both be, but vectors don't have these constraints on content, so reader lets it through
15:41justin_smithright
15:42hellofunki don't think of those as reader constructs. is the compiler seeing them as hash-map and vector fns?
15:42Bronsa,(read-string "{1 1}")
15:42clojurebot{1 1}
15:42Bronsa,(class (read-string "{1 1}"))
15:42clojurebotclojure.lang.PersistentArrayMap
15:42Bronsahellofunk: that's what the compiler sees them as
15:43hellofunkBronsa: i tried that read-string earlier and was suprised to see the reader output be the same as the input
15:43Bronsait's not the same
15:43Bronsayou input a string, you get back a map
15:44Bronsahellofunk: this is how lisps work. eval takes a lisp form, so does the compiler
15:45andyfI was wondering about the ?expanded from the outside in? nature of macros recently. Would anything ?go wrong? if one tried to implement macros that ?expanded from the inside out? ?
15:45andyfand of course all of those ? or whatever you saw them as should be quotes
15:50hiredmanI think ideally macros would be expanded as you walk down the tree and then expanded again walk back up, until you reach a steady state
15:50gfredericksmacros should expand in alphabetical order
15:51hiredmanso if you have a macro that wants all its args macroexpanded, it can jsut decline to do anything for the down the tree pass, and do all its work on the up the tree pass
15:53gfredericksit always seemed like macroexpanding the args was a feature that deserved to be builtin
15:53andyfDo Common Lisp macros have the same 'outside in' behavior?
15:54andyfCan't say I've ever noticed, as I haven't written any macros fancy enough that I've noticed a difference.
15:58AeroNotixandyf: what would be the benefit?
15:58gfredericksI wrote a macro for curried/partially-evaluated functions that I think had to macroexpand its arguments first
15:59andyfAeroNotix: I haven't thought through it deeply enough to see why, but there was a recent proposal on the Clojure development email list suggesting an alternative to feature expressions, but it had some flaws due to the way that it used macros, because macros expand from the outside in.
16:00AeroNotixI don't see the value in feature expressions, either :)
16:00AeroNotixThey're the same things
16:01andyfDo you see a value in source files that can be used for multiple flavors of Clojure?
16:01AeroNotixOf course, but you can already do that.
16:01andyfYou mean cljx?
16:01AeroNotixsure
16:01alandiperthttps://gist.github.com/alandipert/47f0badda7bcdb28af87 is another way /cc gfredericks
16:02AeroNotixalandipert: madness
16:02gfrederickshuh what?
16:02andyfHow could that be madness if cljx is sufficient?
16:03justin_smithandyf: I think that would require fexpr support - there was extensive debate about fexprs in lisp in the early '80s, they lost and macros won (partially for compiler optimization reasons - fexprs make a whole lot of optimizations impossible)
16:03andyfIt's a stone's throw away :)
16:03AeroNotixandyf: not necessarily a bad thing
16:03gfredericksalandipert: does that relate to me in some way I'm missing?
16:03AeroNotixUsing a tested preprocessor is better than writing yet another preprocessor.
16:03AeroNotixWhat value do feature expressions have over other methods?
16:16AeroNotixanyone^?
16:17justin_smithAeroNotix: what other methods?
16:17justin_smith~anyone
16:17clojurebotanyone is anybody
16:17AeroNotixjustin_smith: well, cljx, gcc defines :)
16:22justin_smithAeroNotix: building is much simpler if all libs are parameterised for clj / cljs in the same way
16:23justin_smithunless the expansion happens before constructing the jar I guess
16:23SagiCZ1what is cljx?
16:23justin_smithSagiCZ1: cljx is a lein plugin for generating clojurescript and clojure from one file
16:24SagiCZ1justin_smith: thank you
16:24SagiCZ1wait, generating?
16:24justin_smithSagiCZ1: it has expressions that expand differently for clj / cljs
16:25SagiCZ1oh.. well thats interesting
16:32zmillerdoes anybody know how to setup a clojurescript project.clj with a dev and prod build? I thought I had done it correctly, but I have to delete the target folder before building prod or it fails.
16:33Glenjaminzmiller: could you post your project.clj?
16:34zmillercan i paste it here?
16:34justin_smithzmiller: use refheap.com, or a github gist, sometihng like that
16:34justin_smithdon't paste it directly here
16:35zmillerhttps://www.refheap.com/96472
16:35zmillersorry, i am new to IRC.
16:39zmilleri don't know if it has to do with the fact that i didn't specify source-map or output-dir, but it looked like those were optional
16:41dnolenzmiller: dev & prod can't really share the same output folder due to different code emission
16:41dnolenzmiller: also there is a #clojurescript channel, probably get answers quicker there
16:41zmillerokay, thank you. i will try specifying an output-dir and see whether that works.
16:42barelyfunctionalHi, had question around type hints, is it possible to type hint Object array?
16:42justin_smithbarelyfunctional: what would that accomplish?
16:42SagiCZ1barelyfunctional: you cant get any more vague than Object
16:43justin_smithyeah, unless I am mistaken, hinting Object would effectively be the same as no hint
16:44barelyfunctionalI dont want object, I want an array of Objects
16:44justin_smithbarelyfunctional: ,(into-array Object [1 2 :a :b "whatever"])
16:44justin_smith,(into-array Object [1 2 :a :b "whatever"])
16:44clojurebot#<Object[] [Ljava.lang.Object;@529088ed>
16:45justin_smithbarelyfunctional: that's not a type hint though, that's creating an array of Object
16:45clojurebotTitim gan éirí ort.
16:45barelyfunctionalsure, but whats the type hint to apply? for a array of ints, it would be ^ints
16:45justin_smithbarelyfunctional: the hint is pointless
16:45barelyfunctionalfor an array of doubles: ^doubles
16:46gfredericks,[(get #{3} 3) (get (transient #{3}) 3)]
16:46clojurebot[3 nil]
16:46gfredericks^ that's great
16:46justin_smithbarelyfunctional: but it would be "[Object;" iirc
16:46justin_smithneeds to be a string
16:46justin_smith(since it has a "[" in it)
16:47barelyfunctionalso its ^"LObject;"
16:47justin_smithI don't think the L belongs there
16:47justin_smithand you need the [
16:47justin_smith[ is part of the name
16:47justin_smitharrays are weird
16:48barelyfunctionalits nasty, i know, vectors are much nicer etc, but i'm working with some performance sensitive code
16:48justin_smithbut the point of hinting is that it lets Clojure compile better code, and the "[Object;" hint cannot help the compiler generate better code
16:48justin_smithif it's performance sensetive you should use something other than Object, because it will need to reflect on every method
16:49SagiCZ1barelyfunctional: you have no idea what will be in the array?
16:49justin_smithunless the only thing you do is lookup?
16:49barelyfunctionalthe only thing i need to do is lookup by index
16:50justin_smithbarelyfunctional: than use aget which is totally unambiguous and does not need hinting
16:50justin_smith(doc aget)
16:50clojurebot"([array idx] [array idx & idxs]); Returns the value at the index/indices. Works on Java arrays of all types."
16:52gfredericksis there a correct way to lookup a key in a transient set?
16:54justin_smithgfredericks: get will just return nil (as you showed us), and contains? fails... are there other options?
16:54barelyfunctionaljustin_smith: so aget has an inline to clojure.lang.RT/aget
16:55gfredericksjustin_smith: .get and .contains
16:55gfredericksseems weird to have to resort to interop
16:55barelyfunctionaljustin_smith: if the compiler can deduce the context it should able able to inline the access with no casting or instance checking
16:56justin_smithbarelyfunctional: I think the way array lookup works, it doesn't need reflection anyway
16:56justin_smitharrays are not Objects
16:56gfredericksarrays are weird
16:57barelyfunctionaldifferent bytecodes for different array type lookups
16:57justin_smithoh really? I didn't realize
16:58barelyfunctionalhttp://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
16:59barelyfunctionalfor instance: daload - load a double from an array
17:00barelyfunctionaliaload - load an int from an array
17:01justin_smithbarelyfunctional: as I understand it those are optimizations for primitives, the other version would just auto-box
17:01gfredericksuapfload - load a UserAuthenticationProviderFactory from an array
17:01justin_smithpart of the general "make N versions of this so we support primitives, plus one more for all Objects" pattern
17:02gfredericksguys...I made an OOP naming joke...that's supposed to be funny.
17:03gfredericksthey told me it would be funny.
17:03barelyfunctionaljustin_smith - yeah i agree its ugly, I'll compile two versions, with and without the type hints and look at the bytecode, would probably make a good blog post, thanks for the type hint advice
17:03justin_smithgfredericks: HumorNotRecognizedError
17:05gfredericksjustin_smith: don't you mean RecognitionErrorProviderRegistry.getInstance().findProvider("Humor").errorFor("Recognition")?
17:06SagiCZ1,(rand)
17:06clojurebot0.011752048560500605
17:07gfredericksthat's not random look how many 5s and 0s and 6s it ends with
17:07SagiCZ1gfredericks: yeah its broken on my machine as well
17:07gfredericksit doesn't even have a 3 on it
17:07SagiCZ1not random enough
17:08SagiCZ1i used it for boolean and it outputed six true's in a row..
17:08gfredericksimpossible!
17:08gfredericksfile a ticket
17:08SagiCZ1exactly!
17:08gfredericksbtw the past tense of output is "outpat"
17:09SagiCZ1is it? now when i think about it shouldnt it be put/put/put?
17:09gfredericksput/pat/pout
17:09SagiCZ1you know it's not nice to josh with non-native speakers?
17:11gfredericksI actually didn't know you were, but I definitely should have hedged that way on IRC
17:12gfredericksI was counting on it being obviously nonsense but that wasn't a good idea
17:12SagiCZ1hah.. ok.. i am sorry i pat you in a bad position, no need to apologize
17:14gfrederickshah
17:16hadronzooAny ideas as to why this multiple-arity protocol doesn't type check? https://gist.github.com/hadronzoo/7e8d2984707cff23bf60
17:22samiswellcoolis there an idiomatic way to use clojure as a server and clojurescript as clientside code in the same project? the best way to transpile the clojurescript into the right place etc
17:22gfredericksBronsa: okay fine but Var#{swap,unbind,commute}Root are surely dead code
17:23samiswellcoolI'm used to javascript/node so I'm not sure the best way to do it with the clojure ecosystem
17:24hellofunksamiswellcool: certainly. the chestnut template (among others) does this
17:24Bronsagfredericks: likely, there is a lot of dead code in the clojure java sources
17:25samiswellcoolI'll have a look at that then. I'm enjoying clojure so far so I'm excited to be able to do the stuff I currently do with javascript
17:25gfredericksBronsa: do you think vars were intended to participate in STM?
17:25hellofunkchestnut is heavy on clojurescript tools and includles weasel and figwheel. but it's an easy intro to clojure/clojurescript combo
17:26hellofunksamiswellcool: ^ , and also, chestnut uses Om
17:26Bronsagfredericks: no idea, I wasn't here back then :P
17:26samiswellcoolI've been looking forward to giving Om a try, I use React a lot
17:26nic77what can clojure be used for? how long has this been around?
17:27samiswellcoolI imagine just about anything, it's a general purpose, practical language
17:27nic77how did you guys start out learning computer languages?
17:27havenwoodwriting batch scripts to launch games
17:28gfredericksnic77: TI-83+ manual
17:28samiswellcoolfound an old Amstrad CPC 464 in my mums cellar and learned amstrad basic usingit
17:28nic77i think ive tinkered with batches and some mirc stuff,
17:28nic77thanks guys that sounds like the ticket
17:29nic77couple good sources :D
17:30samiswellcoolI don't recommend learning the way I did though haha, it was filled with frustration and limited in scope
17:30samiswellcooltook me until 6 years or so after that to really get into coding
17:30gfredericksI don't think I knew a single person who knew how to program for several years
17:30nic77theres a cap on the market with education and often times you can get the book they are going to teach from
17:31justin_smithI first did a very simple program when someone in the advanced class showed me in middle school. But I was a D student so I didn't get into any classes that used computers. My dad refused to allow a computer in our house. I didn't learn to use a mouse properly until I was 22.
17:32nic77i went to a trade school and mostly found out i didnt need to go the school
17:32samiswellcoolI was told growing up that I should stop messing about with computers so much and do something that would help me get a job instead
17:32justin_smithhaha, nice
17:32samiswellcoolI hope that my parents remember that haha
17:33nic77sounds tough samis
17:33hellofunki learned programming on a 1980s calculator by Tandy that was programmable in BASIC. It had 2k of total storage.
17:34nic77its strange how the times go
17:34justin_smithhellofunk: oh, the miniature version of the tandy 100?
17:34gfredericksmy favorite thing about the TI-83+ was that variables could only have one letter
17:34gfredericksI needed lots of auxiliary documentation on notebook paper
17:34hellofunkjustin_smith: let me see if i can dig up a photo/model number
17:35justin_smithgfredericks: in tandy 100 basic, the variable can have as many letters as you like, but only the first two letters in the variable matter - so pie and poke are two different variables, but pie and pig are the same variable
17:35justin_smithwell poke can't be a variable because it is a basic keyword, but you get the idea
17:35gfredericksjustin_smith: that still woulda been nicer
17:36gfredericksyou name things PFDESCRIPTIVENAME
17:36nic77hey samiswellcool maybe your parents werent thinking big enough :D they were exposed and experienced in a small thinking age.
17:36nic77context
17:37samiswellcoolnic77: probably, they've grown with the times since and are very supportive now hah
17:37nic77yeah
17:37nic77my grandpa invested heavy into solar panels in the 70's
17:37nic77about 40 years early
17:37hellofunkjustin_smith: this is the one http://www.rskey.org/CMS/index.php/7?manufacturer=Radio+Shack&amp;model=PC-7
17:38nic77no battle plan survives the first shot
17:38justin_smithmy dad still thinks programming is silly and I should be acquiring basic hands-on survival skills because civilization is going to collapse into a post-technological dystopia (and I think he actually likes the idea of that happening)
17:38nic77justin thats fantastic
17:38justin_smithhellofunk: ahh, not the one I was thinking of
17:38nic77im like your dad justin, the main difference is i want to know about programming!!!!!!!
17:38justin_smithnic77: literally fantastic in the sense of "product of fantasy, having no ties to actual reality"
17:39nic77its amazing
17:39nic77why have it one way or the other
17:39hellofunkjustin_smith: in this thing, each new line number was 2 bytes, i learned from experimentation. so my programs were full of combined statements on a single line to save from multi-line memory bloat
17:39hellofunkgood times
17:39justin_smithnic77: because our technological civilization is evil incarnate and you are rooting for nature to have its revenge of course!
17:40nic77diversification is what ive seen we need as a people im about 26 and thats been the big ask so far as ive been looking
17:41nic77i can make a profit with anything and so far my education has been with my hands all of the guy stuff
17:41nic77its not enough
17:41nic77i can handle the idea of trying to learn everything i guess
17:41nic77just fit it all in
17:42samiswellcoolI'm liking chestnut, a lot
17:42samiswellcoolvery quick to get started
17:42mavbozojustin_smith: according to james mickens, your are already know what to do when society breaks down -> "A systems programmer will know what to do when society breaks down, because the systems programmer already lives in a world without law." https://research.microsoft.com/en-us/people/mickens/thenightwatch.pdf
17:43justin_smithmavbozo: lol, nice
17:43mavbozoanother quote: "The most important person in my gang will be a systems programmer. A person who can debug a device driver or a distributed system is a person who can be trusted in a Hobbesian nightmare of breathtaking scope; a systems programmer has seen the terrors of the world and understood the intrinsic horror of existence."
17:45nic77well survival stuff isnt as elaborate and extensive a subject as anything computer
17:45nic77it should be observed and noted and perfected mentally
17:46nic77then your good
17:46nic77no rules to survival, just dont die
17:47nic77i grew up on a farm camped alot, i can see the need to know everthing if that was a more permanent situation
17:48nic77the more data the better in my opinion statistics paint a nice picture almost a treasure map
18:16SupermanChestHello, everybody
18:19samiswellcoolSupermanChest: hey
18:20SupermanChestI stumbled on this channel whilst searching for a general technology channel.
18:21pdurbinis there a general technology channel?
18:21justin_smiththere's like #programming iirc
18:23pdurbinI think there's an algorithms channel too.
20:58tomvolekHI all a beginner , what does this produce and why ? (set {:one 1 :two 2 :three 3})
20:58gfredericks,(set {:one 1 :two 2 :three 3})
20:59clojurebot#{[:three 3] [:two 2] [:one 1]}
20:59gfrederickstomvolek: it's a set containing three key-value pairs
20:59tomvolekok that I understand . I dont understadn the result when i type into a repel
20:59gfredericksbecause a the `set` function will dump a collection into a set, and the map you give it can be viewed as a collection of key-value pairs
21:00gfredericksyou get something different in your repl?
21:00tomvolek#{[:two 2] [:three 3] [:one 1]}
21:00justin_smithtomvolek: so you mean the ordering?
21:00tomvolekyes
21:00justin_smithsets and maps are not ordered types
21:00justin_smiththere are no guarantees about the order of the contents, at all
21:01tomvolekoh
21:01tomvolekso the order is random ?
21:01gfredericksnot actually
21:01tomvolekwhy doenst it keep the same order that I inputed ... ?
21:01justin_smithnot random - it has to do with hash collisions and space efficiency and such
21:01gfredericksbut there's no reason for you to care what it is
21:01tomvolekok
21:01justin_smithtomvolek: because that would be slower, and use more space
21:02tomvolekok if I want order , then I have to create an ordered set then ... no ?
21:02justin_smithif you want a set that respects insertion order, I think there is one out there
21:02justin_smithbut you can use sorted-set-by if you want them to be sorted by some ordering function
21:02tomvolekjust curious , what do you use Closure for ?
21:03justin_smithtomvolek: ordered sets / maps https://clojars.org/org.flatland/ordered
21:03tomvolektx
21:03justin_smithtomvolek: I use Clojure for web server backends
21:04tomvolekevent processing ?
21:04brainacidYes Hi. I want to install Coljure and my sys asks if I want jdk7 or jdk8? how do I choose correctly?
21:04justin_smithbrainacid: clojure is just a jar file, but it is better to use lein or boot to manage it
21:05brainacidThere is a difference of 36MB over jdk7
21:05tomvolekour company decided to rewrite our platform to be able to scale better using Clojure, I have to learn it fast
21:05justin_smithbrainacid: install as many jdks as you like, newer is likely better, but you don't need the jdk, a jvm suffices
21:05justin_smithtomvolek: oh, that sounds fun and/or intimidating
21:06tomvolek@justin_smith our company's product is a VOIP product ..
21:06brainacidjustin_smith: Thanks for the speedy response.
21:06justin_smithbrainacid: unlike some programming environments, jdks don't break each other, you can have all the jdks / jvms you like installed without stability problems
21:07justin_smithalso, jvms are much better about backward compatibility than most platforms, old stuff breaking with a newer vm is very rare, and is considered a bug to be fixed in almost all cases
21:08brainacidjustin_smith: Thanks for that information. I am very new to Unix and Clojure.
21:08justin_smithbrainacid: similarly, you can have as many versions of any lib installed as you like - each process will only use one version of a given lib, but you won't greak anything by having them all installed
21:09justin_smithbut use lein for library deps, it makes everything much easier (unless you have a compelling need to use something else to manage deps)
21:09brainacidjustin_smith: Very interesting. I wish I had started when I was younger. Oh well I hope I can stick this out... I tend to get frustrated and quit.
21:09tomvolek@brainacid , you can have a small script in yoru .bashrc or .profile to set which JDK or Java you want to use .. ie you can have multiple version of jdk installed but use the one u like
21:09justin_smithbest of luck! there are lots of reasons to love clojure
21:10justin_smithtomvolek: brainacid: yeah, that's what I was trying to get at - they don't conflict with one another, you can pick one as you like
21:10justin_smithyou can even explicitly type in the full path, and for that you don't even need to have the file installed to anywhere in particular
21:10tomvolek@brainacid look at a sample => http://paste.scsys.co.uk/459057
21:11tomvolekI run mac , and have jdk 1.6, 1.7, 1.8 installed and use the one i want
21:11tomvolekthey get installed in different directory , u just invoke the one u like
21:12brainacidI have success: lein repl user=>
21:12justin_smithyeah, lein tends to just work :)
21:12justin_smithand then when it doesn't, there are people here or on #leiningen happy to help
21:13brainacidNow to sort through the documentation to find the correct introduction.
21:13justin_smithintroduction to which?
21:13brainacidYes. justin_smith Thank you and tomvolek as well Thanks
21:14tomvolekI am using 4clojue.com to learn :) , any other site you guys recommend ?
21:14justin_smiththe clojure koans are good
21:15tomvolekcool
21:15justin_smithalso there is "clojure from the ground up" and "clojure for the brave and true" for intros
21:15justin_smith(web tutorials)
21:15justin_smithalso, the books, of course
21:15tomvolekroger
21:15justin_smith~books
21:15clojurebotbooks is book
21:15justin_smitherr...
21:15justin_smith~book
21:15clojurebotbook is http://www.pragprog.com/titles/shcloj/programming-clojure
21:15tomvolekreading the book as of yesterdasy :)
21:16justin_smith~books
21:16clojurebotbooks is http://www.pragprog.com/titles/shcloj/programming-clojure
21:16justin_smiththere are actually multiple factoids, and you don't always get the one you want
21:16justin_smithcool
21:24brainacidplease define factoid justin_smith
21:24brainacidi didnt understand
21:24justin_smith~factoids
21:24clojurebotI don't understand.
21:24brainacid~factoid
21:24clojurebotPardon?
21:24justin_smithOK, nobody understands!
21:24brainacid~fact
21:25clojurebotexcusez-moi
21:25brainacidexcused
21:25justin_smithsorry, in all seriousness, the bits of info clojurebot has are called factoids
21:25justin_smithand when you use on like ~book it will get any of the various definitions clojurebot has for book
21:25justin_smith~book
21:25clojurebotbook is http://clojurebook.com/ http://joyofclojure.com/
21:25justin_smiththere's more than one
21:25justin_smith~book
21:25clojurebotbook is http://www.pragprog.com/titles/shcloj/programming-clojure
21:27brainacidI understand now. Thanks
21:27brainacidMay you tell me what OS you use?
21:27brainacidLinux I use
21:27justin_smithI use Ubuntu Linux
21:27justin_smithbecause that's the version I could get pre-installed
21:27justin_smithusually I would use debian
21:28brainacidOk. How lon have you used? I started at 15 y/o, 30 now
21:28brainacid*long
21:28brainacidBut I am still very clumsy with it and learn everyday how to be a better user/root on my current hardware.
21:29brainacidI hope chit chat is allowed here not only support-focused?
21:29justin_smithabout 14, 15 years also
21:29justin_smithbrainacid: the clojure topic takes precedence, but not strictly enforced
21:30justin_smithwe also have #clojure-offtopic for people who like clojure / this channel but want to ramble about other things freely
21:30brainacidWell does the culture of programmer, Unix and general enthusiast sentiment welcomed?
21:30brainacidSome may even use the incorrect term 'fanboy'
21:30justin_smithof course, but we do have the primary topic of clojure - it does run on every major OS after all
21:31brainacidIncorrect at least in my opinion
21:31brainacidoh no doubt
21:31TimMcjustin_smith: Android, Debian, and OS/2!
21:31brainacidI plan to ask 'bout clojure ;)
21:31justin_smithespecially considering that it clojurescript compiles to js, which is just about everywhere
21:32brainacidindeed
21:32brainacidI was wondering trying that side of clojure
21:32brainacidI have never explored web-dev, only html at the very beginning of my learning but nothing with js
21:33justin_smithI think it's easier to start with jvm clojure - the tooling around clojurescript is a bit more complex
21:33justin_smithand there are more places to make things work, which means more things to go wrong of course
21:33brainacidjustin_smith: I can figure almost anything out with enough trial and error...so I will agree and start with jvm and learn then maybe move to the complex tooling you say of
21:34brainacidI really have no real programming experience but I am seeking for a home for my thinking.
21:36justin_smithwell, clojure is a great place to start, I think
21:36nic77sounds good
21:36nic77same here
21:45brainacidWell I am reading Eric S. Raymond Art of Unix Programming at the moment, I plant to apply the principles in his book using clojure, at least that is my superficial estimate at the moment.
21:47brainacidI have a very bad record of quitting. And I dont believe its a lack of something, it might be simply an excess of some bad habit. I want to "fit in" some community that welcomes eager personaloty
21:47justin_smithClojure and Unix have different ideas and goals in many ways
21:49brainacidWell Im sure that I may have the opportunity to have some fun coding, learning to improve my self as a thinker and enhance my toolbox as a technician, lol, with no real formal certifications nor employment...pathetic really since I live under the illusion that I may be able to work as a professional.
21:50brainacidBut I know that there are so many younger and smarter people out there that can do the job faster and probably cheaper. haha... :|
21:50justin_smithbrainacid: I am self taught, after many years of weekend experiments and such I became a professional
21:51brainacidjustin_smith: Alas! I have hope. I must be truly fortunate to be able to speak here with you.
21:51brainacidIt is truly possible then
21:51justin_smithcomputers have a nice way of cutting through the bs, and if you can make something work, that shows through regardless of anything else
21:51brainacidExactly
21:51brainacidOh boy someone at last who truly understands my logic
21:52brainacidSee my dad, a 30 yr IT Tech, continues to say that if I dont have Microsoft certs I wont be able to become an admin
21:53justin_smiththat's maybe true, if you want to be a Microsoft admin? I don't know. But that's not the case with many programming jobs.
21:54brainacidIf I could somehow show someone my skill set and maybe be interviewed on a per-task-accoplimshed basis, I might have some chance although I lack much knowledge for large-scale admin
21:55brainacidWell then, I must start teaching myself in a better way since I feel so behind the curb.
21:55nic77your ahead of me brain
21:55brainacidnic77: Hey mate. How so, you say ahead?
21:56nic77just starting out no experience with even html
21:56brainacidI see. Well my friend if you wish to ask me anything I will try to answer to my best experience.
21:56nic77sweet, thanks
21:57brainacidAlthough I know nothing of clojure
21:57brainacidI do have ok skill in google research
21:57nic77same here, i saw some good resources mentioned earlier though
21:58brainacidIm looking with torrentz-eu some books
21:58brainacidAlso on the Web tutorials
21:58nic77im gonna investigate them books at some point in the near future
21:58nic77im opposed to the certs aspect of things though
21:58brainacidMostly focused on re-arranging my intentions within so I can attack and flow in my learning process.
21:59brainacidWell nic77 I have no money for certs anyways so I will continue this open-source way of life and try to exert myself in an area so I could maybe one day be useful and be part of a support team.
22:00nic77theres a cap on the market of education so your expected to play ball and pay up at the moment
22:00nic77thats changing though
22:00nic77its a paradigm shift coming
22:00justin_smithbrainacid: nic77: what I suggest is start a project. Take the time to figure out git and use git to manage your version history / branches. Have concrete goals of what you want to develop, and put deadlines on those goals.
22:01justin_smiththe nice thing is that creates a history of your project's progress, and over a few projects, a history of your learning. And the better projects are the start of a portfolio to show what you can do.
22:06brainacidnic77: You want to form a team and we can get together whenver convinient for you since I am pretty much available 24hr. I can start learning git real quick and we can brainstorm and learn together. Whats your ideas about my proposal?
22:07brainacidThen we can come here and blame justin_smith for giving us the idea in the first place...:P
22:16brainacidquit
22:20nic77whered he go
22:22gfrederickswell he did say he has a very bad record of quitting
22:31tomjacksuppose I have a function f that maps forms to core.match pattern forms
22:32tomjackit seems I can't write (match x (f y) z)
22:32tomjackis there another way besides creating a reader literal and doing (match x #f y z)?
22:32justin_smithyou can make a macro that expands (f y) before the match form is evaluated
22:33tomjackmacros don't seem to work either
22:33tomjack"AssertionError: Invalid list syntax in (foo)"
22:33justin_smiththey should, if you get the quoting etc. right
22:34justin_smithuse macroexpand-1 to see how the output of the macro is different from the form that should have been created
22:35tomjackhttps://www.refheap.com/dfd64fab4a031df718e458398
22:36tomjackdoesn't even macroexpand
22:36justin_smithtomjack: in order for a macro to help you, the match call has to be inside the macro
22:36tomjackwat
22:36justin_smithtomjack: you need to quote the argument to macroexpand
22:36justin_smithtomjack: match is a macro
22:37tomjackI did quote the argument
22:37justin_smithoh, sorry, I did not finish reading the paste
22:37justin_smithyeah, the match macro invokes an error before foo can expand
22:37tomjackI don't really want to walk a '(match ...) form and replace patterns myself
22:37tomjackI want to use match's extensibility
22:37justin_smiththat's not what I am talking about
22:38justin_smithmatch is a macro, in order to craft args to match, you sometimes need to write a macro that builds the match call you want
22:38justin_smiththat doesn't have to mean walking a form and replacing things
22:38justin_smithbut it does mean a bit of massaging of things with your macro so match gets input it can accept
22:38tomjackyou mean write a macro that expands to a match form?
22:39justin_smithright
22:39tomjackthat could work, but it's not my question :)
22:39justin_smiththat's the most straightforward option I think
22:39tomjackmatch's extension points don't accomodate a case like this?
22:40justin_smithtomjack: they may. I don't know though. I am certain that you can construct what you want with a macro, on the other hand.
22:42tomjacka further problem: matching noms
22:43tomjackcurrently I write e.g. (match t [:fn {:binding-nom x :body r}] ...)
22:43tomjackah. so of course my macro can just expand to that. nevermind :)
22:44tomjackwould be more convenient to just have noms inside the pattern, but that will work
22:44tomjacks/noms/ties/g
22:45justin_smithyou may be thinking of core.lolcat
22:53tomjacktook me a while to get that :)
22:54justin_smithit was a subtle yet very bad joke