#clojure logs

2015-07-02

00:32Guest25706hello world
00:34Guest25706is it possible to solve the knapsack problem using only datalog?
00:43Guest25706(= 1 1)
00:44Guest25706(+ 1 1)
00:44clojurebot2
00:44rhg135false
00:44Guest25706(* 1 1)
00:44clojurebot1
00:45Guest25706#t
00:45skynet9001apparently you can http://www.cs.ucla.edu/~zaniolo/papers/tplp01.pdf
00:56vasHi everyone. A datomic query returns (appropriately)... ({:tag "whatever", :bid 17517, :pid 7535} {:tag "somethingelse", :bid 7551, :pid 6625}) ... I would like to count the number of values returned.. in this example there are 2. ({} {}) ...what's the right fxn for that?
00:56Guest25706heavy reading. thanks skynet.
01:02vasthe correct answer was "count" xD
01:02vasforgot I had a thread-through ->>
02:15mustyI wonder how to ignore *is now known as* on irssi.
02:15Empperihmm?
02:15Empperijust type /ignore <user>
02:15lumafi/ignore #clojure NICKS
02:16lumafiwill ignore nick change messages
02:16Empperiah those
02:16Empperidarn
02:16Empperimisunderstood you musty
03:57tmtwd_http://pastebin.com/HKjdqNCx anyone see the bug with this?
03:57tmtwd_I get this error : Uncaught Error: No protocol method ISwap.-swap! defined for type number: 12
03:57tmtwd_```
03:58IAEHello, I was wondering if somebody could please help me out with a hopefully simple problem related to counting objects.
03:59IAEI have a record Cell, (defrecord Cell [visited? valid-dirs open-dirs]), that I create multiple times when generating an initially closed maze
03:59IAEWhen I go to test this, I create two mazes: (def tiny-maze (create-maze 1)) (def small-maze (create-maze 2))
04:00IAEWhave have dimensions 1x1 and 2x2, so a maze with 1 cell and four cells respectively
04:00IAEHowever, when I test with (is (= 1 (count (:cells tiny-maze)))) (is (= 4 (count (:cells small-maze))))
04:00IAEI get 3 and 4
04:00IAEI noticed that in the first instance it counts the parameters contained in the single cell instead of counting the cell object as one
04:01IAEI'm not sure why it does that or how I could fix it
04:11IAESo I noticed that, in the instance of my (create-maze 1), it does not create a list of Cell elements. So I tried wrap my maze-creating code with (into [] (...)); which now returns [[:visited? false] [:valid-dirs #{}] [:open-dirs #{}]]
04:11IAEHowever, this still returns three
04:16kungiIAE: how do you construct the size 1 maze? It sounds to me like you somewhere conjoin the content of your cell instead the cell itself.
04:19kungitmtwd_:I think this is wrong: #( (swap! @myval inc) )
04:19HUgeneralwhats wrong?
04:19kungitmtwd_: It should be #(swap! @myval inc)
04:20HUgeneralYes it should? I have no idea what you are talking about. sorry
04:20IAEkungi: (defn create-maze [size] "Create a maze sizeXsize large." (Maze. (if (= 1 size) (create-cell) (...))))
04:20tmtwd_yes
04:20tmtwd_tried it, but it didn't work
04:20IAEkungi: where (defn create-cell "Creates an unvisited cell with no valid directions." ([] (Cell. false #{} #{})) ([valid-dirs] (Cell. false valid-dirs #{})))
04:20tmtwd_same error
04:21kungitmtwd_: I saw it now :-) dont deref the atom. use (swap! atom fn)
04:21tmtwd_kungi, thanks :)
04:21kungiHUgeneral: I am not addressing you? Your highlights must be wrong :-)
04:22kungitmtwd_: easy to miss :-)
04:22HUgeneralsorry this is my first time here
04:23vasDoes anybody have experience in saving a graph to a database (like the similarity values of my posts to one another into datomic) ?
04:23kungiHUgeneral: Then welcome! :) First time on #clojure or on IRC in general?
04:23vaswelcome HUgeneral =]
04:23HUgeneralirc in general. It is all really confusing
04:23tmtwd_huh, it works now, but it still throws an error Uncaught TypeError: cljs.core.swap_BANG_.call(...).call is not a functionsyntax_reagent_demo.core.two_headers @ core.cljs:21executeDispatch @ react.inc.js:3297SimpleEventPlugin.executeDispatch @ react.inc.js:15709forEachEventDispatch @ react.inc.js:3285executeDispatchesInOrder @ react.inc.js:3306executeDispatchesAndRelease @ react.inc.js:2679forEachAccumulated @ react.
04:23tmtwd_inc.js:17600EventPluginHub.processEventQueue @ react.inc.js:2886runEventQueueInBatch @ react.inc.js:10747ReactEventEmitterMixin.handleTopLevel @ react.inc.js:10773handleTopLevelImpl @ react.inc.js:10859Mixin.perform @ react.inc.js:16683ReactDefaultBatchingStrategy.batchedUpdates @ react.inc.js:9199batchedUpdates @ react.inc.js:14914ReactEventListener.dispatchEvent @ react.inc.js:10953
04:23tmtwd_oops sorry for that
04:23HUgeneralThanks
04:24vasIRC is "multiplayer notepad," don't be overwhelmed ^_^
04:24kungiHUgeneral: When a line starts with a name you normally address a person.
04:24kungiIAE: sorry I don't see the problem
04:25HUgeneralSo am I addressing someone?
04:26IAEkungi: Yeah, I figured it out. I shouldn't have treated a maze with dimension 1 as a special case. Thanks for the support!
04:27vasHUgeneral: currently, not specifically. but if you were to start your message with someone's-nickname: they would most likely have some sort of notification (depending on their IRC client)
04:27vasIAE: way to go!
04:27HUgeneralokay, gotcha. thannks!
04:28vasi'm pretty newb to IRC myself, but some friends have used the IRC scripting language to make phenomenal things... absolutely mind blowing...
04:28vaswhole RPGs and stuff
04:28HUgeneralI had a friend turn me to it today. I dont understand the language what so ever
04:29vasClojure or IRC? or both?
04:29HUgeneralirc. I found clojure online
04:30HUgeneralalong with haskell.
04:33vasClojure is sweet. I don't know anything about Haskell. Have you looked at any books or tutorials yet?
04:34HUgeneralno?
04:34clojurebotno is tufflax: there was a question somewhere in there, the answer
04:34HUgeneralshould I?
04:34kungiHUgeneral: if you desire to learn clojure ... you should.
04:35HUgeneralyeah I am about to go to bed. I will read up on it there.
04:36HUgeneralThanks all
04:36IAEHave a good night!
04:36kungivas: Haskell is definitely worth a look. It approaches functional programming quite differently than Clojure
04:37j-pbyeah, haskell takes the hardened fortress approach, while clojure is the guerilla tactic :D
04:37vaskungi: do you feel like your clojure or understanding of programming has improved with looking/learning [at] both?
04:37vasj-pb: totally get that vibe! haha :D *pew pew pew*
04:38kungivas: yes
04:38j-pbvas: it will certainly broaden your mind, but if you are a newb to either, I'd reccomend with picking one and sticking with it
04:39kungiYou should look at one new programming language every year and see how it approaches things differently.
04:39vasthanks j-pb. i'm gonna try to dig my well deep on clojure's field first.
04:39vaskungi: that's the most amazing thing i've ever read a coder say, i think.
04:40j-pbha, theres even a Rich Hickey quote on this: Rich Hickey says - You don't level up by switching games all the time, but by sticking with one long enough to gain advanced skills. And, you need to be careful to recognize the actual game involved. Programming mastery has little to do with languages, paradigms, platforms, building blocks, open source, conferences etc.
04:40HUgeneralI will stick with one and stay there lol
04:41vasclojure does so many things correctly/rightly imho that it really deserves a good look/learn. maps and keywords... so awesome. also lisp in general! "implement a linked list" how about i just use a better language xD
04:41rritochvas: Once you have a few languages under your belt you should also look into compiler design. When you see how the compiler-compiler's work, you'll fully understand why certain languages are the way they are. Clojure is more interpreted so to understand it you don't need to look any further than clojure's source code.
04:43kungiAnd instead of writing cool clojure code I have to fiddle with html/css to create a nice looking questionaire form. Sometimes I hate my job.
04:43HUgeneralhow to send a personal message? lol
04:43kungiHUgeneral: /query nickname
04:44vasI think you can do /msg ? or /message
04:45noidiclojure does not have an interpreter
04:45noidiit's all compiled
04:45noidi(the official JVM implementation, that is)
04:45rritochnoidi: compiled? lol
04:46rritochnoidi: Clojure compiles stubs which call an interpreted infrastructure.
04:46rritochnoidi: Its ingenious, but I wouldn't ever say its compiled.
04:48noidiwhat do you mean by an interpreted infrastructure?
04:48rritochnodi: One sec, let me check the core, there's some stuff there that really makes it clear.
04:49rritochnodi: Take a look at this code here. https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L937-L947
04:50rritochnodi: All mathematical operations are method calls, they aren't compiled.
04:51vasWould you say that it's compiled when you make a .jar of something, though?
04:52noidiisn't that +' function compiled into JVM bytecode?
04:52noidisorry, I just don't see an interpreter here :)
04:52rritochvas: I believe it is just compiling stubs which contain the code required to perform the methods defined in your symbols. I haven't looked into all the details of the compilation but if you look at your stacktraces you can see the stub calling your methods.
04:53rritochvas: Even when it's compiled.
04:53rritocherr... nodi
04:57vasinteresting. seems like a hybrid approach
04:58noidithat's a Clojure function that calls a Java method, and it's compiled into JVM bytecode
04:58noidiwhere's the interpreter?
04:59noidihere's the bytecode for +' https://www.refheap.com/104678
05:01rritochnodi: Look at line 71 21
05:02rritoch21 invokestatic clojure.lang.Numbers.addP(java.lang.Object, java.lang.Object) : java.lang.Number [71]
05:04vasVery interesting
05:04rritochnoidi: I haven't done much at the compiler level of clojure, but all forms are interpreted, they aren't compiled, and therefore, by definition, it's an interpreter.
05:06rritochnoidi: The stub itself is compiled by clojure, and javac compiled the clojure source code, but the forms themselves are not truly compiled. As vas stated, it's a hybrid.
05:13noidiif you compile a function that calls a Java method, of course you'll find a reference to that method in the resulting bytecode
05:18noidihttps://www.refheap.com/104680
05:20noidithe forms I entered into the REPL were compiled into JVM bytecode
05:20noidinot interpreted
05:22rritochnodi: What about it? Line 53 just calls the invoke method of foo, I don't see how that isn't interpreted.
05:24rritocherr, correction, line 53 calls the invoke method of clojure.lang.IFn, butthat eventually calls the invoke method of foo
05:25rritochnodi: No matter how you look at it, it is interpreted.
05:25rritocherr, noidi... I need to start using tab completion
05:29rritochnoidi: A better example to see what's happening is to look at (seq (.getStacktrace (Thread/currentThread)))
05:31rritocherr, getStackTrace
05:40TreeNode(defn hello [] «hello to all!»)
05:43noidirritoch, if it's interpreted, where's the interpreter? :)
05:44rritochnoidi: It is in fragments, split between the RT class and the Compiler class.
05:45noidiif the JVM jumps into that piece of bytecode compiled from the bar function, there's nothing in there to start an interpreter
05:46noidiit's bar's body compiled to bytecode
05:47noidiput the var #'foo on the stack, use it to look up the object representing the function foo, then put the constants 1 and 2 on the stack, and jump into foo's invoke method
06:04rritochnoidi: Either way, this one generated instruction looks like it's going to make my life hell. https://www.refheap.com/104678#L-36 I do pretty much consider these things stubs because none of the mathematical operations are compiled into bytecode.
06:10rritochnoidi: That one line of code though means I need to swap out the namespaces in clojure before the classes are loaded which means my original plan of swapping out namespaces from a clojure compiled OSGI activator isn't going to be an option. It gets interned just by loading the class.
06:20rritochI guess if I can get my hands on the bundles classloader from the lifecycle listener before the clojure bundle is loaded than I can create the new namespace container there.
06:21rritochWell, actually before it's started, and after it's loaded. As long as the activator doesn't get loaded until it's started. If the activator is loaded before I can swap out the namespace container, there will be a lot of bugs.
06:43rritochThis is way easier than I thought, a sure sign it isn't going to work.
06:47aztakrritoch: you're doing Clojure in OSGi?
07:05rritochaztak: I'm trying to turn clojure into an OSGI bundle, in an OSGI compatible way, complete with Clojure-Imports and Clojure-Exports manifest headers to import and export clojure namespaces.
07:06rritochaztak: I've already used clojure in OSGI and the big problem was namespace conflicts since it doesn't matter that they were loaded from different bundles, they're still using the same clojure classes, so they are sharing the same namespaces container.
07:07aztakrritoch: If the clojure code is compiled to java-classes then the BND tool (maven-bundle-plugin etc.) can introspect the bundle to create the proper Import-Package/Export-Package directives. But perhaps that's not an option for you?
07:08Bronsarritoch: reading the backlog now. your claims that clojure isn't compiled is nonsense
07:08rritochaztak: Yes, but if you have two bundles with the same clojure namespace, they conflict instead of staying in their own isolated environments because they're still sharing the same namespace container.
07:09aztakrritoch: which namespace is that? The actual clojure runtime classes?
07:09Bronsarritoch: having a runtime lib != being interpreted
07:09aztakOr are you saying that the bundles actually contain classes with the same namespaces (== packages)?
07:09Bronsarritoch: clojure is always (well 95%) compiled to bytecode and executed JIT
07:12EmpperiI didn't even bother to take part in this conversation earlier but yes, clojure is always compiled to bytecode, even when using REPL
07:14rritochBronsa: Nearly all of it is just calls to java functions, I don't see where loops or mathematical operations are being compiled, unless there's a key part of the compiler that I'm missing, which is quite possible since I haven't done much with the compiler.
07:14rritochBronsa: For that matter, I'm not even sure if the conditional logic, like if statements, are compiled, though I didn't actually look.
07:14Bronsarritoch: loops are compiled, mathematical ops are "compiled" too into jvm arithmetic bytecodes in some cases
07:14Bronsarritoch: they are
07:15Empperiindeed they are
07:15Bronsarritoch: compiling to java methods is still compiling anyway. by your logic even java is interpreted
07:16Empperieverything you write in clojure will eventually end up being compiled to bytecode and then executed on top of JVM with JIT
07:16BronsaEmpperi: well not actually *everything*. clojure does have a small interpreter for really simple expressions
07:16rritochBronsa: Ok, if they are, they are, I just haven't seen it, and when I made adjustments to the mathematical classes, without making any adjustments to the compiler, it just worked without any problems.
07:17BronsaEmpperi: for example `(def foo 1)` will not be JITed
07:17Empperi"without any adjustments to the compiler" - wait a minute, of what compiler are talking about?
07:17rritochaztak: clojure.lang.Namespace#namespaces is the container I'm talking about
07:17EmpperiBronsa: well that would make sense since vars are dynamic and you can do that runtime directly
07:18rritochaztak: All bundles end up sharing the same instance of that, so to be able to share namespaces between bundles, but still have their own versions of some namespaces, additional features are needed.
07:18BronsaEmpperi: not that the interpreter is necessary at all, it's just probably a perf/memory optimization to avoid allocating a new class when not necessary
07:19Empperiyeah
07:19aztakrritoch: so you want one isolated Clojure runtime per bundle? That would mean that bundles cannot share objects/data with each other, right?
07:19aztak
07:19Bronsa(actually there are a few bugs and removing the interpreter is not possible)
07:20aztakrritoch: so you basically want to "load" clojure-code from another bundle into the clojure runtime of another bundle?
07:20Bronsarritoch: well the mathematical classes are part of the runtime lib -- they have nothing to do with the compiler
07:20aztak(I'd suggest using java semantics - classes/packages/etc - when dealing with OSGi *grin*)
07:21Empperior well, they do. But only in linking semantics
07:21Bronsarritoch: the compiler is just aware-enough of them to figure out when it's possible to do some inlining/compile away those method calls
07:21Empperiisn't inlining done mostly by JIT?
07:21Bronsaif you compile (defn x [] (inc 1)) you'll see that there's no method call
07:21Empperito my knowledge it is
07:22rritochaztak: No, I want all bundles which depend on the same version of clojure to be using the same instances of the namespaces that they choose to import, but still have their own non-conflicting namespaces. Ie. be able to import from two different packages even if one of those packages depends on the other import @ a different version.
07:22BronsaEmpperi: clojure has some logic for manual inlining of mathematical ops, helps avoid unnecessary boxing/use fast bytecodes
07:22BronsaEmpperi: see Intrinsics.java
07:22Empperinothing too comprehensive I think though
07:23EmpperiJVM JIT inlining is pretty darn effective
07:23Empperialthough it is limited to only 9 steps by default
07:23Empperibut sure it is wise to do some preprocessing inlining for simple cases
07:24rritochaztak: So if bundle A depends on version 1.0 of bundle B, and version 1.0 of Bundle C, but bundle B depends on Version 1.2 of Bundle C, Bundle A still gets the namespaces from version 1.0 of Bundle C while Bundle B is getting the 1.2 version.
07:24Empperiwhat you can do without runtime information
07:25rritochaztak: That runs into problems with a large team, especially when everyone wants to use the same clojure namespace for their activator.
07:26aztakrritoch: are you perhaps running into the equivalent of this: 1
07:26aztak
07:27aztakhttp://njbartlett.name/2011/09/02/uses-constraints.html
07:27rritochaztak: Either way, my initial version attached the namespace container to thread-local memory, and that worked OK when there werne't thread pools involved. It needed to be done on a fork of clojure though. Now that I've found a way to replace the namespaces container with reflection, I'm going a different route and trying to link the namespaces container, by their bundle classloader.
07:27winkwhy did I read that url as 'ninjabartlett.name' at a glance? it's clearly too hot to work..
07:28rritochaztak: Either way, Java 9 may be OSGI enabled, so it is a good time to be dealing with these issues.
07:28aztakrritoch: sounds like a dangerous path.. But best of luck :)
07:29rritochaztak: No, that wasn't the issue, OSGI didn't care, it didn't even know the conflict existed
07:30aztakI haven't done much Java/Clojure embedding stuff... but can you create an explicit Clojure runtime instance or is the runtime tied to a class-loader instance?
07:30rritochaztak: Bundle A would load and have its own namespace internalized so OSGI didn't care, the namespaces get interned into the Namespace.namespaces property, Bundle B would then load, all classes are internalized so OSGI doesn't care, but now when it interned it's code to Namespace.namespaces, it would quietly overwrite the code for bundle A, so bundle A would never see its own code again.
07:31aztakIn JRuby you can instantiate a Ruby runtime explicity. That way you can get more control over script-loading.
07:31aztakand even provide the proper runtime instance to bundles using an Osgi ServiceFactory or an extender-bundle.
07:32aztakwould be nice if that was possible in Clojure as well.
07:32aztakCRaaS - ClojurRuntimeAsAService :)
07:33rritochaztak: Most people who want multiple namspeaces are using a shim, https://github.com/tobias/clojure-runtime-shim, but since they're loaded by different ClassLoaders they can't share namespaces directly.
07:34rritochnamspeaces=namespaces
07:3464MAC8X5Wwhoami
07:3464MAC8X5Whello
07:35aztakah, yeah - I've seen that one. A work-around because Clojure doesn't have runtime instances per se?
07:35rritochaztak: Either way, that method can work, but it creates a condition where each bundle gets it's own runtime, which isn't ideal.
07:35aztakrritoch: if you provide a runtime manager in a ServiceFactory or in an extender bundle you could decide which bundles would share runtimes and which bundles would get their own.
07:36aztak(you may need to allow the classloader for a runtime to be dynamically extended when needed though)
07:36rritochaztak: So to facilitate versioned namespaces in a single runtime I need to takeover the Namespace.namespaces property, and in this current incarnation of the concept, I'm trying to associate the appropriate namespaces container, using the current context classloader , which should have a parent of the BundleClassloader which is what's actually being registered to import/export namespaces from.
07:37aztaknot sure about your use-case - but if possible, stay away from the thread-context class-loader :). It's evil and non-standardized.
07:38rritochaztak: Sure, but that would be an all-or-nothing proposition. I'm only working on the partial sharing. Matching how OSGI shares packages.
07:40rritochaztak: Currently I have .... public class DeligatingNamespaceRegistry extends ConcurrentHashMap<Symbol, Namespace> , and it has it's own "registrations" which is a ConcurrentHashMap<ClassLoader, ConcurrentHashMap<Symbol, Namespace>> , I was originally going to have these environments initialized from the activator.
07:42rritochaztak: But then I realize that clojure has static initializers which cause some namespaces to be interned immediatly, so I'm now creating a BundleListener to create the namespace isolations (with imports and exports) when the bundle goes into a "STARTING" state.
07:44rritochaztak: Anyhow, if it works it will make it possible to have multiple versions of clojure available in the same OSGI system, and the ability to share the clojure namespaces themselves, not just the packages.
07:46rritochThis depends on how clojure uses the context ClassLoader. If clojure is wrapping the current context classloader, than it would work fine, because clojure will wrap the bundle classloader, and this system will apply the correct namespaces.
07:47rritochIf clojure just wraps the system classloader, than everyone will be sharing the same main namespaces, and I'm back to the same problem I started with.
07:49rritochaztak: Actually the thread context classloader is exactly what I'm using, as long as it has a parent classloader which is the bundle classloader, everything should work. If it doesn't than I'll need another approach, possibly going back to using thread-local memory.
08:06aztakrritoch: (sorry for not replying -- I had to attend a meeting)
08:06aztakrritoch: is this closed-source or do you have a repo somewhere with your code so far?
08:07rritochaztak: No problem, I'm still quite far from being able to test this stuff.
08:07rritochaztak: As of now it's closed source only because the code is in bad shape, more //TODO than implementation, lol
08:08rritochaztak: once it's at least in testability mode I'll release it open source.
08:08aztak:)
08:10rritochLooks like I need one extra clojure header, "Clojure-Enable" just in case they don't have any imports or exports, though I'm fairly sure not importing clojure.core will end badly, but seeing clojure interns it automatically, it may no longer be an issue since I'm now attaching before the bundle is started.
08:25rritochI guess I am really in a hurry to test this, first time I've ever used "//TODO: Do something" but it's the unregister method which I don't care about, I can deal with cleaning up the mess if it works.
08:44my-name-is-gazHey #clojure :)
08:44my-name-is-gazI don't know if anyone can help me
08:44my-name-is-gazBut what interface would I need to support to have something respond to keywords being used as an accessor? Like in a map
08:44my-name-is-gaz(:key obj)
08:45justin_smithmy-name-is-gaz: ILookup
08:45my-name-is-gazexcpet obj isn't a map, it's some horrible thing I built :D
08:45my-name-is-gazCheeers man :D
08:45justin_smithmy-name-is-gaz: an easy way to do this is defrecord
08:45my-name-is-gazAny hints on tips on what docs I should be looking at if I have a similar q in the future?
08:45BronsaIKeywordLookup actually
08:45my-name-is-gazyeah I have that now
08:45justin_smithdefrecord can be extended to arbitrary interfaces, protocols, etc. and also automatically supports keyword lookup
08:46my-name-is-gazBut I want a vector to store the data for efficiencies sake but still use :x :y :z etc for acces (nth d 0) 1 2 etc
08:46BronsaILookup is for (get x :foo) , IKeywordLookup is for (:foo x) IIRC
08:46my-name-is-gazthese things change quite a bit
08:46justin_smithmy-name-is-gaz: records already use a vector for efficiency for the defined keys don't they?
08:46my-name-is-gazand it's making my clojurescript bog a bit :D
08:47Bronsajustin_smith: better, they use direct class fields
08:47justin_smithBronsa: oh, I thought (get x :foo) was what (:foo x) turned out to be
08:47my-name-is-gazLooking at the js produced it seemed to be allocating on each keyword / val
08:47my-name-is-gazwhich would make sense to maintain persistence
08:47justin_smithmy-name-is-gaz: so a record would do faster lookup anyway
08:47justin_smithmy-name-is-gaz: oh, js? that's completely different!
08:47Bronsajustin_smith: no, (:foo x) actually can be faster than (get x :foo) for records
08:47justin_smithaha
08:47my-name-is-gazbut that may optimise out when it goes through the closure comp
08:48justin_smithmy-name-is-gaz: all the stuff we have been saying is about jvm clojure
08:48my-name-is-gazhaha I'm doing optimisation too early as a displacement activity :D
08:48justin_smithmy-name-is-gaz: you didn't say this was cljs
08:48my-name-is-gazsorry :D
08:48justin_smithmy-name-is-gaz: in cljs, an array is really a hash lookup anyway, so the "optimization" you are doing shouldn't exist, iirc
08:48my-name-is-gazSame set of interfaces tho?
08:49justin_smithmy-name-is-gaz: no, the cljs interfaces are different
08:49my-name-is-gazkind of, cljs puts a layer of allocation on top of the js implementation to maintain persistence
08:50justin_smithmy-name-is-gaz: point being, on the js level there isn't a true indexed array, it's actually a hashmap
08:50my-name-is-gazjs array lookups for small maps are bodged to be fast on most browsers if they're not sparse
08:50my-name-is-gazI think they get classified internally as a seperate type of class on most JS engines
08:51my-name-is-gazand then if you turn it into a non sparse array everything recompiles and judders to a halt :D
08:51justin_smithmy-name-is-gaz: sure, but they aren't doing something cljs can't/doesn't do to speed up lookup are they? anyway, you'll likely find better info on #clojurescript
08:51my-name-is-gazOh! Sorry again :D Ijust searched for clojure irc channel :D
08:51my-name-is-gazn00b!
08:51my-name-is-gaz:D
08:51my-name-is-gazThanks tho, interesting and v helpful of you :)
08:52justin_smithmy-name-is-gaz: core protocols in cljs are defined starting here https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L384
08:52my-name-is-gazBefore all that I'll do the right thing and measure some bench marks
08:52justin_smithmy-name-is-gaz: looks like on cljs you might actually want ILookup like I first suggested?
08:52my-name-is-gazThe source is the docs for this stuff really isn't it? That's cool
08:53justin_smithmy-name-is-gaz: well, in this case the source is very straightforward to scan for the answer
08:53justin_smithI am sure there are actual docs somewhere too
08:54my-name-is-gazthanks justin, much appreciated
09:02tmtwdhttp://pastebin.com/60j9wbYT Is there a way to dynamically add a :p into a function (cljs)?
09:03tmtwdand what do you call a function that just contains html elements?
09:03justin_smithtmtwd: a function that returns [:p ... ] should work
09:03snowelltmtwd: You would write a different function that returns the [:p ] vector, then reference that component in your two-headers function
09:03justin_smith[p-generator]
09:04justin_smithfor reagent, that is
09:04tmtwdwhat is a p-generator?
09:04justin_smithtmtwd: the function
09:04tmtwdjustin_smith, oh
09:04justin_smithI just made up a name - but that's how you do it with a reagent component
09:04justin_smithif you are more generically just generating hiccup, don't do it that way
09:04tmtwdbut I don't want it do display :p right away
09:04tmtwdI want it to display :p after a user clicks a button for exampl
09:05justin_smithwell [foo state] then
09:05justin_smithand clicking the button should alter state
09:05justin_smithstate being a reagent state atom
09:05justin_smithassuming you are talking reagent here...
09:05tmtwdwhat is foo?
09:05justin_smitha function
09:05tmtwdi see
09:05justin_smithreagent will call that function with the state atom as an arg, when the state atom is altered
09:06justin_smiththis is the concept of a reagent component
09:07tmtwdshouldn't it be [foo @state]?
09:07tmtwdor you don't want to deref an atom?
09:07justin_smithtmtwd: depends, should foo be able to alter state? I mean you can do either one
09:07justin_smithI think
09:07justin_smithbut in my codebase we always pass in the atom itself
09:07tmtwdah okay :)
09:08justin_smithsince that gives each component the option of updating any other component as needed
09:09tmtwdso I need to def an atom like this : (def state (atom ":p 'yo'")) ?
09:09justin_smithtmtwd: are you using react?
09:09tmtwdjustin_smith, yes
09:09justin_smith*reagent
09:09tmtwdyes, reagent
09:10justin_smithOK, then you need to create a special kind of atom, a reagent atom
09:10justin_smithI'd look at the reagent docs, there's a lot to learn - I could tell you a lot of it here but you are probably better off reading the actual docs
09:11tmtwdok
09:11justin_smithreagent atoms are special because they keep track of the modifications you make, and know which components to update based on what those components access
09:22j-pbjustin_smith: I sometimes wonder why reagent doesn't hook into the regular listener capabilities of normal atoms
09:23justin_smithj-pb: consider the fact that you can make another reagent atom out of one subtree of a reagent atom
09:23justin_smiththere's something special allowing things like that, clearly
09:23j-pbyeah true
09:29j-pbjustin_smith: are cursors that much used in practice though? They are broken in Om and they're broken in reagent too.
09:31j-pbcan't wait for dnolen's euroclojure talk on om.next :D
09:31j-pbword of mouth has it, that it replaces cursors with pull syntax requests into datomic and datascript
09:32justin_smithj-pb: broken in reagent how? We'd been planning an update to use them, after seeing a demo at the local clojure meetup
09:35j-pbjustin_smith: Om cursors can suddenly point to the wrong thing, when elements are added or removed from vectors, afaik. Since this problem is inherent to cursors, I don't see how reagent can avoid this.
09:36justin_smithj-pb: wait, is this about splitting the mounted component, or using a sub-tree of the state atom as an arg instead of the full atom? because I don't see how the latter could do that, and that was the feature I was talking about.
09:37justin_smithj-pb: the point of the feature being that you can move the data that the component watches in a refactor, without needing to change the component
09:40j-pbI mean what you get when you call (cursor ra [:foo :bar])
09:44justin_smithj-pb: is this similar to a reaction?
09:44j-pbjustin_smith: I could be wrong, but when you have a component with local state associated with a path in the global state, and that path goes through a vector, changing the number of elements in the vector, should be able to screw up that matching
09:46justin_smithj-pb: in my app's state, I would never use a vector for anything that isn't a homogenous group where every sibling should be treated identically
09:46justin_smithj-pb: which is why I thought you might be talking about components (where elements of a vector wouldn't actually be identical, they would be different components)
09:47j-pbah yeah
09:47justin_smithI'd think subtrees under keyed entries in a map would be handled properly
09:48j-pbwell, with homogenous elements its not that bad, but even there, say you have one element in edit mode, and you delete it, then the next element would be in edit mode
09:48j-pbI might be wrong though, it's been a loong time that I looked at cursors, and I remember vaguely, asking if this can actually happen, and I think david said yes
09:49j-pbbut it's so long ago that I don't trust my memory
09:49justin_smithin my design edit mode would be a key inside the item that the component watches though... how would that transfer to a neighbor?
09:51justin_smithnow I really want to know if a) I'm naive and haven't built anything big enough to understand this issue or b) reagent's design avoids this issue somehow...
09:51kungi I am trying to create a string from the local time with clj-time: (f/unparse-local (f/formatter "yyyy-MM-dd HH:mm:ss.SSS") (lt/local-now))
09:52j-pbjustin_smith: could also be that om avoids this, I stumbled upon this in kovasb's Session, but he extends cursors to sets and seqs
09:52kungiBut this triggers the following CLassCastException: org.joda.time.DateTime cannot be cast to org.joda.time.ReadablePartial
09:55kunginevermind I got it
10:02dnolenj-pb: cursors do not have the problem you are describing
10:03j-pbdnolen: how are you detecting a deletion then?
10:03dnolenj-pb: I'm not going explain this. It works people have written massive applications with cursors.
10:04j-pbhint, where to look in the code :)?
10:04dnolenSorry
10:04j-pbdnolen: like I said, maube it was just a problem with Session, creating cursors from sets
10:05dnolenYou're talking a version from 16 months ago, bugs get fixed
10:05j-pbdnolen: yeah, like I said, this was ages ago
10:08sharmsCan anyone help me figure out why this code throws an artity error? http://pastebin.com/Q0KF88rS
10:09justin_smithsharms: fields-joined you have a function that takes one arg
10:09justin_smithbut you are mapping over two collections
10:09justin_smith(line 6)
10:09sharmsoooh its inside the function
10:09sharmsnot the actual calling of my top level one
10:10sharmswhich I should have noticed since the error message references the anonymous function fn--21231 or whatever
10:10j-pbsharms: main/crud-update/fn--28254 part behind the last / is the fn where the error occured, the fn--something stands for an anonymous fn
10:10justin_smithmain/crud-update/fn--28254 that translates to "in namespace main, function crud-update, in an anonymous fn"
10:10sharmsand not crud-update
10:10sharmsthanks again appreciate all of the help
10:11sharmsone day I hope to ask a question which is actually complex haha
10:11justin_smithsharms: this is why I prefer the form (fn field-joiner [x] (string/join " " x)) - the error message is much more informative in that case
10:11sharmscool I will check that one out
10:11j-pbjustin_smith: great trick
10:11justin_smithsharms: it's just a regular anonymous function, with an extra "name" arg
10:12justin_smithj-pb: yeah, I figured it out from an fn that needed the name arg to do a self call, then I realized the stack trace was so much more clear...
10:12j-pbhaha
10:13justin_smith,(fn [] :x)
10:13clojurebot#object[sandbox$eval25$fn__26 0x351a3269 "sandbox$eval25$fn__26@351a3269"]
10:13justin_smith,(fn x-keyword [] :x)
10:13clojurebot#object[sandbox$eval51$x_keyword__52 0x7c05ab8c "sandbox$eval51$x_keyword__52@7c05ab8c"]
10:25fikuszI want to wrap my own macro around the cljs macro 'go' from core.async. I understand that cljs macros need to be defined in clj, but I can't seem to require the original macro from cljs.core.async.macros in my clojure code
10:25fikuszI get java.lang.ClassNotFoundException: cljs.core.async
10:28justin_smithfikusz: what does your requiring code look like?
10:28fikusz(:require [cljs.core.async.macros :as as])
10:28fikuszin the ns macro
10:29justin_smithfikusz: that form only works inside ns
10:29fikuszjustin_smith: I'm inside ns
10:29justin_smithoh, missed that, sorry
10:30fikuszjustin_smith: np
10:30fikuszjustin_smith: it seem my problem is not with requiring
10:31fikuszjustin_smith: I noticed if I remove the call to go, the error disappears
10:31justin_smithfikusz: for that you may need :require-macros
10:31justin_smithor you could not call go, if that suffices
10:32fikuszjustin_smith: I'm in clojure myself, not clojurescript (since I'm writing my own macro too)
10:32justin_smithoh, then why would you ask for cljs.anything?
10:32justin_smithjust require clojure.core.async
10:32justin_smiththere is no .macros
10:32justin_smiththere is not cljs
10:32fikuszjustin_smith: because I want to write a macro for cljs
10:32justin_smithsorry, right
10:32fikuszjustin_smith: as far as I understand I need to write that in clojure
10:33justin_smithyeah, I'm not sure how that part works actually myself (when you need to use clojure to write macros for core.async that refer to cljs code)
10:33justin_smithbut I do know that your macros can invoke code that you don't require from the namespace of the macro
10:33justin_smithusually that's terrible, but it is sometimes useful
10:34justin_smith,(defmacro psychic [] '(foo))
10:34clojurebot#'sandbox/psychic
10:34fikuszjustin_smith: I'll try to check if cljs.async.macros has some dependencies I'm missing
10:34justin_smith,(defn foo [] :hello)
10:34clojurebot#'sandbox/foo
10:35justin_smith,(psychic)
10:35clojurebot:hello
10:37rritochIn the current state of clojure, if your accessing clojure from java does the runtime need to be started or is it automatic?
10:38sharmsI am getting Lazy-seq back from: (apply str (interpose ", " fields-assigned)) - I read online that I can use pr-str or doall to realize it, but if I wrap it in either I still get back "clojure.lang.LazySeq@..."
10:42snowellsharms: You could wrap it in an (into []) and pr-str that
10:42sharmsI think I need to wrap the fields-assigned in a do-all one level inside and that might work too
10:43sharmsbut I was wondering if there is a function which works at the top-level
10:45sharmsyeah I tried (into []) and (doall) with the map statement inside, still gives me lazy-seq
10:45sharmsI am not understanding something fundamental about lazyness and forcing realization for side effects
10:47sharmsas far as I can tell doall is not recursive
10:48sharmsso I guess my question is, if I am writing data to a file, that is considered a side effect and I must wrap all of my maps in doall?
10:48sharmsmap statements that is
10:49ddellacostasharms: I don't understand why you'd be getting that back from a pr-str or doall. Can you provide a gist or something with the code in context?
10:50sharmshttp://pastebin.com/d0zyUKYF
10:56Cr8s/apply str/apply pr-str/
10:57Cr8on 8
10:57Cr8er no
10:57Cr8derp derp
10:58ddellacostaWell, that will prevent it from dumping out a bunch of LazySeqs
10:59sharmsjust for fun, I am using x = {:table-name "variance", :fields {:id "SERIAL", :is_exception "boolean", :is_obsolete "boolean", :is_disabled "boolean"}}
11:01ddellacostaso yeah, the problem with that apply there is that it isn't forcing realization of the lazyseqs inside of the lazyseq produced by interpose in that line
11:01sharmsie if I switch updates-line from apply str -> doall, it still gets a lazyseq as a result
11:01sharmsso is the idomatic way to wrap every single thing in a doall?
11:02ddellacostabut let's take a step back--what do you want to produce here? I line that is like "colA = foo, colB = bar, ..." etc.?
11:02sharmsexactly
11:02ddellacostaokay
11:02sharmsand I am trained in the art of non-functional programming, so I have highly likely used the wrong paradigm or mindset
11:03rritochaztak: I put the repo online, it compiles, that's all I can say about it at this point, but you can see the direction it's heading... https://github.com/rritoch/clj-osgi-namespaces
11:04ddellacosta&(clojure.string/join "" (interpose ", " (reduce-kv #(conj %1 (str (name %2) " = " %3)) [] {:id "SERIAL", :is_exception "boolean", :is_obsolete "boolean", :is_disabled "boolean"})))
11:04aztakrritoch: Cool! :) I'll have a look - not sure if I can provide any useful input in a while though.
11:04ddellacostahmm, is lazybot gone then? or am I forgetting how it works?
11:04sharmsI think its a comma
11:04ddellacostaoh, I'm blocked from that still I think, but let's see
11:04sharms,(clojure.string/join "" (interpose ", " (reduce-kv #(conj %1 (str (name %2) " = " %3)) [] {:id "SERIAL", :is_exception "boolean", :is_obsolete "boolean", :is_disabled "boolean"})))
11:04ddellacosta,(clojure.string/join "" (interpose ", " (reduce-kv #(conj %1 (str (name %2) " = " %3)) [] {:id "SERIAL", :is_exception "boolean", :is_obsolete "boolean", :is_disabled "boolean"}))
11:04clojureboteval service is offline
11:04clojurebot"id = SERIAL, is_exception = boolean, is_obsolete = boolean, is_disabled = boolean"
11:05ddellacostayeah, that second one is your response. :-)
11:05ddellacostabut anyways, that's the gist of it
11:05ddellacostaoh, forgot the quotes though
11:05rritochaztak: The project isn't an uber priority for me, the sytem I'm building is actualy java+spring+osgi , but I miss my REPL :)
11:05sharmsthat is cool and looks good - I am still worried that I don't understand the fundamentals of lazy-seqs - if I can't realize them via doall and pr-str, I think I am missing something
11:06Cr8it's not that, your code was just calling str on a seq
11:07aztakrritoch: I made a hack a while ago to "publish" an nRepl instance to the JVM by installing a bundle.. Haven't had the time to follow up on that one in a while though.
11:07Cr8,(str (seq [1]))
11:07clojurebot"(1)"
11:07Cr8d'oh
11:07Cr8,(str (map inc [1])
11:07clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
11:07Cr8,(str (map inc [1]))
11:07clojurebot"clojure.lang.LazySeq@21"
11:07Cr8there we go
11:08Cr8,(pr-str (map inc [1]))
11:08clojurebot"(2)"
11:08ddellacostayeah sharms ^ that one line with apply str/interpose
11:08ddellacostaisn't working because it's got a lazy seq of lazy seqs
11:08sharms,(pr-str (str (map inc [1])))
11:08clojurebot"\"clojure.lang.LazySeq@21\""
11:09ddellacostasharms: so with what you just typed, that str has already returned the string-ified lazy-seq before it gets to pr-str
11:09aztakrritoch: not in any way complete, but it sorta worked: https://github.com/metamorph/osgi-clj-repl
11:09rritochaztak: Heh, well that's exactly what I'm looking for, just something that I can use to poke around, but eventually I'll need something with authentication. Exposing a REPL internet side is a bit of a security issue.
11:09ddellacostaso it's not going to realize the lazy-seq retunred by map
11:09Cr8str just calls the java .toString on non-strings
11:09ddellacostareturned*
11:10Cr8,(.toString [1])
11:10clojurebot"[1]"
11:10Cr8vectors implement it, so do non-lazy seqs
11:10ddellacostasharms: i.e. if you've got that str in there doesn't matter if you wrap it in doall or pr-str, it's already been converted to a string per .toString. There is no longer any lazy-seq in there to realize.
11:10Cr8lazy ones, potentially being infinite, don't
11:10sharmsok so I should really avoid (str) like the plague is what I am taking away from this
11:10ddellacostaunfortunately this isn't haskell. :-)
11:10j-pbdnolen: hm, could be that I'm just using Om wrong, but that behaviour is not fixed in Om 8.8 see https://gist.github.com/anonymous/4d8e6f0e0d638dfd0a47
11:11ddellacostasharms: no, that's not the point--you have to just be aware of what is getting evaluated when
11:11ddellacostaI use str all the time
11:11dnolenj-pb: I'm not going to explain Om to you.
11:11ddellacostait's is quite useful
11:11Cr8if you know you have strings and you want to concat them, use str
11:11dnolenj-pb: it's used in production in many companies and they don't have problems with deletions.
11:11rritochaztak: Well I've bookmarked and watched it. It saves me from re-inventing the wheel when I get to that point.
11:11Cr8if you have an arbitrary clojure data thing you want a representation of, use pr-str
11:12Cr8if you want the .toString of something, use str
11:12dnolenj-pb: such things are best directed to #clojurescript, but I recommend reading the tutorials and looking at Om Todo, I can't be of any more help sorry.
11:12sharmsok thank you for the help I appreciate it, I am going to try and digest the advice you have given
11:12Cr8which would be if you're interop'ing with some java lib with useful .toStrings, for example
11:13j-pbdnolen: you don't have to, I'm just saying that cursors will create a mismatch of state/reference on deletions, your heuristic in Om, seems to be, removing components from the tail if a vector shrinks, but this means that state will be associated with the wrong data
11:14ddellacostaj-pb: don't much understand what you mean--most operations on cursors follow the semantics of basic clojure data structure operations, no?
11:14j-pbdnolen: and this is a bug to me, if you don't think so, that's ok
11:14rritochaztek: My next hell is trying to share a single Web Context with multiple bundles. A task that will likely be impossible without the REPL to poke around with. Luckly there's a few other things I can work on to avoid that project.
11:14j-pbddellacosta: yeah, but take the basic Om introduction for example, it involes removing entries from a contact list
11:14ddellacostaand I'm one of those people using Om every day, all day, in a production environment...removal of items has never been an issue.
11:15ddellacosta...
11:16j-pbddellacosta: if you have local state at the same time, for example you have contacts highlighted or in edit mode in local state, once you delete an elemt from the collection, these states will point to the wrong entries
11:16j-pbddellacosta: I posted a gist, you can do a lein new mies-om hello-world, paste the code in the core and see for yourself
11:17ddellacostaj-pb: ...and that's your responsibility to manage. It's not Om's fault if such a thing happens...? I'm failing to understand your point
11:17ddellacostaalso don't know what you mean by "highlighted or in edit mode in local state"
11:18j-pbddellacosta: any local state, highlighting or editing was just an example
11:18ddellacostaagain, if you're talking about associating arbitrary items in app data with items in component local state, that is absolutely on the application developer to manage
11:18ddellacostabut maybe I'm misunderstanding
11:18ddellacostaas it is, I've never ever had a problem with Om similar to what you've talked about that wasn't my own doing, or at least enforced by the semantics of React, finally
11:19dnolenj-pb: what you're saying doesn't make any sense.
11:20dnolencomponent local state has nothing to do with cursors at all.
11:20dnolencomponent local state mappings are done via React keys.
11:20hellofunkj-pb: i just ran your gist, what is the problem you are having anyway? it removes the :ref 3 as you expect
11:20dnolenif you delete an entry, all the components wills get re-rendered because all their indexes must necessarily change
11:21j-pbhellofunk: and changes the mapping of local state to cursored element
11:21dnolenj-pb: it does not
11:21ddellacostaj-pb: local state has nothing to do with cursors
11:21j-pbeither I'm making an obvious mistake in that gist, or it does indeed happen
11:22ddellacostaj-pb: the obvious mistake you are apparently making is assuming Om has some responsibility to manage associations between what you've put into component local state and app data
11:22dnolenj-pb: because you're not supplying react keys, I already said this
11:23dnolenj-pb: please don't make blanket statements if you don't understand how the thing actually works
11:23dnolenthe code is just wrong
11:23ddellacostaanyways, I've gotta go, good luck (especially to dnolen if you continue to try to explain this...haha ;-)
11:23sharmsddellacosta, Cr8: Ah ha! I figured it out, if I call flatten on them first, then apply str, all is well
11:24j-pbdnolen: yeah, with react keys you can probably circumvent this, but this doesn't change that this illustrates the problem with cursors
11:24hellofunkj-pb: i see what you are saying, and I understand your confusion. However, trying to blend your local state to the app state like this is a recipe for bugs in general is not how you should approach things.
11:24dnolenj-pb: it has nothing to do with cursors, stop saying that
11:24dnolenif you wrote this in React same bug
11:24dnolenwrong state
11:25j-pbdnolen: yeah, it's reacts semantics bleeding though
11:25dnolenbleeding?
11:25j-pbmust be a german expression I badly translated,
11:25hellofunkj-pb: the behavior in your gist is exactly *correct* -- the individual components remain in existence, the data you pass to them changes, that's the whole point
11:26hellofunkj-pb: the last component that was created is the one that goes away when the data no longer needs to build it. the others remain alive.
11:28tbaldridgeIn react, can't you tag individual elements with ids? that way React can reorder/splice lists of components? I don't understand the problem at hand, but that might help.
11:28dnolenj-pb: anyways not a bug, never was a bug, and this stuff is documented and well understood by React & Om users.
11:28j-pbdnolen: shining through, in german you can say "bleed through" :)
11:33j-pbtbaldridge: yeah I know
11:35j-pbhellofunk dnolen: yeah I know that you accept that as a part of interacting with react, I still think that juggling cursors, state, and react-id's is an unpleasent way to program
11:35dnolenj-pb: I already it doesn't have anything to do with cursors
11:35dnolenresult would be identical with pure props
11:36dnolenI have nothing more to say about this.
11:46j-pbdnolen: btw, this discussion with justin_smith, wasn't about that Om should change, just that reagent shouldn't try to be like Om
12:01kungi`:questionaire/2-3-keine-angabe
12:01kungi,:questionaire/2-3-keine-angabe
12:01clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: :questionaire/2-3-keine-angabe>
12:02kungiO.o
12:02kungiWhy does this keyword lead to an exception?
12:03oddcullykungi: the leading number
12:03Bronsakungi: numbers are not allowed
12:03kungi,:3
12:03clojurebot:3
12:03kungi,:3-2
12:03clojurebot:3-2
12:03Bronsakungi: an implementationd etail
12:03Bronsadetail*
12:04oddcully,::1-way
12:04clojurebot:sandbox/1-way
12:04TMA,:foo/bar
12:04clojurebot:foo/bar
12:05kungiBronsa: thank you
12:06Bronsakungi: IIRC there's a ticket to make the reader more strict
12:07kungiBronsa: nice idea. It's the first real weirdness I encounter with clojure
12:07j-pbkungi: yeah I agree :D
12:07Bronsakungi: oh there are a lot of weird edge cases like this if you try and find them :)
12:08kungiBronsa: I am not trying to find them thank you
12:08TMA,:1-
12:08clojurebot:1-
12:08TMA,'1-
12:08clojurebot#<NumberFormatException java.lang.NumberFormatException: Invalid number: 1->
12:09TMA,(symbol? :foo)
12:09clojurebotfalse
12:10j-pbhow is that weird :)?
12:11oddcully,(keyword? :1-way)
12:11clojurebottrue
12:12TMA,(:foo {:foo :bar})
12:12clojurebot:bar
12:12TMA,('foo {'foo :bar})
12:12clojurebot:bar
12:12TMA,(1 {1 :bar})
12:12clojurebot#error {\n :cause "java.lang.Long cannot be cast to clojure.lang.IFn"\n :via\n [{:type java.lang.ClassCastException\n :message "java.lang.Long cannot be cast to clojure.lang.IFn"\n :at [sandbox$eval73 invoke "NO_SOURCE_FILE" 0]}]\n :trace\n [[sandbox$eval73 invoke "NO_SOURCE_FILE" 0]\n [clojure.lang.Compiler eval "Compiler.java" 6792]\n [clojure.lang.Compiler eval "Compiler.java" 6755]\n [c...
12:13j-pb,({1 :bar} 1)
12:13clojurebot:bar
12:14TMAsymbol and keyword look sufficiently alike (and unlike say numbers), yet they are not related
12:14j-pbyeah true
12:14TMA,({1 :bar} {{1 :bar} :quux})
12:14clojurebotnil
12:15TMAif that's not counterintuitive (aka weird) then what is?
12:16j-pbTMA, well if you think about it in terms of IFn implementations it's pretty intuitive :D
12:16BronsaTMA it's not unintuitive at all, really
12:18TMAfor me at least, it is unintuitive; it is the same level of unituitiveness as (or nil 1 2) returning some other "unfalse" value than 1
12:18TMA,(or nil 1 2)
12:18clojurebot1
12:22TMA,`(** ++ , %)
12:22clojurebot(sandbox/** sandbox/++ sandbox/%)
12:23TMA,`(*1* +1+ %1%)
12:23clojurebot#<NumberFormatException java.lang.NumberFormatException: Invalid number: +1+>
12:24TMA*, + and % are obviously symbol constituent characters. *1* is a symbol, why +1+ is not?
12:24TMAwhy the inconsistence?
12:25TMAthat's what is counterintuitive in the naming
12:25Bronsabecause +1 is a number while *1 is not?
12:28TMA,`(/ // /a /1 foo/a foo/1 foo// foo//1 a/ a//)
12:28clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: //>
12:29TMABronsa: why should be that relevant?
12:30BronsaTMA why shoudln't it? writing +1+ is no differnt than writing 45d
12:30Bronsaobviously not a valid number
12:30j-pb,'+1+
12:30clojurebot#<NumberFormatException java.lang.NumberFormatException: Invalid number: +1+>
12:30j-pbah
12:30TMABronsa: exactly. therefore obviously a symbol name
12:31Bronsawhat?
12:31clojurebotwhat is http://gist.github.com/306174
12:33TMA,45d
12:33clojurebot#<NumberFormatException java.lang.NumberFormatException: Invalid number: 45d>
12:35TMAif 45 is OK and 45 d is acceptable too, why it is not parsed as 45 and d? multiple parentheses are parsed as one parenthesis = one token, there is no need to put spaces in them because "((" is not a valid parenthesis token, even though "(" is
12:36Bronsa,45M
12:36clojurebot45M
12:36Bronsanow imagine if your semantics were in place and you typo'ed 45MyClass
12:36TMAif the "45" then "d" interpretation does not look correct then there is one obviois solution -- make 45d a symbol
12:36Bronsaplease no
12:37scottjTMA: if (foobar) doesn't exist would you expect Clojure to turn it into (foo bar)?
12:37j-pbTMA: you can always (symbol "something")
12:38Bronsadigits are not valid leading chars for a symbol nor is +- followed by a digit
12:38TMAj-pb: which then cannot be referred to in a simple and pleasant way
12:38Bronsathat's documented.
12:38Bronsaand it's not going to change so this discussion is meaningless
12:38j-pbTMA: early failure is more important in this case, imagine the number of times you want a symbol wthat looks like a number, and the number of times you have a typo in a number
12:40TMABronsa: I am trying to understand _why_ has clojure departed from the lisp tradition.
12:41j-pbTMA: because the lisp tradition often means theoretical nicety is more important than day to day usefullness
12:41j-pbTMA: and clojure seems to prefer day to day usefullness to living in an ivory tower
12:41BronsaTMA there are more significant areas in which clojure has departed from the lisp tradition.
12:44wasamasahuh, I thought you could define constants wrapped in +
12:44wasamasa,+foobar+
12:44clojurebot#error {\n :cause "Unable to resolve symbol: +foobar+ in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: +foobar+ in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6543]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: +foobar...
12:44wasamasaSEE
12:53TMAok. I don't have the data on the failure modes of other programmers; I have only my own. And as I do not use inline numerical constants too much, I might underestimate the importance of an early failure there
13:18snowellHmm. I have a sequence of java objects and I wanted to map a function call
13:19snowellI found that (map .stringValue myCol) doesn't work; you have to do (map #(.stringValue %) myCol)
13:19snowellAny special reason it doesn't try to resolve .stringValue as a function call?
13:21snowellEh, I guess the anonymous function is process at runtime instead of compile-time. That's probably the entirety of the reason
13:23sharmssnowell: what about (map str myCol)
13:24snowellWell in this case, I believe stringValue and toString function differently
13:24snowellstringValue comes from an interface
13:27amalloysnowell: because stringValue is a method, not a function
13:27ambrosebsBronsa: I'm resolving :host-interop calls by piping ast nodes back into (-> ast analyze-host-expr validate) after adding type hints manually to the arguments. This gives back a resolved call. The problem seems to be emit-form seems to return the same output regardless.
13:28ambrosebsDoes that ring a bell?
13:28snowellamalloy: You know, until just now I've always kind of used those words interchangeably. I don't know what's real anymore
13:28amalloymethods exist in java, and functions exist in clojure
13:28snowellMakes sense
13:28amalloyclojure functions are values, which can be stored in locals or in vars or whatever
13:29amalloymethods are something only the compiler can touch
13:29ambrosebsBronsa: the problem is (eval (emit-form checked-ast)) gives a reflection warning, even though it seems like I've resolved the nodes manually.
13:29amalloy(because they aren't values)
13:30Bronsaambrosebs: I'm sorry I don't have time today -- can you send me a mail with an example? I'll take a look tomorrow
14:45seangrovegfredericks: Thanks, sounds excellent! I'll look into both of those points,
14:49seangrovegfredericks: And I don't suppose there's an easy way to get it to generate certain character sets, e.g. Japanese/Korean/Tamil/etc.?
14:49gfredericksseangrove: oh hey actually
14:50gfredericksseangrove: I have this regex->generator function which probably doesn't support the regex character classes you'd need already, but probably could with a small bit of effort
14:51gfrederickshttps://github.com/gfredericks/test.chuck#string-from-regex
14:51gfredericksif it's worth the effort to you I'd be happy to try to point out where the changes would go
14:51seangroveYeah, I'd be willing to give it a go
14:52gfredericksare you familiar with the jvm regex features for the sort of charsets you're after?
14:53seangroveAh, I'm actually in cljs for now :P
14:53seangroveMight be a bit of a deal breaker
14:53gfredericksoh man yep
14:53gfredericksany idea if js regexes have such things?
14:54gfredericksit'd still be a big effort, I'm just curious
14:54seangrovePossibly http://stackoverflow.com/questions/6787716/regular-expression-for-japanese-characters
14:54seangroveLooks like the same idea, finding the right ranges
14:54AnonGenCan someone please tell me a good video for begginers?
14:55AnonGenI found a Rich hickey video on Utube but it was not for newbs
14:55seangrovegfredericks: Also, here's what I have for generating strings of 10 chars - any way to change that to a *minimum* of 10 chars? (gen/fmap clojure.string/join (gen/vector gen/char-alphanumeric 10))
15:01gfredericksseangrove: oh jvm has a special thing for specifying these blocks: http://docs.oracle.com/javase/7/docs/api/java/lang/Character.UnicodeBlock.html#forName%28java.lang.String%29
15:01gfredericksmy lib (on the jvm) could work with raw ranges already
15:02gfredericksseangrove: yeah one idea is you could generate one fixed-length string and one variable length string and combine them together
15:03seangrovegfredericks: Clever!
15:03gfredericksseangrove: if such a thing starts to offend your readable code sensibilities you might be interested in https://github.com/gfredericks/test.chuck#for
15:04gfredericksseangrove: an alternative is more args to gen/vector, specifying a min and max size, which has the obvious downside of having to specify a max size; I think it will generate larger strings right off the bat as well
15:08seangroveAhem... (gen/fmap (fn [[fxd vr]] (clojure.string/join (into fxd vr))) (gen/tuple (gen/vector gen/char-alphanumeric 10) (gen/vector gen/char-alphanumeric)))
15:08seangroveI'll keep that for now, but will look into test.chuck on the next generator :)
15:10gfredericksyet another library that problably doesn't work with cljs; diving into the whole test.check cljs world is pretty high on my todo list
15:10gfredericksI wonder what the best practice for contrib libs & cljc is
15:11gfredericksI assume rewriting in cljc would be a pretty big breaking change
15:11gfredericksand yet you could imagine cljc is more important for libs than for apps
15:11seangroveSeems important to me, but I jump between the two constantly
15:12seangroveThings will probably coalesce sooner or later with some pretty clear/easy paths to getting things cross-platform
15:12seangroveNot a ton of experience with it quite yet though, I think
15:13gfredericksonce support for 1.6 isn't valuable it'll be easy
15:13gfredericksin the interim though...
15:14augustlis there anything in ring for responding with multipart/form-data?
15:16amalloyresponding wih form-data? isn't that generally something that clients use to submit?
15:17augustlyeah, but liberator wants to write the response in the same content-type as the request
15:19amalloyaugustl: that sounds like a misunderstanding of liberator
15:20amalloyie, you misunderstanding liberator, not liberator misunderstanding http
15:21augustlit seems that in liberator, if the client doesn't specify an accept header, liberator will respond with the same content-type as in the request
15:52SeyleriusThere a clojure lib for interacting with git?
16:02SeyleriusFound it: clj-jgit.
16:16the-kennyaugustl: won't liberator respond with the first value in :available-media-types?
16:17augustlthe-kenny: hmm, I didn't know the ordering matters
16:17the-kennyfor :available-media-types it does.
16:18augustland then I can just return a blank string or whatever for the weird client that requests Accept: multipart/form-data :)
16:30SeyleriusHmm... Any decent reST parsers for clojure?
16:30SeyleriusI can't find any—they all seem to hand off to sphinx or something.
16:31wasamasawhy could this only be the case...
16:31wasamasasurely not ReST being a python-centric thing explicitly intended to be extensible in python for custom directives!
16:32SeyleriusFair point.
16:32wasamasaso far the only alternative implementation I've seen was in CL and did replace their directives with something homegrown
16:32Seyleriuswasamasa: Got a preferred alternative? Markdown? Maybe Org?
16:33wasamasaSeylerius: not really
16:33SeyleriusI suppose I'll just stick to markdown. Thanks for the info.
16:33j-pbmarkdown probably, wasn't there a HN post a few days ago about mardown rendering in cljs?
16:33wasamasawell, then you'll have the problem that the implementations don't agree on something actually standard
16:34wasamasaand that sucks
16:34wasamasathe only option to end this madness is to implement commonmark
16:34wasamasaorg-mode is pretty emacs-centric
16:34jackhillpandoc support (at least) a large subset of ReST, so a non-python parsers isn't out of the realm of possibility
16:34j-pbyes there was :) http://carmenla.me/blog/posts/2015-06-22-reagent-live-markdown-editor.html
16:34wasamasaand the rest, hmm
16:35j-pbwasamasa: yeah, thats true and horrible about md
16:35wasamasathey sure look niche to me, but eh, in the end it's just markup
16:35j-pbwelllllllll, actually writing hiccup code isn't that bad
16:35wasamasaif I just need to write something to communicate with people, it doesn't really matter what I pick
16:36j-pbyeah
16:38wasamasathe converting possibilities of both org-mode in emacs and pandoc are pretty nice to have though if you need to turn the documents into a different representation or format
16:38j-pbI wish instaparse was reversible :D
16:38j-pbwrite it in whatever html abstraction you like, normalise it to hiccup, and emit it to whatever
16:40HUgeneralAnyone have problems with clojure repl on android?
16:40amalloywhy would you normalize to hiccup? hiccup's main advantage is it's easy to write by hand; if you are generating markup from something else, use enilve/c.d.xml style tags, which are much easier to manipulate programmatically
16:40SeyleriusI'm contemplating another evil plot, is the deal, and the goal is something between github and newsroom software, aimed at bringing github/bitbucket collaborative features to short-to-medium content creation. I'm aiming at having decent integration with static-site-generators like octopress and pelican, so that the tool can be used to deploy content as well, hence the need to decide on a format. I don't want to reimplement a
16:40Seyleriusstatic-site-generator, which means I need to use either reST or markdown, most likely.
16:41SeyleriusI've liked the structure of reST a little better, in the past, but octopress only supports markdown. So MD's probably the better choice.
16:43snowellAnybody know how to coerce a value into a java primitive int?
16:43snowellI can only seem to get Integers
16:43snowell,(type (int 5))
16:43clojurebotjava.lang.Integer
16:44Bronsasnowell: type takes an Object, it will be boxed
16:44Bronsa(let [x (int 4)] ;; x is unboxed )
16:44snowellWell I'm using it in a function call, e.g., (.insertColumnSelectionAt (int i) (ColumnSelection…))
16:45snowellAnd getting "No matching method found: insertColumnSelectionAt for class java.lang.Integer"
16:45snowellBecause it's expecting an int
16:45Bronsasnowell: primitive integers can't be method targets
16:45Bronsasnowell: maybe you meant (.insertColumnSelectionAt (ColumnSelection. ..) (int i)) instead?
16:46snowellpublic void insertColumnSelectionAt(int theIndex, ColumnSelection theSelection)
16:46Bronsasnowell: well you need the target class
16:46Bronsafoo.bar(baz) is (.bar foo baz) in clojure
16:46snowellRight...
16:46snowellOh
16:46Bronsayou'd invoke that method like target.insertColumnSelectionAt(i, selection) in java
16:47snowellIs there any way I can erase the last couple minutes so nobody can read it?
16:47Bronsayou're missing the `target`
16:47snowellI've been writing clojure code for months… so this is pretty embarrassing :/
16:48snowell(inc Bronsa)
16:48jhnI'm trying to figure out why the following isn't working as I expect, and what I can do: https://gist.github.com/jhn/bc797e8a107609425919
16:48Bronsasigh. lazybot is missing again
16:48snowellHe was here yesterday
16:49jhni think it has to do with (product) being lazy, but I'm not really sure what the correct approach would be
16:50amalloyjhn: you are calling set functions on a thing that is not a set
16:50amalloyie, a lazy seq is not a set
16:50jhni see.
16:52jhnamalloy: why does it work the first time, though?
16:53jhnmeaning, the first time I work the "crashes" version, on a fresh atom, it works
16:53jhnand sets it the atom properly. but the second time I call it it fails
16:53jhnI would expect the first time to fail as well?
16:54jhnwow typos are eating me alive today...
16:54amalloyjust bad luck. it'll happen to work sometimes if one of the inputs is a set and the other isn't
16:54amalloybased on which way difference chooses to do stuff
16:56jhnbad luck? but this always happens the first time. here's what I mean: https://gist.github.com/jhn/bc797e8a107609425919#file-t2-clj
17:03amalloyyes, i mean you are breaking the contract of set/difference, so anything that happens is just luck from your perspective
17:03amalloyit happens to work if the non-set argument is larger than the set argument, or maybe if it's smaller, i forget
17:04j-pbthe reason is this check
17:04j-pbhttps://github.com/clojure/clojure/blob/b5d0e84f92038449312bea4c31dcdedd499e28b8/src/clj/clojure/set.clj#L53
17:05j-pbah no sorry, I read your code differently
17:05j-pbcurious
17:06amalloyj-pb: there is a particular reason why it happens, but the point is you shouldn't have to read the source. you know you are breaking the contract of calling a function, so anything good or bad that happens is just a coincidence
17:07j-pbamalloy: yeah, doesn't mean you won't learn something by understanding why it fails though :)
17:07jhnamalloy: to be fair, i'm curious as to the specific reason, but I agree.
17:07jhnthanks guys!
17:07j-pbah no I think my first assumption was correct
17:08j-pbjhn: let me think about this for 2 mins :D
17:09j-pbjhn the thing that crashes is your difference call, (btw you never use its return value I'd guess you want something like (rese! tat diff)
17:10jhnj-pb: yeah, that's just a simplified version of the function that reproduced my bug.
17:11j-pbjhn: is (products) the same on both calls?
17:11jhnyes
17:14SeyleriusAre there any java/clojure static site generators?
17:16j-pbjhn: do the values of (products) repeat?
17:16j-pbjhn: or are they all unique
17:17j-pbSeylerius: plenty :), you mean to generate static html?
17:17jhnthey're a list of maps that don't have any dups.
17:17j-pbSeylerius: laser, enlive, stencil
17:17j-pbSeylerius: from the to of my head :)
17:18j-pbjhn: alright, if you look at this line
17:18j-pbhttps://github.com/clojure/clojure/blob/master/src/clj/clojure/set.clj#L53
17:18Seyleriusj-pb: Thanks. I'll take a look at those.
17:19j-pbSeylerius: hiccyp is also really important :)
17:19j-pbhiccyp
17:19j-pbhiccup
17:20j-pbjhn: in your initial iteration that statement will be
17:20j-pb,(< (count [1 2 3]) (count #{}))
17:20clojurebotfalse
17:20j-pband in the ones after that
17:20j-pb,(< (count [1 2 3]) (count #{1 2 3}))
17:20clojurebotfalse
17:20j-pblol
17:20j-pbnote to self, go to bed it's late in germany
17:23j-pbjhn: second best guess, its actually line https://github.com/clojure/clojure/blob/master/src/clj/clojure/set.clj#L59 when you call it the first time, s2 will be empty and the reduce will just shortcut to s1
17:23j-pb,(reduce disj [1 2 3] #{})
17:23clojurebot[1 2 3]
17:23j-pbbut if it's non empty as in the follwing iterations, you'll call disj on a seq, which isn't defined (a vector in this case)
17:24j-pb,(reduce disj [1 2 3] #{1 2 3})
17:24clojurebot#error {\n :cause "clojure.lang.PersistentVector cannot be cast to clojure.lang.IPersistentSet"\n :via\n [{:type java.lang.ClassCastException\n :message "clojure.lang.PersistentVector cannot be cast to clojure.lang.IPersistentSet"\n :at [clojure.core$disj invoke "core.clj" 1452]}]\n :trace\n [[clojure.core$disj invoke "core.clj" 1452]\n [clojure.core.protocols$iter_reduce invoke "protocols.cl...
17:24j-pbjhn: and that's your explanation :)
17:42jhnj-pb: I'll definitely dig in after work. thanks a lot!
17:43j-pbjhn: just wrap the (products) cal in a (set (products))
17:43jhnyeah, that's what I ended up doing
17:43j-pbk :)
17:45bittsIs there a way to refer to the map you're building? Like this.. (assoc {} :a 4 :b (:a this-map))
17:48arrdembitts: In the general case, no. You can use as-> or let to bind the previous partial form to a name and then manipulate it, but there is no support in the assoc function for this.
17:49bittsarrdem: thanks.
17:49j-pbbitts: clojure doesn't allow for circular datastructures afaik
17:50j-pbbitts: which is a good thing tm :)
17:51arrdemYou can make circular datastructures, but it requires some legwork.
17:51j-pbbitts: clojure has immutable _persistent_ datastructures that are values, thus there is no reference concept
17:51j-pbwhich means you can't persist somethign circular without infinite memory
17:51arrdemThat's not the correct sense of persistent.
17:51j-pbarrdem: can you think of a way doing some nifty closure nesting and magic
17:52j-pbarrdem: not using something like transient
17:52j-pbarrdem: how so?
17:53arrdem"Persistent" refers to the fact that "old" values are still legitimate and unchanged (immutable).
17:53arrdemPersisting datastructures via pr and read-string is different altogether.
17:53j-pbyeah, but this has the neat side effect, that they are also "pesistent" in the serializable sense
17:55arrdemYou can't make a circular immutable datastructure without a reference type. I forget how it worked, but there was a demo here a long time ago of an infinite seq constructed by delivering a delay to itself.
17:55bittsby building the {} with reduce you can refer to things in the {} as you're building them, from within the reduce function.
17:55amalloyarrdem: a promise
17:55arrdemthere we go thanks amallo.
17:56j-pbamalloy, arrdem: yeah but a promise is not an immutable/persistent value ;)
17:56amalloywhich is of course another mutable reference, even though it mutates only once
17:56j-pband a reference type
17:56j-pbyeah :)
17:56amalloyj-pb: but because clojure's sequence interface is open to extension, you can easily create an infinite self-referential sequence
17:57j-pbamalloy: sequences are not pesistent imho
17:57j-pbamalloy: because of the deferred evaluation
17:57amalloythat is not really a thing you can have an opinion about, much less a humble one
17:57amalloy(reify ISeq (next [this] this) (first [this] 1)), plus various other junk to satisfy irritating interfaces
17:59j-pbamalloy: yeah, but sequences are not really immutable, they encapsulate a reference type
17:59j-pba kinda, sorta promise in the form of a function
17:59j-pbamalloy: even worse, they aso encapsulate side effects, so I'd argue that they're not a datastructure at all
18:00j-pb(unless you count functions as datastructures)
18:08lvhIf I have a fn that expects something slurpable but I have it as a string right now, what do I do? StringReader it?
18:09arrdemlvh: you could do that, but having a single function handle your IO and processign is probably a design mistake...
18:09arrdem*processing
18:09arrdemMakes it harder to test yadda yadda
18:09lvharrdem: I agree in general, but it's a convenience function I didn't write: https://github.com/aphyr/less-awful-ssl/blob/master/src/less/awful/ssl.clj#L134-L138
18:10lvhAnd part of the reason why I want it to take strings is precisely so it becomes more testable :)
18:12bittsarrdem: consider (assoc {} :a (reduce f [] coll) :b (can't sum :a values) ) you could do this.. (reduce (fn [m x] (assoc m :a 5 :b (:a m))) {} coll)
18:17j-pbbitts: hu? :b will be nil
18:18j-pb,(reduce (fn [m x] (assoc m :a 5 :b (:a m))) {} [1 2 3])
18:18clojurebot{:a 5, :b 5}
18:18j-pbah sorry
18:18amalloyarrdem: it's nice for libraries to accept Reader instead of String or whatever, so it can consume the input lazily and so on
18:18j-pb,(reduce (fn [m x] (assoc m :a 5 :b (:a m))) {} [])
18:18clojurebot{}
18:18j-pb,(reduce (fn [m x] (assoc m :a 5 :b (:a m))) {} [1]), three times the lucky charm :)
18:18clojurebot{:a 5, :b nil}
18:18j-pbbitts: because this is equivalent to
18:19j-pb,(let [m {}, m {:a 5 :b (:a m)}, m {:a 5 :b (:a m)}] m)
18:19clojurebot{:a 5, :b 5}
18:20j-pbamalloy: yeah but slurp seems a bit too general
18:29bittsj-pb: I do this all the time to collapse a collection pf maps into a single map.
18:32bittsj-pb: for instance adding up like like keys or conj-ing like keys in each map into a vector.
19:05Seylerius,(map #(if-not (number? %) %) [:a 1 :b 2 :c 3])
19:05clojurebot(:a nil :b nil :c ...)
19:07Seylerius,(remove nil? (map #(if-not (number? %) %) [:a 1 :b 2 :c 3]))
19:07clojurebot(:a :b :c)
19:11SeyleriusHow do I use .startsWith?
19:12SeyleriusAh, nvm.
19:15arrdemIs there a way to make leiningen fuse the install and uberjar tasks?
19:16arrdemIt looks like when I do lein do clean,install,uberjar it recompiles everything for no reason.
19:27hyPiRionarrdem: Oh yeah, that's https://github.com/technomancy/leiningen/issues/1816
19:28arrdemNeat.
19:47arrdemhyPiRion: well in lieu of that I managed to use make to cache jars and escape rebuilds...
19:49amalloywhen i use make for java projects i remember i'm an old man
19:50arrdemugh why is the version string evaluated when the k/v pairs are quoted...
19:50arrdems/string/form/g
22:02ddellacosta,(println "testing")
22:02clojureboteval service is offline
22:02ddellacosta&(println "testing")
22:05ddellacostapuredanger: Assuming you're a mod, but let me know if there's a better person to ask this. Is there some way I could get access to clojurebot? I was blocked more than a year ago, for a completely unknown reason, and it appears that lazybot is not running any more, so I can't run code on #clojure at all. I've tried asking politely but have gotten no response from hiredman: https://github.com/hiredman/clojurebot/
22:05ddellacostaissues/5
22:06ddellacostathat link again was: https://github.com/hiredman/clojurebot/issues/5
22:06ddellacostaIt's a bit frustrating that a user can be blocked from accessing clojurebot based on someone's personal whim, with no explanation.
22:06puredangerI'm an op but don't know anything about clojurebot
22:07ddellacostapuredanger: a, sorry--I thought the mods had some control over what bots ran. My mistake!
22:50TEttingerddellacosta: hiredman has you on ignore for forgotten reasons, but it seems like he isn't revisiting past ignores. it isn't that hard to run a lazybot if you have a server or old computer handy!
23:03TimMcddellacosta: amalloy_ is an op of this channel, but that's unrelated to the bots. I mean, he happens to run lazybot, but it's not related to him having channel op permissions.
23:03TimMcThe bots are not official, in other words.
23:04arrdemI think there's a case to be made that this is a defect rather than a feature. Clojure/Org dreaming goes here.
23:05TimMcYou think only official bots should be present here?
23:06arrdemWith the disclaimer that I'm also on hiredman's blacklists, I think it's kinda unreasonable to say that ddellacosta and I have no recourse or appeal to what seem to be general community resources.
23:07arrdemConsider the exension of this argument that it would be no problem if Clojars ip banned me with no expalantion.
23:08arrdem,1
23:08clojureboteval service is offline
23:08TimMcI see those as hugely different.
23:09arrdemHow so? Just as I can run another IRC bot I could run my own Maven servers.
23:09TimMcDon't get me wrong, I think it's quite rude of him, but it's nothing more than a public repl. You have a repl of your own, and you can paste the results in here.
23:09TimMcAnd most of the time, you can use lazybot to the same effect.
23:10TimMcClojars is baked into a build tool. Clojurebot is not.
23:10arrdemI would argue that Clojurebot is baked into IRC and every newbie learns to use it.
23:11arrdemMore on this later.