L0stLink
|
4 years ago
|
on: The database ruins all good ideas
RDBMS and Non-RDBMS both have there place, I have used both in the same system several times, all for things that they were good at. Transactions allow you to be confident while making complex changes that in case a failure occurs all partial changes will be rolled back. making use of database level validations and enforcing referential integrity is essential for keeping data consistent over the long term and making data migrations easier. Sure in trivial applications you can just dump data to a document store and have a validation soup handle the rest, that too can be implemented cleanly but Knowing when to leverage RDBMS over other DBMS is an essential skill for an engineer. Because that is how you build scalable systems. Not by throwing JSON stores at everything and calling it a day.
L0stLink
|
6 years ago
|
on: Gadgets That Refuse to Die
Using Ublock origin with additional filters enabled, didn't get any popups or redirects (all built in, all under privacy, easylist from adds, all from malware domains, all from annoyances, Dan Pollock’s hosts file and Peter Lowe’s Ad and tracking server list from multipurpose, Adblock Warning Removal List from custom)
additionally I have these custom rules to block YouTube suggestions so I can better focus, has the added advantage that the UI looks better, autoplay can be controlled from the player and playlist can be accessed in full screen mode (which is the only time I really need access to them).
##ytd-compact-video-renderer.ytd-watch-next-secondary-results-renderer.style-scope
##.ytd-watch-next-secondary-results-renderer.style-scope > paper-button.yt-next-continuation.style-scope
www.youtube.com##ytd-compact-playlist-renderer.ytd-watch-next-secondary-results-renderer.style-scope
! Block the upnext video and the autoplay button
www.youtube.com###secondary
L0stLink
|
6 years ago
|
on: Best Python IDEs and Code Editors
L0stLink
|
6 years ago
|
on: A calculator for the Terminal that renders beautiful math
I use
Insect[0][1] as my calculator and it is great and does not have the odd choice of having case-insensitive identifiers plus does not require me to have
Haskell installed. I would prefer if
Insect was written in a compiled language but I am glad that it exists and JavaScript is really not a deal breaker for me as I need
nodejs installed anyway (the same cannot be said for
Haskell and this is going to be true for most people) plus you can get "compiled" single binaries for it from the release page[2] that you can put in `~/.local/bin` and not worry about it. I highly recommend trying it out. A bit slow to start but if your window manager supports hiding/showing bound windows through user defined shortcuts (like bspwm, awesomewm, i3, sway, herbstluft and most other tiling window managers) then you can just have it launch in the background on startup and you will have a convenient calculator just a few keystrokes away.
[0] https://insect.sh/?q=%3F
[1] https://github.com/sharkdp/insect
[2] https://github.com/sharkdp/insect/releases
L0stLink
|
6 years ago
|
on: Restic – Backups Done Right
That is not "stateless".
L0stLink
|
6 years ago
|
on: Fish: A command line shell for the 90s
I really love the syntax and performance of fish shell, I had a few bash scripts that were used to manage the system volume notifications and power/battery information, as I use fish as my interactive shell, I ported them over to fish and tried to compare the performance, and to my surprise the fish variant was faster. I decided to rewrite the random wallpaper script for sway in fish too and it runs much faster then the original python snippet I got from swaywm's issues[0] (link to original python script[1]):
#!/usr/bin/env fish
swaymsg 'output "*" background ~/Pictures/Wallpaper/'(ls ~/Pictures/Wallpaper | shuf -n 1)' fill'
I really love fish shell and find its multi-line input extremely valuable, I think it has a much saner syntax (I have no meaningful experience writing bash scripts), if you are like me in this regard I highly recommend writing your personal scripts in fish instead and if you are worried about posix compliance, it is not that different from a bash script with bashisms in that regard.
[0] https://github.com/swaywm/sway/issues/1269#issuecomment-4316...
[1] https://git.sr.ht/%7Esircmpwn/dotfiles/tree/master/bin/wallp...
L0stLink
|
6 years ago
|
on: Lesser Known Coding Fonts
Thanks for the suggestion, I did not know about Cascadia Code. I am a big fan of Consolas font but it is proprietary so I had to look for something better which lead me to discover Fira Mono. I personally really like its design choices, that is why I have been using it for so long also the fact that it is floss font is a huge plus, and If by flare you mean the ligatures then Fira Mono (the original font without the patched in ligatures) might interest you, then again if it has too much flare for you then that is that because font preference is subjective.
L0stLink
|
6 years ago
|
on: Lesser Known Coding Fonts
Good question, Although the numbers are almost arbitrary there are a couple of reasons:
-- when looking at logs, database dumps or large forigen text files in general, it is often convenient for me to set the font to a smaller size in order to get better context from surrounding text and for this purpose, I need the font to be able to facilitate my workflow regardless of size and resolution of my current display.
-- Although I no longer use mini map like features of text editors (in part due to the novelty wearing off and in part due to my move away from VS Code as my primary IDE/Editor to Neovim), such fonts make the mini map almost readable on large high resolution displays (which again, provides better context for the code I am editing).
-- It is a handy measure of readability. If the font is readable at that size then it has good geometry and can be used on most low resolution displays (it is a range I came up with after experimenting with a 768p 15.6" laptop display) as previously mentioned sometimes it is handy to be able to lower the size in order to get a better view of the context.
L0stLink
|
6 years ago
|
on: Lesser Known Coding Fonts
You might be looking at the non monospaced variant in the Fira font family.
L0stLink
|
6 years ago
|
on: Lesser Known Coding Fonts
The 3 main things I look for in a "coding font" are whether I can differentiate between i,I,l,L,1 and 0,o,O characters, whether or not it is readable at tiny font size (7px to 9px range on my display) and that it is a monospaced font. first and second are nice to have in any font.
For over 4 years I have sworn by the excellent Fira Mono font by Mozilla more specifically FiraCode (variant with added ligatures), before that it was Consolas. Beyond the three things I have mentioned I do not desire anything more from a font.
[0] http://mozilla.github.io/Fira
L0stLink
|
6 years ago
|
on: Firefox Privacy How-To Guide
They are saved under the user profile directory in the `prefs.js` file. src[0] I have it symlinked to `~/.config/firefox/pref.js` (which also contains `chrome/userChrome.css`, also symlinked to from the firefox profile) in this way they get checked into git with the rest of my dotfiles.
[0] https://support.mozilla.org/si/questions/965842
L0stLink
|
6 years ago
|
on: Apple is evaluating new keyboard mechanisms to make thinner MacBooks
Linux rewards customization, if you don't have the time for that Gnome is a good starting point assuming you can adjust yourself to its workflow. XFCE is amazing (and was my primary before I switched to wayland/swaywm) and I have deep respect for its developers for what they have managed to produce with thunar being one of the most if not the most customizable lightweight file managers. It can have its issues at times but nothing that I have not been able to work around.
L0stLink
|
6 years ago
|
on: Apple is evaluating new keyboard mechanisms to make thinner MacBooks
Linux has gotten to the point that it is no longer necessary to look at MacOS for a stable Unix environment. I don't need much from a laptop just decent keyboard, performance, battery life and for it to not thermal throttle, but unfortunately this seems to be incompatible with Apple's vision of the perfect MacBook. If this is the direction Apple is taking I cannot see myself buying a MacBook in the foreseeable future.
L0stLink
|
6 years ago
|
on: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM
None taken :), and my comment was about the snide in great (x3) grand parent comment(s). The whole fanboy/vegan/how do you know chain.
L0stLink
|
6 years ago
|
on: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM
Does that justify the snide remarks? We should show more tolerance, there might not be a tool in existence that does not have its disadvantages along with its advantages. Healthy discussion around facts is beneficial, dismissing people for being passionate is not.
L0stLink
|
6 years ago
|
on: Weld: Accelerating numpy, scikit and pandas as much as 100x with Rust and LLVM
lets generalize it further: People will take chances to bring up what they are passionate about.
I can relate to this, it is not unreasonable for me.
L0stLink
|
6 years ago
|
on: Python Is Eating the World
mypy can be used to achieve the same effect, but I would also like the ability to enforce types at run-time, and it would be great if more tools made use of PEP 484.
L0stLink
|
6 years ago
|
on: Neovim v0.4.0
No problem, LanguageClient-neovim can be a bit overwhelming at first and if you are like me, you might need to rely on the included docs and GitHub issues, but it is well worth it. I am in my spare time working on getting floating window documentation working for completion items once that is done, I will have no need to keep coc.vim installed as backup.
L0stLink
|
6 years ago
|
on: Neovim v0.4.0
no problem :)
L0stLink
|
6 years ago
|
on: Neovim v0.4.0
> Where do I start?
best place would be the docs :h nvim_open_win()
here is a function that takes a buffer id and creates a floating window based on it anchored to current cursor position:
let s:buff = 0
let s:buff_max_heigth = 12
function! CreateTempBuffer(buffer) abort
let text = nvim_buf_get_lines(a:buffer, 0, -1, v:true)
if s:buff == 0
let s:buff = nvim_create_buf(v:false, v:true)
endif
call nvim_buf_set_lines(s:buff, 0, -1, v:true, text)
let height = len(text)
if height > s:buff_max_heigth
let height = s:buff_max_heigth
endif
let width = 0
for index in range(len(text))
let line = text[index]
let lwd = strdisplaywidth(line)
if lwd > width
let width = lwd
endif
let text[index] = line
endfor
let width = width + 1
let opts = {'relative': 'cursor', 'width': width, 'height': height, 'col': 0,
\ 'row': 0, 'anchor': 'SW', 'style': 'minimal'}
let win = nvim_open_win(s:buff, v:false, opts)
return win
endfunction