<< 24-08-2017 >>

00:01:00*jinshil joined #nim
00:03:54*Pisuke joined #nim
00:06:27*MyMind quit (Ping timeout: 240 seconds)
00:07:54*endragor joined #nim
00:08:36*pilne joined #nim
00:11:57*endragor quit (Ping timeout: 240 seconds)
00:24:17*def-pri-pub joined #nim
00:33:50*endragor joined #nim
00:34:52FromGitter<gogolxdong> you are really good at associating
00:36:22*rauss joined #nim
00:38:25*endragor quit (Ping timeout: 248 seconds)
00:43:47*gangstacat quit (Quit: Leaving)
00:59:37*endragor joined #nim
01:01:43*Vindaar joined #nim
01:04:09*endragor quit (Ping timeout: 252 seconds)
01:08:06*def-pri-pub quit (Quit: leaving)
01:09:53*arnaud2 quit (Ping timeout: 248 seconds)
01:25:35*endragor joined #nim
01:30:09*endragor quit (Ping timeout: 248 seconds)
01:36:04*chemist69 quit (Ping timeout: 255 seconds)
01:42:52*yglukhov joined #nim
01:47:50*yglukhov quit (Ping timeout: 240 seconds)
01:50:01*chemist69 joined #nim
02:17:16*def-pri-pub joined #nim
02:17:16*def-pri-pub quit (Changing host)
02:17:16*def-pri-pub joined #nim
02:27:06*ShalokShalom quit (Remote host closed the connection)
02:31:36*sz0 quit (Quit: Connection closed for inactivity)
02:37:53*ipjk quit (Quit: Leaving)
03:07:10*endragor joined #nim
03:12:07*endragor quit (Ping timeout: 260 seconds)
03:12:32mahmudovyardanico http://ix.io/znm
03:12:52mahmudovis it normal?
03:13:14mahmudovSIGSEGV: Illegal storage access. (Attempt to read from nil?)
03:16:15def-pri-pubmahmudov: could use some sample code
03:19:50mahmudovi used it https://gist.github.com/Yardanico/8389b4dae193fe175e5272249138bccf
03:20:30*arnaud2 joined #nim
03:20:44mahmudovdef-pri-pub which?
03:27:47*dddddd quit (Remote host closed the connection)
03:32:04*def-pri-pub quit (Quit: leaving)
03:45:50*yglukhov joined #nim
03:50:20*yglukhov quit (Ping timeout: 240 seconds)
04:19:41*endragor joined #nim
04:24:17FromGitter<Varriount> @dom96 More likely it's meant to show Rust as the 'King' of programming languages.
04:24:31*endragor quit (Ping timeout: 248 seconds)
04:32:00*xaxisx quit (Ping timeout: 248 seconds)
04:35:11*mahmudov quit (Remote host closed the connection)
04:35:18FromGitter<Yardanico> mahmudov: look at the github issue
04:37:43FromGitter<Yardanico> https://github.com/nim- ⏎ lang/Nim/issues/6268
04:37:55FromGitter<Yardanico> There's a solution in comments
04:38:09FromGitter<Yardanico> But honestly openweatherapi isn't the best
04:38:22FromGitter<Yardanico> There is darksky, which is much better
04:39:46FromGitter<Yardanico> dom96: wow, you have 5 rating on your comment :)
04:59:59*endragor joined #nim
05:04:31*endragor quit (Ping timeout: 248 seconds)
05:13:21*arnaud2 quit (Ping timeout: 240 seconds)
05:17:28*cspar_ joined #nim
05:18:35*cspar quit (Ping timeout: 240 seconds)
05:26:03*endragor joined #nim
05:30:20*endragor quit (Ping timeout: 240 seconds)
05:36:02*xaxisx joined #nim
05:38:48*pilne quit (Remote host closed the connection)
05:47:48*yglukhov joined #nim
05:51:05*rauss quit (Quit: WeeChat 1.9)
05:52:21*yglukhov quit (Ping timeout: 252 seconds)
05:56:34*skrylar joined #nim
05:56:40skrylarmoop
06:06:44*endragor joined #nim
06:33:43*nsf joined #nim
06:44:23*Arrrr joined #nim
06:44:23*Arrrr quit (Changing host)
06:44:23*Arrrr joined #nim
06:57:31skrylarmeh. i think the matrix math code should be usable now
07:07:08*Yardanico joined #nim
07:12:21*yglukhov joined #nim
07:13:03*yglukhov quit (Remote host closed the connection)
07:13:15*yglukhov joined #nim
07:13:37*gokr joined #nim
07:17:11*lguzzon joined #nim
07:18:16*lguzzon quit (Client Quit)
07:22:23*ShalokShalom joined #nim
07:34:08YardanicoShould I make a PR to add this proc to system module? https://gist.github.com/Yardanico/07e8cbc5abf8fb19a99bd957e3e8904a
07:34:22Yardanicoit allows you to write something like yourarray[] = 0
07:34:26Yardanicoso all values will be set t 0
07:34:28Yardanico*to 0
07:39:39*endragor quit (Remote host closed the connection)
07:45:43*PMunch joined #nim
07:53:04skrylarYardanico, the answer to "should i make a PR" is almost always yes because a PR is already a question
07:53:29skrylarthe worst that happens is you get told "no" or something
07:53:38Yardanicoskrylar, well, I don't know where to put this proc in (position
07:53:50Yardanicomaybe somewhere near slicing procs?
07:56:41Yardanicoand also - should I add a test?
07:59:40PMunchPreferably, tests are always good :)
08:01:06Yardanicowell this proc is very small for any errors :)
08:01:45PMunchWhat is it?
08:01:46skrylarif you make the PR people can comment directly on the pr tho :\
08:02:07Yardanicoyeah
08:02:08YardanicoI'll do it
08:02:16YardanicoPMunch, https://gist.github.com/Yardanico/07e8cbc5abf8fb19a99bd957e3e8904a
08:02:40Yardanicolike "mydata[] = 5"
08:03:01PMunchAah, that could be practical
08:03:15PMunchAs long as people simply don't misspell their index :P
08:03:16Yardanicoshould I add a example? :P
08:03:29PMunchThe more documentation the better
08:03:32Yardanicook
08:03:43PMunchHave you written a proper doc-string? You can add an example there
08:04:10PMunchWith ..code-block: or something like that
08:04:12Yardanicoyes
08:04:33YardanicoI've already used code blocks in simple API wrapper
08:05:04*nattefrost joined #nim
08:05:25*endragor joined #nim
08:05:38Yardanicohttps://github.com/nim-lang/Nim/pull/6271
08:07:42Yardanicooh wait
08:07:44YardanicoI'm a noob
08:09:01Yardanicothere's no ..< defined, so use arg.len-1 instead
08:09:15Yardanico(i mean it's not defined at that position in system)
08:09:15*vlad1777d_ joined #nim
08:10:09*endragor quit (Ping timeout: 248 seconds)
08:10:13YardanicoI get ~560 thousands iters/sec while setting all values in "var data: array[8000, int]" to 5
08:13:34YardanicoI've never thought that it can be so easy to add some procedure to standart library of the language
08:15:39skrylarwell nim is neat.
08:15:49skrylarmostly because of the universal a(b) = a.b thing
08:15:59skrylarso anything you bolt on for yourself can always look like it belongs there
08:16:04Yardanicoyeah
08:16:19Yardanicoalso I'm amazed that "go to definition" works even for things like this procedure
08:16:27Yardanico(nimsuggest is great)
08:16:43Yardanicoyou just ctrl+click on []=, and VScode sends you to system.nim
08:16:45skrylaryea we need to bother devs to have a parser in the libs tho
08:16:51skrylarGo does it that way and that's why they have so many tools
08:18:00PMunchA parser?
08:18:52skrylargo has a package where you can just import the compiler's parser and tell it to parse a random go file, it gives you the ast
08:19:11skrylarso stuff like gofix just asks for the same parser go uses when they do their weird full ast transform things outside of macros
08:20:20PMunchYou mean like parseStmt?
08:20:31skrylarif that exists, sure
08:20:38PMunchJust read your file into a string and use that on it and you get the full AST
08:21:20Yardanicoand yeah, you can import nim compiler too :)
08:22:37skrylardealing with quaternions right now x.x
08:25:07*chemist69 quit (Ping timeout: 255 seconds)
08:29:35*couven92 joined #nim
08:31:31*endragor joined #nim
08:36:49*endragor quit (Ping timeout: 276 seconds)
08:39:10*chemist69 joined #nim
08:42:25*Yardanico quit (Quit: Leaving)
08:43:10*Yardanico joined #nim
08:59:32*dom96|w joined #nim
09:01:54*jinshil quit (Quit: Good-bye!)
09:10:52*maxcroud joined #nim
09:12:00*Yardanico quit (Ping timeout: 252 seconds)
09:13:52FromGitter<krux02> quaternions are somewhat confusing, but yet very cool
09:15:44*Cacao_ joined #nim
09:16:00Cacao_Hiya
09:16:42Cacao_Can someone explain me something?
09:16:53Cacao_i am stuck
09:17:08couven92Cacao_, always: Just aks, if someone can help, we'll answer
09:17:15dom96|wYes, don't "ask to ask"
09:17:17couven92s/aks/ask
09:17:28Cacao_cool, ok then, my question is
09:17:30maxcroudHello! According to code of sameIdentifier proc https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality Nim don't account en dashes in identifier names. But that's not true for me 0.17.0
09:18:06couven92maxcroud, example?
09:18:35Cacao_8=====D :D
09:18:39Cacao_i will rape everyone
09:18:45*Cacao_ left #nim (#nim)
09:18:57PMunchmaxcroud, that page is wrong.. It's supposed to be a hyphen, not an en dash..
09:19:15maxcroudcouven92:var a–b = true
09:19:28maxcroudvar ab = false
09:19:44PMunchmaxcroud, as I said. hyphen, not en-dash
09:19:50PMunchvar a-b = true
09:20:05PMunchvar ab = false # fails with identifier already used or something like that
09:20:35maxcroudHm, but in manual there is en dash, isn't it?
09:20:41PMunchYes
09:20:57couven92i'll do a pr immediately
09:20:59PMunchBut it is wrong, probably a bug with the ASCII -> HTML conversion
09:21:00*dom96|w quit (Read error: Connection reset by peer)
09:21:35maxcroudJust to clarify, hyphen is after zero on keyboard?
09:21:36*Yardanico joined #nim
09:21:58couven92maxcroud, no, that depends very muhc on your keyboard! :P
09:22:08PMunchDepends on your layout
09:22:16couven92On mine it's left to the right shift
09:22:17PMunchMine is between S and <
09:22:40maxcroudSorry :D
09:22:43PMunchmaxcroud, does your keyboard have an en-dash button?
09:22:57maxcroudNo
09:23:30maxcroudI mean, hyphen and "minus" operator are different?
09:23:34*endragor joined #nim
09:23:35PMunchNo
09:23:37PMunchThey are the same
09:24:07maxcroudSo my example with hyphen doesn't compile
09:24:13PMunch0x2D in ASCII
09:24:15FromGitter<krux02> well there different - things
09:24:16couven92no, minus in the mathematical operator, hyphen is the name of the actual character, in the US they sometimes also call it the dash
09:24:24FromGitter<krux02> but normally when you type - it is just a minus
09:24:46FromGitter<BigEpsilon> Hi, I wrote a post on reddit to explain what may be the advantages of using nim compared to rust, if you want to upvote https://www.reddit.com/r/programming/comments/6viswu/d_as_a_better_c/dm20dwp/
09:25:44maxcroudThanks for explanation
09:25:52PMunchcouven92, technically minus and hyphen could be considered separate characters. It's just that when typewriters came along they didn't want to/couldn't have buttons for everything.
09:26:03FromGitter<krux02> "but it you take into consideration"
09:26:04couven92maxcroud, PMunch, @krux02: actually according to https://en.wikipedia.org/wiki/Hyphen Hyphen is the shortest of all these type-symbols... appearently the actual minus sign is longer than hyphen
09:26:12PMunchReally old keyboard could even lack two different keys for O and 0
09:26:30FromGitter<krux02> well that would only typewriters do
09:26:32PMunchOops, got to go. Back soon
09:27:03skrylarrust doesn't work
09:27:07PMunchHuh, in the manual/lexing.txt file the dash is also an en-dash.
09:27:11PMunchThat's weird
09:27:19skrylarits supposed to enforce a specific memory model but that model isn't able to actually maintain a GUI
09:27:27skrylari used it around 0.8-0.9 and broke it
09:28:08*endragor quit (Ping timeout: 240 seconds)
09:29:21FromGitter<krux02> well all programming languages that pretent something that isn't actually how things are, are essentially lying
09:29:40FromGitter<BigEpsilon> @krux02 thanks for the correction
09:30:07FromGitter<krux02> np
09:33:09couven92maxcroud: PR https://github.com/nim-lang/Nim/pull/6272 will update the documentation once it's merged
09:35:12Yardanicoif I have a sequence of NimNodes, how do I convert it to seq[string] to pass it to quote do?
09:35:25Yardanicomy procedure accepts seq[string]
09:35:43couven92Yardanico, call repr on all nodes?
09:35:50couven92not really sure what you want to do?
09:36:08*endragor joined #nim
09:36:24Yardanicocouven92, ok, this sequence of nimnodes contains nimnodes like @[$("one"), $(2)]
09:36:41Yardanicoso I'm creating a call to $ to stringify it
09:36:52Yardanicoand then I need to pass this resulting sequence to proc which accepts seq[string]
09:38:01*arnetheduck quit (Remote host closed the connection)
09:38:16couven92wait what is your NimNode? `$("one")`, `("one")` or `"one"`
09:38:55YardanicoNimNode is a "Call: Ident !"$" IntLit 5"
09:38:58Yardanicothey're like this
09:39:04couven92okay
09:39:14YardanicoCall(Ident(!"$"), IntLit(5))
09:39:33*arnetheduck joined #nim
09:39:49*maxcroud quit (Ping timeout: 260 seconds)
09:40:56couven92Yardanico, can't you just call `newTree(nnkBracketExpr)` and then add your nodes to it? Then do a `prefix("@", bracketExpr)`
09:41:10Yardanicocouven92, ah, probably I can
09:43:03couven92Yardanico, ah, it's nnkBracket, not nnkBracketExpr
09:43:05*maxcroud joined #nim
09:43:24couven92Yardanico, https://play.nim-lang.org/?gist=afdf1f2a4bfe1d1af321e3e74c882643
09:44:37Yardanicoyay, thanks!
09:45:30YardanicoI'm porting python's "print" to Nim :D
09:45:37Yardanicoit's a bit of tricky
09:45:52Yardanicobecause it accepts any number of arguments, and then some named arguments
09:45:55maxcroudcouven92: https://github.com/nim-lang/Nim/pull/6272 there is a minus
09:46:55FromGitter<krux02> uh
09:46:58FromGitter<krux02> not sure
09:47:07FromGitter<krux02> a-b is not a single adentifier
09:47:13FromGitter<krux02> it is a minus b
09:47:35maxcroudyes
09:47:43FromGitter<krux02> so you need the en-dash to actually join identifiers, don't you?
09:48:00maxcroudI don't need this option at all :)
09:48:44maxcroudI just want to figure out what symbols Nim omits in identifiers by default
09:49:32FromGitter<krux02> well the endash cannot be typed
09:49:39FromGitter<krux02> so you could simply ignore it
09:49:54maxcroudI checked every dash-like symbols from wikipedia
09:50:17couven92@krux02 if you accent-quote it?
09:51:01maxcroudcouven92: I did so
09:52:28FromGitter<krux02> well then you can even put spaces in it
09:52:41couven92hmm... Araq?
09:53:31couven92maxcroud, @krux02: https://play.nim-lang.org/?gist=1d19b4ff7c35e3bf1ee4fd933d08d937
09:53:38couven92it really is en-dash!
09:54:11FromGitter<krux02> but it is also space
09:54:48FromGitter<krux02> so this part is out of date
09:55:27couven92@krux02 oh like this? :O
09:55:41maxcroudwhat is the version of Nim this playground uses?
09:55:55Yardanico0.17.0
09:56:20maxcroudhttps://play.nim-lang.org/?gist=cb9f8a347429f5ef650a17a46a0b5f9c
09:56:21Yardanicoah
09:56:22YardanicoI'm wrong
09:56:24Yardanico0.16.0
09:56:29maxcroudOkay
09:56:30Yardanicoping zacharycarter
09:56:45Yardanico"echo NimVersion" echoes 0.16.0
09:56:49maxcroudThis gist doesn't work with 0.17.0
09:57:39maxcroudI mean it works, but shouldn't accordint to manual
09:57:47couven92Yardanico, btw, this is how I replicated you problem: https://play.nim-lang.org/?gist=e69e1434d0fb99df409b1bd2f797eb10
09:58:17FromGitter<krux02> well I created a keyboard shortcut in emacs to open a new file "/tmp/scratch.nim". and a keyboard shortcut to host the buffer content on ix.io
09:58:24FromGitter<krux02> so no playgrount required :P
09:58:36FromGitter<krux02> does the playground have a web api?
09:58:44FromGitter<krux02> so that I can use that to host nim code?
09:58:53Yardanicowhat do you mean by "host"?
09:58:58Yardanicoit uses gist for storing code
09:59:17FromGitter<krux02> ah, ok, then I need the gist web api
09:59:56FromGitter<krux02> I really prefer to edit and compile locally than in the browser, but I really like to share, too.
10:00:12Yardanicowell playground code is open-source
10:00:23Yardanicohttps://github.com/zacharycarter/nim-playground
10:00:46FromGitter<krux02> cool, did not know he did the playground
10:01:12Yardanicowell it's only 135 lines of nim code
10:01:20PMunchcouven92, good thing you fixed it. Weird how something like that would make it in there in the first place..
10:04:00PMunchI have a system-global keyboard shortcut to take the current selection and make an ix.io link out of it which it places in my clipboard :)
10:04:13PMunchVery practical for sharing code snippets
10:04:32Yardanicoguys, python's print in nim: https://play.nim-lang.org/?gist=ef01c377c45e615fdc163dd53d328f7f
10:04:37Yardanicogist link - https://gist.github.com/ef01c377c45e615fdc163dd53d328f7f
10:04:55YardanicoI was trying to do it without macro, but no success :)
10:06:25PMunchHuh, that's cool
10:07:04*dom96|w joined #nim
10:07:07Yardanicoalso, I've found that nnkArglist is the thing that I need by trial-and-error
10:08:31Yardanicowell one thing - I can't keep "end" named like this, so I changed it to "endl"
10:08:41dom96|wAre you sure you need a macro for this?
10:08:59Yardanicodom96|w, how you would do it without a macro?
10:09:02FromGitter<krux02> you don't need a macro for that
10:09:21Yardanicoit should accept any number of objects with any type, and then some keyword arguments
10:09:28FromGitter<krux02> just look at how mkstring from scala works
10:09:34dom96|wproc print(data: varargs[string, `$`], sep = " ", endl = "\n")
10:10:14Yardanicoit didn't work when I tried to do this, lol
10:10:17Yardanicothanks :)
10:10:31Yardanicoah
10:11:01Yardanicoyou can't do that: print(1, 2, 3, 4)
10:11:04Yardanicowith this proc
10:11:20dom96|wwhy not?
10:11:23Yardanicoi'm not sure why
10:11:34dom96|wis it because of the default args?
10:12:15YardanicoError: type mismatch: got (int literal(1), int literal(2), int literal(3), int literal(4))
10:12:15Yardanicobut expected one of:
10:12:15Yardanicoproc print(data: varargs[string, `$`]; sep = " "; endl = "\x0A")
10:12:26*xet7 joined #nim
10:12:28Yardanicoprobably it is
10:12:48Yardanicothere's no way to make "sep" an explicit keyword-named argument
10:15:03Yardanicowell I'm fine with that
10:15:13skrylari'm sure someone would say "wrap glm" to that i say no
10:15:40FromGitter<krux02> skrylar what is your issue?
10:15:56FromGitter<krux02> I wrote the nim glm for the most part
10:16:43FromGitter<krux02> and I tested quaternions, and did things wrong, yes, but I corrected them.
10:16:55FromGitter<krux02> Is there still a bug in quaternions?
10:17:10maxcroudhttps://github.com/nim-lang/Nim/commit/b652b3cd52bf284baa5b5152443fdc6cf2d404fc
10:17:25couven92PMunch, I reverted, we discovered that endash was right all along
10:17:46maxcroudcouven92: en-dash is removed
10:19:28PMunchWho would use an en-dash in their code?
10:20:48maxcroudOne of the million maybe
10:20:50FromGitter<krux02> nobody it isn't even ASCII
10:20:57FromGitter<krux02> and not on any keyboard I know
10:21:09FromGitter<krux02> some word processors can replace it
10:21:26PMunchYeah, that's why I was wondering why it was an ignored character like _ in Nim identifiers..
10:21:52FromGitter<krux02> me too
10:22:07FromGitter<krux02> I think it is just confusing and should be removed from the language and the documentation
10:22:34FromGitter<krux02> in the documentation this en dash is just noise, no value in there
10:22:44FromGitter<krux02> you can't type it and you probably will never see code that uses it
10:22:50PMunchApparently it has been removed from the language, just the documentation lagging behind
10:23:01FromGitter<krux02> take it out and make the language a better language
10:23:49FromGitter<krux02> ok then you can make the PR to remove the en-dash in the documentatino
10:24:00FromGitter<krux02> that would be an improvement
10:24:10PMunchcouven92, made it but he reverted it because he thought it was still in
10:24:38Yardanicoyou can revert revert
10:24:44couven92:D
10:24:48couven92okay then...
10:25:45*endragor quit (Remote host closed the connection)
10:25:45*ShalokShalom_ joined #nim
10:26:51couven92https://github.com/nim-lang/Nim/pull/6272 reopenend, and added the commit that removes endash from the docs
10:28:21*ShalokShalom quit (Ping timeout: 240 seconds)
10:29:23FromGitter<krux02> couven92, I think you could also remove the regular expression to make it simpler
10:29:43FromGitter<krux02> don't require users to understand regular expressions to understand that documentation
10:31:02couven92@krux02 added
10:33:03FromGitter<krux02> thanks this PR will space the future generation of nim users from this confusion
10:33:09FromGitter<krux02> it did confuse me
10:35:44couven92@krux02 what? can't you read regexp by heart? :P Fun fact: I spent two hours the other day writing a regexp subst. The final expression spanned two entire lines on my 2560px-wide screen
10:36:57PMunchHaha couven92 what on earth was that for?
10:37:56couven92PMunch, converting all 5000 Windows Error code C defines into nim const defs. And before you ask: No I could not use c2nim for that
10:38:14Yardanico:D https://gist.github.com/Yardanico/f5a8efeaf230d963739a9905c010c6d6
10:38:16*endragor joined #nim
10:38:23Yardanico(I only added replacing '' by "" in py2nim)
10:38:26Yardanicoand reading from stdin/file
10:38:47couven92PMunch, https://github.com/couven92/nim-windowssdk/blob/master/src/windowssdk/shared/winerror.nim
10:38:56skrylarhmm. i appear to have done something weird
10:39:13*skrylar wonders if anything bad happens from using 3x3 matrices and converting them to 4x4 in the end, instead of using 4x4s the whole time
10:39:56couven92skrylar, eigenvalue and determinant calculations are more difficult for 4x4 iirc?
10:40:12skrylarcouven92, no idea. i'm just doing basic 3d stuff for GL
10:40:43skrylarthere are less flops if you use a smaller matrix and add transform last, but you do pay a copying cost at the end
10:40:59couven92hmmm, I see
10:41:39skrylari may go throw in the code for 4x4 stuff at some later point. there's no reason not to allow both, i just didn't want to fiddle with it yet
10:42:45*endragor quit (Ping timeout: 252 seconds)
10:50:25skrylarah. figured it out
10:50:37skrylarif you want to rotate an object around an off-center point you do need the 4x4s all the way
10:56:35*Vladar joined #nim
10:59:08*Yardanico quit (Remote host closed the connection)
11:04:41*haha_ joined #nim
11:16:04*ShalokShalom_ is now known as ShalokShalom
11:16:57Zevvnewbe request, probably discussed a lot of times: wouldn't it be nice if seq.del would return the deleted item? let v = someseq.del(0)
11:17:33Zevvor is this a typical case of "just make that yourself and stop whining"?
11:17:49Araqwe have someseq.pop()
11:18:11Araqand deques in the stdlib, maybe you use the wrong data structure?
11:18:30Zevvpop it is. I missed that, it was a bit hidden in the noise of the 'system' doc page
11:18:46Zevvseq is good enough in this case, both add and del are O(1), and order does not matter for me
11:18:54Zevvjust to keep a pool of HTTP clients around to allow for keepalive
11:19:08Araqok
11:19:11Zevvthanks
11:30:35FromGitter<ephja> Araq: "var x: T" gives me a sym for T, but how do I get it in the "var x: module.T" case which yields idents instead? must I go through 'x'?
11:31:19Araqsym.owner?
11:40:43FromGitter<ephja> Araq: Hmm I dunno. here's what I'm trying to do: 1. retrieve all the symbols in module 'a ' where sym.flags * {sfExported} == {sfExported} 2. find all the symbols in module 'b' that are owned by module 'a'
11:42:44FromGitter<krux02> well in c++ you never need a stack, because std::vector serves the same purpose, but you should push and pop and the end, not the beginning. Nim is the same
11:44:45*BitPuffin|osx joined #nim
11:45:01FromGitter<ephja> that's an unnecessarily complicated set operation in this case :p
11:47:08*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
11:51:19Araqephja: what is it you're trying to accomplish?
11:55:02FromGitter<ephja> Araq: module 'a' consists of bindings and I need to ensure that the high level interface 'b' references all the exported symbols. I don't want to take the (pre-semantic pass) parseStmt approach (my pass comes after the semantic pass)
11:56:59*krux02 joined #nim
11:58:19krux02hello people I am back, yay ...
11:59:36couven92krux02, the dark days of Gitter are over?
12:03:58FromGitter<ephja> I'm going to test this with much smaller files
12:03:59krux02well I use both
12:04:11krux02hard to say what I prefer
12:04:24krux02gitter has nice things, this is nicer to type ni
12:04:28krux02more resposnive
12:04:46couven92yeah, I agree :)
12:05:00krux02we live in a world where computers have terraflops in computational power and yet they struggle to render text
12:05:59krux02the most important thing in any application beyond simplicity and functionality is spot on responsiveness
12:06:03krux02any web app fails that
12:10:07FromGitter<ephja> I haven't experienced any such issues
12:23:45*dom96|w joined #nim
12:30:35*Yardanico joined #nim
12:31:40*xaxisx_ joined #nim
12:34:39*xaxisx quit (Ping timeout: 248 seconds)
12:35:24krux02well it isn't that bad
12:35:45krux02but comparet do what computers actually can to, it is really bad
12:35:49krux02but noth worth whining about
12:35:52krux02http://ix.io/znF
12:36:11krux02i like macros
12:36:22krux02they allow me to waste my time and not focus of what is actually important
12:48:54FromGitter<ephja> are statements like "when false and foo" folded to "when false"?
12:52:58Araqephja: I doubt it :-)
12:54:06*arnaud2 joined #nim
12:54:46*Snircle joined #nim
12:56:59krux02ephja, well the argument to when is evaluated at compile time, and the second argument is not evaluated.
12:57:34krux02but that optimization also doesn't matter, because it is only evaluated once, so there is not point in compile time optimizing something
12:57:58Yardanicoalso, I've never had any issues with it, but what's the performance of Nim VM?
12:58:16Yardanicois it faster than other VMs?
12:58:27krux02well, I never benchmarked it, but I would guess it somewhere like python
12:58:33krux02so not especially fast
12:59:02krux02there is no jit to native code happening like in Java or JavaScript
12:59:18*Vladar quit (Quit: Leaving)
12:59:52krux02well the best answer I can give you, is: it shouldn't matter, don't do performance critical stuff at compile time
13:00:36ehmryI thought the VM was only used (or should be used) during compiliation
13:00:39Yardanicowell yeah, I've never had any issues with it
13:00:40Yardanicoehmry, it is
13:00:48Yardanicoah
13:00:53skrylarideally a module that does need to do something at compile time should only be getting built the once
13:00:53Yardanicoalso for nimscript probably?
13:01:20Yardanicoalso if you want performance-critical stuff at compile-time, you can create another program :)
13:01:44krux02yes you call call other processes, but not really native functions
13:02:29krux02the vm does not have the same memory layout as native nim and therefore very different performance characteristics
13:02:36krux02just to straight forward things in the vm
13:02:45krux02don't try to be too smart there
13:06:04ehmryas I recall you cannot cast or take address of variables, so high performance libraries tend not to work
13:06:45*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:07:17ehmryI tried to implement a hash function that would work at compile time and it got a bit complicated
13:07:36krux02well I once used the tables module from compile time
13:07:39krux02it was a mess
13:07:41krux02nothing worked
13:07:43krux02horrible
13:08:12krux02it created issues and it was eventually fixed but it left a scar on how reliable the nimvm is
13:08:30krux02the VM has bugs
13:08:34Yardanicowell nim vm is quite complicated AFAIK
13:08:49krux02and not just here and there, it is flawed and it needs a lot of work to get stable
13:08:55*rauss joined #nim
13:09:43krux02as a programmer I don't care if it is complicated or simple, all I care about is that it works correctly and as expected, and that doesn't work
13:10:12krux02it doesn't take a lot of effort to find differences of the VM and native nim code
13:10:54ehmryits still an improvement over other compiled languages
13:11:35Yardanicolool
13:11:41YardanicoI just read at slant:
13:11:43Yardanico"Go is blazing fast, but easier to write than Python, JS, Ruby, or many other dynamic languages."
13:11:50Yardanico"easier to write than Python, JS, Ruby"
13:12:20krux02http://ix.io/znL
13:12:28Araqkrux02: design a better VM.
13:12:49*skrylar quit (Ping timeout: 240 seconds)
13:13:14Araqcan't be hard since you know everything better than me anyway
13:13:15krux02Araq: I am already contributing to Nim as much as I can afford, still I want to point out the things that are the ugly side of Nim
13:13:32krux02the bad parts that could be a good reason to stay away from Nim
13:13:51krux02We all should be aware of it.
13:14:03*dom96|w joined #nim
13:14:26rauss+1
13:15:04raussKnowledge is power
13:15:41Araq"aware" of what? outdated bugs?
13:16:13krux02Araq: What do you think is the most important reason to stay away from Nim?
13:17:05Araqa pessimistic community that doesn't understand software development tradeoffs
13:17:06ehmryi don't see how anyone is forced to use the VM if its an extra feature
13:17:35Yardanicoehmry, well macros depend on VM if i'm not wrong
13:17:51Yardanicoand every constant procedure call
13:18:00Zevvkrux02: I'm about to introduce Nim to my colleagues, so please enlighten me about these dark corners
13:18:03Zevvbetter to know in advance
13:19:10ehmryif you can't use a constant call or a macro its not really a regression in respect to other languages
13:19:34Yardanicoyeah
13:19:56krux02well the worst experience ist realld the, because the documentation praises the VM as something where I can execute any code. And that is simply not true. The code that I can execute on the VM is a subset of Nim.
13:20:24AraqI did a DFA minimization algorithm in Nim's VM. it was not buggy, it was too slow!
13:20:33Araqso I used staticExec as a workaround.
13:21:19Araqkrux02: I don't see where we praise "run arbitrary Nim code at compiletime"
13:24:12krux02I just try to find it again, but I remember it from the very beginning when I staretd learning Nim
13:24:15*relax joined #nim
13:26:28krux02Araq: "you can write any kind of Nim code and the compiler will run it at compile time."
13:27:01Araqwhere is that?
13:27:03Yardanicoit's about macros
13:27:04Yardanicohttps://nim-lang.org/docs/tut2.html#macros
13:27:12Yardanicoah
13:27:24krux02^
13:27:26krux02thanks
13:29:19krux02I think here should be at least a few words about the limitations of the VM.
13:29:58Yardanicothere's a mention of FFI
13:30:15krux02yes, but that's not all
13:30:29krux02no pointers because of a different memory model and different performance characteristics
13:30:56AraqI haven't written this paragraph :P
13:31:02Araqwill change it
13:31:03Araqthanks
13:31:13krux02ok thank you, too
13:31:30*mahmudov joined #nim
13:34:30couven92any way to get the file directory in a config file?
13:34:46couven92or get the directory of the file being compiled through config?
13:36:25mahmudovthnks yardanico pyloor code worked well.
13:36:34mahmudovpyloor's*
13:37:44Yardanicomahmudov, but I also suggest you to try "darksky" weather api
13:37:58Yardanicohttps://darksky.net/
13:38:01mahmudovhttps://gist.github.com/milisarge/cc60d3cab7c70763f0d5b6780e9e677e
13:39:45mahmudov+1 yardanico
13:42:09Yardanicobut it requires one additional api to use
13:42:23Yardanicogoogle geocoding api
13:42:38Yardanicobecause darksky accepts latitude and longtitude coordinates
13:42:52Yardanicoand if you want user to query his city - use google geocoding api :)
13:45:51mahmudovexactly i stored this code as an weather api usage example :)
13:46:36Yardanicoalso I forgot why I couldn't use json.to, maybe I was too lazy
13:46:53mahmudovbut what is the wrong with:
13:46:54mahmudov humidity = int round day["humidity"].getFNum()
13:47:01Yardaniconothing wrong?
13:47:16mahmudovthat dom96 says "i miss the day"
13:47:43Yardanicohe meant that some time ago function calls without round brackets were not possible
13:48:03mahmudovah ok i understood :)
13:48:46Yardanicomahmudov, you can also remove async features if you don't need them
13:50:09*ofelas joined #nim
13:50:10dom96|wyeah... IMO this borders on abuse of the language
13:50:32dom96|wSo much so that I want to have another discussion about restricting it
13:50:43dom96|wBut I'm sure Araq will tell me that it's this way for a good reason.
13:51:22Araqignorance is a poor starting point for a discussion
13:51:57Yardanicowell sometimes (like here) you would write it as int(round(day["temp"]["day"].getFNum())) - 273 which I don't like very much
13:52:18Araq f g h # f(g(h)) or f(g, h) ??? --> the only consistent meaning is f(g(h)) and that's what Nim choose
13:53:17*Arrrr quit (Read error: Connection reset by peer)
13:54:39mahmudovhm but more than one or two,using () looks stable way
13:55:19Araqe f g, h # hmm, e(f(g, h)) or e(f(g), h)?
13:55:35Araqreplace 'e' with 'echo' to see what happens here
13:56:11Araqand the restriction that exists here is that it's only valid as a statement, not as an expression
13:56:39YardanicoAraq, it would be second one? e(f(g), h)?
13:56:39*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:57:08Araqin other words: command call statements work as in Python, command call expresions are restricted to a single argument already
13:57:12*dom96|w joined #nim
14:05:05dom96|wMy point is that there should only be one level of nesting of this.
14:05:20dom96|whumidity = int round(day["humidity"].getFNum())
14:05:26dom96|wThat's fine
14:05:29mahmudov+1
14:05:31dom96|whumidity = int round day["humidity"].getFNum()
14:05:33dom96|wis too much
14:09:46krux02dom96|w: I could break an example in the nimble readme.md
14:09:51krux02cd `nimble path argument_parser`
14:10:23krux02when nimble spams to stdout hints and stuff to stdout this simply doesn't work
14:10:56*dddddd joined #nim
14:11:20dom96|wkrux02: fixed in HEAD
14:11:38krux02ok thanks
14:11:44cremSomeone told that seq and strings are going to be non-nil by default. Any estimation when will that happen?
14:12:10krux02crem: well I am working on a PR, but araq said it will not be merged before the next release
14:12:36cremWhich is still this year or later?
14:12:40krux02at it will be more a "you wouldn't see that there is still a nil value" than actually non nil
14:12:49krux02don't know
14:12:57krux02and it is non trivial to implement
14:13:02krux02because reasons
14:13:05cremok!
14:14:06Yardanicocrem, just "var data: seq[int]" would create an empty seq which will not SIGSEGV (if I understood it correctly)
14:14:28Araqdom96|w: only one level of nesting? what happened to our beloved "consistency" argument?
14:14:54cremYardanico: you mean currently?
14:15:14euantoryeah, having arbitrary rules like that would just confuse things - allow completely or disallow completely makes more sense to me
14:15:27Yardanicocrem, not currently, but after this change
14:15:45cremSounds good.
14:18:29Yardanicoand same for strings too
14:18:32dom96|wAraq: so consistency is the only reason for this?
14:20:38Araqwell this is real consistency at work here, parsers are recursive beasts. it's not the usual "there is proc foo for Tables, now we need it for Button too or else I will claim Nim is designed like Bash"
14:22:36Araq"so consistency is the only reason why if statements can be nested?" do you see the problem with this question?
14:24:07*gokr quit (Ping timeout: 260 seconds)
14:25:01Araqhttps://tech.ahrefs.com/skylake-bug-a-detective-story-ab1ad2beddcd
14:25:14*PMunch quit (Quit: Leaving)
14:26:53Yardanicolol, I've read translation of this on habrahabr
14:27:21Yardanicoah no
14:27:48dom96|wAraq That's fair, and just like with if statements you shouldn't nest them too much
14:28:02dom96|wOne level should be the sane limit
14:31:41*couven92 quit (Quit: Client disconnecting)
14:33:08*Melody_ joined #nim
14:33:16Melody_Hello
14:33:30Yardanicohi
14:33:47*yglukhov quit (Remote host closed the connection)
14:33:57Melody_If i suck your dick then you gonna stop programming in this shitty language?
14:34:09Yardanicoah, guys, it's Cider
14:34:15Melody_XD
14:34:24Melody_Rust is the best
14:34:26YardanicoI knew it because he used "smuxi"
14:34:37Melody_oh XD
14:34:59Melody_Really, guys, Nim isn't even stable
14:34:59*maxcroud quit (Ping timeout: 260 seconds)
14:35:23Melody_stop using Nim
14:35:43krux02Melody_: I use Nim because of the metaprogramming that is possible in Nim
14:35:48dom96|wAraq ban this person please
14:35:57Melody_btw, the forum isn't fully protected, it is easy to bypass cloudflare
14:36:05Melody_how?
14:36:09Melody_with the forum's email
14:36:16Melody_when you get the verification email
14:36:16krux02I actually started my project in Rust but early saw that Rust is not suitable
14:36:21Melody_you can see the forum's ip
14:36:23Melody_XD
14:36:27Melody_in the email
14:36:33Melody_just checking the headers
14:36:51dom96|wMelody_ noob
14:36:56krux02Melody_: well here are the developers of Nim with a lot of investment in this language, you will not convince anybody
14:37:00*Melody_ left #nim (#nim)
14:37:24YardanicoI think we have a new persistent troll
14:37:37YardanicoDoes he have a plugin to automatically leave then someone gets op mode?
14:37:38relaxvalidation!
14:37:52Yardanicoalso, about forum - I think he's true about it
14:38:14*yglukhov joined #nim
14:38:24Yardanicoyeah
14:38:26Yardanicohe is
14:38:42Yardanico"DigitalOcean Amsterdam"
14:38:42krux02I don't think he is a troll, I think he is in the "this is the true programming language" state
14:39:00krux02he started to believe
14:39:19krux02young and inexperienced
14:39:44Yardanicoso probably mail server needs to be moved onto another vps/ip
14:40:05relaxhave you there been troubles with DoS attacks?
14:40:06dom96|whe's not
14:40:10*chemist69 quit (Ping timeout: 276 seconds)
14:40:20Yardanicodom96|w, why?
14:40:31Yardanicorelax, cloudflare is mostly for bot protection
14:40:40Yardanicoand for anti DoS too
14:41:28Yardanicodom96|w, this IP is already mentioned in some posts/github issues, so it's safe to post it here: 178.62.143.63
14:41:32Yardanicoredirects to nim forum
14:41:48Yardanicooh wait
14:42:49*yglukhov quit (Ping timeout: 240 seconds)
14:43:25Yardanicoit really seems so
14:43:49YardanicoIP address of nim-lang.org and forum is 104.28.18.79 which is cloudflare
14:44:38krux02dom96|w: I just pulled the latest version of nimble
14:44:58krux02nimble path still produces a lot of clutter and I cant compile my project anymore because of that
14:45:46krux02https://github.com/krux02/nimAntTweakBar/blob/master/AntTweakBar.nim#L25
14:45:51krux02that line doesn't work anymore
14:46:32dom96|wlatest version or HEAD?
14:46:39dom96|wthere is a difference
14:48:02cremI've just occasinally clicked on "Andreas Rumpf" link in bottom-right corner of forum, and it leads to non-existant nim-lang.org/blog/, should be nim-lang.org/blog.html
14:49:10krux02dom96|w: I did './koch tools' in the devel brach in nim
14:49:22krux02so the main nim repository
14:50:14*relax quit (Ping timeout: 255 seconds)
14:51:56krux02don't just fix the broken link, check if there is a systematic error
14:52:22*relax joined #nim
14:53:03*chemist69 joined #nim
14:55:12Yardanicowhy not make "blog" equal to "blog.html"?
14:55:21Yardanicoor all links like that
14:59:07*xet7 quit (Ping timeout: 260 seconds)
15:02:47dom96|wYardanico: that's an old VPS that I need to shut down, there is some stuff still running there but it's not used.
15:02:54dom96|wkrux02: checked `nimble -v`?
15:02:58dom96|wit should show the git commit now
15:03:48*nsf quit (Quit: WeeChat 1.9)
15:04:08Yardanicodom96|w, good to know it
15:05:19*arnetheduck quit (Ping timeout: 240 seconds)
15:05:41*BitPuffin|osx quit (Ping timeout: 240 seconds)
15:17:51*yglukhov joined #nim
15:20:30*krux02 quit (Ping timeout: 252 seconds)
15:20:57*cspar_ quit (Ping timeout: 240 seconds)
15:21:00*gokr joined #nim
15:21:22*ShalokShalom quit (Ping timeout: 255 seconds)
15:21:34*PMunch joined #nim
15:22:09*yglukhov quit (Ping timeout: 252 seconds)
15:24:18*Trustable joined #nim
15:33:36*yglukhov joined #nim
15:34:38*krux02 joined #nim
15:49:10*Trustable quit (Remote host closed the connection)
15:49:23YardanicoAlso guys - if you want to test your app on another platform - I have macOS (Sierra), Linux (Arch), and Windows 10, so I can test on all 3 major OSes :)
15:49:46Yardanicobut not *legal* macOS, it's a hackintosh
16:02:42*gokr quit (Ping timeout: 260 seconds)
16:03:16*Vladar joined #nim
16:05:41*ShalokShalom joined #nim
16:21:03*cspar joined #nim
16:41:05*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
16:46:16krux02how do I get a temp file?
16:49:43*haha_ quit (Quit: haha_)
16:52:39*haha_ joined #nim
16:55:01*haha_ quit (Client Quit)
16:59:46*nattefrost quit (Remote host closed the connection)
17:01:25*haha_ joined #nim
17:10:19FromGitter<zacharycarter> O.o my talk on Nim is tomorrow
17:10:21FromGitter<zacharycarter> finally
17:12:04FromGitter<krux02> cool
17:14:47*Moo joined #nim
17:14:50*Moo left #nim (#nim)
17:15:21*Moo joined #nim
17:15:23MooAraq XD FUCK YOU!
17:15:25*Moo left #nim (#nim)
17:15:37*arnaud2 quit (Ping timeout: 260 seconds)
17:16:23Yardanico190.8.32.137
17:16:29Yardanicobut his IP is dynamic sadly :(
17:19:21Demos[m]huh it looks like getTmpDir may return a dos style filepath
17:19:48Demos[m]yup
17:20:31Demos[m]it just returns $env:TEMP
17:22:49Demos[m]is it reasonable to switch this to GetTempPath from the kernel32
17:24:52FromGitter<zacharycarter> def-: are you around by any chance?
17:26:25*nsf joined #nim
17:31:01*haha_ quit (Quit: haha_)
17:32:17Demos[m]problem: ospaths needs to work in nims
17:38:50YardanicoDemos[m], I don't know about nims, but ospaths works at compile-time
17:39:08Demos[m]yeah that's what I mean
17:39:13Demos[m]so it can't call into the winapi
17:42:34*arnaud2 joined #nim
17:45:11Demos[m]oh JFC is this a special case in windows
17:45:16Demos[m]I think I debutgged this before
17:50:21*nhywyll joined #nim
17:53:35*gokr joined #nim
17:59:01FromGitter<Jipok> hey, can anyone briefly tell about arduino+nim?
17:59:18raussJipok: What about it?
17:59:25FromGitter<Jipok> https://github.com/gokr/ardunimo
17:59:40FromGitter<Jipok> is relevant?
18:00:00gokrI haven't pursued it - but... it worked.
18:00:22raussJipok: Yes. gokr is the best person to ask, as he has done the most (publically) with it. I've tried some of his examples is all
18:00:32gokrrauss: Oh, cool
18:01:07gokrI am actually right now working with LoRaWAN and a bunch of Sodaq ONEs. They have a fairly decent CPU, but haven't had time to try Nim on it.
18:01:13gokrThe ESP32 would be fun though.
18:02:32FromGitter<Jipok> Just this status
18:02:37FromGitter<Jipok> Latest commit 61abf08 on 25 Feb 2016
18:02:51FromGitter<Jipok> I got scared off
18:03:00Yardanicowell if it works - why commit to it ? :)
18:03:15Yardanicomaybe it doesn't work now thought (because some things changed)
18:03:21Yardanicobut it would be easy to fix
18:03:50gokrI just lost the time I had playing with it
18:04:15gokrThe thing is - it works just fine - but it takes time to wrap libraries.
18:04:28gokrOk, gotta go - have to play Zelda with my daughter ;)
18:06:07*haha_ joined #nim
18:11:38*krux02 quit (Remote host closed the connection)
18:14:44*couven92 joined #nim
18:27:27*haha_ quit (Quit: haha_)
18:27:49*Vladar quit (Quit: Leaving)
18:28:29*Jesin quit (Quit: Leaving)
18:37:03*sleepyqt joined #nim
18:41:18*endragor joined #nim
18:42:30*miran joined #nim
18:43:11miranhi guys, new user here (just started couple of hours before, currently comparing some basic examples with pyhon)
18:43:24*dom96|w joined #nim
18:44:00miranis there a way to do what is in python: [True] * 5 ?
18:44:17*haha_ joined #nim
18:44:20*haha_ quit (Client Quit)
18:44:30Demos[m]well you could absolutely define that operator
18:45:02*haha_ joined #nim
18:45:22Demos[m]however cycle in sequtils seems good
18:45:24mirani've done this: newSeq[bool](5), which gives [False] * 5
18:45:38Demos[m]@[true].cycle(5)
18:45:55Demos[m]or true.repeat(5)
18:46:31Yardanicomiran, yeah, Nim's type, almost similar for list is sequence (seq)
18:46:43Yardanicobut seq can hold only elements of one type
18:47:08miranthank you guys, i didn't know about sequtils module
18:47:13Yardanicoand you can define `*` yourself :)
18:47:58mirani'll leave my defining of operators for some other time, when i learn nim basics ;)
18:48:20Yardanicobtw, I started implementing some simplest python functions in nim
18:48:29Demos[m]yeah, defining that just to look like python would probably be confusing anyway
18:48:45Yardanicobut please don't use them unless you REALLY need to (better to use nim's original procs)
18:48:46Yardanicohttps://github.com/Yardanico/nimpylib
18:48:47*dom96|w quit (Ping timeout: 246 seconds)
18:48:50Yardanicojust playing around :)
18:49:13Yardanicopy2.nim isn't mine, it's author is Araq
18:49:54Yardanicopylib currently implements print, input, range, str/int/float/bool type conversion
18:50:04Yardanicobut really don't use it now, better to learn nim first
18:52:39miranspeaking of nim/python: any way to do seq[2..5] = value?
18:54:15miranoh, it can be done with repeat, again
18:57:14*Jesin joined #nim
18:59:17*xet7 joined #nim
19:02:57*hobomatic joined #nim
19:17:21Yardanicohow does bool(5) work in Nim?
19:17:24Yardanicowhere is it defined?
19:18:22*askatasuna quit (Ping timeout: 264 seconds)
19:22:04*vlad1777d_ quit (Remote host closed the connection)
19:23:59*vlad1777d joined #nim
19:26:41*couven92 quit (Ping timeout: 240 seconds)
19:27:58*miran quit (Quit: Leaving)
19:33:18*haha_ quit (Quit: haha_)
19:35:21*arnaud2 quit (Ping timeout: 240 seconds)
19:38:05*vlad1777d quit (Ping timeout: 240 seconds)
19:44:10*arnaud2 joined #nim
19:51:31*vlad1777d joined #nim
19:58:33Demos[m]bool is a type and bool(5) is a cast
19:59:15Demos[m]didn't even know you could do that in python without numpy
20:05:28YardanicoDemos[m], but how it's able to cast 5 to bool enum which has only false = 0, true = 1 values?
20:06:35Demos[m]the size of bool is actually 1 byte
20:08:26*ShalokShalom quit (Remote host closed the connection)
20:10:26Demos[m]huh
20:10:38Demos[m]not sure when it will cast and when it will refuse to do so
20:11:02YardanicoDemos[m], well yeah you're right
20:11:14Yardanicoah
20:11:15Yardanicono
20:11:22Yardanicoecho bool(351125125)
20:11:23Yardanicotrue
20:12:49Demos[m]it seems to die any time I try and do something questionable with that cast
20:13:00Demos[m]and it always dies in the VM
20:17:34*ofelas quit (Quit: shutdown -h now)
20:17:48*Sentreen quit (Ping timeout: 240 seconds)
20:19:22*relax quit (Ping timeout: 260 seconds)
20:19:57*relax joined #nim
20:26:31dom96It must just be treating any non-zero value as true
20:31:07*Sentreen joined #nim
20:42:13*BitPuffin|osx joined #nim
20:46:45*Yardanico quit (Remote host closed the connection)
20:58:31*endragor quit (Remote host closed the connection)
21:06:04*sz0 joined #nim
21:06:12*rauss quit (Quit: WeeChat 1.9)
21:06:40*mahmudov quit (Remote host closed the connection)
21:17:27*gangstacat joined #nim
21:27:54*relax quit (Ping timeout: 252 seconds)
21:29:57hobomaticwhile doing some project euler exercises, I ran into this when messing around with higher order iterators: https://pastebin.com/UbVKFMw9
21:30:18hobomaticnot sure if its a known issue, so i figured I'd ask about it here before making an issue
21:37:10hobomaticmaybe my closure pragmas are doing something spooky? IDK
21:37:54*couven92 joined #nim
21:39:13dom96hobomatic: c code gen errors are always an issue
21:39:16dom96so report it :)
21:39:37hobomaticalrightr
21:40:08*endragor joined #nim
21:44:57*endragor quit (Ping timeout: 252 seconds)
21:51:05*PMunch quit (Quit: leaving)
21:54:12*Jesin quit (Quit: Leaving)
21:54:57*big_num joined #nim
22:18:38*ShalokShalom joined #nim
22:22:50*nsf quit (Quit: WeeChat 1.9)
22:26:03*ShalokShalom quit (Remote host closed the connection)
22:40:16*vlad1777d quit (Remote host closed the connection)
22:40:43TheManiacDoes anyone know if you can use `osproc` to implement something like a shell pipeline?
22:41:46TheManiacstackoverflow suggests I need to copy the output stdout of process 1 to the input stdin of process 2 using C's `dup2`, but is there a way to do it without delving into C?
22:42:07TheManiac(I roughly understand C syntax, but have little to no experience actually using it to do low level stuff like that)
22:42:58*vlad1777d joined #nim
22:44:26TheManiacso would rather stay in nim :)
22:45:38*mahmudov joined #nim
22:46:17dom96well you can always wrap C's `dup2`
22:48:46TheManiacactually, following the code, seems like `posix.nim` has already done that for me
22:56:13*xet7 quit (Quit: Leaving)
22:58:23*couven92 quit (Quit: Client Disconnecting)
23:01:55FromGitter<zacharycarter> I have some questions I think that might be asked about my presentation tomorrow
23:02:02FromGitter<zacharycarter> are database connections in the various db modules pooled?
23:02:18FromGitter<zacharycarter> or are there implementations of connection pools?
23:03:52dom96they aren't AFAIK
23:04:00dom96the db modules are fairly light
23:04:44FromGitter<zacharycarter> thanks
23:05:09FromGitter<zacharycarter> actually I guess that was the only question I had so far
23:11:51*vlad1777d quit (Ping timeout: 252 seconds)
23:18:27*nhywyll quit (Ping timeout: 252 seconds)
23:24:24*vlad1777d joined #nim
23:26:25*BitPuffin|osx quit (Remote host closed the connection)
23:33:24*yglukhov quit (Remote host closed the connection)
23:40:06FromGitter<zacharycarter> how can I dump a variable with the nodejs backend?
23:42:24FromGitter<zacharycarter> nm
23:43:04*jinshil joined #nim
23:47:53FromGitter<zacharycarter> hrm ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=599f65a9ba0f0f6e38dda8e0]
23:48:06FromGitter<zacharycarter> that logs - [Function: Application]
23:48:12FromGitter<zacharycarter> yet I can't invoke koa()
23:56:28*ShalokShalom joined #nim