HNHacker News
TopNewBestAskShowJobs

barchar

140 karma · joined March 12, 2014

submissionscomments
barchar··on The 'white-collar bloodbath' is all part of the AI hype machine
It's been able to sustain 90s era revenue growth rates, not 90s era income growth rates no?
barchar··on The ‘white-collar bloodbath’ is all part of the AI hype machine
It's not really enough to predict the outcome, you need something concrete to actually bet on, and you need to time things right (particularly for the pessimistic bet).

For any bet that involves purchasing bits of profits you you could be right and lose money because because the government generally won't allow the entire economy to implode.

By the time a bubble pops literally everyone knows they're in a bubble, knowing something is a bubble doesn't make it irrational to jump on the bandwagon.

barchar··on There was a time when the US government built homes for working-class Americans
Yeah, I unironically think buying a house as a primary residence should require being an accredited investor.

Probably among the least popular political ideas I can think up, though.

barchar··on Writing a Self-Mutating x86_64 C Program (2013)
It sometimes can, but you then have to balance the time spent optimizing against the time spent actually doing whatever you were optimizing.

Also on modern chips you must wait quite a number of cycles before executing modified code or endure a catastrophic performance hit. This is ok for loops and stuff, but makes a lot of the really clever stuff pointless.

The debuggers software breakpoints _are_ self-modifying code :)

barchar··on Moody’s strips U.S. of triple-A credit rating
The US can only default on its debts in some kind of fit of self-destruction (by choice). Any amount of debt is "sustainable".

I'm not even sure why moody's bothers.

barchar··on Microsoft didn't sandbox Windows Defender, so I did (2017)
If you use windows server you can just type `Uninstall-WindowsFeature WindowsDefender` (or similar, that might be the wrong feature name). If you use client windows there are two options, first you can disable "anti-tamper" and then disable the defender services with the TrustedInstaller token, this takes a few tries and often does not work on modern versions of windows or while defender is running (you can do it by editing the registry from safe-mode or linux).

Another option is to enable "Smart App Control" this will permanently disable defender but you will only be able to run signed executables, and to turn it on you must have never run any unsigned executables in the past (or reformat your hard drive).

There's an app called DefenderControl that will disable it, as well, using various methods.

You can also install some other anti-virus software, but you can't make your own -- they need to be signed with a special key.

A fun bit of trivia: defender doesn't turn itself on until after the "out of box experience" is finished, under the rationale that users can't install any malware until they can use the computer. Thus you can run defender disabling scripts/programs from a customized installer without them getting nuked by defender.

barchar··on Are modules without imports “considered harmful”?
reminds me of the venerable "makeheaders" tool, which works very well, however the tooling issues are very real.
barchar··on Keyboard lets people type so fast it’s banned from typing competitions
> In the end, steno itself is probably not a lot harder to learn than QWERTY (although I think more frustrating because the "hunt and peck" option for steno is less intuitive and often slower). But it requires sort of a "supporting ecosystem" of skills and tools that is more complex and not amenable to use cases other than natural language. That makes it much less attractive for general use.

100% agree, also it may be harder because in the US we still don't teach kids how to fucking read correctly. It's still common to have elementary school curricula that do not teach how letters are related to phonemes _at all_.

barchar··on You can't copy code with memcpy
I mean sure. If you can do this you can debug the process (how do you think debuggers are implemented?) and ofc once you're debugging a process you can introduce bugs and cause random havoc.

Linux can do this too with ptrace. And mac has something similar I'm sure, you gotta be able to debug.

Now, the target process can implement countermeasures against you, that's what anti-debug is, but it's impossible in the general case to defend yourself against a debugger with the same privilege level as you. (it is an arms race though, so sometimes it's easiest to resort to kernel-mode anti-anti-debug techniques even against pure user-mode anti-debug. If you do that you need to disable KPP, and you can't disable KPP in the supported way because the supported way is to attach a kernel debugger to the kernel, which will make it obvious that someone is debugging!)

barchar··on You can't copy code with memcpy
It's extremely likely for stuff from Kernel32.dll.

> That's not true. You're not considering different virtual addresses backed by the same pages.

technically I suppose, but PEs don't tend to be relocatable, so if it mapped it in at different virtual addresses that would be extremely unlikely to be backed by the same pages as much of the just-mapped-in code would need relocs

barchar··on You can't copy code with memcpy
there's also unfork(2)!

Do you unfork then unexec or unexec then unfork?

barchar··on PortableGL: An implementation of OpenGL 3.x-ish in clean C
Apple's OpenGL implementation has always been mediocre even when it was technically supported.
barchar··on A Comparison of Rust and Zig
have you looked at ParaSail. It's designed by the guy who led the Ada 9x ('95) design team and it's unique in being pointer free (not just like in ada or Fortran where pointers are discouraged, but the language literally does not have them). Instead of pointers it has grow-able types based on memory tagging. It's specified such that each sub-expression can be safely executed in parallel.
barchar··on A Comparison of Rust and Zig
Macros get better as more people use them anyway, you build up a community knowledge of what the hell they generate. It turns out that unhygenic macros are really rather useful, if a bit dangerous.
barchar··on A Comparison of Rust and Zig
I'm definitely a massive fan of some of zig's ideas

I like how flexible structs are, and the inclusion of structural subtyping for them. I do wish C's unnamed fields made an appearance, however.

The way type constructors work is also really great. It's just "yeah it's literally a constructor that returns a type, like the same syntax and everything"

I'm a little concerned about how long zig is willing to defer semantic analysis and possible difficulties with symbol binding in generic code (the binding rules end up being closer to C macros than C++ templates I think). But, the language doesn't have overloading, which makes the symbol binding problems much, much, much less severe.

It has a lot of the same qualities that make me like C. It can represent the data structures I want to write and the code I want the compiler to generate, it makes using it's escape hatches ergonomic, and it's obvious what's going on, especially to unfamiliar folks looking at zig code in a debugger. Also embedding a full C compiler into the zig compiler is absolutely the correct way to do FFI. C++ level compatibility with C without all the baggage (it's kinda amazing how annoying C's conversion rules are once you add overloading and templates tbh).

It really is _staggering_ how long the compiler will defer actually doing sema and generating real code though, so we'll see.

barchar··on MSVC's implementation of the C++ Standard Library
yep! Clang-cl uses this library btw (I think it's possible to get libc++ sorta working on windows, but it's not something that's officially supported).
barchar··on Consider the Nimrod Programming Language
Go is pretty much competing with java and not C, C++, FORTRAN, and Ada. Nimrod is up there with the best of them. Go is also somewhat designed around reducing build times, nimrod is not. However C and C++ (esp C++) pretty much manage to be designed around increasing build times, so Nimrod is much faster to compile than they are.
barchar··on Consider the Nimrod Programming Language
RAII is sorta by definition immediate. They are freed right when they exit scope, this can be annoying for large tree structures.

Yeah the GC not being thread safe can be annoying. CSP works OK and if you need more performance a thread safe GC may not be fast enough anyway. If rust can pull off ownership tracking between threads in an easy-to-use way then I would be super excited.

barchar··on Consider the Nimrod Programming Language
well yes. This is true. But nimrod has (very fast) GC. And it also has destructors and RAII so if you really, really need unique_ptr style memory management you can do that. Rust has lifetime tracking but I would be interested to know how it performs against Nimrod's GC when the ownership gets really tricky.
barchar··on Consider the Nimrod Programming Language
Nimrod is indeed pretty similar to D, although I think it is a bit more uniform because of the way the object model works. Also "death to mustache braces"
barchar··on Consider the Nimrod Programming Language
Nimrod's syntax is quite similar to scala (and Pascal!). Haskell can be really fast but fast Haskell and easy/safe Haskell tend not to overlap as much as one would like
barchar··on Consider the Nimrod Programming Language
I like nimrod because it has a sane syntax. I can write a function declaration in one line of nimrod that would be 6 lines of c++. I also like Nimrod's focus on static dispatch and easy to use generics.

Rust makes me uneasy because the whole lifetime tracking adds a lot of complexity and I fear it may make some programs harder to write or some libraries harder to use. Also I think that garbage collection, if fast (which nimrod's is very much so) is the right way to go in some situations. I don't actually want to go and spend time freeing a bunch of strings right after I use them.

← PreviousPage 5 of 5