Re: How to start NIM on Linux ?
I already answered that question above. Knoppix is Debian based. Try `sudo apt-get install nim` from a terminal. Also no need to start and end with a greeting everytime ;)
Re: How to start NIM on Linux ?
I have the KNOPPIX LINUX Computer online. I am online with LINUX now. How can i find the package NIM ? Regards Menno hexo
Re: Newyear is coming , is 2017 the year for nim?
An optimistic but reasonable growth goal for Nim's takeoff is a threefold popularity increase per year for the next few years. If that was so, it would roughly mean this a year from now: * 10,000 [github stars](https://github.com/showcases/programming-languages). * 10,000 [+"nim programming"](https://www.google.com/search?q=%2B"nim%20programming";) search results. * 330 people in #Nim on FreeNode. That would be a big increase in growth compared to the past, but if that comes to pass then 2017 will indeed be our break-through year. I'll bump this a year from now to see if we come close. ;) At that rate we'd probably hit [TIOBE Top 100](http://forum.nim-lang.org///tiobe.com/tiobe-index/) in 2018. The growth itself won't be linear of course, but it's a more reasonable estimate than "poof and we're Java". :P
Re: GUI programming
Hi , Agent means to be a flexible tool between in some programming strategies. For example : Application needs a external program with features that are not so easy to program in the main Apps language that is used. or a interface app etc. As i can see from your kindly answers in this forum NIM is very flexible and the GUI can be chosen from a good few ones. When you compare this with other languages. NO. Not possible. You MUST use this library. ha
Re: Newyear is coming , is 2017 the year for nim?
I have heard that 2017 will already be the year of Linux on the desktop, so Nim might have to wait one more year.
Re: How to start NIM on Linux ?
I see that i have i386 System
Re: GUI programming
Well, maybe start here, they have a lot of starting GUI tutorials -- not one for Nim currently: [http://zetcode.com](http://forum.nim-lang.org///zetcode.com)/
Re: Newyear is coming , is 2017 the year for nim?
Wicked sense of gallows humor, @Ar! > When we gonna have a stable api for 1.0 ? Over under bet: Nim 1.0 or "Winds Of Winter"? @Ar's O/U: Nim 1.0 or "A Dream Of Spring"
Re: GUI programming
Thanks. Yes i am new in LINUX. Not new in programming but i have made the programming strategy ready in the last 2 years. So i am interested in a flexible language as a agent language. For example : type C Code and insert that code but use another GUI library as GTK. I dont like GTK and QT definetly. Thus i want to take a different one. NIM is running here good on my windows computer together with the Aporia Text Editor. Also running on Knoppix Linux would be a huge opportunity. WBR Menno hexo
Re: GUI programming
Agent? You mean to program a bot or some AI?
Re: GUI programming
Just try them all (not only libui) and see what you like best. Create a simple _hello word_ button. You will also learn that most GUI libraries are not that different from each other. May be only some features. The same counts for different programming languages as well. New paradigms are more difficult to learn, but once you know them it is easy to adapt.
Re: GUI programming
Libui Access Granted
Re: How to start NIM on Linux ?
Yes, at (you may also try the unstable one): [https://packages.debian.org/stretch/amd64/nim/download](https://packages.debian.org/stretch/amd64/nim/download) You may also find other packages there. Just search for them. Sometimes you have to download all the dependencies you are missing as well, but `dpkg` will tell you what is missing. If you are using Debian Stable it could be that the Testing or Unstable Nim package will not install. In that case you will have to rebuild the "deb" package using `dpkg-buildpackage`, hopefully you do not have to do that :D.
Re: GUI programming
Yes. But for most of them you are actually using and learning the same interface as the one you would use when using C, Python etc. I am not sure if you are new to programming. In modern programming it is best to be flexible about learning new libraries. The way all the different GUI libraries work are not that different from each other. It is more like learning MS Word and Open/LibreOffice Writer. If you learn how to use a GUI library at a abstract level (the concept behind it) it will be easier to adapt that knowledge to other situations (different library / language etc.).
Re: How to start NIM on Linux ?
HI again , i have a windows computer that is online. Is it possible to get there a .deb package with NIM ? WBR Menno hexo
Re: GUI programming
> Do i have to learn a new GUI language for that programming ? When you have experience in GTK3 programming in C already, you can just start with GTK3 and Nim, it is very similar. You can even convert C GTK3 code to Nim with the tool c2nim, do some modifications, and are done. But to be serious, you told us that you are new to Linux, new to Nim and new to GUI programming. And I guess new to programming at all? So maybe better start with a more traditional language and GUI, maybe Java with its own GUI, or C++ or Python with Qt. Or Windows native GUI, Android GUI, or Mac Swing language. I think for these more detailed tutorials exist. Later you may come back to Nim.
Re: GUI programming
Oh , thats very flexible. I am impressed. Do i have to learn a new GUI language for that programming ? I think yes.
Re: Newyear is coming , is 2017 the year for nim?
`lim v -> 1` or buffer overflow / out of memory :D
Re: GUI programming
And of course nimx and QML. And note that latest GTK 3.20 wrapper is at [https://github.com/ngtk3](https://github.com/ngtk3), I will delete the old 3.15 wrapper in the next days...
Re: GUI programming
You can also use `libui`. A simple cross platform UI library. I found a Nim wrapper at (by Araq): [https://github.com/nim-lang/ui](https://github.com/nim-lang/ui) If you need a UI for use in a game or very interactive application you may try out a Immediate Mode Graphical User Interface. Have a look at: [https://github.com/vurtun/nuklear](https://github.com/vurtun/nuklear) You need to create a wrapper for it using `c2nim`.
Re: GUI programming
depending on what you want, there are wrappers for [GTK2](https://github.com/nim-lang/gtk2) [GTK3](https://github.com/StefanSalewski/nim-gtk3) , and [AntTweakBar](https://github.com/krux02/nimAntTweakBar). The last one is just meant to be used as an overlay for game development and therefore supports widgets to manipulate vectors and quaternions, but offers little when you want to control how it looks.
Re: Newyear is coming , is 2017 the year for nim?
> Before v0.9 we need v0.9.9 Hmm ;-/
Re: How to start NIM on Linux ?
I updated my comment above. If the computer is offline. Download the packages from a computer with an internet connection and store them on a USB drive. In Debian and Ubuntu you can use `apt-get download nim`. Store the downloaded files on a USB drive. On the offline computer, after mounting and changing directory to the USB drive, you can then do `dpkg -i *.deb` (yes, Debian and Ubuntu use another utility called `dpkg` for doing local package management). Most if not all package managers can install loose package files (deb, rpm etc.) from disk as well. It will tell you when it misses a dependency. A more advanced way, but sometimes used because of security policies is creating your own package source (instead of one from the internet). You can also mirror an existing online package source on disk and use it offline. In debian you can use `apt-mirror` for that. **Note**: if you install packages you usually need to do it as `root` (like Administrator on Windows) or else it will tell you it failed. It is better to prepend every command that needs to be `root` with `sudo`. Example.: `sudo apt-get install nim`.
Re: How to start NIM on Linux ?
Thank you. You mean it is better to make a normal install with the command apt-get install nim ? My Linux computer is a offline computer. Have to make it online in the next weeks. I try further the offline installation a while. Then swiitsch to the official Online installation procedure. Thank you for your help. Regards Menno
Re: How to start NIM on Linux ?
Hello Menno, To add a directory inside the path you can do `export ${PATH}:/some/directory`. Modify `/some/directory` to the directory where the `nim` binary (executable) resides. You can also add this line inside the hidden files (every file or dir that has a dot . in front) named `.profile` or `.bash_profile` inside your home directory so this command is executed automatically the next time you log in. For most Linux distributions it is not needed to compile everything yourself or find packages on the Word Wide Web like you have to do with Windows. Always try the official package manager first. Most package managers support adding extra sources of packages. In Debian they call it "sources", in Ubuntu they call it "repositories" and in Gentoo (which I use) they call it "overlays". If you cannot find the package you need, first look if you can add one of those package sources that contain the package you need (make sure the source is official, can be trusted and is stable). After you added the package source you should be able to install the package you need. To install Nim in Ubuntu or Debian you can do `apt-get install nim`. In case you use a Redhat / Fedora based distribution may be someone else can help you with that. It could be that you need to add a package source or still have to download and install an RPM package. Make sure to update your Linux once in a while.
Re: Using concepts for generic structures
Tnx. I read the document `generics.txt` before I started using the `concept` keyword. Somehow I was under the impression concepts could be parameterized for me to refer to the contained value. Of course a container type may not even have `value` (it could be a function type or have a pair of values [if not a tuple]) while still being valid according to what I want. It would have been nice if I could do `T & T` or `T is Semigroup` because then `concept` does not need to know about the structure of contained types. Emmy looks interesting. It seems to extend the basic number types to be monoids under addition and multiplication (which they are). I already created `NumberSum`, `NumberProduct`, `LogicalOr` and `LogicalAnd` whose values are then under the their respective operation. I like how Emmy uses `zero` and `id` to denote identity for addition and multiplication. In a C library I wrote I called it `sum_identity` and `product_identity`. I would like something like `zero`, `one` or `id`, `half`, `double` to be standard.
GUI programming
Hello , i am new in NIM. What mwthod is used for GUI programming ? A library ? Regards Menno
How to start NIM on Linux ?
Hi , i am new in Linux and have installed the NIM package with sh bulid.sh in a folder Now i want to start the command line compiler. Dont know how. When i type nim -v in the terminal it is not shown. Seems i have to set the PATH to the system. export etc. How can i set the path correct ? Need help to make the installation complete and run the NIM compiler. Regards Menno
Re: Newyear is coming , is 2017 the year for nim?
Hmmm var v = ".9" while true: echo "Before v0", v, " we need v0", v, ".9" add v, ".9"
Re: texts on nim's language design
But i don't think that's the fault of the language if you define a proc with a name as generic as "open", or maybe it should foresee how people behave, which is something to think. Araq used to say that he can't fix people's habit, maybe he is more on the side of providing freedom in spite of problems like the one you described. On the other hand, nim does sopply of certain tools to avoid these problems, for example: from libfoo import nil from libbar import nil libfoo.open() # Now you are forced to use the full name. Maybe there could be a compiler switch to make it the default.
Re: App compiling option
Either you are missing some dlls or for some reason ld can't find them: C:/Nim/nim152/dist/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86 _64-w64-mingw32/bin/ld.exe: "cannot find -lgdi32" C:/Nim/nim152/dist/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86 _64-w64-mingw32/bin/ld.exe: "cannot find -lcomdlg32" [https://www.lifewire.com/how-to-fix-comdlg32-dll-not-found-or-missing-errors-2623189](https://www.lifewire.com/how-to-fix-comdlg32-dll-not-found-or-missing-errors-2623189) or maybe is related to your mingw installation.
Re: texts on nim's language design
Elaborating on ambiguity. import libfoo import libbar open() # open is coming from foo. Later down the road libbar decided to add proc open(). Second developer (Not the original author of above code) needed to use the latest version of libbar , in some other part of the code. Compiler might report the ambuigity and be done. But the burden of namespace resolution falls on second developer's head to figure out open() was added to by libbar's new version and the open() was meant to be from flibfoo. >From libbar's point of view, addition of new optional elements in api becomes >a breaking change requiring major version change.
Re: texts on nim's language design
First few things that comes to mind are: 1. Ambiguity (two modules exporting same thing), i guess compiler will catch and report this. 2. During a code review, unless one has a mental model of module exports, it would be difficult to trace what is coming from where. More pronounced if the source code is large with several imports.
Re: Document Challenge #1
I already used the edit button once. I really do like it.
Newyear is coming , is 2017 the year for nim?
When we gonna have a stable api for 1.0 ?
Re: texts on nim's language design
Can you tell me what you think the problem might be? What do you think might become troubling with implicit imports?
texts on nim's language design
I am a lurker with general interest in programming languages. I would sincerely appreciate if any veterans here or @Araq could provide links (forum or outside) that discusses the reasoning behind the design decisions on the nim language grammer or code conventions. Taking import for example (but not limited to it only) I was looking at the unix socket example at [https://github.com/nim-lang/Nim/blob/devel/examples/unix_socket/server.nim](https://github.com/nim-lang/Nim/blob/devel/examples/unix_socket/server.nim) Coming from python and java background, i found implicit imports (like c's include) of module exports troubling (newSocket and constants in above example). If there are texts that discusses import net vs import net.AF_UNIX . Thanks
Re: Document Challenge #1
I spend some time on this 'edit' button for the documentation. Would be nice if it were used for minor edits. It's fine to start reddit discussions about major topics (like "how to classify macro usage?") but minor improvements can be done directly. The 'edit' button produces pull requests so there is still plenty of opportunity for QA.
Re: Document Challenge #2
How do you **"classify"** templates/macros? * lifting existing procs to handle new data types * reducing repetition of code * lazy evaluation ([eliminate evaluation](http://forum.nim-lang.org///nim-lang.org/docs/tut2.html#templates) when not required) * DSL handling * typedesc/symbol/object management, name mangling, * ?? The reason I ask, is I was wondering about logically classifying macros in the [tutorial#2](http://forum.nim-lang.org///nim-lang.org/docs/tut1.html), and then giving examples of each classification (or point to where it is used in modules).
Re: Document Challenge #1
@Araq (et. al.) Congratulations on [tutorial#1](http://forum.nim-lang.org///nim-lang.org/docs/tut1.html). There has been minimal feedback received on [reddit.com /r/nim](https://www.reddit.com/r/nim/comments/52jeoe/tutorial1_collaborative_improvement/) on improving the tutorial. If anyone wants to review the Tutorials and provide further improvements, do so ASAP.
Re: Thin C wrappers.
Look at [manual.html#foreign-function-interface](http://forum.nim-lang.org///nim-lang.org/docs/manual.html#foreign-function-interface) as it describes the `.union` pragma