<< 19-08-2017 >>

00:05:46*PMunch quit (Quit: leaving)
00:06:25*v17d quit (Remote host closed the connection)
00:41:56*nsf quit (Quit: WeeChat 1.9)
00:44:38*pilne joined #nim
01:09:09*def-pri-pub quit (Quit: Lost terminal)
01:10:54*chemist69 quit (Ping timeout: 255 seconds)
01:24:54*chemist69 joined #nim
01:56:00*nattefrost quit (Remote host closed the connection)
01:58:41*def-pri-pub joined #nim
02:46:28*yglukhov joined #nim
02:50:57*yglukhov quit (Ping timeout: 240 seconds)
03:03:04*def-pri-pub quit (Quit: leaving)
03:27:07*pilne quit (Quit: Quitting!)
03:29:18*v17d joined #nim
04:04:12*v17d quit (Remote host closed the connection)
04:05:35*v17d joined #nim
04:10:32*endragor joined #nim
04:36:24*v17d quit (Remote host closed the connection)
04:37:49*v17d joined #nim
04:48:52*v17d quit (Remote host closed the connection)
04:49:56FromGitter<Greglefox> Hello all
04:50:35FromGitter<Greglefox> Newbie question: I am exploring parallelism in Nim, and I was wondering if gcsafe pragma is still valid?
04:50:48*v17d joined #nim
04:51:05FromGitter<Greglefox> trying to have a shared heap between threads
05:06:59*v17d quit (Quit: Leaving)
05:10:46*v17d joined #nim
05:12:37*haha_ joined #nim
05:14:36*v17d quit (Remote host closed the connection)
05:16:18*v17d joined #nim
05:16:20*v17d quit (Remote host closed the connection)
05:16:22*mahmudov quit (Remote host closed the connection)
05:17:46*v17d joined #nim
05:34:08*haha_ quit (Quit: haha_)
05:43:42*smt quit (Ping timeout: 260 seconds)
06:00:25*v17d quit (Ping timeout: 240 seconds)
06:01:59*krux02 quit (Remote host closed the connection)
06:11:18*Vladar joined #nim
06:13:03*v17d joined #nim
06:25:26*scriptum joined #nim
06:32:43*ShalokShalom_ joined #nim
06:35:25*ShalokShalom quit (Ping timeout: 240 seconds)
06:44:27FromGitter<Smaehtin> @Greglefox as far as I know, yes, if you use the Boehm GC, you can "safely" use the `gcsafe` pragma to override the default GC safety analysis
06:45:34*arnetheduck joined #nim
06:47:45Araqthat is correct
06:47:55*dddddd quit (Remote host closed the connection)
06:55:21*v17d quit (Ping timeout: 240 seconds)
07:11:18*v17d joined #nim
07:14:56*ShalokShalom_ is now known as ShalokShalom
07:15:21*haha_ joined #nim
07:16:41*v17d quit (Ping timeout: 240 seconds)
07:29:40*gangstacat joined #nim
07:29:55*v17d joined #nim
08:11:05*Trustable joined #nim
08:23:34*yglukhov joined #nim
08:27:54*yglukhov quit (Read error: Connection reset by peer)
08:28:29*yglukhov joined #nim
08:33:18*nsf joined #nim
09:09:19*BitPuffin|osx joined #nim
09:21:11*haha_ quit (Quit: haha_)
09:36:56*haha_ joined #nim
09:48:37*couven92 joined #nim
09:52:23*Sembei joined #nim
09:52:55*Pisuke quit (Ping timeout: 240 seconds)
09:54:22FromGitter<Bennyelg> import strutils ⏎ var x = 10 ⏎ echo "x = $1" % x ⏎ ⏎ Error: type mismatch: got (string, int) ... [https://gitter.im/nim-lang/Nim?at=59980ace9acddb2407a88b96]
10:05:20FromGitter<GULPF> you need to convert x to a string. ⏎ echo "x = $1" % $x
10:07:41FromGitter<Bennyelg> There is no other way? I want it to be printed in the original formt
10:07:43FromGitter<Bennyelg> type*
10:09:26FromGitter<Bennyelg> easy casting to sql statement
10:09:59FromGitter<GULPF> well it will still print "x = 10". I don't understand what you mean with "printed in the original type"
10:11:08FromGitter<Bennyelg> for example ⏎ lowVal: castint (csvParser.row[4]) ⏎ I cast it to int from csv but I got strange value
10:11:37FromGitter<Bennyelg> for example 25 I got 4303298872
10:12:21*nsf quit (Quit: WeeChat 1.9)
10:13:23FromGitter<GULPF> you can't cast from string to int. the strutils module contains procs for parsing strings to ints (https://nim-lang.org/docs/strutils.html#parseInt,string)
11:01:47*yglukhov quit (Remote host closed the connection)
11:22:04*gokr joined #nim
11:22:34*kunev quit (Ping timeout: 264 seconds)
11:24:54*kunev joined #nim
11:36:44*Yardanico joined #nim
11:43:41FromGitter<codenoid> is nim safe-type type programming lang for typing-safety type ?
11:46:50FromGitter<TiberiumN> yes
11:47:11FromGitter<TiberiumN> and also it's very smart
11:52:09FromGitter<Yardanico> because you don't need to write types manually in most of the cases (variables)
11:57:19*nsf joined #nim
12:09:03*dddddd joined #nim
12:11:14FromGitter<codenoid> agree
12:14:41*gokr quit (Ping timeout: 240 seconds)
12:31:20*nattefrost joined #nim
13:16:03*gangstacat quit (Quit: Leaving)
13:16:46*mahmudov joined #nim
13:27:09*endragor quit (Remote host closed the connection)
13:27:18Araqx ?? f(a, b) becomes f(x, a, b)
13:27:32dom96what now?
13:27:33Araqwhat's the name of the ?? operation?
13:27:36*endragor joined #nim
13:27:50Araqany Haskellers around? :P
13:27:54dom96oh, it's a sort of curry
13:28:19Araqnot really but even if, I cannot use the name 'curry' for it
13:29:58*endragor_ joined #nim
13:30:18AraqprependArg ?
13:30:33dom96I have a feeling that the >> and >>= Haskell operators might be related to this
13:30:36Araqf(a, b).prependArg(x)
13:30:59AraqI even feel like adding it to macros.nim
13:31:01*nsf quit (Quit: WeeChat 1.9)
13:31:25dom96what's the rationale for this?
13:31:28Araqit comes up often if you do "perfect forwarding" the Nim style
13:31:41*endragor quit (Ping timeout: 240 seconds)
13:32:32Araqxmap(seq, f(a, b))
13:32:55Araqxmap needs to inject 'it' into the f(a, b) call
13:33:08dom96You should check out the modules of other languages that include the 'curry' proc
13:33:16dom96I bet there is a standard name for this
13:33:38Araqbut can a standard name be as good as "prependArg"? :P
13:33:52Araqthe FP people are not known for coming up with sane names
13:34:05dom96meh, true.
13:34:17dom96Do we have an FP module?
13:34:35Araqin nimble yes
13:34:43*endragor_ quit (Ping timeout: 255 seconds)
13:35:12Araqbut maybe I should stick to the Nim standard and inject an 'it' name
13:35:20AraqxmapIt(seq, f(it, a, b))
13:35:39dom96what's xmap?
13:35:58Araqsomething Karax specific
13:36:47dom96but basically a map, no?
13:37:01dom96xmap(seq, it => f(it, a, b))
13:37:05dom96This is how you should do it
13:37:33Araqyes, basically a map
13:43:23*pilne joined #nim
13:44:32euantorRegarding the earlier discussion of Finder on OSX: Finder really sucks
13:45:23euantorWhen I first got this mac, Finder was the thing I hated most, it's extremely lacking. Though Gnome's file browser is heading in the same direction now by removing lots of useful features in the name of simplicity
13:48:29Yardanicocan I somehow get type of an expression? in a macro?
13:49:17*haha_ quit (Quit: haha_)
13:55:49*haha_ joined #nim
13:57:44*BitPuffin|osx quit (Ping timeout: 246 seconds)
13:58:05*PMunch joined #nim
14:08:59*haha_ quit (Quit: haha_)
14:34:32AraqYardanico: macros.getType()
14:40:43*haha_ joined #nim
14:41:34*haha_ quit (Client Quit)
14:50:42*haha_ joined #nim
15:01:41YardanicoAraq, hmm this can't help me. I was trying to somehow make list comprehension from "future" module work without specifying element types
15:01:41*smt joined #nim
15:11:00AraqYardanico: if it were simple others would have done it already
15:11:21Yardanicohmm, yeah, seems to be true
15:11:43Araqwe thought about making 'for' avaible as an expression instead
15:11:52Araqmuch like we do it for 'if' and 'case'
15:11:55Araqbbl
15:11:57Yardanicoyeah, I saw that in irc
15:18:10*nsf joined #nim
15:18:39FromGitter<Smaehtin> I think there was a similar suggestion for Rust
15:19:19FromGitter<Smaehtin> Ah, yeah: https://github.com/rust-lang/rfcs/blob/master/text/1624-loop-break-value.md
15:21:05*PMunch quit (Quit: leaving)
15:22:19Yardanicois "loop" basically a shortcut for while true?
15:26:13Yardanicoah, yes
15:26:17Yardanicoand it's a keyword, lol
15:30:40Yardanicowe can make the same "loop" in nim with 3 lines
15:36:05*haha_ quit (Quit: haha_)
15:36:44*enthus1ast- joined #nim
15:38:33enthus1ast-what do you think of something like a "echo only in debug build" template for the stdlib? https://gist.github.com/enthus1ast/da7de81b1c5b3c0079d2f8ddada65ecb
15:40:57Yardanicoyou can also remove "else: discard"
15:42:05Yardanicowhen not defined(release): echo nn is all that you need
15:42:13Yardanicobut it's a good addition actually
15:42:17Yardanicoa small shortcut
15:42:44enthus1ast-i've used it in my last projects and i like it
15:43:44Yardanicowell yeah, it would save many lines of code if you echo stuff in many places
15:44:55enthus1ast-where should it be? system.nim?
15:45:06Yardanicoprobably yeah
15:45:20YardanicoI don't think it would be good to add it to other modules
15:45:49Yardanicobut I don't know what name would be the best
15:46:04*gokr joined #nim
15:46:29Yardanicobecause there's already debugEcho in macros.nim
15:46:34Yardanicoah sorry
15:46:35Yardanicoin system.nim
15:47:07Yardanicohmm
15:47:27Yardanicoit actually would be the best to use debugEcho in your template
15:47:38Yardanicobecause it pretends to be free of side effects
15:47:59enthus1ast-ok
15:52:33enthus1ast-so its this then (commented): https://gist.github.com/enthus1ast/da7de81b1c5b3c0079d2f8ddada65ecb
15:53:34Yardanicoenthus1ast-, btw, you can also edit gists :)
15:53:53enthus1ast-:)
15:55:25Yardanicowell it's a cool thing actually
15:55:27*arnetheduck quit (Ping timeout: 240 seconds)
15:56:08enthus1ast-i like the name, but, any nameing suggestions? :)
15:56:43FromGitter<Smaehtin> It's a shame `debugEcho` is taken already
15:56:45Yardanicoyeah
15:57:01*v17d quit (Remote host closed the connection)
15:57:11enthus1ast-i've never seend debugEcho used
15:57:15enthus1ast-seen
15:57:21*endragor joined #nim
15:58:34*vlad1777d joined #nim
15:58:43Yardanicoenthus1ast-, https://github.com/search?q=language%3ANim+debugEcho&type=Code&utf8=%E2%9C%93
15:58:46FromGitter<Smaehtin> I honestly think it would make more sense to just alter `debugEcho` to do what your `dbg` template does, but of course, that's just my opinion
15:58:50Yardanicoyeah
15:59:02Yardanicoit seems that ppl use debugEcho like your "dbg"
15:59:50FromGitter<Smaehtin> > Same as echo, but as a special semantic rule, debugEcho pretends to be free of side effects, so that it can be used for debugging routines marked as noSideEffect
16:00:19FromGitter<Smaehtin> I mean ... it's kind of in the documentation of `debugEcho` already: "used for *debugging* routines"
16:01:30*endragor quit (Ping timeout: 240 seconds)
16:01:40FromGitter<Yardanico> Well the re might be bugs which are reproducible only in release build
16:02:50enthus1ast-or if one would do a : "dbg doSomething()"
16:03:01enthus1ast-mhh
16:03:33FromGitter<Smaehtin> Doesn't D have something like that?
16:03:37FromGitter<Smaehtin> I believe it does
16:04:04enthus1ast-idk
16:05:15enthus1ast-if you like it i'll make a pr
16:05:47*RelaxBox joined #nim
16:06:26FromGitter<Smaehtin> Ah, yeah, it's mentioned here: https://dlang.org/spec/function.html#pure-functions
16:06:39*def-pri-pub joined #nim
16:06:59FromGitter<Smaehtin> `debug writeln("in foo()");`the call is only made in debug mode
16:07:23Yardanicoah
16:07:31Yardanicowhen we can make template like that
16:08:58Yardanicohttps://gist.github.com/Yardanico/e84f5ce6595cf31f3764160180219060
16:09:58enthus1ast-+1
16:10:04enthus1ast-i like it
16:10:14FromGitter<Smaehtin> Yeah, it's really useful IMO
16:11:50enthus1ast-is it maybe clashing with debug from logging?
16:12:08Yardanicohmmm
16:12:11Yardanicoprobably yes
16:12:22enthus1ast-then maybe just dbg?
16:12:31FromGitter<Smaehtin> `template debug(args: varargs[string, `$`])`
16:12:46Yardanicowell it wouldn't clash
16:13:06Yardanicobecause yes, debug from logging accepts some number of strings
16:13:12Yardanicoah wait
16:13:13Yardanicoit does
16:13:26FromGitter<Smaehtin> I'd hope overload resolution would make it not clash :D
16:13:36FromGitter<Smaehtin> But idk
16:13:48Yardanicoit does :(
16:14:08*yglukhov joined #nim
16:14:19FromGitter<Smaehtin> Ah, dam
16:14:23enthus1ast-dbg? :D
16:14:28Yardanicowell make a PR
16:14:45YardanicoAraq, dom96 and others then would probably add their feedback :)
16:15:01*dddddd quit (Ping timeout: 240 seconds)
16:16:27FromGitter<Smaehtin> What if you declare the "body" as a proc without a return type+
16:16:59Yardanico?
16:17:12Yardanicowell it would still insert body
16:17:24*haha_ joined #nim
16:17:36dom96maybe you could call it withDebug or onDebug
16:18:02enthus1ast-ooor
16:18:05FromGitter<Smaehtin> `template debug(body: proc)`
16:18:06Yardanico??
16:18:10enthus1ast-we could define debug :)
16:18:17enthus1ast-when debug:
16:18:27Yardanicowell it would be actually very easy
16:18:43*dddddd joined #nim
16:19:12Yardanicoenthus1ast-, well but you'll still need to use many "when debug" statements
16:19:16FromGitter<Smaehtin> Oh yeah, I just meant. if you define the template as `template debug(body: proc)`, it shouldn't clash with the `logging.debug` proc
16:19:41Yardanicoah, yes
16:20:02Yardanicohmm
16:20:04Yardanicoit wouldn't work
16:20:58FromGitter<Smaehtin> Well it would work like ⏎ ⏎ ```debug: ⏎ echo(123)``` [https://gitter.im/nim-lang/Nim?at=5998656a80d90ca024174396]
16:21:28FromGitter<Yardanico> well then we can just define debug
16:21:44FromGitter<Yardanico> ```when debug: ⏎ echo(123)``` [https://gitter.im/nim-lang/Nim?at=5998659876a757f808c0625f]
16:21:58FromGitter<Smaehtin> Yeah, that'd be nice
16:22:14Yardanicoconst debug = not defined(release)
16:22:59dom96pretty sure defined(debug) already works
16:23:29Yardaniconah :)
16:36:26enthus1ast-so then: https://gist.github.com/enthus1ast/de7419c5abbaa00faf76fbc375be6c7f
16:36:55*haha_ quit (Quit: haha_)
16:39:11enthus1ast-i like 3 and maybe 4
16:41:44FromGitter<Smaehtin> Yeah,  on 3 and 4 from here as well
16:47:10*haha_ joined #nim
16:49:21dom96yeah, agreed
16:55:42enthus1ast-or maybe even whenDebug:
16:56:03*haha_ quit (Quit: haha_)
16:56:40enthus1ast-nah
16:58:42enthus1ast-i've made an isse https://github.com/nim-lang/Nim/issues/6258
16:58:49enthus1ast-issue
17:01:35*haha_ joined #nim
17:06:17*yglukhov quit (Remote host closed the connection)
17:24:40*haha_ quit (Quit: haha_)
17:25:05*haha_ joined #nim
17:54:56*haha_ quit (Quit: haha_)
17:56:19*haha_ joined #nim
17:59:59*def-pri-pub quit (Quit: leaving)
18:05:56*yglukhov joined #nim
18:07:20*yglukhov quit (Remote host closed the connection)
18:15:05*eldiz joined #nim
18:28:11*endragor joined #nim
18:32:35*endragor quit (Ping timeout: 240 seconds)
18:41:21*RelaxBox quit (Ping timeout: 240 seconds)
18:57:19*RelaxBox joined #nim
19:03:50*def-pri-pub joined #nim
19:10:18*yglukhov joined #nim
19:15:45*gokr quit (Ping timeout: 248 seconds)
19:15:50*yglukhov quit (Remote host closed the connection)
19:20:31*couven92 quit (Quit: Client Disconnecting)
19:25:35*def-pri-pub quit (Ping timeout: 240 seconds)
19:27:37Yardanicowow, in my usecase scanf is at least 2x faster than split
19:27:53*def-pri-pub joined #nim
19:27:53*def-pri-pub quit (Changing host)
19:27:53*def-pri-pub joined #nim
19:28:57Yardanicoalso using parseUntil is a bit faster than split :)
19:29:36YardanicoI use parseUntil for splitting by ,
19:29:43Yardanicoand use scanf for parsing strings like int|float|float|int
19:31:53dom96cool
19:32:17dom96Sounds like a nice blog article ;)
19:33:21Yardanicowell nothing big here, just wanted to try something new. I don't parse anything interesting, just osu! game replays (they have very simple structure)
19:33:33YardanicoI use "streams" module for parsing binary
19:33:52Yardanicoalso I use easylzma C library for decompressing LZMA :)
19:35:41dom96nice
19:35:50dom96why are you parsing replays?
19:37:01Yardanicowell, because i wanted to try something new and also because I have no ideas of new programs :D
19:38:40dom96Yardanico: I can give you an idea if you'd like :)
19:39:08Yardanicodom96, I'm all ears
19:40:21*haha_ quit (Quit: haha_)
19:40:26dom96A website that collects a list of wanted Nim libraries and projects that people are working on in Nim.
19:40:49dom96This in itself would be a repository of ideas for you and others ;)
19:42:24*haha_ joined #nim
19:43:48*niv quit (Ping timeout: 246 seconds)
19:44:31federico3I was thinking of the same, but as an idea bank
19:56:41*def-pri-pub quit (Ping timeout: 255 seconds)
19:57:38*niv joined #nim
19:58:01*haha_ quit (Quit: haha_)
19:58:45*def-pri-pub joined #nim
19:58:45def-pri-pubzacharycarter: Can you do me a solid and give this issue a little higher priority?
19:58:49def-pri-pubwhoops
19:59:03def-pri-pubzacharycarter: https://github.com/zacharycarter/zengine/issues/26
19:59:32def-pri-pubYou've been touching that for model textures, so I think you'd be better to handle it.
19:59:34*def-pri-pub quit (Client Quit)
20:05:48*haha_ joined #nim
20:07:05*Vladar quit (Quit: Leaving)
20:07:11*def-pri-pub joined #nim
20:11:37*def-pri-pub quit (Ping timeout: 255 seconds)
20:13:23FromGitter<dandevelop> Hi everyone, I am inside a package dir in the terminal. How do I tell nimble to compile all the files in the package to make sure that everything compiles ok?
20:13:33*def-pri-pub joined #nim
20:15:14euantor`nimble build` should do it, or `nimble install` to install the package as you would if it were being installed from source control
20:15:51euantorFor the future a `nimble check` command could be useful to check package structure
20:18:45*haha_ quit (Quit: haha_)
20:21:04FromGitter<dandevelop> Thank you @euantor . Yes that should be useful as for now nimble build returns with Error: Nothing to build. Did you specify a module to build using the `bin` key in your .nimble file?
20:21:53euantorAh, yeah it'll only build binary packages
20:22:47*def-pri-pub quit (Quit: leaving)
20:34:33*Yardanico quit (Remote host closed the connection)
20:36:47*smt quit (Ping timeout: 248 seconds)
20:38:37*Zevv joined #nim
20:41:35*RelaxBox quit (Ping timeout: 248 seconds)
20:48:40*AndyM joined #nim
20:50:41*mahsav2 quit (Ping timeout: 240 seconds)
20:51:08*RelaxBox joined #nim
20:51:43*mahmudov quit (Ping timeout: 248 seconds)
20:51:51*mahmudov joined #nim
20:57:05*mahmudov quit (Changing host)
20:57:05*mahmudov joined #nim
21:00:54*AndyM quit (Quit: Page closed)
21:02:57*Tiberium joined #nim
21:03:19*Tiberium quit (Client Quit)
21:04:22*Yardanico joined #nim
21:04:56dom96`nimble develop` is here https://github.com/nim-lang/nimble#nimble-develop
21:07:54*watzon joined #nim
21:10:26*enthus1ast- quit (Quit: Lost terminal)
21:25:20FromGitter<zacharycarter> @define-private-public can't get to it right this second, just looked and seems reasonable, I'll work on it this evening
21:25:42FromGitter<zacharycarter> yay! @dom96 that's awesome :D
21:26:02dom96Hope you all find it useful :)
21:26:18dom96I know Araq has been lusting after this feature at least :D
21:29:14*gokr joined #nim
21:30:01*vlad1777d quit (Remote host closed the connection)
21:33:30*RelaxBox quit (Ping timeout: 240 seconds)
21:44:01*BitPuffin|osx joined #nim
21:45:35euantorNice
21:45:50subsetparkdom96: awesome!!
21:48:58mahmudovdom96 it is also does git update?
21:49:11mahmudovgit pull if any change comes?
21:51:27mahmudovit will be good feature when any package wants to use it as depency then it will be auto do 'git pull'
22:07:46*def-pri-pub joined #nim
22:10:54dom96mahmudov: no, it's up to you to do yourself
22:14:07*eldiz quit (Quit: Leaving)
22:33:44mahmudovhm ok dom96
23:01:15*yglukhov joined #nim
23:02:57*gokr quit (Ping timeout: 240 seconds)
23:03:19*nsf quit (Quit: WeeChat 1.9)
23:12:21*yglukhov quit (Remote host closed the connection)
23:27:50*PMunch joined #nim
23:28:32Yardanicodom96, is there any functionality in NimBot to show new issues and commits in github? this would be useful
23:31:35dom96sorta
23:35:24Yardanicooh, i see this functionality, so why it's disabled?
23:38:07dom96because it requires NimBuild to be running
23:39:47Yardanicoah
23:46:23dom96Yardanico: so what did you think about my idea?
23:49:16mahmudovdom96 so can you add also "nimble develop github/acc/project.git" will install gitrepo current directory and will link under packages ?
23:49:30dom96yep
23:49:44mahmudovcool
23:50:02mahmudovso it wont be look packages.json
23:50:22mahmudovmore flexible to install projects
23:50:55mahmudovbut can it be conflicts about names of projects?
23:51:43mahmudovit can be warn...
23:52:07*Trustable quit (Remote host closed the connection)
23:55:32*Yardanico quit (Read error: Connection reset by peer)
23:57:29*arnaud1 joined #nim