Why `except` doesn't catch `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`?

2021-08-18 Thread alexeypetrushin
> The `not nil` should catch this. In theory, in practice nobody using it. Also, in my case the exception happens inside a third-party library.

Nim online meetup - Friday July 23rd

2021-08-18 Thread juancarlospaco
When is the next one?, if every weeks was too much, make it monthly, but was a nice event. :)

Why `except` doesn't catch `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`?

2021-08-18 Thread juancarlospaco
The `not nil` should catch this.

Nim for UI Automation

2021-08-18 Thread Lecale
I'm stuck with windows. miere43's repo looks quite interesting, but perhaps not quite the fit for what I wanted. Will check more...

Why `except` doesn't catch `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`?

2021-08-18 Thread shirleyquirk
I don't think it should be on by default, but this works great import segfaults type O = ref object some: int var o: O try: echo o.some except: echo "failed" Run

newbie kick-in-the-pants: nim as a cgi application

2021-08-18 Thread martin
Cool! Thank you! I was successful in working with SQL already so I think I have all the necessary steps. Yay:)

newbie kick-in-the-pants: nim as a cgi application

2021-08-18 Thread ingo
The `for i in decodeData(): echo i` splits the query string into tuples for you.

Why `except` doesn't catch `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`?

2021-08-18 Thread alexeypetrushin
This is not good...

A look at Dart's null safety syntax

2021-08-18 Thread juancarlospaco
is not what std/wrapnils do ?.

Why `except` doesn't catch `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`?

2021-08-18 Thread alexeypetrushin
If you run this code [playground](https://play.nim-lang.org/#ix=3wnI) type O = ref object some: int var o: O try: echo o.some except: echo "failed" Run You'll get SIGSEGV: Illegal storage access. (Attempt to read from nil

Why `except` doesn't catch `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`?

2021-08-18 Thread Yardanico
Because SIGSEGV isn't a Nim exception in the traditional sense - it's a signal from the OS. That said, there's a module in stdlib for converting segfaults into exceptions, but it has some issues

newbie kick-in-the-pants: nim as a cgi application

2021-08-18 Thread martin
So far I managed to get the cgi environment variables out, managed to split it along the ampersand operators. Considering that the string content will be known, I guess I can tuplefy the rest of the contents into key=value pairs code so far-- import cgi,strutils #declaration cons

newbie kick-in-the-pants: nim as a cgi application

2021-08-18 Thread rgv151
have you tried my fastcgi module?

newbie kick-in-the-pants: nim as a cgi application

2021-08-18 Thread ingo
Fiddeled around a bit. Used the simplest python cgi server python -m http.server 8088 --cgi Run the in cgi-binhello import cgi var myData = readData() writeContentType() echo "Content-Type: text/html\n" #? echo "Hello world"

newbie kick-in-the-pants: nim as a cgi application

2021-08-18 Thread martin
found some time to experiment with it. the documentation is beyond me, frankly.. Example does not work, no reasonable source files. If you found a while to provide a working snippet I would be most grateful. The documentation is the one big frustration in nim for me. at least so far

Nim for UI Automation

2021-08-18 Thread Clonk
Not sure if this can help you achieve what you want, but for UI automation there is : * for linux * for windows

Confusion about `swap`

2021-08-18 Thread slangmgh
`(a, b) = (b, a) ` Run