Re: Web Scraping

2020-04-08 Thread juancarlospaco
[https://github.com/juancarlospaco/faster-than-requests#scraper](https://github.com/juancarlospaco/faster-than-requests#scraper)

Terminal keyboard and mouse

2020-04-08 Thread JPLRouge
hello termkey.nim keyboard and mouse management Linux view conforms to specifications UTF8 I thank #enthus1ast [https://github.com/johnnovak/illwill](https://github.com/johnnovak/illwill) Manages UTF8 all keyboard keys and mouse It manages the Linux keyboard according to the GNU specificat

Re: Another state of generating Android APK thread...

2020-04-08 Thread GordonBGood
@yglukhov: glad you liked it. In a couple of weeks when I'm unblocked from editing, I'll remove or change a few links and try my answer again, as it seemed to be good:. It showed that the task didn't need C++ to do the job on a Intel i3-8100 or i3-9100 as the right algorithm (mine ;-) ) can do i

Terminal based GINTRO(GTK) VTE

2020-04-08 Thread JPLRouge
bonjour, #Stefan_Salewski You can add the terminal in your examples. I hope this helps those looking to learn nim better I took over what you had done. Now it works perfectly this an open and simple terminal, this does not have a terminal for shelling but for applications in semi-graphics mod

Web Scraping

2020-04-08 Thread alfrednewman
Can you pls share some code / example related to web scraping? TIA

Re: Nim programming book for kids

2020-04-08 Thread mitai
Awesome!

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread leorize
You might find this interesting: [https://github.com/nim-lang/Nim/pull/12105](https://github.com/nim-lang/Nim/pull/12105)

Re: System/io not imported automatically?

2020-04-08 Thread seruum
It turns out this is a noob problem. I started the project thinking, "I would like to do this as a nimscript project". I'm guessing that access to stdout, stdin, io, or similar has some restrictions in nimscript. So when I started the file was project.nims. When I ran into trouble, I tried it a

Re: Nim 1.2 is here

2020-04-08 Thread Araq
> Or are the bugfixes already integrated in stable? Bugfixes will be backported and produce the version 1.2.2.

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
Could someone please help make this change (add the cc = clang to build.sh and nim.cfg openbsd lines) as described above? I thought I'd do it as a pull request at [https://github.com/nim-lang/Nim](https://github.com/nim-lang/Nim) but I don't see where it would go. (Sorry!) I've also put throug

Re: Resolving environment variables in a string

2020-04-08 Thread squattingmonk
I'm also noticing that this will throw an exception if any of the variables in the string are not found among the environment variables.

Re: Resolving environment variables in a string

2020-04-08 Thread Yardanico
Well maybe the reason is that it's a bit too much to import a whole new module to implement 1 additional procedure (so if you use os that module will be imported too, not that it would matter after compilation anyway).

Re: Nim 1.2 is here

2020-04-08 Thread leorize
> This is because we removed dead code elimination from the openssl wrapper, > why did we do this? Unrelated, it's due to this: [https://github.com/nim-lang/Nim/pull/6664](https://github.com/nim-lang/Nim/pull/6664). This feature requires OpenSSL 1.1 and above. You can pass `-d:nimDisableCertif

Re: Nim 1.2 is here

2020-04-08 Thread Sixte
I just noticed that are several bugfixes now on github, espec. related with `--gc:arc` #13863. Does that mean that I have to switch the update to devel now? Or are the bugfixes already integrated in stable ?

Re: Another state of generating Android APK thread...

2020-04-08 Thread yglukhov
@GordonBGood, great job! It's a pity the answer was deleted on Quora. I've updated nimx naketools a few weeks ago to use ndk toolchain directly. So that compilation goes as follows: 1. Run nim to produce a static lib. 2. Repeat 1 for every arch. 3. Run gradle to link everything together. This so

System/io not imported automatically?

2020-04-08 Thread seruum
I am and have always used a manual install with the mingw compiler with no issues on my Windows machine. I needed a new utility at work and tried to use rdstdin to get input from the user, but it would not import. This is the error: Hint: used config file 'c:\Nim\config\nim.cfg' [Co

Resolving environment variables in a string

2020-04-08 Thread squattingmonk
Hi, all! I need to resolve environment variables in a string. I'm not seeing a proc for this in the standard library, so I whipped this up: import os, strtabs proc envTable: StringTableRef = result = newStringTable(modeCaseSensitive) for key, value in envPairs():

Re: `{}` syntax

2020-04-08 Thread cblake
It's a good-ish summary and your range `[3..5]` is another great example why we might want two operators since one could also do a range of `{"RFCs" .. "the"}`. The augmented tree actually keeps things like "the number of nodes below a node" (or "to the left") and can do a height-of-tree time se

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
No need for the old-GCC patch. Instead just have OpenBSD builds use clang. It worked! $ bin/nim --version Nim Compiler Version 1.2.0 [OpenBSD: amd64] Compiled at 2020-04-03 Copyright (c) 2006-2020 by Andreas Rumpf git hash: 7e83adff84be5d0c401a213eccb61e321a3fb1ff

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread miran
> I'm not sure if it is in 1.2 It is.

Re: Nim programming book for kids

2020-04-08 Thread alfrednewman
@Stefan_Salewski Awesome job! Thank you

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
… and this is the clang version in OpenBSD 6.7-BETA: OpenBSD clang version 8.0.1 (tags/RELEASE_801/final) (based on LLVM 8.0.1) Target: amd64-unknown-openbsd6.7 Thread model: posix InstalledDir: /usr/bin I hope that helps. Thanks for looking into it. Sorry I don't know how to help more directly

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
This is the default on the newest OpenBSD 6.7-BETA : gcc (GCC) 4.2.1 20070719

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread rayman22201
For GCC versions < 5, you must add the -d:nimEmulateOverflowChecks switch. I'm not sure how to do it with buil_all.sh Adding it to koch directly works well. ./Koch -d:release -d:nimEmulateOverflowChecks boot Run > [https://github.com/nim-lang/Nim/pull/13692](https://g

Re: `{}` syntax

2020-04-08 Thread spip
That's a long discussion but I find it missing concrete examples. Let it be more clear on a fake example. Imagine there's a Bag[string, T] data structure implemented with a binary tree, like the following where we have stored some data keyed by the words from "Some people don't read the RFCs":

Re: 1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread mratsim
What's the gcc version? This is a builtin introduced in GCC7 [https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html](https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html) and Clang 4 (?). Not sure if it has been backported. We might need a switch for old GCCs.

1.2.0 build.sh error : OpenBSD AMD64

2020-04-08 Thread q7r7
Building current Nim 1.2.0 on OpenBSD AMD64. I'm hoping to get Nim 1.2 included into OpenBSD packages. But when I run build.sh, it eventually dies with this error: ld: error: undefined symbol: __builtin_saddll_overflow It seems to be from the end of c_code/nimbase.h Here's the full context: [

Re: UncheckedArray conversion

2020-04-08 Thread mratsim
> I am aware of this. I am just scaffolding the library. Just to avoid doing > something fundamentally wrong (like reaching 80fps instead of >1000fps ;oP). > In the future, the library should be more general. In this case, I take > advance that it is always 1 byte per sample. To be honest I don'

Re: Accessing global variable inside proc results in Error: undeclared identifier

2020-04-08 Thread MrKoops
Thank you miran. Pascal is too long ago and i was dabbling to much in Python. I love Nim so far. It's the perfect combination of the easy python syntax and the flexibility of C. Now we have to create some of our favourite libraries (like Pendulum eg) for Nim :)

Re: Accessing global variable inside proc results in Error: undeclared identifier

2020-04-08 Thread miran
> coming from python i am new to Nim > > What am i doing wrong? Defining `opts` after your proc? (You can do that in Python, but not in Nim)

Re: UncheckedArray conversion

2020-04-08 Thread mantielero
Well now I am amazed but on the other side of the pic. I need to check if I have done something really wrong, but I have managed to get: 6074fps using float32 (I was expecting 3000fps) and 10700fps using int32, just by taking advance of multithreading.

Re: Nim threading and FFI - locks

2020-04-08 Thread mantielero
I made it work like this: import locks type FrameRequest {.bycopy.} = object numFrames*: int # Total number of frames nthreads*: int # Number of threads available completedFrames*: int # Number of frames already processed request

Accessing global variable inside proc results in Error: undeclared identifier

2020-04-08 Thread MrKoops
Hi, coming from python i am new to Nim. I am using argparse package like this: p = newParser("tradl"): option("-l", "--language") option("-a", "--amount") option("-d", "--dir") option("-s", "--search") var opts = p.parse() Run in my

Re: UncheckedArray conversion

2020-04-08 Thread mantielero
Lot to digest here. 1. I am aware of this. I am just scaffolding the library. Just to avoid doing something fundamentally wrong (like reaching 80fps instead of >1000fps ;oP). In the future, the library should be more general. In this case, I take advance that it is always 1 byte per sample. T

Re: Nim 1.2 is here

2020-04-08 Thread dom96
could not import: X509_check_host Run > > every time I invoke nimble :-( This is because we removed dead code elimination from the openssl wrapper, why did we do this? I was fixing something in openssl and noticed this yesterday (very time I invoke nimble :-(), can we restore

Re: Nim programming book for kids

2020-04-08 Thread Stefan_Salewski
I would like to see a chinese version of the book, but please do no start translation before at least Part I and Part II are completed. I will tell you when. But is translation not more work then writing from scratch? For me translating something from German to English takes generally very long

Re: Nim programming book for kids

2020-04-08 Thread Ward
Do you mind I translate this book into traditional chinese ?

Nim threading and FFI - locks

2020-04-08 Thread mantielero
Disclaimer: I don't have much experience with multithreading (I played with it long ago in python). In a different [forum thread](https://forum.nim-lang.org/t/6169), we were talking about the need of setupForeignThreadGc() on the top of a callback called by C. In the same context, I aiming to

Re: Nim 1.2 is here

2020-04-08 Thread Aiesha_Nazarothi
Is \--gc:arc still incompatible with threadpool library ?

Re: Nim programming book for kids

2020-04-08 Thread Stefan_Salewski
juancarlospaco > PDF Download would be cool. Why. I generated a PDF of my PhD thesis long time ago, it was written in LaTeX. But that times are over, we do not want to print documents these days, we do not want to kill trees. And PDF with its fixed format is bad for screens with different size