<< 06-03-2017 >>

00:04:23PMunchHmm, I'm running a command using execShellCmd. But now I want to hide all the output unless the command failed
00:05:49PMunchI was thinking of piping all the outputs to a tmpfile and read and echo that out in the case of a failure but I was wondering if there was a similar command that would return something like tuple[returncode:int, stdout, stderr: string]
00:10:37PMunchexecCmdEx seems to do something like it
00:10:53PMunchBut it appears to strip the colour..
00:15:11*gokr quit (Ping timeout: 260 seconds)
00:15:38*Vladar quit (Quit: Leaving)
00:16:28PMunchNever mind, that is program specific..
00:28:08*Serenitor joined #nim
00:30:54*PMunch quit (Quit: leaving)
00:41:37krux02PMunch: I heared that a common practice for command line applications is to check the shell for color support and only when color is supported, it will output color
00:41:52krux02so whenever you pipe it into something colors are disabled
00:42:33krux02so it's probably not the command that strips the color it is the program that you executes that is a bit scared to spit them out
00:42:51krux02you can check that program to force enable the colors if it has a command line switch for that
00:42:59*butchster quit (Ping timeout: 264 seconds)
00:46:12*butchster joined #nim
01:00:59*ludocode quit (Read error: Connection reset by peer)
01:01:19*ludocode joined #nim
01:11:23*kulelu88 quit (Quit: Leaving)
01:23:47*gangstacat quit (Ping timeout: 264 seconds)
01:36:25*adeohluwa joined #nim
01:50:50*gangstacat joined #nim
01:51:21*adeohluwa quit (Ping timeout: 260 seconds)
02:00:13*Serenitor quit (Quit: Leaving)
02:16:52*hjsagg quit (Ping timeout: 268 seconds)
02:24:59*chemist69 quit (Ping timeout: 264 seconds)
02:29:20*Nobabs27 quit (Quit: Leaving)
02:32:41*hjsagg joined #nim
02:38:21*chemist69 joined #nim
03:00:17*dddddd_ quit (Quit: Hasta otra..)
03:02:33krux02http://imgur.com/a/P0AAF
03:02:55krux02looks simple but it works
03:02:59*krux02 quit (Quit: Leaving)
03:38:20FromGitter<Varriount> krux02: Shapes. The final frontier.
03:38:23FromGitter<Varriount> :D
03:39:37*mwbrown joined #nim
03:40:32*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:41:11*xet7 joined #nim
03:46:31*bungoman joined #nim
04:31:23*zachcarter quit (Quit: zachcarter)
04:36:23*BitPuffin|osx quit (Ping timeout: 264 seconds)
04:36:49*vlad1777d quit (Quit: Leaving)
04:46:41*mwbrown quit (Ping timeout: 246 seconds)
04:46:57*libman joined #nim
05:31:33*smt quit (Ping timeout: 240 seconds)
05:37:47*smt joined #nim
05:39:05*yeeve quit (Ping timeout: 260 seconds)
05:49:15*yeeve joined #nim
05:50:00*nsf joined #nim
05:50:53*chatter29 joined #nim
05:51:53*chatter29 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
06:07:58*nsf quit (Ping timeout: 240 seconds)
07:00:57*libman quit (Quit: Connection closed for inactivity)
07:34:02*rauss quit (Quit: WeeChat 1.7)
07:38:28*byte512 joined #nim
08:03:38*BlaXpirit quit (Quit: Bye)
08:03:38*BlaXpirit_ is now known as BlaXpirit
08:05:43*couven92 joined #nim
08:16:06*Vladar joined #nim
08:25:17*gokr joined #nim
08:26:30*Serenitor joined #nim
08:28:01*bjz joined #nim
08:31:21Serenitorwould someone be able to tell me if this enum correlates to the --opt option of the nim compiler?
08:31:23Serenitorhttps://github.com/nim-lang/Nim/blob/master/lib/system.nim#L2404
08:31:36Serenitorbecause if it does, I am surprised to see options for throughput and responsiveness which is not mention in nim -h
08:32:11*chatter29 joined #nim
08:32:16chatter29hey guys
08:32:19chatter29allah is doing
08:32:27chatter29sun is not doing allah is doing
08:32:28chatter29to accept islam say that i bear witness that there is no deity worthy of worship except allah and muhammad peace be upon him is his slave and messenger
08:36:15*chatter29 quit (Client Quit)
08:38:00*Andris_zbx joined #nim
08:40:32AraqSerenitor: it doesn't correlate, why would it
08:41:06Araqone is part of the GC API, the other are compilation options
08:42:30FromGitter<vegansk> Any FreeBSD users here? Can you look at the issue #5489
08:43:36Serenitorin hindsight its obvious, thanks Araq
08:50:57Araqvegansk: maybe it's not in libc but in libiconv.so ?
08:51:24Araqyou need to change the order for FreeBSD
08:52:08Araqdynlib is happy with anything that loads and doesn't check the loaded .so contains the required procs
08:52:33*xet7 quit (Ping timeout: 240 seconds)
08:52:53FromGitter<vegansk> @Araq, ``nm -D /lib/libc.so.7`` and man pages (https://www.freebsd.org/cgi/man.cgi?query=iconv_open) says that it's in libc
08:53:06FromGitter<vegansk> I'll try
08:53:50*xet7 joined #nim
08:54:19FromGitter<vegansk> It doesn't help
08:57:34Araqchange teh dynlib: iconvDll to some .header
08:57:48AraqI think dynamically loading libc is weird
08:58:03Araqlibc is linked with your program, usually
09:01:04FromGitter<vegansk> @Araq, ok, trying this variant
09:01:29Araq"Fixed detectinf iconv when iconv_open() is a macro (fix for OpenBSD)."
09:01:45Araqyeah, iconv_open is some #define, hence the dyn import fails
09:07:39FromGitter<vegansk> @Araq, https://github.com/nim-lang/Nim/pull/5490
09:09:58cheatfatevegansk: have you tested whole BSDs? (openbsd/netbsd/dragonflybsd)
09:10:21FromGitter<vegansk> (https://files.gitter.im/nim-lang/Nim/7jro/blob)
09:10:23FromGitter<vegansk> If it's define, why nm shows it as dynamic symbol in libc.so.7?
09:13:03cheatfatevegansk if you pushing PR with title "FreeBSD" why you are changing this for all "bsds"?
09:16:13FromGitter<vegansk> @cheatfate, google search says that iconv functions are implemented in libc in openbsd, netbsd and dragonflybsd
09:17:46FromGitter<vegansk> But yes, if we need to support for example freebsd versions < 10, it's a bad solution
09:18:01FromGitter<vegansk> because it was in libiconv.so
09:20:43cheatfatehow it can be reproduced? with just "import encodings"?
09:22:32FromGitter<vegansk> ```import encodings ⏎ echo "test".convert("UTF-8", "UTF-8")``` [https://gitter.im/nim-lang/Nim?at=58bd2a56de504908224f76af]
09:24:57cheatfateok NetBSD could not bootstrap anymore...
09:25:01cheatfateso can't test it
09:27:04*yglukhov joined #nim
09:35:18FromGitter<vegansk> @cheatfate, I can't find any reference to dragonflybsd in stdlib. Only free/open/net. Do you have openbsd installed?
09:35:29cheatfateyep
09:35:50FromGitter<vegansk> Can you check this PR on it please?
09:42:52cheatfateneed to bootstrap it with latest dev, because with old nim your PR is not working...
09:44:46FromGitter<vegansk> @cheatfate, how it fails with old nim?
09:47:38cheatfatevegansk: lib/pure/encodings.nim(286, 43) Error: undeclared identifier: 'importIconv'
09:47:53cheatfatei have made changes not with diff
09:47:59cheatfatebut it looks like your PR is wrong
09:50:50FromGitter<vegansk> @cheatfate, but how it can't be undeclared here: https://github.com/vegansk/Nim/blob/48747d7fdcc5eaf02ad1827bed4b263869ef5968/lib/pure/encodings.nim#L280
09:51:52FromGitter<vegansk> Maybe you misspelled in line 281?
09:53:18FromGitter<vegansk> And why it works for me at least on freebsd and linux?
09:56:13cheatfateNow i got this /home/cheatfate/projects/nimcache/stdlib_encodings.c:11:19: error: iconv.h: No such file or directory
09:56:17cheatfateits openbsd
09:56:40cheatfatelooks like openbsd don't have iconv.h
09:57:43FromGitter<vegansk> @cheatfate, it's strange, I read about it here: http://www.polarhome.com/service/man/?qf=iconv_open&tf=2&of=OpenBSD&sf=3
09:58:08FromGitter<vegansk> Can you check this man page in openbsd please?
09:58:58cheatfateyep it present but no iconv.h file
09:59:39cheatfateok i have found it in /usr/local/include
09:59:52cheatfatebut looks like its because i have installed other compiler
10:01:00FromGitter<vegansk> Ok, thanks. I'm already installing openbsd, will investigate it later
10:02:11cheatfatevegansk could you please check /usr/include for iconv.h?
10:04:11FromGitter<vegansk> @cheatfate, ok, I'll write you after installation will be finished
10:04:37*jabb quit (Ping timeout: 260 seconds)
10:05:27cheatfatei think this can be patched for openbsd to include /usr/local/include as new include path... but if it depends on installation of newer `gcc` then its a trouble
10:08:20*yglukhov quit (Ping timeout: 246 seconds)
10:14:42*yglukhov joined #nim
10:17:58enthus1astdoes any dev has a opinion on this? https://github.com/nim-lang/Nim/issues/5487
10:18:13FromGitter<vegansk> @cheatfate, iconv.h is absent after installation
10:18:34cheatfatein both locations?
10:18:54FromGitter<vegansk> yes
10:19:03*yglukhov quit (Ping timeout: 240 seconds)
10:19:20*Arrrr joined #nim
10:19:20*Arrrr quit (Changing host)
10:19:20*Arrrr joined #nim
10:19:24cheatfatebut libc.so has such symbol?
10:22:57FromGitter<vegansk> @cheatfate, no. It's not there. Then you are right, it's only for freebsd. Btw, whats the problem with netbsd?
10:25:20cheatfatei can't bootstrap it
10:25:32cheatfategcc killed
10:26:17cheatfatei can't bootstrap nim
10:27:42FromGitter<vegansk> ok. updated the PR, not it's limited to freebsd only
10:28:20cheatfatenetbsd has /usr/include/iconv.h
10:29:40FromGitter<vegansk> And what about ``nm -D PATH_TO_LIBC | grep iconv_open``?
10:32:34*nsf joined #nim
10:34:52cheatfate00000000000710bc T _citrus_iconv_open
10:34:52cheatfate000000000005c5d0 T _iconv_open
10:34:52cheatfate000000000005c5d0 W iconv_open
10:34:55AraqI wish I knew why people use BSD
10:35:33*vlad1777d joined #nim
10:35:56cheatfateAraq, latest PS4 uses modified freebsd :)
10:36:12flyxI used it once for a server. it was not bad.
10:36:21Araqah yeah, I remember.
10:36:50FromGitter<vegansk> @cheatfate, then this fix should be used on freebsd and netbsd, agreed?
10:36:50cheatfatemacos based on bsd
10:36:56cheatfateyep
10:37:00flyxbut I think it's more a philosophical than a pragmatic decision between FreeBSD and Linux
10:37:01cheatfatevegansk: yep
10:37:04FromGitter<vegansk> Ok then
10:37:46Araqcheatfate: that's 'defined(macosx)' though, a "first class" Nim target.
10:38:50cheatfatebut i think they just smoking different hash this bsd makers
10:39:38Araqcheatfate: they take LSD.
10:39:52Araqever wondered where BSD got it's name from? now you know.
10:39:59cheatfateAraq, you know if they all using LSD then maybe they will be compatible with each other :)
10:41:09FromGitter<vegansk> @cheatfate, we just found out that it's not thrue for openbsd :-)
10:41:24FromGitter<vegansk> s/thrue/true
10:42:07cheatfatevegansk: i have found it long time ago, so there must be no flag `bsd`...
10:42:19Araq"we care so much about security we use C everywhere" -- OpenBSD's credo.
10:42:31cheatfateopenbsd 6.0 released in 2016 still uses gcc 4.2.1
10:42:55cheatfateand that's why openbsd is most problematic target
10:43:14Araqhmm, we can remove openbsd from the bsd define
10:43:50cheatfateAraq, or make Nim compatible with older GCC
10:44:11cheatfateAraq, and look at my latest issue with NetBSD
10:44:17Araqlink?
10:44:34cheatfatehttps://github.com/nim-lang/Nim/issues/5491
10:44:53cheatfateand NetBSD uses gcc 5.4.0
10:45:17Araqisn't this just another OOM?
10:45:28cheatfateoom?
10:45:31cheatfatemaybe
10:46:01Araqthat cannot detected reliably because the OS is on a constant LSD trip
10:46:19Araq"yeah, whatever, I'll give you more RAM that doesn't exist, you'll never notice"
10:46:58cheatfateok let me add some more memory to netbsd :)
10:49:15cheatfatetesting with 1GB RAM
10:52:12cheatfateok 1GB ram is enough to bootstrap Nim
10:55:51FromGitter<vegansk> For freebsd 512MB is enough
10:57:50cheatfateNim becomes to hungry...
10:57:57cheatfatevegans: freebsd uses jemalloc
11:01:08cheatfatevegansk sorry for nickname
11:03:08FromGitter<vegansk> @cheatfate the typo is only the typo :-)
11:33:41ArrrrIt would be a nice addition to have a "run and clean" switch for the compiler. I hate to remove the cache/exe after any experiment
11:40:02FromGitter<vegansk> @Arrrr, you can try to reanimate https://github.com/vegansk/nimrunner :-) I used it before nimscript was released.
11:43:44ArrrrLet's see
11:44:20*arnetheduck joined #nim
11:47:10ArrrrAh, so it just runs the code and then removes the leftover? That's a good idea. I'll try it.
11:51:23FromGitter<vegansk> @Arrrr, yep, and it uses tcc compiler by default because it's much faster than gcc/clang when compiling the sources
12:00:01*bjz_ joined #nim
12:02:06*bjz quit (Ping timeout: 240 seconds)
12:02:31*Snircle joined #nim
12:03:45*zachcarter joined #nim
12:04:14*couven92 quit (Quit: Client disconnecting)
12:07:25*yglukhov joined #nim
12:09:38euantorReading back a few days and seeing that error with the captcha, is anybody particularly attached to the current captcha for NimForum?
12:10:10Vladarthere's a captcha?
12:10:11euantorFor instance, if I opened a PR adding NoCaptcha instead, would there be any chance of it being approved?
12:10:24euantorVladar: During registration, yes
12:14:49dom96euantor: NoCaptcha?
12:15:30dom96Is that Google's new captcha?
12:15:35dom96if so then I'm happy with it
12:15:56euantorYeah, it's the current version of reCaptcha
12:16:31euantorI'll try get that done this week
12:35:39*BitPuffin|osx joined #nim
12:45:53*elrood joined #nim
13:00:28*Serenitor quit (Ping timeout: 240 seconds)
13:13:14*sz0 joined #nim
13:14:57*bjz joined #nim
13:15:35*bjz_ quit (Ping timeout: 246 seconds)
13:27:16*bjz quit (Read error: Connection reset by peer)
13:28:48*bjz joined #nim
13:46:00*shashlick quit (Ping timeout: 260 seconds)
13:46:43*shashlick joined #nim
13:47:13*cheatfate quit (Ping timeout: 260 seconds)
13:53:13*rokups joined #nim
14:13:45*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:29:17*krux02 joined #nim
14:58:51*couven92 joined #nim
15:05:41*kulelu88 joined #nim
15:19:59*rauss joined #nim
15:25:38*MyMind joined #nim
15:26:17*jabb joined #nim
15:26:23*lenstr quit (Changing host)
15:26:23*lenstr joined #nim
15:27:33*Sembei quit (Ping timeout: 260 seconds)
15:42:29*chemist69 quit (Ping timeout: 240 seconds)
15:48:44*chemist69 joined #nim
15:48:53*hjsagg quit (Ping timeout: 246 seconds)
15:49:01*cheatfate joined #nim
15:50:25*gokr quit (Ping timeout: 260 seconds)
15:50:36*Vladar quit (Remote host closed the connection)
15:54:21*sz0 quit (Quit: Connection closed for inactivity)
16:01:32*smt quit (Ping timeout: 240 seconds)
16:06:36*yglukhov quit (Ping timeout: 240 seconds)
16:16:48*gokr joined #nim
16:17:49*Trustable joined #nim
16:23:50*yglukhov joined #nim
16:24:32*Vladar joined #nim
16:25:29*couven92 quit (Read error: Connection reset by peer)
16:32:57*couven92 joined #nim
16:56:32*gokr quit (Ping timeout: 240 seconds)
17:15:46*Andris_zbx quit (Remote host closed the connection)
17:29:40*gokr joined #nim
17:34:57*Ven quit (Ping timeout: 260 seconds)
17:37:24*Ven joined #nim
17:47:41*smt joined #nim
17:56:25*kulelu88 quit (Ping timeout: 260 seconds)
17:57:20*freevryheid joined #nim
17:57:29*freevryheid is now known as fvs
18:07:14*BitPuffin|osx quit (Remote host closed the connection)
18:08:40*kulelu88 joined #nim
18:09:05*yglukhov quit (Ping timeout: 256 seconds)
18:09:30*zachcarter quit (Quit: zachcarter)
18:12:11*Matthias247 joined #nim
18:12:26*Serenitor joined #nim
18:19:00*kulelu88 quit (Ping timeout: 260 seconds)
18:22:55*fvs left #nim ("leaving")
18:23:12Calinouanyone else having issues installing nimsuggest on Linux? I want to use it in Visual Studio Code
18:23:36Calinoucan't install from nimble, or from AUR (tried both nimsuggest and nimsuggest-git), and VSCode's nimsuggest compilation failed
18:29:52*BitPuffin|osx joined #nim
18:29:53*chemist69 quit (Ping timeout: 246 seconds)
18:30:16*chemist69 joined #nim
18:31:20*kulelu88 joined #nim
18:35:45federico3Calinou: how do you install it?
18:36:29CalinouI installed the VSCode add-on but I can't install nimsuggest, since the AUR build fails
18:37:29*Ven quit (Ping timeout: 240 seconds)
18:37:32*kulelu88 quit (Ping timeout: 240 seconds)
18:37:32*gokr quit (Ping timeout: 240 seconds)
18:38:44*Ven joined #nim
18:40:05stisaCalinou If you have Nim from git you can try 'koch tools' I think.
18:40:17Calinoustisa: yeah, I'm installing Nim Git right now
18:41:51*brson joined #nim
18:49:47*kulelu88 joined #nim
19:05:13*vlad1777d quit (Quit: Leaving)
19:09:16Calinouok, installed Nim, Nimble, and nimsuggest :) was pretty straightforward
19:09:27Calinouis there linting available in VSCode with Nim?
19:09:39*deavmi__ joined #nim
19:11:10stisacalinou: Yes, it reports errors and warnings
19:13:50*deavmi___ joined #nim
19:15:36*deavmi__ quit (Ping timeout: 268 seconds)
19:15:55*Jesin quit (Quit: Leaving)
19:17:21Calinoudoesn't seem to work here, but maybe the entire nimsuggest is failing silently (although if I type "nimsuggest" in a terminal, it displays the help)
19:17:32Calinouand the file is saved to disk (it's not a new unsaved file)
19:18:01*brson quit (Ping timeout: 258 seconds)
19:18:04*jabb quit (Ping timeout: 268 seconds)
19:19:04*Jesin joined #nim
19:21:03*gokr joined #nim
19:21:30stisastrange, works fine here. Maybe try closing and reopening vscode?
19:21:43FromGitter<barcharcraz> looks like c++ modules are going to go into official TS really soon
19:21:58FromGitter<barcharcraz> it can be fickle
19:22:13*rokups quit (Quit: Connection closed for inactivity)
19:35:00FromGitter<Varriount> Official TS?
19:38:15*couven92 quit (Quit: Client disconnecting)
19:40:18*deavmi___ quit (Quit: deavmi___)
19:40:57*brson joined #nim
19:43:25*deavmi__ joined #nim
19:44:06subsetparkare there any vim/neovim <> nimsuggest bindings out there?
19:44:17*kulelu88 quit (Ping timeout: 256 seconds)
19:47:51*bjz joined #nim
19:49:49*brson quit (Quit: leaving)
19:58:05*kulelu88 joined #nim
20:00:20Calinoustisa: I tried
20:00:30Calinouunfortunately, that did not solve it
20:05:49*Ven quit (Ping timeout: 240 seconds)
20:06:34rausssubsetpark: Yes, but it doesn't integrate with deoplete or anything
20:06:36rausshang on
20:07:05rausssubsetpark: baabelfish/nvim-nim
20:07:25rausshttps://github.com/baabelfish/nvim-nim
20:08:27subsetparkinteresting, i think i had tried that once and failed to load - but it seems to have been updated since then
20:08:30bbl_it works decently with YCM
20:09:12*Ven joined #nim
20:09:25rausssubsetpark: It works for me but the experience is terrible. If I type `foo` and then trigger omnicompletion, it wipes out the `foo` and gives me an (unsorted) list of completions that have nothing to do with `foo`.
20:09:35subsetpark:/
20:09:36raussSo I really don't use it
20:09:39bbl_rauss: try out YCM with it
20:09:59raussbbl_: I don't use YCM. My environment revolves heavily around deoplete. Thanks for the tip though!
20:10:58*shashlick quit (Ping timeout: 240 seconds)
20:11:01raussHe says in the readme deoplete is one of the main planned features, so I'll either be patient or get impatient and make a PR
20:11:14bbl_rauss: yeah I will do that someday when I got the time :D
20:11:15subsetparkrauss: I think you're talking to him :)
20:11:42rausssubsetpark: Hahah I think you're right :P
20:12:48*shashlick joined #nim
20:13:18bbl_Interacting with nimsuggest from vimscript is not a pleasant experience
20:14:44bbl_Two async apis for both vim8 and neovim don't make it more pleasant :P
20:15:06raussYeah I can only imagine
20:19:17Calinouhow fast do you find Nim compile times by the way? do you think it's fast compared to Go or Rust compilation?
20:19:23Calinou(probably very hard to compare, but still curious)
20:19:50*jonathon joined #nim
20:20:11*couven92 joined #nim
20:20:19bbl_The little I have tried Rust feels really slow
20:20:26Calinouyeah, I've heard that
20:20:34jonathonhi! are there a compiler options to 1) prevent creation of 'nimcache' and 2) run but not output the compiled file?
20:21:02Calinoujonathon: yes, you can use nimrun: https://github.com/flaviut/nimrun
20:21:06bbl_nim check
20:21:07Calinouit does not generate any files in the source tree
20:21:15Calinouso you can use it more like a scripting language
20:21:45jonathonah that's the one
20:21:47jonathonvery nice :)
20:23:40jonathonah, `nim check --verbosity:0` still outputs a "Hint:: hello [Processing]". does it have a quiet switch?
20:24:30jonathon"--hints:off" i guess :D
20:24:38*vendethiel joined #nim
20:24:40jonathonyup
20:25:06*deavmi__ quit (Ping timeout: 258 seconds)
20:25:19jonathoni don't know why i didn't look at nim properly last time round.. i hate my way of cycling through languages
20:25:44raussjonathon: You can put those flags in your `/etc/nim.cfg` (or equivalent), or in a local `nim.cfg` file in a project, to not have to specify them with each run
20:25:53ArrrrNim improves greatly every year.
20:25:56raussjonathon: I did the same thing.
20:26:04raussjonathon: Gave it another chance and love it!
20:26:53bbl_jonathon: there is also https://nim-lang.org/docs/nims.html
20:27:29CalinouI wonder if it would eventually be possible for Nim to support interoperability with C++, too
20:27:34Calinouso that one could use Qt directly for example
20:27:34raussjonathon: nims is built-in to the nim cli ^^^
20:27:46Calinousince Nim can be compiled to C++
20:29:47*vlad1777d joined #nim
20:33:24stisaCalinou do you mean something like https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma?
20:34:32Calinouhmm, maybe
20:34:41*chemist69 quit (Ping timeout: 258 seconds)
20:35:56jonathonoh. `nim check -r helloworld.nim` didn't quite work... it was running one i'd already compiled. instead it complains it can't find the executable.
20:38:19jonathonnimrun sounds like the way forward
20:39:17stisaJonathon Check is for checking syntax etc, it doesn't generate an executable, so -r complains
20:39:54jonathonyeah, i think i got the messages mixed round...
20:44:35*nsf quit (Quit: WeeChat 1.7)
20:48:06bbl_jonathon: nim e myscript.nims
20:50:27jonathonbbl_, that's likely enough for most things but according to https://nim-lang.org/docs/nims.html "there are not many stdlib modules that you can use with Nim's VM"
20:53:57jonathonanyhoo i'll play with nim more tomorrow :)
20:54:01stisaWhat about setting --nimcache and --out to a temporary directory ( which I think is what nimrun does)?
20:54:33jonathonstisa: yeah, a wrapper script would do the job (which nimrun takes care of)
20:54:47jonathonthinking about it, i bet you could write a wrapper script in nims :D
20:56:22jonathongoing to bounce - thanks all! :)
20:56:25*jonathon left #nim ("Gone")
20:58:53*Sentreen quit (Ping timeout: 260 seconds)
21:01:29*chemist69 joined #nim
21:07:35*Ven quit (Ping timeout: 260 seconds)
21:08:52*Arrrr quit (Quit: Leaving.)
21:12:56*Sentreen joined #nim
21:15:01*brson joined #nim
21:17:03*Ven joined #nim
21:19:40*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:21:45*Ven quit (Ping timeout: 260 seconds)
21:22:36*couven92 quit (Read error: Connection reset by peer)
21:25:34*Ven joined #nim
21:30:05krux02what is the equivalent of offsetOf from C?
21:30:43krux02https://en.wikipedia.org/wiki/Offsetof
21:31:20*jabb joined #nim
21:36:05*Trustable quit (Remote host closed the connection)
21:46:56*Nobabs27 joined #nim
21:51:37*Ven quit (Ping timeout: 260 seconds)
21:55:16*Ven joined #nim
21:57:00krux02Araq: is there an equivalent of offsetOf in Nim?
22:02:25*brson quit (Ping timeout: 260 seconds)
22:02:27*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:12:04*Salewski joined #nim
22:13:17*zachcarter joined #nim
22:13:33Salewskikrux02, I have seen somewhere this, it may be from Dom's Aporia:
22:13:37Salewskitemplate offsetof*(typ, field): expr = (var dummy: typ; cast[system.int](addr(dummy.field)) - cast[system.int](addr(dummy)))
22:14:28*xet7 quit (Quit: Leaving)
22:14:47krux02Salewski, thank you, but I am creating a Nim issue now, because I think it's important to have it in the standard library
22:15:56SalewskiYes maybe, but it is really low level. I needed it for gobject macro only.
22:16:47SalewskiBye.
22:16:54*Salewski left #nim (#nim)
22:19:44Araqkrux02 yeah we need this in the stdlib, agreed
22:20:30*Vladar quit (Remote host closed the connection)
22:20:38krux02Araq, I am currently writing the issue
22:20:51Araqdon't write issues, write solutions
22:21:07*brson joined #nim
22:21:47zachcarterI’m using what is essentially dom96’s offsetof in my nuklear bindings and it seems to be working fine
22:21:56zachcarterI guess it would go in system?
22:23:51Araqyeah. though maybe we can come up with an implementation that's friendlier for the C compiler
22:26:09*rauss quit (Quit: WeeChat 1.7)
22:27:18zachcarterI guess the way it works is offsetof calls __builtin_offsetof in C which can vary depending on the compiler
22:27:24zachcarter?
22:27:38*Matthias247 quit (Read error: Connection reset by peer)
22:27:42zachcarterby which can vary, I mean the implementation of __builtin_offsetof
22:28:44Araqthe C standard mandates something like the Nim version *needs* to work
22:28:54Araqoffsetof is not like sizeof in this regard
22:29:10Araqbut maybe I misremember the standard. or it changed.
22:29:32zachcarterhm okay
22:29:42*nsf joined #nim
22:33:28krux02well I should meniton that offsetof should only work in the C language family backends
22:33:48krux02there is no point to try to support it on javascript or nimvm
22:34:11krux02well nimvm for static evaluation could be fine though
22:34:59krux02therefore an emit statement could be enough
22:35:22krux02#define offsetof(st, m) ((size_t)&(((st *)0)->m))
22:36:37krux02I tried to do the same in nim, but accessing a member from a nil is not something nim wants
22:40:44krux02well offsetof(st, m) is defined as __builtin_offsetof(st, m) on compilers that support it. So what do you think of just emitting offsetof itself?
22:51:59*vendethiel quit (Ping timeout: 264 seconds)
22:52:17*brson quit (Ping timeout: 260 seconds)
22:55:13*Kingsquee joined #nim
23:00:15*brson joined #nim
23:05:39Araqyeah, that's what we should do
23:05:46*ftsf joined #nim
23:10:29*arnetheduck quit (Ping timeout: 260 seconds)
23:17:50*PMunch joined #nim
23:25:49*kulelu88 quit (Ping timeout: 240 seconds)
23:31:58krux02Araq: I just tried to do it with emit, but I can't pass the member parameter
23:32:57Araqyeah sure
23:34:55*nsf quit (Quit: WeeChat 1.7)
23:46:11krux02you seem not so convinced.
23:47:07krux02The only thing that I can come up with that works in the version that Salewski posted, and as mentioned I think it comes originally from dom96
23:50:02*gokr quit (Ping timeout: 240 seconds)
23:57:39*elrood quit (Quit: Leaving)
23:58:41*libman joined #nim