<< 16-01-2019 >>

00:00:18enowzestyr: ah really I was thinking ffmpeg first of all
00:00:25*brainproxy joined #nim
00:00:39enowzestyr: then I figured I might as well mash a lot of jpegs ontop of each other
00:00:56zestyryou'd still need to encode that into a stream though?
00:01:01enowwhich would be mjpeg, in a nutshell.
00:01:04zestyryep
00:01:05enowzestyr: not for mjpeg
00:01:35enowzestyr: but I'd love to see it happen with ffmpeg in some time
00:01:55enowthing is if you can control I and P frames you can achieve a lot of things
00:02:01zestyrhttps://github.com/phoboslab/jsmpeg-vnc/blob/master/source/encoder.c
00:02:06*shpx quit (Quit: shpx)
00:02:59shashlickenow - will need to open a bug against tree-sitter since it doesn't understand this inline #define
00:03:17enowhm MPEG1 I wouldn't bother with ffmpeg for that
00:03:52zestyrit becomes a little more complicated when you want audio as well
00:03:54enowso you've fixed some errors from the interop side of things?
00:06:52enowzestyr: it does
00:07:23enownot to start a flamewar, but isn't this sorta kinda what pulseaudio is designed for
00:08:20*shpx joined #nim
00:10:04zestyrwell it can be used as a remote audio server, but that's definitely not its most popular usage. and you know, good luck syncing a list of jpegs with an audio stream you don't have much control over
00:15:47enowzestyr: fine fine if you want to use it to bypass corporate youtube polices
00:18:13*skellock joined #nim
00:28:48*absolutejam quit (Ping timeout: 245 seconds)
00:29:00*krux02_ joined #nim
00:31:26*skellock quit (Ping timeout: 250 seconds)
00:31:55*krux02 quit (Ping timeout: 250 seconds)
00:34:56*leorize joined #nim
00:35:19*krux02_ quit (Remote host closed the connection)
00:37:34*shpx quit (Quit: shpx)
00:41:31*shpx joined #nim
00:42:45*shpx quit (Client Quit)
00:43:30*ryukoposting joined #nim
00:45:44ryukoposting...anyone here
00:46:13FromDiscord_<moerm> see you
00:46:29ryukopostingwoahdude.jpg
00:46:56ryukopostinghey so I noticed something weird when I moved from 0.18 to 0.19, and i was wondering if someone could help
00:47:06ryukopostingI'm still pretty new to nim though, so I might just be dumb
00:47:08zestyrwhat's the problem?
00:49:56ryukopostingso, I had a macro that took a typedesc as a parameter. The macro had a few if statements looking at the typedesc, i.e. `if T is string`. When I moved from 0.18 to 0.19, `if T is string` no longer worked as it did before. `if getType(T) is string` also doesn't work either. Then, I tried doing `if getType(T).repr == "typeDesc[string]"`, and that worked
00:51:14ryukopostingthis is for a library that I'm gonna put up on nimble once it's stable btw
00:51:14*vlad1777d joined #nim
00:55:20enowshashlick: that's fantastic
00:55:25enowshashlick: that's fantastic
00:55:52enowsorry! wrong terminal in focus
00:56:28ryukopostingzestyr any ideas? I'm fairly new to nim, so idk if I'm just dumb or if it's a regression
00:59:48*enow quit (Quit: leaving)
00:59:56*shpx joined #nim
01:03:57*dom96_w joined #nim
01:04:36shashlickWorth checking the changelog
01:04:40shashlickhttps://nim-lang.org/blog/2018/09/26/version-0190-released.html
01:05:47shashlickryukoposting: this seems related
01:05:50shashlickhttps://github.com/nim-lang/Nim/issues/8126
01:11:17ryukopostingthanks shashlick
01:30:15*dom96_w quit (Quit: Textual IRC Client: www.textualapp.com)
01:38:23*vlad1777d quit (Ping timeout: 245 seconds)
01:52:39*skellock joined #nim
01:56:51*rockcavera quit (Remote host closed the connection)
02:01:41*xet7 quit (Remote host closed the connection)
02:10:14*shpx quit (Quit: shpx)
02:12:26*zachk quit (Quit: Leaving)
02:18:17*xace quit (Read error: Connection reset by peer)
02:19:17*xace joined #nim
02:19:18shashlickenow: okay - JBLOCK is also working now - only thing not working is the struct with #defines in the middle and I need tree-sitter to fix that
02:19:45shashlickfor the near term, you can simply copy that one struct out, remove the defines and run it through nimterop
02:20:11shashlickthen you can hard code that and run the rest of the file in an automated fashion
02:21:02shashlickanother option is to edit the file before running it through nimterop, and then restore it back
02:49:34*dddddd quit (Remote host closed the connection)
03:00:35*banc quit (Quit: Bye)
03:15:51*banc joined #nim
03:46:45*lritter quit (Ping timeout: 268 seconds)
03:47:15*lritter joined #nim
04:01:10*ofelas quit (Ping timeout: 250 seconds)
04:09:13*nsf joined #nim
04:12:38*tefter quit (Read error: Connection reset by peer)
04:14:06*brainproxy quit (Quit: WeeChat 2.3)
04:51:00*skellock quit (Ping timeout: 250 seconds)
04:56:26*darithorn quit (Quit: Leaving)
05:00:36zestyrhttp://ix.io/1yre/nim
05:00:38zestyrtest.nim(12, 23) Error: cannot prove: i mod len(list) <= len(list) + -1 (bounds check)
05:00:46zestyrdoing it without parallel works
05:04:54leorizeparallel is kinda buggy atm
05:05:21leorizeyou can do some `if` juggling to make it work I believe
05:06:40zestyrhmm, if I instead do `if i mod len(list) <= len(list) + -1: spawn echo i`, I get this error
05:06:42zestyrError: internal error: (filename: "ccgexprs.nim", line: 1012, column: 17)
05:07:44zestyreven `if 1 < 1: spawn echo i` triggers it
05:07:50leorizeyou should file a bug for that
05:09:46zestyrseems to be because I'm using echo, not the if statement
05:10:09*kapil____ joined #nim
05:12:52leorizeoh yea, spawn echo got an issue filed by me :P
05:13:19zestyrdamn, and #3528 exists for the bounds check error
05:14:07leorizeparallel is in experimental because it doesn't work well
05:16:37*leorize quit (Remote host closed the connection)
05:22:31*skellock joined #nim
05:35:36*narimiran joined #nim
05:37:08*skellock quit (Ping timeout: 268 seconds)
05:51:09TangerIs there any short hand to represent binary operations on multiple values? i.e, in C you can ~(ECHO | ICANON | ISIG), while in nim I have "and not ECHO or not ICANON or not ISIG"
05:52:00narimiranerm, those are not equivalent, are they?
05:53:46narimiranbut you can define those operators yourself if you want
06:13:57*leorize joined #nim
06:16:28*absolutejam joined #nim
06:20:45narimiranTanger: this is something i came up with in 2 minutes, but notice that it is 7AM here and i'm sleepy, so might not be the best :) http://ix.io/1yrj
06:22:30narimiranjust as i posted, i noticed i'm overcomplicating and plain and simple "proc `|`(a, b: bool): bool = a or b" will do the trick :)
06:23:21leorizeTanger: not(a or b or c)?
06:23:41Araqusually you use set[enum] instead, Tanger
06:53:02*krux02 joined #nim
06:53:31*absolutejam quit (Quit: WeeChat 1.9.1)
07:13:54*BigEpsilon joined #nim
07:18:58leorizeAraq: can nimsuggest look for a free port automatically?
07:26:26Araqit should... can you fix it?
07:35:02leorizesure, what should be the command param for this? --autobind?
07:35:21Araqyeah
07:43:53*dvn quit (Remote host closed the connection)
07:46:24*dvn joined #nim
07:47:44*xet7 joined #nim
07:55:41*dvn quit (Quit: bye)
07:57:33*BigEpsilon quit (Quit: WeeChat 2.4-dev)
07:58:18*BigEpsilon joined #nim
07:59:46ZevvAraq: set[enum] will not work with all thes flags coming from C
07:59:58ZevvI must say I do miss the C idioms as well for bit fiddling
08:00:00*gmpreussner quit (Quit: kthxbye)
08:03:04Araq"C idioms"? I would use setBit, testBit, unsetBit instead.
08:03:26*dvn joined #nim
08:03:55Araqbut it's Nim, overload | if you think it's so "nice". (It's not at all, it's messy, but you're used to it.)
08:04:15ZevvNah I do C things in C and Nim things in Nim
08:04:19Zevvcan't have it all
08:04:40*gmpreussner joined #nim
08:04:43Araqwe should have setBit, testBit, unsetBit and flipBit
08:05:39Araqx |= (1 << bit) is actually a complex construct
08:06:23ZevvTrue, but in embedded its the idiomatic way, and C compilers know just how to handle this
08:07:01Araqthe idiomatic way is a pure anachronism.
08:07:10Zevvtrue, reg &= ~((1<<BIT1) | (1<<BIT2)) is very nasty
08:07:47Araqreg.unsetBits(Bit1, Bit2) it's Nim, we can have things that make sense
08:08:12ZevvTrue - that's not yet in bitops, right?
08:08:47*absolutejam joined #nim
08:08:52absolutejammorning all
08:10:09TangerThanks for the response Araq, leorize and narimiran! My brain was not functioning logically, haha
08:13:27AraqZevv: probably not
08:13:55absolutejamso, I can't store different types in the same seq right?
08:14:27absolutejamI tried wrapping it in a type that uses a case statement to declare the field type (seq[foo] or seq[bar]) but that complained that I was redefining the field type
08:14:47absolutejamAre there any there any other options? Just using different field types per distinct sequence type?
08:17:46Araqusually yes, but if you have troubles use JSON until you're more familiar with how static type systems
08:17:53Araqwork
08:29:07*kapil____ quit (Quit: Connection closed for inactivity)
08:34:47*PMunch joined #nim
08:54:00*floppydh joined #nim
09:22:13*ng0 joined #nim
09:25:50oculuxcan i ask whether any one is or knows of any group or person working on an Apache Cassandra - Nim driver ?
09:26:51oculuxThe only thing holding me back from not completely going towards Golang because of this is the database driver.
09:34:43*skellock joined #nim
09:40:01*skellock quit (Ping timeout: 246 seconds)
09:43:52Araqoculux, I don't know of such a driver but maybe it's not hard to write one. I wrote a Arango client in one day fwiw (still need to release the code...)
09:52:58*vlad1777d joined #nim
09:53:43PMunchoculux, there is this: github.com/yglukhov/cassandra
09:56:13leorizeAraq: here's the new nimsuggest option :) https://github.com/nim-lang/Nim/pull/10328
09:56:22*Vladar joined #nim
10:41:00zestyrI just released an ImageMagick wrapper, it's still missing a lot of helper functions and hasn't been test much, but it works! Feedback is welcome :)
10:41:02zestyrhttps://github.com/zestyr/nimagemagick
10:41:13PMunchOh cool
10:46:36livcdzestyr: is that whole magickwand.nim machine translated ?
10:47:00zestyryea, using nimterop
10:47:35zestyrwith a few manual edits to make it compile, mainly due to a tree-sitter issue
10:53:19PMunchHmm, maybe I should have another go at wrapping imlib2 if nimterop has become that good
10:54:34*lritter quit (Ping timeout: 272 seconds)
11:00:42*fanta7531 joined #nim
11:21:45*enow joined #nim
11:21:58enowAllright I've made some progress on jpeg bindings!!
11:22:19enowDoing it the manual way just to get the subset I personally need
11:22:41enowI agree with anyone arguing for an interop approach though
11:23:40enowBasically I painstakingly copied things from a jpeglib.h header to my own header, until I could get nimgen to run decently on it
11:24:18narimiranhelp wanted: https://github.com/nim-lang/Nim/issues/10330
11:26:15*Vladar quit (Remote host closed the connection)
11:28:50zestyrwhy have the links to the manual and stdlib pages been removed in the top left? those are pretty useful
11:30:13narimiranzestyr: where?
11:30:32zestyrin the screenshots, they're still present here though, guess it doesn't matter: https://nim-lang.github.io/Nim/sequtils.html
11:31:18narimiranzestyr: on the right is my local copy, online version should have them
11:33:35zestyryep. great work btw! better documentation is greatly appreciated :)
11:34:03narimiranthanks :)
11:34:09narimiranfeel free to join ;)
11:35:41*dddddd joined #nim
11:35:42*skellock joined #nim
11:37:49*rockcavera joined #nim
11:39:40*thomasross quit (Remote host closed the connection)
11:39:57*skellock quit (Ping timeout: 246 seconds)
11:40:57zestyrat the top of strutils, it says "$ for converting other data-types to strings", but I can't see any `$` procs defined in strutils?
11:41:36narimiranit also says, above it: "The *system module* defines several common functions for working with strings"
11:41:59zestyroh sorry, didn't read properly..
11:47:56*thomasross joined #nim
11:50:04*thomasross_ joined #nim
11:50:04*thomasross quit (Killed (leguin.freenode.net (Nickname regained by services)))
11:50:04*thomasross_ is now known as thomasross
12:03:08*Tongir joined #nim
12:19:55narimiranhmmm, anybody else has a problem bootstrapping?
12:20:58*nsf quit (Quit: WeeChat 2.3)
12:45:21PMunchHmm, this happens whenever I try to retrieve a "def" from a symbol within a "quote do:" block.
12:45:37PMunchi.e. run :LspDefinition in vim
12:48:03absolutejamthat issue is great narimiran
12:48:54narimiranabsolutejam: haha, an issue can be great? :D
12:49:09absolutejamI mean the work you've done
12:49:14absolutejamand I also agree on the sentiment
12:50:47narimiranthanks :)
12:51:58*ng0 quit (Quit: Alexa, when is the end of world?)
12:54:36PMunchYou should make the list link to the current documentation for each module
12:54:46PMunchWould make it easier to go through and pick one you want to work on :)
12:55:05narimiranso link to .nim file?
12:56:13PMunchI was thinking the hosted docs
12:56:33PMunchLike linking to this: nim-lang.org/docs/streams.html
12:58:58absolutejamI'm testing regex online and it works, but it doesn't work when I run it in nim - Is it PHP/PCRE I need to be testing against?
12:59:07absolutejamusing the nre module
12:59:40PMunch"A regular expression library for Nim using PCRE to do the hard work."
12:59:46PMunchFirst line in the nre documentation :P
12:59:54PMunchSo yes it's PCRE you need to test against
13:00:00absolutejamDerp, thankes
13:00:21PMunchNo problem :)
13:02:22*zachcarter quit (Ping timeout: 268 seconds)
13:04:39absolutejamshould it be able to return multiple groups from a match?
13:11:39*skellock joined #nim
13:15:23*skellock quit (Client Quit)
13:20:11enowhaha I made it
13:20:16enowlibjpeg bindings for nim
13:21:06enownot by the book in any shape or form, but then again I've only been using the language for a couple of days
13:21:58*kobi7 joined #nim
13:22:00kobi7hi!
13:22:04enowhi
13:22:43kobi7how do I check if a Uri is valid ?
13:27:14enowkobi7: hm well either you try to curl it or I guess you could find some regular expression for it
13:27:45enowto fetch it with curl and see what happens gives some overhead so I guess that's not what you have in mind
13:38:04enowkobi7: rather than stringing together your own regular expression, I suggest looking for a ready made one. There are all sorts of edge cases you'd miss if your doing it on your own
13:38:36enowkobi7: if regular expressions isn't your cup of tea, and I don't blame you, you might want to check out something like https://github.com/achesak/nim-uri2
13:39:25*kobi7 quit (Quit: Leaving)
13:40:32narimiranenow, kobi7: there is also strscans (https://nim-lang.github.io/Nim/strscans.html) for some simple (often enough) stuff
13:48:56absolutejaminim
13:48:58absolutejamoops
13:58:34*dddddd quit (Ping timeout: 258 seconds)
14:01:01shashlickNice work zestyr and enow
14:01:52shashlickenow, like I pointed earlier, nimterop now does everything in libjpeg except one symbol so you can avoid the manual steps
14:01:58*nsf joined #nim
14:02:16enowshashlick: I know :D but I really wanted it doday
14:02:18enowtoday*
14:02:31enowalso I learned a great deal
14:02:52shashlickPMunch - please let me know how nimterop does with imlib2
14:03:06shashlickenow - np
14:03:38PMunchI will when/if I try it :)
14:04:05*dddddd joined #nim
14:05:41enowI have a feeling that'll be messing around with nim bindings quite a lot
14:06:12enowhad a chat with the arcan guy about some VR stuff so next week I'm aiming at some integation towards that project
14:06:46shashlickNeat enow - let me know your feedback on your exclusive experience
14:06:55shashlickI hope to make it a seamless process
14:07:08shashlickSo the more info I have the better
14:07:13enowso you'll have to suffer my stupid questions for a bit longer
14:07:18shashlickNp
14:07:34enowyeah I'm keeping some notes and probably will string together a blogpost by the end of the week
14:07:53shashlickJoin the nimgen gitter for wrapper related discussions
14:08:11shashlickAnyone know how to wrap va_list in Nim?
14:08:39enowI'll check it ou t
14:23:23*Cthalupa quit (Ping timeout: 245 seconds)
14:24:04*Cthalupa joined #nim
14:31:10*Cthalupa quit (Ping timeout: 268 seconds)
14:31:36*Cthalupa joined #nim
14:38:10*Cthalupa quit (Ping timeout: 250 seconds)
14:39:04*Cthalupa joined #nim
14:39:49*Vladar joined #nim
14:45:41shashlickdo we have any OSX brew package experts here? will be cool to add choosenim
15:08:18absolutejamoh fudge, the macro I was going to use from the forums to allow [] to access type fields doesn't work
15:08:40absolutejamand the AST is scary
15:10:14leorizethe ast is really easy to understand
15:10:49leorizethere's also the macros tutorial now, so you can try to play w it :)
15:13:01absolutejamlooking now
15:13:52*d__ joined #nim
15:14:16*d__ is now known as Guest98313
15:16:03*Guest98313 quit (Client Quit)
15:19:43narimiranshashlick: i like your SO idea!
15:21:20shashlicki'm adding SO rss feed to my list
15:29:54*tefter joined #nim
15:31:39*PMunch quit (Remote host closed the connection)
15:31:58*PMunch joined #nim
15:33:17*Cthalupa quit (Ping timeout: 244 seconds)
15:33:28*shashlick quit (Remote host closed the connection)
15:33:49*shashlick joined #nim
15:34:13*fanta7531 quit (Quit: ...)
15:35:40*Cthalupa joined #nim
15:36:32*thomasross quit (Ping timeout: 268 seconds)
15:41:23*floppydh quit (Quit: WeeChat 2.3)
15:42:43*tefter quit (Read error: Connection reset by peer)
15:43:09*tefter joined #nim
15:43:23*tefter quit (Remote host closed the connection)
15:46:45shashlickCan someone help answer this - https://stackoverflow.com/questions/54040850/is-nim-similar-to-java-in-its-memory-inefficiency
15:46:59*kapil____ joined #nim
15:49:11Araqwhy would it be "similar"? Nim has a value based object system like C++ and thread local heaps for ultra low GC pauses
15:50:26*PMunch quit (Remote host closed the connection)
15:52:23ZevvAraq: I'd like to make a PR for basic bit operations, like this: http://paste.debian.net/1060851/, but I'm not sure where to put them. Do you have an opinion or should I ask dom96?
15:52:49*Trustable joined #nim
15:57:20absolutejamhow badly will I get hurt for necroing on the forums?
15:57:32absolutejamit's the exact thread I want to reply to, just really old
15:57:39zestyrZevv: bitops.nim?
15:57:50narimiranabsolutejam: it won't hurt
15:59:07AraqZevv, bitops.nim
16:01:29Zevvok
16:02:01absolutejamAraq: I can't post because I can't activate my email and the link has expired
16:02:09absolutejamI don't see anywhere to resend the activation
16:03:22leorizedom96: ^
16:03:24narimiranabsolutejam: dom96 is the one who usually deals with that
16:03:41AraqZevv, also make these all .inline procs
16:04:04Araqand add flipBit(s)
16:04:53Zevvok
16:05:05ZevvShould bitNum[T] be exported?
16:05:24absolutejamooh sorry
16:05:25Araqdunno, it's a bit weird.
16:06:07Araqit makes sense though. maybe name it BitIndex[T] ?
16:06:21ZevvBitCount[T] ?
16:06:36ZevvIf its not exported, its not in the docs, so the user can not see what's expected there.
16:06:41ZevvBut the thing is a bit cryptic
16:07:08Araqit's not a Count. BitPosition[T] ?
16:07:15AraqBitsRange[T]?
16:07:28Araqsomething like that. bbl#
16:07:40ZevvIt was bitRange earier, I'll change it back
16:10:12narimiran"the thing is a bit cryptic" --> i see what you did there ;)
16:10:53Zevvpun was not intended, but it's quite good actually :)
16:22:05*ng0 joined #nim
16:25:02ZevvCan anyone explain to my why this is not valid: http://paste.debian.net/1060859/
16:25:11ZevvI'm not allowed to make a varargs[] of a range?
16:26:14zestyrwhy is the procvar pragma not documented? it's mentioned twice in the manual
16:27:20leorizeZevv: It looks like int was matched instead of Myrange
16:27:36leorizetry converting the first literal to Myrange
16:27:48leorizezestyr: because it's not really used I suppose?
16:28:16Zevvleorize: yeah, that works. But that kind of defies the purpose of using ranges for the API, this is not really usable this way
16:28:36ZevvI'll have to wrap it in a template probably
16:29:09Zevvhm, but how
16:31:40zestyrleorize: searching procvar in the stdlib yields 58 results (unicode.nim and strutils.nim for example), and I've seen at least a couple nimble packages using it
16:33:52*absolutejam quit (Ping timeout: 250 seconds)
16:35:13leorizezestyr: https://github.com/nim-lang/Nim/commit/08f5087d2c4f96ca6b82c1feed2f25c4e1f9f9b6
16:35:13Zevvleorize: is it actually supposed to match on ints instead of the type in the varargs?
16:35:54Zevvah it is implicitly transformed to an array, so the matching goes haywire
16:36:23leorizetry varargs[myrange, myrange]?
16:36:36zestyrleorize: oh, thanks
16:37:41Zevvmultiple types in a varargs?
16:38:13leorizeyou can perform type conversions within the varargs
16:38:33Zevvaah
16:38:47Zevvsmart!
16:40:25*NimBot joined #nim
16:41:38Zevvyeah, *almost*. But now it breaks down because my range is actually a generic type: http://paste.debian.net/1060865/
16:41:56Zevvidentifier expected, but found 'BitsRange[T]'
16:52:02Zevvyeah, it seems that semVarargs() only expects idents or quoted idents as 2nd argument. Pushing generics to the limit :)
16:53:43ZevvnkBracketExpr is not allowed there
17:13:35*BigEpsilon quit (Quit: WeeChat 2.3)
17:16:37*Tyresc joined #nim
17:17:41*PMunch joined #nim
17:21:07*narimiran quit (Remote host closed the connection)
17:24:57*Trustable quit (Remote host closed the connection)
17:30:04*skellock joined #nim
17:32:46*Snircle quit (Read error: Connection reset by peer)
17:33:19*Snircle joined #nim
18:04:32*skellock quit (Quit: WeeChat 2.3)
18:08:55*FromGitter joined #nim
18:29:33*wildlander joined #nim
18:37:52*wildlander is now known as wildlander_
18:38:14*wildlander_ is now known as wildlander
18:49:45*PMunch quit (Remote host closed the connection)
19:07:58*qwertfisch is now known as qwertesser
19:14:36FromGitter<zacharycarter> just be like me and be in #nim on irc, gitter and discord
19:14:46FromGitter<zacharycarter> should probably add riot / matrix in too
19:15:17*zacharycarter joined #nim
19:20:02*zachk joined #nim
19:20:31*zachk quit (Changing host)
19:20:31*zachk joined #nim
19:21:30shashlickcan you write to a file at CT
19:23:10FromGitter<zacharycarter> oh wow - bridge is working again apparently
19:23:11FromGitter<zacharycarter> nice!
19:23:36Zevvshashlick: yes, you can
19:23:39ZevvwriteFile()
19:25:13shashlickno wonder its been so quiet
19:27:56*nsf quit (Quit: WeeChat 2.3)
19:35:56*kapil____ quit (Quit: Connection closed for inactivity)
19:42:07shashlickthanks by the way Zevv
19:45:45ZevvWhat is the cause of "Error: cannot evaluate 'sizeof' because its type is not defined completely"?
19:47:26*dom96_w joined #nim
19:50:32*skellock joined #nim
19:53:58FromGitter<mratsim> importc
20:03:08*absolutejam joined #nim
20:05:04shashlickhow do I import a module only at compile time and not at runtime
20:07:07FromDiscord_<demotomohiro> is it possible to use importc to import types in c
20:07:18FromDiscord_<demotomohiro> or cpp?
20:11:00FromDiscord_<demotomohiro> "import" is not something executed at runtime. But it seems nim call module initialize code even if you use procs in the module only at compile time.
20:11:44Araqnot on devel anymore. it's been optimized.
20:32:22*Perkol joined #nim
20:39:02shashlickdemotomohiro: that's what I'm working on with nimterop
20:46:40*Perkol quit (Remote host closed the connection)
20:46:41shashlickAraq: so is it possible to check for compile time - when definedX: import xyz, where definedX is compile time or not?
20:51:24*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:56:37zacharycartershashlick: it used to be possible, unless something changed
20:58:22shashlickI was trying to use https://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-compile-time-define-pragmas
20:59:02shashlickbut an intdefine is not propagated to other files
21:00:15shashlickreally wish we had that {.define.} pragma
21:03:55FromGitter<kaushalmodi> Araq: one test is failing on Nim nightlies for 32-bit Windows: https://travis-ci.org/nim-lang/nightlies/jobs/479722733#L809
21:05:00FromDiscord_<Protty> when you do `--os:standalone` is the whole system's module excluded or only sections of it?
21:08:59Araqintdefine is used by the stdlib and it works
21:09:44FromDiscord_<Protty> so it only includes numbers & define?
21:09:45Araqkaushalmodi: ok, GULPF will take a look
21:10:07FromGitter<kaushalmodi> ok, I'll open an issue
21:10:17Araqshashlick: const foobar {.intdefine.} = defaultvalue works as documented
21:10:35shashlickAraq: well i'm trying to use it in a different way - declaring it in the mainmodule and hoping it shows up in imported modules in a when defined()
21:10:47shashlicknot specifying anyting in the command line
21:11:00shashlickit doesn't propagate
21:11:03Araqer use 'declared' instead?
21:11:13shashlickah
21:11:13Araqa const is never a --define
21:12:48shashlickno luck
21:13:10shashlickso i'm declaring a const in my main module and anything this module imports should see this
21:13:15shashlickobviously exporting the const doesn't help
21:13:23shashlicksince the main module isn't being imported
21:14:15shashlicklong story short, i want to be able to import packages on a condition
21:24:47Araqwell it's a module system, import some module.nim in all the other modules that care about it
21:25:35Araqand in module.nim you can have a const .intdefine. That wasn't so hard now, was it...
21:29:34shashlickthat will work for scenario 1 where i want const to have value 1 which means import packageX
21:30:00shashlickbut scenario 2 where I don't want to import packageX, i have to set the const to something else - only way is to use command line or a nims file
21:31:56shashlickanyway, all just to avoid creating an extra file
21:32:07shashlickbut you really need to reinstate {.define.} 🙂
21:32:27AraqI don't understand. const useBlas {.intdefine.} = 0
21:32:32Araq# clients:
21:32:41Araqwhen useBlas == 1: import blas
21:33:02Araqwe're lacking a .booldefine, but ints are ok
21:34:16*thomasross joined #nim
21:35:56shashlickok will try that
21:46:43*zacharycarter quit (Ping timeout: 256 seconds)
21:58:24*dom96_w joined #nim
21:58:31*dom96_w quit (Client Quit)
22:03:00*dom96_w joined #nim
22:17:09*Vladar quit (Remote host closed the connection)
22:18:52*enow quit (Quit: leaving)
22:20:26*dddddd quit (Ping timeout: 246 seconds)
22:20:43*dom96_w quit (Quit: Textual IRC Client: www.textualapp.com)
22:36:07*zachcarter joined #nim
22:39:59*dddddd joined #nim
22:55:55*vlad1777d quit (Ping timeout: 246 seconds)
22:57:51FromGitter<kaushalmodi> shashlick: you here?
23:05:26*skellock quit (Ping timeout: 272 seconds)
23:13:17*ng0 quit (Quit: Alexa, when is the end of world?)
23:14:49*krux02 quit (Remote host closed the connection)
23:23:02FromDiscord_<exelotl> is there a way to make a proc use different implementations at compile time vs at runtime?
23:23:20FromGitter<timotheecour> when nimvm
23:23:36FromDiscord_<exelotl> ah thanks, that'll be it
23:24:56FromGitter<zacharycarter> forgive me if I'm way off - but are users being encouraged now to use `-opt:size|speed` rather than `-d:release` ?
23:25:51FromGitter<timotheecour> ya docs arent’ clear on what does -d:release imply; is that size or speed; shd be clarified in a PR instead of just answering here
23:26:32FromGitter<timotheecour> ```@if release: ⏎ opt:speed ⏎ @end``` ⏎ ⏎ so gives ur answer, but shd be clarified in docs [https://gitter.im/nim-lang/Nim?at=5c3fbda81cb70a372aede9cf]
23:28:19FromGitter<timotheecour> (and `nim —dump` shd tell u what r options actually computed so we avoid docs becoming out of sync w code)
23:33:04*lritter joined #nim
23:37:39rayman22201I'm really curious about the answer to this question. Any ideas? https://forum.nim-lang.org/t/4566
23:38:04rayman22201I thought it was a simple typo or something, but I don't see anything.
23:40:39*skellock joined #nim
23:42:43shashlickHey @kaushalmodi
23:45:04*skellock quit (Ping timeout: 258 seconds)
23:45:12FromGitter<kaushalmodi> Hello
23:45:23FromGitter<kaushalmodi> On mobile now though
23:46:19*ryukoposting quit (Remote host closed the connection)
23:46:36*leorize quit (Ping timeout: 252 seconds)
23:47:22FromGitter<kaushalmodi> I had pinged you about that getCurrentException, but you already responded to that. Thanks :)
23:48:24*darithorn joined #nim
23:51:28FromGitter<zacharycarter> thanks @timotheecour
23:51:40*darithorn quit (Client Quit)
23:51:54FromGitter<timotheecour> np
23:56:27rayman22201@timotheecour how about this: https://gist.github.com/rayman22201/92f28f0c1d9ccbc5a36fe04c2132c49e