Fork me on GitHub

afternoon 🙂


tonight I’m having a long meeting with Tony Kay for an ambitious but exciting open source project for rapid application development. I’m equal parts excited and mortified to talk with someone with so much experience.


when I offered my help I was more thinking along the lines of writing tests, docs, cleaning up the API, implementing some things. He’s actually involving me in the design and hammock process too to my surprise. So wish me luck!


cool, good luck @yannvahalewyn. does this project already exist somewhere?


It’s in the experimental idea phase, and everything is changing. But there is some kind of a demo online + a conversation between him and me outlining what needs to be done if you’re interested 🙂


ah that Tony Kay, I mixed it up in my head with some Smalltalk or other interactive guru


now it makes sense 😉


tldr; RAD aims to allow developers to declare parts of their system and leverage the declaration to remove as much of the boiler plate as possible, but not to force the dev in a certain direction. Think about db queries, pathom resolvers, fulcro mutations, prefab UI components to make forms on admin panels, validation, authorisation, data fetching from multiple data sources, you name it


conceptually all will be open maps and you could extend the system with your specific needs


it seems like fulcro is becoming the rails of clojure (but in a good way)?


Like many others I’m really hoping for that killer app to make an appearance 🙂


I’m very excited about this because it aligns well with the direction clojure is taking and with Tony’s decades of experience I think he might bring something great to the table


but for now I just hope I won’t make an ass off myself #impostersyndrome


Tony Kay is very laid back don't worry


Yeah he is, we talked a bit already and it went ok. You know him?


I met him in Austin, and worked with him. We are long time Fulcro users. From the time it was called Untangled :-p


I mean I didn't get most of this, but It sounded very exciting!

upside_down_parrot 4

You can do all the things Yann! 🎉


I tried explaining it the best I could, but when Steve talks I feel the same way haha


me slaps yann with a hammock


pun on IRC line from the olden days > /me slaps around with a large trout


I'm trying to watch the video but I'm afraid since I don't know much about fulcro it might be hard to follow 😅


btw the railsiest thing I've seen for clojure so far is Coast on Clojure


I.. don’t know it yet either 😅


which is them basically copying all the patterns from rails, but slightly better. But you probably meant the "Rails of Clojure" as in the killer app that makes people want to learn/migrate to clojure.


there is another exciting thing in progress which I can't talk about yet, which could be a clojure killer app


I want to know though 😭


I actually made something even more railsey I think, rails + administrate in ~100 lines of clojure as a proof of concept a couple of weeks ago


all the things, inflection, schema read from the database (horrible idea but railsey 😉), rest resources (routes + handlers), UI, forms. clojure is insane


argh you removed id haha


I kinda never learned pure sql because I used rails


and trusted it blindly


Never really had an issue with it.


sorry, I removed it to not come across negative towards automatic db queries 😉


Don’t worry I’ll do it for you


When using a sql database I need the sql stuff at some point, so I don’t like ORM style of things. But at work we have so much boilerplate in the basic CRUD stuff right now it’s annoying


Hahaha, I like them for rapid development.


funily I’m actually working on improving this right now. Well I should be but I’m hanging out on slack with you guys


basically for prototyping it's nice to just modify/generate queries on the fly in the code rather than have to create a query string yourself and figure it out until it works (probably because I'm not great at writing pure sql)


what RAD wants to achieve is indeed to have those tools for minimal boiler plate during greenfield, but you can later rock your own solutions that better fit the project’s needs. Or just pile onto it


@hobosarefriends as long as you can easily override it with manual SQL when you need to, it's fine I guess


Yeah, active record could do that, I think you could just pass a string or a lambda to where and it would run it directly basically.


Rails seemed to have a philosophy I really liked, which was having defaults that worked for most people most of the time, but it could be overridden all the time.


My talk wednesday is actually called “Composition over convention” as a wink to Rails’ philosophy. I’ve found that overriding things isn’t enough if the framework doesn’t have composability in mind


Then I better not miss it!


Either way I have to see what cool patterns and designs the Clojure people come up with now. ❤️ clj


@hobosarefriends Rails is awesome for what it is, but when I started doing it (being used to Clojure) I felt there was so much magic going, on I didn't know where to look when something went wrong or didn't perform well


The mutability and monkey-patching makes it hard to track down issues I found


Still, it's an awesome tool to get things done quickly


(I've only done one or two real Rails projects, so take everything I say about it with a grain of salt)


I have done one other project with the Java version of the Play framework which was a horrible experience ORM-wise


there was an actual bug in the ORM-framework which was related to concurrency


all in all I found it faster and less confusing long term to just SQL myself


Rails is suuuuper magical (I never fully understood a lot of the things, like the asset pipeline/sprockets), but since everyone uses the same magic the problems you tend to encounter tend to be problems other people have already encountered. But yeah Magic has it's downsides.


if you write SQL yourself, do you find other people can also easily read it? I've haven't seen much handwritten stuff in my projects and I always wondered how legible it would be.


@hobosarefriends The sql is usually coupled with a Clojure function that describes what it does, including a docstring. But often the SQL is very simple and readable as well. And what is cool, you can just paste that SQL in a pgadmin somewhere and tinker with it


Yeah I use hugsql on one of my personal projects


It's alright, I just lack the composability that I'm used to 😅


if you want composable sql maybe try honeysql


I've never bothered with it since I often don't need that dynamicity


what's cool about clojure is that you can just combine all these libs and build your own cool thing I guess


this does look pretty compelling:

(-> (insert-into :properties)
    (values [{:name "John" :surname "Smith" :age 34}
             {:name "Andrew" :surname "Cooper" :age 12}
             {:name "Jane" :surname "Daniels" :age 56}])
=> [#sql/regularize
    "INSERT INTO properties (name, surname, age)
     VALUES (?, ?, ?), (?, ?, ?), (?, ?, ?)"
    "John" "Smith" 34
    "Andrew" "Cooper"  12
    "Jane" "Daniels" 56]


+1 for hugsql -- perfect non-ORM for me


composability of these things can often be an anti-feature


and hugsql snippets get you quite far as well


I kind of liked getting down to raw sql with, might try hugsql if I would use it more, for now it where just a couple of functions like this, that basically validate and perform part of the transfer:

(defn transfer-from!
  [iban token amount]
    (vg/valid-open-iban iban)
    (with-open [conn (j/get-connection @datasource)]
      (j/execute-one! conn ["
      UPDATE balance
      SET amount =
        CASE WHEN balance.token != ? THEN balance.amount
        WHEN balance.amount - ? >= balance.lmt THEN balance.amount - ?
        ELSE balance.amount END FROM balance AS old_balance
      WHERE balance.iban = ? AND balance.balance_id = old_balance.balance_id
      RETURNING balance.*, old_balance.amount as old_amount"
                            token amount amount iban]))))


I should try next just because I like things Sean Corfield makes.


And honeysql as well, but I don't know why I didn't choose it when I started working on stuff.. Maybe it had a dsl of some. Sort


next is really like wight, bassically all you can do is send some sql, and get either a map, or a list of maps back. But most of the time that's enough 🙂.