What would be the bast way to get parsing and validation of parameters (option:value)

2023-01-10 Thread void09
Need to parse and validate user supplied parameters for video encoders, in the form of "\--option1:value --option2 --option3:value", which are unique for each encoder we have defined. option fields must be in a set of predefined such fields, while values have to be in a certain range for integer

Trying to make a lexer, stops if it hits an operator.

2023-01-10 Thread georgelemon
Why ignore whitespaces/newlines ? You need this kind of info. What you want is to skip tokenizing the char itself but at the same time will store whitespace and line number in a tuple, for each `getToken` call TokenTuple* = tuple[kind: TokenKind, value: string, wsno, line, column: i

OpenSSL/DTLS Support in Nim

2023-01-10 Thread Metaltron
@federico3 Ah, that's a shame, but understandable. Thanks for the links! The TFTP protocol provides a basic retransmission scheme. I believe the authors chose UDP because it was the simplest available, though it's not a requirement. I could switch to TCP, but I'm enjoying figuring this all out

strutils: mapIt: empty seq gives index error

2023-01-10 Thread freeflow
Yes, its an issue with min. My apologies for time wasting. I just refer you to the last line of my op.

Workaround if you are curious about “couldn’t render historic post”

2023-01-10 Thread pietroppeter
> Nice, bookmarked. Let's hope this one doesn't turn into “couldn’t render > historic post” my hope is that your bookmark (and this post) would be soon obsolete :)

strutils: mapIt: empty seq gives index error

2023-01-10 Thread freeflow
Thanks for the feedback. my comment came from this if myNewTracks.len > 0: var myTrackMin: int = myNewTracks.mapIt(it.len).min - 1 if myTrackMin < myMin: myMin = myTrackMin Run where myNewTracks is a seq[seq[Coord]]

Workaround if you are curious about “couldn’t render historic post”

2023-01-10 Thread pietroppeter
had to check what [ib4](https://www.urbandictionary.com/define.php?term=ib4) means... so, I will ask something different. who has the power right now to deploy a new version of the forum? It seems that is the main point of friction currently. I can see @ringabout has now the power to merge, whic

Ttop - System monitoring service tool with tui and historical data

2023-01-10 Thread nasl
I see graphs, historical data, and I wonder if you're considering to extend the utility to monitor sensors data. When I was trying to underclock my Alder Lake CPU I found very few Linux utilities (s-tui) that track thread/core temp/utilization/throttling, especially for processors with >20 threa

OpenSSL/DTLS Support in Nim

2023-01-10 Thread mratsim
That's not enough, the client and server need to negotiate the secret key to be able to use encryption (or better AEAD, authenticated encryption). In libsodium that's in the key exchange session: Note that creating protocols like this is the dangerous p

OpenSSL/DTLS Support in Nim

2023-01-10 Thread federico3
You can implement encryption using but doing file transfer over UDP would require implementing retransmission and ideally also congestion control.

Workaround if you are curious about “couldn’t render historic post”

2023-01-10 Thread carterza
ib4 someone says PRs welcome or something along the lines of "I like the forums, they are fine."

strutils: mapIt: empty seq gives index error

2023-01-10 Thread jrfondren
Passing an empty seq to mapIt works with devel and 1.6.10: import std/sequtils let nums: seq[int] = @[] strings = nums.mapIt($it) echo strings Run

strutils: mapIt: empty seq gives index error

2023-01-10 Thread freeflow
I'm seeing this error when I pass an empty seq to mapIt C:\Users\slayc\.choosenim\toolchains\nim-#devel\lib\system\fatal.nim(54) sysFatal Error: unhandled exception: index out of bounds, the container is empty [IndexDefect] Error: execution of an external program failed: 'c

Ttop - System monitoring service tool with tui and historical data

2023-01-10 Thread inv2004
Crontab support was added

Trying to make a lexer, stops if it hits an operator.

2023-01-10 Thread axyz
Hi, I have a quick question about `BaseLexer` `open` method in `std/lexbase`, that given your experience on the topic you may have an answer for. It seems that the lexer is optimized for line based parsing? What is the best idiomatic way to parse a language that can ignore new lines? Currently f

Workaround if you are curious about “couldn’t render historic post”

2023-01-10 Thread Clonk
When I see post like this I can't help but go back to @dom96's comment and laugh : > The forum is a great showcase of what Nim can do and allows us to dogfood > which makes Nim better for everyone. In 2023, if you want to see post history on forum you need to manually download rst file. What a