[-] snowe@programming.dev 4 points 2 years ago

that post is about toggle buttons, not switches. e.g. a play pause button, when pressed, does it show play, or does it show pause?

[-] snowe@programming.dev 4 points 2 years ago

I thought it was adblocks latest update.

[-] snowe@programming.dev 4 points 2 years ago

This is the first hobby in here I’ve come across that I haven’t tried. Looks really neat! Along the same lines of Japanese repair arts, have you tried kintsugi? It’s really really rewarding as well.

[-] snowe@programming.dev 4 points 2 years ago* (last edited 2 years ago)

Ruby

https://github.com/snowe2010/advent-of-code/blob/master/ruby_aoc/2023/day02/day02.rb

Second part was soooo much easier today than yesterday. Helps I solved it exactly how he wanted you to solve it I think.

I'm going to work on some code golf now.

Golfed P2 down to 133 characters:

p g.map{_1.sub!(/.*:/,'')
m=Hash.new(0)
_1.split(?;){|r|r.split(?,){|a|b,c=a.split
m[c]=[m[c],b.to_i].max}}
m.values.reduce(&:*)}.sum
[-] snowe@programming.dev 4 points 2 years ago

75% of vehicle sales in Sweden are EVs https://cleantechnica.com/2023/01/03/plugin-evs-take-record-75-share-of-swedens-auto-market/

The two bestselling EVs in that article are the Volvo xc40 and the VW ID.4. Both of which are less than $45k usd (480,000 SEK for the xc40 and here’s a used ID.4 for 370k).

This myth that EVs are expensive has really got to go. The Nissan leaf has been available for over a decade at a super cheap price point. Here’s a Nissan leaf for sale for $8k USD/90k SEK. https://www.car.info/en-se/car-for-sale/nissan-leaf-24-kwh-109ps-2012-at-bossloh-co-bil-40876608

[-] snowe@programming.dev 4 points 3 years ago

I’m curious as to what reward you believe that people are getting from closing questions?

there's a bunch of badges for things that can only be accomplished by flagging.

You also get the nice 'feeling' of clearing your queue. The faster you do that the better you feel. It's literally all rewards for putting as little effort in to get as much 'reward' as possible.

[-] snowe@programming.dev 4 points 3 years ago

You missed the point of their comment. Those measurements make sense to you because you grew up with them. If you read the xkcd you can easily see how you can make up the same comparisons for metric

[-] snowe@programming.dev 4 points 3 years ago

As someone that has soldered micro USB, mini USB, and USB c, micro and mini are absolutely horrendous. They fail constantly, so much so that they were literally deprecated one after the other due to their failure rates.

Lightning was perfect for the devices it was used in. Apple never split it out into laptops because that wasn’t its purpose, it’s incredibly thin and incredibly durable. USB C is pretty durable but not thin. I actually love the lightning port for how durable it is. The biggest problems with it are:

  1. It’s proprietary. Proprietary stuff sucks
  2. Apple’s brand cables are expensive junk that fall apart because design overrides functionality

USB c is great, for laptops and headphones and general peripheral connectors. It’s got a fuck ton of problems though, because you can literally have identical cables that do not have the same features. I had to buy a device to test USB C cables to determine what features they support. Also, did you know USB C is directional? Well it can be at least. I didn’t know that until the cable I soldered up only worked in a single direction.

[-] snowe@programming.dev 4 points 3 years ago

That’s literally how every programmer pronounced it before it became an Internet sensation. It had a marketing campaign to “sell” the format because that’s how new standards were created initially. They explicitly chose to name it after the peanut butter because it allowed them to give it a catchy phrase to sell it even better “choosy developers choose gif”.

[-] snowe@programming.dev 4 points 3 years ago

The code is already compiled. what do you mean it's preemptively compiled? If you're talking about executed, they explicitly called that out..

A prediction can also end at a function call the debugger is cautious about evaluating. That is for your own (or your software’s) well-being. Since code is executed during debugging, the debugger has to be sure that it’s not causing any mutations. When running the above example, we must confirm the evaluation of the int.TryParse method (more about that later):

As mentioned in the previous section, the predictive debugger won’t evaluate possibly impure functions to avoid side effects. As a human developer, you most certainly have more knowledge about the code, which is why we give you the possibility to forcefully evaluate a call by clicking the hint:

[-] snowe@programming.dev 4 points 3 years ago

hm. that's very strange... you shouldn't be getting those errors. we haven't had any downtime longer than a few minutes. One thing that does seem to be happening is that moderator actions on 'big items' like banning a user, or removing all their posts seems to completely lock up the lemmy instance. It pegs the CPU at 100% and prevents all backend operations. No clue why. But I haven't heard about this 'no posts' or errors like you are talking about. Can you send us a picture either here or in one of the other communication mediums (discord, matrix, mastodon) when you get an error again?

[-] snowe@programming.dev 4 points 3 years ago

haha good excuse!

view more: ‹ prev next ›

snowe

0 post score
0 comment score
joined 3 years ago
MODERATOR OF