Re: Idea: Nim Online Conference

2020-05-18 Thread kidandcat
I would like to make an effort and do a very short talk about web development with Karax (it would be my first talk in English).

Re: A good word for idiomatic nim?

2020-05-18 Thread kidandcat
Araqal, oh my god, that made my day :P

Re: Karax: Change element value

2020-02-27 Thread kidandcat
I dont think onkeyupenter is a valid event

Re: Doubt! Proc and import

2020-02-27 Thread kidandcat
You can't dynamically import a module in Nim because it is a statically compiled language, (you end with your binary, you don't distribute the source code) If you want to do that, you can compile your library as a shared library, but I'm 100% sure you don't need to do that to achieve what you

Re: Karax: Change element value

2020-02-27 Thread kidandcat
`include karax / prelude import karax / [vstyles] var myText = "Name will apear here." proc onNameEnter(ev: Event; n: VNode) = if n.value.strip() != "": myText = n.values proc createDom(): VNode = result = buildHtml(tdiv): h1(id = "changeName"): text myText form: label(`for` = "fname"): text

Re: Doubt! Proc and import

2020-02-27 Thread kidandcat
https://nim-lang.org/docs/tut1.html#modules

Re: Styling Karax app

2020-02-26 Thread kidandcat
See my personal website for an example: [https://github.com/kidandcat/kidandcat.me](https://github.com/kidandcat/kidandcat.me)

Re: What prevents you from using Nim as your main programming language?

2020-02-25 Thread kidandcat
Man, I work with large Go codebases, Go is the equal or more strict than Rust, and anyway you may find unmaintainable code in extremes that your head explode. >From my extense experience, bad developers can use the most strict language >ever created and the codebase will still be an enormus

Re: IntelliJ / Netbeans plugin for Nim

2020-02-07 Thread kidandcat
Not pointing to start a hot discussion, but what would be the advantages of coding Nim in IntelliJ o Netbeans? > I'm not missing anything when using VSCode, and I'm reacious to infect my > machine with JVM.

Re: Change server name in Jester

2020-02-06 Thread kidandcat
1\. that server name refers to the technology used behind the server, not that you can choose a random name and 2., it's just a header, have you tried setting it by hand?

Nim macro help

2020-01-27 Thread kidandcat
Hi, I'm very noob with macros, I'm trying to learn, but I'm getting this error: undeclared field: 'kind' for type system.NimNode proc createSlide(title, body: varargs[string]) = echo "createSlide", title, body proc slideDslImpl(head, body: NimNode): NimNode = if

Re: Nim will silently auto convert a float64 to a float32 and loose precision... is that good? Thoughts?

2020-01-20 Thread kidandcat
I don't see where the silently is, you are forcing a type conversion. In JS nearly the whole language can be converted back and forth. I would see that dangerous if you don't declare the type of "b" and the compiler implies float32, but if you declare its type, that's not silently for me.

Re: How to properly append/replace DOM elements using just karax

2020-01-17 Thread kidandcat
You have an example in the repo's Readme: [https://github.com/pragmagic/karax#event-model](https://github.com/pragmagic/karax#event-model) Basically use for

Re: {.gcsafe.}, What does {.threadvar.} do to make a function gcsafe?

2019-12-07 Thread kidandcat
Anyway you stated you got an error accesing the global variable, if you don't compile your program with --threads:on you will get only a warning and it will compile correctly

Re: {.gcsafe.}, What does {.threadvar.} do to make a function gcsafe?

2019-12-04 Thread kidandcat
The Threadvar pragma, as its name explains, marks the variable as a thread variable, then each thread you create will have its own copy of that variable, thus, even if you error has dissapeared, you will find that if you modify that variable in your thread A, and you then read it in your thread

Re: Godot and Blender

2019-12-04 Thread kidandcat
There are existing bindings (maybe they are outdated) [https://github.com/pragmagic/godot-nim](https://github.com/pragmagic/godot-nim)

Re: Nim is the friendliest language to start

2019-12-02 Thread kidandcat
Maybe because Google isn't behind Nim hyping it...

Re: Karax Components

2019-11-18 Thread kidandcat
You can use components with local state, but I haven't experimented with them, I'm more than fine with functions and variables, each in their own file: [https://github.com/kidandcat/nimforum2](https://github.com/kidandcat/nimforum2)

Re: How to detect EADDRINUSE from an OSError exception

2019-11-13 Thread kidandcat
You can use try: your code except ExceptionName: except: rest of errors Run

Re: A taxonomy of Nim packages

2019-11-11 Thread kidandcat
Like I always say, the awesome-nim repo should be under the nim org, then if all core maintainers are busy even for accepting PRs, add external collaborators, but keep the repo under your control if that person disappear.

Re: A super newbie git-related question

2019-11-08 Thread kidandcat
add the original branch as: git remote add upstream https://github.com/nim-lang/Nim.git, then just git fetch upstream should work

Re: A taxonomy of Nim packages

2019-11-08 Thread kidandcat
Wow, how could you include some useless packages and not Karax??

Re: Write in *.txt file from variables values , with separate new lines.

2019-10-27 Thread kidandcat
[https://nim-lang.org/docs/streams.html#writeLine%2CStream%2Cvarargs%5Bstring%2C%5D](https://nim-lang.org/docs/streams.html#writeLine%2CStream%2Cvarargs%5Bstring%2C%5D) "Writes one or more strings to the the stream s followed by a new line. No length field or terminating zero is written." The

Re: Nim for enterprise software development

2019-10-21 Thread kidandcat
I have no problem running Nim in prod with sqlite, postgres, mongodb and redis. You don't need to use an ORM to use databases ;)

Re: What are you building now?

2019-10-21 Thread kidandcat
Oh, didn't read you, I'll PR yours :D

Re: What are you building now?

2019-10-17 Thread kidandcat
Web development: my portfolio: [https://github.com/kidandcat/kidandcat.me](https://github.com/kidandcat/kidandcat.me) And a videogame, I just implemented networking thanks to the awesome folks from the Nim Telegram channel: [https://github.com/kidandcat/platformer](https://github.com/kidandcat

Re: Research questions for open-source library authors re communicating with general users

2019-10-14 Thread kidandcat
1\. For the libraries you support; how has communication with users been handled? They usually have their custom community tools, forums, blogs plus social media, I like a lot regarding Nim community the Telegram group, there is always veterans there to answer your doubts in real time 2\. Any

Re: Redirect stdout

2019-10-14 Thread kidandcat
I think you are looking for startProcess [https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray[string],StringTableRef,set[ProcessOption](https://nim-lang.org/docs/osproc.html#startProcess,string,string,openArray\[string\],StringTableRef,set\[ProcessOption)]

Telegram group

2019-10-14 Thread kidandcat
@dom96 we are getting hard spammed by bots in the telegram group, could you activate this bot [https://combot.org](https://combot.org) or similar? PD: you are the owner of the group, only you have the permission to do it.

Re: Nim for enterprise software development

2019-10-13 Thread kidandcat
I use Nim for internal tools and small services. But is so hard to push Nim in a big project onto a company because the first thing a company look for in a programming language is the developer market, how much people is available who knows that language, and the average salary.

Re: Terseness and productivity in Nim vs other languages

2019-10-12 Thread kidandcat
I work mainly with JS and Go, and I can tell you I love Nim because I can copy the same program from Go to Nim and it will have like 10 times less code

Re: Failure to abstract in standard library's db code?

2019-08-17 Thread kidandcat
I think everybody usually overcomplicate things. Just keep two branches in your repo, one with mysql and another with sqlite, and distribute both binaries. Much more clear, no unused code, smaller binaries, etc

Re: What do you think about the programming language NIM?

2019-07-27 Thread kidandcat
Of course it completely depends on the IT field you work on. I have experience working with mastodon apps in big teams with teams of more than 20 developers. In that kind of scenario the performance is the smallest problem you will have to handle. And of course the performance is very

Re: How to Maintain a Nim Chinese Community

2019-07-27 Thread kidandcat
Nim is not backed by a large company, the devs efford is already very high. Just go ahead and collaborate. I've translated many open source websites to Spanish. I'm sure if any of you provide the Chinese translation of nim-lang.org the team will be very happy to public it.

Re: Read lines from file thats in a variable

2019-07-26 Thread kidandcat
`import strutils for line in testFileAll.split("\n"): #your code ` Run

Re: Nerve: RPC framework for Nim

2019-07-26 Thread kidandcat
Awesome!! I'll use it in some pet projects to gain experience :D

Re: What do you think about the programming language NIM?

2019-07-26 Thread kidandcat
Nim is the definitive language for two things (and none of them is performance, because performance usually doesn't matter, and if it matters, is not because of the language, but because of the code written) * Nim's macro system is so powerful that you can do nearly anything you imagine,

Re: How to Maintain a Nim Chinese Community

2019-07-24 Thread kidandcat
Nim forum software is open source, you could setup a chinese forum: [https://github.com/nim-lang/nimforum](https://github.com/nim-lang/nimforum) I don't think automatic translation of english forum would be readable, anyway I don't know if translators translate English <-> Chinese properly

Re: International meetup or conference?

2019-06-26 Thread kidandcat
Well, I'll promote my country: Madrid/Spain :D

Re: What prevents you from using Nim as your main programming language?

2019-06-25 Thread kidandcat
Same, ecosystem, I needed to do WebRTC, and I couldn't affort to write the spec from ground up. Just a step to Go and you have a full implementation: [https://github.com/pion/webrtc](https://github.com/pion/webrtc)

Re: NIM prompt closes after starting (windows)

2019-06-08 Thread kidandcat
That's because Windows Defender is opening it in Sandbox mode, try running as administrator or add it to Windows Defender whitelist.

Re: Nim Days progress

2019-06-03 Thread kidandcat
Awesome job!! very interesting :)

Re: xmldomparser on frontend - compile to javascript

2019-05-29 Thread kidandcat
proc newDOMParser(): JsObject {.importcpp:"new DOMParser()", nodecl.} proc fetchEPG(): void {.async.} = var res = await fetchText("/epg.xml") var parser = newDOMParser(); var xmlDoc = parser.parseFromString(res,"text/xml"); log xmlDoc EPG = xmlDoc

Re: [Challenge]How short or efficient can you make this code?

2019-05-17 Thread kidandcat
You can make it work to begin with.

Re: Why does sorting the data mess up this Karax app?

2019-05-17 Thread kidandcat
Error: type mismatch: got Sort cannot receive people seq as param.