Fork me on GitHub
#ldnclj
<
2015-09-20
>
pupeno08:09:55

Good morning.

pupeno09:09:45

I just got a very quick and dirty server side pre-rendering working with nodejs, reagent, re-frame doing ajax calls. \o/

pupeno10:09:35

The bad news is that it requires a fork of re-frame. Hopefully my simple change will be merged into it later on.

pupeno10:09:51

I just wrote (console.log “foo”) in a javascript file. I’m finally thinking in Clojure.

quentin10:09:25

congratulations I guess simple_smile

thomas10:09:18

I have given up on yada for the moment.... 😞

thomas10:09:29

using compojure again...

thomas10:09:54

and struggling a bit with a POST command....

afhammad10:09:10

@pupeno: my younger brother is just starting to get into programming, he’s learning Javascript and often sends me snippets like “(some-function ‘hello’)” and asks me why it doesn’t work, i think he’s destined to be a LISPer

pupeno10:09:14

@afhammad: hahah. I’m doing an experiment with one of my parters, getting her started with Clojure before trying other languages. We’ll see how that goes.

afhammad10:09:35

@pupeno: yeh i wonder what the transition from a lisp to a non lisp language is like

thomas10:09:25

@pupeno: interesting experiment... I remember reading somewhere that some people find lisp easier to start with....

pupeno10:09:19

I wish I started with a Lisp, but on the other hand, I’m glad I started with C.

pupeno10:09:27

So far, I don’t know how she’s doing because I don’t have enough experience teaching. She’s struggling with some things but that might be the normal learning process. Some of those are inherent to functional programming, but that doesn’t mean she wouldn’t struggle with the other oo-inherent things.

pupeno10:09:22

Argh… I also need to fork node-xmlhttprequest 😞

pupeno13:09:38

And I just finished my pre-rendering library. It works, but it requires forks of node-xmlhttprequest and re-frame (small changes). I’m off for a bit and when I’m back I’ll start documenting it. Hopefully it’ll be out today.

quentin13:09:42

Cool stuff simple_smile

afhammad13:09:26

@pupeno: you are everywhere. I just searched for a cursive cheatsheet and got this: http://www.cheatography.com/pupeno/cheat-sheets/cursive-on-mac-os-x/

mccraigmccraig15:09:10

@thomas: what stopped you with yada ?

thomas20:09:42

@mccraigmccraig too many new steep learning curves at the same time. Still think yada would be better for my use case. But not 100% certain it has all the functionality I need in it.

thomas20:09:35

There is a comment in one of the tests that maps in atoms aren't supported yet.

mccraigmccraig20:09:38

@thomas i can understand the learning curve thing, given what you tried

mccraigmccraig20:09:45

what functionality do you need in yada ?

thomas20:09:11

And I think that would be very beneficial for my use case

thomas20:09:53

I have been asked to build a simple rest phonebook service.

thomas20:09:33

;; TODO: Restore this test once atoms can wrap maps (and other collections)

thomas20:09:37

is the one I spotted.

mccraigmccraig20:09:23

ah, gotcha, atoms work, maybe not maps in atoms

mccraigmccraig20:09:37

but you wouldn't really be wanting to use those would you ? you would want some persistence

thomas20:09:46

and I think for a simple DB I would need a those...

thomas20:09:01

for this particular example a in memory DB would be good enough.

mccraigmccraig20:09:35

well, you don't need to use atoms/maps at all - the AtomResource thing is just a ready-to-roll resource implementation

mccraigmccraig20:09:47

it's straightforward to create your own resources from functions

thomas20:09:33

I have to take another look at it...

thomas20:09:04

at the moment my compojure solution is looking pretty good. but not as "complete" as a yada solution woul.

mccraigmccraig20:09:09

probably a lot more synchronous too simple_smile ... i went with yada because i can make everything async

mccraigmccraig20:09:24

compojure is a lot more mature though, so it will definitely be an easier ride

thomas20:09:42

yes... but I guess you could replace jetty/ring with http-kit.

thomas20:09:10

and it is something i was familiar with as well. makes a big difference to get going.

thomas20:09:27

but I just decided I needed to rewrite bits of it... want to use UUIDs for identifying my resources.

thomas20:09:41

but that is something for tomorrow... need some sleep now.

mccraigmccraig20:09:18

ha, i'm deep in the guts of my cassandra client. no sleep for a while yet

thomas20:09:00

ok good luck. and do get some sleep.