Re: Partial casing is foo_bar

2016-07-19 Thread OderWat
Basic was probably one of the most influencing factors for us all sit in front of computers. C is also a pretty simple language, as is Javascript. There is nothing wrong with keeping stuff simple. Nim kinda suffers from feature creep for a long time. You can call it experimenting though. Consid

Re: Partial casing is foo_bar

2016-07-19 Thread LeuGim
> Simplify, simplify, simplify Such a language already exists, Basic. But instead of just using that probably it's more fun to choose one of the most feature-rich languages and advertise triple simplicity for it. Then further steps: promote rejecting pointer arithmetic in C and OOP in Java.

Re: Partial casing is foo_bar

2016-07-19 Thread OderWat
BTW: Why not giving my font to the compiler so that he can decide which identifiers look to similar for me to use?

Re: Partial casing is foo_bar

2016-07-19 Thread cdunn2001
I'm torn. I _love_ Araq's attitude on this. He's right that languages should reject similar identifiers, or flag them, or consider them the same. It's bad coding. However, I'm not looking for the perfect language. A major strength of **Nim** is the easy foreign-function-interface, and this redu

Re: Methods in Javascript backend

2016-07-19 Thread OderWat
Don't ask me how I know that... Voila: # nim js -d:nodejs -d:release --hints:off type Obj {.exportc.} = object name: cstring surname: cstring fullname: proc(): cstring greet: proc() proc `&`(a,b: cstring): cstring {.importcpp: "

Re: Partial casing is foo_bar

2016-07-19 Thread Krux02
> For example, GLint / GL_INT is a problem - I mean, IIRC doesn't one represent > an int type and the other an enum? Is that sensible naming? The source of > this particular problem is the library, not CS/CI/_. I just think they're > named badly and are ambiguous about what they really are. Case

Methods in Javascript backend

2016-07-19 Thread andrea
It seems that methods are not compiled to method calls in the javascript backend. I am sure there are very good reasons of incompatible semantics here. Yet there are js APIs that require being able to pass objects with methods to library functions. How would one generate the equivalent of this j

Re: Partial casing is foo_bar

2016-07-19 Thread coffeepot
Seems like there are two separate things in this thread. * One, some people don't want _ to be ignored, * Two, some people don't like case insensitivity. In my _opinion_ case insensitivity is better. > What are the pros and what are the cons of 100% matching identifiers. I do > not see ma

Re: Read the file in the proper encoding

2016-07-19 Thread OderWat
Writing transparently re-encoding open/read functions for general usage may be possible but is hardly a "system level" functionality. I guess that should need to go into an extra (external) module. Adding BOM to the encodings module may be interesting. But technically I think it belongs into th

Re: Intuit QuickBooks Error support Number @ (+1888-436-4111) QuickBooks technical support number

2016-07-19 Thread Raxwell123
QuickBooks error TECH SUPPORT NUMBER!!1888.436.4111!!((QuickBooks error Customer Support Phone NUmber QuickBooks error TECH SUPPORT NUMBER!!1888.436.4111!!((QuickBooks error Customer Support Phone NUmber QuickBooks error Customer Service Number !!1888.436.4111!!QuickBooks error support

Re: Quickbooks Error Support Number, $$1888*436*4111$$ QuickBooks_technical_Support_NUmber

2016-07-19 Thread Raxwell123
Intuit QuickBooks Error support Number Call us @ (+1888-436-4111) for Intuit QuickBooks technical support phone number. Call : #1888*436*4111#. 24/7. for Intuit QuickBooks Error support Number by trained cadre for all kind of issues regarding your Intuit QuickBooks Errors support.QuickBooks Erro

Quickbooks Error Support Number, $$1888*436*4111$$ QuickBooks_technical_Support_NUmber

2016-07-19 Thread Raxwell123
QuickBooks ERROR phone number,(1888.436.4111)// QuickBooks ERROR customer care number. QuickBooks ERROR Toll Free, Intuit@(1888.436.4111)@~: QuickBooks ERROR Technical Support Number, QuickBooks ERROR help desk phone number ERRORvides online solution for all USA/CANADA clients. For any help

Intuit QuickBooks Error support Number @ (+1888-436-4111) QuickBooks technical support number

2016-07-19 Thread Raxwell123
TEch Help & Support ++18~88~436~4111 ++Quickbooks Error Support Number#Help & Support ++1888.436.4111 Quickbooks Technical Support Number Quickbooks customer support1888.436.4111 telephone number,Quickbooks customer support telephone number,Quickbooks customer support toll free number,Quickbooks

Re: Partial casing is foo_bar

2016-07-19 Thread OderWat
@LeuGim: But that would mean I had to write if structure.structureType = StructureTypes.STRUCTURE_TOWER. I think that would be even worse :) I just changed the compiler to at least not ignore _ such that foo_bar != foobar != fooBar. That is quite easy and needs just some few fixes in the compil

Read the file in the proper encoding

2016-07-19 Thread Garry_Galler
Will it be possible in the future to add to the system a procedure for open\read file in the proper encoding? While I use this variant: import strutils proc readFile*(filePath:string, sourceEncoding:string, destEncoding:string = "UTF8"): Ta

Re: Partial casing is foo_bar

2016-07-19 Thread wulfklaue
> That is leaving the audience to cope with a design decision based on a > personal opinion. And yes. This is my personal opinion. Its not only your opinion because i also agree with you. It has advantages but the disadvantages do seem to out way the advantages. **Non-uniformal type including**

Re: Partial casing is foo_bar

2016-07-19 Thread LeuGim
_OderWat:_ {. pure .} could be used for the enum in your example, no renaming then needed. * * * I'd like some special character to be allowed at the end of identifiers, be that underscore, or (better) apostrophe (`'`), or something else present on keyboards. `x`, `x'`, `x''`, or `x`, `x_`, `x

Re: ANSI vs ASCII in Windows Shells?

2016-07-19 Thread Garry_Galler
To display the console in Windows, I use import windows var str = encodings.convert(text, $GetConsoleCP(), "UTF-8") It will run on any computer with Windows, regardless of language locale. Or just turn on the console code page UTF-8: discard SetConsoleC

Re: Partial casing is foo_bar

2016-07-19 Thread Krux02
@Araq Please try to be objective. Nobody forces you to change anything. You can leave the style insensitiveness in this language just for the sake to distinguish it more from other languages and make Nim a more unique experience. I think everybody can live or deal with it, there are no major pro

Re: Calling Nim compiled to dll from Java programs?

2016-07-19 Thread alexsad
Thanks, but I think jnim using as run Java programm on JVM from Nim but I need run C code (wrote on Nim and compled to dll) from Java.

Re: Calling Nim compiled to dll from Java programs?

2016-07-19 Thread yglukhov
Not sure if I can answer your question, but [jnim](https://github.com/vegansk/jnim) allows bridging to java in a nice automagical way.

Re: Partial casing is foo_bar

2016-07-19 Thread OderWat
I want to be polite but I find it just ignorant to say "search tools should become smarter..." because one of the search tools is my brain and my brain says: foo_bar != foobar != fooBar. That is leaving the audience to cope with a design decision based on a personal opinion. And yes. This is my

Calling Nim compiled to dll from Java programs?

2016-07-19 Thread alexsad
Tried anybody do like here: [Java programming with JNI](http://forum.nim-lang.org///www.ibm.com/developerworks/java/tutorials/j-jni/j-jni.html) But compiled a dll from Nim? Does exist an example?

Re: Partial casing is foo_bar

2016-07-19 Thread Araq
* Search tools should generally become smarter anyway. And the Unix "tools" are all abominations anyway. * the indirection would be necessary anyway for performance. * It's just better than other programming languages. * Compile-time errors are not "bugs".

Re: Partial casing is foo_bar

2016-07-19 Thread Krux02
Yes this get's discussed a lot. And yes there are problems: * Non-conflicting names in C libraries become conflicting names in nim wrappers. See OpenGl wrapper for example. (No `cGL_INT` is not a sane name) * common search tools such as [grep](https://www.gnu.org/software/grep/manual/grep.ht

Re: Partial casing is foo_bar

2016-07-19 Thread OderWat
@araq ... nobody enforces you to write _foo but I would love to use _ for temp variables or proxied values. I don't see any reason why a programmer can't use them as he wants besides your opinion about what is ugly and what is not :)

Re: Partial casing is foo_bar

2016-07-19 Thread Stefan_Salewski
We generally do not have to write _foo. My suggestion was only for the few people who needs this feature, maybe to wrap an exotic lib without being willing to put much work in text mangling. That people can use full case sensitivity with underscores for VERY FEW identifiers and are happy. And we

Re: Partial casing is foo_bar

2016-07-19 Thread OderWat
The only time I got a problem so far is in Nim-Screeps. There I would need something like this: type StructureTypes = enum STRUCTURE_SPAWN STRUCTURE_TOWER Structure = object of RootObj structureType: StructureTypes StructueSpawn

Re: Partial casing is foo_bar

2016-07-19 Thread Araq
> That is easy to implement and allows to fix ALL of the rare real problems. It doesn't fix the problem that I don't want to write `_foo`. Nim is not Python, it doesn't need ugly naming to indicate "that's private" or "that's a member" or whatever the distinction between `_foo` and `foo` should

Re: How to use different C compiler?

2016-07-19 Thread Araq
> I have serious doubts concerning concentration on 3 compilers when in > embedded environment the compiler is likely to be produced by a company, one > may never have heard of before Most embedded compilers follow GCC though when it comes to command line options, many are forks of GCC in fact.

Re: macro changing type of const literals not working

2016-07-19 Thread clj
Yup, should have checked on devel (was using 0.14.2)! Thanks for trying that. I think the version of the macro I posted may not descend into the include statement so I'll get devel built and check that out.

Re: Partial casing is foo_bar

2016-07-19 Thread Stefan_Salewski
@cdunn2001 > partial-casing causes problems. Can you provide examples? For the gtk related libs, I had initially indeed problems two years ago when Nimrod was fully style insensitive. But now with partial casing there are no problems, types like Buffer start with capital letter, and procs or te

Re: macro changing type of const literals not working

2016-07-19 Thread flyx
Works for me on devel. However, the bit with the `include` does not.

Re: Partial casing is foo_bar

2016-07-19 Thread Araq
What kind of problems? All I know it means you have to come up with sane names sometimes. You know, names you can actually _talk_ about. (I know talking about code is uncommon, but still.)

Partial casing is foo_bar

2016-07-19 Thread cdunn2001
> Partial casing is simply the next logical step, IMHO. As our editors grow > smarter and smarter they should allow us to present the code in the way we're > most comfortable with. This means the freedom to render fooBar as foo_bar > instead. What's necessary to accomplish this goal? fooBar has

Re: Partial casing is foo_bar

2016-07-19 Thread zielmicha
I agree it causes problems, but having identifiers in existing libraries with same partial-cased names is very rare. (It might be a good idea to allow _XX and XX_) Making partial-casing a compiler flag is a worse idea than disabling it (most existing code anyway won't compile with this flag).

macro changing type of const literals not working

2016-07-19 Thread clj
I'm trying to change the type of integer literals in a const block using a macro. The macro looks like this: import macros macro uint32_const_type(s: stmt): stmt = proc walk(s: NimNode) {. compiletime .} = case s.kind: of nnkStmtList:

Re: Does Nim prevent long compilation times in generic dependencies?

2016-07-19 Thread cdunn2001
A trick to improve build times in **C++** is to concatenate the source files. (Or equivalently, `#include` all files into a single compilation unit, which maintains source line numbers for debugging.) Precompiled headers provide almost no speed-up at all for templates, in my experience. In **Ni

Does Nim prevent long compilation times in generic dependencies?

2016-07-19 Thread Krux02
First of all, a bit of my history. I worked in a C++ with a very generic 3D Mesh data structure (OpenMesh). Everything was templated, and I could add arbitrary data to vertices, edges, halfedges and faces. The data structure was basically the non-plus-ultra in 3D geometry representation. But it