<< 08-06-2020 >>

00:39:21*rockcavera joined #nim
00:42:05*xet7 joined #nim
01:04:44*chemist69_ joined #nim
01:07:28*chemist69 quit (Ping timeout: 246 seconds)
01:41:57ldleworkAnyone here use "shell" library? It seems it's variable interpolation is broken for shellAssign?
01:52:23FromDiscord<Elegant Beef> How are you using it
02:01:32FromDiscord<Varriount> https://news.ycombinator.com/item?id=23452170
02:01:54*Tlongir joined #nim
02:06:37ldleworkleorize[m]: I'm using argparse, but when I try to access `opts` from a run: block i get, Error: undeclared identifier: 'opts'
02:07:27FromDiscord<Elegant Beef> That qualified identifier conversation is weird
02:10:03*endragor joined #nim
02:12:34FromDiscord<Rika> its the price paid for UFCS to work
02:12:38FromGitter<ynfle> What does `genSym` do? In what way is it unique
02:12:42leorize[m]it's just python people being python people
02:13:07leorize[m]@ynfle it generates a symbol that can only be accessed when you have the node
02:13:09leorize[m]that's why it's unique
02:13:35leorize[m]the actual symbol generated will be `theNameYouUsed`genSym<randomNumberHere>`
02:13:36FromGitter<ynfle> I don't understand
02:13:43leorize[m] * the actual symbol generated will be ```theNameYouUsed`genSym<randomNumberHere>```
02:14:03FromGitter<ynfle> OK
02:14:29leorize[m]since it's impossible to write a symbol like that, it's 100% unique :P
02:14:36FromGitter<ynfle> I didnt see that for `echo treeRepe`
02:14:44FromGitter<ynfle> *Repr
02:14:56leorize[m]it's an implementation detail
02:14:59FromDiscord<Rika> i mean i guess i kinda understand why, i've had uh, one incident where unqualified procs bit me in the ass
02:15:20FromDiscord<Rika> though it was just one incident
02:15:28leorize[m]well in python land they don't have types to save them :P
02:15:45FromDiscord<Rika> and usually if you cant find where the proc's from, then its the issue of the proc's name
02:15:46FromDiscord<Rika> imo
02:16:59leorize[m]in python you can find proc as long as it's not in a class :)
02:17:24*adnan338 joined #nim
02:17:55FromDiscord<Elegant Beef> `a.x` in all our editors will limit to only procs that take in A or fields of A, so there goes 99% of the issue
02:18:06leorize[m]once OOP do the OOP thing of inheritance you lost all track of where procs came from
02:18:08*muffindrake quit (Ping timeout: 260 seconds)
02:18:16FromDiscord<Rika> thats true
02:18:32FromDiscord<Rika> you should prolly post that too 😛
02:18:35FromDiscord<Rika> in the thread
02:18:46leorize[m]it's kinda moot arguing with python people :P
02:18:57leorize[m]just post that blog narimiran wrote regarding imports
02:19:20leorize[m]https://narimiran.github.io/2019/07/01/nim-import.html
02:19:58*muffindrake joined #nim
02:22:13*endragor quit (Remote host closed the connection)
02:23:29FromDiscord<Rika> kinda dont wanna, ive hit my "argumenting" quota for this week\
02:23:38FromDiscord<Rika> ah, its monday, maybe i will
02:23:43*endragor joined #nim
02:23:46*endragor quit (Remote host closed the connection)
02:23:53*endragor joined #nim
02:25:49FromDiscord<Elegant Beef> Im a little disappointed that article doesnt mention that if you like qualified types why dont you do `system.int`
02:27:05leorize[m]because system is that magical module where all builtins are
02:27:23leorize[m]it's the same story on python, only non-builtin need qualifying
02:28:14leorize[m]if there's any regret about Nim using Python-like syntax, is that it causes Python people to think that Nim is Python :P
02:28:35FromDiscord<Elegant Beef> Wait it's not
02:28:53FromDiscord<Elegant Beef> *I've only been writting on the NimVM for that authentic python speped*
02:28:56FromDiscord<Elegant Beef> (edit) 'speped*' => 'speed*'
02:29:17leorize[m]fun fact, as slow as Nim VM is, it's actually faster than python
02:29:30FromDiscord<Rika> what
02:29:31FromDiscord<Elegant Beef> lol
02:29:33FromDiscord<Rika> lmao
02:29:35leorize[m]though the benchmark result is old and I'm not sure if that's still the case
02:29:59FromDiscord<Elegant Beef> If that's still true, that's comical
02:30:03*kenran joined #nim
02:31:42FromDiscord<Rika> Well the nim vm is still more limited than the python vm isn't it
02:32:00leorize[m]yea it can't do FFI by default
02:34:48*kenran quit (Ping timeout: 256 seconds)
02:37:26ldleworkWell the warnings on nimsuggest-mode were not kidding. It locks up emacs. :(
02:40:37disruptekldlework: nimph has lockfiles, if you really want them. you don't.
02:40:50ldleworklol
02:55:28shashlickIdlework: you can always download your deps in any way you prefer - either put them in a nimble compatible directory structure and use --nimblePath or just --path for each dep
02:55:33shashlickUse a cfg file
02:55:49shashlickSubmodules
03:01:01leorize[m]ldlework: go to the dark side, use neovim, we got better plugins here
03:02:19sendellhttps://play.nim-lang.org/#ix=2oAa isn't this a bit inconsistent ? would never have predicted this it
03:02:27ldleworkshashlick: if nim doesn't grow a lockfile for its package manager it will probably never get proper support in nix/guix
03:03:16sendell(btw just discovered nim playground, it's great <3)
03:03:21FromDiscord<Rika> sendell what's not consistent?
03:03:42sendelldestructor insertions
03:03:50shashlickperhaps, I dabbled with it a bit but am not motivated to work on it
03:04:32sendelli don't get why c2 is destructed twice at the end for example
03:04:51sendelland i guess the " is gone" is because of a move somewhere
03:06:07sendell<sendell "i don't get why c2 is destructed"> any idea about that ?
03:06:14leorize[m]it's simple
03:06:45leorize[m]https://play.nim-lang.org/#ix=2oAc
03:06:51leorize[m]works better when you give them proper names
03:07:32sendellhaha yeah nice idea
03:08:06sendellhmm yeah now i get it
03:08:35FromDiscord<Rika> It's the gc
03:08:38sendellwhat i wasnt aware of is that a variable inside the for loop is not reset between each iteration
03:08:48FromDiscord<Rika> Arc isn't default yet
03:09:06leorize[m]well why do you need to reset it when the next iteration will replace it? :)
03:09:14leorize[m]also reset is simply `=destroy` it
03:09:41leorize[m]so instead of `=destroy` happening early it happens when the variable value is replaced
03:09:56leorize[m]@Rika destructors is independant of ARc
03:09:57leorize[m]ARC*
03:10:17sendellyeah makes sense, but it's different from how cpp works for example
03:10:21FromDiscord<Rika> Leorize: I'm trying to explain the order
03:10:57leorize[m]sendell: yea we do it a bit lazier
03:11:09sendellwith arc it's the same
03:11:23leorize[m]on the grounds that it might be more beneficial to expand the lifetime by a bit
03:11:38leorize[m]however we might end up using local destructions again due to performance reasons
03:12:08sendellthe huge difference it makes is that the user cannot rely on construction/destruction pairs for logic
03:12:15leorize[m]@Rika huh?
03:12:30leorize[m]this is a stack object, not a ref
03:12:41FromDiscord<Rika> Forgot about that
03:12:44sendellyeah so no GC
03:12:46sendellmakes sense
03:13:26leorize[m]sendell: if you abuse construction/destruction for logic it's a bit concerning :P
03:13:39sendelllike in CPP i could do a Chrono object (explaining the name in the example hehe) that would take a timestamp when constructed, and another one when destructed, and report it to some performance logger
03:13:53sendelland that's a simple way to benchmark code sections
03:14:04leorize[m]in here you just take a template to do that :P
03:14:28sendellyeah I guess ^^
03:14:43sendellthen here destuctors is a bit "under the hood" for the user
03:15:23leorize[m]yea, it's more about resource management
03:15:25disruptekfeature.
03:15:30leorize[m]we do have `defer` if you like scopes
03:15:38disruptekplease no.
03:15:42sendelltrue, forgot about that
03:16:09sendellactually i'm just playing with the destructor, moves, etc
03:16:19sendellto get a feel of what it does
03:16:20*rockcavera quit (Remote host closed the connection)
03:33:29sendell<leorize[m] "in here you just take a template"> is there already a lib for quick scope profiling like that ? :)
03:33:49leorize[m]ping disruptek
03:34:06disruptekhttps://github.com/disruptek/criterion
03:34:36sendellty
03:35:44sendelloh yeah i think I tried it already and it doesnt work because this machine is windows, and choosenim installs only 32bit nim on windows, which is not supported -_-
03:36:05disruptektoo bad it's so hard to compile nim on windows.
03:36:56sendelli should get a look into WSL someday
03:36:58*junland quit (Quit: %ZNC Disconnected%)
03:37:46*junland joined #nim
03:50:09FromDiscord<InventorMatt> WSL is actually pretty good. especially with some of the recent upates
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:38*supakeen joined #nim
04:15:14*arty quit (Read error: Connection reset by peer)
04:19:17*Guest4954 quit (Ping timeout: 265 seconds)
04:21:20FromDiscord<Zed> would nim work on windows with the linux subsystem?
04:21:31FromDiscord<Zed> use the linux version?
04:22:21sendelljust tried it, seems to work very nice
04:22:50sendellinstalled ubuntu into wsl, choosenim, nim, vscode pluggin for wsl
04:22:53sendelland it just works
04:23:03sendelli now have 64bit linux nim on my windows :D
04:23:09FromDiscord<Zed> yay
04:23:25FromDiscord<Zed> We should probably put that in the installation guide somewhere
04:23:29sendellnext step replace ubuntu with manjaro (if possible)
04:24:11sendell<sendell "installed ubuntu into wsl, choos"> oh gcc also, using apt
04:24:37sendell<FromDiscord "<Zed> We should probably put tha"> yeah nice idea
04:33:33*aeverr quit (Ping timeout: 246 seconds)
04:35:28*aeverr joined #nim
04:53:24*B4s1l3 joined #nim
04:53:31leorize[m]you can use nim on windows as usual
04:53:31*B4s1l3 is now known as opDispatch
04:53:34leorize[m]like it's a supported config...
04:54:17leorize[m]disruptek: you might want to make criterion uses `std / monotimes`
05:02:55*lritter joined #nim
05:03:07sendellfor some reason my windows builds are a lot faster than the WSL ones, and my test shouldnt be IO-bound
05:03:20*opDispatch quit (Quit: Konversation terminated!)
05:12:07bunghow to do `true_w[0] * features[_,0] + true_w[1] * features[_,1] +. true_b ` with arraymancer , a one layer network
05:12:11sendellnevermind it was windows power management not giving as much power to WSL than it does to its native processes. If i switch my cpu to "speedshift-mode" instead of old "Pstates-modes" (so basically taking the power management out of the hands of windows and giving it to the CPU itself) i get the same performances which is pretty cool :)
05:12:39*endragor quit (Remote host closed the connection)
05:13:02bungI dont know where to put weights,and bais
05:34:51*waleee-cl quit (Quit: Connection closed for inactivity)
05:38:06*narimiran joined #nim
05:48:59*kenran joined #nim
05:52:30*solitudesf- joined #nim
06:10:43*endragor joined #nim
06:18:30*aeverr quit (Remote host closed the connection)
06:18:58*aeverr joined #nim
06:53:42*PMunch joined #nim
07:07:46*dddddd quit (Ping timeout: 260 seconds)
07:08:05*narimiran quit (Read error: Connection reset by peer)
07:08:12*narimiran_ joined #nim
07:14:48*narimiran_ is now known as narimiran
07:16:03bungcan compiler move my inner variable to outter scope in a loop ?
07:19:59*aeverr quit (Remote host closed the connection)
07:20:08PMunchNot quite sure what you mean bung
07:20:22narimiranbung: no. define it outside
07:20:24*aeverr joined #nim
07:20:44narimiranPMunch: `for i in 0..n: ...`, and then use `i` after the loop
07:20:55bungeg I have iterator define many varibale call in loop
07:21:41bungI dont wanna move outside for maintance. so I wonder if compiler can do it for me
07:22:28PMunchnarimiran, that just gives me ActionScript PTSD flashbacks..
07:23:29*fredrikhr joined #nim
07:25:36bungok,I got it.
07:25:50supakeenPMunch: It does 'kind of' make sense if you want to see how far along you got before exiting the loop :)
07:26:21PMunchYes, but it should be explicit.. In ActionScript every iteration variable is in the main scope
07:26:50supakeenOf course, I thought bung meant to ask how to do that :)
07:27:03supakeenBut I also see it was answered -> more coffee.
07:27:17PMunchYeah that is something that's a bit annoying isn't possible
07:27:32narimiran`var i = 0; while i < n: ....; echo i`
07:27:46PMunchYeah, but that's a full refactor
07:28:34PMunch`for i in 0..10: <block>` becomes `var i = 0; while i <= 10: <block>; inc i`
07:36:05*B4s1l3 joined #nim
07:36:56*B4s1l3 is now known as opDispatch
07:42:10*Vladar joined #nim
08:01:23*adnan338 quit (Ping timeout: 272 seconds)
08:30:40*abm joined #nim
08:37:22Araqbung, simple for loop variables are optimized into oblivion, don't worry
08:39:50bungit's a iterator calls inside of for loop, I may just move it to global scope , make it simpler.
08:43:05*letto quit (Quit: Konversation terminated!)
08:45:32*letto joined #nim
08:58:52*adnan338 joined #nim
09:08:42*NimBot joined #nim
09:19:22*abm quit (Ping timeout: 260 seconds)
09:19:28*robotme joined #nim
09:21:04*opal quit (Remote host closed the connection)
09:22:50*opal joined #nim
09:26:34*robotme quit (Quit: robotme)
09:27:02*robotme joined #nim
09:37:05*Tongir joined #nim
09:37:59*Senny joined #nim
09:39:49*Tlongir quit (Ping timeout: 264 seconds)
09:40:49*chemist69_ quit (Ping timeout: 272 seconds)
09:41:12*chemist69 joined #nim
09:49:50Zevvhmz, I can have different AST representations of the same code which mean and do the same thing
09:50:04Zevvbut it's hard to write unit tests if I want to say "I got this macro, I throw in this and expect that"
09:50:12Zevvis there some way to "normalize" NimNode AST?
09:51:30Zevveven if I compare the 'repr' there might be difference like additional newlines
09:52:09Zevvfor example, I now got http://ix.io/2oB1 vs http://ix.io/2oB2
09:52:13PMunchHmm, that is a good question and something I have been wondering myself..
09:52:54Araqa pointless nnkStmtList isn't well
09:52:55PMunchUhm B1 is invalid isn't it?
09:53:23Araqit doesn't matter all that much but there is no notion of a "canon" AST
09:53:34Araqsee also '(x)' vs 'x'
09:53:35Zevvno, but it is a PITA for testing
09:54:07Araqwhy? either the test case has the stmtlist or it lacks it
09:56:21ZevvI have this little macro, taking two blocks. On of some Nim going in, and the other some Nim I expect to come out
09:56:30ZevvThe Nim coming out is not "wrong", but it is slightly different
09:56:39Zevvso no I have to jump through hoops to make it exactly the same
10:09:29PMunchExactly, if you compare against another block then you have to make sure your macro outputs the exact same as Nim macros read in as blocks.
10:18:15Araqwe could offer a macros.closeEnough(a, b) for tests
10:24:58Zevvhaha
10:25:09Zevvand then a closeEnough factor, float 0.0..1.0
10:26:28bung`execCmdEx` can I get output with styled ? or should I use another proc
10:27:59PMunchbung, define styled
10:28:05PMunchLike with colour codes and such?
10:28:33PMunchMany programs will strip those when it detects that the output is not a human-observed terminal, but typically have a switch to force it back on.
10:29:00PMunchE.g. the Nim `--colors:on` switch
10:29:56bunglet (output,exitCode) = execCmdEx("nim " & "check " & file)
10:29:59bungstdout.write(output)
10:30:03Yardanicoyes
10:30:09Yardaniconim won't output colors in this case
10:30:18Yardanicoi think
10:31:04bungthere's two problem, one I need styled output, two, I need turn hint:off
10:31:17Yardanicothen just pass --hints:off
10:31:21*oddp joined #nim
10:31:27Yardanicoand for colored as PMunch said just add "--colors:on"
10:32:53bungwow , works, pretty well , thanks!
10:36:36*neceve_ joined #nim
10:37:15PMunchSame trick I used in nimcr and the playground
10:37:31PMunchNeither of those would show coloured output without --colors:on
10:39:43bungit detect istty ?
10:45:49*Trustable joined #nim
10:52:45PMunchSomething like that at east
10:52:47PMunchlesat*
11:08:41Yardanico:D
11:14:06FromDiscord<Synth> Does someone know how to use a dll file compiled from nim via: `nim c --app:lib file-name.nim` and use it in my main nim file?
11:14:16FromDiscord<Synth> Please ping me when someone is able to assist me
11:14:31Yardanicoyes
11:14:34Yardanicoyou need to use FFI
11:14:45FromDiscord<Synth> FFI?
11:14:50Yardanicowell you can actually use normal nim types if you're 100% sure the versions will match
11:15:01Yardanicojust define your procedures and {.exportc, dynlib.} in the library
11:15:18Yardanicoand then in the main file define same proc headers with {.importc, dynlib: mydynlibName.}
11:15:26Yardanicoalso you might want to use nimrtl
11:16:04FromDiscord<Synth> sent a code paste, see http://ix.io/2oBp
11:16:23Yardanico{.exportc, dynlib.} in the lib
11:16:29Yardanicofor the proc definition
11:16:33FromDiscord<Synth> sent a code paste, see http://ix.io/2oBq
11:16:55Yardanicoand then in your main file
11:16:55Yardanico"proc test {.importc, dynlib: "mylib.so".}"
11:16:56FromDiscord<Zed> other side i think
11:17:04Yardanico@Zed nah
11:17:15FromDiscord<Synth> Oh okay, thank you!
11:18:33FromDiscord<Zed> Thanks for correcting me Yardinco
11:19:28FromDiscord<Zed> quick question
11:19:33FromDiscord<Synth> I couldn't load `libtest.so`
11:19:35FromDiscord<Synth> Hmm...
11:19:50Yardanicoin linux lib search path doesn't include current folder by default
11:19:58FromDiscord<Synth> Ahh okay
11:19:59Yardanicoalso how did you compile?
11:20:11FromDiscord<Synth> I did: `nim c --app:lib test.nim`
11:20:47FromDiscord<Zed> if i have a function that i seperate into multiple threads and have an array outside of said threads can i still access the values in that array?
11:21:00Yardanicowith arc - yes, but you would need locks anyway
11:21:09Yardanicowith default GC - no, you can pass raw pointers though
11:21:25Yardanicoand need to use locks anyway
11:22:13FromDiscord<Zed> if each thread edits a different section of the array(all within bounds) im not going to get any sort of corruption am i?
11:22:39Yardanicoyou might try using expiremntal "parallel" then
11:22:40FromDiscord<Synth> sent a code paste, see http://ix.io/2oBs
11:22:50Yardanico@Synth what OS are you on?
11:22:54FromDiscord<Synth> Arch
11:23:08FromDiscord<Zed> `i use arch btw`
11:23:12FromDiscord<Synth> *facepam*
11:23:16FromDiscord<Zed> lol
11:23:16FromDiscord<Synth> (edit) '*facepam*' => '*facepalm*'
11:23:42*xet7 quit (Quit: Leaving)
11:25:01*xet7 joined #nim
11:26:23FromDiscord<Yardanico> sent a code paste, see http://ix.io/2oBu
11:26:25FromDiscord<Synth> I fixed it!
11:26:34FromDiscord<Yardanico> sent a code paste, see http://ix.io/2oBv
11:26:49FromDiscord<Synth> I had to change this: `proc test() {.importc, dynlib: "libtest.so".}`↵Into: `proc test() {.importc, dynlib: "./libtest.so".}`
11:26:51FromDiscord<Yardanico> for more complex things (assuming you don't need threads) it would be good to also use nimrtl
11:27:25FromDiscord<Yardanico> and for GC'd types you would still need to GC_ref and GC_unref in the library
11:27:31FromDiscord<Yardanico> and call destroy or something like that from the main file
11:27:43FromDiscord<Yardanico> since GC's in the library and in the main file will be separated
11:27:46FromDiscord<Yardanico> (edit) 'separated' => 'separate'
11:30:08FromDiscord<Synth> Thank you!
11:32:13*rockcavera joined #nim
11:40:50*robotme quit (Quit: robotme)
11:47:26*sacredfrog joined #nim
11:50:39*Senny quit (Ping timeout: 272 seconds)
11:56:50bunghow can I write multilines string to a file in .nimble ?
11:57:35bungI tried using shell package not worked out
11:58:54Yardanico??
11:59:03Yardanicojust either add \n\n or use multiline strings
11:59:08YardanicoI mean \n for newline
11:59:11Yardanico\n\n is two newlines for example
11:59:28bungdont know why it writes nothing
11:59:39bunglet me try just exec
11:59:44Yardanicoexec?
12:01:02bungyeah I change to `cat << EOT >> .git/hooks/pre-commit`
12:01:34*Vladar quit (Quit: Leaving)
12:01:43Yardanicoehm
12:02:18Yardanicowhy not just use writeFIle ?
12:02:21YardanicowrilteFile *
12:02:33Yardanicoit works in the VM (=> works in nimscript)
12:03:18livcdmratsim: are you really building a desktop client in QT and Nim?
12:03:58bungI cant find it from docs
12:04:25bunghttps://nim-lang.org/docs/nims.html
12:04:31Yardanicowhat docs?
12:04:34Yardanicoit's in the system module
12:04:35bungor https://nim-lang.org/docs/nimscript.html
12:04:41Yardanicoalmost all procs from the system module are available in the VM
12:05:02Yardanicohttps://nim-lang.org/docs/io.html#writeFile%2Cstring%2Cstring
12:05:09Yardanico(io is imported from system module)
12:05:33bungok , I should notive first line of io module `This is a part of system.nim, you should not manually import it.`
12:05:38Yardanicoyes
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:22narimirannew (guest) blogpost is out: https://nim-lang.org/blog/2020/06/08/static-analysis.html
12:06:42*supakeen joined #nim
12:14:21FromDiscord<exelotl> Hey I don't think the first example is correct, you can't assign to `i` because its a `let` variable
12:17:44narimiranthat should be a pseudocode, but you're right, i'll change it
12:18:06narimiranit looks too close to nim ;) :)
12:18:22FromDiscord<exelotl> (I statically analyzed the program with my cranium)
12:18:28narimirani guess `func someSieve(const num: uint64): bool` should be changed too
12:33:08bungI wrote a simple tool work with git hooks https://github.com/bung87/stage/blob/master/src/stage.nim
12:38:03alehander92i think
12:38:25FromDiscord<Zed> Yardinco, did you ever get the nim colour pr changed on github?
12:38:26alehander92that moerm's post is pretty god
12:38:37alehander92that moerm's post is pretty good
12:39:04alehander92but usually maybe such strict validation works best in libs
12:39:31alehander92because its harder to motivate someone to do all this effort for a lot of the end app code
12:39:55alehander92on the other hand lib code is supposed to be very robust and used by many people, so it seems easier to accept some more work
12:40:07Araqon the contrary, it's mostly application specific
12:40:28alehander92yeah, i get what you mean
12:40:36Araqthere are domains where verification is required by law.
12:40:38*silvernode quit (Ping timeout: 256 seconds)
12:40:40Yardanico@Zed it got merged and then reverted because another language (Dafny) got a very similar colour before us, and then some people said that they're too used to the current green so idk, see http://forum.nim-lang.org/t/6350
12:41:05alehander92but i am talking about normal apps/projects
12:41:23alehander92mainstream stuff like cli tools etc, not really airplanes
12:41:52Araqyeah I wonder why. it's almost somebody out there understands cost-benefit analysis
12:41:55alehander92e.g. i expect the nim stdlib or some useful libs to easily add require/ensure
12:42:17alehander92but the whole point is that if the cost for z3-like stuff decreases
12:42:36alehander92the analysis changes
12:42:46*abm joined #nim
12:43:48alehander92anyway, that's ok, my point was that i expect libs to be the obvious example of more "ergonomic" usage or even inferrence of invariant properties
12:44:54FromDiscord<Zed> Yardinco: That's a bummer, Personally i think we should go for a bright colour(purple, cyan) make the language standout
12:45:32Araqalehander92, drnim's development is paused though, too many arc bugs left to fix
12:45:51alehander92but i think require inference and stuff like this
12:45:58FromDiscord<Zed> > Definition of Nimrod. 1 : a descendant of Ham represented in Genesis as a mighty hunter and a king of Shinar
12:46:05FromDiscord<Zed> i gues we could have a ham colour
12:46:09FromDiscord<Zed> *guess
12:46:11Araqin theory drnim would help us with arc bugs too ofc. in practice I have no clue how to write the invariants
12:46:29Araqand once I can do that, Z3's separation logic might not be up for the task :P
12:46:35alehander92would be cool: some cases can be at least hinted and left to the user to refine
12:46:54alehander92ah, maybe
12:56:41*kungtotte quit (Read error: Connection reset by peer)
12:56:46PMunch@Zed, what colour even is "Ham colour"
12:57:35*solitudesf- quit (Remote host closed the connection)
12:57:39*kungtotte joined #nim
12:58:01*solitudesf- joined #nim
13:09:11Yardanico@Zed ^ :P
13:09:49Araqrose, what else
13:12:38*Vladar joined #nim
13:13:01*dddddd joined #nim
13:26:05*solitudesf- quit (Remote host closed the connection)
13:26:30*solitudesf- joined #nim
13:30:26federico3https://news.ycombinator.com/item?id=23452170
13:31:09FromDiscord<Zed> The colour of ham.
13:34:03PMunch@Zed, yes, but which of them: https://www.123rf.com/photo_17217277_a-background-of-sliced-parma-ham-colour-palette-with-complimentary-colour-swatches.html
13:34:23*opal quit (Ping timeout: 240 seconds)
13:34:32Yardanicofederico3: nothing changes, people complaining about unqualified imports again :P
13:35:06Yardanicoalso all-caps NIM again
13:35:07FromDiscord<Zed> The 3rd or 4th swatch
13:35:34FromDiscord<Zed> PMunch:^
13:38:51adnan338When I create a type which is a ref object, if I pass an instance of that type, is this not a ref already? If so, why can't I use isNil() on it?
13:38:57federico3Yardanico: the thread is missing the usual uninformed whining on style insensivity
13:39:08Yardanicoadnan338: it is a ref
13:39:12Yardanicoshow the code :)
13:40:07PMunchfederico3, that is true
13:40:46adnan338Yardanico https://play.nim-lang.org/#ix=2oCh
13:41:02Yardanicoadnan338: why do you have "ref Tree[Node]" as left and right?
13:41:08Yardanicodo you really want a double reference?
13:42:07adnan338no, sorry. I think I got confused by the errors
13:42:11Yardanicohttps://play.nim-lang.org/#ix=2oCi strip the unneccesary `ref` attributes but this code is a bit incorrect
13:42:21Yardanicoyou need to add checks to check if left/right are nil
13:46:21adnan338Yardanico thank you. Just another question, do I need to construct the tree with new(tree) there?
13:47:43Yardanicoadnan338: no
13:47:53Yardanicoobject construction syntax automatically creates a new instance if it's a ref type
13:48:07*drewr quit (Quit: brb)
13:48:18*opal joined #nim
13:49:08*drewr joined #nim
13:52:39FromDiscord<willyboar> You make me hungry with all this ham
14:00:27disruptekzevv: just run both pieces of ast through the same washing machine; parse statement or something.
14:01:59disruptekleorize[m]: criterion monotimes? i don't care. prs accepted.
14:15:38FromDiscord<Technisha Circuit> Is it possible to use a Golang library in Nim? Just curious
14:15:48Yardanicowell, first of all - Go has FFI
14:15:56Yardanicoso you can export C functions from Go and use them in nim
14:16:00Yardanicosecond alternative - try using gccgo
14:16:05FromDiscord<Technisha Circuit> Oh?
14:16:10Yardaniconim also has go gc support from that, but idk how it works rn
14:16:18FromDiscord<Technisha Circuit> Oh nice
14:16:43Yardanicowhy do you ask though? :D you ask about nodejs, then go :P
14:16:58FromDiscord<Rika> hes multilingual
14:20:31FromDiscord<Technisha Circuit> ^^
14:20:46FromDiscord<Technisha Circuit> I tried learning a bit of Go before Nim
14:20:57Yardanicowhat's there to learn
14:21:01Yardanicoit's too simple :P
14:21:05FromDiscord<Technisha Circuit> And besides Python, Nim is pretty much the only language that I've stuck with
14:21:18FromDiscord<Technisha Circuit> I hate the syntax of go 😅
14:22:29FromDiscord<Rika> but it has braces!
14:22:47FromDiscord<Technisha Circuit> That's the only thing i like about it
14:22:55FromDiscord<Rika> holy shit lmao
14:23:06FromDiscord<Technisha Circuit> I'm going to figure out a way to use braces in Nim anyway so eh
14:23:09bungI dislike language using too much punctuations
14:23:23FromDiscord<Technisha Circuit> :p
14:23:51FromDiscord<Technisha Circuit> :GWowoHehe:
14:27:18FromDiscord<Technisha Circuit> What language has the "best" gc, "best" being your definition of best
14:27:40FromDiscord<Rika> :nim: xd
14:27:59FromDiscord<Technisha Circuit> Lmao
14:28:02Yardaniconim
14:28:13FromDiscord<Technisha Circuit> Why is that?
14:28:22Yardanicowhy do i have to answer?
14:28:28Yardanicoyou said "being your definition of best"
14:28:35Yardanicoin my definition of "best" nim is the best
14:28:39Yardanicoin that regard
14:31:30FromDiscord<Technisha Circuit> You don't have to answer, I'm just curious :P
14:31:56FromDiscord<willyboar> Please vote: https://github.com/FedericoCeratto/nim-package-directory/pull/28
14:31:57disbotUnfinished Business
14:36:29*endragor quit (Remote host closed the connection)
14:36:56*endragor joined #nim
14:40:45*endragor quit (Remote host closed the connection)
14:40:55*endragor joined #nim
14:45:29FromDiscord<Kiloneie> Unix timestamps are the ones used on Linux distros ?
14:48:41FromDiscord<Technisha Circuit> I think it's used everywhere for alot of things, not just Linux or Unix based OSes
14:49:40FromDiscord<Rika> theyre used in many places
14:52:24*abm quit (Quit: Leaving)
15:02:46*Senny joined #nim
15:03:01*salewski joined #nim
15:04:57*waleee-cl joined #nim
15:04:58salewskiI have still no idea what happened with the len() proc in https://github.com/nim-lang/Nim/issues/14605
15:05:01disbotMacro getImpl() issue for not unique symbols ; snippet at 12https://play.nim-lang.org/#ix=2oCN
15:05:41salewskiIt may be related with symbol binding, but is there no chance to get the impl of the local len proc?
15:06:32salewskiFor the sin() procs echo p[0].getImpl().toStrLit seems to work at least.
15:07:03Araqyou macro needs to handle nkSymChoice
15:07:09salewskiBut len() seems to be bound by system module already.
15:08:03salewskiIs there an example for nkSymChoice somewhere?
15:09:42Araqnever mind, it's a bug
15:09:54Araqcannot get it to produce a sym choice either
15:10:07salewskiOK, fine.
15:10:16*kenran quit (Ping timeout: 246 seconds)
15:10:39salewskiBye.
15:10:42*salewski quit (Quit: WeeChat 2.7.1)
15:13:18*nsf joined #nim
15:25:08FromDiscord<Firefell> > Please vote: https://github.com/FedericoCeratto/nim-package-directory/pull/28↵@willyboar Great job. 👍
15:25:09disbotUnfinished Business
15:36:26FromDiscord<él liquido> is there any way to inject an identifier to a doc comment generated from a template?
15:37:08disruptekdoubtful.
15:37:10*bung quit (Quit: Lost terminal)
15:42:47FromDiscord<Shucks> any way to cast an `array[0..2, int]` to an `array[0..2, float]` for example?
15:44:10disrupteksure.
15:44:47*PMunch quit (Quit: leaving)
15:46:12*Senny quit (Ping timeout: 256 seconds)
15:50:19*tane joined #nim
15:51:53*robotme joined #nim
15:52:24FromDiscord<Rika> more of a convert than a cast
16:06:40shashlickthe person who took over Nim docset generation deleted all my work
16:06:51shashlicknow their repo that does the generation is also 404
16:07:34shashlickI don't know if 404 = deleted or private account - https://github.com/schmidh
16:13:52disruptekwait, what?
16:14:34shashlickhe took over docset gen = good then deleted his script = bad
16:14:41FromDiscord<willyboar> It would be nice to have a tool where you put repos of your interest and forks it everyday automaticaly. In a mirror account.
16:15:33disruptekwhy don't you have the work?
16:16:05shashlickits in git history
16:16:15shashlickhttps://github.com/Kapeli/Dash-User-Contributions/commit/1c81b9ceff3c87aa6771857ceafb41d654d4344b
16:16:21shashlickhis commit was to delete all the stuff I did
16:16:31shashlickanyway, that's not important
16:16:55disruptekthat's the first thing i do when i fork your projects.
16:17:11shashlicki'm just debating whether I care enough to continue generating these or ignore
16:17:26disruptekare we talking about `nim doc` output?
16:17:54disruptekoh, we're talking about `dash` assets?
16:18:00disruptekfor the osx doc reader?
16:18:04shashlickya
16:18:10shashlickzeal for windows also works for it
16:18:13shashlickmany other readers
16:18:17disrupteksorry, i was super confused.
16:19:10shashlickhttp://devdocs.io still shows 0.19.0 - brilliant man
16:19:49FromDiscord<Kiloneie> Does anyone have any ideas for part 2 of my module Times video ? My current first part video only uses a single procedure from the Times module... i thought the little, time it took/benchmark program would be a good example, but i ended showing almost nothing of the module... What do you wanna see ?
16:20:17shashlick@kaushalmodi tried PRing 1.2.0 - https://github.com/freeCodeCamp/devdocs/pull/1218
16:20:18disbotUpdate Nim docs to v1.2.0
16:36:31*aenesidemus joined #nim
16:43:49FromDiscord<djazz> @Kiloneie maybe something that shows current date and time, or something that shows for much time has passed since a timestamp
16:44:00FromDiscord<djazz> how much time*
16:44:36FromDiscord<djazz> like how long ago was X file modified in minutes/hours/days
16:44:47FromDiscord<djazz> maybe to advanced for your series, idk
16:44:53FromDiscord<djazz> too*
16:45:09disruptekinterval versus duration, datetime versus time.
16:45:22FromDiscord<djazz> yeah
16:45:28disruptekepochTime versus cpuTime
16:45:29FromDiscord<Technisha Circuit> Is it faster if i compile the json module into a .so file then use dynlib to import it, is it faster?
16:45:29FromDiscord<djazz> datetime and time difference
16:45:30FromDiscord<Kiloneie> hmm, that is a good one actually, i will try to do it tomorrow, i switched to Iterators topic for today because i got lost in Times module
16:45:43FromDiscord<Rika> @Technisha Circuit faster to WHAT
16:46:09FromDiscord<Technisha Circuit> Compile time
16:46:23FromDiscord<Technisha Circuit> Probably would be a good idea to mention that 😅
16:46:28FromDiscord<Rika> youll be sacrificing runtime i assume
16:46:30disruptekwho gives a shit?
16:46:35FromDiscord<Technisha Circuit> Hm
16:48:36FromDiscord<Kiloneie> When is compile time speed even important ?
16:48:56FromDiscord<Rika> when its as bad as rusts
16:49:41FromDiscord<Kiloneie> How bad is Rust's compile time ?
16:49:53FromDiscord<Kiloneie> compared to Nim's let's say
16:49:57FromDiscord<Rika> pretty damn bad afaik
16:50:11FromDiscord<Kiloneie> got an example ?
16:50:11FromDiscord<Rika> rivals c++ i hear
16:50:16FromDiscord<Rika> but i dont know
16:50:30disruptekjust try to build the rust compiler.
16:50:53FromDiscord<Kiloneie> xD, Nim da king 😛
16:51:04FromDiscord<Rika> well nim doesnt do checks like rust does
16:51:14FromDiscord<Rika> then again, nim also doesnt use llvm like rust does
16:53:33FromDiscord<Kiloneie> I do wonder when Nim's popularity will finally take off. It's going up, but umm not exactly at the speed anyone here likes.
16:53:58aenesidemusanyone have the discord link? i just joined the irc and prefer discord
16:54:04FromDiscord<Rika> when a large corporate backer comes
16:54:24FromDiscord<Rika> just copied one, ill send it in privms
16:54:38livcdWell using wNim will definitely increase your compile times and it's noticeable
16:56:10FromDiscord<Kiloneie> Hmm yes, i believe if i were to make a very nice and interesting video series in making games/small engine??? it could spike it. Who doesn't love games ?
16:56:29shashlickmeh, cannot update old forum posts
16:56:31shashlickarchived
16:56:35FromDiscord<Isomorpheus> what are yall using to mirror from irc <-> discord? ive never seen a server actually do this successfully
16:56:46FromDiscord<Rika> Yardanico's bot
16:57:06FromDiscord<Rika> it was made to improve on the old bridge
16:57:13FromDiscord<Rika> also uses nim lol
16:57:22FromDiscord<Rika> also weeb detected
16:57:30FromDiscord<Isomorpheus> no im a poser
16:57:39FromDiscord<Isomorpheus> also what shows up if you use unsupported irc content
16:57:43FromDiscord<Rika> like?
16:57:51FromDiscord<Rika> i can try sending it lol
16:57:53FromDiscord<Isomorpheus> test https://media.discordapp.net/attachments/371759389889003532/719596060775022662/Nim-logo.png
16:57:58aeverrit shows a link
16:58:00FromDiscord<Isomorpheus> oh just the ilnk
16:58:03FromDiscord<Rika> yeah
16:58:20aeverrACTIONs arent handled too well tho
16:58:33*aeverr is testing out an action
16:58:52aeverroh lmao yardanico you just naiively strip out "ACTION" from the message?
16:59:43aeverrafaik irc uses \x01ACTION (the message)\x01 to indicate that its an action so maybe just do that instead of removing the word itself
17:04:26FromDiscord<djazz> what is the best way to check if a string has contents in an if-statement? `if len(mystring) != 0:` gets a bit much if i have to do it a lot
17:04:35FromDiscord<Rika> imo its that
17:04:46FromDiscord<Rika> youu can always do mystring.len instead
17:04:59FromDiscord<Rika> faster to type since you dont need to move back to the start of the word
17:05:08FromDiscord<djazz> hm
17:07:12*kenran joined #nim
17:14:16*kenran quit (Ping timeout: 256 seconds)
17:26:59disruptekirc has a special message type for actions.
17:29:21*leaveabug joined #nim
17:31:09leaveabugwhen I try to install package strfmt I get an Error: 'hg' not in path. What can I do
17:31:43FromDiscord<Synth> sent a code paste, see http://ix.io/2oE1
17:33:44Yardanicoleaveabug: install mercurial
17:33:52Yardanicostrfmt is on bitbucket
17:33:56Yardanicoand why would you want it anywY?
17:33:58Yardanico*anyway
17:34:01Yardanicostrformat is better
17:34:33FromDiscord<Rika> @Synth strm.writeLine($room)
17:34:47FromDiscord<Rika> i assume
17:34:54Yardanico@Synth I think in this case you have to create a JsonNode yourself
17:35:06YardanicoI don't think " %* { guild_id: { channel_id: room_number }}" will do what you want
17:35:27leaveabugtrying to build an old project that seems to use it.
17:35:29Yardanicoor wait
17:35:40Yardanico@Synth can you show the JSON you want to get?
17:35:43FromDiscord<Rika> im not sure anymore why that doesnt work
17:36:10Yardanicoaaaaaaaaaaaa yet another c compiler error with same inline iterators with regex and glob
17:36:16Yardanicowill try to minimize again
17:36:55Yardanicohttps://github.com/nim-lang/Nim/issues/14251 was my attempt at reproducing (it didn't compile too), it got fixed but the issue with glob + regex is still there :D
17:36:57disbot[ARC] Undeclared variable in C with inline pragma and iterators ; snippet at 12https://play.nim-lang.org/#ix=2l7S
17:40:01FromDiscord<Synth> > @Synth strm.writeLine($room)↵@Rika That didn't work
17:40:13FromDiscord<Rika> yeah
17:40:16FromDiscord<Rika> i quickly realized
17:40:26FromDiscord<Rika> so uh can we see more cod
17:40:27FromDiscord<Rika> e
17:40:40FromDiscord<Rika> like how you are calling this proc
17:40:50FromDiscord<Synth> > @Synth can you show the JSON you want to get?↵@Yardanico[IRC]#0000 I want to get: `{ "guild_id": { "channel_id": 1 }}`
17:40:59Yardanicoumm
17:41:05FromDiscord<Synth> (edit) 'get?↵@Yardanico[IRC]#0000 I' => 'get?↵I'
17:41:12FromDiscord<Rika> can we see the value of guild_id
17:41:15FromDiscord<Synth> (edit) '1' => '"1"'
17:41:21FromDiscord<Rika> like, what the type is and what you pass into it
17:41:25*leaveabug quit (Remote host closed the connection)
17:41:36FromDiscord<Synth> @Rika: https://discordapp.com/channels/371759389889003530/371759389889003532/719604575740625037
17:41:46FromDiscord<Rika> you dont show what you pass into
17:41:49FromDiscord<Synth> Yes I did
17:41:54FromDiscord<Yardanico> @Synth I don't understand
17:41:55FromDiscord<Rika> ah
17:41:56FromDiscord<Synth> > chatWrite("guild_id", "channel_id", 1) results in:
17:42:00FromDiscord<Yardanico> do you really want a json with "guild_id" verbatim?
17:42:04FromDiscord<Yardanico> ah anyway
17:42:21FromDiscord<Synth> Just for example yes, other strings will be passed into it after it works
17:42:25FromDiscord<Rika> its just example
17:42:30FromDiscord<Synth> Yup
17:43:59FromDiscord<Yardanico> sent a code paste, see http://ix.io/2oE8
17:44:02FromDiscord<Yardanico> I just don't understand why would you need code like that
17:44:10FromDiscord<Synth> Oh, thank you
17:44:18FromDiscord<Synth> I just got it from the json nim docs example
17:44:33FromDiscord<Yardanico> %* assumes keys are already strings verbatim
17:44:37FromDiscord<Synth> Ahh okay
17:44:40FromDiscord<Synth> That makes sense
17:44:41FromDiscord<Rika> sent a code paste, see http://ix.io/2oE9
17:44:51FromDiscord<Rika> (edit) 'http://ix.io/2oE9' => 'https://discordapp.com/channels/371759389889003530/371759389889003532/719607839001280552'
17:45:03FromDiscord<Rika> ah is that so?
17:45:04FromDiscord<Synth> Oh?
17:45:15FromDiscord<Yardanico> I just didn't understand what @Synth wanted
17:45:25FromDiscord<Yardanico> because guild_id was passed on runtime
17:45:30FromDiscord<Yardanico> so I assumed it might change
17:46:05FromDiscord<Rika> sent a code paste, see http://ix.io/2oEa
17:46:15FromDiscord<Rika> im not sure what you mean
17:46:28FromDiscord<Yardanico> @Rika yeah but in @Synth'f example they passed key names at runtime
17:46:37FromDiscord<Yardanico> so I assumed they need to change or something
17:46:40FromDiscord<Rika> is `let` not on runtime
17:46:47FromDiscord<Yardanico> you don't understand me :/
17:46:59FromDiscord<Yardanico> in their example they passed RUNTIME variables to %* for keys
17:47:01*lritter quit (Quit: Leaving)
17:47:03FromDiscord<Yardanico> not string constants
17:47:25FromDiscord<Yardanico> so I assumed it was because that function would be called with different values or something
17:47:36FromDiscord<Yardanico> of course if you know the keys (as strings) at compile time you can just use %*
17:47:58FromDiscord<Synth> sent a code paste, see http://ix.io/2oEb
17:48:04FromDiscord<Yardanico> Show your code
17:48:16FromDiscord<Yardanico> I get `{"guild_id":{"channel_id":"5"}}`
17:48:18FromDiscord<Synth> sent a code paste, see http://ix.io/2oEc
17:48:22FromDiscord<Yardanico> @Synth that's not correct
17:48:25FromDiscord<Synth> Oh?
17:48:31FromDiscord<Yardanico> strm.writeLine($data)
17:48:38FromDiscord<Synth> Ohh I'm sorry
17:48:40FromDiscord<Synth> I'm so dumb
17:48:42FromDiscord<Rika> sent a code paste, see http://ix.io/2oEd
17:49:05FromDiscord<Yardanico> @Rika yeah it's my fault 😛
17:49:16FromDiscord<Yardanico> i thought it failed because %* didn't support keys as variables, not because of stream
17:49:30FromDiscord<Rika> so i was right...
17:49:55FromDiscord<Synth> Still exact same output
17:50:12FromDiscord<Yardanico> hrm
17:50:17FromDiscord<Kiloneie> Are these inline iterators ? https://nim-lang.org/docs/iterators.html Where are the closure ones ?
17:50:19FromDiscord<Synth> One second...
17:50:21FromDiscord<Synth> Let me test something
17:50:28FromDiscord<Yardanico> @Kiloneie all iterators are inline ones by default
17:50:39FromDiscord<Yardanico> the closure ones have `{.closure.}` pragma
17:50:48FromDiscord<Kiloneie> ahh okay, thank you
17:51:09FromDiscord<Synth> Ahh my strings were being passed in wrong
17:51:11FromDiscord<Yardanico> so when you write `for x in mySeq:` the items for seq is inlined
17:51:14FromDiscord<Synth> No wonder it didn't work
17:51:24FromDiscord<Synth> My apologies for distrubing you guys...
17:51:25FromDiscord<Yardanico> `items` as in `items` iterator for `seq`
17:51:47FromDiscord<Yardanico> so iterators are fast and good 😛
17:51:55FromDiscord<Kiloneie> nice
17:52:11FromDiscord<Kiloneie> iterator video xD, i didn't really use them much yet.
17:52:34FromDiscord<Yardanico> oh right it's you who's been doing these youtube vids, I forgot 😛
17:52:55FromDiscord<Yardanico> i am subscribed btw (but I didn't watch them really, sorry :P)
17:53:15FromDiscord<Yardanico> but yeah they would've been helpful when I was a newbie in nim
17:53:50FromDiscord<Rika> videos are too slow for me to follow (maybe thats why i also dont watch anime anymore
17:53:58FromDiscord<Kiloneie> Yeah, i am trying to pump a lot of them out, sadly it does take time.
17:54:06FromDiscord<Yardanico> @Rika well yeah that is true for me nowadays too
17:54:11FromDiscord<Kiloneie> Gotta compress and dumb down as much as possible
17:54:16FromDiscord<Yardanico> I really don't watch tutorial vids
17:55:02FromDiscord<Yardanico> like yesterday I was setting up linux + freebsd dual boot on a single ZFS pool and had to google for quite a while, read different resources, stuff, also had to ask on #freebsd IRC (on freenode), and the person here helped me find the solution
17:55:03FromDiscord<Kiloneie> I don't either, especially since Nim has nothing but my own xD...(theres another guy but he started a week after me and quit also a week after my first pause lol, doesn't count)
17:55:26FromDiscord<Kiloneie> videos can help a ton
17:55:49FromDiscord<Kiloneie> like, 5 min video to quickly do something, as opposed to reading like a maniac for an hour on a topic you know nothing about
17:56:14FromDiscord<Kiloneie> doesn't apply to most people here.
17:58:11Yardanicowell with more time spent in the internet and tech stuff I find less and less resources about things I want to know about :P
17:58:25Yardanicoso i have to read the actual documentation more often XD
17:58:38*robotme quit (Quit: robotme)
18:01:22FromDiscord<Kiloneie> Yeah, Nim is the first and only language i had to read the docs extensively. It does help the docs are structured very well and aren't all over the place, if i were to start with c++ again i wouldn't know where to start.
18:01:58Yardanicowell, the big advantage is that I actually understand the underlying stuff when reading real docs and manuals :P
18:02:11Yardanicoso it's not always specific to the problem I'm solving
18:02:37livcdKilonie: John's videos are nice and concise.
18:03:13FromDiscord<Kiloneie> about Nim ? Whos John... ?
18:03:18livcdI hate that he does not use syntax highlighting but beggars cant be choosers
18:03:42livcd"needless process" on YT
18:03:51Yardanico@Kiloneie https://www.youtube.com/channel/UCRPaa1MejOaSUo8viposRLw
18:04:18FromDiscord<Kiloneie> oh yeah i've watched 2 of his
18:04:19Yardanicohe does use syntax highlighting though
18:04:46FromDiscord<Kiloneie> he is focused in a completely different direction with a way different style
18:05:45livcdnot in every video
18:17:50disruptekwith more time with nim i understand it less and less.
18:18:59FromDiscord<Kiloneie> Why ? Because it's complicated under the hood ?
18:22:29disruptekwhen you keep finding monsters in the bathroom, at some point you start shitting in the kitchen.
18:22:57*Vladar quit (Quit: Leaving)
18:23:03FromDiscord<djazz> xD
18:23:09FromDiscord<Kiloneie> xD, happens with pretty much everything when you know too much
18:24:39FromDiscord<Kiloneie> like when i started with Game Maker, man was it amazing, but then... man it's a piece of garbage under the hood actually D:... the difference in speed from the version i used to what it is now is about 20 times+ difference. And all kinds of weird shit.
18:30:14Araqer, there is a weird bug on my mic
18:30:36Araqirk
18:31:31Araqplanet earth has one species less
18:32:07Araqnatural selection at work. bug species who don't touch my mic survive
18:32:07*kenran joined #nim
18:35:48FromDiscord<Kiloneie> lol, bug phobic
18:35:55Yardanicoi dont like insects either
18:36:01FromDiscord<KingDarBoja> Lol
18:36:13Araqall bugs must die
18:36:24FromDiscord<Kiloneie> i hate spiders
18:36:25FromDiscord<KingDarBoja> Where I live there are several of them, but nothing like Australian ones lol
18:36:54FromDiscord<KingDarBoja> I hate spiders too but I don't kill the ones on the rooftop
18:36:57FromDiscord<Kiloneie> and annoying flies that keep flying onto your skin and ears...
18:37:02FromDiscord<KingDarBoja> Cuz those are actually harmless
18:38:07*endragor quit (Ping timeout: 260 seconds)
18:48:36ldleworkI forgot, does nim have partial application?
18:48:51FromDiscord<Rika> ?
18:49:08FromDiscord<exelotl> like currying?
18:49:19Araqyou can do currying via macros
18:49:40disruptekso many elixir jobs now.
18:49:43ldleworkproc add(a: int, b: int) = a + b
18:49:49ldleworklet add5 = add 5
18:49:52ldleworksomething like that
18:50:12disruptekthere's a curry module.
18:50:15disruptek!repo curry
18:50:16disbothttps://github.com/t8m8/currying -- 9currying: 11Currying Library for Nim 15 34⭐ 4🍴 7& 1 more...
18:50:31FromDiscord<exelotl> I wish I had a curry right now
18:50:42FromDiscord<Rika> stop making me hungry
18:50:47Yardanicoham colour
18:51:16ldleworkAraq: that'll never be a language feature right
18:51:32disruptekit's already supported.
18:51:41disrupteki just wish you could do type currying more easily.
18:52:41ldleworkI said in another channel "Nim is pretty ML like" but I guess I was mostly thinking of it's expression-based control structures
18:52:53disruptekit's nice.
18:55:13ldleworkI miss the pipeline operator too.
18:56:28FromDiscord<exelotl> Have I run into a bug? I have `var soundbankBin* {.importc:"soundbank_bin", extern:"soundbank_bin", codegenDecl:"const $# $#".}: cstring`
18:56:39FromDiscord<exelotl> and it generates the following C code: `const NCSTRING soundbank_bin;`
18:56:43FromDiscord<exelotl> but only on linux
18:58:10FromDiscord<exelotl> oh wait, I'm wrong, it generates that on windows too...
18:58:24FromDiscord<exelotl> but for some reason I don't get multiple definition warnings on windows
18:58:45FromDiscord<exelotl> (edit) 'warnings' => 'errors'
19:01:07leorize[m]exelotl: what are you trying to do?
19:01:26disruptekhe's playing a game called `stump the chumps`.
19:03:29disruptekix us the code at least.
19:03:41FromDiscord<exelotl> i have some const data in an external C file. I add it to the build using `{.compile:"../../data/soundbank.c".}` then I want to access it from nim and have it marked as extern in Nim's generated C code
19:04:00disruptekdoes that magically link it in?
19:05:13FromDiscord<exelotl> yeah, it worked fine on windows and mac but apparently adding the `extern` pragma doesn't automatically add the `extern` annotation in C
19:05:26FromDiscord<exelotl> which makes me wonder how it ever worked at all, and why it only fails on linux
19:05:41disruptekmaybe your codegendecl is overriding it?
19:05:52FromDiscord<exelotl> hm yeah might be
19:06:00shashlickback in the docset business - https://github.com/genotrance/nim-docset
19:06:09disrupteki'm just curious if it actually works on windows.
19:06:25disruptekmaybe one platform isn't correctly overriding the decl and the other is.
19:07:26FromDiscord<exelotl> It's generated as `const NCSTRING soundbank_bin;` on both platforms. Also using the same compiler toolchain (devkitARM) on both platforms
19:07:58FromDiscord<exelotl> maybe they changed a compiler setting in the latest devkitARM?
19:08:32disruptekso it works on windows?
19:08:49disrupteklike, you successfully access the symbol at runtime?
19:10:10*kenran quit (Ping timeout: 260 seconds)
19:10:44FromDiscord<exelotl> yeah, I've been using this in my code since around christmas
19:12:55disruptekchristmas of which year?
19:13:06disruptekit's like an annual thing, right?
19:14:42disruptekdid you mention which nim this is?
19:16:03FromDiscord<exelotl> 1.2.0 but I don't think it's a nim version thing, I think it's just my C compiler being lenient for some reason
19:16:36FromDiscord<exelotl> also, y'know, *the* christmas
19:16:49FromDiscord<exelotl> the one where the messiah was born
19:17:12ldleworknimsuggest-mode's nimsuggest-show-doc doesn't work
19:18:36ldleworkother suggestions and stuff are working though
19:18:54sendell(WSL + nim-vscode + vscode remote for WSL) makes nimsugest run crazy (100% of a core). I had this problem on windows before, but just can't remember what fixed it... -_- any leads ?
19:20:16ldleworkAh OK, it works, but only on some stdlib functions
19:20:33ldleworkworked on getEnv but not ansiForegroundColorCode
19:20:49ldleworkwait now it works
19:20:51ldleworkwtf
19:21:17*ldlework shrugs.
19:27:14ldleworkI have:
19:27:16ldlework color = if ok: green else: red
19:27:18ldlework resultLabel = color($ok)
19:27:20ldleworkwhere green and red are procs
19:27:32ldleworkwhen i try to call color, I get, attempting to call routine: 'color'
19:27:35ldlework found 'color' of kind 'let'
19:27:47ldleworkare procs not first-class?
19:28:56FromDiscord<Rika> use when
19:29:35ldleworkhow do you mean
19:30:18ldleworkError: cannot evaluate at compile time: ok
19:35:32*tdc joined #nim
19:36:21ldlework?
19:45:48*nsf quit (Quit: WeeChat 2.8)
19:47:12FromDiscord<Rika> actually wait for someone less busy than me to answer
19:49:22FromDiscord<Rika> does nim have a `yield from` like python?
19:50:13shashlicknim version in devel is clearly 1.3.5 but docs get generated in web/upload/1.3.1 - what gives?
19:50:16*Senny joined #nim
19:50:43shashlicki used koch docs
19:53:57shashlickmeh koch was out of date
19:56:20*tdc quit (Ping timeout: 256 seconds)
20:04:37alehander92exelotl :) good note on Christmas
20:04:41alehander92did you resolve your issue
20:05:04alehander92hm, time to look at my nim projects
20:05:10*neceve_ quit (Ping timeout: 265 seconds)
20:09:21FromDiscord<willyboar> Time to start the framework :p
20:15:25alehander92well guys did you plan something there
20:22:34*aenesidemus quit (Ping timeout: 265 seconds)
20:29:11FromDiscord<willyboar> Just some ideas
20:36:25*krux02 joined #nim
20:37:45*aenesidemus joined #nim
20:41:56*PMunch joined #nim
20:44:18alehander92ok, but its best to collect them
20:47:58PMunchIs there a way to get a unique identifier of a closure iterator?
20:49:24alehander92hmm, inside it?
20:49:37PMunchNo outside it
20:50:34FromDiscord<willyboar> alehander92 PMunch keep notes
20:51:22PMunchI tried to just use `addr`, but adding it to a linked list and then use `value.addr` on the node yielded a different one that the one I added, example: http://ix.io/2oF9
20:51:57PMunchhttps://play.nim-lang.org/#ix=2oF9
20:52:20PMunchAs you can see both the iterator in the node and the one in the variable are finished, so it is the same one
20:53:38PMunchThose two pointers looks to be so far apart that I think one might be on the stack and the other is on the heap
20:57:18*bung joined #nim
20:57:54leorize[m]that might just be the value of it's container
20:58:29leorize[m]what about the address of the inside of that closure iterator?
20:59:41PMunchleorize[m], what do you mean?
21:00:59leorize[m]the variables inside that closure iterator might be allocated on the heap
21:03:05PMunchWhat?
21:03:15PMunchI can't get the pointer to something inside the iterator..
21:03:28PMunchAt least not without calling it and hooking it somehow
21:09:28*matti quit ()
21:10:23*matti joined #nim
21:12:01*Trustable quit (Remote host closed the connection)
21:16:57alehander92PMunch i dont get why do you use lists
21:17:01FromGitter<ynfle> Is there a way to have 2 procs that call each other?
21:17:05alehander92`it` itself has the same pointer
21:17:20alehander92it probably gets copied as return value
21:17:26FromDiscord<Rika> @ynfle forward declare one of them
21:17:35*arend joined #nim
21:18:01FromGitter<ynfle> Could figure out the syntax
21:18:20alehander92it uses asgnRef
21:18:46PMunchNone of these pointers are the same alehander92: https://play.nim-lang.org/#ix=2oFi
21:20:03alehander92https://play.nim-lang.org/#ix=2oFj
21:20:04alehander92huh
21:20:56*solitudesf- quit (Ping timeout: 246 seconds)
21:20:56alehander92eh now you changed to return
21:21:42*arend quit (Remote host closed the connection)
21:21:55PMunchWell yes
21:22:12PMunchThe result addr and the it addr is probably the same place on the stack
21:24:03alehander92i mean the link stuff copies
21:24:10alehander92the lists
21:24:14alehander92probably
21:25:02PMunchWell it doesn't copy, because both iterators are marked as finished
21:25:05PMunchSo it's the same iterator
21:25:22FromGitter<ynfle> Are there any caveats for forward declarations?
21:26:44leorize[m]PMunch: https://play.nim-lang.org/#ix=2oFn
21:26:53leorize[m]you can do it like this if you want it to copy
21:27:16PMunchThe thing is I don't want to copy it
21:27:31leorize[m]@ynfle other than you have to ensure that the two declarations are the same, no
21:30:00PMunchHmm, I have to look more into this tomorrow..
21:30:36PMunchIt would be nice to be able to get the "identity" of a closure iterator so I can hash it and use them as keys in a table.
21:30:47PMunchThat's my end goal with this
21:31:06*PMunch quit (Quit: leaving)
21:32:28FromDiscord<Shucks> Does someone know whats wrong here? Just build it but dllmain doesn't gets called like this guy already said. https://forum.nim-lang.org/t/3190
21:34:50*narimiran quit (Ping timeout: 260 seconds)
21:36:21FromDiscord<Isomorpheus> I need a streaming machine learning library. There are a couple for Python: creme and scikit-multiflow. I've found them to be too slow for my needs. I'm considering rewriting the best performing models (for my problem) in a faster language: Julia or Nim seem suitable.
21:36:31FromDiscord<Isomorpheus> can someone give me a couple reasons I *shouldn't* use nim
21:39:24FromGitter<ynfle> Solved, one of the parameter names was spelled differently
21:39:31FromGitter<ynfle> Didn't realize that would make a difference
21:39:41FromGitter<ynfle> It makes sense in retrospect
21:40:53FromDiscord<Rika> @Isomorpheus harder to prototype with than julia since you can omit types completely in every case for julia (dynamic-ish language), and only sometimes in nim
21:41:46FromDiscord<Isomorpheus> i generally prefer static languages
21:41:50FromDiscord<Isomorpheus> here are my current thoughts
21:42:26FromDiscord<Isomorpheus> streaming machine learning is pretty different from reg machine learning so the library issue isn't as big a deal
21:42:34FromDiscord<Isomorpheus> since even in Python itself the ecosystem is poor
21:42:48FromDiscord<Isomorpheus> in particular, well-developed linear algebra libraries arent even necessary (afaict)
21:42:59FromDiscord<Isomorpheus> only thing that could matter a little is like plotting libraries
21:43:27FromDiscord<Isomorpheus> nim: no repl, no jupyter integration, no plotting libraries?, types are nullable by default?
21:43:49FromGitter<bung87> go check arraymancer
21:43:54FromDiscord<Isomorpheus> julia: no AOT standalone binaries, http servers are poorly developed, dynamically typed
21:44:00FromGitter<bung87> !repo arraymancer
21:44:01disbothttps://github.com/mratsim/Arraymancer -- 9Arraymancer: 11A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends 15 671⭐ 60🍴 7& 7 more...
21:44:15FromDiscord<Rika> there are plotting libraries
21:44:24FromDiscord<Rika> not all types are nullable by default
21:44:27FromDiscord<Rika> only ref types are
21:44:55FromDiscord<Rika> (string and seq are "kinda ref" types in where they are pointers but cannot be nulled)
21:44:59leorize[m]!repo ggplotnim
21:45:00disbothttps://github.com/Vindaar/ggplotnim -- 9ggplotnim: 11A port of ggplot2 for Nim 15 63⭐ 7🍴
21:45:29FromDiscord<Rika> so now the only issues are the repl and the jupyter integration
21:45:31FromDiscord<Isomorpheus> btw I saw the arraymancer library but I don't think it helps much with streaming ML
21:45:42FromDiscord<Isomorpheus> you receive data one by one so you don't even really need dataframes etc
21:45:47FromDiscord<Rika> dom96: are you here? how would i go about implementing rate limiting in jester
21:45:48leorize[m]@Shucks it's not `{.exportc.}-ed`
21:46:06leorize[m]also you need `{.dynlib.}` so that it's exported
21:46:38FromDiscord<Isomorpheus> @Rika idk what ref types are because i havent learned Nim yet. is that a catch-all for non-primitives?
21:46:44leorize[m]@Isomorpheus nullable only applies to `ref`
21:46:49FromDiscord<Rika> @Isomorpheus no it is not
21:47:08FromDiscord<Rika> there are non-ref non-primitives
21:47:15leorize[m]`ref` types are basically types with reference semantics
21:48:05leorize[m]~memory
21:48:06disbotmemory: 11The Nim memory model: https://zevv.nl/nim-memory/
21:48:38leorize[m]hmm I can't connect to this
21:48:42FromDiscord<Isomorpheus> same
21:48:53leorize[m]@Zevv did you take the server down?
21:48:55FromDiscord<Rika> zevv: your servers dead it seems lol
21:49:02FromDiscord<Isomorpheus> ok id have to look more into ref types to evaluate how much of a negative that is imo but anyway
21:49:17FromDiscord<Rika> @Isomorpheus theyre basically objects in the heap
21:49:39FromDiscord<Isomorpheus> nim: no repl, no jupyter, plotting libraries immature↵julia: dynamic, http ecosystem immature
21:49:54FromDiscord<Rika> that is a good evaluation
21:50:00leorize[m]yep that's seem to be correct
21:50:04FromDiscord<Isomorpheus> hmm
21:50:18FromDiscord<Isomorpheus> anyone have any other suggestions for languages to look at
21:50:28FromGitter<ynfle> What about `nim secret` or `inim`?
21:50:30FromDiscord<Isomorpheus> I considered Rust but it would probably be a nightmare.
21:51:09leorize[m]@ynfle nim secret is limited to the Nim VM and is buggy in general
21:51:22leorize[m]inim is a pseudo-repl, not a true repl afaict
21:51:34FromGitter<ynfle> Yes
21:52:04FromGitter<ynfle> They are both a pain to deal with but can sometimes be useful
21:52:59FromGitter<kaushalmodi> Rika: https://web.archive.org/web/20200424040715/https://zevv.nl/nim-memory/
21:53:38FromGitter<kaushalmodi> Isomorpheus: ⏎ ⏎ > plotting libraries immature ⏎ ⏎ ggplotnim is awesome. Have you tried that? [https://gitter.im/nim-lang/Nim?at=5edeb3614c9b0f060d51e0ee]
21:54:12FromDiscord<Isomorpheus> kaushalmodi, no I haven't written a single line of julia or nim and I've barely looked at the syntax
21:54:17FromDiscord<Isomorpheus> im researching the languages
21:54:33FromDiscord<Rika> try writing in both first
21:54:57FromDiscord<Rika> any simple program like making a http client or something and getting a webpage
21:55:01FromGitter<kaushalmodi> Isomorpheus: Ok, see https://github.com/Vindaar/ggplotnim/blob/master/recipes.org
21:55:05FromDiscord<Rika> or making a calculator in cli
21:55:09FromGitter<kaushalmodi> to see all the beauty ggplotnim can create
21:55:17FromDiscord<Isomorpheus> ill check it out ty kaushal
21:55:22FromDiscord<Shucks> > @Shucks it's not `{.exportc.}-ed`↵thanks, gonna try it
21:55:46FromDiscord<Isomorpheus> and im not really a strongly opinionated person about syntax so reading about the language features seems fine to me
21:55:51FromDiscord<Isomorpheus> maybe ill make a lil http server in each
21:56:08leorize[m]@Shucks also compile with `--noMain`
21:57:46FromDiscord<Isomorpheus> i considered swift for this since tensorflow seems to be investing in it. but, the windows support sucks and im meh on apple overall
22:00:01FromDiscord<Rika> who was that lad making the image manipulation library again
22:00:07FromDiscord<Rika> what was the name of the library
22:00:30leorize[m]!repo inumon
22:00:31disbothttps://github.com/dizzyliam/inumon -- 9inumon: 11A high-level image I/O and manipulation library for Nim 15 2⭐ 0🍴
22:01:05FromDiscord<Rika> thanks
22:01:14FromDiscord<Rika> damn theyve already got an icon
22:03:13*tane quit (Quit: Leaving)
22:03:24FromDiscord<Isomorpheus> lol
22:03:28FromDiscord<Isomorpheus> shit they mean business
22:07:45FromDiscord<Isomorpheus> https://github.com/nim-lang/needed-libraries/issues/77
22:07:46disbot[Meta] Are we scientists yet?
22:07:48FromDiscord<Isomorpheus> found this
22:26:00*fredrikhr quit (Ping timeout: 256 seconds)
22:27:37*krux02_ joined #nim
22:29:54*sknebel quit (Ping timeout: 240 seconds)
22:30:14*krux02 quit (Ping timeout: 256 seconds)
22:30:14*muffindrake quit (Ping timeout: 256 seconds)
22:31:21*theelous3 joined #nim
22:32:17*sknebel joined #nim
22:32:26*muffindrake joined #nim
22:39:04FromDiscord<Shucks> sent a code paste, see http://ix.io/2oFE
22:40:04FromDiscord<Shucks> If I change the main nim.cfg like this it seems like it still uses the 64 one with the --cpu:i386 flag. If i add it manually to my project nim.cfg it works
22:41:19leorize[m]@Shucks if i386 is a thing? :p
22:41:39leorize[m]@Isomorpheus we have a nim sci gitter chat room iirc
22:41:42leorize[m]@mratsim can tell you where it is
22:42:42FromDiscord<Shucks> huh?
22:44:46leorize[m]I just didn't know that you can use `if` to check for the cpu :P
22:47:42FromDiscord<Shucks> Thats atleast what all these other checks do in the cfg ;o
22:48:06FromDiscord<Shucks> well i just gonna define the gcc path in my project cfg then
22:50:04FromDiscord<mamiysr> Hi, is it possible to use CURL_INTERFACE like config with Nim httpclient?
22:51:47leorize[m]can you describe?
22:52:20leorize[m]searching CURL_INTERFACE only get me CURLOPT_INTERFACE, and I'm not sure if that's what you're looking for
22:53:29FromDiscord<mamiysr> well, i want to use my server ip address other than default one for http requests
22:53:59leorize[m]ah, so you really asked about CURLOPT_INTERFACE
22:54:00leorize[m]no, we don't have that here
22:54:43leorize[m]we do have a curl wrapper which you can use instead
22:56:39FromDiscord<mamiysr> can i get a documentation link please?
22:59:35leorize[m]our libcurl wrapper seems to be really old: https://github.com/Araq/libcurl
23:01:01FromDiscord<djazz> phew, I just finished converting parts of a JS lib to Nim, for my web framework's router. My conversion: https://github.com/daniel-j/koan/blob/master/src/koan/path_to_regexp.nim here is the js lib: https://github.com/pillarjs/path-to-regexp
23:01:30FromDiscord<djazz> regular expressions in nim kinda sucks, coming from JS world
23:02:07FromDiscord<djazz> re module was unable to get the capture groups, nre was better but it has a strange api
23:02:13FromDiscord<mamiysr> oh yes, it looks like pretty old 🙂 but thanks
23:02:37leorize[m]@mamiysr if you want the feature you can open an issue on our github tracker: https://github.com/nim-lang/Nim
23:03:00leorize[m]I think I might know how to implement this, no promises though
23:04:09*krux02__ joined #nim
23:04:42*opal quit (Remote host closed the connection)
23:04:50leorize[m]@djazz you should use nim-regex, which according to its user is better than `nre` or `re`
23:05:06leorize[m]!repo regex
23:05:06disbothttps://github.com/nitely/nim-regex -- 9nim-regex: 11Pure Nim regex engine with linear time match 15 85⭐ 10🍴 7& 7 more...
23:05:53leorize[m]also npeg is a cool project if you want to write parsers
23:05:53leorize[m]!repo npeg
23:05:54disbothttps://github.com/zevv/npeg -- 9npeg: 11PEGs for Nim, another take 15 98⭐ 6🍴
23:06:00*opal joined #nim
23:07:02*krux02_ quit (Ping timeout: 260 seconds)
23:12:57FromDiscord<djazz> Thanks
23:21:24*krux02__ quit (Remote host closed the connection)
23:29:43FromDiscord<Rika> does the nim redis module have docs anywhere?
23:32:32*NimBot joined #nim
23:34:00leorize[m]you can build them yourself
23:34:15leorize[m]just `nim doc --project --outdir:htmldocs <path/to/file.nim>`
23:34:25FromDiscord<Rika> i am lazy, i shall read the code instead
23:34:26FromDiscord<Rika> lmao
23:57:02FromDiscord<exelotl> Lol I was gonna say someone should make a thin wrapper around JS regex for Nim and call it jreg
23:58:01FromDiscord<exelotl> Then I remembered jreg is an edgy 1000 layers-of-irony satire youtuber
23:59:02FromDiscord<Technisha Circuit> Is there a way to use C# libraries in Nim? :GWchinaSakuraThinking:
23:59:05FromDiscord<Technisha Circuit> I'm just curious
23:59:31FromDiscord<Elegant Beef> At the moment probably not, but it'd be simillar to the java support
23:59:40FromDiscord<Technisha Circuit> Oh okay