Hello Javascript!

2022-10-15 Thread Araq
Yeah I'm a monster because I think that there are already enough incentives for saving energy. It costs money. No absurd exaggerations about the earth's immediate doom are required. No need for Sith rhetoric. And I still have no responsibility whatsoever to do anything about these 500 bytes

Hello Javascript!

2022-10-15 Thread austinjp
Thanks @Araq for pointing out to the world who and what you are :)

From too many copies to too few

2022-10-15 Thread dlesnoff

State machines example : echo-server

2022-10-15 Thread dee0xeed
> But what about Rust, Odin, Crystal, Val, C++, Carbon, Swift, Go, Julia? It was a joke, wasn't it?

How do I turn binary file data into hex representation

2022-10-15 Thread Zoom
Getting a byte from the file is just reading it. There's a bunch of ways to do it, most of them involve some type of `read` proc. func genByteToCharLUT(): array[byte, array[2, char]] = const HexChars = "0123456789ABCDEF" for i in 0.byte .. 255: result[i] =

Hello Javascript!

2022-10-15 Thread Araq
"People are already scared so I cannot possibly do scare-mongering" is a very poor argument. And of course you only reply selectively, so let me repeat: **There is no such responsibility.** Now get lost and glue yourself to some artwork.

Hello Javascript!

2022-10-15 Thread austinjp
> There is no such responsibility [...] This is not the place to spread your > scaremongering. I'm not scaring anyone, [the majority of people are already worried about climate

State machines example : echo-server

2022-10-15 Thread Araq
But what about Rust, Odin, Crystal, Val, C++, Carbon, Swift, Go?

State machines example : echo-server

2022-10-15 Thread dee0xeed
> if you want feedback on your code you're probably better off sharing it as a > GitHub repository Sorry for long delay, [now it's on github](https://github.com/dee0xeed/edsm-in-nim-demo). See also implementations in [C](https://github.com/dee0xeed/edsm-in-c-demo),

How do I turn binary file data into hex representation

2022-10-15 Thread exelotl
You'll have to show us an example (code, input, output, screenshots) as it's not entirely clear what you're asking.

How do I turn binary file data into hex representation

2022-10-15 Thread Nlits
How do i get the byte from the file? That was my main problem. The original binary string was messed up.

How do I turn binary file data into hex representation

2022-10-15 Thread auxym
There is toHex in strutils: You'll have to chunk the resulting string into 2-character strings yourself though, which you can do with eg countUp.

How do I turn binary file data into hex representation

2022-10-15 Thread Zoom
It's all there in [strformat](https://nim-lang.org/docs/strformat.html), if you can get through the docs. import std/strformat let foo = 3735928559 echo fmt("{foo:X}") stdout.write('[') for i, n in [42,52,91]: if i > 0: stdout.write(',')