Re: How to use Visual Studio Code to configure NIM quickly

2017-06-05 Thread hcorion
Hi!

This is bordering on spam. Please explain what your trying to 'configure'.

Have you installed Nim: 
[https://nim-lang.org/install.html](https://nim-lang.org/install.html)


Re: choosenim - the Nim toolchain installer/multiplexer

2017-05-06 Thread hcorion
The tool I've been waiting for is here! Thank you!

An interesting issue I had while installing was this: 


$ curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim-init: Downloading choosenim-0.1.0_linux_amd64
Prompt: Symlink for 'nimble' detected in '/home/username/.nimble/bin'. 
Can I remove it? [y/N]
Error: unhandled exception: EOF reached [EOFError]
Answer: %



I had nimble installed via nimble, so simply running **nimble uninstall 
nimble** worked fine, but I'm not sure what was up with the weird EOFError.


Re: New here. can't seem to get the installer to work.

2017-04-24 Thread hcorion
What OS?

Nim is a compiler, but it compiles to C/C++/JS, so assuming you want to compile 
for native targets you'll need a C compiler as well.


Re: Tetris in Nim in 3D

2017-04-21 Thread hcorion
Very cool!

I'm holding out for [nimgame 3D](https://forum.nim-lang.org/t/2897#18136) with 
that sweet, sweet virtual boy support.


Re: book delayed again

2017-04-20 Thread hcorion
@Fungi I won't discuss compiled vs. dynamic languages, because the topic is 
obviously going nowhere, and you and I both have better things we can be doing.

However your attack on me and @jibal's person is not only a very low blow, but 
IMO unfounded.

> "you are ignorant + arrogant, which makes you the worst people."

Let's look up ignorant, shall we?

> lacking in knowledge or training; unlearned:

  * 
[http://www.dictionary.com/browse/ignorant](http://www.dictionary.com/browse/ignorant)



This can be disputed.

in your eyes, I'm obviously lacking in knowledge because according to you 
interpreted languages are the best and everything else has no purpose.

However, we have multiple skilled and knowledgeable programmers who 
agree/attest to what @jibal and I have said.

If you came into a court of law saying I killed a man and I came with 4 other 
people saying I didn't, who do you think would win?

What about arrogant? Let's look that one up as well.

> making claims or pretensions to superior importance or rights; overbearingly 
> assuming; insolently proud:

  * 
[http://www.dictionary.com/browse/arrogant](http://www.dictionary.com/browse/arrogant)



Let's see, what assumptions did I make?

All of the facts I stated I can get sources for and are the truth.

Did I ever claim to be smarter or more knowledgeable than you? Not that I can 
tell, I just disputed your claims.

This site: 
[http://ronrosstoday.com/arrogance](http://ronrosstoday.com/arrogance)/ has a 
great guide on how to detect arrogance.

* * *

I really want argue against some of your points in your second post, but I 
won't feed the troll anymore.

I hereby swear that I will not reply to this thread after this post.


Re: New website released!

2017-04-20 Thread hcorion
I agree with @cheatfate that the forum should be easier to access, right now 
it's pretty buried.

I also think a github link that's accessible near the top would be helpful.


Re: New website released!

2017-04-19 Thread hcorion
Woah! Looks awesome!


Re: book delayed again

2017-04-18 Thread hcorion
@Fungi I would have to disagree.

> "A fully static and compiled language environment is not better in any sense"

Ever heard of a language called C (and C++)? Any idea why companies still use 
them? Why wasn't the latest AAA video game written in Python or Javascript?

Do you know why DropBox started developing Pyston, a python JIT?

mGBA, a popular Game Boy Advanced emulator decided to move the project from 
JavaScript to C, any idea why?

Because some people care about execution speed.

Have you tried running python, Javascript etc. on the Game Boy Advanced, 
Commodore 64, Arduino, or resource deprived embedded chip?

Ever heard of a project called Cython? I wonder why somebody would create that 
if the "compiled language environment is not better in any sense"?

* * *

I would agree that programming is not just about "writing" programs and 
execution speed.

I'm not sure where you got that information though.

Go away troll. 


Re: why is nim install weird?

2017-04-04 Thread hcorion
A better installation and version management system similar to rustup is in 
development by @dom96 called choosenim.

It seems like your on Linux? If so, perhaps your distro has a version of Nim in 
the repo? Perhaps some work could be done by creating a Flatpack or AppImage 
for easier cross-distro installation.

If your on Mac you can use homebrew to install Nim. There is also nim-vm 
[https://github.com/ekarlso/nim-vm](https://github.com/ekarlso/nim-vm) but it 
is unmaintained and doesn't support Nimble very well.


Re: Announcing Nimgame 3D!

2017-04-01 Thread hcorion
Yeah! April Fools!


Re: Alternative comment syntax

2017-03-30 Thread hcorion
@Krux02 WTH kind of keyboard is that? Does it actually have 2 GNU keys, 2 BSD 
keys and 2 Linux keys?


Re: FRAG - Framework for Rather Awesome Games

2017-03-29 Thread hcorion
@Nazariglez

If your interested in making 2d web-only games, dom96 has a framework for that: 
[https://github.com/dom96/gamelight](https://github.com/dom96/gamelight) and an 
example game: [https://github.com/dom96/snake](https://github.com/dom96/snake)


Re: nim wrapper for bearlibterminal

2017-03-26 Thread hcorion
Yeah, the common complaint with programming languages is there isn't enough 
compatibility with the libraries they already work with, but it's amazing how 
much work has been done wrapping libraries in the Nim community.


Re: FRAG - Framework for Rather Awesome Games

2017-03-26 Thread hcorion
Aw man! Game Engine Wars!

Seriously though, I guess I'll try to port over my game from nimgame2 to FRAG, 
because I'm too lazy to implement a physics engine.


Re: Why does loadLib affect some other thread in this case?

2017-03-24 Thread hcorion
Hmm, it works for me on Linux with the latest git version of the compiler.

So, your problem is that _lib loaded!_ is never called on Windows?

What version of Nim are you running?

Perhaps the issue was fixed in the latest git version. You should try, if it 
wasn't you should file a bug report.


Re: Ampersand rendering glitch in tutorial

2017-03-22 Thread hcorion
Hmm, another issue is that the fonts are trying to load from an http rather 
than https, I'm not familiar with how the docs work and are generated, but the 
link should be changed to https.

So, the problem is that @SidewinderMan has an outdated version of Source Code 
Pro installed on his system and should update it.


Re: listDirs in nimscript

2017-03-22 Thread hcorion
Works for me. Same OS even (64-bit Arch Linux) 


$ nim test.nims
Hint: used config file '/home/zion/.nimvm/versions/devel/config/nim.cfg' 
[Conf]
@[/boot, /var, /dev, /run, /etc, /tmp, /sys, /proc, /usr, /home, /mnt, 
/opt, /root, /srv]


**nim --version**


Nim Compiler Version 0.16.0 (2017-03-22) [Linux: amd64]
Copyright (c) 2006-2017 by Andreas Rumpf

git hash: b040f74356748653dab491e0c2796549c1db4ac3
active boot switches: -d:release -d:nativeStackTrace


**uname -r -m -o**


4.10.4-1-ARCH x86_64 GNU/Linux



Re: The Linux Game Jam 2017 - itch.io

2017-03-21 Thread hcorion
This post looks good: 
[https://forum.nim-lang.org/t/2838](https://forum.nim-lang.org/t/2838)


Re: I compiled libui.dll file is not successful

2017-03-21 Thread hcorion
**_These have been compiled by a random person on the internet. Download at you 
and your computer's peril._**

* * *

32-bit windows: 
[https://github.com/jlp765/ui/raw/ade5dc861c31e1b5c8b593381b89bc3a2971/libs/libui32.dll](https://github.com/jlp765/ui/raw/ade5dc861c31e1b5c8b593381b89bc3a2971/libs/libui32.dll)

64-bit windows: 
[https://github.com/jlp765/ui/raw/ade5dc861c31e1b5c8b593381b89bc3a2971/libs/libui64.dll](https://github.com/jlp765/ui/raw/ade5dc861c31e1b5c8b593381b89bc3a2971/libs/libui64.dll)


Re: The Linux Game Jam 2017 - itch.io

2017-03-21 Thread hcorion
@Vladar4 Sort of. I think. Emscripten supports SDL2 and you can compile to Web 
Assembly with it.


Re: Thread-local persistence

2017-03-21 Thread hcorion
What compiler are you using on both Mac and Linux. If your using clang on Mac 
and GCC on Linux, try compiling it on Linux using clang.


Re: The Linux Game Jam 2017 - itch.io

2017-03-20 Thread hcorion
Cool! Do you think you could try a Web Assembly build of it?


Re: Mascot

2017-03-18 Thread hcorion
Or maybe eating a Snake on a rusty plate, with a large bite in the plate. And 
having a gopher roasting on a fire.

(sarcasm don't actually do that)

I really like the choice of animal, because

  1. Honey badger is a tough as nails, gutsy predator, and Nim can easily take 
on any other programming language. (Did you know that Honey Badgers have 
reportedly taken on Lions?)
  2. Honey badger is adaptable, it's pretty much everywhere, and because Nim 
compiles to C and javascript, Nim can go pretty much everywhere as well.
  3. The Honey Badger _"has few natural predators because of its thick skin and 
ferocious defensive abilities."_ Because Nim has clean python-esque syntax and 
speed like C, it can survive (and prosper!) in the wild.
  4. A Honey Badger makes a hoarse "khrya-ya-ya-ya" sound, just like @Araq when 
he...



_Looks at paper_

Wait a second.

Where did we get this information from?

* * *

All sources from wikipedia: 
[https://en.wikipedia.org/wiki/Honey_badger](https://en.wikipedia.org/wiki/Honey_badger)


Re: Mascot

2017-03-17 Thread hcorion
Holy smokes, I don't think I'd want to program in Nim if I saw that honey 
badger! I'd run away as fast as possible! 


Re: Google Summer of Code

2017-03-16 Thread hcorion
Hmm, interesting. Has Nim every been accepted into GSoC?


Re: Google Summer of Code

2017-03-15 Thread hcorion
Hmm, When you search for nim in Organizations there are no results. Perhaps 
@Araq or @Dom96 need to do something? I can't find anything about that.


Re: Nim to the browser with WebAssembly 1.0

2017-03-10 Thread hcorion
Very cool! I believe gcc recently got some experimental WebAssembly support, 
and I think the clang/LLVM stack also has it in the works. Awesome that it just 
works.


Re: Nim video tutorials

2017-02-27 Thread hcorion
Some other cool topics that could use a video tutorial is making games 
([2D](https://github.com/Vladar4/nimgame2) or 
[3D](https://github.com/krux02/opengl-sandbox) ).


Re: Nim status in various OS/Distro Package Managers

2017-02-24 Thread hcorion
> In addition to a table listing, perhaps this effort could result in a 
> universal Nim installer shell script, like Rust.

That tool is already in development and is called picknim, not public yet 
AFAIK. I believe @dom96 is working on it. I made a forum post a while ago 
asking about it, you can see it here: 
[https://forum.nim-lang.org/t/2713](https://forum.nim-lang.org/t/2713)


Re: Nim status in various OS/Distro Package Managers

2017-02-23 Thread hcorion
Windows via chocolatey: 
[https://chocolatey.org/packages/nim](https://chocolatey.org/packages/nim)

abandoned stuck at version 0.11.2


Re: unable to build PDF documentation

2017-01-24 Thread hcorion
@strikr Try removing the ~/.texlive directory. Apparently that solves some 
problems.

@axben AFAIK PDFs can only be generated by Latex using pdftex. You could 
probably just install latex and pdftex using something like msys2. You can also 
build the html docs using, _koch web_


Re: unable to build PDF documentation

2017-01-23 Thread hcorion
Nvm. Just install the _texlive-fontsextra_ package and all your problems will 
go away.


Re: unable to build PDF documentation

2017-01-23 Thread hcorion
I encountered this issue while attempting to build the Arch Linux AUR nim-git 
package. I think the issue had to do with not being in the right directory.


Re: unable to build PDF documentation

2017-01-23 Thread hcorion
I'm pretty sure the issue is that _nimweb_ is installed in nim/tools/ but 
web/website.ini is in /nim/web/website.ini and _nimweb_ is searching for 
_website.ini_ in /nim/tools/web/website.ini. There is probably a better way to 
explain that, you'll probably have to read it twice.


Re: Question about NimEdit

2017-01-22 Thread hcorion
> Any possibility of re-basing nimedit on nimx for tablet support?

I would love to see the official Nim editor use a nim-infused framework like 
nimx, rather than just a wrapper of libui or gtk.


Re: What do you think about Redox and Electron?

2017-01-13 Thread hcorion
I think the fact that they have the commitment and numbers to undertake such a 
project is astounding. It makes me want to learn rust and contribute to the 
project. The idea of having a completely rust based operating system sounds 
like something that could work. Redox for OS, Servo for browser, remacs for 
text editing. I would love to see some crazy projects like that in Nim but we 
just don't have the numbers yet.


What is picknim?

2017-01-10 Thread hcorion
Hi, so on issue [#5182](https://github.com/nim-lang/Nim/issues/5182) dom96 
mentioned that

> "users will be using the new _picknim_ to install Nim"

Is this the nim version of rustup I've been waiting for? The official successor 
to the unmaintained [nim-vm](https://github.com/ekarlso/nim-vm)? 


Re: Chocolatey Package for Nim?

2016-12-27 Thread hcorion
Yeah, the chocolatey package is unmaintanied by a 3rd party and has been for a 
while. You could file to go through the process to take over the package.


Re: Nim Modbus library

2016-11-29 Thread hcorion
I have no experience with modbus but 
[http://libmodbus.org](http://forum.nim-lang.org///libmodbus.org)/ looks good.


downloadFile in threaded proc: defaultSSLContext GC safe

2016-11-17 Thread hcorion
Alright, I've finally figured out async and threads, I just need to figure out 
how I can run downloadFile in a threaded proc.

I don't want to change any code in the nim source to make this happen, I've 
done a lot of browsing and I can't come up with anything that doesn't involve 
changing the compilers source code. The error: 


'ThreadedDownload' is not GC-safe as it accesses 'defaultSSLContext' which 
is a global using GC'ed memory

The thing is that I most likely will need to use SSL. Even if someone can show 
me how to create a new SSLContext inside the threaded proc that works I'd be 
happy.


Re: Are large projects slow to recompile?

2016-11-17 Thread hcorion
I assume it would be similar to how a large project in say C++, the more 
changes and larger the codebase the longer it takes to compile. Keep in mind 
though, the entire compiler (the largest public Nim project code wise) takes 
barely over a minute.


Re: Promoting Nim via Exercism

2016-11-12 Thread hcorion
Wow! Very cool! The name is quite off-putting, but it's great to see Nim 
available in one of the code practicing websites. I've been wanting to add Nim 
to CodeWars, reference issue here: 
[https://github.com/Codewars/codewars-runner-cli/issues/177](https://github.com/Codewars/codewars-runner-cli/issues/177)
 but I don't really feel like learning docker and fumbling around with bash 
scripts.


Re: Nim and Qt

2016-10-24 Thread hcorion
You can't right now. There are no Qt wrappers for Nim as Qt has done some funky 
stuff with their C code, and c2nim isn't quite good enough at interpreting C 
headers to tackle Qt without a lot of human editing. If you want to attempt it 
I and I assume other people would be very grateful. If no Qt isn't a 
showstopper for you, then you could try the [official gtk2 
wrapper](https://github.com/nim-lang/gtk2) or [this unofficial gtk3 
wrapper](https://github.com/StefanSalewski/nim-gtk3). I would also highly 
recommend [nimx](https://github.com/yglukhov/nimx) a cross-platform GUI 
framework in Nim. It wouldn't be the same as developing in something like gtk2, 
3 or Qt but for nim gui development, it's hard to beat.


Re: lulzz..

2016-09-13 Thread hcorion
Wait, what!?! Looks like it's been there from the start as well: [idetools.txt 
history](https://github.com/nim-lang/Nim/commits/a66dea4c754cae0ce8617c569d1b82448eb6dc5d/doc/idetools.txt)


Windows built version of Nim producing casting errors

2016-09-08 Thread hcorion
Hi all, I'm experiencing some odd errors. I was trying to compile 
[reactor.nim](https://github.com/zielmicha/reactor.nim) on my windows machine, 
to see how far I could get. However I started receiving casting errors that 
builds on other OS's shouldn't have. Should I report this is as a bug? 


reactor\uv\uvstream.nim(33, 18) Error: type mismatch: got (int, culong)


I've tried building Nim using both gcc (nim installed version) and vcc and 
tried compiling reactor.nim using both gcc and vcc, still I get the same eror. 
Specs:

  * Windows 10 Pro 64-bit build 14393
  * Visual Studio 2015 Update 3
  * nim version 0.14.3



git hash: 56baf82b70448480a77992a9ea36921cfdd17ab2 active boot switches: 
-d:release

  * gcc (x86_64-win32-seh-rev1, Built by MinGW-W64 project) 4.9.1
  * C:Nimdistmingwbingcc.exe




Re: New feature in nimx

2016-09-06 Thread hcorion
@yglukhov Woah, the rod editor looks really awesome. I'm not entirely sure, 
because it doesn't have a description, but it's a video editor, right? How far 
along is it?


Re: Help with asynchronously downloading file

2016-08-19 Thread hcorion
Alright, So I tried to create a simple AsyncHttpClient, but I was unable to 
figure out how to use it... This is as far as I got: 


import httpclient, asyncdispatch, os
proc main() {.async.} =
  var client = newAsyncHttpClient()
  echo("HERE!")
  var resp = await client.request("https://ca.yahoo.com/?p=us";)
  echo("THERE!")
  #writeFile("test.html", resp.body)
  client.close()
var doneTest: bool = false
proc newWaitFor*[T](fut: Future[T]): T =
  if (fut.finished == false):
echo("Before poll")
poll()
echo("After poll")
  else:
doneTest = true
echo "done!"
fut.read
var i = 0
while doneTest == false:
  i += 1
  #echo (i)
  if i >= 40:
newWaitFor(main())


It never actually completes for some reason...


Re: Help with asynchronously downloading file

2016-08-18 Thread hcorion
Thanks dom96, when I try to download using httpclient.download file I get 


 Error: 'threadFunc' is not GC-safe as it accesses 'defaultSSLContext' 
which is a global using GC'ed memory

I've never used threads before, so my scripting may be wrong, here is my 
attempt at it:


import locks
import httpclient
var L: Lock
proc threadFunc(interval: tuple[url, output: string]) {.thread.} =
  acquire(L) # lock stdout
  echo interval.url
  downloadFile(interval.url, interval.output)
  #echo interval.b
  release(L)
initLock(L)
var thread: Thread[tuple[url, output: string]]
createThread(thread, threadFunc, 
("http://s2.q4cdn.com/242125233/files/doc_downloads/test.pdf";, "test.pdf"))
joinThread(thread)


It's roughly based on the example here: 
[http://nim-lang.org/docs/threads.html](http://forum.nim-lang.org///nim-lang.org/docs/threads.html)

I have yet to try the AsyncHttpServer method, I'll have to try that one next. 


Re: thounghs about Nim language in godot

2016-08-15 Thread hcorion
Hey, that's cool! Has anybody started a binding for godot yet? Does someone 
want to start a git repo, maybe an official one? This guy: 
[https://github.com/ggVGc/nim-godot](https://github.com/ggVGc/nim-godot) seems 
to have started, but it was a year ago, before this whole push for these new 
languages.


Help with asynchronously downloading file

2016-08-14 Thread hcorion
Hi all! So I'm writing a custom sort of package manager. However it needs to be 
GUI, and I can't just stop the gui and download the files (taking up to 4-5 
mins to download). So, when the user presses a button, it will trigger a 
procedure that should check if a download has been started, if it hasn't it'll 
start it. I have have a separate procedure that the GUI library calls (iup) 
every, say 500 milliseconds, in which I would check if the download is complete 
and then execute it, if not it will update a progress bar. The progress bar is 
not super important, but it is handy.

I'm unsure how to start an async download, and then check in a different 
procedure if it has completed.

Thanks, hcorion

P.S. It only needs to run on Windows.


Re: Difficulty getting started with aporia.

2016-08-09 Thread hcorion
I develop my Nim code mostly on Windows, and I just use Atom and keep a 
terminal open. I tried using Aporia, but I had trouble installing it, because 
at the time (I don't know if this is still a problem) It was rather hard to 
build aporia from source on windows (and gosh darn, I wanted the bleeding 
edge!).


Port of older raytrace example to SDL2 and Nim 0.14.2

2016-08-07 Thread hcorion
Hi All,

I was wandering around the internet and found this post: 
[http://forum.nim-lang.org/t/167](http://forum.nim-lang.org///forum.nim-lang.org/t/167)

and wanted to try it out, however, it was quite old and built on SDL1, so I 
took it upon myself to port it to SDL2. Of course, only after did I realize 
that there was this version of it: [github raytrace benchmark by 
zezba9000](https://github.com/zezba9000/RayTraceBenchmark/tree/master/Nim) 
(that may or may not compile, I haven't tried) that was better off benchmarking 
wise and didn't have the SDL dependency.

Anyway, here is my port of the original to SDL2: 
[https://gist.github.com/hcorion/3cfc1e11fac888ab6fd2b853009c275a](https://gist.github.com/hcorion/3cfc1e11fac888ab6fd2b853009c275a)


Re: Best 2D game engine for nim?

2016-08-03 Thread hcorion
**Libman**, I was actually looking for some mostly straight (SDL2, SFML etc. is 
OK) nim game engine, not using a pre-built engine. **Vladar**, I can't wait! 
I'll be checking the forums!


Best 2D game engine for nim?

2016-07-31 Thread hcorion
LOL, I can't beleive it, now we can have nim game engine wars :P. So which one 
is better? 
[https://github.com/rnentjes/nim-ludens](https://github.com/rnentjes/nim-ludens)
 or [https://github.com/Vladar4/nimgame](https://github.com/Vladar4/nimgame) ? 
Do they basically function the same? Which one has more support?


Re: nim-chipmunk7 demos

2016-06-26 Thread hcorion
: