HNHacker News
TopNewBestAskShowJobs

oso2k

1,283 karma · joined July 5, 2012

lpsantil on github Solutions Architect, OpenShift/Kubernetes/Container Storage/Container-native Virtualization, Red Hat
submissionscomments
oso2k··on The Heart of RISC-V Development Is Unmatched
I agree. I think the original assumption about "leftover volume/stock" only really applies to the RPi 1. However, if you talk more in terms of ARM ISA, then it certainly applies to every generation of the RPi in that the chosen ISAs are "leftover/last gen licenses" and are presumably less expensive to procure and produce chips from on older design processes. The ARM11/ARMv6 was new in 2001 while the ARMv6Z core in the RPi 1 was new in 2003 with the RPi 1 coming out in 2013. The ARMv8 ISA came out in 2011, with A72 coming out in 2015, while the RPi 4 came out in 2019. [0][1][2][3]

[0] https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications

[1] https://en.wikipedia.org/wiki/ARM11#Overview

[2] https://en.wikipedia.org/wiki/ARM11

[3] https://en.m.wikipedia.org/wiki/Comparison_of_ARMv8-A_cores

oso2k··on Compiling a Lisp to x86-64: Labelled procedure calls
Is `kLabelPlaceholder` an absolute or relative address? If it's absolute, you start executing at `kLabelPlaceholder`. If it's relative, you start executing at `buf + kLabelPlaceholder`. You could see the final value if you compile with debug info and run the binary under `gdb` or some other debugger.

It might help to read skeeto's blogs [0][1][2].

[0] https://nullprogram.com/blog/2015/03/19/

[1] https://nullprogram.com/blog/2016/12/11/

[2] https://nullprogram.com/blog/2018/11/15/

oso2k··on A small but complete JavaScript engine
Very rarely. I believe I've only seen 1 or 2 in the last 20 years.
oso2k··on Nginx Service Mesh
The use cases for Istio/Envoy or any other Service Mesh is that they comprise a set of far higher-level capabilities. Routing Policy Enforcement, mTLS, Circuit Breakers, Certificate Management, Traffic Tracing and Visualization, and many many more features [0][1].

I love me some HAProxy too, but it only operates at the level of a single service/backend group or lists of relatively independent services/backend groups. Services Meshes intend to make deploying dozens, hundreds, thousands of complex services in cohesive and consistent fashions such that they form one or more applications or APIs.

[0] https://docs.openshift.com/container-platform/4.5/service_me...

[1] https://istio.io/latest/docs/concepts/what-is-istio/

oso2k··on Why mmap is faster than system calls (2019)
There's actually dozens and dozens of such instructions on x86 and x86-64. So the question shouldn't really be if there is an instruction, it's whether the one you're using is the most performant for your given CPU. Old Linux kernels would actually calculate CPU speed, and whether 16-bit, 32-bit, FPU, MMX memory copies were fastest and pick one for the kernel to use.
oso2k··on Canonical introduces high-availability Micro-Kubernetes
Haha. I still work for Red Hat, and Consulting at that. My pay is determined by how many billable hours I put in and my customer reviews. Not directly by how much you buy.
oso2k··on Canonical introduces high-availability Micro-Kubernetes
Not to be snarky, but that's easy. Just disconnect your cluster from the internet. We have hundreds of customers that are running disconnected clusters.
oso2k··on Delphi 2 can compile large .pas files at 1.2M lines per second
FAT32 isn't often included these days in Linux FS benchmarks [0] but some older benchmarks [1] also show noticeable performance differences, especially when the workload is more meaningful than copy files. Lack of features does not imply efficient design. Caching was optional with Windows 98 and sometimes was turned off by default, depending on how the drive was formatted (partition type) and the IO driver (BIOS, LBA, OEM) loaded. The referenced Linux benchmarks probably limit the variability here since I think Linux tends to follow the same code paths, independent of the partition types.

BTW, Windows benchmarks tend to follow same pattern of FAT32 being slower than newer filesystems. [2][3][4]

[0] https://www.phoronix.com/scan.php?page=article&item=linux_us...

[1] https://web.archive.org/web/20010627181258/http://bulma.lug....

[2] https://www.flexense.com/fat32_exfat_ntfs_usb3_performance_c...

[3] https://www.sami-lehtinen.net/blog/exfat-fat32-ntfs-real-lif...

[4] https://www.tomshardware.com/reviews/ssd-file-system-ntfs,31...

oso2k··on Delphi 2 can compile large .pas files at 1.2M lines per second
FAT32 is not a very fast filesystem. Things like caching are necessary to make it performant. Also, the IO subsystems in Win98 sometimes chose slow paths or interfaces.
oso2k··on Delphi 2 can compile large .pas files at 1.2M lines per second
Early Pascals did. P-Code [0] it was called. I don't think it was really about easy of compilation. It was about ease of portability, at least early on.

[0] https://en.wikipedia.org/wiki/P-code_machine

oso2k··on Delphi 2 can compile large .pas files at 1.2M lines per second
Not surprised [0]. Pascal was always very fast to compile, especially with Borland tools.

[0] https://prog21.dadgum.com/47.html

oso2k··on USB3: Why it's a bit harder than USB2
Probably short for Electromagnetism or short for EMF which is short for Electro Magnetic Field.
oso2k··on USB-C was supposed to simplify our lives, but instead it’s a total mess
I haven’t found this to be true. I’ve used 4 or more different chargers. A couple off-brand USB-C chargers, USB-C dock/charger, Apple USB-C chargers, USB-C to USB 2.0/3.0 cables with 1A, 2.4A, 2.5A chargers. All worked without issue. In fact, I left the Nintendo wall wart at home (I usually travel for work) and just bring along a USB-C to USB cable with me.
oso2k··on DOS Subsystem for Linux
With HIMEM.SYS + EMM386.EXE [0][1], you could include or exclude certain memory segments. But, DOS Subsystem for Linux uses non-standard little documented Unreal Mode [2][3] instead of traditional DOS Memory Management.

[0] http://www.mdgx.com/mem6.htm#6

[1] http://manmrk.net/tutorials/DOS/msdos7/emm386.htm

[2] https://en.m.wikipedia.org/wiki/Unreal_mode

[3] https://github.com/charliesome/doslinux/blob/master/doslinux...

oso2k··on DOS Subsystem for Linux
A couple comments....this is super interesting to me. It boots into Linux from an HDD image. It also requires and uses Unreal Memory Mode [0][1] (vs. Real Mode or Protected Mode). It makes me wonder how compatible & stable this is with other DOS era software.

[0] https://en.m.wikipedia.org/wiki/Unreal_mode

[1] https://github.com/charliesome/doslinux/blob/master/doslinux...

oso2k··on Making a Pratt Parser Generator
LOL. I don't think it's that serious. Maybe it's the Berenstain Bears Effect, Mandela Effect, Glitch in the Matrix, or ... a slight lack of your favorite morning pick me up. :D In any case, looking forward to reading the next article.

Personally, at some point, I'd like to write a Pratt Parser in C99. I'd like to explore the one sentiment you had that OOP has a negative effect on understanding Pratt Parsers.

oso2k··on Making a Pratt Parser Generator
You read me correctly. I did intend the politer version of TFA of RTFA ("Read/The Fine Article"). IMO, Robert does a great job of setting up Pratt Parsing and his intent to write a Pratt Parser Generator. As such, it is a "Fine Article" adding to the compendium of Pratt Parsing & Operator Precedence Parsing.

I hear you though, there are many that (overly) use passive-aggressive and/or aggressive language in the form of acronyms like STFU, GTFO, RTFA, IDC, WTH, WTF etc. Not my intent. I sometimes use TFA as a reference to the linked article. I'll reconsider next time.

oso2k··on Making a Pratt Parser Generator
Hopefully Robert Jacobson sees this, but, the TFA uses the word "donation" when Pratt used "denotation." Just a couple small typos.
oso2k··on Kubernetes YAML Generator
I think of writing Operators more as writing your own Device Driver but I can see the correlation you're trying to make.
oso2k··on SoftBank unmasked as ‘Nasdaq whale’ that stoked tech rally
I am reminded of the movie Pi [0].

[0] - https://en.wikipedia.org/wiki/Pi_(film)

oso2k··on Kubernetes: Make your services faster by removing CPU limits
tpxl gets me. :D Even the "scale atomically" part.

People seem to have inferred that I believe that Limits are used by the Scheduler. I don't. But if we set "Request = Limits", we're guaranteeing to the Scheduler that our pod workload will never need more than what is Requested, or, we scale up to a new pod.

It seems to me latency is a symptom of the actual issue, not the actual problem.

If a workload idles at 25% of Request, 12.5% of Limits (as in TFA), and peaks at 50% of Request, 25% of Limits that seems hugely wasteful. What's more, the workload has several "opportunities" to optimize latency. And uncapping the CPU Limit reduces the latency. If it were me, I'd be asking, "Why does my workload potentially need access to (but not utilization?) 4, 6, 8, 16, 32 cores to reduce its latency?"

More often than not, I've been able to help customers reduce their latency by DECREASING the Pod's Requests and Limits, but also INCREASE the replica count (via HPA or manually). It's not a silver bullet, and whether a workload is node.js, JBoss EAP, Spring Boot, or Quarkus does matter to some extent. The first thing I reach for in my k8s toolbox is to scale out. "Many hands make light work" is an old adage. N+1 workloads can usually respond to more traffic than N workloads in a shorter amount of time. k8s' strength is that it is networked and clustered. Forcing one node or a set of nodes to work harder (TFA mentions "isolating" the workload) or vertically scaling is anti-pattern in my book. Especially when you understand the workload pattern well. What is being done here is that nodes (which are likely VMs) are being over-committed [0]. Now, those VMs live on physical hypervisors which are likely -guess what- over-committed. Turtles of (S)POFs all the way down I say.

Also, TFA mentions

     In the past we’ve seen some nodes going to a "notReady" state, mainly because some services were using too much resources in a node.
and

     The downsides are that we lose in “container density”, the number of containers that can run in a single node. We could also end up with a lot of “slack” during a low traffic time. You could also hit some high CPU usage, but nodes autoscaling should help you with it.
So they acknowledge the risk is real and they've encountered it. For most of my customers, failing nodes, reduced "container density", and "slack" are unacceptable. That translates into increased engineer troubleshooting time, higher cloud provider bills. What's worse is that the suggestion of the Cluster Autoscaler will protect you also comes with increased costs (licenses, VM, storage, etc.). Not the solution I want. Seems like a blank check to your cloud provider.

But I get it. I've fought with customers that tell me, "By removing the Limit, my container starts up in half the time." Great. Then they get to Perf Testing and they get wildly inconsistent speed up when scaling out (or way sublinear), or they're limited by resource in their ability to scale up especially when metrics tells them they have resources available, or there is unchecked backpressure, or downstream bottlenecks, or this one workload ends up consuming an entire worker node, or ...

[0] https://www.openshift.com/blog/full-cluster-part-2-protectin...

oso2k··on Kubernetes: Make your services faster by removing CPU limits
DISCLAIMER: I work for Red Hat Consulting as an OpenShift/k8s consultant.

This is such a bad idea. And I get that they're point is to reduce latency. But the point of k8s is describe your workload accurately and allow it to make decisions on your behalf. The no-brainer way fix this is to set the CPU Requests and Limits to the same value and add an HPA. Setting CPU Requests and Limits to the same value usually gives people the behavior they're expecting. Having more pods in can also reduce latency. But, taking away the Limits hides information about the workload while working around the issue at low to medium workloads. If they were ever to get Black Friday or other 2.5x workload peaks, I'd worry that the Limits removal would cause k8s not to be able to schedule the workload appropriately even if they had enough resources on paper. Remember, the idea of k8s is to scale atomically and horizontally while ensuring availability. If you're making something vertically scale, you'd likely want to re-evaluate that workload.

oso2k··on Implement an emulator for a fantasy CPU in JavaScript
`JL` and other conditional jumps/branches are a common type of instruction [0][1][2].

Depending on the ISA [3][4][5], there can be jumps, branches, and subroutine transfers (or even a subset of those). Some can be based (conditional) on what value is in a primary register (often traditionally called the accumulator), a condition/flag/status register, a memory location, and even well known constants (0, 1, -1). Many ISAs have ways branching to a function/subroutine/procedure that can include adjusting a calling stack or transferring control to an OS kernel. x86 is notable in that you can cause a branch or jump without calling a branch or jump instruction.

[0] https://www.tutorialspoint.com/assembly_programming/assembly...

[1] https://thinkingeek.com/2013/01/19/arm-assembler-raspberry-p...

[2] https://www.ibm.com/developerworks/library/l-powasm3/index.h...

[3] https://en.wikipedia.org/wiki/Instruction_set_architecture

[4] https://en.wikipedia.org/wiki/Branch_(computer_science)

[5] https://en.wikipedia.org/wiki/Subroutine

oso2k··on Where do argc and argv come from?
This is the C Standard specifying its VM to match the assumptions of a *nix environment. `main` isn't so special, IMO. Conformance to the C Standard is always optional, see C++, golang, Rust. However, conformance to ABI is less optional.
oso2k··on Where do argc and argv come from?
Not true. The kernel & shell makes the values available on the stack and the runtime can choose to link to them or not. The ABI also details how and where the values should be placed.
oso2k··on Where do argc and argv come from?
Locating argc, argv, and envp on the stack is done by the runtime [0].

[0] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start...

oso2k··on Build an arcade machine at home
I just got some wood cut for another project last night. They're usually pretty good about accuracy, in my experience. I think it all depends on the HD or Lowes employee you get. But I was very happy with the 48" and 66" cuts the gentleman I worked with last night made. Choosing between minimum wage or my novice, unpracticed hands, I think I'll take their hands when I can. As fun as it is to cut wood. :D
oso2k··on Text-Only Websites
I miss things like Slashdot Ultramode. That was from the times before RSS and other syndication methods.
oso2k··on A look at the die of the 8086 processor
Usually it's one or more of several common factors: cost to make, cost to buy, cost to integrate, slower/inefficient performance, loss of compatibility, some unintended design defect, poor or over-ambitious marketing, or some assumption that compatible/optimized/"unobtanium"/Carnot-efficient software will solve Issue X for us. See Itanium, DEC Alpha, Transmeta, Consumer Power/PowerPC, OS/2, Commodore, PCjr, ETX motherboard standard, Java Processors, etc.
oso2k··on Containers from first principles
That's not what I remember. Wikipedia backs up that recollection as well [0], marking systemd's initial release in 2010. Docker's initial release is listed as 2013 [1]. Maybe that was true of the dotCloud internal releases, and certainly, not all of the EL and other Linux distros had not adopted systemd during 2010 - 2013. Certainly after 2014 or 2015, systemd had spread to the major Linux distros so Docker could have chosen to take a systemd-based approach at that point.

[0] https://en.wikipedia.org/wiki/Systemd

[1] https://en.wikipedia.org/wiki/Docker_(software)

← PreviousPage 8 of 19Next →