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)

problem with template (or types)(i think)

2018-01-22 Thread SolitudeSF
i have a piece of code which i managed to reduce to [this minimal form](https://play.nim-lang.org/?gist=c4bfec49071f6afa42e266437781eeec) import sequtils type Color1 = array[1, int] Color2 = array[1, int] Color = Color1 | Color2 Image1 = seq[seq[Color1]]

Re: Nim Syntax ''Skins''

2018-01-22 Thread yglukhov
I've used to speak curly braces before Nim, and I agree with @allochi. Nim syntax is nice for the most part. I don't think syntax is something worth discussion as long as it is consistent. On the other hand, splitting the community to different camps is likely to weaken (or bury) the ecosystem.

Re: Nim Syntax ''Skins''

2018-01-22 Thread dom96
> I do hope for some kind of syntax revision in the future, probably before Nim > 1.0, with some changes to improve code consistency. Please tell us what you would like to see. Nim 1.0 might be closer than you think so these kinds of changes will have to happen soon.

Re: Nim Syntax ''Skins''

2018-01-22 Thread allochi
Thanks @dom96, I hope I didn't offend anyone with my post. Simply put, I don't care which syntax Nim adopt, if you guys decide tomorrow to make it Cish or Rubyish, I'm fine, as long as there is one syntax that is consistent and readable. So far for me Nim standard syntax is quite expressive and

Re: Partial casing is foo_bar

2018-01-22 Thread coffeepot
It seems like most of the style insensitivity issues are to do with FFI to case sensitive languages like C, where library developers have relied on case to distinguish variables, rather than problems developing in native Nim itself. In regard to aliasing, I often find myself wanting a shorter na

Re: Nim Syntax ''Skins''

2018-01-22 Thread dom96
> This thread scares me as a new Nim user It scares me too. Things like [this](https://github.com/nim-lang/Nim/issues/7124#issuecomment-359458919) make me want to change the language. There is a limit to how many different ways it should be possible to do the same thing. While Araq seems to lo

Re: Partial casing is foo_bar

2018-01-22 Thread dom96
> Araq if you want to succeed with this language you need to realize how silly > it is to have style insensitive name parsing. It really isn't that big of a deal. Don't judge a book by its cover. Try the language and if you find some genuine problems with style insensitivity then report them. I

Re: Partial casing is foo_bar

2018-01-22 Thread thething
Thanks Wizard for pointing out that this comes from Ada. Now at least there is an explanation for it.

Re: lib\pure\asyncmacro.nim(43, 27) Error: attempting to call undeclared routine: 'callback='

2018-01-22 Thread monster
@dom96 I tried your idea, and it didn't work. Then I changed the forward declaration to be a "normal" proc, and implemented it lower down to just delegate to the async proc (asyncCheck sendMsgExternally(...)), and it didn't work either. I'll try to build an example now. If it's an async macro bu

Re: Nim Syntax ''Skins''

2018-01-22 Thread allochi
This thread scares me as a new Nim user, for all the reasons mentioned before, I don't wish for Nim to have multiple syntaxes. I also come from a C style kind of languages and I love it, and I hate the indentation style, this is one of my problems with Python (one, there are many), but I choose

Re: Nim Syntax ''Skins''

2018-01-22 Thread wizzardx
How about Racket-style #lang pragmas? That way you can use any syntax or semantics you want in a given module, so long as your "lang" definition contains a parser

Re: Partial casing is foo_bar

2018-01-22 Thread wizzardx
Besides OpenGL, there's also SDL2, which can't be faithfully represented because of partial casing, eg SdlError enum, vs say SDL_Error. On the other hand, recently working with Ada, I see there's a lot of case insensitivity there too, which is a point in it's favor: [https://en.wikibooks.org/wi

VS Code integration is great

2018-01-22 Thread wizzardx
Hi there! I've tried getting minimal IDE-type setups working for a lot of langs recently. They more or less work, but don't have working features like "jump to definition" (especially into the standard lib), or are otherwise really hard to get working and configured right. This is helped a lot

Borrowing ideas from Ada (2012)?

2018-01-22 Thread wizzardx
Have opened a ticket on github with a related feature request: [https://github.com/nim-lang/Nim/issues/7122](https://github.com/nim-lang/Nim/issues/7122) But also bringing it up on the forum for possible further discussion. Anyhow, I'm a big "high integrity"-type fanboy. I don't program in Ada (

Re: Dynamic dispatch and star wars

2018-01-22 Thread mashingan
Afaik, OOP (for example in Java) still need which method can be override, which final, which abstract method(/class). If the author didn't set those info, nothing for lib's users able to override or do anything the original lib. Actually you're incorrect that a proc can be redefined across modu

Re: Nim Syntax ''Skins''

2018-01-22 Thread thething
Hi I would like to add another voice of reason to this question. As Krux02 says, the consequence of this permissiveness is that now we can't do something as simple as refactor some variable name with a find and replace. Or go find all its occurences in the source code. So Nim project does not wa

Re: Partial casing is foo_bar

2018-01-22 Thread thething
Araq if you want to succeed with this language you need to realize how silly it is to have style insensitive name parsing. Its even dumber than not declaring types which you have already identified was a bad idea. Strike it off before 1.0.

Re: lib\pure\asyncmacro.nim(43, 27) Error: attempting to call undeclared routine: 'callback='

2018-01-22 Thread dom96
Try changing the forward declaration by replacing the async pragma with `: Future[void]`. Seems like an async macro bug.