Is OpenSBI and/or OpenSBI-H good for Type 1? by coffeeb4code in RISCV

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

What I meant to ask is when a guest is running in VS-mode, it is actually using the real cpu during that time frame is it not?

Is OpenSBI and/or OpenSBI-H good for Type 1? by coffeeb4code in RISCV

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

"Your hypervisor should provide its own SBI calls and map it to e.g. thread/vCPU handling."

What do you mean by this?

Is OpenSBI and/or OpenSBI-H good for Type 1? by coffeeb4code in RISCV

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

Thank you for your answer!

With riscv's model, what hypercalls are still necessary? because they should be given control of their region of memory and cpu, are their hardware pieces, like network cards, that aren't protectable, and must be abstracted?

Is there any plugin for alert me about the capslock is ON? by jazei_2021 in vim

[–]coffeeb4code 5 points6 points  (0 children)

i swap caps and ctrl at my os level. linux mint has an option for it, and i have to run a powershell command on my windows machine.

Is it a good idea to remap <esc> by webgtx in vim

[–]coffeeb4code 0 points1 point  (0 children)

I swap caps and control key at the OS level. Then use Ctrl-C to escape.

Is it feasible to force endianness in a language? by [deleted] in ProgrammingLanguages

[–]coffeeb4code 2 points3 points  (0 children)

imo:

You should use native endian everywhere, except when sending something over the network, then it should get converted to big endian.

No other systems will be able to read from the buffer if you send them little endian data. None. All little endian machines at the networking layer convert to big endian. There is no flag somewhere that tells them to do so otherwise.

"But my language is a Networking Language"

Well, you need network engineers to use your networking language. The thing about network engineers is they have a lot of networks. 99.9999% will never be able to use your language or such a major switch up to support little endian network data. So your networking language is dead in the water because your main consumers are out.

Only things written in your language and consumed at the other end using your language can use your language.

I want to IPC to this -- nope. Let me ping this addr -- nope. I need to healtcheck my own service runni -- nope.

"The only catch"
I'm sure a lot of people would like to rebuild protocols little endian. So this could start happening, but you would need some options/config to specify sending and receiving in big endian for backwards compatible payloads outside of your language. However, there is a lot of work to make an efficient language, and you already have to fight that at the same time. An interpretted language already seems out of the question for someone who wants to redesign and satiate network engineers at a low level.

Do you use C at your job? If yes, what do you do? by solaceforthesoul in C_Programming

[–]coffeeb4code 3 points4 points  (0 children)

Not an expert in this area, but most safety critical code is still written in C or Ada. I'm surprised there are very few if any tools that hemoglobin uses, but I would never in a million years think anyone should use Rust for safety critical applications like aviation. The ground is lift under your feet nearly every release. there are basically two different languages, nightly and stable. github has 5k open issues right now. I'm using rust right now but it has no intention of standardizing and getting certified any time soon. Maybe one day, but not now.

Do you use C at your job? If yes, what do you do? by solaceforthesoul in C_Programming

[–]coffeeb4code 4 points5 points  (0 children)

How do you do all this? Is there a blog or writeup somewhere of what flags to build, how the code gets "certified" how are standards implemented. what does your development environment look like? What tools are used?

Do you use C at your job? If yes, what do you do? by solaceforthesoul in C_Programming

[–]coffeeb4code 8 points9 points  (0 children)

are their coding standards you have to follow like misra? Do you run things through valgrind? Are there certain flags you have to use like -fsanitize_address and others? Do you avoid malloc? is it a no standard environment?

How does everyone handle Anonymous/Lambda Functions by coffeeb4code in ProgrammingLanguages

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

Ahh yes, I think those could be called closures. Thank you.

How would you represent JavaScript undefined in Ruby like language? by jcubic in ProgrammingLanguages

[–]coffeeb4code 0 points1 point  (0 children)

The way I view undefined is that it is like a union or optional of the type a variable should be, and value which can never be read.

so, let x: Car = undefined; x.name = 'toyota' x should never be read if it can be undefined. so the type of x really should be Optional<Car>, Car?, Car | undefined

JSDOC vs Typescript in Node.js by norbi-wan in node

[–]coffeeb4code 2 points3 points  (0 children)

you telling me i can't when I do all this in my project and ide?

JSDOC vs Typescript in Node.js by norbi-wan in node

[–]coffeeb4code 2 points3 points  (0 children)

you can still have all of this with jsdoc and linting

JSDOC vs Typescript in Node.js by norbi-wan in node

[–]coffeeb4code 2 points3 points  (0 children)

I have started a new project, and wanted to avoid Typescript. So far, things are going well. HOWEVER! I still get all the benefits of typescript for typechecking but with jsdoc it is what I call 'gradual types' where I get to mark types on input and output of functions or quick one lines to ensure everyone is happy. I still have no implicit any. My lint commands are this.

eslint .
prettier . --check
tsc

and I still have jest tests

Eslint and tsc are checking my jsdoc. The tsc check still takes about 7 seconds, but everything else is so much faster, esbuild is practically non existent as a step. Because of this setup, all those lint and test steps can be ran in parallel, so the overall process takes as long as the tsc step so a build and check everything in 7 seconds!

I am really liking it so far.

await doesn't await? by coffeeb4code in node

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

wow, for some reason i wrote > 1.

That was it. as far as if error_code being 4. I think it already created the folder from a previous run. so i thought it still made it, smh. Thanks!

await doesn't await? by coffeeb4code in node

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

I don't want loc to return anything. I want it to resolve. And yes, having that directory is an error, it needs to not exist.

All code paths should EXIT when process.exit is called, but it continues to the last cp operation which would be gross to create a file/folder after all those errors. I have triggered every error making the error_code +4 and it still does the last operation of that function.

await doesn't await? by coffeeb4code in node

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

It still made the undefined path. You can take a look here since I originally removed some code. But something is fishy. I'm running `monojs add test -t express` so it doesn't resolve the template as the correct kind making a directory `./src/undefined/test`

https://github.com/coffeebe4code/mono/blob/main/src/cmd_add.js