#clojure logs

2017-01-11

00:26foobar_hello, how do you implement a threaded code interpreter without tail call?
00:27foobar_as far as i see recur is only for recursive tail position..
01:40uberdanexit
01:40uberdanexit
03:05HanonimeHola
03:05mavbozohalo
03:05dysfunyo
03:07Hanonimehow 'r'y'all in this fine morning ?
03:08dysfuni was sat down for a few seconds when i got your message
03:08dysfunso tired as
03:13Hanonimerough night ?
03:13dysfunno, just rough morning. most mornings are
03:15mavbozorough morning a couple hours ago because I slept late and have to get up early
03:17Hanonimehave a bit of trouble starting work myself
03:20dysfun i do every morning
03:20dysfunthat's why i sit in here and read the internet for a couple of hours before doing anything
03:24deadghostlistening to trance music works very very well for me to kickstart work
03:25dysfunI can't really. i only have shit earphones any my partner is in bed sleeping
03:26deadghostI used cheapo $30 headphones
03:26deadghostsound is great, not comfortable for 12 hour code sessions
03:27dysfunmost of my code is written during long sessions
03:31Hanonimefor certain programming tasks, music is a real boost
03:31deadghostit's the only way I can do long sessions without getting distracted
03:32Hanonimebut then you need the right kind of music
03:33Hanonimesometimes i listen to atonal music because it's very good for putting distractions away, although it's shit if you try to enjoy it
03:33fantazo_music is also a helpful blanket against colleagues noise.
03:34Hanonimei work a lot at home, it's very quiet, too quiet sometimes
03:36deadghostwould be nice to upgrade to a nicer pair of headphones one day
03:37deadghostvery important piece of equipment
03:38Hanonimego for Ath-M50X if you can treat yourself
03:39deadghostHanonime, shooting to get that in 4 months if I make it back home
03:39deadghostand have a bit of extra money
03:40deadghostmy current pair is already falling apart
03:40deadghostneed to position the wire just right otherwise one side doesn't work
03:41deadghosthead strap is gone
03:41dysfunyeah it's no fun being broke is it?
03:41deadghostI wake up every morning wishing for death
03:42dysfunwe only really do code, not MH advice
03:42HanonimeMH ?
03:42dysfunmental health
03:43deadghostdysfun, funny enough my code productivity has never been higher
03:43dysfunbecause you're making long sessions to sit down and hack
03:43dysfunbtw, i figured out that datomic question yesterday
03:44deadghostright
03:44deadghostwhat's the answer
03:44dysfunyou use :db.unique/value instead of :db.unique/identity
03:44Hanonimei think programmers are more prone to have MH issues than the average
03:44dysfunand then it will just do the right thing
03:44Hanonimewell, maybe not mathematicians
03:45deadghostI can't stop reading MH has men's health
03:45dysfunHanonime: certainly is. i used to make a point of speaking about mental health at programming conferences, but i just don't even go anymore
03:45deadghostdysfun, got a link where I can read more about that?
03:46deadghostoh I think I found it
03:46dysfunit's the 'schema' page on the datomic site
03:47dysfundoes anyone know if nikitonsky ircs anywhere?
03:47deadghost"Attempts to assert a new tempid with a unique value already in the database will cause an IllegalStateException"
03:47deadghostok so you try catch the exception and handle it from there yeah?
03:48dysfunyes
03:48dysfunobviously you can't add a user if they exist, so you just tell the user that
03:48deadghostalright I'll put that in my do eventually list
03:58dysfunhrm, ekmett says "i tend to write large quantities of code before attempting to compile". I do that too, makes me feel slightly better
03:59deadghost?
03:59deadghostI mean
03:59deadghostyou eval in the repl right?
03:59dysfuni just write code and eventually try and run it most of the time
03:59dysfunonly when debugging or i'm not sure of something
04:00deadghostno I need that interactivity
04:00dysfuni don't. while i find it annoying tidying up the bugs afterwards, it's not as annoying as losing flow
04:00deadghosta tiny bit more discipline up front to prevent possible headaches 30 minutes down
04:01deadghosteval is part of my flow
04:02dysfunbasically, waiting for things to come back stops my braining
04:09dysfunthat's why i'm so big on speeding up dev workfow
04:09deadghostdysfun, tooling is essential
04:10deadghostI still have a lot of speed bumps
04:10dysfundon't we all
04:10deadghostI thought emacs + evil would get me super super fast
04:10dysfuni've tried to move things around to focus on delivering more often
04:10deadghostand it did
04:10deadghostbut I only found more bumps
04:10dysfunso i've been tackling simpler problems that can be used in combination to tackle other things
04:11dysfunfor example i made a bunch of updates to my spec library yesterday and threw away a lot of code in some other libraries
04:11deadghostcljr also could be better
04:11deadghostfind-usages takes forever
04:11dysfunto get the sort of performance we like requires proper integration
04:12deadghostmy hardware is also choking up sometimes
04:12dysfunwhich is in general something clojure does terribly, because we like small libraries that do one thing well
04:12deadghostneed more ram and a ssd
04:12dysfunbut it's still early days
04:13deadghostsmall libraries made getting started with web dev a pain
04:13dysfunyes
04:13deadghostnow it's *mostly* smooth sailing
04:13dysfuna few of us are trying to tackle that one
04:13dysfuni still point people at luminus to get starterd
04:13deadghostwell it's been 10 years
04:13deadghostI suppose that's still early
04:13deadghostcertainly not the golden age
04:13dysfunsure. and how many people from here do you think were here ten years ago?
04:14dysfunthere are enough libraries to do most things now, which is great
04:14deadghostwhen I started
04:14dysfunnow is a great time to focus on creating an integrated experience
04:14deadghostthe lib ecosystem was already pretty good
04:14deadghost2-3 years ago
04:14dysfunwhen i started, it was okay. the documentation was generally terrible
04:15deadghostcljs is definitely early days though
04:16deadghostI still don't quite have the hang of it
04:16deadghostand having a concoction of cljs deps that worked was a pain for me when I got started
04:17deadghostseemed to have stabled out a bit
04:18dysfunoh yes, libs did not work well together in the early days of cljs
04:18dysfuni haven't had a problem in ages though
04:18dysfunnot to say cljs is without its problems today, but it's much better
04:18deadghostit is
04:18deadghostat least we can all kinda agree on figwheel
04:19deadghostjumped through 2-3 other brepls before figwheel
04:20dysfunoh i'm back to boot-reload, which now uses figwheel-sidecar
04:20deadghostI never tried boot
04:20deadghostlein just werks
04:21dysfunboot definitely does not 'just work', but it's powerfu
04:24mavbozofighwheel just works through leiningen repl
04:24dysfunexcept when it gets confused
04:25deadghostI actually haven't been using the actual repl
04:25deadghostand just modifying the file
04:31mavbozoyeah, that confusing part in the repl. sometimes when I evaluate something it says symbol not found and at the same time return the result
05:14justin_smithfoobar_: you can use trampoline for that
05:15justin_smithfoobar_: the fundamental limitation is that goto in the jvm can only jump within a single method, and recur is a goto, but trampoline allows ditching the previous stack frame and starting a new one (instead of going deeper)
05:59dysfunjustin_smith: "but how do they work?"
06:00justin_smithdysfun: it's a while loop that calls your return value with no args as until it's not a function any more
06:03dysfun:o
06:03dysfunsuch dynamic. very webscale
06:03justin_smithdysfun: the source of trampoline is remarkably simple and readable, in fact
06:03dysfundespite being written in java?
06:03justin_smithit's clojure!
06:03dysfunooh