<< 06-08-2018 >>

00:05:49*yglukhov[i] joined #nim
00:07:54*Whiskey1 joined #nim
00:10:34*yglukhov[i] quit (Ping timeout: 256 seconds)
00:12:16*Whiskey1 quit (Ping timeout: 256 seconds)
00:13:08*pixdamix joined #nim
00:14:08*pixdamix quit (Remote host closed the connection)
00:20:50*yglukhov[i] joined #nim
00:25:05*yglukhov[i] quit (Ping timeout: 240 seconds)
00:29:56FromGitter<Varriount> You would think Apple would have better OpenGL support.
00:42:50zacharycarter[m]nawp
00:46:30*ablackack21 joined #nim
00:47:05*ablackack21 quit (Killed (Sigyn (Spam is off topic on freenode.)))
00:50:51*yglukhov[i] joined #nim
00:53:56zacharycarter[m]does anyone know what the syntax - `object of RootObj` was used for?
00:54:08zacharycarter[m]did Nim used to allow inheritance with non ref objects?
00:54:57*yglukhov[i] quit (Ping timeout: 240 seconds)
01:05:31zacharycarter[m]I guess it still does?
01:05:49*yglukhov[i] joined #nim
01:08:15zacharycarter[m]I'm trying to understand the cause of this issue I created -
01:08:16zacharycarter[m]https://github.com/nim-lang/Nim/issues/8535
01:10:38*yglukhov[i] quit (Ping timeout: 256 seconds)
01:10:55zacharycarter[m]Does anyone have a suggestion for a good IRC client on OSX? I've been using matrix (Riot) and I'm not liking it
01:11:00zacharycarter[m]sorry I meant to ask that in offtopic - still looking for help with ^
01:33:03zacharycarter[m]ooph - I guess I'm going to have to get into compiler debugging to figure this out... never done this before but I guess there's no better time to get started
01:35:47zacharycarter[m]dom96: does choosenim have any way to install a debug version of a release channel?
01:35:50*yglukhov[i] joined #nim
01:39:57*yglukhov[i] quit (Ping timeout: 240 seconds)
01:51:55*yglukhov[i] joined #nim
01:56:05*krux02 quit (Remote host closed the connection)
01:56:05*yglukhov[i] quit (Ping timeout: 240 seconds)
02:02:53zacharycarter[m]anyone know how to use gdb / lldb to set breakpoints in compiler code?
02:03:08zacharycarter[m]I bootstraped the compiler with koch using debuginfo and linedir
02:03:11zacharycarter[m]or whatever
02:03:26zacharycarter[m]and I fired up the compiler with lldb and ran it and it errored out
02:03:42zacharycarter[m]now I'm trying to set breakpoints in compiler files and it's not finding them 😕
02:03:55leorizegdb works quite fine in that regard
02:05:50*yglukhov[i] joined #nim
02:07:57zacharycarter[m]oh I know why
02:09:00zacharycarter[m]I'm being stupid - I'm using choosenim and didn't copy the nim executable to the bin dir
02:10:05*yglukhov[i] quit (Ping timeout: 240 seconds)
02:13:30zacharycarter[m]just going to uninstall choosenim 😧 it's making life difficult
02:14:53FromGitter<gogolxdong> @mratsim cannot find some definination of some references in eth-p2p, like logscope ,Wire .
02:21:27*olspookishmagus3 joined #nim
02:22:24*olspookishmagus3 quit (Remote host closed the connection)
02:29:19*dddddd quit (Remote host closed the connection)
02:31:02FromGitter<gogolxdong> found logscope, where is Wire?
02:35:52*yglukhov[i] joined #nim
02:38:53*Slumlord_ joined #nim
02:38:58*Slumlord_ quit (K-Lined)
02:40:22*yglukhov[i] quit (Ping timeout: 244 seconds)
02:41:09FromGitter<gogolxdong> what's the difference between quote and quote do
02:45:53leorizethey're the same?
02:50:45*yglukhov[i] joined #nim
02:55:05*yglukhov[i] quit (Ping timeout: 240 seconds)
02:58:17FromGitter<gogolxdong> looked through nim-eth-p2p, it's about implement of RPLx protocol, Ethereum-specified, routing part implemented a subset of IPFS's. doesn't apply.
02:59:57FromGitter<DanielSokil> Hi, I'm new to TDD(Test Driven Development) and programming in general. I was wondering if there are simple examples of TDD using Nim? Thanks.
03:01:32*CurryWurst20 joined #nim
03:01:39*CurryWurst20 quit (K-Lined)
03:05:47*yglukhov[i] joined #nim
03:10:08*yglukhov[i] quit (Ping timeout: 260 seconds)
03:17:55*arza11 joined #nim
03:19:20*arza11 quit (Remote host closed the connection)
03:20:57*yglukhov[i] joined #nim
03:25:33*yglukhov[i] quit (Ping timeout: 264 seconds)
03:30:28*pskosinski22 joined #nim
03:30:51*pskosinski22 quit (Remote host closed the connection)
03:32:54zacharycarter[m]> <@freenode_FromGitter:matrix.org> <DanielSokil> Hi, I'm new to TDD(Test Driven Development) and programming in general. I was wondering if there are simple examples of TDD using Nim? Thanks.
03:32:55zacharycarter[m]TDD isn't really a language specific thing - it's more of a development methodology. I don't think you're going to find many examples of how to do TDD in Nim.
03:33:24zacharycarter[m]I'd learn to program first, and worry about TDD later.
03:33:26*endragor joined #nim
03:35:49*yglukhov[i] joined #nim
03:40:17*yglukhov[i] quit (Ping timeout: 248 seconds)
03:48:53FromGitter<DanielSokil> @zacharycarter Thanks for your quick response, where I could learn to test Nim programs in general? I tried to understand https://nim-lang.org/docs/unittest.html but it does not help.
03:50:49*yglukhov[i] joined #nim
03:51:54*cfields2 joined #nim
03:55:06leorizeDanielSokil: how would you test a C/C++/whatever lang program?
03:55:32*yglukhov[i] quit (Ping timeout: 256 seconds)
03:57:27*cfields2 quit (Ping timeout: 240 seconds)
03:59:42*vans2 joined #nim
04:01:23*vans2 quit (Remote host closed the connection)
04:04:32FromGitter<DanielSokil> @leorize I have very little familiarity with testing.
04:05:43leorizethen I suggest you learn what exactly do people do to test programs first
04:06:08leorizeand also what do people actually test
04:06:21leorizeis it the program, or it's internals
04:07:07leorizeBut I've to agree with zacharycarter[m], if you're new to programming, you should learn how to program first
04:08:32leorizeyou shouldn't have to worry about tests until you're well understand why you need it
04:12:05FromGitter<DanielSokil> @learize Thank You!
04:20:45*yglukhov[i] joined #nim
04:25:05*yglukhov[i] quit (Ping timeout: 240 seconds)
04:28:02*mentifis15 joined #nim
04:29:33*mentifis15 quit (Remote host closed the connection)
04:35:49*yglukhov[i] joined #nim
04:40:18*yglukhov[i] quit (Ping timeout: 256 seconds)
04:50:49*yglukhov[i] joined #nim
04:52:21*nkelly quit (Read error: Connection reset by peer)
04:55:36*yglukhov[i] quit (Ping timeout: 256 seconds)
04:57:52*Jovan28 joined #nim
04:58:20*Jovan28 quit (Remote host closed the connection)
05:10:39*nsf joined #nim
05:20:22*rockcavera joined #nim
05:27:00*prawnsalad25 joined #nim
05:27:46*leorize quit (Ping timeout: 260 seconds)
05:27:57*prawnsalad25 quit (Remote host closed the connection)
05:40:12*Guest19103 joined #nim
05:40:48*Guest19103 quit (Remote host closed the connection)
05:50:32*leorize joined #nim
06:02:51*Vladar joined #nim
06:58:05*PMunch joined #nim
06:59:12*bthesorceror joined #nim
07:00:00*yglukhov[i] joined #nim
07:13:50*thumbs6 joined #nim
07:14:17*thumbs6 quit (Remote host closed the connection)
07:23:15*barbietoss joined #nim
07:27:38*barbietoss quit (Ping timeout: 244 seconds)
07:27:58*bthesorceror quit (Ping timeout: 268 seconds)
07:30:54FromGitter<ZarsBranchkin> Any clue why pegs doesn't work in macros? The skip procedure seems to fail by accessing a nil address
07:43:53Araqit's a VM problem. no known workaround exists.
07:48:24FromGitter<ZarsBranchkin> Alright, thanks. Was just playing around with macros, luckily nothing crucial
07:51:58*wildlander joined #nim
08:03:35*gmpreussner joined #nim
08:04:18*gmpreussner_ quit (Ping timeout: 256 seconds)
08:07:53*couven92 joined #nim
08:09:04*floppydh joined #nim
08:26:14*stefanos82 joined #nim
08:27:33FromGitter<mratsim> @zacharycarter, Textual? I have it compiled took me 2 hours fumbling with source config. Otherwise writing an Nim IRC client for maccould be fun
09:06:35*leorize quit (Ping timeout: 240 seconds)
09:16:01livcdjeez i get spammed via Q
09:20:21*bluszcz10 joined #nim
09:20:59*Pyrrhic joined #nim
09:21:03*Pyrrhic quit (Remote host closed the connection)
09:21:32*bluszcz10 quit (Remote host closed the connection)
09:22:24*Vladar quit (Quit: Leaving)
09:30:06*ng0 joined #nim
09:30:40*Vladar joined #nim
09:33:09*miran joined #nim
09:39:28*leorize joined #nim
09:40:12*Connection joined #nim
09:46:52*Connection quit (Ping timeout: 256 seconds)
09:47:27*Guest3871 joined #nim
09:51:05FromGitter<ZarsBranchkin> @kaushalmodi Real late on this one, but I made the current state of nimacs public https://github.com/ZarsBranchkin/Nimacs
09:51:30*aguspiza joined #nim
09:52:35*couven92 quit (Ping timeout: 240 seconds)
09:53:09*Guest3871 quit (Ping timeout: 264 seconds)
09:56:18*noah28 joined #nim
09:56:45*dddddd joined #nim
09:57:25*noah28 quit (Remote host closed the connection)
10:05:30*OPK5 joined #nim
10:06:39*OPK5 quit (Remote host closed the connection)
10:12:13*raso2 left #nim ("WeeChat 2.1")
10:12:34*StephenS19 joined #nim
10:13:51leorizeis it possible to disable Nim's default signal handler?
10:14:18*StephenS19 quit (Remote host closed the connection)
10:19:30PMunchFor the UNIX signals?
10:20:16*NimBot joined #nim
10:21:55FromGitter<kayabaNerve> Maybe via the FFI?
10:22:06FromGitter<kayabaNerve> I don't think so in raw Nim but I may be wrong
10:22:57PMunchThere is this: https://nim-lang.org/docs/posix.html#onSignal.t,varargs[cint],untyped
10:23:04PMunchleorize ^
10:23:15PMunchBut beware: https://github.com/nim-lang/Nim/issues/7042
10:24:01leorizePMunch: I mean to prevent the generation of the code that install the default signal handling
10:24:33leorizeI'm trying to debug a Haiku problem with Nim, so far I've not been able to replicate it with C
10:24:56leorizeso I'm trying to strip as much code from the generated C as possible
10:26:09PMunchDoes Nim have any default signal handling?
10:26:55leorizeyes, Nim handles SIGSEGV
10:27:03leorizeSIGINT and maybe more
10:29:30FromGitter<mratsim> @leorize: https://hookrace.net/blog/nim-binary-size/ I’m pretty sure it removes Nim signal handler in the quest to shrink binary size
10:32:18*GodSkinS0 joined #nim
10:32:25leorizemratsim: thanks
10:33:07leorizeit was avoided by os:standalone, but that also means threading won't be available :/
10:33:12*GodSkinS0 quit (Remote host closed the connection)
10:33:17PMunchYeah
10:33:24PMunchHe never removes them explicitly..
10:34:21PMunchWhat are you actually trying to do leorize, removing signal handlers doesn't seem like the way to go about it..
10:34:48*siso_ joined #nim
10:35:08FromGitter<mratsim> Can you check this PR? https://github.com/nim-lang/Nim/pull/8542 or maybe it’s you.
10:35:56leorizeyep it's me
10:36:19*siso_ quit (Remote host closed the connection)
10:36:43leorizefound it :D it was -d:noSignalHandler
10:36:51FromGitter<gogolxdong> Is there a polynomial division algorithm in Nim?
10:37:35leorizePMunch: I'm trying to debug a threading problem in Haiku, simple C program that more or less does the same can't reproduce the problem
10:37:52leorizeso I resort to strip the Nim program until I can pinpoint the bug
10:38:06FromGitter<mratsim> I didn’t see one, maybe check in def- repos @gogolxdong, but I don’t think he has one either
10:39:29*Vladar quit (Quit: Leaving)
10:40:42ehmryleorize: does Haiku use the normal Nim POSIX stuff?
10:41:06leorizeyes, we do have pthreads stuff that Nim was using
10:41:52ehmryits not terribly difficult to write native thread support
10:42:10PMunchIf you want do go for a more manual approach it is also possible to just generate the C code and a build script and modify the C sources directly
10:42:35ehmryI did that for Genode to avoid pthreads
10:43:34leorizeehmry: well the main point here is to find Haiku's bug
10:43:47ehmryah
10:45:11*oldschool^6 joined #nim
10:45:46*oldschool^6 quit (Killed (Sigyn (Spam is off topic on freenode.)))
10:45:58leorizePMunch: yea, but I would want to strip as much code as possible with Nim's built in options first
10:46:18leorizelooks like you can't do --threads:on --d:useMalloc --gc:none
10:51:34zacharycarter[m]are there any good guides / tips for compiler debugging?
10:51:45zacharycarter[m]I'm going to try to tackle this issue today - https://github.com/nim-lang/Nim/issues/8535
10:53:29*Vladar joined #nim
11:00:52zacharycarter[m]btw - why did Nim choose the name magic instead of builtin or intrinsic?
11:00:54zacharycarter[m]just curious
11:01:41*ruunyan joined #nim
11:03:05*Checking joined #nim
11:03:16*ruunyan quit (Remote host closed the connection)
11:04:13*Checking quit (Remote host closed the connection)
11:08:56*Colti1 joined #nim
11:09:43FromGitter<mratsim> shorter? :P
11:10:30*Colti1 quit (Remote host closed the connection)
11:11:21*moigagoo joined #nim
11:14:01*moigagoo quit (Client Quit)
11:14:06zacharycarter[m]fair enough :P
11:19:12FromGitter<gogolxdong> what's the equivalent of bitwise or `|=`
11:19:26FromGitter<mratsim> a = a or b
11:19:45FromGitter<gogolxdong> v = v or v shr 1
11:20:13FromGitter<mratsim> you should add some parens to make sure of precedence
11:20:30miranv.shr(1) will do
11:20:33FromGitter<gogolxdong> `|= ` is handy.
11:20:44miranand it is prettier than (v shr 1), IMO
11:21:04FromGitter<gogolxdong> v = v or v.shr 1?
11:21:26miranyeah, and `>>=`, `&=` and all sorts of thing you can't do in nim because we don't use symbols, but words :(
11:21:43miranand also `+=` is missing from sets too
11:21:58FromGitter<gogolxdong> parenthesis is trivial
11:22:33dom96You can trivially define these using a template
11:22:50miranmore noise ;)
11:22:51FromGitter<mratsim> template `|=`(x: var uint, y: uint) = {.emit: `x`|=`y`.}
11:23:16Araqwhat a hack, use x = x or y in its body
11:23:23miranhm, what does `emit` do?
11:23:31Araqbut sure, who wants JS or VM support for this...
11:23:38mirani usually define `+=` as `a = a + b`
11:23:52Araqhack it with .emit, compilers love to be left in the dark
11:24:20*ng0 quit (Quit: Alexa, when is the end of world?)
11:24:58FromGitter<mratsim> @Araq, I’m not for or against but some do care: https://github.com/nim-lang/Nim/issues/8487#issuecomment-409708189
11:25:21FromGitter<mratsim> My testing shows that compilers optimize a = a or b properly
11:25:46FromGitter<mratsim> emit inlines C code @miran, it’s the last resort.
11:26:06FromGitter<mratsim> I forgot the “;” to end the line btw
11:26:07miranbtw, should my `+=` be a proc or a template? usually i hear "use the least powerful tool"
11:26:33FromGitter<mratsim> I use func inline.
11:26:48Araqsure they do, a real optimizer is not a toy
11:26:55*couven92 joined #nim
11:27:17FromGitter<mratsim> @miran: https://github.com/status-im/nim-stint/blob/master/stint/private/int_addsub.nim#L26-L28
11:27:45Araqin general optimizers give up when it comes to data that lives on the heap
11:27:58miranthanks @mratsim! i should start using `inline` more! i always forget about it!
11:32:03*ng0 joined #nim
11:54:27*SenasOzys quit (Ping timeout: 240 seconds)
12:03:23*varesa25 joined #nim
12:04:53*varesa25 quit (Remote host closed the connection)
12:10:54*aguspiza quit (Ping timeout: 260 seconds)
12:21:06*cooldude29 joined #nim
12:26:35*cooldude29 quit (Ping timeout: 240 seconds)
12:39:05*couven92 quit (Ping timeout: 240 seconds)
12:52:24dom96lol, the barelyMalicious/nc-x guy removed his account again
12:59:24*Vladar quit (Quit: Leaving)
13:02:39livcdwhat was he about ?
13:06:47*floppydh quit (Remote host closed the connection)
13:07:30*floppydh joined #nim
13:09:02*Vladar joined #nim
13:09:06*enthus1ast quit (Read error: Connection reset by peer)
13:11:49*couven92 joined #nim
13:11:59*enthus1ast joined #nim
13:12:25zacharycarter[m]https://github.com/BarelyMalicious - this guy I take it?
13:15:36dom96yep
13:15:57*Hoosilon25 joined #nim
13:18:04*cryptocat1094 joined #nim
13:19:29*endragor quit (Remote host closed the connection)
13:20:31zacharycarter[m]https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler :D found it
13:20:35zacharycarter[m]thank you zahary!
13:21:56*Hoosilon25 quit (Ping timeout: 268 seconds)
13:22:17*SunTsu3 joined #nim
13:24:09*SunTsu3 quit (Remote host closed the connection)
13:28:56FromDiscord<awr> hello
13:35:59FromGitter<kaushalmodi> @ZarsBranchkin Awesome! I'll try it out this week!
13:38:24FromGitter<ZarsBranchkin> I like how macros help with making the noisy C-like API more Nim-like
13:39:23FromGitter<kaushalmodi> @ZarsBranchkin I have the test suite modtest2.nim and test-modtest.el here ( https://github.com/kaushalmodi/nim-emacs-module/tree/master/test ). Can you create an equivalent test for Nimacs?
13:39:35FromDiscord<awr> reading that debugging the compiler thing reminded me RR existed
13:39:46FromDiscord<awr> i should try it sometime
13:39:52FromGitter<ZarsBranchkin> Will look into it
13:39:53FromDiscord<awr> i'm assuming linux only probably
13:40:02FromGitter<ZarsBranchkin> I need to get some tests going
13:41:57FromGitter<kaushalmodi> @DanielSokil TDD broadly means that write your tests first. They should fail at first. Then work on your actual code. The tests should pass then.
13:47:56*Vladar quit (Remote host closed the connection)
13:58:48*arecaceae quit (Remote host closed the connection)
13:59:07*arecaceae joined #nim
14:03:18*nc-x joined #nim
14:07:09*PMunch quit (Quit: Leaving)
14:07:34dom96nc-x: You've already done it like 2 times at least
14:08:41dom96What about your GitHub accounts?
14:10:09dom96yeah, and the issue you opened for that is here: https://github.com/nim-lang/nimforum/issues/148
14:10:26dom96And the GitHub account is gone, so why should I spend time implementing this?
14:13:11*aguspiza joined #nim
14:13:50*nc-x quit (Quit: Page closed)
14:22:27*cwre joined #nim
14:23:27*cyberzeus13 joined #nim
14:24:00*Yardanico_ joined #nim
14:24:33*cyberzeus13 quit (Remote host closed the connection)
14:24:46livcdi dont see anything from nc-x what is this sorcery
14:24:47*cwre quit (Remote host closed the connection)
14:24:52*meowshten joined #nim
14:26:18*^GaveUp^ joined #nim
14:26:18*gibril_ joined #nim
14:26:34*Yardanico quit (Ping timeout: 240 seconds)
14:26:34*GaveUp quit (Ping timeout: 240 seconds)
14:26:36*Connor[m]1 quit (Ping timeout: 240 seconds)
14:26:37*pqflx3[m] quit (Ping timeout: 240 seconds)
14:26:37*unclechu[m] quit (Ping timeout: 240 seconds)
14:26:37*subsetpark quit (Ping timeout: 240 seconds)
14:26:37*ketralni` quit (Ping timeout: 240 seconds)
14:26:37*gibril quit (Ping timeout: 240 seconds)
14:26:37*derlafff quit (Ping timeout: 240 seconds)
14:26:37*Widdershins quit (Ping timeout: 240 seconds)
14:26:40dom96Oh, it's because all non-registered users are muted
14:27:17*Widdershins joined #nim
14:28:50*pqflx3[m] joined #nim
14:29:04*Connor[m]1 joined #nim
14:29:09*beatmox quit (Ping timeout: 260 seconds)
14:31:03*^GaveUp^ left #nim (#nim)
14:31:14*unclechu[m] joined #nim
14:31:18*GaveUp joined #nim
14:31:21*subsetpark joined #nim
14:31:58*beatmox joined #nim
14:45:44*opi quit (Ping timeout: 276 seconds)
14:48:15*opi joined #nim
14:49:38*subsetpark quit (Ping timeout: 276 seconds)
14:51:46*subsetpark joined #nim
14:51:58*aguspiza quit (Ping timeout: 244 seconds)
14:52:18*pringlecake joined #nim
14:53:36*pringlecake quit (Remote host closed the connection)
14:54:50*miran quit (Ping timeout: 276 seconds)
14:58:02*wildlander quit (Quit: Konversation terminated!)
15:05:15*xet7 joined #nim
15:11:35*Vladar joined #nim
15:11:58*floppydh quit (Quit: WeeChat 2.2)
15:12:15*floppydh joined #nim
15:12:57*nickenchuggets joined #nim
15:13:23*nickenchuggets quit (Killed (Sigyn (Spam is off topic on freenode.)))
15:20:11*subsetpark quit (Ping timeout: 276 seconds)
15:22:36*subsetpark joined #nim
15:24:02*couven92 quit (Ping timeout: 268 seconds)
15:29:54*couven92 joined #nim
15:30:55Araqhow can I tell travis to install nodejs v8 or later?
15:32:07stefanos82Araq: without knowing, something like this? https://github.com/codecov/example-node/blob/master/.travis.yml
15:32:26FromGitter<kaushalmodi> Araq: https://docs.travis-ci.com/user/languages/javascript-with-nodejs/
15:32:52FromGitter<kaushalmodi> Set `node_js`to `"8"`?
15:34:16Araqyeah but my problem is that I already have 'language: C'
15:34:18dom96Araq: Same way you would do it on an Ubuntu machone
15:34:21dom96*machine
15:34:35Araqdom96, indeed I don't know how to do it for an Ubuntu machine either
15:34:48Araqour .travis.yml doesn't even mention 'node' once
15:35:03Araqit's installed on Linux by default but not on OSX
15:35:13dom96Google can help you with that
15:35:25Araqor #nim
15:35:42Araqdo you really think I asked here before asking Google?
15:36:25dom96If you couldn't find an answer then you need to improve your google-fu
15:36:35dom96brew install node
15:36:58dom96and if you want node 8 specifically then: brew install node@8
15:37:04Araqbut node is installed, just the wrong version
15:37:19Araqand on Linux it picks the right version
15:37:34dom96https://medium.com/@mahasakpijittum/downgrade-node-9-in-macos-18a3a55d5436
15:37:50dom96#6 result on Google
15:38:30Araqfor your personalized Google result of an unknown query.
15:38:48Araqseriously...
15:39:10dom96"mac os node 8"
15:40:00Araqand here I am, searching for a travis specific result as travis almost gets it right...
15:40:15Araqyou don't have to reply here, you know.
15:44:10*aguspiza joined #nim
15:45:21*ng0 quit (Ping timeout: 250 seconds)
15:46:06*TReK12 joined #nim
15:47:36*TReK12 quit (Remote host closed the connection)
15:59:23*bmos joined #nim
16:00:48Demos[m]Hey @Araq: is it reasonable for a buildsystem to run nim with —compileonly and then compile the c itself?
16:01:09*bmos quit (Remote host closed the connection)
16:01:22AraqDemos[m], the buildsystem should read nimcache/$project.json
16:01:31Araqthat describes what Nim would have done
16:02:20Araqit's always generated by Nim iirc, not yet another switch required
16:03:29Demos[m]Hmm yeah I can use that and verify that the arguments are passed through
16:07:12Demos[m]Context: meson and a quixotic quest to kill off vala with nim
16:08:07Demos[m]Is nim able to tell me if that file is updated?
16:08:40Araqwell the json file either contains a compile command for it or only a link command
16:10:09Demos[m]Also are comments still part of the ast?
16:11:20Araqdocumentation comments are.
16:11:39Demos[m]Wait so it changes based on the cache of object files?
16:11:54dom96shashlick: https://github.com/nim-lang/Nim/issues/532
16:12:28Demos[m]Oh that’s awesome. (Can have gtk-doc doc comments passed through to c)
16:21:59*nsf quit (Quit: WeeChat 2.2)
16:27:50*Yardanico_ left #nim (#nim)
16:28:08*Yardanico joined #nim
16:28:24*nkk71 joined #nim
16:29:14*nkk71 quit (Killed (Unit193 (Spam is not permitted on freenode.)))
16:39:26*neckbosov joined #nim
16:45:58*verm1n14 joined #nim
16:49:53*neckbosov quit (Quit: Leaving)
16:50:05*verm1n14 quit (Ping timeout: 240 seconds)
16:55:48AraqDemos[m]: use -f to ignore the caching mechanism, but I have no idea what you're after
17:02:45*MissionCritical joined #nim
17:05:48*Perkol joined #nim
17:06:04PerkolHow do I iterate over string?
17:07:17Perkolfor i in string
17:08:49*MissionCritical quit (Ping timeout: 248 seconds)
17:11:01*zahary_ joined #nim
17:12:38*moigagoo joined #nim
17:13:02*moigagoo quit (Remote host closed the connection)
17:15:59*aguspiza quit (Ping timeout: 260 seconds)
17:16:14FromGitter<kaushalmodi> Perkol: Yes, do just that.
17:25:23Araqkeep in mind that usually you want to iterate over runes/graphemes/etc
17:27:16*Guest47846 joined #nim
17:28:10FromGitter<kaushalmodi> Araq: I agree. Though, for most use cases, assuming the strings to be plain chars works.
17:28:28FromGitter<kaushalmodi> Perkol: Here's what Araq means by iterating over Runes: https://scripter.co/notes/nim/#a-note-about-unicode
17:28:56FromGitter<ZarsBranchkin> How should I understand the package's "private" modules? Those are all modules that user shouldn't include directly? Is it alright to export private module from the main module?
17:30:22AraqI think that's fine.
17:31:52FromGitter<Bennyelg> Hey I need help, I am using jester and nim as backend And I want to do a pagination
17:32:00FromGitter<Bennyelg> when display the route data
17:32:35*Guest47846 quit (Ping timeout: 240 seconds)
17:33:13*sujeet13 joined #nim
17:34:15Araqpagination? what to you mean?
17:36:25FromGitter<Bennyelg> when rendering a page
17:36:44FromGitter<Bennyelg> split the page into pages and display 10 results set for example each page
17:38:04*sujeet13 quit (K-Lined)
17:40:11Araqthat's usually a ?p=X URL thing
17:40:37FromGitter<Bennyelg> yea I am wondering how do I implement it
17:40:46Araqand usually the buck is passed on to the DB query with order by X limit 10 offset 30
17:42:00FromGitter<Bennyelg> Ic so / will render 10 results and then I'll create X more pages with different route /page=X till I dont have any results or something like that?
17:42:07PerkolAlso, is there a way to concert char to int? For insance if I have char '9'?
17:42:32*Demos_ joined #nim
17:43:28FromGitter<kaushalmodi> Perkol: You can do '9'.int
17:43:46FromGitter<kaushalmodi> https://scripter.co/notes/nim/#char-to-int
17:45:13*PMunch joined #nim
17:46:05AraqBennyelg: yup
17:49:25PerkolI do @['9'].join("").parseInt()
17:49:26*zahary_ quit (Read error: Connection reset by peer)
17:49:37*zahary_ joined #nim
17:49:43PerkolIt does what I want. Thanks for help though
17:50:01Araqthat's inefficient
17:50:23Araqand convoluted, please use int('9') or '9'.int
17:50:24FromGitter<Bennyelg> @Araq thanks
17:50:36FromGitter<kaushalmodi> > It does what I want. ⏎ ⏎ Why did you ask then? :P
17:51:17FromGitter<ZarsBranchkin> Interesting, why such a long way around to do something simple
17:51:39*krux02 joined #nim
17:55:35*couven92 quit (Ping timeout: 240 seconds)
17:56:31*Trustable joined #nim
18:05:09*nsf joined #nim
18:06:35*petersjt014[m] quit (Ping timeout: 276 seconds)
18:08:37ehmryhe wants ('9'.int - '0'.int)
18:09:08ehmryso 9, not 0x
18:09:28ehmry0x39
18:11:21ehmryPerkol: did I get that right?
18:12:21*petersjt014[m] joined #nim
18:13:11FromGitter<kaushalmodi> ehmry: That '9'.int - '0'.int method looks good
18:13:20FromGitter<kaushalmodi> Another way is: ⏎ ⏎ ```import strutils ⏎ echo parseInt($'9')``` [https://gitter.im/nim-lang/Nim?at=5b688fc0945df30dc1600956]
18:17:27PMunchYou also have ord('9')-48
18:17:41PMunchIf it's only a single character and guaranteed to be one of the ASCII numbers
18:18:14PMunchWhat's with the - '0'.int thing by the way=
18:18:43FromGitter<kaushalmodi> PMunch: That ensures that the ascii offset is subtracted
18:18:55PMunchAh right
18:19:03PMunchSame as my manual method with ord and - 48 then :P
18:19:12*infernix21 joined #nim
18:19:24FromGitter<kaushalmodi> yup
18:19:29FromGitter<kaushalmodi> '0'.int = 48
18:19:29*miran joined #nim
18:20:12FromGitter<kaushalmodi> I would use '0'.int to avoid having to remember 48 (I always get confused if the offset I remembered is hex or dec :))
18:20:38PMunchI'd use .ord instead of .int, makes it a bit more obvious what value you are extracting
18:21:14FromGitter<kaushalmodi> PMunch: Makes sense
18:22:09FromGitter<kaushalmodi> .. that will break the pattern in my table here (int column): https://scripter.co/notes/nim/#representing-one-type-in-another
18:22:11FromGitter<kaushalmodi> :P
18:22:16PMunch'9'.ord and 0xf works as well, the number part is the lower four bits.
18:23:08PMunchStill only holds for digits of course
18:24:54*infernix21 quit (Remote host closed the connection)
18:27:04*enthus1ast quit (Ping timeout: 256 seconds)
18:27:34*natrys joined #nim
18:29:18dyce[m]any thoughts on how Go handles json field names within the struct's definition. could nim use something like that and is it possible by using macros?
18:29:59Araqyeah but json.to for now uses the object field names
18:39:07dyce[m]also seems that you can define form field mapping as seen here: https://github.com/recoilme/tgram/blob/master/models/article.go#L23
18:39:36dyce[m]not sure if its because go has a form in its stdlib or if you can define any additional type
18:45:24Araqit's just strings that you can read out via reflection
18:45:47Araqand parse on your own.
18:46:10*ng0 joined #nim
18:51:13*ofelas quit (Quit: shutdown -h now)
18:53:03*ofelas joined #nim
18:54:27*krux02 quit (Remote host closed the connection)
18:58:41dyce[m]i see. so do macros allow the user to do something like this right now or would you need to make changes to nim's implementation
18:59:19FromGitter<Varriount> @imdaveho What terminal are you using, on what OS?
18:59:31AraqNim does allow for the same, but usually you query the AST instead of parsing silly illspecified minilanguages
19:02:55*Perkol quit (Quit: Leaving)
19:09:03*Jesin joined #nim
19:12:44*Xiti13 joined #nim
19:16:38*brainproxy joined #nim
19:17:30*Xiti13 quit (Ping timeout: 256 seconds)
19:19:19dom96dyce[m]: You could easily achieve this using pragmas in Nim, you could even add support for this to the json `to` macro
19:19:29dom96Presumably the primary bit of functionality is the default value?
19:20:04dom96oh wait, I see what this does
19:20:20dom96It mixes JSON, some DB properties, and HTTP forms?
19:24:11Araqit mixes everything, it has to. it's just a single string
19:25:17*Jesin quit (Remote host closed the connection)
19:25:40*FromGitter quit (Remote host closed the connection)
19:25:41*oprypin quit (Quit: Bye)
19:25:58*gareth__16 joined #nim
19:27:32*gareth__16 quit (Remote host closed the connection)
19:28:11*Jesin joined #nim
19:28:53*oprypin joined #nim
19:35:08*stefanos82 quit (Quit: Quitting for now...)
19:39:47*ng0 quit (Ping timeout: 250 seconds)
19:42:24*elrood joined #nim
19:53:05*rockcavera quit (Ping timeout: 248 seconds)
19:54:48*rockcavera joined #nim
19:54:54*Yes_ma`am joined #nim
19:55:17*Yes_ma`am quit (Remote host closed the connection)
19:56:25*nsf quit (Quit: WeeChat 2.2)
20:08:52*xet7 quit (Quit: Leaving)
20:14:58*ng0 joined #nim
20:15:35*couven92 joined #nim
20:15:57PMunchhttps://peterme.net/optional-value-handling-in-nim.html
20:16:31miranPMunch: the article from the future!! :)
20:16:38PMunchHuh?
20:16:45miran7th august 2018
20:16:50mirantoday is 6th
20:16:58PMunchOh yeah, I noticed that
20:17:20mirani won't read it until tomorrow ;)
20:17:27PMunchIt says that it is published at 1:14, so it's probably set in a different time-zone for some reason..
20:18:56PMunchHmm, my server agrees on the time
20:21:46PMunchmiran, fixed it manually for you miran :)
20:25:50mirantoo late, won't read (until tomorrow) :P
20:26:41PMunchHaha, fine. I'm on my way to bed soon, so I probably won't be answering too many questions before that anyways :P
20:42:05*miran quit (Ping timeout: 240 seconds)
20:42:16*cryptocat1094 quit (Quit: later)
20:50:52*elrood quit (Quit: Leaving)
20:53:51Araqugh, excessive documentation detected...
20:54:11Araqbackends.txt -- now I need to update all of that.
20:54:21Araqlesson: don't document your software.
21:18:24*PMunch quit (Quit: leaving)
21:19:59*NyanCat5 joined #nim
21:21:35*NyanCat5 quit (Remote host closed the connection)
21:27:58*JudicialWatch quit (Remote host closed the connection)
21:33:45*Trustable quit (Remote host closed the connection)
21:35:36*ng0 quit (Quit: Alexa, when is the end of world?)
21:37:49*couven92 quit (Remote host closed the connection)
21:38:04*couven92 joined #nim
21:39:39zacharycarter[m]hrm
21:40:06*couven92 quit (Read error: Connection reset by peer)
21:40:24*couven92 joined #nim
21:40:41zacharycarter[m]mdbg is deprecated - but https://github.com/nim-lang/Nim/wiki/Debugging-the-compiler#printf-debugging talks about it
21:40:54zacharycarter[m]I'm just not sure at all how to figure out how to tackle this issue - https://github.com/nim-lang/Nim/issues/8535
21:41:17zacharycarter[m]like where do I start to figure out what is causing the incorrect C code to be generated, and what should the correct C code be?
21:42:21*couven92 quit (Client Quit)
22:14:14zacharycarter[m]ugh - I need to start asking questions earlier in the day
22:25:23*Jesin quit (Remote host closed the connection)
22:44:53*ofelas quit (Quit: shutdown -h now)
22:47:16*elky joined #nim
22:47:26*elky is now known as Guest37184
22:47:42*Guest37184 quit (Killed (Sigyn (Spam is off topic on freenode.)))
22:52:33*abm joined #nim
22:54:09*stefanos82 joined #nim
23:02:39abmis there any ETA of Nim 1.0?
23:02:49abmat least an approximation?
23:03:43zacharycarter[m]no
23:03:50*Jesin joined #nim
23:04:30zacharycarter[m]not that I'm aware of at least
23:05:49*Vladar quit (Quit: Leaving)
23:09:10stefanos82abm: the more hands we get to help with Nim's bugfixes, the closer we will get to v1.0
23:09:47*Dominian27 joined #nim
23:11:47*Dominian27 quit (Read error: Connection reset by peer)
23:11:56zacharycarter[m]https://forum.nim-lang.org/search?q=mdbg
23:12:09zacharycarter[m]😞
23:13:01zacharycarter[m]I just want to figure out how to define a conditional inside compiler code to catch code for a certain module / entry point
23:16:55*yglukhov_ joined #nim
23:18:35*yglukhov[i] quit (Ping timeout: 240 seconds)
23:21:13*Jesin quit (Remote host closed the connection)
23:29:15*Jesin joined #nim
23:49:55*SerpentSpeech joined #nim
23:50:46*natrys quit (Quit: natrys)
23:51:43*SerpentSpeech quit (Remote host closed the connection)
23:52:47*craigger quit (Quit: bye)
23:55:28*craigger joined #nim