Re: What is the purpose of tables.allValues()?

2019-04-14 Thread cdunn2001
I think I get it now. Makes sense. [https://github.com/nim-lang/Nim/pull/11030](https://github.com/nim-lang/Nim/pull/11030)

Re: OpenWL/DL - two foundation libraries for building a cross-platform GUI with non-C++ languages

2019-04-14 Thread dewf
Not sure about mingw. I presume it would need some new build/project files, unless mingw can work with .vcxproj files directly? (Currently each platform has its own platform-specific project files [VS2017/XCode/CMake]) I can look into it in the near future if you want to open an issue on OpenWL.

Re: nimpretty non installed by choosenim stable

2019-04-14 Thread moigagoo
On a separate note, Nim itself could ship with nimpretty since its already in the same repo anyway. This idea was dismissed in favor of moving nimpretty into a separate nimble package but that necer happened. And if that's the plan, than why aren't we following the same decision for choosenim?

Re: jester: Can't access javascript or css files

2019-04-14 Thread nnahito
Thank you for your answer! I try to remove the dot in the path after fixed! Thank you!

Re: jester: Can't access javascript or css files

2019-04-14 Thread nnahito
Thank you for your reply! And thank you for considering the fix! I am looking forward to it!! Thank you!

Re: OpenWL/DL - two foundation libraries for building a cross-platform GUI with non-C++ languages

2019-04-14 Thread shashlick
I tried wrapping openwl with [nimterop](https://github.com/genotrance/nimterop) and the nested union in the WLEvent struct threw it off. I really need to implement nested definitions support. Anyway, does openwl compile with mingw on Windows? Was also curious how easy it would be to use openwl

Re: OpenWL/DL - two foundation libraries for building a cross-platform GUI with non-C++ languages

2019-04-14 Thread dewf
Long story short I picked it because I was already committed to using a Quartz2D (aka CoreGraphics) API for drawing, and CoreText kind of came along for the ride. I don't have enough experience designing APIs of my own, especially something of that scale, so it just made sense to use what Apple

Re: OpenWL/DL - two foundation libraries for building a cross-platform GUI with non-C++ languages

2019-04-14 Thread treeform
So you manage to write CoreText API like layer on top of DirectWrite on windows and pango-cairo on linux? Why did you decide to use CoreText instead of say, inventing your own api? I can see some of it here: [https://github.com/dewf/opendl/blob/218f992bebedbdb13c5236a4564d2e94a4e706fd/source/wi

Re: OpenWL/DL - two foundation libraries for building a cross-platform GUI with non-C++ languages

2019-04-14 Thread dewf
Yes, this is very doable. The beauty of OpenDL is, since I'm implementing the Apple APIs, I can just link you to their documentation: To load custom fonts, use [CTFontManagerCreateFontDescriptorsFromURL](https://developer.apple.com/documentation/coretext/1499500-ctfontmanagercreatefontdescripto?

Re: What is the purpose of tables.allValues()?

2019-04-14 Thread cblake
A documentation PR seems reasonable. Go for it. If you need to undo multiple add calls to `Table` then you should be able loop until you don't find the key anymore, but yeah, you don't know what order values for the key will arrive in that loop. There's no secondary order discipline like FIFO or

Re: What is the purpose of tables.allValues()?

2019-04-14 Thread cdunn2001
> proc add(): > > puts a new (key, value) pair into t even if t[key] already exists. This can > introduce duplicate keys into the table! I see now. `allValues()` is the analogue to `add()`. I assume that `del()` and `take()` remove the entire list of values that were added for a given key. And

Re: Is allowing non-matching types for assignment overloading in the development timeline?

2019-04-14 Thread JohnAD
No need apologize! Holy cow ... how did I not know about `converter`? I've been coding Nim for over a year now and I just now learned of it. I will have to re-read the manuals again. I wonder if there are any other hidden nuggets I've missed.

Re: What is the purpose of tables.allValues()?

2019-04-14 Thread cblake
The relevant discussion: [https://github.com/nim-lang/Nim/pull/2078#issuecomment-73744634](https://github.com/nim-lang/Nim/pull/2078#issuecomment-73744634)

Re: OpenWL/DL - two foundation libraries for building a cross-platform GUI with non-C++ languages

2019-04-14 Thread treeform
Can the OpenDL text features be used to load a custom font and render it to a hidden rgba pixel buffer? (instead of using system fonts and rendering it to window that is being displayed)

Re: What is the purpose of tables.allValues()?

2019-04-14 Thread cblake
While it is a little unusual to see it, open addressed tables can support multiple keys (as a set or associatively as a table). I believe most other collision resolution schemes can, as well. So, a Nim `Table` is what some people call a "multi-set". Whether you have unique keys depends upon the

Re: What is the purpose of tables.allValues()?

2019-04-14 Thread cantanima
Maybe I misunderstand you, but doesn't it depend on the implementation, and aren't there sometimes advantages to doing it this way? ? In one of my C++ projects, I store multiple values for a key, and simply search at

What is the purpose of tables.allValues()?

2019-04-14 Thread cdunn2001
[https://nim-lang.org/docs/tables.html#allValues.i%2CTable%5BA%2CB%5D%2CA](https://nim-lang.org/docs/tables.html#allValues.i%2CTable%5BA%2CB%5D%2CA) I suppose it returns extra values for hash collisions, but I would expect hash collisions to lead to chaining, not extra values for the same key. Ca

Re: Con/IO terminal library for dummies

2019-04-14 Thread Aiesha_Nazarothi
So... It's published: [https://nimble.directory/pkg/conio](https://nimble.directory/pkg/conio)