Re: Sending emails from Nim using SMTP

2020-06-23 Thread alfrednewman
Thanks a lot

Sending emails from Nim using SMTP

2020-06-22 Thread alfrednewman
Hallo, I would like to send emails from Nim using module smtp. However, I need to include an attachment with the message. Is it possible? If so, can you pls provide a code snippet to help me out?

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 alfrednewman
@Stefan_Salewski Awesome job! Thank you

How-to silent the message "Jester is making jokes at..."

2018-11-03 Thread alfrednewman
Hallo, I'm running a Jester application and I would like to silent the message "Jester is making jokes at...". Is it possible? Thanks in advance

Re: How to use com in Nim ?

2018-09-09 Thread alfrednewman
https://forum.nim-lang.org/t/3288#20699

Jester server without a reverse proxy

2018-09-05 Thread alfrednewman
Hello, I'm creating a REST microservice with Nim and Jester (in Windows). My API will have just a few end-points and just a few simultaneously clients will consume it. When I say 'few clients', I mean that at most just 3 concurrent users will consume the API - if so. The JSON data returned per

Re: Plain ASCII transliterations of Unicode text

2018-08-24 Thread alfrednewman
Thank you. Worked as intented. My final binary will be executed in a machine without the Nim source code. So, the loadUnidecodeTable("lib/pure/unidecode/unidecode.dat") won't worked. Is there a way to do the loadUnidecodeTable at compiled time only?

Re: Plain ASCII transliterations of Unicode text

2018-08-24 Thread alfrednewman
I recompiled my source with the `embedUnidecodeTable` symbol define. Now It is all set.

Re: Problems with Bounty Source

2018-04-25 Thread alfrednewman
Opencollective is also an option. (Got issues with Bounty Source too)

Any photos or videos from NIM @FOSDEM ?

2018-02-05 Thread alfrednewman
(NT)

Re: Making a RESTful JSON API

2017-12-22 Thread alfrednewman
Thank you guys !

Re: Winim Excel

2017-10-29 Thread alfrednewman
One of the ways you feel motivated is to live in a community thanks guys

Winim Excel

2017-10-27 Thread alfrednewman
Hello, Considering that I am a Windows user (since my childhood... just kidding), and considering I was in great need of a way to work with Excel files, I am very happy to have discovered Winim. Practically all my problems are over! Great work @khchen !! However, I have a question: given the

Re: progress while binding libxl

2017-10-24 Thread alfrednewman
@wizzardx, I think it is possible to do so... but considering that @oyster has supposedly already started a wrapper process with libxl, I figured we could contribute something to it.

Re: progress while binding libxl

2017-10-21 Thread alfrednewman
Hello @oyster Ssorry to ask, but how is the process going with the libxl binding ? I need to work with a project where reading and writing Excel files will be an important prerequisite ... figuring that there is not yet a component in Nim to get the job done, I will have to perform the

Re: Fastest way to count number of lines

2017-10-21 Thread alfrednewman
Hi, thanks for the help of all of you. Yes, I'm pre-calculating things. In the data orchestration process I'm involved in, I can usually estimate the time of a rendering based on the number of rows I'm processing. It is a linear process and the processing time is typically not much affected as

Re: Windows installation

2017-10-20 Thread alfrednewman
https://github.com/dom96/choosenim

Re: nim-cookbook

2017-10-20 Thread alfrednewman
@wizzardx, please, go ahead ! I think your initiative (following the idea of the cookbook concept of @nimboolean) is completely valid Anyway, @nimboolean already posted some interesting content at [https://github.com/btbytes/nim-cookbook/](https://github.com/btbytes/nim-cookbook/). So I think

Re: Fastest way to count number of lines

2017-10-20 Thread alfrednewman
Guys, thank you for your help. @Stefan_Salewski, yes speed is an important point for me. I found the link you provided (about SMID) very interesting ... however, I do not know how to do this using Nim. Could you please help? Even to help newbies like me, thought to include the response of this

Re: nim-cookbook

2017-10-20 Thread alfrednewman
@wizzardx This is nice. Your idea really makes more sense. Count on me to help. How to configure a wiki ? What would be the best link (URL)?

Re: nim-cookbook

2017-10-20 Thread alfrednewman
@nimboolean, I will help you out with PRs you very soon... thanks

Fastest way to count number of lines

2017-10-20 Thread alfrednewman
Hello, Before processing a giant txt file, I need to know in advance how many lines that file has. Since I will have to process multiple files it would be important to perform this line counting operation as quickly as possible. What is the fastest way to know how many lines a txt file has? I

Re: Unhandled exception: key not found [KeyError]

2017-10-19 Thread alfrednewman
Thank you guys ! @mratsim, off topic: [https://twitter.com/DeepMindAI/status/920696139657240576](https://twitter.com/DeepMindAI/status/920696139657240576) Cool !!

Re: Unhandled exception: key not found [KeyError]

2017-10-19 Thread alfrednewman
@sky_khan, I agree with you. The more examples the better! I am also learning Nim ... one of the main problems I had (and I have) is precisely the absence of examples in the documentation. In addition, I would kindly ask a favor for the older staff - please create more examples in the

Unhandled exception: key not found [KeyError]

2017-10-18 Thread alfrednewman
Hi, please consider the code below. import json var field1, field2, field3 : str var jz : JsonNode field1 = jz["node1"].getStr field2 = jz["node2"].getStr field3 = jz["node3"].getStr Sometimes the nodes node1, node2 and/or node3 are available at my

Re: Extract repetitive unstructured data

2017-10-12 Thread alfrednewman
Thanks for your advice. Cheers

Extract repetitive unstructured data

2017-10-10 Thread alfrednewman
Hallo, Typically, I handle my data wranglers jobs using Python and Perl. I have a lot of legacy code in both languages, so I need to find some free time to rewrite all my stuff in Nim. Sometimes, I need to extract key information from an unstructured data file... and I would like to start

Re: What are you writing using nim? :)

2017-08-22 Thread alfrednewman
I'm using Nim to handle ZIP Code validation and address correction. It's a fuzzy process of checking the postal address to ensure that the given ZIP Code is correct. Nim should match the ZIP Code against the postal data file and refers to the correct location and so on. Given I'm not using any

Re: Estimation of π using Leibniz series

2017-08-14 Thread alfrednewman
Our **lovely Nim** is outstanding !

Re: Estimation of π using Leibniz series

2017-08-14 Thread alfrednewman
@zolern, thank you. Your code rocks. However, we are cheating Julia because in her code there is a **POW** instead **MOD**. I will modify / rerun the .jl script just to check the result.

Re: Estimation of π using Leibniz series

2017-08-14 Thread alfrednewman
Thank you all. @wiffel/Nibbler, in my Julia test, I was using Pro version 0.6.1 64 bit running on Windows 10. Now, running the same .jl code on a Windows 8 64 bit (i5 CPU 650 @ 3.20GHz, 3193 Mhz, 2 Cores, 4 Processors) I got the following: 2.763225 seconds (1.77 k allocations:

Estimation of π using Leibniz series

2017-08-14 Thread alfrednewman
Hello, How can I optimize the speed of the following proc: import times, math proc leibniz(terms: int): float = var res = 0.0 for n in 0..terms: res += pow(-1.0,float(n))/(2.0*float(n)+1.0) return 4*res let t0 = cpuTime()

Re: Nim in Action is now officially in print!

2017-08-14 Thread alfrednewman
Great Job !! Mine is on the way ! All the best.

Re: Compiler Reading

2017-07-21 Thread alfrednewman
Sounds interesting stuff: [https://leanpub.com/create_languages](https://leanpub.com/create_languages)

Re: In-Memory Database

2017-07-16 Thread alfrednewman
Thank you all ! @Stevo, can you pls provide some examples of how to use it ?

In-Memory Database

2017-07-14 Thread alfrednewman
Hello, Is there any In-Memory Database project around for Nim ? Or any wrapper available for any of these [https://githubreviews.com/explore/databases/popular-in-memory](https://githubreviews.com/explore/databases/popular-in-memory) ? TIA

Re: video about my opengl sandbox project

2017-06-22 Thread alfrednewman
Arne, pls, keep going with your videos. Well done. Thx.

Re: Progress Bar using stdout.write and eraseLine()

2017-06-22 Thread alfrednewman
Nice job Euan ! Thanks.

Re: Progress Bar using stdout.write and eraseLine()

2017-06-20 Thread alfrednewman
All the best guys !

Progress Bar using stdout.write and eraseLine()

2017-06-20 Thread alfrednewman
Hello, I'm trying to create a simple progress bar indicator. I'd like to print (update) the bar always in the same line of the screen. Looking at the source code of choosenim, I discovered eraseLine(). So, I made the following toy code: import strutils, terminal proc

Re: package like python's pandas?

2017-06-17 Thread alfrednewman
The lib [https://libxlsxwriter.github.io](https://libxlsxwriter.github.io) sounds very interesting, and it will be a great hand to help me out with my first production job with Nim. However, can you pls provide some directions of how to call a C function (of libxlsxwriter) within my Nim code ?

Re: Hard copy

2017-05-30 Thread alfrednewman
I received this from Manning support: "This title is scheduled for release on May 29th"

Re: Version 0.17.0 released!

2017-05-18 Thread alfrednewman
Cool ! Awesome and nice job !!

Games made in Nim

2017-05-18 Thread alfrednewman
Hello, I read that there are some arcade / indie games made in Nim. Is there a list of them ? Any opensource ? Cheers

Re: Nim in Action is going into production!

2016-11-22 Thread alfrednewman
Just downloaded my eBook !! It rocks ! Cheers

Re: Httpclient Extra Headers Error

2016-11-15 Thread alfrednewman
@pdv, thank you for your support. Can you pls kindly help me to fix my code ? I tried to rewrite it following the description of the provided branch, but I got no success. I think I'm missing some key concept. All the best, AN

Httpclient Extra Headers Error

2016-11-14 Thread alfrednewman
Greetings, I'm trying to consume an JSON API, but I need to pass some Headers along my GET call. My code is the following: import httpclient, json let client = newHttpClient() client.headers = newHttpHeaders({ "Content-Type": "application/json" }) let body =

Debugger

2016-10-15 Thread alfrednewman
Hello, As my Nim codes are growing in size and in complexity, my echos are no longer being productive to help me out. So, I need a recommendation about the best way to debug my stuffs. Is there any Nim debugger around (for Windows) ? I'm just looking for a way to inspect variables giving a

Re: Performance of fastRows at module db_sqlite

2016-10-09 Thread alfrednewman
Im using Nim 0.15 with -d:release and --opt:speed. My Python is a 64 bit v2.7.12 without Pypy. I need SQLite mainly because it is a part of a desktop app, where any other SQL server is not suitable. And BTW this .db3 is used just for readonly operations. No CUD is done there.

Re: Performance of fastRows at module db_sqlite

2016-10-09 Thread alfrednewman
Thank you for the support guys. The weird statements surrounding the operations with SQL were created just for benchmarking's sake with Python. Anyways, optimizing the handlers of the CSV, due it is not that big, brought no real gain of performance. Comparing the elapsed time of Nim and

Performance of fastRows at module db_sqlite

2016-10-09 Thread alfrednewman
Greetings, I have a big production SQLite table with 4 Gig+ and around 12M records. (named mydb.db3) The code below is looking for 10 records (of lookup_input.csv) at mydb using the FTS feature available at SQLite. Given the thread

Re: C Invocation in Nim

2016-10-05 Thread alfrednewman
Surely... will do that. Thanks

Re: C Invocation in Nim

2016-10-05 Thread alfrednewman
Thank you for the kindly comments. Actually, my final goal is to migrate some of my Python codes to Nim. My knowledge with C (and Nim) is rudimentary yet. I do have a plenty number of taylor made functions in Python, which I guess I'm gonna spend some time migrating to Nim. So, given Nim has a

C Invocation in Nim

2016-10-05 Thread alfrednewman
Hello there, I have the following C code (this one removes adjacent duplicates in a string): // myccode.c const char* change(char *str) { int i=1; int j=1; int k; int d=0; while(str[i]!='\0') { if(str[i-1]==str[i]) {

Re: Nim code to Remove Accented Letters

2016-10-03 Thread alfrednewman
@all, thanks a lot.

Re: Nim code to Remove Accented Letters

2016-10-03 Thread alfrednewman
Yeap, I know. What's the best way to implement your proc translate ? Say I have an input string like "Cédille Français". How can I use the proc with it ? Sorry my basic questions, but I am a pretty new with Nim... Cheers

Nim code to Remove Accented Letters

2016-10-03 Thread alfrednewman
Hello, I am trying to replace the accented letters in a given text with their unaccented counterparts. What is the best way to write the following C code in Nim ? char p_RemoveAccent(char C) { #define ACCENT_CHARS"ÁÀÃÂÇáàãâçÉÊéêÍíÑÓÔÕñóôõÚÜúü" #define

Re: Nim Chess 2 with transposition table support is available

2016-10-03 Thread alfrednewman
Yeap, I agree. Very nice job !

Re: Connecting Nim with Python

2016-09-28 Thread alfrednewman
@wolf, thank you for your help ! @andrea, I'll have a look at nim-pymod. Cheers

Re: Connecting Nim with Python

2016-09-27 Thread alfrednewman
Yes ! It worked for me as well (in Windows). Thanks a lot Wolf. However, I noticed the Nim Soundex function ([https://github.com/Skrylar/Skylight](https://github.com/Skrylar/Skylight)) expects for a single token not for a full string. So, I made some chances in the Python code to properly

Re: Connecting Nim with Python

2016-09-26 Thread alfrednewman
I tried with c_wchar_p, as well as, with c_char_p. Either way, didn't work. mystring = c_char_p("robert james fischer") test_lib.AmericanSoundex.argtype = c_char_p test_lib.AmericanSoundex.restype = c_char_p soundex_res = test_lib.AmericanSoundex(mystring) print('The

Connecting Nim with Python

2016-09-26 Thread alfrednewman
Hello I made some experiences connecting Nim with Python. At this page [http://akehrer.github.io/posts/connecting-nim-to-python](http://forum.nim-lang.org///akehrer.github.io/posts/connecting-nim-to-python)/ there are some cool hints about how to do that. However, I got some issues interfacing

REPL

2016-09-22 Thread alfrednewman
Hello, I am trying to compile [https://github.com/wheineman/nrpl](https://github.com/wheineman/nrpl) but I got the following error: nrpl.nim(116, 42) Error: attempting to call undeclared routine: 'map'. TCC is installed and in my windows path. Cheers

Re: SQlite FTS - fts3 [DbError]

2016-09-15 Thread alfrednewman
Solved: I just copied the latest SQlite 32 & 64 bit DLLs to nimbin folder (and renamed them to sqlite3_32.dll and sqlite3_64.dll). The native Nim package is using dated DLLs. BTW, there are typos in my former code. The correct is the following: import db_sqlite, math let