Show more
Danny boosted

The construction of the pyramids in Giza begins. Simultaneously, you decide to save $10,000 per day. You do not spend any money.

It is now 2020. There are 69 people who have more money than you.

Halfway through the evaluation part in the interpreter I'm writing (following the wonderful monkeylang.org/ book). Man this is so much fun, I have trouble thinking of anything else all day.

Code (work in progress) here: github.com/dannyvankooten/monk

C programmers, how can I design this so that it compiles?

stackoverflow.com/questions/60

I am trying to define a struct field but the struct is not yet defined, because that struct might in turn depend on the struct I am trying to define.

Boolean expression parsing ✅

Time to tackle grouped expressions!

Switched out React for Preact in Koko Analytics earlier today and the whole thing took less than 30 minutes, including switching out the hash-based router. Such a great job by Jason Miller and the other contributors.

github.com/ibericode/koko-anal

Just this change got the JS bundle (admin only) size down to 130 kB (from 260 kB). 🚀

And down to 120 kB by replacing whatwg-fetch by unfetch: github.com/developit/unfetch .

Writing an interpreter in C and just got operator precedence parsing working correctly. So happy now. Took me some time to wrap my head around how to properly build up the tree structure for it w/ regards to memory.

Going to use this moment to stop before I get into another messy problem again and lie awake thinking about it all night.

Danny boosted

Any tips on how to implement a hashmap in C with (close to) zero collisions while not allocating much more space than necessary?

I’m new to this sort of stuff, so pardon my ignorance. Here is what I have so far: github.com/dannyvankooten/c-ha

It distributes pretty evenly, but in my example using ~45.000 dates keys about 19% share a spot with at least one other nose.

Danny boosted

I've got a strange question for you, #fediverse and apologies if this seems a bit forward.

I love my dog. Believe me, he is living his best life here for hopefully many more years. But I really need a vacation.

Are there people in the Netherlands interested in looking after Jazz for a few days? 🐶 Daycare is insanely expensive and all my friends and family have fulltime jobs/live in tiny apartments/have a million cats.

Implemented my first hashmap with string keys in C, feels good now I finally got it working.

It took me much too long because I was re-using memory for the keys in my tests... Derp.

github.com/dannyvankooten/c-ha

Feedback is very much welcome!

Danny boosted

hey kids
you know what's cool?
accessible websites
:blobcool:
*guitar solo*

Danny boosted

The state of web push notifications:

The average site has a notification prompt acceptance rate of 17%, dismissal 24%, rejection 41%, and ignore 19%.

22.76% accept on phones, 18.75% on tablets and only 6.11% on desktops.

dev.to/chromiumdev/yestificati

Danny boosted

Here's the World Energy Outlook report from the #IEA (International Energy Agency) for 2019:
iea.org/reports/world-energy-o

They offer projections for three scenarios, continuation of business as usual, what happens if countries follow their stated energy policies, and what's required for sustainable outcomes. The executive summary is pretty easy to follow.

Danny boosted

I see a trend of getting rid of CSS, going with minimum to no javascript and I'm tempted to try it!

@neauoire Listened to your episode on The Future of Coding last night. So good to get some more... context (!) about what you're doing and why you're doing it.

Making good progress in my quest to learn a bit of C by doing the exercises from the Kernighan & Ritchie book. Coming from high-level languages it really helps solidify my understanding of things, e.g. the importance of constant time string comparison or how certain functions are usually implemented (e.g. atoi). Great fun so far!

Next up is to either write a very simple HTTP server in it (for fun only, don't worry) or to go through the "Monkey interpreter" book, but using C instead of Go.

Danny boosted

I would really like to use Mastodon more than I do just now, but right now I am not sure where to find people who are actively using it. Any suggestions of people to follow here? I would really appreciate it!

Danny boosted

I work in IT which is the reason this house has:

- mechanical windows
- mechanical door locks
- no Alexa/HomeKit/Google
- no Internet connected thermostats, lamps, or whatnots
- a dumb TV
- wall switches for lights

Show more
Mastodon

Personal Mastodon instance of @danny.