Re: Is there a 'protected' or module-local scope modifier?

2019-05-28 Thread jrfondren
Friends: somepkg / [types, core, other_stuff] Run Strangers: somepkg Run Since low-level code is available in Nim, privacy can always be broken by someone defining their own copy of your types with their own fields, and then casting your type to t

Re: [Challenge]How short or efficient can you make this code?

2019-05-21 Thread jrfondren
Can you describe, in English, what this is even supposed to do?

Re: Problem trying to compress the http response data!

2019-05-16 Thread jrfondren
Try miniz instead. [https://github.com/treeform/miniz](https://github.com/treeform/miniz) zip/zlib.nim defines ulong as 32-bit, so it fails with 64-bit zlibs.

Re: Alternatives to using an object variant type with a duplicate field name across branches?

2019-05-01 Thread jrfondren
It fails to compile though, with: Error: duplicate case label

Re: Alternatives to using an object variant type with a duplicate field name across branches?

2019-04-29 Thread jrfondren
Consider: type Actions = enum Accuracy, Maturity, Id, Phase, Skip, Status Action = object case kind: Actions of Accuracy: acc: range[1..9] of Maturity: maturity: range[1..9] of Id: id: int of Phase: phasenote: strin

Re: "First natively compiled language with hot code-reloading at runtime"

2019-04-29 Thread jrfondren
There are Forth systems that can do this as well. You have to manage everything yourself and your code might not work or be compiled to native code on other systems, but this is true of everything else in Forth. Erlang also has hot code loading with versioned code and precise and easy ways to m

Re: Handling EOF asynchronously?

2019-04-23 Thread jrfondren
That error's from compiler/lowerings.nim , where we find this test for flowVars: proc flowVarKind(t: PType): TFlowVarKind = if t.skipTypes(abstractInst).kind in {tyRef, tyString, tySequence}: fvGC elif containsGarbageCollectedRef(t): fvInvalid else: fvBlob

Re: Communication of the Nim language

2019-04-22 Thread jrfondren
After reading this thread the other day I spent some hours building the website and learning about jekyll/liquid and preparing some code samples that were at least somewhat varied and that fit into the rather small space the website gives to the code. But when I got to the CSS crafting stage, I