Posts

This profile is from a federated server and may be incomplete. Browse more on the original instance.

tommythorn, to random
@tommythorn@chaos.social avatar

I want an @ActionRetro -like video channel but using . Not sure if there is an audience for it, but it would be amazing and should allow for some pretty old hardware to run modern software.

tommythorn, to verilog
@tommythorn@chaos.social avatar

Ok, Google couldn't help, so suggestions solicitated!

I use both Icarus Verilog and Verilator for simulation and initialize my rams with

$readmemh(`INIT_MEM, code);

The drawback of this is that the produced simulation binary is tied to the

-DINIT_MEM=prog.hex

value used at compilation time. I would like to reuse the simulation binary on multiple workloads. Is there a way that works for both Icarus and Verilator?

tommythorn, to Electronics
@tommythorn@chaos.social avatar

Any recommendation for good small/tiny multimeters/oscilloscopes? I want something I can just keep in my bag always. Bonus points for data connections a la Wifi/BLE/USB (iPhone even).

Using iPhone for display/UI would be ok, but I didn't find much that looked great.

Kindly boost for reach.

mwfc,
@mwfc@chaos.social avatar

@tommythorn
I have a owon dmn with btle.
Else check https://sigrok.org/wiki/Supported_hardware
I would guess the list is nice.

tommythorn, to random
@tommythorn@chaos.social avatar

In the confusing mess that is the "Milk-V" I had missed that SiFive's P670 is finally set to ship in a generally available product (https://www.phoronix.com/news/Milk-V-Oasis + https://www.phoronix.com/news/SG2380-RISC-V-SoC-Upgrade).

That's probably the most feature-rich core wrt. to all the RISC-V extensions. It's RVA22 + crypto. That includes a humble 128-bit vector, bit manipulation, cache ops, ...)

SPEC2k6Int of ~12. Not a speed demon, but looks to be faster (ST) than any other GENERALLY available silicon.

tommythorn, to retrocomputing
@tommythorn@chaos.social avatar

TIL that the Macintosh turns 40 January 24th (https://computerhistory.org/exhibits/hello-the-mac-at-40), seems worthy of a celebration.


tommythorn, to rust
@tommythorn@chaos.social avatar

I love but there is much awkwardness in having to cast between usize, u64 and u32 constantly.

Spot checking other crates it doesn't seem like I'm "holding it wrong", it's pervasive.

argv_minus_one,
@argv_minus_one@mstdn.party avatar

@tommythorn

In other languages, those casts happen implicitly, and tend to cause silent data loss, overflow, and so on.

Rust's verbosity can be bothersome, but the alternative is much worse.

tommythorn, to retrocomputing
@tommythorn@chaos.social avatar

There is (or should be) a humongous overlap between the / community and the crowd. The latter is about making designs that operate inside constraints not too dissimilar to what early computers had to endure. No caches here. Even the register file is a tight fit. However, plenty of room for creativity!

tommythorn, to python
@tommythorn@chaos.social avatar

is !@#$; I have to use a script (for work) that someone else wrote. His Python is 3.6, mine 3.10. Result: endless chain of brokenness. I wish everybody would just stop using this garbage.

tommythorn,
@tommythorn@chaos.social avatar

@nedbat Thanks. I solved it, somehow a dependency of a dependency was pulled in that was broken on 3.10 (Sequence moved). A local, fixed version worked in this case. It doesn't change my point though.

nedbat,
@nedbat@hachyderm.io avatar

@tommythorn I didn't realize Sequence has moved? Both imports work for me on both versions:
>>> from typing import Sequence
>>> from collections.abc import Sequence

tommythorn, to rust
@tommythorn@chaos.social avatar

It's not really the compilation speed that is the problem, it's the sheer bloat of [most] applications:

$ cargo install nu
...
Finished release [optimized] target(s) in 34m 17s

on a stock 8 GiB Raspberry Pi4B

That's ridiculous. It's pulling in more than 150 crates. Nu isn't even the worst example, but one I just ran into.

kornel,
@kornel@mastodon.social avatar

@manpacket @mo8it @tommythorn There is bloat in there, but I think not as terrible as it seems from the plain number of deps.

  1. Rust uses tiny single-purpose crates. So it looks like a lot of deps, but that's often one project as 5-10 components instead of one big lib. Cutting a pizza into more slices doesn't make the pizza bigger. Some crates add almost no code.

  2. It links more stuff statically, using little of libc and POSIX (glibc is 30MB+ of code that C gets for "free").

kornel,
@kornel@mastodon.social avatar

@manpacket @mo8it @tommythorn 3. It has Unicode, portability layer including native Windows, plugins, sqlite, cryptography, networking with TLS. It does lots of things that bash doesn't. It's not an inherent language bloat. It's the project choosing to have featuritis. The size is not entirely unreasonable for the amount of features in it.

tommythorn, to VHDL
@tommythorn@chaos.social avatar

I saw my board has a 4-bit 75 ohm composite video out (on the mini Jack) and was curious, so I walked the pattern. Seems an odd discontinuity going from 7 to 8.

jaseg,
@jaseg@chaos.social avatar

@tommythorn This looks like a few tens of mV of offset affecting all non-negative values to me. I can imagine that being caused by input offset in an amplifier, or by a mismatch in one of the MSB resistors if this is a resisor ladder DAC.

tommythorn,
@tommythorn@chaos.social avatar

@jaseg The resistor values are [in theory] 1100, 549, 270, and 130 ohm respectively, not including the 10 ohm contribution for each from the IO. By my calculations, that should have been a fine ramp, so I'm chalking it up to low accuracy resistors.

ADD: your comment suggests that you think it's centered around 0. It's not. It's 0 -> 3.2 V.

tommythorn, to rust
@tommythorn@chaos.social avatar

I don't the right way to inspect code generated by the compiler, but I had most success with exporting interesting functions in a FFI wrapper:

#[no_mangle]  
pub extern "C" fn interesting(s: &mut MyStruct) {  
 s.interesting();  
}  

compiling and inspecting with

rustc -O --crate-type lib src/lib.rs && objdump -d liblib.rlib  

I learned a few things:

  1. asserts are still enabled in optimized builds (oops)
  2. rustc mostly generates good code
    \
ilmai,
@ilmai@hachyderm.io avatar

@tommythorn 1 is by design, there’s debug_assert separately

tommythorn,
@tommythorn@chaos.social avatar

@ilmai Yep, I found out and learned something new.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • tacticalgear
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines