Fork me on GitHub
#off-topic
<
2017-12-07
>
qqq00:12:13

the function passed to .requestAnimationFrame -- is it guaranteed to be called exactly once, or does it have to be indempotent (i.e. called multiple times = called once)

noisesmith00:12:23

with kafka, is there a normal recipe for having multiple clients using the same ID - I’m finding that a second parallel client gets no messages until the other one disconnects - is this because I need to set up my partitions differently?

noisesmith00:12:38

looks like I want something other than kafka - it does not have the dispatch behavior I need

phronmophobic00:12:38

@qqq, I can’t imagine .requestAnimationFrame requiring an idempotent function as that’s where you’re supposed to make changes before a repaint

phronmophobic00:12:54

if you make two requests to requestAnimationFrame before a repaint with the same function, it will call the same function twice though

seancorfield01:12:18

@quang It was some free Mac app I think...

quang01:12:07

oh for some reason, I thought you lived in your mindmap app... (like have a mindmap for everything) 🙂

seancorfield01:12:20

... MindNode Lite, apparently.

seancorfield01:12:48

Hah, I used to... but I got out of the habit.

quang01:12:17

really? why's that? The interview mindmap is bad ass.

seancorfield01:12:34

I'm not sure why I stopped using mindmaps... I guess I was just working on stuff where I didn't need them as much... well, I haven't spoken at a conference for nearly five years and I always used them for sketching out talks.

seancorfield01:12:59

I'm due to give a talk about Clojure at a user group early next year so I might get back into the habit 🙂

qqq01:12:57

@smith.adriane: if requestAnimationFrame guarantess: * each callback is called exactly once * callbacks are claled in order * callbacks happen before next frame then life would be easy. Is this explicitly stated anywhere ?

phronmophobic02:12:22

which is always my goto reference for these types of things

phronmophobic02:12:26

the exactly once and called in order are both explicitly mentioned

phronmophobic02:12:57

I think it’s guaranteed to run before the next frame, https://html.spec.whatwg.org/multipage/webappapis.html#update-the-rendering, but my brain is a little tired to read through that whole thing

qqq02:12:57

@smith.adriane: thanks! that page is amazing!

Let callbacks be a list of the entries in doc's list of animation frame callbacks, in the order in which they were added to the list.

Set doc's list of animation frame callbacks to the empty list.

For each entry in callbacks, in order: invoke the callback, passing now as the only argument, and if an exception is thrown, report the exception. [WEBIDL]
guarantees what I nee

borkdude12:12:30

Wonder what you folks think. Is upgrading from 24" Full HD to 27" 4k worth it? Anyone using such a monitor under MacOS?

jmayaalv13:12:18

@borkdude i upgraded recently and i am very happy with the extra real estate 🙂

borkdude13:12:47

@jmayaalv do you use it under MacOS?

chris13:12:37

I think the bump in resolution itself is worth it

borkdude13:12:07

@chris I’ve upgraded once to a 25" 2540x1440 p monitor, but I had to sell it second hand months later, because I found the fonts too small in MacOS on that resolution. This is what I’m most concerned about with buying a new monitor

borkdude13:12:21

MacOS doesn’t have font scaling like Windows which is annoying

tbaldridge14:12:31

Several years ago I went with more space over more resolution, so I have 3x 24" monitors connected to my MBP in addition to the laptop screen.

tbaldridge14:12:57

Hard to go back to one screen after that. IMO screen space is more important than resolution

borkdude14:12:01

@tbaldridge Cool. What kind of monitors if I may ask?

tbaldridge14:12:35

They were whatever was cheap and had good ratings on NewEgg. VG2439m-LED

borkdude14:12:05

@tbaldridge I have a Dell 24" monitor, but I’m a bit worried about pulse width modulation that may or not be in it. I looked up your monitor: > ViewSonic flicker-free monitors deliver a more comfortable viewing experience. Rather than using Pulse Width Modulation that continuously turns the LED backlight on and off, ViewSonic flicker-free monitors use DC modulation backlights that maintain a steady stream of direct current power - nearly eliminating screen flickering at all brightness levels by providing a constant LED light source.

borkdude14:12:22

Dell is unclear about whether my monitor contains it, that’s why I think of upgrading maybe

tbaldridge14:12:28

When does that come into play? I'm not sure I've experienced problems with LCD flicker

borkdude14:12:53

Well, you don’t really notice it, but it can cause eyestrain after some hours

tbaldridge14:12:07

Reminds me of when I used to help people that were running a 50hz CRT refresh on a monitor that sat under a fluorescent running at 60hz. My eyes would hurt after 2 minutes of looking at those screens 😄

tbaldridge14:12:56

I've had these monitors for 4+ years though, so I'd probably go back to Newegg and look up something else

borkdude15:12:21

I’d want to test a new monitor before I bought one…

borkdude15:12:42

ah well, everyone knows volatile! by now I guess

dominicm15:12:56

Not everyone, not quite.

borkdude15:12:32

Before that maybe people used one sized mutable arrays? 😉

New To Clojure16:12:38

From your experience, what are advantages of using Clojure for enterprise applications?

New To Clojure16:12:25

Hiring must be difficult (there are not a lot of Clojure people around).

jmayaalv16:12:33

@borkdude yes, i have the screen connected to a mbp. I prefer one big screen than multiple screens. I didn’t have problem with the small letter but i guess that’s relative

tbaldridge16:12:54

@ghsgd2 a few things 1) Clojure is based on the JVM. A lot (most?) enterprises use a lot of Java, and Clojure interops with those systems quite well. Using Node or Erlang in these same places introduces a lot of friction.

tbaldridge16:12:35

2) Clojure has a "data first" view of the world, a lot of enterprise apps are simple the transformation and moving around of data. Clojure works quite well for this

tbaldridge16:12:32

3) Clojure has an excellent concurrency story. I haven't had a dead-lock in my code for years. And IIRC the only time I've gotten one in Clojure was when I was debugging the internals of core.async (something most people shouldn't do 🙂 )

borkdude17:12:47

@ghsgd2 There’s also a benefit of only/mostly having to master one language + one core library for a full stack development experience

New To Clojure17:12:09

@borkdude But there will be 2 or even 4 languages: Clojure and Java (because of the libraries), and probably also ClojureScript and JavaScript too.

borkdude17:12:18

@ghsgd2 Yes, it surely helps to understand a bit of the hosting platforms you’re working with. But usually people already have some knowledge of that prior to Clojure. I did know some Java, but only the language, not the ecosystem. I’ve avoided JS/front end for a long time but started doing that because of Clojure(Script).

New To Clojure17:12:00

@borkdude Currently Clojure seems to be the language for those who don't have any more space for professional growth as a Java programmers and so need some "Java on steroids" to be even more productive. I'm learning Clojure and people say that I should become architect first and then go for bells and whistles. And that I will depend too much on my employer and won't have alternatives.

borkdude17:12:31

@ghsgd2 I was already a grumpy tired Java programmer before I even started using it professionally. Clojure just made sense to me from the start. And don’t let people discourage you from doing x by saying you have to do y first.

noisesmith17:12:51

the clojure interface to java libs via interop is more consistent and has fewer cases than using it from java

New To Clojure17:12:46

@noisesmith could you please provide some simple example? I'm not very familiar with it except for things like (Integer. (str a b))

noisesmith17:12:28

it’s a small sublanguage, but it has fewer ambiguities compared to java syntax https://clojure.org/reference/java_interop

seancorfield17:12:37

@ghsgd2 If you haven't already run across it, I blogged some thoughts about Clojure and the Enterprise: http://seancorfield.github.io/blog/2014/09/23/clojure-in-the-enterprise/ (three years ago -- but still true today, I believe)

seancorfield17:12:42

I think "don't have any more space for professional growth as a Java programmer" is not the way to look at this. Many folks who jumped into Clojure early have been polyglots for a long time and are always looking for "better tools" and "new ideas".

seancorfield17:12:09

My arc was C/assembler (and some COBOL), to C++, to Java, to Groovy, to Scala, to Clojure -- but I also try to learn a new language (almost) every year...

seancorfield17:12:24

(and, because I worked at Macromedia when they bought Allaire, there was CFML in there too, alongside the Java/Groovy/Scala/Clojure arc)

New To Clojure17:12:03

@seancorfield Wow! But you could've earned more more money by becoming, say, C expert.

borkdude18:12:08

@ghsgd2 More money doesn’t always mean more happiness.

New To Clojure18:12:55

@borkdude But there are mortgage, health insurance and bills to pay. After all, life not= work.

borkdude18:12:58

@ghsgd2 Sure, but “you could have earned more money” is not always necessary. Nothing wrong with it of course, if that is your priority.

borkdude18:12:49

I saw some report where Clojure was one of the highest paid technology. Not sure where I saw it (maybe Stackoverflow?) and how true that is in practice.

New To Clojure18:12:23

@borkdude I guess it's because people start using Clojure mostly after becoming experts in Java or close to it. And so already have high salary.

noisesmith18:12:48

I learned java after / via learning clojure

borkdude18:12:58

Same for me, except some minor Java during some classes, but neglectible

noisesmith19:12:08

and C might pay well / be well understood by the business world, but most startups doing web stuff don’t want the defect rate and development time and refactoring costs that usually come with C

tbaldridge19:12:17

Most functional languages tend to pay well.

noisesmith19:12:46

I learned C before learning clojure, nobody has wanted me to use it at work though

tbaldridge19:12:12

In my experience/ personal research, PHP, Ruby, Python tend to be on the lower end. Java, C and C# are in the middle tier, and then stuff like Haskell, Erlang, OCaml, Clojure tend to be some of the highest paying jobs.

tbaldridge19:12:28

A lot of that is driven by the industry, location, and supply/demand however.

tbaldridge19:12:04

At one point Madison had some really good C# jobs available because for some reason all the companies started using C# but there weren't enough developers in the area.

tbaldridge19:12:56

I'm also not sure how much of all that is driven by supply/demand. There are a lot of PHP devs, but not that many Erlang developers (at least here in the states)

noisesmith19:12:19

yeah - one real advantage of clojure is it can leverage java network effects with a language that can be much more pleasant to use

noisesmith19:12:30

it’s easy to add clojure code to a java project

New To Clojure19:12:38

@tbaldridge When Java architect starts using Haskell he will be still paid like an architect. I don't think if senior PHP ditches it and learns Haskell he will automatically become one of the top paid programmers without say 10 years of experience in Haskell, finance and a lot of other stuff relevant for that company.

noisesmith19:12:35

language and experience are two different parameters - I started using clojure early in my professional dev career (coming out of personal hobby stuff) and started getting paid clojure salaries

tbaldridge19:12:41

That has not been my experience at all

tbaldridge19:12:44

Experience matters, of course. But languages are tied pretty closely to a salary bracket.

New To Clojure19:12:09

You may be living in SF bay area where there's an ambundance of everything

New To Clojure19:12:40

I searched for Haskell jobs locally and found just one job in different city

tbaldridge19:12:00

Yeah SF is a strange fairy land where nothing is "normal" 😄

borkdude19:12:04

@ghsgd2 Silicon Valley may pay more, but life is also expensive there I guess

tbaldridge19:12:04

Also startup culture tends to value different types of applications. They will pay more for a Ruby dev who can crank out a MVP over a dev who will take longer but create a scalable product

tbaldridge19:12:00

I've probably spent about 2/3rds of my past 5 years reworking apps that were written in such a culture, and then they couldn't get the app to scale.

noisesmith19:12:33

yeah - I’ve seen “this ruby code got us our first round of funding but doesn’t scale, now write some clojure” more than a couple of times

noisesmith19:12:59

(in Portland OR, not silicon valley)

seancorfield19:12:01

@ghsgd2 Re: salary -- it depends what you want from life. I get a constant stream of recruiters pinging me about FinTech roles (either in SF or NY) for either Clojure or Scala (primarily) and I'm just not interested. Those jobs advertise compensation in the $350-400K range. shrug

New To Clojure20:12:15

@seancorfield I'm had not yet reached the limit after which higher salary makes no difference. By the way I've found 3 local functional language vacancies. First is a company which aims to be something like a local Google and requires living the work (read as "work 15 hours a day" and be available round the clock in 10 minutes). Second advertises that they could give offer to anyone who solves task in their office using any functional language (without tech interview). But then you would have to code using their own functional language. Third one is a company which takes 2 years to find a Java programmer. Guess their requirements level. Strangely, I'm also not interested in those 3.

seancorfield20:12:10

I have not yet reached a limit after which higher salary makes no difference -- but there are jobs / environments / locations that I just don't want, no matter how much someone offers to pay me.

seancorfield20:12:20

I've worked almost 100% remote for about ten years at this point -- and I live in the SF Bay Area so it's not like there aren't plenty of local jobs.

seancorfield20:12:57

Location certainly matters. If you want to work in Clojure, you'll either need to live somewhere that has a high density of companies that use Clojure (usually polyglot companies) or find Clojure companies that offer 100% remote work.

seancorfield20:12:20

Or, if you have the authority wherever you work, introduce Clojure (which I did at my company).

New To Clojure20:12:37

@seancorfield >I've worked almost 100% remote for about ten years at this point You're a hero! 🙂 I thought about working remotely, but then I will miss office, coworkers, company events and so on. Also it's hard to be productive when you sleep and work at the same place (I live in a studio and don't have a separate room for work).

New To Clojure20:12:44

I totally agree with you that there are jobs/environments/locations which might be not suitable no matter how much someone pays.

New To Clojure20:12:37

I can introduce Clojure at work but then I would need to deal with "happy client not= you are working good" and "no experts to rate skils = no career raise".

New To Clojure20:12:04

I'm going to use Clojure for pet projects and ad hoc tasks and see how it will go. Also it's a good functional programming practice (that'll make my Java code better).

tbaldridge20:12:56

Remote isn't that bad, I've been doing it for about 5 years now. It takes a bit of discipline, and care to make sure you get out of the house and do other things. But it's a bit of a wash, honestly.

tbaldridge20:12:34

When I worked on-site I'd get interrupted every 45min by someone with a question. At home there's the risk that I won't get as much done, but in the end it works out quite well

borkdude21:12:06

One year remote here. Works well for me and our team.

New To Clojure21:12:51

After 1 year remote I was feeling I was Robinson Crusoe. After 2 years my boss said that I've changed and I'd better go to the office.

New To Clojure21:12:41

Productivity wasn't bad actually and it was just harder to work.

New To Clojure21:12:14

On the good side, I saved a lot of commute time.

seancorfield21:12:37

My commute is "turn right out of the bedroom" 🙂 I agree about discipline. You need an "office space" that is separate from your "living space". You also need a routine, and you need to take breaks (at least move to a different room for a bit, preferably go outside and walk or whatever). And you need to ensure your social needs are met (interacting with others). Our whole company is remote so we use Slack and Skype heavily. It definitely has both pros and cons.

borkdude21:12:20

For me it helps to go out once or twice a day to a coffee/tea place

New To Clojure21:12:19

Meeting social needs working remotely is a bit difficult. When there is no office you are going to interact mostly with strangers. Conferences take place not that often. I don't like clubs, parties and bars much. Can't get from unknown people at coffee places more than a few phrases so the only viable option seems to be some hackerspace.

borkdude21:12:29

Yeah, I met some people at the coffee places I go to, so my social needs are met almost every day.

borkdude21:12:45

I can imagine that remote working from a deserted place can be pretty lonely, especially when you’re single.

seancorfield22:12:20

I always have my cats to talk to ... 🐱 🐈 😾