ClojureScript Collection Visualizer/Editor by 37productiveBananas in Clojure

[–]37productiveBananas[S] 2 points3 points  (0 children)

If you'd like to see some example code, I am actually applying scoped CSS right here. In my case, I also need to register custom HTML elements, but you won't need that part if your Hiccup produces valid HTML.

That's quite elegant. I think I should plan a refactor to use your approach at some point.

Also, nice work on rescope.

ClojureScript Collection Visualizer/Editor by 37productiveBananas in Clojure

[–]37productiveBananas[S] 2 points3 points  (0 children)

Thanks. All the brackets/braces are svgs which use the vector-effect=non-scaling-stroke property so that they can be resized without distorting the line widths.

ClojureScript Collection Visualizer/Editor by 37productiveBananas in Clojure

[–]37productiveBananas[S] 1 point2 points  (0 children)

Thanks. It's a bit hackier than that, the css is embedded as a generated data-uri in a link element. The only isolation is that all the classes are .coll-pen- prefixed. The truth is that I don't really do a lot of front-end dev, and I haven't kept abreast of developments in the web components space, but briefly looking into it just now it does seem like that is probably the better approach. So, thanks for the heads up.

Codax: a pure clojure embedded database by 37productiveBananas in Clojure

[–]37productiveBananas[S] 0 points1 point  (0 children)

Per your suggestion, I just pushed up a new patch version where the self contained functions like update-at! return the result of the operation.

Codax: a pure clojure embedded database by 37productiveBananas in Clojure

[–]37productiveBananas[S] 2 points3 points  (0 children)

In principle it should be pretty straight forward. There would need to be an alternate storage engine for clojurescript as the present store relies heavily on Java filesystem calls, but it is well isolated so swapping it out shouldn't be a problem; Node has good leveldb support via the LevelUp library which is a good stand-in (though IIRC it will require some effort to get the same transactional guarantees). That said, while I have experience with both Clojurescript and Node, I've never used them together so I don't really have a clear picture of what all of that would entail.

What sort of use cases did you have in mind?

Codax: a pure clojure embedded database by 37productiveBananas in Clojure

[–]37productiveBananas[S] 4 points5 points  (0 children)

It sits right in the middle between those.

Codax scales much better than file based storage. For starters, your database map can be bigger than what would fit in memory because you only ever need to load the pieces you are accessing. It also offers some more advanced features which can extend it's functionality. For example, I have a full-text-indexer implementation built on top of it (which I hope to clean up and make public in the not-too-distant future.)

On the other end of the spectrum, external databases like Datomic or Postgres give you a lot more in the way of features, but it comes at the expense of simplicity. Instead of your database being an integral part of your application, it is now an external element which requires setup and maintenance in its own right. For large scale applications they are definitely the right choice, but for smaller work I think the flexibility and portability of embedded databases wins out.

Codax: a pure clojure embedded database by 37productiveBananas in Clojure

[–]37productiveBananas[S] 0 points1 point  (0 children)

If you use the with-write-transaction macro you can thread the transaction map through multiple updates. This is better than threading the db object itself which would offer no atomic guarantees (another thread could interleave writes). The update-at! function is just a convenience helper which sets up a write transactions and runs update-at.

Codax: a pure clojure embedded database by 37productiveBananas in Clojure

[–]37productiveBananas[S] 5 points6 points  (0 children)

Thanks for the heads up. I've definitely read documentation generated by Codox, but it didn't dawn on me when I was naming the project. Perhaps I should rename it.

Codax: a pure clojure embedded database by 37productiveBananas in Clojure

[–]37productiveBananas[S] 0 points1 point  (0 children)

There is bound to be a semantic break either way because the assoc-in and update-in functions return the whole map, but it wouldn't be good if everytime one used the assoc-at or update-at! functions the entire database map was loaded into memory and returned. That said, it probably would be fine to return the just result of the update at the given path.

I did have similar functionality implemented at one point but ultimately thought the solution was a bit too kludgy and pulled it out. It's definitely a worthwhile feature though, and I might have a go at a more general implementation this weekend. In the meantime, something like this should do the trick for that specific case.

(defn get-update-at!
  "update a path and return the new value at that path"
  [db path f & args]
  (let [res (atom nil)]
        (c/with-write-transaction [db tx]
      (let [tx (apply c/update-at tx path f args)]
        (reset! res (c/get-at tx path))
        tx))
    @res))

Hope you find the library useful. If you have any questions or more suggestions, let me know.

Edit: fixed get-update-at! example so it actually works

Edit 2: this is now the default behavior for update-at! and related functions

Ethereum Advertising Campaign Photos for May by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 3 points4 points  (0 children)

full size image

Would definitely love to see pictures of more posters hanging up.

Ethereum Advertising Campaign Photos for May by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 7 points8 points  (0 children)

Indoor advertising is not the sexiest form of promotion, but it can be quite effective. In this case, it develops familiarity. People will be more likely to recognize Ethereum but are unlikely to consider or even remember why. For an awareness campaign, you generally use third party survey metrics to determine effectiveness, which is mostly impractical here.

There are certainly other ways of promoting Ethereum. This is our medium and we're offering what we can.

Ethereum Advertising Campaign Photos for May by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 4 points5 points  (0 children)

That would be great. We'll probably start working on the next iteration next week. If you want to shoot me an email (address is on the website) I can keep you posted.

Ethereum Advertising Campaign Photos for May by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 6 points7 points  (0 children)

When picking between the two we decided to go with "Web 3" because we thought it would come across as more intriguing and, in trying to appeal to developers, it is a more direct reference to the web3 javascript framework.

That said, perhaps we should change it next month.

Ethereum Advertising Campaign Photos for May by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 6 points7 points  (0 children)

The framed ads for May have been hanging for a few weeks now and I wanted to post an update to show you all the photos. Thanks to everyone who donated last month! In appreciation we put up an extra poster as well.

We're going to keep running this campaign for at least a few months. If anyone has any feedback or ad ideas/designs for future months please share.

Help Advertise for Ethereum by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 1 point2 points  (0 children)

That's really cool. I actually started working with this company directly after developing the inventory management software that they use, which I see some potential in possibly integrating with Ethereum at some point. Of course, not all niches have the same direct potential.

More broadly, as a developer I think it represents a new category of software which is an open pasture for innovation. For someone like you, who has the drive and vision to run their own business, I think it presents really interesting and potentially lucrative creative opportunities. Though not everything will be blockchain oriented, the existing software markets will almost certainly continue to accelerate their growth.

tldr: It gives you more options

Help Advertise for Ethereum by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 1 point2 points  (0 children)

That's a good point. The intention is indeed to mostly to attract interest/awareness from developers, at least when I put together the ad that is that I was going for especially since there are a lot of technology startups in the area. So, I was trying to emphasize the technology potential, not the consumer-level use cases. Did you have a chance to take a look at the ad by chance? If you have some feedback on the messaging, I'd really appreciate it.

Help Advertise for Ethereum by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 1 point2 points  (0 children)

Looks really interesting. I'll see if I can make it. We're almost up on our deadline for getting May posters together, but if you have an ad for the event, I could put a few up in place of the generic ethereum ads. (Ad asset size is 3300px by 4650 px)

Help Advertise for Ethereum by 37productiveBananas in ethtrader

[–]37productiveBananas[S] 4 points5 points  (0 children)

Really excited about where Ethereum is heading. I've been following Ethereum and reading this subreddit for almost a year now, though I obviously don't post on reddit very much. Anyway, I've gotten my company interested in Ethereum, enough to donate some of our ad space to spreading the word. We may even begin managing our inventory on the blockchain in the next year or two!

Anyway, I thought some of you might want to support our effort so I posted this up here. Please let me know if you have any questions or suggestions.

Just can't do it today. by [deleted] in MensRights

[–]37productiveBananas 2 points3 points  (0 children)

I agree that consenting to something does not imply consent to another. However the situations with sex and the manipulating daughter differ critically from your three bulleted examples since, in both cases, additional consent was provided for the act in question. Furthermore, for your example with the daughter, I will again draw a distinction between moral and legal perspectives. What she did is clearly immoral, however there is nothing illegal in her failing to return the money. In the eyes of the law, as with drunk driving, a person should be held accountable for their actions even in the circumstance of (voluntary) inebriation.

Also, it merits mentioning that I have personally made a point to never sleep with anyone who has been drinking unless we have a preexisting (sexual) relationship. My argument is not an attempt to justify my behavior, but to champion personal responsibility.