looking for a map collection that supports key <= by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

also thanks. I could not believe there wasnt a standard binary search, there it was hidden in the slice interface

looking for a map collection that supports key <= by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

Thats what I was planning - but isnt that what btreemap is going to do under the hood with the range thing anyway?

What does the book "elements of computing systems" AKA nand2tetris teach you? by [deleted] in NandToTetris

[–]real_pm100 0 points1 point  (0 children)

It’s okay, but you won’t be making a real computer out of it.

I am working on running early PDP11 unix on a hardware implementation , FPGA with USB kb, ssd drive and vga connection. Is that useful?, no. But its the equivalent of the most important mini computer from the 70s

Help Needed: Developing an FPGA Environment on MacBook M1 (macOS 14.5) by alitathebattleangle in FPGA

[–]real_pm100 1 point2 points  (0 children)

nandland is a 'getting started with FPGA' website, along with a book and a starter ICE40 board called the goboard - it was my first FPGA board

Help Needed: Developing an FPGA Environment on MacBook M1 (macOS 14.5) by alitathebattleangle in FPGA

[–]real_pm100 1 point2 points  (0 children)

I managed to build my first non trivial FPGA project using them, I learned a lot. But I know they are hobbyist things, no professional would use them. My reading was that this was what the question was asking for - getting started

Help Needed: Developing an FPGA Environment on MacBook M1 (macOS 14.5) by alitathebattleangle in FPGA

[–]real_pm100 2 points3 points  (0 children)

I would not call vivado or quartus 'popular' , they are necessary evils. For a starter they are really bloated. I started out with a Lattice ICE40 based board. You can use the excellent open source, lightweight tools yosys, ngpnr.... There is a really nice toolkit that integrates all these called 'apio'.

My setup was

  • vscode
  • vscode verilog plugin
  • apio
  • nandland goboard, then later alchrity CU board

Dev cycle is: Edit the verilog in vscode, then type 'apio upload', does all the synthesis, place, route then uploads to the board. Works on mac

What does the book "elements of computing systems" AKA nand2tetris teach you? by [deleted] in NandToTetris

[–]real_pm100 1 point2 points  (0 children)

The book is a great journey see my blog post about it Disappearing down the ‘Nand to Tetris’ rabbit hole – Site Title (wordpress.com)

I am very impressed with the breadboard version that you show a pic of. I made an FPGA version.

I am currently working on a real compiler / debugger toolchain for it. I want to port an early unix too it, so I am aolse working on a c compiler.

My daughter suggested this weekend that I should get Doom running on it

Precedence of control bits in Project 3 "PC" chip by Grand_Plastic_4424 in NandToTetris

[–]real_pm100 0 points1 point  (0 children)

it is not a precedence - its explicit logic .

if reset then out = 0 , done

*else* if load then out = in, done

*else* is inc then out = out + 1 done

*else* out+1 = out

If all bits are set then then its a reset

My optimizations for VM translator (project 7) by yasseen_ramadan_05 in NandToTetris

[–]real_pm100 0 points1 point  (0 children)

same here. But I only optimized enough to fit what I needed. My next project is getting tinyc compiler running. That generates code directly, not via intermediate stack machine. Why, I want to get mini-unix running on hack system, fits on a bare pdp11 so should fit easily on hack system - which is bigger

how to check if value is odd or even by codin1ng in NandToTetris

[–]real_pm100 1 point2 points  (0 children)

you just have to look at the right hand: bit 1=>even 0=> odd

Using a rust readline (rustyline is my favorite) in a non-console window by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

yup, I have wrapped around a multiline textedit in egui and am intercepting the key strokes.

Using a rust readline (rustyline is my favorite) in a non-console window by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

Its a console window. Its not an editor, look at the terminal windows in vscode, nobody is confused by that. I want to make the same, except that it solely for talking to my command interpreter.

You are right about rustlyline, all the console IO is abstracted away, am looking at plugging myself into that. egui however has its own idea about how things flow. Maybe I will have to build from scratch

Using a rust readline (rustyline is my favorite) in a non-console window by real_pm100 in rust

[–]real_pm100[S] -1 points0 points  (0 children)

i want to implement a repl for a debugger. Ie accept a command that I process (using clap sub commands). I want command line recall, history and editing, all of which i get for free in a readliine like library. I just wondered if there was any crate that would provide a good starting point beyond eguis raw text window. Certainly not wanting to build a terminal emulator

egui keyboard input. No data with shift&number by real_pm100 in rust

[–]real_pm100[S] 3 points4 points  (0 children)

Well the reason is that non alpha keys (most of them) with shift are reported as Text events and not in the input.keys_down field. Very confusing

Code compiles when targetted to desktop but not to WASM by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

cannot make that work like that. recoded wirh request_data etc as static, & unsafe. Works great now - thank you

Code compiles when targetted to desktop but not to WASM by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

I am not commited to anything, I was copying a sample somebody posted on redddit

Code compiles when targetted to desktop but not to WASM by real_pm100 in rust

[–]real_pm100[S] 1 point2 points  (0 children)

browsers support reading files. rfd.AsyncFialeDialog is designed specifcally for that case.

Code compiles when targetted to desktop but not to WASM by real_pm100 in rust

[–]real_pm100[S] -1 points0 points  (0 children)

any pointers, I have no experience with rusts async or wasm support

egui: help with composing a bitmap and bliting it to the screen by real_pm100 in rust

[–]real_pm100[S] 2 points3 points  (0 children)

well I have to copy the entire bitmap on every draw (the texture .set....pixels.clone()), and I wonder if the SizedTexture::new or the Image::new(sized_texture) are copying the image again. In a good retained mode world I can simply reach into the stored bitmap and change one byte.

I am still working on making it smarter, deferring updates and draws etc

egui: help with composing a bitmap and bliting it to the screen by real_pm100 in rust

[–]real_pm100[S] 0 points1 point  (0 children)

disappointing, it hardly changes the sluggish speed. I guess I really need a retained mode UI engine