by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
From IRC (bridge bot)
@FromIRC
<Araq> I remember supporting .dynlib: procCallHere() but it's not tested and never worked well
<Araq> bbl
Ghost
@ghost~5a1ecef8d73408ce4f80e118
No, redis has no cmp proc implemented. I don't understand why so many rely on ascii comparison...
(at least the nim package has not)
federico: I would prefer lmdb at first place. I looked at your package but it seems to rely on a c cmp proc. I have a pure nim like: proc cmp(a, b: string): int
From IRC (bridge bot)
@FromIRC
<shashlick> araq: okay i've put in a disclaimer that DLLs are not supported yet in nimdeps, I agree it is fragile and I don't want to hack it in. Also, dynlib: xyz won't work since nimdeps cannot require changes in modules that do the dynlib, e.g. stdlib pcre
Ghost
@ghost~5a1ecef8d73408ce4f80e118
I'm not skilled enough to wrap pure nim with c and at the same time know that no memory leaks appear
From IRC (bridge bot)
@FromIRC
<federico3> @tim-st: perhaps there's a way to set a cmp implemented in Nim
Ghost
@ghost~5a1ecef8d73408ce4f80e118
yes, I thought so, too. but this would take hours for me to find out :\
btw @federico3 it would be easier if your lmdb package would compile the c code instead of wrapping the dll like here: https://github.com/NimCompression/nimsnappyc/blob/master/nimsnappyc/snappyc.nim
From IRC (bridge bot)
@FromIRC
<federico3> do you specifically need a custom cmp?
<adeohluwa> I wonder what Machine Learning looks like in Nim right now
Ghost
@ghost~5a1ecef8d73408ce4f80e118
yes, I implemented the fastest unicode collation algorithm that exists and I need it for German
From IRC (bridge bot)
@FromIRC
<Yardanico> adeohluwa, check arraymancer :⁠)
<adeohluwa> Yardanico bless you man!
<federico3> @tim-st: oh interesting
<ipjk> @dom96: I can try, otherwise I make an issue.
<shashlick> @ephja: nim-lang/packages#733
Kaushal Modi
@kaushalmodi
I have an extra module for a pkg foo which I have in the foo/ dir. But if I try to do export foo/extra, I get the error "cannot export foo / bar"
I meant "cannot export foo / extra"
If I move extra.nim in the same dir as foo.nim, and do "export extra", that works
But then nimble install will complain
Taking this as example: https://github.com/nim-lang/nimble#private-modules, export foobar/utils will not work.
.. neither does export "foobar/utils"
From IRC (bridge bot)
@FromIRC
<Araq> paths are for imports, export just takes the module name
<Araq> good night
Kaushal Modi
@kaushalmodi
thanks, I'll try that. Good night
thanks, that worked:
import foobar/helpers
export helpers
From IRC (bridge bot)
@FromIRC
<bozaloshtsh> is the only way to get code coverage numbers to use the coverage package and modify literally all of my proc definitions?
<Yardanico> you can use "push" to apply a pragma to all procs in the module
<bozaloshtsh> I'll try that, thanks
<bozaloshtsh> is push's effect local to the current module or does it affect imported modules?
From IRC (bridge bot)
@FromIRC
<dom96> I believe it's the former
Ray Imber
@rayman22201
Trying to build the website locally and some example asserts are failing. Is this a known issue?
Hint: /home/ray/Nim/Nim-devel/lib/pure/times_examples  [Exec]
times_examples.nim(190)  times_examples
system.nim(3803)         raiseAssert
system.nim(2857)         sysFatal
Error: unhandled exception: toTimeInterval(a) ==
    initTimeInterval(0, 0, 0, 10, 0, convert(Seconds, Hours, -dt.utcOffset), 1, 0, 0, 1970) times_examples.nim(190)  [AssertionError]
Error: execution of an external program failed: '/home/ray/Nim/Nim-devel/lib/pure/times_examples '
[Examples] failed

Error: execution of an external program failed: '/home/ray/Nim/Nim-devel/tools/nimweb web/website.ini --putenv:nimversion=0.18.1'
FAILURE
From IRC (bridge bot)
@FromIRC
<dom96> Yes, it's known
<dom96> There is an issue in the Nim repo about it somewhere
Kaushal Modi
@kaushalmodi
@rayman22201 That's a known bug, see the workaround here: https://github.com/nim-lang/Nim/issues/8032#issuecomment-397086115
.. or you need to move to the east of Greenwich to bypass that bug :P
Ray Imber
@rayman22201
lol. a good excuse for a vacation. Thanks guys
Kaushal Modi
@kaushalmodi
How can I parse the doc-string to a template in that template? Or can I?
This is the template:
template defun*(self, fsym, max_args, body: untyped) {.dirty.} = ## \
  ## emacs_func(env: ptr emacs_env, nargs: ptrdiff_t,
  ## args: ptr array[0..max_args, emacs_value], data: pointer):
  ## emacs_value {.exportc.}
  ## The `fsym` is registered as the name in emacs and also
  ## be registered in Nim with nimEmacs prefix.
  ## If you include "_" in the function name, it will be converted "-"
  ## in Emacs.
  static:
    self.pushFunction(astToStr(fsym), max_args)

  proc `fsym`*(env: ptr emacs_env, nargs: ptrdiff_t,
               args: ptr array[0..max_args, emacs_value],
               data: pointer): emacs_value {.exportc,extern: "nimEmacs_" & self.libName & "_$1".} =
    body
and here is an example use of that:
emacs.defun(return_t, 1):
  ## Returns ``t``, always.
  env.intern(env, "t")
I'd like to capture "Returns t, always." and save it to a var inside that template defun. I plan to pass that as a new argument to that pushFunction proc.
ephja
@ephja
shashlick: thanks for reminding me
apathetic coder at your service
From IRC (bridge bot)
@FromIRC
<shashlick> 👍
ephja
@ephja
done. man, that was intense
Varriount
@Varriount
@kaushalmodi That will probably require a macro, not a template. Even then, documentation comments can only appear at certain points in the AST
From IRC (bridge bot)
@FromIRC
<shashlick> varriount: will appreciate a review of nimdeps when you get a chance
Kaushal Modi
@kaushalmodi
@Varriount Thanks. Isn't the doc comment for return _t at the right place?