Fork me on GitHub

morning math nerds 😄

😁 2
Ben Sless06:09:59

Sounds like you want to shake us for lunch money


watch out, robbie’s coming


(wow do i suddenly feel like a noob around y'all)


i just barely managed to pass highschool maths lol. clearly not something i needed for my programming career 😅


I was shitty in school, and I’m doing fine without it in my career as well. I find it much easier to learn now, and interesting, since it’s out of my own volition.


The kind of mathematics needed for programming isn’t really like highschool maths IMO… I don’t think it matters much.


Unless you’re doing 3D stuff


math education is one of those controversial area - the only consensus is that the status quo isn’t working, but everyone has their idea for how to fix it. Not fun.


from an individual pov, math is like music - you need to hear different genre and find out which one fits your taste - “something for everyone” kinda scenario


FWIW. During an interview process many years ago, they gave me a test to sort of map out my abilities. I was expecting, as a programmer to score well in logic, but as it happened, my strength was in neither math nor logic, but in natural languages.


I have no idea about your math skills, but I would have expected you to score high in logic and natural languages.


Thank you!


i often wonder what the relationship between programming skill and an interest in words and wordplay is


i'm sure there must be something to it


something about how rules can be creatively applied, and enjoying finding novel and interesting ways to do so

Ben Sless06:09:44

I'm of the opinion all programmers should take a creative writing course

☝️ 1

That would be fun!

Ben Sless06:09:36

More than fun. What is programming, if not the expression of our ideas about a problem in writing?

☝️ 1

I like both natural languages and programming, but NLP is also the domain I work in, so maybe I’m not the best example.


One thing I’ve discovered is that most programmers also seem to know how to play an instrument.


I've also noticed that with instruments/music. I'm not one of them, though. 😃


@pez well, get on it then!


This is my way to avoid the stereotype.


@UK0810AQ2 I enjoyed Zach Tellman’s Elements of Clojure since it goes into naming things and seems to analyse code structure in general as a language/tool of communication.


loved EoC's naming chapter!


i'm sure you could learn to play a mean triangle @pez 😂


Christine Gorman gave this talk at Javazone where she talks about needed skills for programmers. I think it also brings up the need to untangle programming.The programming we do (her and myself) is, as she states, much more towards organizing, than what I'd imagine compiler writing and graphics would be, which I imagine are more mathy, for some definition of mathy.


I also happened to commit a talk at Javazone

👍 2


Gabriel Kovacs06:09:43

@slipset great talk! Do you know why only 0.5% of the candidates do/pass the assignment? I am also curios how complex is the given assignment. And lastly I would really like to hear the PostgreSQL vs. MongoDB talk 🙂. I assumed that maps and MongoDB are a match made in heaven 🙂


Thank you! As for why we have only 0.5% pass rate, I have some hypothesis: 1. We have a messy frontend, so we need strong programmers, so our tech interview might be hard. 2. The inverse of the python paradox, ie there are a lot of Javascript “programmers” out there 3. We also ask for a home assignment, I believe that filters out quite a few as well. I have some opinions on why that is as well. 4. I think we as a company (and as an industry) tend to lump all aspects of frontend programming into one pile. With our codebase, it really makes sense to talk about the frontend of the frontend, and the backend of the frontend, where there are two very different skill-sets required. I can’t make a div centered if my life depended on it, but I can do meaningful work on the non-visible parts of the code.


And WRT to maps and MongoDB, they’re a match made in heaven, just until the exact moment they’re not 🙂

😄 1

Morning! Today I woke up with the urge to try implement awk semantics in a Clojure library. Resisting, because I just don't have the time right now.

😄 2
Ben Sless07:09:52

hah, I had a bad idea yesterday and couldn't resist it

(defmacro |
  [& ks]
  `(s/alt ~@(interleave (map (comp keyword name) ks) ks)))

(defmacro or*
  [& ks]
  `(s/or ~@(interleave (map (comp keyword name) ks) ks)))

(defmacro &&
  [& forms]
  `(s/cat ~@(for [form forms
                  :let [t (cond
                            (keyword? form) (keyword (name form))

                            (or (coll? form)
                                (symbol? form))
                            (if-let [t (->> form
                                            (filter (fn [k] (= (namespace k) (str *ns*))))
                              (keyword (name t))

                            :else :_)]
                  x [t form]]

(defmacro &&* [& forms] `(s/spec (&& ~@forms)))
(s/def ::query (&& ::find-spec ::return-map? ::with-clause? ::inputs? ::where-clauses?))
(s/def ::find-spec (&& #{:find} ^::find (| ::find-rel ::find-coll ::find-tuple ::find-scalar)))
(s/def ::return-map (| ::return-keys ::return-syms ::return-strs))

💪 1
metal 1

bad ideas are fun haha


Not sure how bad that idea is. My spec skills are non-existent. I'm pretty sure a library providing awk semantics would be a good idea though. 😃 Some problems are awk shaped.


forgot where I saw it, but it seems some ppl have further extended the already powerful awk to something totally op


(cue “now you have two problems” joke 😱)


I think Clojure + awk-ish semantics can get pretty OP for certain applications.


I always wonder when is the best time to evolve my codebase into being more abstract. Sometimes you want certain parts to stay “dumb” to be able to move fast in other areas, but at some point one needs to evolve those dumb parts into smarter parts. Case in point: last week I had to implement multi-language support in the frontend. I had thought it would take ~2 days (“it’s just another set of translations + a button for switching languages, no big deal”), but it ended up taking a week. Labels tend to creep up in many different parts of the application, e.g. some are married directly to frontend components while others live inside backend data. Some constitute direct value usage, e.g. [entity :document/condition "transcribed"], where the attribute could be used directly before, but now need to be translated. These different types of language then need to be handled slightly differently. It turns out to be much more complex than one would expect to reach a fully translated interface, even if reaching 80% takes like a day.


classic tradeoff 🙂 faster ui dev =/= faster i18n dictionary management


we have 30 languages. it's a yuge timesuck


stuff like accessibility and responsive design also sits in this 'after the logic is how we want it' space


yup. Although when it comes to accessibility, just sticking to built-in HTML elements rather than DYI div soup solves like 80% of those concerns AoT 🙂


… and implementing multi-language support late in the process probably results in more hacks than doing it early.


Here’s some code that mu colleague wrote. He called it “trivial”. I could never write it (disregarding it’s in javascript 🙂


Very cool. I wish to some day become as capable with SVG.


Is this for choosing who goes first on a daily standup?


I think that SVG is pretty sweet code. Hiccup would make it even sweeter.


❤️ bezier curves ❤️ ^ @reefersleep😄

❤️ 1

my local canteen just converted into a vegan place. Not a full-on vegan myself, but I love it!

🍆 1

so much easier to eat your greens when someone else knows how to prepare them well


@simongray How do the meat eaters feel about that? ;)


This is in the humanities campus of the University of Copenhagen, so I think the majority might honestly be vegetarians 😛


I doubt anyone will be complaining anyway, the vegan canteen was already established as one of the three canteens here and was arguably the best quality one. Now they replaced all three with the vegan menu, I think to save costs.


We have such initiatives here as well. I personally find it lovely and I think meat eaters can have their bacon at breakfast or steak at dinner still ;)


yes, the public sector/large organisations can play a big part in a gradual transition to more plant-based eating.


And I think there's also the "vegan by default, meat/dairy by request" way of doing things in some places


Like: do you really want milk from a mammal that was not your mother? OK... fine


I don’t think the snark is helpful, though I agree in principle 😉


The snark is my interpretation of how it may come across to some people, not how they officially say it ;-). In other places you still have to pay extra for non-dairy milk


I was at a conference in Malmö once in 2014 and wondered if I would get any vegan options at breakfast in the hotel. When I got there, they had like 4 different types of non-dairy milk replacements or so... they were way ahead.


Now you see those brands in supermarkets over here


I recently went to a restaurant which was vegan by default and you could order meat or fish on the side if you wanted to (no snarks). It was really high quality too


Yeah, Sweden is way ahead, and parts of Germany too. These days Copenhagen is quite good, though.


I gave those talks ^ in 2014 and the reagent one is still just as accurate today. It's truly a miracle how stable its design has been (compared to React itself...)


Back then it was about Om vs Reagent vs Quiescent vs .... - it wasn't yet clear that reagent would win, but it was by far my favorite because I could understand it ;)


I gave the talk to a mixed (general) dev audience and I remember getting blank stares from some JS devs. Then I learned that presenting at a Clojure conference is much more fun to me ;)


As a carnivore, I appreciate that I should eat more vegetables, and in principle I wouldn’t mind going vegetarian/vegan. But. I need to have food that I like and I need to feel that I got a full meal. So I’d really love vegetarian/vegan recipes for the carnivore. And. There is no substitute for 4%fat milk in coffee. Period.


You sound like an OOP programmer that wants to try Clojure, but not really ;)


When moving from OOP to Clojure you find that you will have to give up on some things. You will only do that if you truly see the benefits


And if you see those, then finding good recipes is an almost trivial problem (the internet)


Here at home, we have a weekly schedule of things we cook, so we don't have to think about it anymore. We just buy the groceries from a pre-printed shopping list. If we do want to make something else, we always can, but we can fall back on the automated thing


This might very well be true 🙂 But still. It’s stopping me from going vegetarian. I like meat too much.


You can flex your way into it of course, if you want


It's not an 100% thing for most people


I might also need help in the sense that someone could tell me that if you try this thing for some months, you’ll start feeling full even if you only eat veggies.


I feel like I might be going too far when I give nutritional advice, so I will only give my experience and others may have different experiences, that is fine. My experience is that I don't feel full if you only eat vegetables. A human needs a certain amount of calories and calories don't come from tomatoes and lettuce. You need starches, legumes, nuts/seeds (as condiment) etc for calories to feel satiated. So making a rice and bean-based dish with vegetables may feel you more satiated. You also need to eat more volume than you were used to on a meat-based diet since plant foods are lower in calorie density. We usually have two plates of food instead of just one.


Calories is one thing. What about the particular nutrients that you get from each food type? I'm not particularly well versed in nutrition 😅 But my girlfriend knows more about it, and she says that there are some things - idk if it's minerals, vitamins or whatever - that you'll be missing out on if you cut out meat from your diet, and don't add supplements or make an effort to find veggie foods that contain them.


Regarding feeling full, I'm convinced that (for me, at least) proteins have a big role to play. I can eat whatever food and feel full as long as it has proteins. My father-in-law's protein-free vegetarian meals taste great, and I can keep eating them, because I'm never full. Afterwards, I feel like having another meal. Perhaps that's a habitual thing, though.


@reefersleep That's a good question. The reverse is actually true. If you switch from a standard Western diet to a whole foods plant based diet, you'll get way more minerals and vitamins. Plant foods, calorie for calorie, contain more vitamins and minerals, than meat and dairy. You just gotta watch out that you're not eating the majority of your calories from junk foods (empty calories). If you're doing a whole foods plant based diet, and eat enough calories, you'll get enough micronutrients. As for protein: I'd say, read about why some athletes have switched to a vegan diet. They're getting enough protein. The Western diet contains too much protein which can cause diseases. If you want an easy introduction into the above, there is a documentary about this called Forks Over Knives: They also have recipes.


thanks 🙂 think I’ve got it in a watch list already!


Ah, I remember a specific thing; omega 3 oil. We supplement that already because we hardly eat fish. I suppose vegetarians should be doing the same. From what I understand, it’s very important.


I like the calorie for calorie thing, makes sense to me.


I take a vegan DHA supplement (DHA is one of the components of omega 3). You can get omega 3 from flax and chia seeds as well


DHA is also one of the things you get from fish, but fish get it from algae. The supplement is made from algae.


skip the middle man 😄


There is also vitamin B12, this is main thing you need to supplement. Meat/fish contains B12 but plant foods generally do not. B12 isn't made by animals though, it's made by bacteria in the soil, which animals ingest. Our food is basically too clean nowadays to get B12 from the soil


It takes years to develop a B12 insufficiency because your body can store it, but it is something to be aware of long term. Some people have B12 insufficiency even while eating animal products


It's common to feed animals B12 in large scale "factories" because they aren't on the soil anymore either


So what I'm taking: B12 (three times a week), vitamin D (every day in winter) and DHA (three times a week), no other supplements


I’m having omega 3 oil every morning, vitamin D every morning, and a mix of stuff morning and evening. Sounds like you’ve done your research 🙂 I haven’t! My girlfriend did, and I’m just benefitting from it 😄


We probably have b12 in there, too.


I've been on a plant based diet for over a decade and I've done quite some reading in the beginning

🤓 1
💚 2

I just made a batch of rice in my InstantPot (electric pressure cooker) for lunch right now and I'll combine this with chickpeas and a salad on top.


There are various books from vegan athletes that might give you inspiration for satiating meals. Especially for athletes it's important to eat sufficient amount of calories.


@slipset is one of them (just ignore all the supplement sale stuff)


The above might be too much focused on health. There are also some more mainstream things that just focus on taste. This is a great one:


there are also some things like veganuary and "21 day vegan starter kit" you can google for that are focused on doing it for a while


My wife is very different from me. I'm more an all or nothing guy so I'm doing it 100% from day 1 (once I decided I wanted to do it). It took my wife several years to adapt. She suggested once to me to start with a vegetarian (not even vegan) meal once a week. I just took it a step further than her ;)


I respect that people are different and even if you just try and it's not for you, that's totally fine.


I tried going vegan a couple of decades ago. I was also bicycling a ton. And I kept losing weight. Got too skinny. So I added a bit of poultry to my diet. Like you @U04V15CAJ, I’m an all or nothing guy, 0 or 1. So you can imagine what happened. I could try again but this time I could first study what I actually should be eating!


yeah, it's a common beginner's mistake to just eat too little. you gotta be aware of the calorie content of food a little bit more


if you're overweight (like I was) it's actually a good feature, I have no trouble with keeping on weight naturally ;)


I was a lean mean bicycling machine. But now I’m a bit tubby. I tell my wife I have “flabs of steel”.

😅 2

Goooood Mooorning-ing-ing-ing-ing


Good morning to ya


i mean it's always morning somewhere right 😄


morning… whoah, so many messages - back-pressure turned on…


I've just spent an hour to get a jekyll site that I maintain to build on my machine. Now and then that happens. And every time I get reminded that I hate Ruby and should port the site over to Hugo.


I sympathize! My blog used to be Octopress which is basically Jekyll and it would just randomly break and I never got the hang of bludgeoning Ruby's env/project stuff into submission so I converted it all over to Cryogen and I've been very happy with that.

🙏 1

ya my blog site (using github pages back then) is also in jekyll with a custom build on my local machine only… the right thing for me to do is to convert it to any modern SSG, and move the build to CI/CD. But I’m out of time, plain markdown files in a github repo will do in a pinch 😂


Ruby the language is fine. It's this bundle/gem hell that I hate.


I feel the urge to react to this ( but maybe better not. Resist the Twitter algorithm


I guess I should just roll another joint and join the discussion: Dude, it’s like your data is traveling too far, or something. Try some cohesion…


Dude, the further your data travels, the less type information you need to know about it...


i'd say that tweet is bait given his profile 🙂


@pez Dude, I've been there. The project that came out of this is called, feel free to use that, or Hugo ;).


Was it nokogiri or something like that? I don't have fond memories of getting that gem to work. Luckily I don't have to touch any ruby anywhere anymore


The particular site is simple enough I could probably get away with those 200 lines of babashka. 😃. I'll consider it. I have only myself to suit for never migrating away.


it's now more than 200 lines: feel free to join #quickblog if you have any questions


This time it was something with ffi and M1. I ended up installing a new ruby and use that one instead of the Mac bundled one.


as a matter of principles, I almost always prefer a two-step process to setting up any programming language on a machine (cloud or local) - install a “language/platform version manager”, then use that manager to install a specific version


e.g. nvm or n -> node + npm, sdkman -> java


oh right, something like that happened with me on Node + m1 + sqlite too. I had to do npm config set python python3 to make it work... it beats my why this was necessary... :(

👀 1

I sympathize! My blog used to be Octopress which is basically Jekyll and it would just randomly break and I never got the hang of bludgeoning Ruby's env/project stuff into submission so I converted it all over to Cryogen and I've been very happy with that.

🙏 1