HNHacker News
TopNewBestAskShowJobs

emacs28

345 karma · joined October 18, 2021

submissionscomments
emacs28··on How to write a Git commit message (2014)
Well rather than manually enter the bug fixes/features introduced in each release on the GitHub releases, you can just paste a link to the automatically generated changelog. This is less error prone and isn't meant to replace writing good commit messages.
emacs28··on How to write a Git commit message (2014)
I've been using github-changelog-generator [1] for (you guessed it) automatic changelog generation, which adds bug fixes/features to the changelog based on issues and PRs, but sematic-release looks like it might be even more useful.

[1] https://github.com/github-changelog-generator/github-changel...

emacs28··on Making open source hardware design a reality
Related: I would recommend people look into cocotb and uvm-python which let you do verification of SystemVerilog designs in Python. This has been a game changer for me, and it is much more productive than writing tests in SystemVerilog in my experience.
emacs28··on Python’s “type hints” are a bit of a disappointment to me
I find type hinting useful as an additional level of documentation, especially for complex projects, and it helps my future self understand my own code more quickly.

Also in my experience it can provide static analysis tools more information and provide autocomplete suggestions in a wider range of coding scenarios.

emacs28··on Ask HN: What’s a good laptop for software development at around $2k?
One thing that deters me a bit from using macOS is the slower docker performance compared to linux. Anyone here have workarounds for this?
emacs28··on Ask HN: Have you created programs for only your personal use?
The most polished and useful program I've made for personal use is an emacs minor mode that lets you scroll down top lines in a file. I was tired of having to always look all the way at the top of the editor window to read the top lines of a file or small files.

https://github.com/trevorpogue/topspace

I also made a Python tree data structure library to easily parse and read tree structures which I actively use in other personal projects.

https://github.com/trevorpogue/sections

emacs28··on Ask HN: Have you created programs for only your personal use?
Many, one fun one that comes to mind is last year I made a Python debugger to output error traces exactly how I want to see them. It can display local variables, print the surrounding lines of code and parent function & class name at each trace for context.

I also made a custom debugging print function to print variable names as well as their value with only having to write "print(var)". It also will print the parent function and class names for context. I use this tool more than the debugger day to day now.

I know there are existing alternatives for one or both of these but there's nothing easier than tweaking a tool you wrote yourself. Plus I learned a lot about Python in the process!

emacs28··on Ask HN: Best practices for editing remote code locally?
Just out of curiosity, what does ctrl+mouseclick do in VSCode? I can almost guarantee there's a way to do it in Emacs :) If it has to do with looking up references, there's lsp-mode in emacs which gives it IDE capabilities for many languages.
emacs28··on Ask HN: Best practices for editing remote code locally?
I use Emacs but don't enjoy the latency of using a remote Emacs session or locally using tramp. Recently my solution is to edit locally, then whenever I need to run the codebase on the remote machine I wrap the run command in a script with two rsync commands. First (using rsync) it will sync the remote codebase with any local changes. Then when the remote command completes, any relevant result files I want to analyze locally after are synced back to the local machine (using rsync). Rsync is very flexible and has lots of options such as ignore filters.
emacs28··on Ed Sheeran on creative cost of lawsuit: ‘Now I just film everything’
Oh no haha I haven't seen that episode (or forgot about it). That would have been a clever joke though.
emacs28··on Ed Sheeran on creative cost of lawsuit: ‘Now I just film everything’
I feel like it would be possible to write software to tell artists if a song is in danger of copyright infringement of other registered songs. Either by analyzing the raw audio like Shazam does or by feeding the software the transcribed notes on sheet music or something similar.

But I guess here the issue was more about whether or not the infringement was intentional.

emacs28··on What’s new in Emacs 28.1?
In addition to the native pixel-scroll-precision-mode in Emacs 29, there's also a MELPA package called good-scroll which implements pixel-wise scrolling for other emacs versions also.
emacs28··on Dual 75“ 4K TV Floor Computing
I find curved displays much nicer to look at on the edges. I hope spherically curved monitors come out some day too.

I use a 32" 2160p 4K curved display (1500R). It's harder to find than the 1440p curved displays but they're out there.

Also, I find I prefer looking straight in front of me best and don't really use anything more than a single 4k display. I try to improve my app switching skills & tools before using more monitors.

emacs28··on TikTok is scary good. It's digital crack
Honestly, I enjoy HN more than TikTok.
emacs28··on Bashing the Bash – Replacing Shell Scripts with Python (2017)
I haven't heard of xonsh either till now. After looking it over, it seems like a perfect integration of sh with Python. There's a good chance I'll give an honest shot at migrating from zsh to xonsh this week.
emacs28··on Bashing the Bash – Replacing Shell Scripts with Python (2017)
I decided a while ago to write all my future scripts in Python whenever possible instead of sh or bash due to the overall better syntax and power of Python.

Typer is one of the better packages for running Python scripts from CLI. Fabric & Invoke are pretty good too.

To run any bash commands in Python I have a Python script that creates a temporary bash file with the code to execute, makes it executable, runs it with the commands in the built-in subprocess package, then deletes the file. This makes any complex bash commands with piping and whatnot runnable straight from Python.

This way I don't have to learn all the different bash-based Python commands from pathlib and whatnot that throw unexpected errors, and I can run them using pure bash syntax from Python. But then you also get all the benefits of Python's looping syntax, classes etc.

emacs28··on Launch HN: Reality Defender (YC W22) – Deepfake Detection Platform
I would like to coin this alternative name: Deeptect
emacs28··on Down the mechanical keyboard rabbit hole
Certainly! I have 4 keys for mouse movement (left, right, up, down) in my "mouse" layer. If you tap them it moves the mouse a little bit in that direction, if you hold the keys then the mouse moves slow at first, then starts to speed up (that is more controlled at the OS level though). You can also add keys to change the acceleration.

I have these 4 direction keys on my middle and index fingers of each hand. There are also keys for clicking which I have on my ring fingers, and on my palm for when I need to click down and drag.

It takes getting used to obviously but I don't mind it now. It works for 95% of my uses but I'll admit if I need really fine control, I'll use my trackpad for a couple of seconds.

emacs28··on Down the mechanical keyboard rabbit hole
Hm not sure, it feels fine to me at least. I think having fewer keys to hit makes it seem unnecessary to move the palms. Some people are really specific on never resting the palms on anything to reduce RSI, which I do sometimes to make typing faster, but my layout allows me to also rest my palms all day too if I want. It works for me at least.
emacs28··on Down the mechanical keyboard rabbit hole
I went down this rabbit hole and I now:

- use 30 keys

- control the mouse from my keyboard

- never have to move my palms in the slightest all day

- get far more control and (Emacs) keybindings

It was a very painful process though deciding on my custom key layout. I would make myself re-learn new layouts on an daily or hourly basis for 6 months until I was satisfied.

I have a Moonlander but my long term plan is to move to Tightyl: https://www.reddit.com/r/MechanicalKeyboards/comments/glfyki...

emacs28··on Launch HN: Tensil (YC S19) – Open-Source ML Accelerators
Okay thanks, so are DRAM0 & DRAM1 memory pools located on the host DDR memory, or is that a part of separate DDR DRAM hardware located on the FPGA board (kind of like how GPUs have their own separate DDR DRAM)? I definitely want to dive deeper into the source code of this project at some point and see how the compiler and everything works.

Edit: Sorry I think you already clarified that the DRAM0 & DRAM1 memory pools are located on the host

emacs28··on Launch HN: Tensil (YC S19) – Open-Source ML Accelerators
Nice work with this. I was wondering, are all computations other than convolution performed on the FPGA as well - such as pooling, padding, inter-layer quantization operations (rescaling & offset additions)? If not, does the FPGA offload unsupported operations to the host before continuing? Does the FPGA need to transfer intermediate layer IO data back and forth between the host during GEMM if the data become too large to fit on the FPGA SRAM? Thanks
emacs28··on Show HN: Sections – Easy tree data structures in Python
Thanks, glad to hear!
emacs28··on Launch HN: Tensil (YC S19) – Open-Source ML Accelerators
What physical connection is required between the FPGA and host? For example, do they communicate through a PCIe connection?
emacs28··on Show HN: TopSpace – Scroll above the top line in Emacs
Glad to help! Thanks for sharing, I will try to take a look at your editor. Don't tell other Emacs people, but I like programming in Python much better than Elisp
emacs28··on Show HN: TopSpace – Scroll above the top line in Emacs
Yeah exactly! The cursor can be recentered independently of what line you're on with this mode (in particular at the top nlines). Actually your comment made me realize there is a bug when hitting Ctrl-L which I just fixed so thanks :D
emacs28··on Poll: Where do you live?
I think I can help, I've been learning how to make bar graphs from tables in microsoft word
emacs28··on Learn Elisp the Hard Way (2011)
vertical-center-mode: https://github.com/trevorpogue/vertical-center-mode

It let's you "scroll above the top line" so that the top text in a file can be centered in the screen.

I still need to clean it up and submit to MELPA

emacs28··on Learn Elisp the Hard Way (2011)
Creating my own non-trivial minor mode was what really got me to start understanding Elisp and Emacs as a whole more under the hood.
emacs28··on Matrix Multiplication Inches Closer To Mythic Goal
Just to clarify, the TPU (version 1) does not multiply two 256x256 matrices per clock cycle as that takes 256^3 MAC operations to perform. It produces one row of the product matrix per clock cycle (each 256 element row takes 256^2 MAC operations to calculate).
← PreviousPage 2 of 3Next →