-
13 votes
-
Learn Vimscript the Hard Way
6 votes -
Ember.js, Dr. Carvers Shave Butter, and disappearing products
10 votes -
GPT-2 is not as dangerous as OpenAI thought
5 votes -
The journey of building mypy and type-checking 4 million lines of Python at Dropbox
6 votes -
Don't Do This - PostgreSQL Wiki
16 votes -
How reliable is IP ownership information?
I have interactive firewalls like OpenSnitch running on most of my desktop OS's. I like to see what is going on with my machines' network connections to learn about networking, infosec, and to...
I have interactive firewalls like OpenSnitch running on most of my desktop OS's. I like to see what is going on with my machines' network connections to learn about networking, infosec, and to have have some peace of mind.
Example workflow:
- Get a firewall notification of a new incoming connection to some process running on my machine
- If no DNS entry exists and only the IP address is provided, then I google the IP
- I find something like https://ipinfo.io/74.125.20.189
- I make a decision as to whether allow/deny based on the ownership info which I found in step 3.
Aside from trusting the particular site presenting the ownership info, how reliable is this information regarding IP ownership?
For example, if an IP came back as "Google" could it really be a GCP instance running a command and control server?
Another example, I know that large corps own big blocks of IPv4, but they must lease these IP's out to whomever, right? I imagine there is some wild-west market for these with little accountability?
Are either of these scenarios realistic? If so, is my entire workflow for "do I trust this IP" pointless?
edit: btw, I used to catch and deny incoming connections from *.ru to the Windows legacy Skype client all the time. I cannot think of any non-evil reason why that should have been happening. That particular series of events is what really validated me doing this. If you can think of a non-evil reason for any incoming connections to skype from *.ru, please let me know.5 votes -
xv6: A Reimplementation Of Unix Version 6 (PDF)
5 votes -
Unearthed Arcana: `edbrowse`
I recently happened to mention edbrowse in a throwaway comment, and @ainar-g expressed some interest in it. I took my sweet time, but I finally managed to assemble a short(ish) write-up on it, and...
I recently happened to mention
edbrowse
in a throwaway comment, and @ainar-g expressed some interest in it. I took my sweet time, but I finally managed to assemble a short(ish) write-up on it, and my sleep-addled mind is thinking that this topic - niche, weird tools - could just become recurrent.
Terminal brosers, such as
lynx
,w3m
andelinks
, while still used and under more-or-less active development, are very niche tools.edbrowse
fills a niche within that niche, as it's meant for use by non-sighted people, and thus provides an interface even more bare-bones and arcane than the usual TUI/curses apps that share its space.As per the name,
edbrowse
's interface is heavily inspired byed
's, the standard text editor:edbrowse
, in fact, is not just a web browser, but it combines together a browser, a text editor, a mail client, and - for some reason - a database client. All of these functions are mostly controlled via one-letter commands and, as is tradition, only displaying a single?
on error*.edbrowse
is also unique amongst the terminal browsers because of its support for JavaScript and the DOM. The text it spits out is meant for Braille displays and screen readers, so it lacks niceties like color or aligned tables, but if you were to browse toreddit.com
with it, you would see a perhaps ASCII-art Snoo fill the screen†."Browsing reddit? How‽," you might ask. "How am I supposed to get this thing to stop questioning me? All those
?
are filling me with existential dread, I have no idea what to do!"While it's all there in the manual (but not in the manpages, for some reason), reading through 30k words of text can be a bit of a slog. They do provide a cheatsheet, though, even if it's a bit messy.
So, how do you use
edbrowse
? If you already know howed
works, most commands (especially "movement", search and listing commands) will work as expected - it is also an editor, after all - butedbrowse
adds another handful of them.The most important of them is, perhaps,
b
rowse. It will makeedbrowse
put in an HTTP request, grab the response (if any), and then render it. It will print out the length, in bytes, of the response and of the rendered text, and stop there.$ edbrowse edbrowse ready b https://tildes.net 119201 20083
To actually peruse the page you can use any of the
ed
listing commands (p
rint,l
ist, andn
umber), or thez
command.z
works much likep
, but it prints a number of lines (normally 24) while "remembering" your position within the page.0z10 {Tildes} {Log in} <>Sidebar * {Activity} * {Votes} * {Comments} * {New} * {All activity}
Links are indicated by curly brackets, while form elements (both input elements and buttons) are wrapped in angle brackets. You can follow a link by jumping to the line containing it and issuing a
g
o command (usingg2
to follow the second link on that line,g3
for the third,g$
for the last), but, in normal use, you should probably just search for the link text./{Log in}/g 5886 923 0z10 {Tildes} <>Sidebar Log in Username <> Password <> <-> Keep me logged in <Go>Log in
The same thing goes for form elements, but the command to use, here, is
i
(fori
nteract).i
has actually four different subcommands:i[N]=
, to set the value of a text field,ipass[N]
to prompt for the value of a password field,i[N]*
to press a button‡, andi[N]?
to askedbrowse
what that damned element is supposed to be./Username/ i=mftrhu /Password/ ipass hunter12 /<Go>/i* submitting form 124579 20049
You can jump back to the previous page with
^
, and refresh the current page withrf
.Of course,
edbrowse
can do much more - can be configured to do much more, via.ebrc
, as it possessed (very) rudimentary programming facilities. It can edit its own configuration file, and reload it withconfig
, so - rejoice. You won't ever need to leave it.And, after seeing just how aesthetically pleasing its configuration language can be, I'm confident that you won't ever want to leave it.
# Switch to a new editing session e2 no file e ~/.ebrc # Show the last lines of the configuration file $100,113n 100 function+google { 101 b http://www.google.com 102 /<>/ i=~0 103 /</ i1* 104 /^About/+2 105 } 106 function+ddg { 107 b https://duckduckgo.com 108 /<>/ i=~0 109 i2* 110 /<Go secure>/+1 111 /<Go secure>/+2 112 z24 113 }
As I said earlier, while
edbrowse
does possess some programming facilities, they are very rudimentary. Functions are nothing more than sequences ofedbrowse
commands with some flow control constructs: they can do everything an user could do, which means that they are often convoluted and overly terse.The
ddg
function, for example (which is invoked via<ddg [PARAMS]
), firstb
rowses to duckduckgo.com. The DuckDuckGo home page, as rendered byedbrowse
, only contains a link followed by the search form:{About DuckDuckGo Duck it!} <> <S secure> <X>
So the function looks for the (first) empty text field (
/<>/
), fills it in with the parameters passed to it (i~=0
), activates the second form element on that line (i2*
) and, once the results page has loaded, skips the initial boilerplate (/<Go secure>/+1,+2
) and prints the first 24 lines of results (z24
).Sure. It could be replaced by a single line, replacing all the form interaction with a simple
b https://duckduckgo.com/?q=~0
, but where would be the !!FUN!! in that?
* This is not completely true, as
edbrowse
will show more long-form error messages, but it's pretty inconsistent with them.
† Iff you have JS enabled in your current session. It can be toggled on and off with thejs
command.
‡ I had no luck with the Tildes buttons (e.g., sidebar toggle, upvote button), though, at least not with the version ofedbrowse
that Debian bundles up.10 votes -
We Re-Launched The New York Times Paywall and No One Noticed
9 votes -
A very deep dive into iOS Exploit chains found in the wild
4 votes -
Fancy Zones, a tiling window manager from Microsoft
8 votes -
How to do a code review
10 votes -
Green Threads Explained in 200 Lines of Rust
3 votes -
Consequences of using the Copy-Paste method in C++ programming and how to deal with it
4 votes -
Programming Challenge: Convert between units
Hi everyone! It's been a long time since last programming challenge list, and here's a nice one I've encountered. If you search for something like 7km to AU, you'll get your answer. But how is it...
Hi everyone! It's been a long time since last programming challenge list, and here's a nice one I've encountered.
If you search for something like 7km to AU, you'll get your answer. But how is it done? I don't think they hardcoded all 23 units of distance and every conversion factor between them.
If you were programming a conversion system - how would you do it?
First of all, you have input in format that you can specify, for example something like this:
meter kilometer 1000 mile kilometer 1.609344 second minute 60 ...
Then you should be able answer queries. For example
7 mile meter
should convert 7 miles to meters, which is11265.41
.Can you design an algorithm that will convert any unit into any other unit?
Edit: Some conversion rates I extracted from wikipedia:
ångström 0.1nm astronomical unit 149597870700m attometre 0.000000000000000001m barleycorn 8.4m bohr 0.00846 cable length (imperial) 185.3184m cable length 185.2m cable length (US) 219.456m chain (Gunters) 20.11684m cubit 0.5m ell 1.143m fathom 1.8288m femtometre 0.00000000000001m fermi 0.00000000000001m finger 0.022225m finger (cloth) 0.1143m foot (Benoit) 0.304799735m foot (Cape) (H) 0.314858m foot (Clarke's) (H) 0.3047972654m foot (Indian) (H) 0.304799514m foot,metric 0.31622776602m foot,metric (long) 0.3m foot,metric (short) 0.30m foot (International) 0.3048m foot (Sear's) (H) 0.30479947m foot (US Survey) 0.304800610 french 0.0003m furlong 201.168m hand 0.1016m inch 0.0254m league 4828m light-day 25902068371200m light-hour 107925284880m light-minute 17987547480 light-second 299792458m light-year 31557600light-second line 0.002116m link (Gunter's) 0.2011684m link (Ramsden's; Engineer's) 0.3048m metre 1m m 1metre km 1000m mickey 0.000127 micrometre 0.000001 mil; thou 0.0000254 mil 10km mile (geographical) 6082foot (International) quarter 0.2286m rod 5.0292m rope 6.096m shaku 0.303 0303m span (H) 0.2286m stick (H) 0.0508m toise 1.949 0363m twip 1.76310 yard 0.9144m
17 votes -
Go 1.13 Is Released
6 votes -
Lezer (the parser used in CodeMirror 6)
3 votes -
Typesetting Markdown Blog: What Next?
Some of you have read the Typesetting Markdown blog series (https://dave.autonoma.ca/blog/). The plan was to finish the last two parts with Annotated Text (basically markup for Markdown) and...
Some of you have read the Typesetting Markdown blog series (https://dave.autonoma.ca/blog/). The plan was to finish the last two parts with Annotated Text (basically markup for Markdown) and Figure Drawing (MetaPost); however, people have asked for a post on Markdown to EPUB, others have asked for high-quality PDF theme templates using ConTeXt, and some have requested rendering Markdown into HTML.
Within the realm of Markdown, digital documentation, typesetting with ConTeXt, R, externalized interpolated strings, and bash scripting, what would interest you for the next post in the series?
(Please flip through the blog series to see the topics that have been covered.)
3 votes -
How Facebook tracks you on Android
8 votes -
QuickJS: A new JS interpreter/compiler by Fabrice Bellard
11 votes -
I'm trying to get a programming job without a degree. Got any tips?
Hey ~, I'm trying to get a programming job. I don't have a degree (I may go to college, but if I do it'll be in a few months), and little work experience. Do you have any tips that could help me...
Hey ~, I'm trying to get a programming job. I don't have a degree (I may go to college, but if I do it'll be in a few months), and little work experience. Do you have any tips that could help me have a successful job search?
Here's my resume (somewhat anonymized). I tried to focus on experience I've gained from creating open-source projects to show the skills that I have. I've made sure that all the projects listed have demos, screenshots, usage instructions, etc. Any advice on how I could improve it would be appreciated.
Thanks!
22 votes -
A fully-functional graphical text editor with syntax highlighting in thirty-nine lines of K.
13 votes -
The design of littlefs, a little fail-safe filesystem designed for microcontrollers.
9 votes -
The Baseline Interpreter: a faster JS interpreter in Firefox 70
13 votes -
New & Experimental CSS Tools in Firefox
8 votes -
All the New ES2019 Tips and Tricks
7 votes -
Which language would you pick to completely rewrite BSD, Linux, etc.?
It'd my understanding that C has stuck around in the UNIX world for so long, nearly half a century, mostly due to the inertia of legacy code. If you could snap your fingers and magically port/fork...
It'd my understanding that C has stuck around in the UNIX world for so long, nearly half a century, mostly due to the inertia of legacy code.
If you could snap your fingers and magically port/fork the entire stack of open source codebases to the language of your choice, which would you pick and why?
20 votes -
What happens when you launch a fresh install of Firefox?
@jonathansampson: What happens when you launch a fresh install of Firefox? I was curious, so I did so with version 68.0.2, and monitored my network activity. Here's what I learned...
23 votes -
Tyranny of the Clock - Lessons we learned when debugging a scaling problem on GitLab.com
12 votes -
The Fallacy of Premature Optimization
4 votes -
Topic Requests: What subject would you like to see covered in more depth?
For those who haven't seen my essay-length posts in the past, I occasionally like to delve into explaining different programming concepts, particularly with regards to making your code easier to...
For those who haven't seen my essay-length posts in the past, I occasionally like to delve into explaining different programming concepts, particularly with regards to making your code easier to manage. Sometimes this has to do with how you structure you code and projects, and at others it has to do with how you think about the problems you're solving. I've been in the mood to write up on yet another programming subject, but nothing in particular has stood out to me lately during the course of my work.
With that in mind, I figured I would take a different approach and see if anyone here had some specific requests for content they would like to see. Requests from all levels of experience are welcome!
(And for those who are itching to do a write-up on any of the requests that appear here, feel free to call dibs!)
Edit
For those who want to take a dive into my previous submissions, you can now find them in the new wiki entry created by @cfabbro or directly via the
programming.code_quality_tips
tag here.8 votes -
StandardJS, a Javacript linter config with 3 million downloads/month starts showing advertisements in users terminals
20 votes -
Specification Gaming Examples in AI
10 votes -
I finally open sourced something: Pliant, a flexible blog skeleton
https://gitlab.com/smoores/pliant I’ve been a software developer for about three years, and I’ve always been enticed by and passionate about the open source scene. I have an assortment of projects...
https://gitlab.com/smoores/pliant
I’ve been a software developer for about three years, and I’ve always been enticed by and passionate about the open source scene. I have an assortment of projects variously available on GitHub and GitLab, but this is the first time I’ve ever created an open source project intended to be used by others.
Pliant is a barebones starter kit for anyone wanting to self host their own blog. It came out of my own efforts to start a blog, and it’s what currently powers https://tfhe.shanemoore.me.
I’d love to hear you’re feedback, or just discuss open source, blogging, web technologies, or whatever else comes up.
20 votes -
The features and history of GNU Readline
4 votes -
Git Koans
11 votes -
The researcher who published the Steam Windows privilege-escalation exploit two weeks ago has published a second zero-day
13 votes -
Dissecting A Dweet: Parallax Mountains (Analyzing a 140 byte JavaScript demo)
3 votes -
WebAssembly Interface Types
6 votes -
Turbo, An Improved Rainbow Colormap for Visualization
7 votes -
What are you coding today?
What are you coding? Or are you reading a CS paper? and of course, have you read SICP today? ___-------___ _-~~ ~~-_ _-~ /~-_ /^\__/^\ /~ \ / \ /| O|| O| / \_______________/ \ | |___||__| / / \ \...
What are you coding? Or are you reading a CS paper?
and of course, have you read SICP today? ___-------___ _-~~ ~~-_ _-~ /~-_ /^\__/^\ /~ \ / \ /| O|| O| / \_______________/ \ | |___||__| / / \ \ | \ / / \ \ | (_______) /______/ \_________ \ | / / \ / \ \ \^\\ \ / \ / \ || \______________/ _-_ //\__// \ ||------_-~~-_ ------------- \ --/~ ~\ || __/ ~-----||====/~ |==================| |/~~~~~ (_(__/ ./ / \_\ \. (_(___/ \_____)_)
29 votes -
Dirty tricks 6502 programmers use
8 votes -
Paged Out! A new experimental (one article == one page) free magazine about programming
10 votes -
Electron is flash for the desktop
44 votes -
A Simple Intro To Svelte
4 votes -
How Instagram uses static analysis like linting and automated refactoring to help manage their multi-million-line Python codebase
10 votes -
Transactional Memory and Tech Hype Waves
3 votes -
Report: Data Breach in Biometric Security Platform Affecting Millions of Users
8 votes -
The (not so) hidden cost of sharing code between iOS and Android
10 votes