<< 09-01-2018 >>

00:04:09*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:07:45*MJCaley joined #nim
00:28:15*Yardanico[Phone] quit (Quit: Quit)
00:54:38*xet7 quit (Quit: Leaving)
01:02:11FromGitter<data-man> https://github.com/leo-yuriev/libmdbx a big updates. Now supports dynamic DB size for Windows too.
01:04:10*marenz__ quit (Ping timeout: 265 seconds)
01:12:27FromGitter<RedBeard0531> Neat! I actually had a mostly working version of mongodb on top of lmdb before we decided to go with wired tiger. It had the right set of tradeoffs for us, but I still have a soft spot for lmdb
01:17:45FromGitter<RedBeard0531> @data-man are you working on mdbx?
01:18:14shashlick@data-man: what's your plan for scitenim?
01:20:55FromGitter<data-man> @RedBeard0531: Sometimes ⏎ @shashlick: I updated libs (Scintilla, Lua, SciTE) & renamed Nimrod -> Nim. I planned to add the nimsuggest support.
01:25:14FromGitter<data-man> @RedBeard0531: Sorry, not "on" and "with". :-)
01:30:12FromGitter<RedBeard0531> @data-man looks like they didn't fix my biggest annoyance. The custom compare functions really should take a user-supplied void* user data pointer: https://github.com/leo-yuriev/libmdbx/blob/master/mdbx.h#L258-L259
01:32:55FromGitter<data-man> @RedBeard0531: Are you using Windows?
01:34:16FromGitter<RedBeard0531> At the moment, yes. But I do all dev work on linux, either directly or via ssh.
01:34:46FromGitter<data-man> Try https://github.com/pmwkaa/sophia
01:35:47FromGitter<RedBeard0531> Given that we acquired WT and merged our dev teams I don't see us switching again any time soon :)
01:37:04FromGitter<data-man> Sophia not supports Windows :-(
01:42:05*Serenit0r joined #nim
01:42:05FromGitter<data-man> But there's fork for previous version with a dirty Windows support. https://github.com/stanhuff/Sophia
01:42:08*wurui__ joined #nim
01:45:59*Serenitor quit (Ping timeout: 276 seconds)
01:53:17FromGitter<Varriount> @RedBeard0531 WT?
01:54:23FromGitter<RedBeard0531> @Varriount http://www.wiredtiger.com/
01:55:56FromGitter<Varriount> Hrm, I'm not a big fan of Mongodb.
01:56:19FromGitter<Varriount> I was really turned off by the lack of debugging support when executing Javascript.
02:01:07FromGitter<RedBeard0531> There's always print() :) But seriously, server-side JS is a major PITA for us and we wish everyone would use the newer alternatives that we provide whereever possible.
02:01:25FromGitter<ervinbosenbacher> > https://github.com/leo-yuriev/libmdbx a big updates. Now supports dynamic DB size for Windows too. That is really really nice. I nearly forgot this one.
02:01:42FromGitter<ervinbosenbacher> I used to be a heavy user for various purposes
02:07:44*S1tiSchu joined #nim
02:11:01FromGitter<Varriount> @RedBeard0531 You can? That never seemed to work for me, at least, not when I ran scripts.
02:11:45*SitiSchu quit (Ping timeout: 264 seconds)
02:15:25FromGitter<RedBeard0531> Yup, although printjson() is generally more useful since it does something better than Object.toString()'s "[object Object]" useless output. In the shell it prints to stdout, in the server it prints to the log.
02:21:48*MJCaley quit (Quit: MJCaley)
02:27:50FromGitter<Varriount> Printing to a log? :/
02:34:40FromGitter<RedBeard0531> Where else would it go? It is intended for development purposes and the log defaults to stdout when you run the server in a shell. It is probably best to move to DM since this is fairly off topic for #nim
02:36:32*rupil quit (Quit: Connection closed for inactivity)
02:50:23FromGitter<data-man> Wow! Just now found it: https://github.com/pustladi/Windows-2000 :-)
02:53:54*dandevelo quit (Remote host closed the connection)
03:01:06*chemist69 quit (Ping timeout: 246 seconds)
03:15:33*chemist69 joined #nim
03:43:19*SitiSchu joined #nim
03:44:53*S1tiSchu quit (Ping timeout: 268 seconds)
03:45:25*martinium joined #nim
03:50:47*vlad1777d quit (Ping timeout: 276 seconds)
04:38:13*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:46:33*martinium joined #nim
04:48:45*arecaceae quit (Remote host closed the connection)
04:49:32*arecaceae joined #nim
04:54:18FromGitter<data-man> Hmm https://github.com/georgiy-pruss/NimMirror
05:00:25*Serenit0r quit (Quit: Leaving)
05:05:53*martinium quit (Quit: Textual IRC Client: www.textualapp.com)
05:06:59*wurui__ quit (Remote host closed the connection)
05:08:28*darithorn quit (Quit: Leaving)
05:40:01*yglukhov joined #nim
05:44:31*yglukhov quit (Ping timeout: 248 seconds)
05:50:17*ludocode joined #nim
05:53:23*ludocode quit (Remote host closed the connection)
05:53:37*ludocode joined #nim
05:56:01*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:56:23*ludocode quit (Client Quit)
05:58:22*ludocode joined #nim
06:04:13*onionhammer1 joined #nim
06:04:37*sz0 quit (Quit: Connection closed for inactivity)
06:05:54*onionhammer quit (Ping timeout: 272 seconds)
06:09:47*onionhammer1 quit (Read error: Connection reset by peer)
06:10:48*onionhammer1 joined #nim
06:28:05*onionhammer1 quit (Ping timeout: 240 seconds)
06:31:53*onionhammer1 joined #nim
06:38:48*nsf joined #nim
06:47:00*wurui joined #nim
06:53:04*wurui quit (Read error: Connection reset by peer)
07:00:06FromGitter<alehander42> @Yardanico typically you should be able to directly run the test file (if you can also run it succesfully with <python> <testfile> <args>) ⏎ do you have this python code somewhere in public ?
07:36:39FromGitter<Yardanico> Yes it's open source, I will post it later today
07:36:43FromGitter<Yardanico> @alehander42
07:38:34*PMunch joined #nim
07:38:48FromGitter<Yardanico> Also - what will happen if a field in a class can be of 3 different types? What will py2nim do?
07:49:17*heinrich5991 quit (Quit: quit.)
07:54:36*miran joined #nim
07:58:16FromGitter<alehander42> thanks, that would be very helpful
08:00:11FromGitter<alehander42> it depends, the design goal is to generalize it to a generic object type or to generate a variant
08:01:51*heinrich5991 joined #nim
08:24:30*Vladar joined #nim
08:24:52*claudiuinberlin joined #nim
08:35:32*endragor joined #nim
08:39:26PMunchdom96, just got plane tickets to go to FOSDEM :)
08:40:46PMunchNow I just need to find a cheap hostel to stay in
08:46:59*floppydh joined #nim
08:47:01*sendell joined #nim
09:03:27*gmpreussner quit (Ping timeout: 248 seconds)
09:05:22*gmpreussner joined #nim
09:16:11*zahary joined #nim
09:24:56*wurui joined #nim
09:42:06*wurui quit (Remote host closed the connection)
09:45:29*wurui joined #nim
09:50:45*wurui quit (Remote host closed the connection)
10:14:01*vlad1777d joined #nim
10:14:52*yglukhov joined #nim
10:15:06*Yardanico joined #nim
10:15:24Yardanico@alehander42 , are you around?
10:17:59*craigger quit (Ping timeout: 255 seconds)
10:18:53*craigger joined #nim
10:26:34Yardanico@alehander42 - don't take this example seriously (as I would anyway do a manual translation for now), but here's the file needed for test and python file itself: https://gist.github.com/Yardanico/e42fc343cbc3884871229aee376e51f3
10:26:49Yardanicono external deps required, this pyttanko is on github (not mine project)
10:32:02YardanicoI just want to somehow try to compete in terms of performance and/or code readability with https://github.com/Francesco149/oppai-ng :0
10:32:11Yardanicobut this C code is harder for me to understand than python
10:46:24FromGitter<ChristianWitts> that post just broke my gitter
10:46:41FromGitter<ChristianWitts> the gist just got inlined :D
10:47:23Yardanicowell this file format is config-like
10:47:46Yardanico(it's a beatmap from game and basically this script calculates how much points you'll get if you complete it)
10:48:40*gokr joined #nim
10:49:12gokrdom96: Here?
10:50:02gokrOr anyone really... I have a jester application and I want to pause during one call. I thought I could do "acyncCheck sleepAsync(2000)".
10:50:07livcdanyone wants to start short screencasts similar to rubytapas / justforfunc ? :D
10:50:59Yardanicolivcd, can you give a link to rubytapas/justforfunc?
10:51:57livcdhttps://www.youtube.com/watch?time_continue=361&v=t9bEg2A4jsw
10:52:04livcdi am watching / listening to this one atm.
10:53:27*onionhammer joined #nim
10:54:56*onionhammer1 quit (Ping timeout: 248 seconds)
10:58:11FromGitter<allochi_twitter> I watch justforfunc too, actually I was thinking of doing something like it once I get more familiar with the language and finish couple of projects.
10:58:47FromGitter<allochi_twitter> strange, the same guy made me check nimlang again
10:59:16Yardanicowho ? :)
10:59:53FromGitter<allochi_twitter> Francesc
10:59:54Araqgokr: yes, doesn't work?
11:00:06FromGitter<allochi_twitter> the justforfunc guy :)
11:00:42Yardanicogokr, asyncCheck will actually call sleepAsync as a different future
11:00:49Yardanicoso your async proc wouldn't block
11:00:58Yardanicotry "await sleepAsync(2000)"
11:01:26livcdYardanico: obivously he is doing it as his job as he is paid by google but a volunteer could make some content pay to get.
11:01:53FromGitter<allochi_twitter> Indirectly though, he has couple of talks in dotgo how Go didn’t do well with functional progemmaing and Machine Learning.
11:03:10livcdYardanico: now that i think of it rubytapas subscription is kind expensive
11:03:13dom96PMunch: Yay, awesome
11:03:13livcd18$/month
11:10:44PMunchI found one dirth cheap hostel close to the venue, but it had pretty horrible reviews :P
11:36:18gokrYardanico: Hmmm. I tried that first, but... let me check
11:39:29Yardanicowell, if jester awaits for your routes to complete - this would block your entire server
11:40:36dom96no, it wouldn't.
11:40:55dom96'await' pauses the current async proc
11:41:06dom96Not your application
11:41:26gokrdom96: I can't compile this.
11:41:37gokrawait asyncSleep(2000) - right?
11:41:42dom96sleepAsync
11:41:59gokrYes, sorry - I can't compile it
11:42:15gokrawait wants a FlowVar, sleepAsync gives a Future
11:42:29dom96So you're not inside an async proc
11:42:45gokrright, so... I tried adding that ... let me try again
11:42:48dom96and spawn shouldn't steal my keywords :P
11:43:09Araqoh yeah sorry about that, will fix it
11:43:34dom96Araq: yay, thanks
11:43:47dom96do we have interoperability between FlowVar's and Futures yet?
11:44:21gokrRight.. so async procs can't return something - right? God I feel daft
11:44:40dom96they can
11:44:57dom96proc foo(): Future[ReturnType]
11:45:12gokrduh
11:45:27dom96Reading chapter 3 of my book would help you out here, but I can understand if you don't have the time/money :)
11:45:53Araqdom96: we don't because I forgot how this should work
11:46:03dom96I'm going to try and make a website for Jester with some nice examples I hope.
11:46:17Araqa bit annoying I had a good idea of what needs to be done
11:46:24Araqand lost it.
11:46:26dom96Araq: D:
11:46:43dom96Next time write a quick issue to remind yourself :)
11:46:48Araqhey, usually that never happens :P
11:47:20dom96But here is what I have in my head: proc getFuture(x: FlowVar[T]): Future[T] (or some other name)
11:47:24gokrphew. Ok, so... that bubbled into a bunch of Future[yadda] {.async.} and a sprinkle of awaits - but now it compiled.
11:47:34gokrJust to get my damn pause ;)
11:47:42Araqwe can figure it out together
11:47:54dom96gokr: yeah, but if you weren't using async procs your code wasn't really async
11:47:55Araqgokr: os.sleep() not good enough in a threaded context?
11:47:58*crem quit (Ping timeout: 265 seconds)
11:48:16gokrFor anyone curious - this is a little server side thingy for https://getcanoe.io
11:48:26gokrdom96: True indeed.
11:48:36*sendell quit (Remote host closed the connection)
11:48:38gokrI am a n00b for the Nim async stuff
11:48:57Zevvthat's what brought me to nim, the async stuff :)
11:49:04dom96gokr: awesome. Might be worth adding that to here https://github.com/nim-lang/Nim/wiki/Companies-using-Nim :)
11:49:13dom96Zevv: :D
11:49:14gokrNot a company. ;)
11:49:14Araqdom96: no, FlowVar can inherit from Future
11:49:24dom96Araq: oh yeah, now I remember
11:49:29*crem joined #nim
11:50:07Araqand in the callback ... I ... what do I have to do in the callback?
11:50:38Yardanicodom96, if you use waitFor mymainproc() and in mymainproc you use await to other async procs - they will be able to block the entire application. Good that jester doesn't do that
11:50:42dom96Araq: complete the future
11:50:47dom96Araq: I think?
11:50:59dom96Araq: If you do come up with an implementation, make a PR so I can review it :)
11:51:21*vlad1777d quit (Ping timeout: 264 seconds)
11:51:39Araqoutline a test case please
11:51:59Araqotherwise it's like shooting at fog
11:52:15dom96Yardanico: not necessarily, any of the async procs you 'await' in mymainproc could be calling another async proc without awaiting it
11:52:46dom96Araq: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L42
11:52:58dom96Make it so I can 'await messageFlowVar'
11:53:12Yardanicodom96, well yes, I'm just about the case when you use await in other async procs
11:54:02dom96Yardanico: okay, but you shouldn't be thinking about it this way.
11:59:06Araqwhile true:
11:59:06Araq let inp = await messageFlowVar
11:59:06Araq asyncCheck socket.send(createMessage(username, inp))
11:59:08Araq messageFlowVar = spawn stdin.readLine()
11:59:10Araq asyncdispatch.poll()
11:59:12Araqthis way?
11:59:36Araqdoesn't seem to be right
11:59:46Araqit blocks your poll() loop
12:04:52dom96oh yeah, you're right
12:04:58*S1tiSchu joined #nim
12:05:15dom96if messageFlowVar.finished: let inp = messageFlowVar.read()
12:05:22dom96for this use case
12:05:27dom96but 'await' should be possible too
12:05:53dom96so in fact, you can do: messageFlowVar.callback = proc () = ...
12:06:00dom96that's a better way to implement this
12:06:13dom96instead of checking 'finished' every time
12:06:23*SitiSchu quit (Ping timeout: 248 seconds)
12:06:30dom96and 'await' is implemented in terms of 'callback' anyway, so implement this and it will just work (TM)
12:06:42Araqyeah hmmm
12:07:02Araqso I don't have to set callback in FlowvarBase, I need to call it once the data arrived
12:07:03miranspeaking of `finished` - Araq, dom96 said i should show this to you: https://forum.nim-lang.org/t/3465
12:08:56Araqoh yeah well
12:09:10AraqI agree but I'm not sure how to fix it.
12:09:38Araqclosure iterators are my worst design.
12:09:45miran:)
12:10:09Araqand now all of async depends on it...
12:10:16Araq:D
12:10:39Araqthat said, I had good intentions and the design makes some sense
12:10:51Araqwhen looked at from the right angle
12:10:52Yardanicois it possible to implement async without iterators ? :)
12:10:59Yardanicoin python they're implemented using iterators too
12:11:35mirani know you don't like python, but maybe you could take some inspiration from python's `iterator.__next__()`? https://docs.python.org/3/library/stdtypes.html#iterator.__next__
12:12:07AraqYardanico: via .liftLocals and gotoState, all undocumented
12:12:58dom96The async dependency on closure iterators is very well hidden
12:13:08dom96so do please fix it :)
12:13:12dom96we can fix async easily
12:13:37Araqmiran: lol I looked at that and thought "well it's an iterator, so I can call it. what does it mean to call it? to do the next() step obviously"
12:13:59dom96The next step should be done via next()
12:14:19dom96it would also be nice to have an explicit newIterator() function
12:14:36Araqso an iterator is nothing I can call?
12:14:48AraqI can only create an iteration object from it?
12:14:52dom96var myIter = newIterator(myIter); myIter.next()
12:15:04dom96It's nice to have this encapsulation
12:15:10Araqso an iterator is just a blueprint
12:15:27miranthis `var c = mycount # instantiate the iterator` (from the manual) just feels wrong
12:15:31Araqhmmm
12:15:47Araqmiran: well it's overly clever :P
12:15:55dom96yeah, it sucks :P
12:16:04dom96I never remember if I should give it a () or not
12:16:15Araqyou MUST not give it a () :P
12:16:31dom96so bad things happen if I do?
12:16:36Araqyep
12:16:38miranerror
12:16:40dom96lol
12:17:08dom96anyway, this sounds like an issue should be made for this
12:17:12dom96please do so miran
12:17:16miranwill do
12:17:26Araqit's another RFC, but ok
12:17:36miranimproved iterator would be a huge plus!!
12:17:38AraqI wonder if it can work
12:18:07Araqyou can pass iterators around as first class objects
12:18:13miranthe way they are now, i'll probably just try to avoid them as much as possible. and i'm sad because of that
12:18:18Yardanicomaybe we'll be able to use try/except in async if it would be implemented without iterators? :)
12:18:40AraqYardanico: I doubt it, for now all I see is a proposal for a better syntax
12:21:03Araqso what does 'iter' do? what is it if not its closure creation?
12:21:22AraqnewIterator(iter) # ok I guess
12:22:21Araqproc foo(it: iterator()) = newIterator(it) # ?
12:22:52Araqthis is problemantic as it's a polymorphic object construction
12:23:52Araqlooks hard to implement and once it works, it'll be slower -.-
12:25:17Araqit's also not consistent with .closure procs
12:26:10miranhow much slower are we talking about?
12:28:42miranwill we have iterator {.inline.}, {.closure.}, {.nice_syntax.}? :D
12:30:26Araqmiran: not sure, another indirect call but I don't even know if it can work
12:30:46Araqa closure iterator can capture stuff from its environment
12:31:09Araqso you better create this closure when you return it as a first class citizen
12:32:40Araqbut if we ignore the newIterator() syntax, we can make next(f) an alias for f()
12:33:03Araqseems a dubious benefit though.
12:33:20dom96see how other languages do it? :P
12:33:25miranif it is just an alias i think it won't work as it should
12:33:43miransyntax-wise
12:34:35mirandom96: re: checking other languages - yes please!
12:35:15mirani'm writing an issue on github, will post the link once i finish
12:37:36dom96So do we want to apply for GSOC or should we not bother?
12:46:01*gokr quit (Ping timeout: 252 seconds)
12:49:34*Snircle joined #nim
12:53:49*xet7 joined #nim
12:54:23FromGitter<mratsim> Oh, there is a new iterator syntax?
12:54:36mirandom96: it would be nice, don't know how much work there is and if it is doable in given amount of time
12:54:54FromGitter<mratsim> Would love to have an “init” “next” syntax standard like in Rust or Python (I’m already doing this using templates in Arraymancer)
12:55:01miranmratsim: unfortunately, no(t yet)
12:55:11miranbut i just opened an issue: https://github.com/nim-lang/Nim/issues/7047
12:56:01miranmratsim: maybe you can post a reply to show us how are you doing it now, it might help
12:57:22FromGitter<mratsim> my use case is inline iterators only though: https://github.com/mratsim/Arraymancer/blob/fc4ad528f6afcd377c16ff99f19151a0f5e46f89/src/tensor/private/p_accessors.nim#L98-L125
12:58:07FromGitter<mratsim> and then used like that: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a54bc5f290a1f45616954ca]
13:00:54FromGitter<mratsim> I’ll try to clean that up before posting because my case is quite complicated (have to iterate on seq that may have holes, or with data stored in column major order or completely arbitrary order, or that need iteration in reverse)
13:08:39livcddo I need to do something in vs code for channels stuff ? I have this in vscode https://glot.io/snippets/ex78ll0akw and i get undeclared identifier Channel
13:08:48FromGitter<mratsim> If people say: do imports like python is doing: http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html
13:09:13FromGitter<mratsim> @livcd did you compile with threads:on ?
13:12:00Yardanicolivcd, create nim.cfg in project folder
13:12:05Yardanicoand add --threads:on in it
13:12:28Yardanicovscode uses `nim check` for checking nim code for errors, and `nim check` is similar to nim compiler
13:12:43Yardanicowhen threads is not on there's no Channel type
13:12:52FromGitter<alehander42> what is the idiomatic way to convert a char array to cstring?
13:13:29euantorI wonder if there's a plan to eventually make `threads:on` the default, and make them opt-out rather than opt-in?
13:14:02Yardanicoeuantor, not every program needs threads
13:14:26euantorIf you're not using them, there shouldn't be any downside/drawbacks to them being enabled though surely?
13:15:03euantorOther languages like Rust and such have thread support on by default without requiring a command line option that people seem to always have to be reminded about
13:15:27livcdYardanico: thanks i will try that
13:21:20*gmpreussner quit (Quit: kthxbye)
13:23:48FromGitter<mratsim> I agree with euantor, or atleast, importing channels automatically enables threads:on
13:24:15*gmpreussner joined #nim
13:25:11FromGitter<krux02> happy new year to all of you
13:25:21FromGitter<krux02> I am back to work with Nim now
13:26:15Yardanicohappy new year, hello :)
13:27:16FromGitter<mratsim> Hohoho, happy new year :)
13:29:32*Yardanico quit (Remote host closed the connection)
13:30:43*Yardanico joined #nim
13:31:58FromGitter<krux02> thank
13:40:15*dddddd joined #nim
13:40:17*Yardanico quit (Ping timeout: 248 seconds)
13:46:08*yglukhov quit (Remote host closed the connection)
13:46:45*yglukhov joined #nim
13:53:05livcdi should be able to extract nupkg withnim's zip library right ?
13:53:20*yglukhov quit (Ping timeout: 276 seconds)
13:55:43*Yardanico joined #nim
13:57:26FromGitter<mratsim> If it's zip or gz yes. If you want to use nupkg in a build script it might be better to just use nimscript and exec unzip/gunzip.
14:08:47*gokr joined #nim
14:13:14FromGitter<krux02> in a template how do I convert an argument into a string literal
14:13:27FromGitter<krux02> in a macro I would do it with arg.repr.newLit
14:13:56FromGitter<krux02> but I don't want to use a macro here if it's possible without
14:14:02FromGitter<krux02> C macros can do it, too
14:18:05PMunchkrux02, what are you trying to do?
14:19:05FromGitter<krux02> PMunch: do you have c2nim ready?
14:19:22PMunchNot on this machine
14:19:29PMunchBut I can always install it :P
14:19:34FromGitter<krux02> hmm, i can't nimble install it
14:19:46FromGitter<krux02> it doesn.t compile on nim head
14:20:08FromGitter<krux02> if yes then you can just tanslate this for me: #define foobar(a,b) printf("%s, %s\n", #a, #b)
14:20:14PMunchHuh, indeed
14:20:58FromGitter<krux02> the reason it doesn't compile is a backwards incompatibility that I introduced :P
14:21:06PMunchtemplate foobar(a, b: untyped): untyped = echo $a & ", " & $b
14:21:10PMunchSomething like that?
14:21:15FromGitter<krux02> no not really
14:21:30FromGitter<krux02> the ast is transformed into a string literal
14:21:35FromGitter<krux02> that is something C macros can do
14:21:44FromGitter<krux02> so I thought nim templates can do it, too
14:21:47PMunchAh
14:21:57PMunchtemplate foobar(a, b: untyped): untyped = $a & ", " & $b
14:22:10PMunchHmm, well that's not quite the same
14:23:27PMunchtemplate foobar(a, b: static[string]): untyped = a & ", " & b
14:23:38PMunchMaybe something like that would be optimized away
14:24:35PMunchproc foobar(a, b: string): string {.compileTime.} = a & ", " & b
14:24:40PMunchWouldn't that work?
14:24:53FromGitter<krux02> well it's not really about that function
14:25:45FromGitter<krux02> and this would actially solve it: ``macro stringize(arg: untyped): string = arg.repr.newLit``
14:25:57FromGitter<krux02> but I thought there is something in system that does exactly that
14:26:18FromGitter<krux02> I am pretty sure it exists but I don't know how it's called
14:26:51PMunchWhat's wrong with the compileTime proc though?
14:27:14FromGitter<krux02> by the way the compile error in rodutils is because an array is not implicitly a cstring anymore
14:27:48FromGitter<krux02> nothing
14:28:03FromGitter<krux02> it's just that I don't really need the example that I gave you
14:28:19FromGitter<krux02> I just gave it as an example that would use the stringize function
14:29:35FromGitter<krux02> template test(arg) = doAssert(arg, stringize(arg) & "failed")
14:29:45FromGitter<krux02> that is closer to what I acutally need
14:31:33PMunchAaah
14:34:59*gmpreussner quit (Quit: kthxbye)
14:35:14FromGitter<mratsim> @krux02 are you perhaps looking for astToStr?
14:36:55*MJCaley joined #nim
14:37:54*gmpreussner joined #nim
14:48:06Yardanicohooray! custom pragmas got merged! https://github.com/nim-lang/Nim/pull/6987
14:50:00FromGitter<krux02> @mratsim exactly that was what I was looking for, thank you
14:50:51FromGitter<krux02> is there a resolve alias function somewhere?
14:52:19*zahary quit (Quit: Leaving.)
14:55:59FromGitter<mratsim> Oooh awesome, does that mean I can now use {.align.} pragma and {.restrict.} pragma directly in the type declaration !!
14:56:14*zahary joined #nim
14:58:11*gokr quit (Ping timeout: 252 seconds)
14:58:31*yglukhov joined #nim
14:58:51PMunchmratsim, looks like that's pretty much exactly what you can do with this: https://github.com/cooldome/Nim/blob/1ef8b892da6a0b88478aa718c7198cfc61d52c73/doc/manual/pragmas.txt#L1092
14:59:56Yardanicomratsim: if you define them - yes
14:59:59Yardanicosorry
15:00:05Yardaniconot define, but check them later in your macros
15:00:15Yardanicobut you won't have backwards compat with 0.17.2 :)
15:01:17FromGitter<mratsim> Well I'll break compat when 0.18 is released
15:01:40FromGitter<mratsim> So many breaking stuff anyway (BackwardsIndex and HSlice)
15:02:57*yglukhov quit (Ping timeout: 248 seconds)
15:04:19FromGitter<zetashift> Better now than a 1.x release
15:04:45Yardanicowell that's the point
15:04:54Yardanicobreak as much stuff as possible to not break it after 1.x :P
15:04:56FromGitter<krux02> what is backwards index?
15:05:08Yardanicokrux02: slices now are a bit different
15:05:19FromGitter<krux02> how are they now
15:05:26FromGitter<krux02> I was inactive since christmas
15:05:45Yardanicohttps://github.com/nim-lang/Nim/blob/devel/changelog.md read here
15:05:50euantorcustom pragmas are awesome! I can see them being very useful for data serialization/deserialization purposes for definite
15:05:51Yardanico"We changed how array accesses ..."
15:06:34*zahary quit (Quit: Leaving.)
15:06:40miranany time approximation when 0.18 will be out?
15:06:48FromGitter<krux02> does that mean that when I want `^` to work, I have to invest extra effort?
15:07:10Yardanicoprobably a bit more, but now it's not *magic* and just defined in system.nim
15:07:11mirani know that v1.0 is "just around the corner" TM :D
15:07:13Yardanicomiran, ask Araq :P
15:07:20FromGitter<krux02> ``proc `[]`(index: int)`` doesn't work with [^2] anymore?
15:08:08*zahary joined #nim
15:08:56miranYardanico: nah, i don't want to bother him with that question, now that he's working (thinking about) more sensible iterator syntax :D
15:09:14Yardanicomiran, I think he's working with destructors :)
15:11:05miranisn't that post-1.0 goal? :/
15:11:22Yardanicomiran, it's not related to 1.0 :P
15:11:31Yardanicoit's a new runtime for nim
15:11:39Yardanicowhich will be much less dependent on GC
15:12:09Yardanicomiran, https://github.com/nim-lang/Nim/wiki/Destructors nim v2 :)
15:12:54mirantranslate that to english for me :) what benefits will that bring?
15:13:09euantorless people complaining about GC
15:13:28*MJCaley quit (Quit: MJCaley)
15:13:33miraneuantor: :D :D
15:13:50Yardanicomiran, better interop with another languages
15:13:57Yardanicoalso much better for embedded devices
15:14:08FromGitter<andreaferretti> It may be a little awkward to explain to newcomers the difference between custom pragmas (as in the latest feature) vs custom pragmas (as in pragma pragma) vs custom pragmas (as in macro decorators)
15:14:31FromGitter<andreaferretti> There are now three ways for users to introduce stuff that can be used in pragma position
15:14:46FromGitter<andreaferretti> Apparently completely unrelated to each otehr
15:14:48FromGitter<andreaferretti> otehr
15:14:49FromGitter<andreaferretti> other
15:15:10Yardanicomiran, see "What's wrong with Nim's GC?" here https://nim-lang.org/araq/destructors.html
15:15:56*yglukhov joined #nim
15:16:05*yglukhov quit (Remote host closed the connection)
15:19:19Yardanicoalso it will be easier to add custom allocator
15:19:26Yardanico(memory allocator)
15:19:41FromGitter<krux02> I have a challenge for you people if you are interested:
15:19:42FromGitter<krux02> http://ix.io/DQZ
15:19:55FromGitter<krux02> implement a "resolve alias" function
15:21:09*endragor quit (Remote host closed the connection)
15:21:46PMunchHow deep should it resolve?
15:21:58PMunchI remember doing this at some point, might still have the code around
15:21:59FromGitter<krux02> just the examples
15:22:39FromGitter<krux02> I already had it but recent changes in nim broke my solution
15:22:57FromGitter<krux02> right now I think it's impossible, but I am not 100% sure about it
15:23:26miranalehander42: can you add some example in the readme of py2nim?
15:23:47Yardanicomiran, there are examples in examples folder
15:23:53*natrys joined #nim
15:24:42miranYardanico: will take a look, but IMO there should be example(s) in readme too
15:25:16miranYardanico: there are only python files, not what i was looking for
15:25:20FromGitter<krux02> I don't use that program, but I agree. a readme should have small examples to get the idea
15:25:32Yardanicopy2nim translates python to nim
15:25:34FromGitter<krux02> especially on github, where the readme is basically the homepage
15:25:54Yardanicowe got a real py2nim translator right here, still in early stage tho :)
15:26:26miranYardanico: that's nice, but - we need the examples to actually see what it does
15:27:06FromGitter<krux02> Yardanico I think a real py2nim translator is not possible
15:27:10Yardanico@alehander42: btw, can you change submodule url from [email protected]:metacraft-labs/python-deduckt to https://github.com/metacraft-labs/python-deduckt ?
15:27:20Yardanicobecause first one doesn't work
15:27:31*miran quit ()
15:30:29*nsf quit (Quit: WeeChat 2.0.1)
15:32:09*MJCaley joined #nim
15:32:45PMunchHmm krux02, $arg.getType[1].toStrLit get's you pretty far
15:32:59PMunchReturns "Vec" for "Vec4f"
15:33:52Yardanicolol :P
15:41:44FromGitter<mratsim> @krux02 you need something like this to deal with BackwardsIndex: https://github.com/mratsim/Arraymancer/blob/fc4ad528f6afcd377c16ff99f19151a0f5e46f89/src/tensor/backend/metadataArray.nim#L72
15:42:40FromGitter<mratsim> (there is a conpile flag that is set when BackwardsIndex is used and that you can check but I don't remember it so ...)
15:44:05*Amun_Ra quit (Ping timeout: 260 seconds)
15:54:16FromGitter<krux02> PMunch: getType should become deprecated, so better if you only use getTypeInst and getTypeImpl
15:54:29*natrys quit (Quit: natrys)
15:54:33FromGitter<krux02> I updated the challenge: http://ix.io/DR5
15:55:03FromGitter<krux02> PMunch: when you are able to implement ``resolveAliasTypes``, then I would be pretty happy
15:56:14*Amun_Ra joined #nim
15:57:06FromGitter<krux02> I just added comments and changed the order
15:57:08PMunchI'm getting closer
15:57:20PMunchGot most of the tests passing
15:57:26*miran joined #nim
16:00:57FromGitter<krux02> cool
16:04:05PMunchHmm, Vec4[float32] is acting weird..
16:07:50PMunchIt gives me Vec[4, float32][float32]
16:08:13FromGitter<krux02> hmm, I had that before I updated
16:08:31FromGitter<krux02> but that's a bug
16:08:37PMunchOh it is?
16:10:04PMunchhttp://ix.io/DR7/
16:10:05*chemist69 quit (Ping timeout: 252 seconds)
16:10:21PMunchThat works for all but Vec4[float32]
16:11:43PMunch@krux02 ^
16:17:50*gokr joined #nim
16:21:22FromGitter<data-man> Nimble supports recursive cloning of a repo with a git submodules?
16:21:39dom96yes
16:21:45dom96IIRC it should do that by default
16:22:13*chemist69 joined #nim
16:22:31FromGitter<data-man> Thanks!
16:25:49*floppydh quit (Quit: WeeChat 2.0.1)
16:25:57FromGitter<krux02> PMunch: what version of nim do you have?
16:26:10FromGitter<krux02> Seems you have an old version, because I have entirely different results
16:26:15PMunch0.17.2
16:26:37FromGitter<krux02> well I am on devel and there have been made significant changes
16:26:49FromGitter<krux02> only 3 of the tests pass
16:27:04PMunchI get the same on 0.17.3 (choosenim devel)
16:28:15FromGitter<krux02> that is weird
16:28:23FromGitter<krux02> can you do nim --version?
16:28:37FromGitter<krux02> git hash: aff787db69ed67f54d72e9caa43e556a9d0e2674
16:28:57PMunchdevel didn't show a git hash..
16:29:03PMunchTrying with "choosenim #head" now
16:30:32PMunchWorks fine with head as well
16:30:49PMunchBut nim --version still doesn't show me a hash
16:31:31dom96that's because choosenim doesn't clone the git repo
16:32:26PMunchAh right..
16:32:51PMunchBut I've got to go now
16:32:55PMunchTTYL
16:32:56*PMunch quit (Quit: Leaving)
16:44:06FromGitter<brentp> hey all. I've posted this in here before, mostly asking for help as I started Nim with this project. But, I've rounded out some bioinformatics functionality in: https://github.com/brentp/hts-nim . It's a wrapper for the most widely use C library for parsing and manipulating genomics files . I'll soon put up a pre-print something like this: https://github.com/brentp/hts-nim/files/1615870/hts-nim.pdf I'd appreciate any
16:44:06FromGitter... feedback on the library itself and I'm happy to add co-authors for contributions. Hopefully this can get some people in the genomics community (other than me) using nim.
16:45:12FromGitter<brentp> and BTW, I've already got a paper out that uses Nim + hts-nim: https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btx699/4583630
16:45:28FromGitter<brentp> that tool is pretty widely used
16:48:01*gokr quit (Ping timeout: 248 seconds)
16:48:45*Trustable joined #nim
16:49:00*azur_kind joined #nim
16:51:28dom96brentp: not sure if you're aware but there is a bioinformatics company using Nim (or at least they used to use Nim). Might be worth getting in touch: https://github.com/onecodex
16:51:47FromGitter<andreaferretti> Hi @brentp , if you are interested, I wrote a small string library implementing popular algorithms coming from bio informatics
16:52:07FromGitter<andreaferretti> https://github.com/unicredit/cello
16:52:42FromGitter<andreaferretti> wavelet trees, FM indices, BW transforms and so on
16:55:38FromGitter<brentp> @dom96 I didn't know that. will ping them.
16:56:15shashlickdom96: any idea why the choosenim build failed? https://github.com/dom96/choosenim/pull/48
16:58:52FromGitter<brentp> @andreaferretti I'm now watching that repo. I don't have an immediate use for that, but I have wrapped a smith-waterman library. might be nice to try one of your similarity measures where the actual alignment isn't needed.
17:02:30dom96shashlick: Interesting. Previous successful build used nim v0.16.0
17:04:01dom96I should have pinned the version
17:04:10dom96still odd that 0.17.2 fails though
17:07:46shashlickworked on my local build with 0.17.2
17:12:07dom96The error means that Nimble cannot find Nim's stdlib
17:17:04FromGitter<krux02> I have an error with a stack trace, how do I make nim print the stack trace with absolute paths?
17:17:08*zahary quit (Quit: Leaving.)
17:17:38FromGitter<krux02> I just get vm.nim(1222) wich sucks because them emacs can't parse that file location
17:17:59FromGitter<krux02> I compiled with koch temp
17:18:41dom96shashlick: I think the reason for this error is that somehow `/home/travis/.nimble/pkgs/lib/` exists
17:19:14*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:19:18dom96I restarted the build
17:19:55dom96krux02: I don't think that feature exists.
17:20:30FromGitter<krux02> meh
17:20:49FromGitter<krux02> the stack trace is really unusable like it is now
17:21:50*nsf joined #nim
17:23:26Yardanicokrux02: vm.nim is probably in compiler directory
17:23:55FromGitter<krux02> I know where vm.nim is, but it really slows me down that the stacktrace is not machine readable
17:26:06*natrys joined #nim
17:28:43*vivus joined #nim
17:31:21*zahary joined #nim
17:38:22*Trustable quit (Remote host closed the connection)
17:41:53*arnetheduck_ quit (Remote host closed the connection)
17:41:53*arnetheduck quit (Remote host closed the connection)
17:42:30FromGitter<tim-st> Maybe I'm doing something wrong again but Python gives different result for this: https://gist.github.com/anonymous/8aa22283d43e93197f541041617f76bd
17:42:40FromGitter<tim-st> https://play.nim-lang.org/?gist=8aa22283d43e93197f541041617f76bd
17:45:02Araqkrux02: what do you mean? the stack trace is lines with filename.nim(linenumber) procname contents
17:45:12Araqlooks machine readable to me
17:48:24dom96Araq: He needs the absolute filename
17:48:47Araq--excessiveStackTraces:on ?
17:49:02Araqshould probably be the default
17:49:12dom96oh, didn't know about that
17:49:16dom96please don't make it default
17:49:22Araqwhy not?
17:49:36dom96because it's noisy
17:50:10Araqtrue but it's so nice when clicking on it can resolve it
17:50:42Araqalso Python uses absolute filenames in its stack traces :P
17:51:46dom96it also shows the line
17:51:50dom96shall we just copy Python? :P
17:52:45YardanicoAraq, I didn't know about this option 0_0
17:52:49Yardanicois it documented somewhere?
17:52:59Yardanicoah, yes
17:53:28Yardanicotime to change my global nim config
17:53:34Araqwell I vote for making it the default
17:53:41Araqlet's see what others think
17:54:10Araq(the tester needs to pass 'off' though since some tests check the stack traces are correct)
17:54:26FromGitter<krux02> Araq: I just looked at the stacktrace variable. Even interally it does only know the local filename
17:55:00Araqkrux02: unlikely, msgs.nim knows both
17:55:11FromGitter<krux02> I wanted to "improve" the print stack trace function to also inclde the path of the file, but that information is not there
17:55:39FromGitter<krux02> at least with what I found out so far
17:56:00FromGitter<tim-st> Does anyone has an idea why the result of the code I posted is `2`?
17:56:00dom96Araq: Do we want to apply for GSOC?
17:56:22YardanicoAraq, how can I globally enable --excessiveStackTraces:on ?
17:56:38YardanicoexcessiveStackTraces = on in nim.cfg doesn't work
17:57:12AraqYardanico: --excessiveStackTrace:on
17:57:20FromGitter<krux02> TFrame only has a filename entry
17:58:21dom96tim-st: the \n isn't included by the triple quoted string I guess
17:58:44Araqdom96: on the one hand, chances we're accepted are slim, on the other hand, the community appreciates well written enhancement proposals that nobody works at.
17:58:50FromGitter<krux02> and even with excessiveStackTraces=on and with --listFullPaths I don't get the paths
17:59:21FromGitter<tim-st> @dom96 It is. I can only get the pattern working for str.split(str) using triple quoted.
17:59:27Yardanicofully works for me
17:59:35YardanicoI get full paths
17:59:55FromGitter<krux02> Araq, dom96, I have problems resolving alias types.
18:00:27FromGitter<krux02> there is getTypeImpl, and getTypeInst
18:00:43FromGitter<krux02> I now also want to add "resolve Alias"
18:00:52FromGitter<krux02> because as a macros it is impossible to implement
18:01:28miranhere's a vote to improved ("excesive") stack traces!
18:01:45FromGitter<tim-st> @dom96 I will try it again could be true
18:01:54FromGitter<krux02> yea I tried, but I don't want to spend too much time on it
18:02:23FromGitter<krux02> because it is not my focus, just annoying that the stack trace is not machine processable
18:02:49FromGitter<krux02> well it is machine processable, but filenames are not unique in a project
18:03:24*darithorn joined #nim
18:04:43FromGitter<tim-st> @dom96 you're right thanks, but than it's a problem of strutils.split(str) it seems the `\n` is not recognized
18:06:03dom96!eval import strutils; echo("f\na b".split())
18:06:06NimBot@[f, a, b]
18:06:42FromGitter<tim-st> "str".split("\n{{") was the pattern
18:08:30dom96!eval import strutils; echo("strasd\n{{qweqe".split("\n{{"))
18:08:33NimBot@[strasd, qweqe]
18:09:37shashlickdom96: did the choosenim build pass?
18:09:49dom96nope
18:14:43*BitPuffin joined #nim
18:15:11*yglukhov joined #nim
18:27:58*natrys quit (Quit: natrys)
18:31:58dom96I will try to see what the issue is in a while
18:32:08*natrys joined #nim
18:38:16Araqkrux02: can you report it? can't be hard to fix
18:39:19*yglukhov quit (Remote host closed the connection)
18:40:06dom96Araq: Please state your thoughts on this https://github.com/nim-lang/Nim/pull/7036
18:40:45Araqha, just did, what a coincidence
18:41:11dom96hehe, seems we agree about that at least :)
18:41:15miranAraq: agree on symmetric difference mess
18:41:37mirani didn't want to exclude it a priori
18:41:46FromGitter<tim-st> Ok, it seems "\n" has len 2 and in Python len 1, my doucment seems to be splitted by the len 1 version of "\n" ...
18:42:09dom96tim-st: \n is platform-dependent
18:42:32mirandom96: didn't know that `inc` is idiomatic nim. been using `+=`
18:42:51Araqdom96: meh, let's not get carried away all the time. so now every += must be based on 'inc'
18:43:01miranwhat would sets.inc do?
18:43:34dom96Araq: You don't think that should be the case?
18:43:53Araqdoes 'inc' even exist for floats? I think this is too extreme, 'inc' is a holdover from Borland Delphi, it's nice but nothing I consider "generic"
18:43:58mirandom96: python doesn't use + and * for sets, but | and &
18:44:08dom96Every library implementing their own `+=` that may or may not be different to `inc` seems worse.
18:44:12miranso it has |= and &=
18:44:31Araqdom96: most libs do not bother to implement 'inc' afaict
18:44:45miranthe point i'm trying to make: += is not required for sets, iff there is no +
18:44:45dom96yeah, because nobody is aware of this quirk
18:45:01dom96but soon people will want x++
18:45:11dom96or at least wonder why it doesn't exist when += does
18:45:27AraqPython does the same and people swallowed it
18:45:44Araq++ is weird with its postfix/prefix differences
18:45:50miranagreed
18:46:17Araq+= is quite consistent in comparison
18:46:19miranbtw, is there **? or //? :)
18:46:52dom96bah
18:46:59dom96I've learned to love .inc
18:47:03miran(because *= is quite more readable)
18:47:20Araqmiran: that said I think 'incl' is better than += :P
18:47:21GitDisc<treeform> i though inc dec was integer only like div and mod?
18:47:22dom96But I guess I can't win that war
18:47:45GitDisc<treeform> i though it was part of the integer bit operations
18:48:15dom96but yes, even += is weird for sets
18:48:19AraqI like 'inc' too but it's not something I want to base basic arithmetic rules on
18:48:36dom96and I wonder if it makes sense to have these operators at all for sets
18:48:38miranAraq: ooooh! i always thought `incl` is just for single elements, now i see it isnt
18:49:09miranbtw, why is it `incl` and not `add` like for other containers?
18:49:59Araqmiran: historic reasons I guess.
18:50:07mirandom96: which operators? union and intersection? you prefer words rather than symbols?
18:50:56Araq'add' for sets doesn't add though, 'add' would make sense for a multiset
18:51:14Araqnote that 'add' for tables really does 'add' (and some people dislike this :P )
18:51:29miranAraq: i just got used how in nim "everything" has `add` (and i don't have to think like in python if it is append or add), and then - i still have to remember sets are different
18:51:58dom96hrm, I don't know anymore, I suppose symbols are nice for sets
18:52:08miranyeah, `incl` is "more correct" word to use, i agree
18:53:03dom96I think a different name for sets is fine since they are a bit more specialised.
18:53:15dom96(by different name I'm referring to 'incl')
18:53:20mirandom96: symbols are nice. and set comprehensions are also very nice. unfortunately we don't have them (yet :))
18:53:41dom96oh yeah, what ever happened to allowing for loops as expressions? Araq?
18:54:18AraqI think we have hit a sweet spot with the namings. generic names are nice but when everything has 'add' and 'len' the type checking becomes too weak
18:54:40AraqI remember a Nim where len(4) used to compile
18:54:58Araqit was rewritten to len([4]) and produced 1.
18:55:21Araqlead to really "nice" bug in the compiler
18:56:19livcdcan you rename seqs to slices ? :D
18:56:42Araqshouldn't seqs support slices first?
18:57:20Araqdom96: what was the proposal everybody agreed on?
18:57:40FromGitter<tim-st> @dom96 I solved it. Nim uses for "\n" the chars char(13) and char(10) on windows, that was the problem. Python only uses char(10) that was exactly the one I needed for "\n" and was used in my utf8 doc for "\n"...
18:58:09dom96tim-st: yep, like I said, "\n" in Nim is platform-dependent.
18:58:37Araqyeah it's a bit of a gotcha; \L does what you want
18:58:41FromGitter<tim-st> But I dont know if this is what devs want. I never had problems with pythons version
18:58:42dom96Araq: No idea
18:58:48*yglukhov joined #nim
18:58:51dom96Araq: This is why we need RFCs :P
18:59:34Araqtim-st: It's what I want fwiw.
18:59:52AraqI like the fact that Nim doesn't distinguish between "binary" and "text" files
19:00:22Araqthat one always was misguided everywhere else, there is no such difference, it's all bytes.
19:00:40FromGitter<tim-st> I hope its only me who faces this problem. I didnt have this problem under python in like 5 years
19:01:24dom96!eval echo("\n".repr)
19:01:41*NimBot joined #nim
19:01:42*yglukhov quit (Remote host closed the connection)
19:01:45FromGitter<tim-st> you need ord
19:01:46dom96!eval echo("\n".repr)
19:01:48NimBot0x41fa60"\10"↵""
19:01:55dom96Bet you it ran out of memory :\
19:02:14FromGitter<tim-st> So nimbot is not on windows
19:02:30dom96NimBot doesn't evaluate it, it delegates to play.nim-lang.org
19:02:52FromGitter<tim-st> so only windows user will have this problem...
19:02:54Araqwhat we can do is to map \n to \10 everywhere
19:03:07FromGitter<tim-st> yes, that's perfect
19:03:22Araqsince Windows understands it too, most of the time
19:03:42FromGitter<tim-st> I only used \r\n once when parsing http headers
19:03:45dom96Araq: You'd break canon
19:03:54Araqargh.
19:04:06dom96I like that it works this way
19:04:20FromGitter<tim-st> I dont.
19:04:32dom96Why?
19:05:02FromGitter<tim-st> because it took me 4 hours to solve it and now I dont know how to build my "own" \n string
19:05:19FromGitter<tim-st> well I can use $char(10)
19:05:27Araq\L
19:05:35dom96https://nim-lang.org/docs/manual.html#lexical-analysis-character-literals
19:06:06dom96It probably would have been better to use a different character for this feature
19:07:12FromGitter<alehander42> @Yardanico you probably don't have ssh keys for github configured(which is bizarre, how do you use github?) but you're right for the link, it's updated now
19:07:30FromGitter<alehander42> thanks for the example program, I'll take a look at it tomorrow
19:07:43*MJCaley quit (Quit: MJCaley)
19:07:57*azur_kind quit (Remote host closed the connection)
19:08:40Araqdom96: yet \n is close to "newline" in other languages so often we get away with it :P
19:08:42FromGitter<alehander42> @krux02 py2nim fully automated translator is not very possible in practical sense, the goal of the tool is to automates some of the work involved
19:08:47FromGitter<tim-st> @Araq thanks, \L works good.
19:09:30dom96Funny, I still remember you telling me to use "\c\L" in my sockets code when I first started using Nim.
19:09:56Araqthat's still true. I don't understand you.
19:10:13dom96I'm not saying it's not true
19:10:25dom96It's just one of the first things I remember
19:16:30FromGitter<tim-st> Btw I again found the xmlparser from `parsexml` very good and easy to use 👍
19:18:54*MJCaley joined #nim
19:20:40*yglukhov joined #nim
19:23:40*gokr joined #nim
19:25:23*yglukhov quit (Remote host closed the connection)
19:26:44*nsf quit (Quit: WeeChat 2.0.1)
19:40:59dom96tim-st: you might find xmltree module easier to use :)
19:44:48Yardanicosometimes people are confused and think that nim can't cross-compile to other cpu architectures :P https://forum.nim-lang.org/t/3470/1
19:44:56Yardanico(I already answered there)
19:50:40*claudiuinberlin joined #nim
19:53:13*BitPuffin quit (Remote host closed the connection)
20:01:12*ryanhowe joined #nim
20:01:57*ryanhowe quit (Client Quit)
20:02:30*sleepyqt joined #nim
20:18:02shashlickdom96: okay, let me know if there's any code fixes needed in the proxy PR for choosenim
20:20:31*kafke joined #nim
20:35:10*Vladar quit (Quit: Leaving)
20:35:39*Yardanico quit (Remote host closed the connection)
20:46:20Araqdom96: what's the proper way to call the future's callback?
20:47:01dom96future.complete()
20:47:18Araqhmm yeah, found it after I asked
20:47:40AraqI don't have the value though -.-
20:48:11dom96why?
21:01:25FromGitter<tim-st> why is the newline char not considered as whitespace in `strutils.Whitespace` ?
21:05:33FromGitter<tim-st> also both procs rstrip and lstrip additionally to strip(leading, trailing) would be better imo especially for non native speakers
21:13:04FromGitter<tim-st> @dom96 no, I was serious like it. I remember that I never understand Pythons xml "tree" parser and here it just works as I expect
21:13:10FromGitter<tim-st> *about it
21:17:07*yglukhov joined #nim
21:17:17GitDisc<NopeDK> Hmm, sequence of tuple[string, T] vs critbittree[T] for managing Unix paths, with T holding something like a ParseCFG instance. Thoughts?
21:18:26*yglukhov quit (Remote host closed the connection)
21:19:57GitDisc<NopeDK> Or a hash table?
21:20:03*Ven`` joined #nim
21:24:43dom96hash table
21:29:25FromGitter<data-man> No. ⏎ SuperFasterCoolElasticRadixHashHatBitTree. I will rename it to CrashBugStump.
21:31:05Araqdom96: because the flowvar API is different, trying to figure out how to make it work
21:31:41dom96Araq: Well if you know that the flowvar is finished then surely you can just read its value, no?
21:31:56GitDisc<NopeDK> Since I haven't tried working with it, some inside joke I'm missing? And would hash table still be preferred if I needed a tree-like structure? (Basically a custom WalkDir, with dynamic exclusion of subpaths based on a config in current folder)
21:33:21Araqdom96: I don't know when it's finished... you either call ^ or await on it and this blocks until the other thread computed the value
21:34:42Araq-.- seems hard
21:34:49dom96Araq: ahh, what's the underlying object?
21:34:58dom96That performs this data transfer?
21:35:46Araqnot sure what you mean, a Posix condition variable?
21:36:21AraqNopeDK, I think data-man has some special datastructure lying around somewhere
21:36:39dom96Araq: Yeah, that's what I mean
21:37:05*natrys quit (Quit: natrys)
21:37:37GitDisc<NopeDK> Curiousity has been peaked.
21:37:49dom96Araq: Perhaps condition variables can be polled?
21:38:53Araqwell polling is what your example code already does
21:39:21FromGitter<data-man> @NopeDK: if you need tree-like structure then try https://github.com/Nycto/RBTreeNim
21:39:25dom96Araq: I mean via epoll
21:39:32dom96with the rest of the fds
21:39:43Araqunlikey, it has no fd
21:39:48Araqon windows that can be done
21:43:03Araqhttps://stackoverflow.com/questions/8593004/waiting-on-a-condition-pthread-cond-wait-and-a-socket-change-select-simultan
21:43:17AraqI think I can emit a custom event on the worker thread
21:44:20dom96Remember that async now has some support for signals
21:49:18GitDisc<NopeDK> data-man, good idea but as my data would inherently be unbalanced, an RB tree won't work. Was thinking critbit because it was a pure Nim and could do stuff like: "/" -> "bin", "dev", "home", "usr" with each of those having similar subnodes and if certain criteria is met during the walk, I can easily delete the end-node(s) that match.
21:49:35*miran quit (Quit: Konversation terminated!)
21:50:02GitDisc<NopeDK> But everyone is always talking links or hashes, just curious if critbits are the optimal choice for such a structure.
21:54:07*sz0_ joined #nim
21:54:09FromGitter<data-man> @NopeDK: Bench! Bench everything! Do not trust anyone! :-)
21:55:47GitDisc<NopeDK> That is true. Back to the old ways, learning by doing.
21:59:28Araqjust use critbittrees and call it a day
21:59:50Araqif it supports what you need, it's usually good enough :P
22:01:04GitDisc<NopeDK> I am too perfectionistic to just go with stuff, always trying to get the "best" possible/available for the use case.
22:02:35FromGitter<data-man> @NopeDK: How many items do you need to store?
22:05:19*nsf joined #nim
22:08:50GitDisc<NopeDK> Dynamic, basically I want to scan an entire Linux system like with WalkDir, if there exists a subdir with a specific name when walking, load config from that subdir, that config then has a list of folders to exclude from the walking (deleting the just added nodes), and on it goes. So probably not many items, but the tree might quickly become to big (which is another concern)
22:10:01FromGitter<data-man> Just write Nim binding for https://github.com/antirez/rax ⏎ Or port it to Nim. :)
22:15:45GitDisc<NopeDK> Holy... Porting that is definitely not something for me at this time, a binding is possible but have to research Rax closer.
22:15:50*nsf quit (Quit: WeeChat 2.0.1)
22:26:23FromGitter<data-man> https://github.com/Tessil/hat-triehttps://github.com/Tessil/array-hashhttps://github.com/Tessil/hopscotch-maphttps://github.com/Tessil/sparse-maphttps://github.com/Tessil/robin-map ... [https://gitter.im/nim-lang/Nim?at=5a55418fd0514c785b0ee230]
22:30:34*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
22:31:01*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:40:20GitDisc<NopeDK> O.o time to get reading
22:40:27GitDisc<NopeDK> Thanks data
22:46:36*marenz__ joined #nim
22:47:48shashlick@nopedk: using nimgen to wrap rax real quick
22:50:53GitDisc<NopeDK> Firstly is to look through them all, secondly to actually see if they are useful and then we can begin talking wrapping
22:53:03shashlickalready done, if you need it let me know
22:53:45GitDisc<NopeDK> cool, sure will
23:00:08*darithorn quit (Quit: Leaving)
23:03:01*dddddd quit (Remote host closed the connection)
23:09:48*themagician quit ()
23:12:34CalinouI discovere to my dismay that I'm no longer the record holder of the Nim Snake game :(
23:12:37Calinoudiscovered*
23:12:46*sleepyqt quit (Read error: Connection reset by peer)
23:14:33dom96a canadian takes the throne
23:14:35dom96nice
23:14:40dom96Calinou: Just gotta keep playing :D
23:15:18Calinou:p
23:16:24*ludocode quit (Remote host closed the connection)
23:20:33*yglukhov joined #nim
23:24:47*yglukhov quit (Ping timeout: 248 seconds)
23:25:11*FromGitter quit (Remote host closed the connection)
23:25:12*oprypin quit (Quit: Bye)
23:25:27*FromGitter joined #nim
23:26:22*ludocode joined #nim
23:36:04*yglukhov joined #nim
23:40:17*yglukhov quit (Ping timeout: 248 seconds)
23:44:23*oprypin joined #nim
23:44:31*MJCaley quit (Quit: MJCaley)