News for hackers. Stuff that matters.

cynik_

Most recently, I've been building a small server for myself to track my day, todos, and just act as a frontend for some easy scripts (eg. just a direct line to running date to get timestamps). It's been a joy to use htmx and flask and just crank out features quickly.
Re:Please put units in names on Sunday March 20, 2022 @11:57PM (#30750060)
I wrote about this a long time ago too: https://explog.in/notes/units.html. Units are critical, particularly when crossing language/engineer boundaries.
I took a stab at generating a visualization of all the solutions with one brute force based approach: https://twitter.com/kunalbhalla/status/1486189627644035078
Re:Jupyter Book on Sunday September 12, 2021 @08:10PM (#28506419)
Org Babel is the computational bit
Re:DevTools Leverage on Friday August 20, 2021 @09:21PM (#28253216)
> you should always bias heavily for buy/download over build, That's a good point; I haven't spent much time thinking through this based on the work I've done so far (heavily leaning towards build over buy, with an existing complex internal tool ecosystem).

I think I might still push for build (or maintain the ability to heavily customize) for things that are particularly important for areas the company aims to have a strong advantage in/are business critical.

Re:DevTools Leverage on Friday August 20, 2021 @09:18PM (#28253198)
That was a really fun post to read: I really like the approach you're taking with abbot -- making it easy to write new tools quickly by only adding the business logic while having fun. Not needing to worry about UIs is also excellent, and I suspect one of the biggest time sinks otherwise.
Re:Hacker News sentiment towards Big Tech companies on Sunday January 17, 2021 @12:37PM (#25812781)
This is cool, but I'd love to see a plot with all the axes (including color gradients) held constant across all charts so that they can be directly compared.
Re:Moving from Macbook to Linux on Saturday November 21, 2020 @01:39AM (#25168223)
I installed arch linux on my personal macbook air (2012) and it's given a new lease of life to the laptop; and I enjoyed it enough to switch from a macbook to a Thinkpad at work as well. (I like more minimal UIs, so I ended up going with dwm/dmenu instead of dealing with Gnome).
Re:To write better, develop a habit of writing on Wednesday October 21, 2020 @01:56PM (#24850346)
I tried to do a 100 days of writing a few months into the pandemic for exactly the same reason (petered out around ~90 days in, but now I write without tracking religiously) -- https://explog.in/notes/100days.html. It was definitely worth it in terms of making writing easier, and also in helping me get better at thinking through writing.

Now trying to make it a permanent daily habit.

Alternatively, are there any specific resources / attorneys you recommend reaching out to for EB1 evaluations? [particularly in/around NY for my case, but I guess that's not very important anymore]
Re:Show HN: Parallelise pipelines of Python async iterables on Sunday September 06, 2020 @08:21AM (#24390860)
Yeah, I was thinking along those lines. A more readable version of this library that I sketched out might be something like --

An eagerly executing coroutine to consume the original generator and put it in a queue, and a new simple generator that yields values from the queue till it's told to stop.

I'm not sure if this matches the behavior of the original library for task cancellation though.

    def eager_gen(gen):
        end_marker = object()
    
        queue = asyncio.Queue()
    
        async def consumer():
            try:
                async for val in gen:
                    await queue.put(val)
            except Exception as e:
                await queue.put((end_marker, e))
            else:
                await queue.put((end_marker, None))
    
        async def new_gen():
            while True:
                item = await queue.get()
                if isinstance(item, tuple) and item[0] == end_marker:
                    break
                yield item
    
            if item[1]:
                raise item[1] from None
    
        _task = asyncio.create_task(consumer())
        return new_gen()

[Edit] This would also make a good decorator.
Re:Building FunctionTrace, a graphical Python profiler on Sunday August 16, 2020 @10:05AM (#24177878)
I wrote and open sourced something very similar recently: https://github.com/kunalb/panopticon. I don't think it's as sophisticated as function trace, but it generates chrome/catapult compatible traces instead and has some additions for async coroutines/generators.

Firefox's profiler looks pretty cool, I wish it could also accept catapult traces as is -- it doesn't seem to be the case. Now I know of:

- chrome://tracing - Firefox's profiler - Perfetto: https://ui.perfetto.dev/#!/ - Speedscope: https://www.speedscope.app/ - Brendan Gregg's flamegraph generator

to help visualize traces. Are there other good ones?

Re:Ask HN: What did you make during lockdown? on Sunday June 21, 2020 @01:21PM (#23593467)
I started writing daily: exploring different things, but particularly asyncio and event loops. Also built a small library to visualize python code execution (to be open sourced soon).

https://explog.in/notes/100days.html#org0b7f5fd

Re:Ask HN: How do you read long PDFs? on Monday June 15, 2020 @10:29PM (#23535390)
I bought a Surface Go and found out Drawboard PDF to comfortably read large books and annotate them with the stylus.
Re:Ask HN: Best books you read in the past decade? on Sunday December 29, 2019 @12:48AM (#21904235)
I've been maintaining a list of books I've read over the past years at https://explog.in/books/list.html; some that come to mind –

1. Small Gods, Terry Pratchett (this might actually be more than 10 years ago, but I'll still list it) I really like this one because it emphasizes the value of caring about the _core_ of anything instead of the _trappings_ that will spring up around it. Keeping this book in mind reminds me to focus on the thing instead of the appearance of the thing.

2. On Writing Well, William Zinsser I'm a programmer, and I've often found that improving my ability to write clearly translates directly to programming well: On Writing Well is the best – and warmest – book I've read on writing nonfiction.

3. Incerto, NN Taleb This series forced me to revisit several assumptions. Something that still resonates is valuing anything – particularly books – that has aged well across several years, because it's clearly valuable; and to discount the new shiny.

4. The Pragmatic Programmer, Andy Hunt & David Thomas I started an open source project in my 3rd year at college – as part of Google Summer of Code; inevitably every release would break something and I started hungering for skills that would let me create new releases _without_ breaking the world every time. I stumbled across the pragmatic programmer in my 4th year, and immediately started applying it on my project. This carried through to work and helped me a lot early in my career.

5. The Art of Doing Science and Engineering, Richard Hamming There are so many gems in this book: from the emphasis on fermi numbers for quick approximations, to a simple demonstration of the distance covered by a random walk as opposed to the distance covered by choosing a direction, to asking the question: "Am I working on the most important thing I could be? If not, why not?". He also predicted that great programmers will have one thing in common with great writers – clarity of thought.

There are some books I'm reading right now that I suspect will end up on this list: Psychology of Intelligence Analysis (available at https://www.cia.gov/library/center-for-the-study-of-intellig...) – for making better decisions with limited data; and The Power of Choice – to allow me to pay attention to the non-technical parts of doing valuable work.

Re:Ask HN: How was your Advent of Code 2018 experience? on Tuesday December 25, 2018 @12:43PM (#18758274)
I started in rust but switched over to C (just because I get to apply NIH and have fun writing out things I wouldn't have any reason to otherwise) – currently doing 15; will try to wrap up before the year ends.

This is my first time trying and I'm enjoying it a lot.

Older »