#clojure logs

2017-06-22

04:03Kristjan55555Hello! Hot 33 year old male from viljandi, estonia searching for husband, send me your cunt pictures first! Tel 37253902210 email: kristjan55555@mail.ee. I am waiting.....
04:11bjorngiSorry, Kristjan55555. I don't have any pictures of you :/
04:11Kristjan55555Hello! Hot 33 year old male from viljandi, estonia searching for husband, send me your cunt pictures first! Tel 37253902210 email: kristjan55555@mail.ee. I am waiting.....
04:12dysfunyeah, stop saying that
04:15bjorngiSeems to be a bit condradicting too. "Hot male looking for husband, send me your cunt pictures".
04:15bjorngiI should get in the spam business. How hard can it be to improve on that sector.
04:16dysfunyeah, merely being able to speak correct english might well be a competitive advantage...
04:18metellusdoing something other than spamming irc channels would probably help too
04:19dysfunyeah. the costs of irc distribution might be minimal, but i expect a message like that will get zero useful responses
04:24TEttingerI wonder if that service to sign people up for cat facts is still around
04:26TEttingerhttps://www.theverge.com/2014/7/28/5945917/an-ancient-reddit-prank-about-cat-facts-is-now-a-real-product
04:29ragepandemici'd love me an estonian husband, such an articulate man
04:29ragepandemicwhy I'd love nothing more than to send you pictures of my cunt
04:30dysfunsend him pictures of your ass and call it your mancunt
04:31dysfuntell him you're excited at the thought of being his husband
04:36ragepandemicdo people actually fall for spam like that though? i mean, it must work right?
04:36dysfunit used to, i dunno any more
04:40TEttingerof course. https://github.com/vadimdemedes/cat-facts
04:40TEttingerhttps://github.com/vadimdemedes/cat-facts
04:40TEttingeroh crap, scrolled up
05:03lxsameerhey guys, is adding a custom key to meta data of a (def) wrong ?
05:08dysfunno
05:10lxsameerdysfun: hmme i did something like (def ^{:doc "sadasd" :somekey {:nestedkey "sadasd :another "AsdaSD}} ...)
05:10lxsameerdysfun: and meta returns nil
05:11dysfunthe meta is attached to the *var*, not the value
05:11dysfun(meta #'foo)
05:22lxsameerdysfun: ow, thanks didn't know that
05:28dysfunwell, you can put things like integers in vars, and those are java classes which don't support metadata
05:29dysfunso there's not much choice in the matter really
05:50zipperHow can I achieve the results of `(conj [{:q 1}] {:p 0})` without wrapping the first map in a vector?
05:51zipperI thought (into [] map1 map2) but that turns them all into vectors
05:51zipperand so does `vec`
05:52dysfunvector
05:52dysfun,(vector {} {} {})
05:52clojurebot[{} {} {}]
05:53zipperNice
07:10phillordAnyone know of a way to check if a var is interned or not?
07:14dysfunyou can attempt to look it up
07:14Carr0tresolve?
07:14Carr0t,(resolve 'foo)
07:14dysfunwhich is one way of looking it up
07:14clojurebotnil
07:16Carr0tI can't do defs with clojurebot can I?
07:16ragepandemici think so
07:16ragepandemic,(def a 1)
07:16clojurebot#error {\n :cause "SANBOX DENIED"\n :via\n [{:type java.lang.Exception\n :message "SANBOX DENIED"\n :at [clojure.core$eval31$fn__32$fn__45 invoke "NO_SOURCE_FILE" -1]}]\n :trace\n [[clojure.core$eval31$fn__32$fn__45 invoke "NO_SOURCE_FILE" -1]\n [clojure.core$eval31$fn__32 invoke "NO_SOURCE_FILE" 0]\n [clojure.core$eval31 invokeStatic "NO_SOURCE_FILE" 0]\n [clojure.core$eval31 invoke "NO_SO...
07:16phillordns-resolve works over the symbol, though, not the var
07:16dysfunno, they got banned ages ago
07:16ragepandemicoh no, I swear it used to work though
07:16dysfunyes, but the symbol names the var
07:16dysfunoh, i see what you mean
07:16Carr0tI don't
07:16dysfunthey're all interned, no?
07:16phillordbut if you have the var then you are stuck
07:17dysfunCarr0t: i'm working on the basis that it's "given a var object, has it been interned?"
07:17Carr0tOh I see
07:17phillorddysfun: no, they aren't. You can do `with-local-vars` or (which is my concern), you can use nsmap to unintern them afterwards
07:17dysfunbut i thought all vars were interned
07:17dysfunoh, that
07:19phillordBest I came up with is....https://pastebin.com/vc9km9pW
07:19phillordi.e. using ns-resolve and meta on the var
07:19dysfuni was about to suggest that approach
07:22phillordseems to work but is ugly. Ah well
07:22dysfunthe other option is to read those values out of the var itself
07:22dysfuni predict that with-local-vars will never have a namespace name
07:31phillorddysfun: the var doesn't know its own namespace afaict
07:31dysfunsure it does
07:31phillordwhere?
07:31clojurebotwhere is your source code
07:31dysfunhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java#L172
07:31dysfunyou have to give it them to even construct it
07:32phillordyes, that's not accessible from Clojure space
07:33phillordother than "toString" -- more over, it's private and immutable, therefore it doesn't change when you do ns-unmap
07:33dysfunthey're public properties
07:33dysfunhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java#L89
07:34phillordso they are
07:34phillordapologies
07:34phillordstill, immutable though
07:34dysfunwell that's a good idea. you don't want a var's name and namespace falling out of sync with the interns table
07:35phillorddysfun: they can -- ns-unmap
07:36dysfunthat isn't an operation you should be doing much of
07:37phillordstill you are correct -- (.sym (var x))
07:37phillordreturns the symbol x.
08:57RovanionIs there a difference between property based and generative testing?
08:58RovanionEvery person seems to have their own definition of what X testing is by the way.
10:15noncomguys, how do I deploy a Gradle project to clojars?
10:15noncomeven a project without a clojure support?
10:18tcrawleynoncom: I've never deployed with gradle, but https://github.com/miguno/avro-gradle-plugin/blob/master/build.gradle#L27 may be a good example
10:22noncomtcrawley: does look good! trying it now
10:24faracohello
10:24RovanionYello
10:36noncomtcrawley: hmm.. can't fully wrap my head around it.. I've copied the relevant part from that file and do "gradle publish", the build seems to succeed (shows green in Idea), but nothing is uploaded...
10:37tcrawleyI have no idea how gradle works, sorry :)
10:43noncomnoncom: sadly so, gradle seems to be a very promoted, but an utterly underdocumented platform
11:22faracoDo anyone ever built android apps with clojure in here?
13:06amalloy,(meta #'inc)
13:06clojurebot{:arglists ([x]), :doc "Returns a number one greater than num. Does not auto-promote\n longs, will throw on overflow. See also: inc'", :inline #object[clojure.core$inc__inliner__6550 0x4ec51526 "clojure.core$inc__inliner__6550@4ec51526"], :added "1.2", :line 914, ...}
13:06amalloy,(:ns (meta #'inc))
13:06clojurebot#object[clojure.lang.Namespace 0x382ba76e "clojure.core"]
13:06amalloyphillord, dysfun: ^
13:07phillordamalloy: yes, that's how I've been doing it
13:07amalloyoh, scrolling further back i see you guys already got that far
13:13phillordamalloy: thanks anyway! It feels clunky but it works.
13:57lukaszx0what's the ruby on rails equivalent for clojure?
13:58dysfunthere isn't one
13:59dysfunclojure favours composing libraries. there is a framework for doing this called luminus
13:59technomancythe true clojure way is to rant about how rails is bad
13:59Para`Isn't that basically the (not (rails-way)) in general?
13:59dysfunnuh-uh technomancy, you should be too busy telling people that OO programming is going to destroy the world
14:00Para`Rails has one big thing that they got right.
14:00Para`Which is that they came up with consistent coding rules for Ruby.
14:00Para`Everything else people think they got right is a side effect.
14:00dysfun(actually, having spent much of the last two days wrapping java in clojure, i might even agree)
14:01Para`There's so much terrible Java out there it hurts my emotional balance.
14:01Para`OOP is treated like violence.
14:02Para`As in if it doesn't work, use more.
14:02Para`There was even on Hacker News a few days ago a comparison post between Java and Clojure and the writer proudly explaimed how Clojure is simpler because the Java equivalent was 500-or-something lines longer.
14:02Para`Well, the Java version used a gazillion shitty patterns.
14:02Para`Like factories just to create a single object.
14:05justin_smithclearly modern java code should be using the 3d-printer-pattern
14:05justin_smithfor one offs
14:06dysfunpah, 3d printers! don't you use hand tools?
14:06justin_smithArtisinalLocallySourcedDatabaseConnectionAtilier
14:07dysfunFactoryBuilderFactoryBuilder
14:09dysfunanyway, the correct answer was "yes i use hand tools, a keyboard"
14:09technomancyFactoryParodyComplaintBuilder
14:09technomancydysfun: only counts if you built your keyboard by hand
14:10dysfuntechnomancy: error: must be a subclass of Grumpy
14:10dysfunhow are your keyboard adventures coming along?
14:10dysfuni saw keyboardio was finishing their first run this week
14:11technomancydysfun: it's going well; I have been making very minor improvements and teaching my kids to solder for lego money
14:12technomancyhoping to have some time this summer to prototype out some more substantial features
14:12technomancyI am somewhat tempted to do a major yak shave and port the case design over to https://www.mattkeeter.com/projects/ao/
14:12technomancybut it uses boost, so it won't compile, and that's probably for the best
14:13technomancy(what kind of person is smart enough to use guile but also daft enough to use boost; I don't even)
14:13dysfuni like boost