Skip to main content



electronics question

I'd try this out on a breadboard, but I don't currently have the necessary parts so I'll just ask instead.

What happens on a 555 timer if you simultaneously drive the trigger low and the threshold high? Is this an error state that could vary from chip to chip?

πš›πšŠπš reshared this.

in reply to Jonathan Lamothe

electronics question
My guess is that the output would be driven low, but that the drain would remain in a high-impedence state (as I'd expect both the Q and ~Q outputs of the SR latch to be driven low.
in reply to Jonathan Lamothe

electronics question

Sensitive content

in reply to Matthew Skala

electronics question

Sensitive content

in reply to Matthew Skala

electronics question
@Matthew Skala Fun fact: I was staring at that exact data sheet and didn't see that. I've no plans to do this. I was just curious. Thanks for pointing it out though.


Woo! Got my clock module down to two chips total (plus resistors, capacitors, and such).

Really basic stuff, but I'm still learning #KiCad.

reshared this

in reply to Jonathan Lamothe

Just realized the the current design won't honour the halt signal when it's in manual pulse mode... πŸ™
in reply to Jonathan Lamothe

Aha! A hacky solution, but I can fix it by wiring the switch that sends the manual clock pulse to ~HLT instead of +5V. No additional logic gates required.


Decided to look into Nostr since everyone here seems to hate it (so I can figure out why).

From their website, they tout that it's "censorship-resistant"* while also complaining that traditional social media is overrun by bots and spam.

How does one go about solving the bot/spam problem without resorting to censorship? This feels rather mutually exclusive to me.

* frequently a fascist dog whistle

in reply to Jonathan Lamothe

coincidently heard about nostr for the first time today and the context was "noted fascist network nostr" or words to that effect
in reply to Jonathan Lamothe

I haven't bothered to check it out yet. I quite like Scuttlebutt, which Nostr is somewhat based on, but Nostr lacks the features that make Scuttlebutt actually nice to use.


So, last I checked you could still buy PCB mountable sockets for them, bit does anyone know if anyone's still manufacturing NES-compatible controllers?
in reply to Jonathan Lamothe

retrobit still sells an nes compatible controller, kind of a clone of the nes advantage.
8bitdo makes bluetooth receivers that plug into an nes controller port, been thinking about getting one of those.
And there are plenty of no name 3rd party nes controllers on websites like aliexpress
in reply to Jonathan Lamothe

Sure looks like it. A quick search comes up with cheap clones, as well as "new" designs like Hyperkin Cadet.


Say what you will about modern #AI chatbots, but we've given them the ability to suffer from Dunning-Kruger. That's something... right?
#AI



Here's the funny thing about propaganda:

It gets started by someone (or a group of someones) with an agenda, but when it's effective, it gets swallowed and spread by well-meaning individuals who simply don't know any better. When this happens, it becomes even more effective, making it a vicious cycle.

Not everyone who spreads it is doing so for nefarious reasons (though many are).



mh: ADHD

...and I've officially let myself run out of my ADHD meds.

Shit.



How did I ever live before terminal multiplexing? Decided to work out on the balcony this morning, and then when the weather changed, was able to just hand off my various SSH sessions from my tablet to my laptop.
in reply to Jonathan Lamothe

Which multiplexer do you use? I've been wanting to get better with that. I've played around with screen and tmux a bit, but need to get more fluent with the commands/shortcuts.
in reply to Hrrmmph

@Spacegoat I used screen for many years. I somewhat recently switched to tmux. Both are solid options, though tmux seems more popular.


Why am I suddenly getting fundraising emails purporting to be from JoeBiden.com?



Still having some stability issues. I've tweaked some settings on the database to try to alleviate the congestion.



electronics ramblings, profanity

Well shit.

I got the parts I ordered from DigiKey. I didn't realize how small they were. I've soldered SMT parts before, but I don't know if I have a steady enough hand to do these ones by hand. πŸ™

Good thing I only ordered a few.




shower thought (dark)
What if the reason we've never seen a time traveler isn't because it's impossible, but because humanity is going to wipe itself out before anyone figures out how?
in reply to Jonathan Lamothe

shower thought (less light alternative)

Sensitive content



electronics hobby ramblings

So, I was bemoaning the fact that finding chips in a DIP format is getting harder and harder because everything's moving to SMT. I don't hate SMT chips, but they make it rather difficult to play with them on a breadboard before using them in a project.

It just occurred to me that if I'm going to the trouble of designing a PCB in the first place, nothing stops me from sticking a single chip on a PCB with a bunch of pin headers to turn it into a quick and dirty "DIP chip" for experimenting with on a breadboard. I can even do this with a bunch of different chips on a single PCB that breaks out into multiple different units.

I'm sure I'm not the first person to have thought of this, but it was definitely an "aha" moment for me.



I love it when the photo of a component and the schematic drawing on the data sheet disagree with each other.

(e.g.: digikey.ca/en/products/detail/…)

Guess I'll have to wait 'till I have the physical component in my possession to find out for sure.



It's been a while, but I just put a DigiKey order through. Gonna build a thing!


For all the filtering options that DigiKey has on their web site, I wish you could filter based on minimum order quantity.

No, I do not want to buy 3000 voltage regulators.



bear/man
So, I mentioned the whole bear/man debate to Katy, and she gave a perspective I hadn't even thought to consider. Sharing (paraphrased) with her permission:
When a bear attacks you, you generally die and then it's over. When a man attacks, you live with that trauma for life.


The great thing about being an adult is that if you want to have candy for dinner, nobody is going to stop you.

The terrible thing about being an adult is that if you want to have candy for dinner, nobody is going to stop you.



Is anyone else running the community edition of #Nextcloud getting a notification in the Android app that their server is at "end of life" and to upgrade despite being on the latest version? Are they killing off the community edition or something?

πš›πšŠπš reshared this.

in reply to Jonathan Lamothe

Yes, Just checked. I am. I'm running a #self-hosted #nextcloud instance, version 25.0.10. I've been scared of update since I saw an issue a month or so ago with a bug that scared me (can't recall details sorry!)

Edit... just re-read this...I'm not latest version!

This entry was edited (6 months ago)
in reply to Tom

@Tom I always do a backup immediately before an update in the event that something goes sideways. So far, I've never had to roll back, but it's a good thing to do regardless.
@Tom
in reply to Jonathan Lamothe

Yep, however the frequency of upgrades does also scare me. Move fast and break stuff! I must upgrade...v29...but four versions to hop!
in reply to Jonathan Lamothe

No, this shouldn't happen. What Nextcloud version do you use? Sometimes, if dependencies like the min. PHP version changes, the server doesn't show the update if the dependencies are not met. In such a situation it might look like you are on the latest version, while you are not.
in reply to Bjârn Schießle

Here you can find the latest versions and compare it to your version: github.com/nextcloud/server/wi…
in reply to Jonathan Lamothe

As said, one explanation would be that you run PHP 7.4 which was deprecated in Nextxloud 25 and is no longer supported in Nextxloud 26. In this case you are on "the latest version for your system" but not on the latest in general
in reply to Bjârn Schießle

@Bjârn Schießle I think I figured out my problem. I'm running an older version of PHP that is no longer supported by later versions.

Edit: It irks me that it didn't warn me about this before now though.



More Rust stuff

Something that's been bothering me about lifetimes.

When I got to this section in the book, I couldn't (and still can't) understand why it's necessary to specify lifetimes for the references a struct holds. I mean, if I have:

struct Foo<'a> {
    bar: &'a String,
}

Shouldn't it just be assumed that the data referenced by Foo::bar should have to live at least as long as the Foo object itself? Why does this have to be explicitly stated? Is there some scenario where you would want this to not be the case?

Edit: formatting fix

in reply to Jonathan Lamothe

Lifetime elision only applies on function signatures. It might be because no one has done the work? Though I think it's nice to be explicit that the struct holds a reference to something.

Explicit lifetimes would be necessary for a struct with multiple references (or I guess a rule that says they're either all the same or all unique). These are not the same:

struct Foo<'a> {
  bar: &'a String,
  baz: &'a String,
}
struct Foo<'a, 'b> {
  bar: &'a String,
  baz: &'b String,
}

More info on the elision rules is at the Rustonomicon.
in reply to Ryan Frame

@Ryan Frame This makes sense. One would think however that they could infer it if there's only one reference in the struct the say way you don't have to specify a lifetime for methods that only have a &self and return a reference.


TikTok ban
The problem isn't just TikTok. All corporate-owned social media spies on you. That's why you shouldn't use any of it. Full stop.
in reply to Jonathan Lamothe

So you'd put up with the sound of crickets to spite them all. Good luck with that.

I need to know what is going on. I don't have cable tv (a real corporate problem) and my "social media" include my local weather info (via Youtube) as does a lot of my news sources etc.

And ALL my interests are in things that no longer have magazines or newspapers exclusive to them, instead them have Podcasts, Youtube Channels, etc. Same with most of the folks I communicate with in my life (since I lost so many friends and relatives to the Pandemic).

It's not the 1990s anymore.

in reply to Joseph Teller

@Joseph Teller That's not really likely to happen though, is it? At least not in the near future. Besides, if everyone jumped ship, there would be no content there to miss out on to begin with.

My original point though was that singling out TikTok as the only problem is rather silly.



Why does my HDMI TV overscan? This made sense in the CRT days, but I can't see any reason for it with HDMI.


Reading up on NES ROM programming.

For some reason, memory addresses 0x0000-0x07ff are mirrored three times (for a total of four identical regions of memory). In a system with such a small amount of addressable memory, why would anyone do that??


in reply to Jonathan Lamothe

The largest embedded assembly projects I wrote used about 20 bytes of stack at most. But I didn't use C or recursive functions, which would been an exponentially larger stack crasher
in reply to Jonathan Lamothe

@Jonathan Lamothe Depending on the specific system, complex asynchronous code via timer interrupts (or raster interrupts, or I/O interrupts) is possible, but only one "thread" should use the stack.

For example, by default the Commodore 64 has a timer interrupt to trigger code to handle keyboard scanning, blinking the cursor, and other stuff. It's a non-trivial amount of code, but it does not mess with the stack.



mh: ADHD

God damned #ADHD brain.

I either get super hyper-focused on one project, to the detriment of other things (like eating and sleeping) or I'm so scattered between twenty things that I don't get anything meaningful accomplished on any of them.

#ADHD


Only in Stardew Valley does eating a jar of mayonnaise make you healthier.


A thing that's been stuck in my brain for a while:

A couple weeks ago, @Cory Doctorow wrote this blog post about how AI shouldn't be used to write code (edit: among other things). I agree with his rationale, but I can't help but be reminded of a (perhaps apocryphal) story I once heard about a similar argument being made against compilers in the early days of computing. The same kinds of arguments could've been made back then.



Building a small personal project in #Rust to teach myself the language. As I was looking over my code, I noticed a mistake I'd made that technically worked, but was kind of silly so I fixed it.

This got me to wondering if Rust had a linter (it does) because surely I'd made other similar rookie mistakes. I found the linter and ran it on my project. It came back with one result that I already knew about: a value in a struct that doesn't get read because I haven't written that code yet. That was it.

I was surprised. It's still a very small project, but perhaps I'm a more competent developer than I give myself credit for.

#rust

reshared this

in reply to Jonathan Lamothe

Clippy by default only flags some correctness things. Turn on pedantic mode if you want to see more suggestions. !#[warn(clippy::pedantic)] at the top of your main.rs or lib.rs
in reply to Dylan :heart_nb:

@Dylan :heart_nb: As it turns out, doing this introduced me to a couple language features I wasn't aware of, so thanks again. πŸ™‚
in reply to Jonathan Lamothe

They add new lints with every new version of Rust, so it continues to help introduce me to newer features ☺️


Rust question

Does time::OffsetDateTime::now_local() always fail in a testing context or something? It keeps returning Err(IndeterminateOffset).
#rust

Edit: it's working fine when I use it in src/main.rs.

#rust

reshared this

Unknown parent

Jonathan Lamothe
@Jacob Pratt You are correct, though this behaviour is surprising to me. I am still very much a Rust newbie. Can you elaborate on what makes getting the local UtcOffset not threadsafe in such an environment?
Unknown parent

Jonathan Lamothe
@Jacob Pratt Good to know. In the meantime, I've worked around the issue by allowing a UtcOffset to be manually specified.


More musings on #Rust:

I wonder if it would be possible to write an #SNES #ROM in Rust. It seems like exactly the kind of resource-constrained system that would be a prime candidate for that sort of thing. Unfortunately, it seems that the SNES used a custom processor, so it's very possible that I won't be able to specify it as a compile target. A quick search reveals that many people have made SNES emulators in Rust, but at a glace, I see nothing about writing ROMS.

I believe the original NES used an off-the-shelf processor (6502 if memory serves?). Perhaps that's more likely to be supported, but that may be a little too resource constrained.

I shall have to dig deeper into this idea. I love the idea of building a custom ROM rather than just pirating something off the internet.

Has anyone done anything like this? Links to any relevant resources would be very much appreciated.

reshared this

in reply to Jonathan Lamothe

Looks like the SNES used a Ricoh 5A22, which apparently was based on the 6502? Perhaps this is possible after all... though I don't want to speak too soon.
in reply to Jonathan Lamothe

The SNES CPU is based on the WDC 65C816, which is indeed able to run 6502 code but it also has 16-bit mode instructions with much larger memory address space.

I think the only general purpose computer to use this CPU was the Apple IIGS, so maybe look around to see if there's any Rust port to Apple IIGS.

in reply to Jonathan Lamothe

this folks have ported llvm to MOS6502: llvm-mos.org/wiki/Welcome

You can try to link rustc to that fork and add a new rustc target.

It will be a very long journey, but it is possible.



When a security guard in a grocery store needs to have a bulletproof vest, we have failed as a society.


Newbie #Rust question time:

I wan to use the current_local_offset function from the time library, but I apparently need to import it into my project with the local-offset feature.

I assume I need to specify this in Cargo.toml but for the life of me, I can't figure out how. Can someone point me in the right direction?

#rust

reshared this

in reply to Jonathan Lamothe

You need to specify the `features` list next to the version in Cargo.toml:

doc.rust-lang.org/cargo/refere…

Alternatively, you can run

`cargo add -F FEATURE1,FEATURE2,…`

You can run `cargo add` even after you added a dependency.

in reply to Jonathan Lamothe

Have you tried something like the following?

time = { version = "0.3.36", features = ["local-offset"] }



Story time:

I've been holed up in the (home) office for most of the day (not uncommon). I happened to look out the window and noticed that our building was surrounded by cops.

Interesting.

Turns out they arrested one of the downstairs neighbours... for what, I don't know.

Here's the interesting bit though: apparently, the landlord offered them the key to the apartment, but they couldn't legally use it because there was no warrant. I guess that makes sense, but while they weren't allowed to to that, they apparently were allowed to enter the apartment by prying a window open or kicking the door in. In what world does that make any sense?

reshared this



People who don't like #Rust: why specifically don't you like it?

I'm in the process of learning it now. There are definitely some things about the language that I can see some as finding irritating (i.e.: the borrowing system). Personally though, I'd rather have a dozen complie-time errors than a single runtime error. This is the reason I tend to gravitate towards Haskell, for instance.

It's certainly not the right language for everything, but if you want better safety in code that needs to be highly efficient, it seems a reasonable alternative to C/C++.

#rust

reshared this

in reply to Jonathan Lamothe

the borrow checker is such a big part of the language it's not just slightly irritating, it's like having a non-consentual finger up the ass every time you open some Rust code in your editor

And the fact Rust is always staticallly linked and lacks any sort of reproducible builds don't help, even the compiler itself only compiles with an n-2 version of the compiler, if you skip updating the compiler for a while and want or have to keep using sources then have fun compiling every version since you last updated the compiler

Its type system is also like a borrow checker: non-consentual fist up the ass, want to add an u8 to an u32? Nope, can't, have to manually cast everything because that's why we do programming languages instead of writing Assembly, to do all the fucking busy work ourselves

Oh, and Cargo is its own can of rotten worms

in reply to Reid

@Reiddragon > And the fact Rust is always staticallly linked and lacks any sort of reproducible builds don't help

That is excusable in languages where source-only distribution is normal and expected. (Indeed, compilation should be a transparent caching step and artifacts of such shouldn't be commonly shared.)

That is not the case for Rust.

> even the compiler itself only compiles with an n-2 version of the compiler

That's also a problem, Rust's bootstrap story sucks.

Ada's might suck as much, I'm not sure, I have found a few interpreters when I last looked...

> I'd rather have a dozen complie-time errors than a single runtime error. This is the reason I tend to gravitate towards Haskell, for instance.

There should be no meaningful difference between runtime and dev-time for the majority of devs. Dead languages aren't necessary. And punchcard retrocompatibility can be preserved without prioritizing a development process that is optimized for that workflow.

As for typing static vs dynamic, there's a thing called "gradual typing", and it is very possible to tie the type-checker into a REPL.

@Reid
in reply to Jonathan Lamothe

I've got a few things with Rust that make me dislike it a bit -- note that that doesn't mean that I think it's generally a bad language. (They're all good langs, Brent.) But here we go:

Another single implementation standard-less language. No solid standard library, everything done by downloading the internet. Very un-Turbo-Pascal-ish compile times and memory usage. Annotations. BCPL-ish syntax with too much line noise (and hey, I used to program Perl). Tied a lot to the worst things in IT (browser engines, crypto). Fanatical community. Overly complex async to save me from writing threads. Both functional purists and micro-optimizers. The word "Rustaceans" alone.

It's not a language that I'd like to use recreationally, but I wouldn't quit jobs if I have to do more work with it at work.



transphobia
Saw a guy sporting a "NO ONE CARES ABOUT YOUR PRONOUNS" shirt. Does this constitute permission to deliberately misgender them? Asking for a friend.

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.

⇧