Re: let dans tous ses états question about the future

2019-10-18 Thread DTxplorer
As far as I understood, he wants to declare a "let" and initialize it later.

Re: Future of Nim ?

2019-06-01 Thread DTxplorer
It seems all the major operating systems are written mainly in C.

Re: Nim vs V language

2019-04-03 Thread DTxplorer
Unfortunately the main dev doesn't want operator overloading.

Re: "Nim needs better documentation" - share your thoughts

2019-03-22 Thread DTxplorer
I don't have internet connexion these days. I'm curious to see if the browsing is better. Thank you for the info.

Re: "Nim needs better documentation" - share your thoughts

2019-03-21 Thread DTxplorer
Hi, I just discovered Zeal browser and that made docs reading (like terrible GNU docs) less painful. [https://www.casimages.com/i/19032110495424237016167956.png.html](https://www.casimages.com/i/19032110495424237016167956.png.html) A VS code extension can open the docs from editor.

Re: Forum Colors - some low contrast

2018-12-28 Thread DTxplorer
Even the black letters on the white background is a bit aggressive.

Re: Should we get rid of style insensitivity?

2018-12-05 Thread DTxplorer
The first letter sensitivity can be used in proc arguments too, to save time.

Re: Can't assign a new object to a reference

2018-12-05 Thread DTxplorer
Such errors gave me headeaches.

Re: Need help for a generic object field

2018-11-24 Thread DTxplorer
If you want your program to spawn objects during runtime you'll need ref objects.

Re: Need help for a generic object field

2018-11-24 Thread DTxplorer
I just read your answers carefully and I will tests these solutions, my project is much more complex than the example. Thank you all for taking the time to write such insightful answers.

Need help for a generic object field

2018-11-24 Thread DTxplorer
Sorry for that basic topic but I want an object field to be able to handle two differents types with a clean syntax on the user side. No problem if the code behinds the scene is a hacky template or something, but the user should never need to see that. I written a simplified example.

Re: Should we get rid of style insensitivity?

2018-11-21 Thread DTxplorer
Case typos are not a big issue. Compilers errors messages will points you in the right line. If you import C identifiers (or other languages) style insensitivity may introduce hard to find bugs. In some cases the compiler can silently replace a_thing by aThing . It's less common than typos,

Re: Should we get rid of style insensitivity?

2018-11-19 Thread DTxplorer
I'm too "casual" to submit a relevant opinion, I just want to add a little "-" to the yglukhov enumeration : Insensitivity can scares newcomers. Most languages are fully sensitive and most people are used to include the style as a part of the identifier and to use the style to reduce the need

Re: Partial casing is foo_bar

2018-11-16 Thread DTxplorer
I had headeaches trying to find why my first opengl triangle looks like that [https://nsm09.casimages.com/img/2018/11/16//18111610551424237015998588.png](https://nsm09.casimages.com/img/2018/11/16//18111610551424237015998588.png) After two days I accidentally discovered that in a certain file

Re: Why illegal storage access here ?

2018-11-15 Thread DTxplorer
Ok, thank you !

Why illegal storage access here ?

2018-11-15 Thread DTxplorer
I tried to do a search but it's not helpful (the forum search should look in the titles first) type Example = ref object a:seq[string] var anExample:Example proc function(ex:Example, txt:string) = ex.a.add(txt) # " SIGSEGV: Illegal storage access.

Re: Error with Glew

2018-11-14 Thread DTxplorer
Thanks for the answer. I found a workaround by creating this c file who does the includes. #ifndef C_INCLUDES # define C_INCLUDES # include "GL/glew.h" # include "GLFW/glfw3.h" //glfw3 must be the last include #endif Run I added this

Error with Glew

2018-11-13 Thread DTxplorer
Sorry for the boring topic. I'm writing a side project for fun using Glew and Glfw. And I encounter an external compiler error. A test file who reproduces the error. const GLFW_CONTEXT_VERSION_MAJOR = 0x00022002 GLFW_CONTEXT_VERSION_MINOR = 0x00022003

Re: Version 0.19.0 is out

2018-09-29 Thread DTxplorer
Thanks to all contributors !

Re: the Fibonacci benchmark

2018-09-29 Thread DTxplorer
If Nim compiles to C Nim is not faster to C but Nim may produce faster C code than human programmers.

Re: Nim partners with Status.im

2018-08-09 Thread DTxplorer
Congratulation !

Re: Few mixed up questions

2018-05-03 Thread DTxplorer
To use C code in Nim I compile the C files with -c option (on GCC), then I use {.link: "your_binary.o".} pragma in Nim files and simple {.importc.} for each function or type. Maybe there is uses cases where importing headers is necessary but I haven't encontered this case for the moment. (maybe

Re: Perfecting Nim

2018-04-29 Thread DTxplorer
@Allin I didn't find basic2d and basic3d, in the docs the links are dead.

Re: Though about identifiers in text editors.

2018-04-04 Thread DTxplorer
> Yeah, that's precisely why it's done and you should follow it. It's that > simple. > > Why not make the compiler enforce it? Because there are genuine cases where > it's just easier to not follow the convention (eg. wrappers). But the > convention is there to motivate people >to follow it,

Re: "multiple definition" Problem

2018-03-09 Thread DTxplorer
I solved this by adding the "stb_image.nimble" file in my project folder (I had just the "stb_image" folder). I haven't the motivation to investigate what happened exactly, but anyway, that works.

"multiple definition" Problem

2018-03-08 Thread DTxplorer
Hello I try to use the [stb_image](https://github.com/define-private-public/stb_image-Nim) lib. I made this minimal test for my question. import stb_image/read as stbi var width, height, nrChannels:int var test = stbi.load("some_image.jpg", width, height, nrChannels,

Re: Overloading Module Access Operator

2018-03-05 Thread DTxplorer
I can understand aedt rationale. The dot is already used to access objects members. aedt idea made things clearer for me. But maybe I misunderstood the real semantic of these expressions. Anyway, thanks for the tip Araq.

Re: [RFC] Cyclic imports and symbol dependencies

2018-02-27 Thread DTxplorer
I 'll try to concentrate the simple types only (not compound types), in their own module and try to keep a very hierarchical project structure, I hope it will be enough ! > In fact, we have a figured out quite a few details already of how a pre-pass > in the compiler could work to provide this

Re: Strings and C.

2018-02-18 Thread DTxplorer
That makes sense.

Re: Strings and C.

2018-02-18 Thread DTxplorer
Thanks again cdome. I have another question with C but I want to avoid polluting the homepage with noobish topics. And strings are kind of sequence isn't it ? I want to pass a sequence to a C function but the result is unexpected. Two files for minimal example. proc

Strings and C.

2018-02-15 Thread DTxplorer
Hi I imported a c function who take a char array as argument. I pass a Nim string to it but the 3 first characters aren't expected, like this one "|" and random special chars who can't be displayed by the forum. Code example import streams #import the c function. proc

Re: How to embed a header file into a .nim file

2018-02-11 Thread DTxplorer
I solved this by using "\--passL" instead of "\--passC "

Re: How to embed a header file into a .nim file

2018-02-09 Thread DTxplorer
I tried to import a C file, that includes GLFW, in "test.nim", like this but I fail. nim c --passC: '`pkg-config glfw3 --static --cflags --libs`' test.nim before that the .o file is created succesfully, like this. gcc -Wall -c test.c -I. All GLFW

Re: Is there any Textadept user here ?

2018-02-08 Thread DTxplorer
@Jipok I found a decent black theme, [here](https://github.com/rgieseke/textadept-themes) but yours is nice too.

Re: Nim Dogfooding

2018-02-06 Thread DTxplorer
The forum is very usable but a small set of tags for topics would be useful, like "ide", "compilation", "syntax" for example . Nim's users base can grows, especially if a Nim 1.0 will be released.

Re: Is there any Textadept user here ?

2018-02-05 Thread DTxplorer
My version is 9.6. ui.set_theme() is the good function for me (and not set_theme()), so it seems "ui" is also a buffer. The concept of buffer remains mysterious for me, but Textadept is usable now.

Re: Is there any Textadept user here ?

2018-02-03 Thread DTxplorer
Thanks for the quick answer but I have another question. How do you know the name of the "buffer" you want to set ? The manual is not very clear about this.

Is there any Textadept user here ?

2018-02-03 Thread DTxplorer
Hi, I tried Textadept today I don't know where is the community so I ask here because this editor supports Nim. I read all the API and manual during hours and I didn't found how to set the default font size. Any help is welcome.

Re: Nim Syntax ''Skins''

2018-01-22 Thread DTxplorer
If Nim main dev wants to implement a new feature, and this feature uses a token (or a whole expression) already used by a skin. How will you prevent the breaking of many existing code ? (Sorry if the english is not very good)

Re: NimScript

2017-12-06 Thread DTxplorer
I'm interested in NimScript as a portable "make-like", but I have some questions. What's the purpose of the string in the `task` expression ? What's exactly the purpose of `setCommand` since you can control the compiler and the O.S using `exec` ? What is the problem encountered if we don't use

C file location

2017-12-04 Thread DTxplorer
Hi, I never had time to really test this great language, in consequence I'm a kind of eternal noob, so I apologize for the trivial problem. I try to bind a minimal C function for learning purpose. c_function.h int addTwo(int x) { return x + 2; }

Re: thounghs about Nim language in godot

2017-08-05 Thread DTxplorer
Thank you for the clarification. Sorry I didn't see you removed the autoloaded .gdns file.

Re: thounghs about Nim language in godot

2017-08-03 Thread DTxplorer
That binding bloats Godot project much more than the C++ and D bindings, it's sad.

Re: thounghs about Nim language in godot

2017-08-03 Thread DTxplorer
Nake tells my GODOT_BIN path is "invalid". GODOT_BIN path: /home/drit0/Programmes/Godot3.0/godot-master/bin But it is not true, I'm pretty sure it is the exact path of Godot.

Re: thounghs about Nim language in godot

2017-08-01 Thread DTxplorer
Hi Tiberium. I installed godot-nim using "nimble install godot" command succesfully but with this warning. Warning: File 'apigen.nim' inside package 'godot' is outside of the permitted namespace, should be inside a directory named 'godot' but is in a directory named 'apigen'

Re: thounghs about Nim language in godot

2017-08-01 Thread DTxplorer
I try to follow instructions from the project examples [https://github.com/pragmagic/godot-nim/tree/master/examples/stub](https://github.com/pragmagic/godot-nim/tree/master/examples/stub) but when I run nake build nakefile.nim(5, 8) Error: cannot open 'godotapigen'

Re: thounghs about Nim language in godot

2017-07-28 Thread DTxplorer
Unfortunately this binding needs a forked version of the engine. You must consider this binding as a W.I.P. Anyway it's nice work and I hope this will be completed soon.

Re: thounghs about Nim language in godot

2017-07-28 Thread DTxplorer
I wonder how the Nim particular OOP works with the Godot Engine and his huge inheritance tree. Maybe it does not matter... But anyway, this engine is gradually gaining popularity and it can help Nim language to be more spreaded.

Re: Nim to C transpiler

2017-07-28 Thread DTxplorer
What amazes me is that Nim is a bit faster than some recent languages who compiles directly to machine language.

Re: [noob] enums and index

2017-07-12 Thread DTxplorer
Thanks for the help Araq. The Nim enum behaves differently so I think this code reproduces better the Cpp code behaviour. const ITALY = 0 GERMANY = 1 PORTUGAL = 2 var capital: array = ["Rome", "Berlin", "Lisbon"] echo capital[PORTUGAL]

[noob] enums and index

2017-07-12 Thread DTxplorer
Sorry for the noobish question. I want to understand how using the enums like in C/C++ // Example program #include #include using namespace std; int main() { enum country {ITALY, GERMANY, PORTUGAL}; string capital[] = {"Rome", "Berlin",