workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
clojurians | clojure | it's not worth it tho | 2017-12-12T12:24:48.000732 | Kareen |
clojurians | clojure | I mean, the current impl reuses half Compiler.java | 2017-12-12T12:25:04.000064 | Kareen |
clojurians | clojure | I really don't have it in me to reimplement it | 2017-12-12T12:25:14.000172 | Kareen |
clojurians | clojure | (I must admit I eyed the patch to check if it was self-contained in a ns :stuck_out_tongue: ) | 2017-12-12T12:25:33.000448 | Jonnie |
clojurians | clojure | (again) | 2017-12-12T12:25:35.000065 | Rebeca |
clojurians | clojure | but yeah, I've thought about it | 2017-12-12T12:26:13.000284 | Kareen |
clojurians | clojure | anyone have insight into this behavior? I am really at a loss here | 2017-12-12T12:42:22.000311 | Eleonore |
clojurians | clojure | ```
=> (do (defrecord Foo []) Foo)
user.Foo
=> (identity (do (defrecord Bar []) Bar))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: Bar in this context, compiling:(null:1:10)
``` | 2017-12-12T12:42:26.000790 | Eleonore |
clojurians | clojure | yes | 2017-12-12T12:43:08.000460 | Kareen |
clojurians | clojure | it's commonly called the gilardi scenario | 2017-12-12T12:43:18.000451 | Kareen |
clojurians | clojure | see <https://technomancy.us/143> | 2017-12-12T12:43:28.000489 | Kareen |
clojurians | clojure | ahhh interesting. That's a very helpful link, thanks! | 2017-12-12T12:45:24.000174 | Eleonore |
clojurians | clojure | tl;dr: clojure's compilation unit is the top level form, the compiler explodes top level `do`s and treat them as N compilation units. From within a single compilation you don't see the effects of runtime operations on namespaces like `require` (in the case of that blog post) or `import` (in your case) | 2017-12-12T12:46:59.000578 | Kareen |
clojurians | clojure | <@Sandy>: iirc, in one of your odin videos, you take an XML tree, flatten it into eav triples, and use a mini-logic language to query over it
this seems to be like "collection oriented programming", in the spirit of SQL/APL
do you know of other examples / tutorials of doing "collection oriented programming" ? (it s'like mapfilter/..., but more 'structured') | 2017-12-12T14:26:33.000339 | Berry |
clojurians | clojure | <@Berry> there's some stuff like that in core.logic. | 2017-12-12T14:30:03.000227 | Sandy |
clojurians | clojure | And it's all fairly close to XSLT | 2017-12-12T14:30:13.000161 | Sandy |
clojurians | clojure | <https://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic/pldb.clj> | 2017-12-12T14:30:32.000726 | Sandy |
clojurians | clojure | <@Sandy>:
1. is <https://en.wikipedia.org/wiki/XSLT> XSLT ? (I'm not drawing the connection, and not familiar with XSLT)
2. I've been looking at APL + SQL a lot lately, and it seems possible to write general purpose (for some def) programs in those languages, and they have this notion of "everything is a tensor . everything is a table of rows" that is a bit stronger than clojure collections, but I can't quite understand it | 2017-12-12T14:41:52.000109 | Berry |
clojurians | clojure | seems like everyone gave up on xslt which is too bad | 2017-12-12T14:42:00.000857 | Myles |
clojurians | clojure | xslt is great | 2017-12-12T14:42:04.000087 | Myles |
clojurians | clojure | <@Berry> yeah, XSLT is a query/transformation language for XML written in XML ( :neutral_face: ) | 2017-12-12T14:42:41.000128 | Sandy |
clojurians | clojure | the syntax is mindboggling, but you can do some very complex translations in an incredibly simple way | 2017-12-12T14:43:18.000366 | Myles |
clojurians | clojure | unfortunately, pretty much everyone left it behind 10 or 15 years ago | 2017-12-12T14:43:40.000562 | Myles |
clojurians | clojure | that's not too bad right? xml is basically
`(foo ...)` -> `<foo> ... </foo>` | 2017-12-12T14:43:45.000572 | Berry |
clojurians | clojure | Exactly, convert all the XML to EDN and it wouldn't be half bad. | 2017-12-12T14:43:52.000719 | Sandy |
clojurians | clojure | So those are the big "query arbitrary nested data" techs I'm aware of. | 2017-12-12T14:44:35.000349 | Sandy |
clojurians | clojure | There's also JQuery and libs like Specter, but they differ a little in their lack of joins and multiple data sources. | 2017-12-12T14:45:06.000155 | Sandy |
clojurians | clojure | I'm interested in using APL / SQL for things beyond 'querying databases', and then porting the style to Clojure. For example, things like dijkstras algorithm / topological sort can get implemented in a particular way in APL, as well as game of life. | 2017-12-12T14:47:10.000472 | Berry |
clojurians | clojure | And translating that over would get clojure code very different in style from 'common/idiomtic clojure style' | 2017-12-12T14:47:28.000365 | Berry |
clojurians | clojure | > Exactly, convert all the XML to EDN and it wouldn’t be half bad.
Sort of funny in the use of the word “half” here | 2017-12-12T14:50:10.000242 | Petronila |
clojurians | clojure | It’d be about half | 2017-12-12T14:50:20.000636 | Petronila |
clojurians | clojure | (well better really, but close enough :stuck_out_tongue: ) | 2017-12-12T14:50:46.000767 | Petronila |
clojurians | clojure | :slightly_smiling_face: | 2017-12-12T14:50:52.000610 | Sandy |
clojurians | clojure | funny enough though, whenever I work with XML I *really* want something like XSLT in Clojure. Especially something where I can feed it 20 queries and an optimizer will compile it all down to a single fast gather function | 2017-12-12T14:51:46.000690 | Sandy |
clojurians | clojure | sounds like a TODO for someone | 2017-12-12T14:52:47.000369 | Petronila |
clojurians | clojure | Well, this might be too literal of an interpretation of "XSLT in Clojure", but <https://github.com/eerohele/sigel> :stuck_out_tongue: | 2017-12-12T15:15:25.000010 | Elijah |
clojurians | clojure | >xslt is great
Must be the first time I've ever heard anyone say that. Not quite everyone left it behind, though — it's still quite heavily used in the wonderful world of technical documentation and publishing. | 2017-12-12T15:16:44.000186 | Elijah |
clojurians | clojure | love the headshot that goes with it | 2017-12-12T15:40:56.000374 | Williemae |
clojurians | clojure | It's pretty obnoxious to see your own face like that, I always forget that happens when you paste a GitHub link here… sorry about that. | 2017-12-12T15:41:25.000198 | Elijah |
clojurians | clojure | haha well it’s github’s fault really | 2017-12-12T15:41:50.000354 | Williemae |
clojurians | clojure | > xslt is great
I feel like this might have been more common to hear pre-json. | 2017-12-12T15:42:53.000101 | Williemae |
clojurians | clojure | i seem to remember finding it to be neat back in college, but we’re talking early->mid 2000's. | 2017-12-12T15:43:26.000707 | Williemae |
clojurians | clojure | Hi all: I'm working on a boot based web-app. The environment is set up in a way that allows me to develop and deploy it directly, but I would also like to be able to use it as a basis for derived apps that would extend the core tech. It seems there would be two approaches to this:
1) fork the repo, and use standard distributed git workflows to merge features between the core and derived apps
2) package the core app as a library to be consumed by other projects
The first would seem to make it pretty trivial to merge features back and forth between the different forks, but would eliminate the distinction between upstream and downstream. The second would maintain a very clear distinction about where features are coming from to make a coherent system, but makes integrated development a little more cumbersome. I'm wondering if folks have had experience with deriving one app from another, and what approach they used to do integrated development (either the first or second approach above, or some third approach). | 2017-12-12T15:46:52.000361 | Billi |
clojurians | clojure | could use git submodules instead of forking | 2017-12-12T15:47:49.000389 | Williemae |
clojurians | clojure | not everyone likes them though, but it’s a matter of taste | 2017-12-12T15:48:01.000104 | Williemae |
clojurians | clojure | <@Williemae>: Just curious, did the headshot disappear for you? Wondering whether what I did to remove it works for just me or everyone… | 2017-12-12T15:49:12.000444 | Elijah |
clojurians | clojure | yeah looks like whatever you did removed your profile image | 2017-12-12T15:49:35.000088 | Williemae |
clojurians | clojure | Awesome. | 2017-12-12T15:49:38.000407 | Elijah |
clojurians | clojure | <@Billi> for #2 i think the question becomes how often are the sdk and clients developed in tandem? If the workflow is very often going to be the client dev is also working on the core sdk to create their features then perhaps doing a lib distribution is not the most efficient way of doing it..at least at the beginning. If your core sdk doesnt change much and may occasionally need updates maybe the extra overhead is something you can live with. Maybe it’ll also encourage more thoughtful api design since it’ll be a pain to work on the core sdk :wink: | 2017-12-12T15:53:58.000337 | Williemae |
clojurians | clojure | <@Williemae>: thanks for the submodules rec, I haven't used them in a while, so I will have to do a bit more reading. In another channel, someone recommended the use of "checkout" dependencies, which I had not heard of, but also looks like an interesting alternative. | 2017-12-12T16:05:19.000521 | Billi |
clojurians | clojure | <@Elijah> How did you removed that picture? Wherever I paste Github link it always looks like that. | 2017-12-12T16:05:36.000675 | Heriberto |
clojurians | clojure | ah yeah i guess that’s a boot-specific thing | 2017-12-12T16:06:58.000157 | Williemae |
clojurians | clojure | Think also for lein as well: <https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies> | 2017-12-12T16:07:59.000308 | Billi |
clojurians | clojure | how can I format
```0.0115```
to be
```0.01150000```
?
I was trying like this:
```(format "%.8f" 0.0115)``` | 2017-12-12T16:30:08.000104 | Tameka |
clojurians | clojure | but throws an error all the time | 2017-12-12T16:30:21.000636 | Tameka |
clojurians | clojure | hmm it seems to be working in repl :confused: | 2017-12-12T16:31:53.000227 | Tameka |
clojurians | clojure | ah nvm, found this
<https://stackoverflow.com/questions/34667532/clojure-clojurescript-e-g-the-format-function> | 2017-12-12T16:34:41.000380 | Tameka |
clojurians | clojure | <@Sandy> you seem to give a lot of value to logic programming. But I don't ever seem to find a practical use for it in my work, so I presume I'm missing something. Any hints? | 2017-12-12T17:15:24.000309 | Jodie |
clojurians | clojure | If you hover over the area where the picture is, an X icon appears to the left of the gray border. Click there and Slack asks you whether you want to remove the attachment. | 2017-12-13T01:45:34.000177 | Elijah |
clojurians | clojure | given a vector `v` and an int `n` what is the fastest way to drop the last `n` elements of `v` i.e.
`v=[1,2,3,4]` `n=1` -> `[1,2,3]` | 2017-12-13T02:28:49.000010 | Berry |
clojurians | clojure | `drop-last`? | 2017-12-13T02:29:41.000147 | Randee |
clojurians | clojure | oh, ahd I need a vector, not a lazy sedq back | 2017-12-13T02:30:21.000200 | Berry |
clojurians | clojure | basically, I want pop-n | 2017-12-13T02:30:45.000298 | Berry |
clojurians | clojure | Thank you, <@Elijah>! | 2017-12-13T02:39:32.000128 | Heriberto |
clojurians | clojure | Nothing ready AFAIK, and I don't know how fast (apply vector (drop-last 1 [1 2 3 4])) would be. | 2017-12-13T02:44:01.000198 | Isabel |
clojurians | clojure | <@Berry> with Specter: `setval (srange (count v) (- (count v) n) NONE v)` | 2017-12-13T02:54:15.000230 | Noella |
clojurians | clojure | there is probably a better way to figure out the indexes | 2017-12-13T02:54:27.000084 | Noella |
clojurians | clojure | that will give you a vector back | 2017-12-13T02:54:49.000226 | Noella |
clojurians | clojure | hello guys | 2017-12-13T04:02:17.000146 | Mallory |
clojurians | clojure | what is the best to handle deeper maps in clojure with only make affect on the most inner map for example: | 2017-12-13T04:15:50.000491 | Mallory |
clojurians | clojure | {:t1 {:f1 {:l1 {:name :hello}}} :t2 {:fff2 {:ll2 {:name :world}}} | 2017-12-13T04:17:09.000243 | Mallory |
clojurians | clojure | <@Mallory> did you have a look at <https://github.com/nathanmarz/specter> already? | 2017-12-13T04:17:24.000037 | Evelyne |
clojurians | clojure | nope | 2017-12-13T04:17:42.000359 | Mallory |
clojurians | clojure | what i want to achieve is handle the last map without affecting other | 2017-12-13T04:18:01.000286 | Mallory |
clojurians | clojure | (assoc-in map [:t1 :f1 :l1 :name] "goodbye") | 2017-12-13T04:19:48.000026 | Maggie |
clojurians | clojure | <@Maggie> that's true if the keys are equivalent | 2017-12-13T04:20:25.000246 | Mallory |
clojurians | clojure | but they aren't | 2017-12-13T04:20:29.000520 | Mallory |
clojurians | clojure | are transducers helpful here? | 2017-12-13T04:20:49.000524 | Mallory |
clojurians | clojure | what are trying to change? | 2017-12-13T04:20:58.000204 | Maggie |
clojurians | clojure | most inner map only without affecting the outer structure | 2017-12-13T04:21:11.000247 | Mallory |
clojurians | clojure | clojure.walk/postwalk should do it | 2017-12-13T04:21:39.000355 | Maggie |
clojurians | clojure | recursive traversal of the tree | 2017-12-13T04:21:59.000152 | Maggie |
clojurians | clojure | okay good | 2017-12-13T04:22:45.000012 | Mallory |
clojurians | clojure | thanks guys | 2017-12-13T04:22:47.000426 | Mallory |
clojurians | clojure | If you have more cases like this, I would still like to encourage you to check specter. But of course it might also be that you prefer to keep going with vanilla Clojure! :+1: | 2017-12-13T04:25:46.000024 | Evelyne |
clojurians | clojure | <@Evelyne> thanks, seems specter very cool, and i guess it solve my issue with handling inner data structures, is there any connection between specter and transducers ? | 2017-12-13T04:52:22.000164 | Mallory |
clojurians | clojure | no need for specter to drop n elements of a vector | 2017-12-13T04:53:54.000335 | Kareen |
clojurians | clojure | just use subvec | 2017-12-13T04:53:57.000364 | Kareen |
clojurians | clojure | <@Kareen>? | 2017-12-13T05:01:49.000418 | Mallory |
clojurians | clojure | ? | 2017-12-13T05:03:05.000483 | Kareen |
clojurians | clojure | <@Kareen> ahh, true! forgot about that one, much better fit in this case | 2017-12-13T05:05:03.000072 | Noella |
clojurians | clojure | haha, lol. I didn’t see that there was a reference to specter already just a few lines above. :smile: Wow, I was confused :smile: | 2017-12-13T05:16:26.000231 | Evelyne |
clojurians | clojure | <@Evelyne> can you help with specter question | 2017-12-13T06:06:54.000141 | Mallory |
clojurians | clojure | (s/select [MAP-VALS MAP-VALS MAP-VALS :title (filterer (fn [s] (empty? s)))] res), i'm trying to select hash maps which has non-empty :title | 2017-12-13T06:07:38.000178 | Mallory |
clojurians | clojure | i got this: IllegalArgumentException Don't know how to create ISeq from: java.lang.Character clojure.lang.RT.seqFrom (RT.java:542) | 2017-12-13T06:07:56.000431 | Mallory |
clojurians | clojure | oh got it | 2017-12-13T06:12:20.000048 | Mallory |
clojurians | clojure | (s/select [MAP-VALS MAP-VALS MAP-VALS :title (fn [s] (empty? s))] res) | 2017-12-13T06:12:34.000419 | Mallory |
clojurians | clojure | without filterer | 2017-12-13T06:12:40.000328 | Mallory |
clojurians | clojure | <@Evelyne> thanks for referring this nice lib to me | 2017-12-13T06:13:04.000400 | Mallory |
clojurians | clojure | another question | 2017-12-13T06:15:08.000101 | Mallory |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.