My Joomla is wrong on the local site

2019-01-13 Thread siavash82ir
My Joomla is wrong on the local site Hello friends I have a site that I've downloaded for someone and I've installed it in local. I do not know what JoomlLeauer is and what's wrong with me! ( ! ) Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in

Re: Arraymancer - v0.4.0 (May 2018)

2019-01-13 Thread itm
Something I read about today, another approach to implementing tensors... [http://nlp.seas.harvard.edu/NamedTensor](http://nlp.seas.harvard.edu/NamedTensor)

Re: Any advice on doing composition well in Nim

2019-01-13 Thread nucky9
This is something that I think is worth discussing a bit, because as someone who does a lot of reading about game dev, you see a lot of strong opinions expressed, but not always with a lot of explanation about the reasoning. For instance, I think the idea to prefer composition instead of

Re: Cannot define `(T: type) -> T` proc within a template defined in another template

2019-01-13 Thread solo989
For that matter I'm not even sure proc prc2(T: type): T = echo otherParam Run is supposed to compile. Your supposed to pass types to procs with the [] syntax if you want to use them in your parameter list or as a return type. Luckily if you declare the proc like:

Re: Any advice on doing composition well in Nim

2019-01-13 Thread zetashift
Oh that's a sweet solution. I this will be absolutely great for now thanks :D!

Re: Any advice on doing composition well in Nim

2019-01-13 Thread carterza
Maybe try something like this - type EntityType* = enum etFighter, etMage Fighter* = object Mage* = object Color* = object RenderOrder* = object Entity* = ref object x*, y*: int chr*: char color*: Color

Re: Cannot define `(T: type) -> T` proc within a template defined in another template

2019-01-13 Thread solo989
try this: prc[A](T: type[A]): A = echo otherParam Run

Any advices for performant tcp listener?

2019-01-13 Thread tweenietomatoes
I am looking to prepare a tcp listener which is capable of listening several thousands of concurrent connections (maybe tens of thousands). Yes not millions etc. Ok, maybe not like zeromq(zeromq.org) but something like quarter * quarter or less of it maybe?? I tried Python asyncio and tornado ,

Re: 404 status code for Macro Tutorial

2019-01-13 Thread darek
https://forum.nim-lang.org/t/4544#28433

404 status code for Macro Tutorial

2019-01-13 Thread kobi
404 status code for Macro Tutorial [https://nim-lang.org/docs/tut3.html](https://nim-lang.org/docs/tut3.html) in Learn Nim ([https://nim-lang.org/learn.html](https://nim-lang.org/learn.html))

Re: How to iterate over a seq[seq[int]] to keep only columns?

2019-01-13 Thread cag104
This works perfectly, thank you! I manages to simply transpose the matrix to get what I wanted, but this makes your code snippet was very helpful.

Re: How to iterate over a seq[seq[int]] to keep only columns?

2019-01-13 Thread cag104
This is for coding homework where we are not allowed to use external packages. Otherwise yes I agree!

Any advice on doing composition well in Nim

2019-01-13 Thread zetashift
So I currently have this `Entity` type which is the base structure of every entity in my game(items, players, NPC's, mobs) and so far I had the structure of: Entity* = ref object x*, y*: int chr*: char color*: Color name*: string blocks*:

Re: Cannot define `(T: type) -> T` proc within a template defined in another template

2019-01-13 Thread deansher
The behavior that you describe seems like a bug, when I compare it to the following excerpt from the manual: > Whether a symbol that is declared in a template is exposed to the > instantiation scope is controlled by the inject and gensym pragmas: gensym'ed > symbols are not exposed but

Re: Cannot define `(T: type) -> T` proc within a template defined in another template

2019-01-13 Thread moigagoo
UPD: It compiled when I made both templates `{.dirty.}`. So the issue is solved (we really need a way to update thread titles). However, if anyone could explain why that helped, I'd be really grateful.

Cannot define `(T: type) -> T` proc within a template defined in another template

2019-01-13 Thread moigagoo
Hi! I need to generate a parametrized template with a proc defined in it, which accepts a type and returns the type instance. When I define such proc manually, there's no issue. But when I define it within the tempale, compilation fails with undefined identifier error. Here's the minimal code

Re: How to iterate over a seq[seq[int]] to keep only columns?

2019-01-13 Thread miran
> If you want to work with matrices I advice you to work with a library like ... ... [Neo](https://github.com/unicredit/neo)

Re: How to iterate over a seq[seq[int]] to keep only columns?

2019-01-13 Thread BigEpsilon
If you want to work with matrices I advice you to work with a library like [Arraymancer](https://github.com/mratsim/Arraymancer) instead of doing it by hand. It will be [easier](https://mratsim.github.io/Arraymancer/tuto.slicing.html) and more efficient.

Re: SQL modules args/string santization

2019-01-13 Thread mikra
the values are typed so sqlinjection isn`t possible I think. but internally the values are converted to strings. See [https://github.com/nim-lang/Nim/issues/9453](https://github.com/nim-lang/Nim/issues/9453) .

Re: Associating data to types

2019-01-13 Thread lotzz
you can also hold data on types by using static though then it needs to be known at compileTime type typeWithData[data:static[auto]] = distinct object var a:typeWithData[10] echo a.data #outputs 10 Run

Re: How to iterate over a seq[seq[int]] to keep only columns?

2019-01-13 Thread Stromberg
This works, however I'm looking forward to see what others come up with. let rows = @[@[2, 4, 1], @[2, 0, 2], @[1, 1, 2], @[0, 0, 0]] for index in rows[0].low .. rows[0].high: var column: seq[int] for row in rows: column.add(row[index]) echo("column = ", column)

How to iterate over a seq[seq[int]] to keep only columns?

2019-01-13 Thread cag104
I have this seq[seq[int]] object: @[@[2, 4, 1], @[2, 0, 2], @[1, 1, 2], @[0, 0, 0]] Run I want to iterate over each column so that I can perform a function on the entire column. So the output should be: column = @[2, 2, 1, 0] column = @[4, 0, 1, 0]

Re: Some nim builtin libs not doing enough error checking?

2019-01-13 Thread cumulonimbus
This pattern (of e.g. checking dirExists before doing things in the directory) is known as LBYL (Look Before You Leap), and often leads to security problems known as TOCTOU (Time-of-check/Time-of-use) if the answer changes between the test time and the use time - depending, of course, on