<< 11-05-2019 >>

00:00:57*rnrwashere joined #nim
00:01:11*rnrwashere quit (Remote host closed the connection)
00:01:27*rnrwashere joined #nim
00:25:24*kayabaNerve joined #nim
00:38:08*cyberjpn quit (Ping timeout: 258 seconds)
00:43:11*stefanos82 quit (Remote host closed the connection)
00:51:53*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:54:16*oprypin quit (Quit: No Ping reply in 180 seconds.)
00:55:36*oprypin joined #nim
00:57:30*dddddd quit (Remote host closed the connection)
00:58:17*cyberjpn joined #nim
01:17:13*abm quit (Quit: Leaving)
01:25:22*xet7 quit (Quit: Leaving)
01:31:47*rnrwashere quit (Remote host closed the connection)
01:35:22*rnrwashere joined #nim
01:53:43*rnrwashere quit (Remote host closed the connection)
01:54:10*rnrwashere joined #nim
01:59:01*nimer joined #nim
02:00:17*banc quit (Quit: Bye)
02:07:08*djellemah quit (Ping timeout: 245 seconds)
02:07:36*rnrwashere quit (Remote host closed the connection)
02:08:52*rnrwashere joined #nim
02:11:22*rnrwashere quit (Remote host closed the connection)
02:14:57*rnrwashere joined #nim
02:21:09*djellemah joined #nim
02:21:52*banc joined #nim
02:26:33*nimer quit ()
02:42:22*hecanjog joined #nim
02:53:48*rnrwashere quit (Remote host closed the connection)
02:55:20*rnrwashere joined #nim
02:59:56*rnrwashere quit (Remote host closed the connection)
03:07:36*cyberjpn quit (Ping timeout: 246 seconds)
03:11:36*kapilp quit (Quit: Connection closed for inactivity)
03:13:27*rnrwashere joined #nim
03:15:57*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:32:23*rnrwashere quit (Remote host closed the connection)
03:36:07*rnrwashere joined #nim
03:38:48*djellemah quit (Ping timeout: 245 seconds)
03:46:01*laaron quit (Remote host closed the connection)
03:51:48*laaron joined #nim
03:55:12*rnrwashere quit (Remote host closed the connection)
04:31:53*narimiran joined #nim
04:45:23*laaron quit (Remote host closed the connection)
04:47:06*laaron joined #nim
04:47:40*rnrwashere joined #nim
04:50:28*laaron quit (Remote host closed the connection)
04:51:27*laaron joined #nim
04:52:42*deech joined #nim
04:54:50*kapilp joined #nim
05:00:27*laaron quit (Remote host closed the connection)
05:01:51*laaron joined #nim
05:07:12*rnrwashere quit (Remote host closed the connection)
05:08:43*deech quit (Ping timeout: 248 seconds)
05:15:00*nif_ joined #nim
05:15:30*cyberjpn joined #nim
05:15:35*FromDiscord joined #nim
05:16:14*shashlick_ joined #nim
05:17:47*nif quit (Ping timeout: 258 seconds)
05:17:47*FromDiscord_ quit (Ping timeout: 258 seconds)
05:17:47*shashlick quit (Read error: Connection reset by peer)
05:17:47*cornfeedhobo quit (Read error: Connection reset by peer)
05:21:18*cyberjpn quit (Ping timeout: 246 seconds)
05:23:57*cyberjpn joined #nim
05:24:06*cornfeedhobo joined #nim
05:25:44*dddddd joined #nim
05:48:57*kayabaNerve quit (Quit: Page closed)
05:54:29*nsf joined #nim
06:09:17*rnrwashere joined #nim
06:09:38FromDiscord<treeform> zacharycarter, sorry I am not ready to share yet.
06:14:28*rnrwashere quit (Ping timeout: 276 seconds)
06:16:55*solitudesf joined #nim
06:21:37*cyberjpn quit (Ping timeout: 246 seconds)
06:30:31FromGitter<alehander42> so what do you think of github registry
06:30:51FromGitter<alehander42> i still dont get completely the idea, but it seems as an alternative of npm/maven etc
06:31:16FromGitter<alehander42> but centralized
06:33:28FromGitter<alehander42> and it seems gitlab already had this or similar thing
06:40:02shashlick_it still relies on the package manager getting and putting per the protocol, all they are providing is a DB
06:41:23FromGitter<alehander42> one of the ideas i read about is that maybe they want to make people use github actions as well and automate push source => build => release on their registry
06:42:21FromGitter<alehander42> and make the "this package is built from this source" more obvious/traceable (but no idea about signing/namespaces etc)
06:54:04*cyberjpn joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:22*gmpreussner joined #nim
07:39:16*Vladar joined #nim
07:54:43*narimiran quit (Ping timeout: 246 seconds)
08:10:29*natrys joined #nim
08:12:48*cyberjpn quit (Ping timeout: 246 seconds)
08:15:44*cyberjpn joined #nim
08:18:09*jjido joined #nim
08:24:58*narimiran[m] quit (Read error: Connection reset by peer)
08:24:59*TheKing[m] quit (Read error: Connection reset by peer)
08:25:01*GitterIntegrati4 quit (Write error: Connection reset by peer)
08:25:01*BitPuffin quit (Read error: Connection reset by peer)
08:25:01*sg-james[m]1 quit (Read error: Connection reset by peer)
08:25:01*Miguelngel[m] quit (Read error: Connection reset by peer)
08:25:03*ArchieT[m] quit (Write error: Connection reset by peer)
08:25:04*forkbomb9[m] quit (Read error: Connection reset by peer)
08:25:13*Connor[m] quit (Remote host closed the connection)
08:25:14*xomachine[m] quit (Read error: Connection reset by peer)
08:25:14*zielmicha[m]1 quit (Read error: Connection reset by peer)
08:25:21*spymasterd[m] quit (Remote host closed the connection)
08:25:25*federico3[m] quit (Remote host closed the connection)
08:25:25*dyce[m] quit (Remote host closed the connection)
08:25:26*serialdev[m]1 quit (Read error: Connection reset by peer)
08:25:26*Manny8888 quit (Read error: Connection reset by peer)
08:25:26*Demos[m] quit (Read error: Connection reset by peer)
08:25:27*macsek1911[m] quit (Read error: Connection reset by peer)
08:25:27*isaac[m]1 quit (Read error: Connection reset by peer)
08:25:27*libman[m] quit (Read error: Connection reset by peer)
08:25:28*leorize[m] quit (Remote host closed the connection)
08:25:28*sendell[m] quit (Remote host closed the connection)
08:25:29*TheManiac[m] quit (Read error: Connection reset by peer)
08:25:29*pqflx3[m] quit (Read error: Connection reset by peer)
08:25:33*lqdev[m] quit (Remote host closed the connection)
08:25:34*flaviut[m] quit (Read error: Connection reset by peer)
08:25:34*gh0st[m] quit (Write error: Connection reset by peer)
08:25:35*jugash[m] quit (Read error: Connection reset by peer)
08:25:36*planetis[m] quit (Remote host closed the connection)
08:25:36*yglukhov[m] quit (Write error: Broken pipe)
08:25:37*k0mpjut0r quit (Remote host closed the connection)
08:25:38*junk[m] quit (Read error: Connection reset by peer)
08:25:38*xylef quit (Read error: Connection reset by peer)
08:26:58*solitudesf quit (Ping timeout: 244 seconds)
08:33:41*kapilp quit (Quit: Connection closed for inactivity)
08:37:01*dyce[m] joined #nim
08:44:54*al_ joined #nim
08:52:34FromGitter<bdhb> What are your thoughts on Nim vs Cython?
08:53:31*laaron quit (Remote host closed the connection)
08:54:07AraqNim is a programming language with a type system, Cython's "type system" is "oh look, this one is an int"
08:55:49Araqthere is more to types than "array of int" vs "array of double", types encourage cleaner design, better readability, ...
08:57:26*laaron joined #nim
08:57:37*Connor[m] joined #nim
08:57:37*TheKing[m] joined #nim
08:57:37*ArchieT[m] joined #nim
08:57:38*BitPuffin joined #nim
08:57:38*Demos[m] joined #nim
08:57:39*k0mpjut0r joined #nim
08:57:39*sendell[m] joined #nim
08:57:39*GitterIntegrati4 joined #nim
08:57:39*serialdev[m] joined #nim
08:57:39*leorize[m] joined #nim
08:57:39*gh0st[m] joined #nim
08:57:40*jugash[m] joined #nim
08:57:40*isaac[m]1 joined #nim
08:57:44*federico3[m] joined #nim
08:57:44*xylef joined #nim
08:57:45*pqflx3[m] joined #nim
08:57:45*Miguelngel[m] joined #nim
08:57:45*TheManiac[m] joined #nim
08:57:45*flaviut[m] joined #nim
08:57:45*spymasterd[m] joined #nim
08:57:45*forkbomb9[m] joined #nim
08:57:45*macsek1911[m] joined #nim
08:57:45*junk[m] joined #nim
08:57:45*narimiran[m] joined #nim
08:57:46*libman[m] joined #nim
08:57:46*sg-james[m] joined #nim
08:57:46*planetis[m] joined #nim
08:57:46*lqdev[m] joined #nim
08:57:46*zielmicha[m]1 joined #nim
08:57:46*Manny8888 joined #nim
08:57:46*yglukhov[m] joined #nim
08:57:49*xomachine[m] joined #nim
08:58:24*rnrwashere joined #nim
09:00:53*cyberjpn quit (Ping timeout: 245 seconds)
09:03:06*rnrwashere quit (Ping timeout: 252 seconds)
09:04:23FromGitter<bdhb> So the type system would be the main point for choosing Nim?
09:04:55Araqwell Nim also has a macro system and produces standalone binaries
09:05:12*cyberjpn joined #nim
09:08:43*Trustable joined #nim
09:18:38*krux02 joined #nim
09:22:09*cyberjpn quit (Ping timeout: 258 seconds)
09:24:42*cyberjpn joined #nim
09:25:20FromGitter<alehander42> i am mor einterested in mypyc
09:25:23FromGitter<alehander42> compared to cython
09:25:28*clyybber joined #nim
09:25:41FromGitter<alehander42> i think it has more potential as a standalone project
09:25:44FromGitter<alehander42> https://github.com/mypyc/mypyc
09:31:12*cyberjpn quit (Ping timeout: 246 seconds)
09:45:44*PMunch joined #nim
10:19:36*natrys quit (Ping timeout: 244 seconds)
10:20:53leorizeshashlick_: I'm currently unable to install nimterop :/
10:21:53leorizenimterop/build/inc/treesitter_c/src/parser.c:1:10: fatal error: tree_sitter/parser.h: No such file or directory
10:21:57*couven92 joined #nim
10:22:18leorizeinstall by git clone + running nimble install in the same folder
10:31:30*slugm joined #nim
10:33:42*stefanos82 joined #nim
10:34:35*PMunch quit (Remote host closed the connection)
10:46:20*PMunch joined #nim
10:55:27dom96Another day, another RFC: https://github.com/nim-lang/nimble/issues/654
10:58:28*vlad1777d_ quit (Ping timeout: 246 seconds)
11:00:46clyybberdom96: Nice, I thought about it yesterday, too. So you settled on `nimble c`?
11:01:05dom96I think so
11:01:41clyybberI think thats perfect, as long as nimble passes all arguments along to nim, but it currently does so anyways, right?
11:01:49dom96yep
11:02:13dom96One other gotcha that I forgot to mention: we'll need `nimble check` too
11:02:21dom96because `nim check` won't work otherwise
11:02:30FromGitter<liquid600pgm> would `nimble c` still support normal compiler flags like `-r`?
11:02:33clyybberah, yeah.
11:02:41dom96But doing this will actually be better than what we have now, since `nim check` will ignore your .nimble file deps
11:02:46clyybberliquid600pgm Yes
11:02:54*slugm quit (Remote host closed the connection)
11:02:55dom96liquid600pgm: it passes most flags as-is to Nim
11:03:06dom96nimble cpp and js also exists IIRC
11:03:12FromGitter<liquid600pgm> nice, I think it's a pretty perfect solution
11:03:22dom96yay :D
11:03:58dom96Sadly, that's just one of the issues we have on our plate
11:04:18clyybberone issue at a time, nimble will have enough time to shine
11:04:25dom96yeah :)
11:10:50dom96hey PMunch, once you're ready it might be a good idea to submit the Nim playground to HN with a "Show HN:" title
11:11:22PMunchOnce I'm ready?
11:12:19dom96yeah, I don't know if you have any things on your to do list that need to be done before you're comfortable with that
11:12:28dom96btw Share via ix doesn't seem to work
11:12:31dom96Seeing it spin forever
11:13:05PMunchReally? It works fine for me
11:15:52dom96yeah, not sure what's up with it. Are you using FF?
11:29:12*nsf quit (Quit: WeeChat 2.4)
11:29:20*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:33:19*jjido joined #nim
11:37:22FromGitter<alehander42> hmm
11:37:31FromGitter<alehander42> nimble c: is it new idea
11:40:08dom96no, it's been supported for years now
11:43:46*vlad1777d_ joined #nim
11:46:10*Snircle joined #nim
11:50:15FromGitter<alehander42> btw
11:50:21FromGitter<alehander42> why panicoverride gives me
11:52:50*PMunch quit (Remote host closed the connection)
11:53:27*laaron quit (Remote host closed the connection)
11:54:31*laaron joined #nim
12:00:21*Vladar quit (Remote host closed the connection)
12:03:20*rnrwashere joined #nim
12:07:52*rnrwashere quit (Ping timeout: 264 seconds)
12:13:05FromGitter<mratsim> @bdhb My very biaised view on the accelerated Python ecosystem: https://github.com/mratsim/Arraymancer#the-python-community-is-struggling-to-bring-numpy-up-to-speed
12:15:54FromGitter<arnetheduck> btw mratsim.. for your llvm stuff, it would actually be pretty natural to add {.emitll.} support to nlvm, then you could easily generate your IR that way, probably
12:23:38*Nimmer joined #nim
12:29:19NimmerWhen I want to access a C function then I need to tell Nim the exact definition of that C function, right? If the answer is yes, why? I mean Nim compiles to C and when I want to call a function in C then I don't have to tell C the definition either.
12:31:19Araqyes, and here is why: we enjoy type checking.
12:33:00Nimmeroooh.. so that is theoretically easily possible but then Nim wouldn't be able to check whether you pass the right type and then it would rain invalid memory accesses and stack overflows and all that
12:34:15FromGitter<mratsim> @arnetheduck sounds good. Do you know if we can mix C and llvmbitcode in a C file?
12:34:19Araqyeah and afaik not using "prototypes" in C is terrible style too
12:34:44Araqand only supported because of legacy code, GCC warns about it, C++ does NOT support it
12:35:45dom96I've got a project on my to-do list that would make this possible via libclang
12:35:53FromGitter<mratsim> if it makes for easier compile, I'd like to output vector code as llvm bitcode instead of OpenCL C or Cuda C
12:35:59FromGitter<arnetheduck> @mratsim not that I know
12:36:36dom96You should be able to approximate the C/C++ signatures in Nim pretty well automatically, once you do you just need a macro that generates them
12:36:46dom96getting 90% support should be possible fairly quickly
12:38:25FromGitter<arnetheduck> ...and the remaining 10% will keep your program incorrect 100% of the time :)
12:39:12FromGitter<arnetheduck> @mratsim the modern way is actually to keep the IR in a separate file and LTO - this is what I'd recommend doing over any `emit` tricks, but you've asked about it before
12:40:32FromGitter<mratsim> for now I'll focus on generating C at compile-time (https://github.com/mratsim/compute-graph-optim/blob/master/e11_DSL_compiler_seq.nim), then llvm bitcode at JIT time. The fancy mixes are for much later :p
12:41:42dom96arnetheduck: that's provably not true, creating partial wrappers is a strategy we all continue to use
12:46:33FromGitter<arnetheduck> yes, and the mentality has given nim a stellar track record on stability :)
12:47:11FromGitter<mratsim> Ttmath was a typical example :P
12:47:26FromGitter<mratsim> but I guess the issue was on C++
12:47:54FromGitter<mratsim> C wrappers don't give much issues.
12:48:44FromGitter<alehander42> blame me for ttmath, dont blame the technique :P
12:48:56FromGitter<mratsim> I'm not blaming you
12:49:19FromGitter<arnetheduck> well, if you don't have a c prototype, C guess it from use - if your use is even subtly wrong, or if you do have a prototype and it's subtly wrong, your function call is compromised because the ABI will not be satisfied. is that *really* the kind of bug you want to deal with, and encourage others to have to deal with?
12:49:39FromGitter<mratsim> You took a reasonable and argumented decision while alone and having to translate a Python codebase to Nim, to quickly get somethign up-and-running by not reimplementing bgint from scratch
12:49:54FromGitter<mratsim> ^ nothing wrong
12:50:21FromGitter<alehander42> i was kinda kidding hehe, i mean something else, dont blame partial wrappers as well: they do have those issues, but still no better alternative in some cases indeed
12:51:34dom96You do have a C prototype though
12:51:51dom96If you wrap it wrong you'll get errors
12:53:12FromGitter<arnetheduck> you'll get compile-time errors *sometimes* - other times you'll get runtime errors in the form of hard-to-explain bugs
12:54:35FromGitter<alehander42> but you can still generate signatures for those cases where it's obvious what the nim equivalent is/sure that this is the right match and generate a list of "manually fix/ignore/do something those signatures left"
12:54:44dom96exactly
12:54:57dom96Why would I generate some random signature if I'm not sure it's correct?
12:55:07dom96Fail early, and fail fast is always a good idea
12:55:17FromGitter<arnetheduck> sure. as long as you don't try to approximate the signature itself.
12:56:44Araqif you want to know the reasons why Nim's stability leaves a lot to be desired you got to do a decent analysis, you cannot simply blame exceptions for it until you found a new scapegoat in the form of FFI calls
12:56:56*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
12:57:25dom96+1
13:09:27Araqbesides, you offer no solution anyway, using C headers with C is already underspecified, 'int*' -- is this a pointer to an array? or an output parameter?
13:11:32*Nimmer quit (Quit: Page closed)
13:22:07FromGitter<arnetheduck> the solution is that the best you can do is manual curation in many situations, simply because multiple nim features map to the same c feature and c doesn't allow you to automatically disambiguate them, based on the information present in a header file..
13:24:05*narimiran joined #nim
13:25:07*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
13:25:10Araqok but the "manual curation" is also error prone if you don't know enough about both Nim and C and then your nice "argument" still applies, what if you get it wrong, do you really want to debug this then, think about the childen and omg we are all gonna die
13:25:40*laaron joined #nim
13:26:38FromGitter<mratsim> > _>
13:26:59FromGitter<mratsim> Desperate Nimwives
13:31:43FromGitter<arnetheduck> "if you don't know enough" - so I wouldn't market it as if they don't need to know enough, simple as that.
13:37:22*banc quit (Ping timeout: 246 seconds)
13:38:32*vlad1777d_ quit (Ping timeout: 255 seconds)
13:39:29*banc joined #nim
13:43:49FromGitter<arnetheduck> btw araq, if I redo the genXxx patch to do just `genXxx` and no `genNodeXxx`, will you take it? another thing, wdyt about moving all magic implementations to `ccgmagic.nim`?
13:44:24shashlick_@leorize I'll be check in a couple hours - CI seems to run fine
13:45:04*deech joined #nim
13:45:08shashlick_Presume you deleted build, git latest etc
13:45:17shashlick_What os?
13:51:47leorizelinux
13:54:54*solitudesf joined #nim
13:56:15leorizeshashlick_: found the prob
13:56:23leorizeturns out that I have to delete the stale build folder
13:56:57*nsf joined #nim
14:07:27*deech quit (Ping timeout: 244 seconds)
14:09:14Araqarnetheduck: genXXX and gemXXX ?
14:09:21Araqn for node, m for magic
14:09:39Araqinclude file is also fine though I don't understand its purpose
14:12:36clyybberAraq: Is it fine to add the destructors for globals in myClose?
14:13:06Araqclyybber, I doubt it, but we'll see
14:14:05clyybberThe problem is where to store those, since we have to inject them at the end of the main module.
14:14:13FromGitter<arnetheduck> magics forms the interface between compiler and standard library basically, seems reasonable to keep them together - specially because the ccgstmts and ccgexprs split is kind of obsolete
14:15:42*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:15:54FromGitter<arnetheduck> in theory it seems that one should be able to explicit magics altogether, though I guess diagnostics are better with them / slightly easier to keep the name stable
14:15:54*deech joined #nim
14:16:35FromGitter<arnetheduck> in nlvm, I have to detect a few of them by symbol+module name because they have better implementations in llvm (like byte swapping or memcpy)
14:17:24*djellemah joined #nim
14:24:32*vlad1777d_ joined #nim
14:30:07clyybberAraq: Is system allowed to use global variables?
14:31:07FromGitter<mratsim> sounds like Pandora box
14:31:46dom96My god, why did I ever merge freaking asyncdispatch upcoming. The code in selectors probably has the highest cyclomatic complexity I've ever seen
14:32:36FromGitter<mratsim> I'm sure any jquery-based code beats that hands down :p
14:32:45dom96I just spent 4+ hours looking for a bug and it was caused by selectInto happily accepting -3000 as a timeout
14:33:11*jjido joined #nim
14:33:17Zevvthat's a nice spot for adding an assert
14:34:08dom96https://github.com/nim-lang/Nim/blob/devel/lib/pure/ioselects/ioselectors_epoll.nim#L371-L487
14:34:34*banc quit (Ping timeout: 258 seconds)
14:35:30FromGitter<mratsim> Smells like Go: https://github.com/nim-lang/Nim/blob/devel/lib/pure/ioselects/ioselectors_epoll.nim#L465-L470
14:37:24*gmpreussner quit (Quit: kthxbye)
14:41:18*djellemah quit (Ping timeout: 245 seconds)
14:46:02*gmpreussner joined #nim
14:48:35*al_ quit (Quit: al_)
14:50:27*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:52:34dom96Can whoever maintains the VS code package please stop it from spawning dozens of nimsuggest instances when project is opened/files change?
14:53:25*kapilp joined #nim
14:55:23*banc joined #nim
14:56:45*rnrwashere joined #nim
14:58:37*vlad1777d_ quit (Ping timeout: 255 seconds)
15:00:01clyybberAraq: PR is ready for feedback: https://github.com/nim-lang/Nim/pull/11230
15:05:41*vivus joined #nim
15:05:58vivusHello. I think there is a bug in the parsecsv library
15:09:09leorizecan you describe the bug?
15:12:38vivusI tested my code to read a CSV file in Python and it worked. When I try to run similar code in Nim, it causes an error, as shown here: https://dpaste.de/Uqdu
15:13:47FromDiscord<treeform> do you have your csv file?
15:14:47clyybbervivus: The csv file seems to be invalid. It expected a tab where there is none. We need the csv file to investigate further
15:14:51vivushere: https://dpaste.de/2Efg I hope it pastes correctly
15:15:55vivusif you need my Python code, I can send that also
15:17:07clyybbervivus: The csv file is the problem
15:17:15clyybberlook at line 491
15:17:32clyybberafter prover. there should be a tab, but there is none
15:18:06FromDiscord<treeform> I guess python's csv is more forgiving towards things like this?
15:18:59*djellemah joined #nim
15:19:52*djellemah quit (Client Quit)
15:20:05*djellemah joined #nim
15:24:21*gmpreussner quit (Ping timeout: 246 seconds)
15:25:10*Vladar joined #nim
15:27:02*gmpreussner joined #nim
15:30:26FromGitter<mratsim> CSV is an awful format for parsers
15:31:12FromGitter<mratsim> http://thomasburette.com/blog/2014/05/25/so-you-want-to-write-your-own-CSV-code/ and http://www.secretgeek.net/csv_trouble are pretty fun regarding the woes of parsers
15:32:45*rnrwashere quit (Remote host closed the connection)
15:37:14vivusclyybber: but how does it work in Python?
15:38:46vivusI verified that line in the Python CSV parser and it outputs it correctly
15:49:44leorizeclyybber: there's a tab there
15:51:44leorizevivus: can you open a bug with that exact line?
15:51:54leorizelooks like it dies after the ending "
15:52:50leorizevivus: ah, found the problem
15:53:14vivusis it the csv file? leorize
15:53:18leorizeadd `quote = '\0'`
15:53:36leorizeto the param list
15:53:43leorizethis is because Nim's csv parser supports quoting
15:54:00leorizeand enable it by default
15:54:36leorizesee https://nim-lang.github.io/Nim/parsecsv#open%2CCsvParser%2CStream%2Cstring%2CChar%2CChar%2CChar
15:54:37vivuswhat does '\0' mean?
15:55:09FromGitter<liquid600pgm> it's the null character
15:55:10leorizeASCII character with decimal value of 0
15:55:14leorizeaka nul
15:55:29vivusoh it says use that to disable parsing of quotes
15:55:58vivusso to understand what went wrong, the problem is that it was parsing the " chars?
15:56:34leorizeyea, it considers "A rolling stone gathers no moss" was a field
15:56:49leorizeso it expects that there will be the separator char after
15:56:53leorizebut it didn't find any
15:56:59vivusoh and then it was looking for a \t after the "
15:57:25vivuswow, I would have never found this on my own. ty leorize and everyone else for discussing
15:58:11vivusquestion, why does it treat the "A rolling stone gathers no moss" as a field?
15:58:31leorize`quote`: Used to quote fields containing special characters
15:59:14leorizeit's written in the doc :P
15:59:36shashlick_@leorize how did you end up with the bad build dir
15:59:54vivusit's a bit confusing for me. "Used to quote fields containing special characters like separator, quote" meaning " is used for special chars like " ?
16:00:01leorizeshashlick_: I used the old one from an older checkout
16:00:32shashlick_Tree-sitter changed some stuff a while back
16:00:51leorizevivus: basically you can have your separator in the quote and the parser would ignore it
16:00:52vivusthis might sound strange, but how do you use a quote to quote a quote? """myquote""" ?
16:01:01leorizesee `escape` :p
16:01:07leorizestill in the same doc :p
16:01:29leorizeand yea you can quote like that
16:02:00*laaron quit (Remote host closed the connection)
16:02:28shashlick_What was the earlier discussion around wrappers about? A one liner summary someone?
16:04:31FromGitter<mratsim> wrapper, good or bad, good enough or bad, pitfalls or using headers and accidentally not nailing the actual ABI of the type
16:04:36FromGitter<liquid600pgm> is recursive module dependency support *ever* coming to the language?
16:04:40FromGitter<mratsim> pitfalls of*
16:04:46*djellemah quit (Ping timeout: 255 seconds)
16:05:08FromGitter<liquid600pgm> I've been trying to solve one for about 20 minutes and it's driving me nuts
16:05:09*laaron joined #nim
16:05:14FromGitter<mratsim> @liquid600pgm, everyone wants it
16:05:51FromGitter<mratsim> Latest discussion: https://forum.nim-lang.org/t/4745
16:06:01vivusleorize: `escape`: removes any special meaning from the following character; <- which character?
16:08:37vivusoh is it the NULL char?
16:09:11shashlick_Hey at least you can leverage most c/c++ relatively easily instead of having nothing or a super painful time with swig
16:11:03narimiranvivus: whichever you pass to `escape` parameter; that's at least how i read that
16:11:22FromGitter<mratsim> My main issue with wrapper is that they don't work at compile-time :/, I wanted compile-time bigints so wrote one from scratch, and right now same thing with polyhedral representation of "for loops"
16:11:24narimiranby default (if you don't pass anything) it is '\x00'
16:13:06shashlick_That was being worked on a bit right? Was it @timotheecour?
16:13:33FromGitter<mratsim> yes
16:14:09FromGitter<mratsim> but even then, without being able to pass a pointer in the VM to the C code I don't see what you can do beyond trivial types
16:14:51FromGitter<mratsim> Or .... it actually works? https://github.com/nim-lang/Nim/pull/10150
16:15:37shashlick_Dumb question but why not compile chunks at compile time instead of using the vm? Does that even make sense
16:15:52FromGitter<mratsim> define "chunks"
16:16:10FromGitter<mratsim> ah it was probably disabled: https://github.com/nim-lang/Nim/pull/10150#issuecomment-466636693
16:16:31FromGitter<mratsim> cc @Araq ^, compile-time FFI is off right?
16:17:00shashlick_The parts that are run in the vm at compile time, why not compile those all the way and use the results at the next stage of compilation?
16:19:25FromGitter<mratsim> I use something similar for this project: https://github.com/numforge/agent-smith/tree/master/third_party, fist a build a wrapper then I build on top. Main reason was that C++ compilation was too slow.
16:20:09FromGitter<mratsim> in my new project case, it's a bit more complex because the first stage is not fixed and it's user-extensible.
16:20:59shashlick_I guess because the vm is acting on the ast so going external makes it harder
16:21:12shashlick_But I do the same with nimterop plugins
16:21:13FromGitter<mratsim> I'm doing a compiler for an embedded language, so I have my own AST so that's actually fine
16:21:38FromGitter<mratsim> but if I build using 2 stages, I'd rather do a compiler plugin and build a custom nim compiler
16:22:49FromGitter<mratsim> right now this is what I have, the compiler is implemented as macro: https://github.com/mratsim/compute-graph-optim/blob/master/e11_DSL_compiler_seq.nim#L972-L973
16:23:42*jjido joined #nim
16:24:46FromGitter<mratsim> For further optimizations, I need to represent loops and nested loops as matrices and solve an "integer linear programming" problem. The same ones people use to optimize airplane crew or truck drivers schedules.
16:25:01FromGitter<mratsim> or knapsack for that matter
16:25:30FromGitter<mratsim> so I need a linear programming solver that can run in Nim VM.
16:29:07*krux02 quit (Remote host closed the connection)
16:29:13*deech quit (Ping timeout: 245 seconds)
16:46:19shashlick_Using the vm is arguably two stages anyway
16:46:25*rnrwashere joined #nim
16:47:09shashlick_I also had to split nimterop into a separate binary and compile time portion due to ffi
16:47:57shashlick_But it works well since it allows stand alone cli execution and is many times faster
16:49:00shashlick_But i agree I do a lot of cool stuff at compile time in cimport and that's because of the vm
16:49:37*rnrwashere quit (Remote host closed the connection)
16:49:40shashlick_Anything that doesn't act on the nim ast itself can arguably be done with a separate exe
16:50:33*rnrwashere joined #nim
16:52:21*vivus quit (Remote host closed the connection)
16:53:38*theelous3 joined #nim
16:54:48clyybberleorize: oh, my bad :D
16:57:59*jjido quit (Ping timeout: 258 seconds)
17:04:03*ng0 joined #nim
17:06:37FromGitter<kaushalmodi> shashlick: template.nim: https://github.com/nimterop/nimterop/blob/master/nimterop/templite.nim nice :)
17:07:01FromGitter<kaushalmodi> Ugh: templite got autocorrected to template
17:07:21FromGitter<kaushalmodi> When are you planning the next release of nimterop?
17:09:25*vlad1777d_ joined #nim
17:10:29FromGitter<mratsim> Seems like a nice post on the current state on C++ UI toolkits: https://philippegroarke.com/posts/2018/c++_ui_solutions/
17:14:19shashlick_It's all head at this point @kaushalmodi
17:14:32shashlick_I've been resisting making releases for some reason
17:20:39*xet7 joined #nim
17:29:45*rnrwashere quit (Remote host closed the connection)
17:30:01*rnrwashere joined #nim
17:30:21*nsf quit (Quit: WeeChat 2.4)
17:42:16*kapilp quit (Quit: Connection closed for inactivity)
17:43:58dom96This is so frustrating, the amount of templates in asyncdispatch/selectors is crazy.
17:44:54clyybberdom96: on another bug hunt?
17:45:08dom96of course, it's my life
17:45:19dom96This is actually the bug that I wanted to fix in the first place
17:45:31dom96looks like I'll need to eventually refactor all of async because ugh
17:48:04*deech joined #nim
17:49:21narimiranwouldn't then embracing https://github.com/status-im/nim-chronos be easier/better solution? (disclaimer: i don't use neither stdlib async nor chronos, this is genuine question)
17:49:42dom96chronos breaks the API
17:50:47dom96And I really don't think adopting it is a good idea
17:51:17dom96I was far more willing before I had to fix these bugs in async
17:52:18narimiranand if we put API differences aside? does it provide something extra, does it solve some problems differently, does it prevent some unwanted things? (once again, the only thing i know about async are (lots of) bugs in our issue tracker)
17:52:34narimirannice to hear that!
17:55:58FromGitter<mratsim> @dom96 Araq told me last year at FOSDEM that he already mentionned that to the pragmagic team, about the VScode/nimsuggest instance spawning
17:56:38FromGitter<mratsim> afaik this is also related: https://github.com/pragmagic/vscode-nim/issues/118
17:57:33narimiranabout that spawning: how much is too much? leorize's plugin for neovim has new nimsuggest for every file you open, and i don't really have any problem with that
17:57:51narimiranon the other hand, 3.5G of RAM taken by nimsuggest..... ungh
17:57:53FromGitter<mratsim> one instance is enough
17:58:01dom96yeah, you don't need an instance for each file IMO
17:58:08dom96in fact, you shouldn't do that
17:58:22dom96it should be nimsuggest per project
17:58:31dom96It's not the RAM that bothers me, it's the CPU usage
17:59:06FromGitter<mratsim> nimsuggest starts spinning on macros, expecially incomplete ones
17:59:29narimiranwhen all other programs and OS take 2GB, and nimsuggest on its own takes 3GB, yep, it is an embarrassing problem
18:00:39FromGitter<mratsim> you should add that to v1, maybe with a tag "polish"
18:00:43narimiranbtw, there is a switch where we can limit the max amount of RAM nimsuggest takes; and currently is 2GB for 32-bit and 4GB for 64-bit
18:01:19narimiran@mratsim then v1 will never be released :D a lot of heros tried to fix the leaks, but all had died in the battle
18:01:49narimiran(hm, maybe it is just one leak, not plural, not sure)
18:01:50FromGitter<mratsim> I think it's important to have decent tooling experience for v1
18:02:10FromGitter<mratsim> You will be the one dealing with the RAM usage memes ;)
18:02:30dom96nimsuggest doesn't have to be part of v1
18:02:39FromGitter<mratsim> https://www.linuxatemyram.com/atemyram.png
18:02:41dom96in fact, I would say it's nowhere near ready to be called 1.0
18:02:58dom96it's a separate project and it should be viewed as such
18:03:08FromGitter<mratsim> but people will try Nim with Vscode or Neovim or Atom or Sublime plugin
18:03:16narimiranswitch to LSP?
18:03:49FromGitter<mratsim> they will experience everything: Nim + Nimble + Nimsuggest + build/install instructions, probably choosenim as well
18:04:16FromGitter<mratsim> the documentation and tooling should be good enough.
18:04:21*Vladar quit (Remote host closed the connection)
18:04:30dom96Then maybe we should just remove it, am I the only one that simply doesn't use it?
18:04:36FromGitter<mratsim> that is also what distro may ship for a long time
18:04:42FromGitter<mratsim> I use it.
18:05:30FromGitter<mratsim> so I think a "polish" tag might be useful for things that are very visible and will affect users first impressions.
18:05:45narimirani use it via the mentioned nvim plugin and i find the experience nicer than when i used vscode
18:06:07dom96Perhaps what we need is an official Nim VS code plugin
18:06:55clyybberyeah
18:07:12FromGitter<mratsim> There are 3 issues here: ⏎ ⏎ 1) RAM usage, it's on nimsuggest ⏎ 2) CPU usage, it's on nimsuggest ⏎ 3) launching 1 instance per file, it's on the plugin author [https://gitter.im/nim-lang/Nim?at=5cd70f505a1d435d4624cfe0]
18:07:30FromGitter<zacharycarter> I used nimsuggest when I was first getting started with Nim
18:07:32FromGitter<zacharycarter> now I do not at all
18:07:54dom96In any case, I doubt many languages got something like nimsuggest for v1
18:08:04*deech quit (Ping timeout: 255 seconds)
18:08:10leorizenarimiran: not every file :P every project to be precise
18:08:41narimiranleorize: oh? so it works as dom96 said it should work?
18:08:44leorizeit depends on the fact that you only use one neovim instance to edit files however :p
18:09:09leorizeyep, I designed it that way because I got sick of the spawn per file behavior :p
18:09:10FromGitter<mratsim> But not many language reach v1 as well, so people might expect much more from a language (not even talking about the libraries)
18:09:17narimiranyeah, one nvim instance for nim files. (other instances have nothing to do with nim)
18:10:14*deech joined #nim
18:10:40FromGitter<mratsim> @narimiran upcoming nimsuggest meme, https://media.wired.com/photos/59323d202a990b06268a9542/master/w_660,c_limit/google_chrome_ram.jpg with the feednim logo, https://github.com/johnconway/feed-nim/raw/master/logo.png
18:11:20dom96You know, that wouldn't be worst thing
18:11:32dom96And it would very easy impact for us to have
18:14:11narimiran@mratsim if the leak(s) don't get fixed in time, i think we should at least put those limits way down so it at least doesn't look very bad :)
18:15:30narimiranit kills itself and the new instance should start automatically, nobody gets hurt. and we don't see memes about hungry nimsuggest
18:21:13*deech quit (Ping timeout: 246 seconds)
18:24:41dom96yes, this is exactly what I envisioned for an LSP server to do
18:24:48dom96CPU >50%: kill
18:24:57dom96Memory usage >2gb: kill
18:36:10*zahary joined #nim
18:42:47clyybbernarimiran: Instead we get memes about nimsuggest being suicidal
18:43:07narimiranclyybber: nah, about nimsuggest resurrection
18:46:51narimiranleorize: question about "per project". i usually work in nim repo, i consider than one project, but i have multiple instances of nimsuggest there
18:47:09narimiranor does it treat every subdirectory as a separate project?
18:47:23leorizenope
18:47:49leorizeit will reuse a project in outer dir if possible
18:48:09*djellemah joined #nim
18:48:45leorizethe logic is smt like this: a/b/c.nim -> check & use a/b -> check & use a/ -> spawn a/b
18:49:10leorizefor nim repo just start your editing session with compiler/nim.nim
18:50:54narimirani start from the outer-most directory, where i have some local testing files; and then the most of the time i use something in ./lib/pure/
18:52:42leorizethat's should be supported
18:52:52leorizewell, unless nimsuggest crash while editing
18:52:55leorizewhich is not rare
18:53:04narimiran...and now i have 4 nimsugests open. sometimes even more
18:53:08dom96Do you not look for .nimble files?
18:53:12leorizeI'll have to implement session respawning somehow
18:53:30leorizedom96: too much work imo
18:54:00dom96how so?
18:54:22leorizeI start things asynchronously
18:54:45leorizethis would means three different handlers for nimble and nimsuggest :P
18:55:03leorizeI'd prefer that nimsuggest could do this automatically
19:01:54clyybbernarimiran: ressurection by suicide, this is getting dark :p
19:03:16*vlad1777d_ quit (Ping timeout: 258 seconds)
19:07:04*kapilp joined #nim
19:18:55*rnrwashere quit (Remote host closed the connection)
19:20:10*rnrwashere joined #nim
19:28:41*rnrwashere quit (Remote host closed the connection)
19:32:16*rnrwashere joined #nim
19:36:40*theelous3 quit (Read error: Connection reset by peer)
19:36:51*rnrwashere quit (Ping timeout: 250 seconds)
19:37:01*djellemah quit (Ping timeout: 258 seconds)
19:37:06*theelous3 joined #nim
19:39:41dom96oh boy, `./koch tests --help` took far more time than I expected
19:40:37dom96Does it recompile Nim each time?!
19:46:47dom96Finally, fixed this darn bug
19:49:30*djellemah joined #nim
19:50:31*Jesin quit (Quit: Leaving)
19:50:45disruptekjust found a bug in coreutils. it never ends.
19:52:18dom96This is our life now. Bugs bugs bugs
19:54:03*nuxdie joined #nim
19:55:56clyybberdom96: and they just keep bugging you
19:56:06*nuxdie quit (Client Quit)
19:59:37*solitudesf quit (Quit: Leaving)
19:59:45dom96After using hg at work, I really am starting to think using it is nicer than git
20:00:19FromGitter<kaushalmodi> dom96: really? I'm really digging git.
20:00:22livcddom96: tell us some secrets from work
20:00:33FromGitter<kaushalmodi> May be because of Emacs/magit
20:00:45dom96A lot of it is possibly phabricator
20:01:05dom96GitHub is absolutely poor in comparison
20:02:10*nuxdie joined #nim
20:02:35dom96Currently trying to figure out how to move my damn commit onto another branch
20:02:55dom96Why isn't there just a simple `git rebase --src hash --dest hash`?
20:03:18*narimiran quit (Ping timeout: 246 seconds)
20:06:24clyybberdom96: Try cherrypicking
20:07:00dom96yeah, looking at how to use it now
20:07:33*nuxdie quit (Remote host closed the connection)
20:07:50*nuxdie joined #nim
20:07:54*nuxdie quit (Remote host closed the connection)
20:08:11*nuxdie joined #nim
20:08:23dom96also the "smartlog" that FB has for hg is wonderful
20:09:10*jjido joined #nim
20:09:11*nuxdie quit (Remote host closed the connection)
20:10:26*nuxdie joined #nim
20:10:56*nuxdie quit (Remote host closed the connection)
20:11:11*nuxdie joined #nim
20:11:40clyybberHow can I exclude files from megatest?
20:11:59clyybberas in, still test them, but not merge them into megatest
20:13:37clyybberah I see, its `joinable: false`
20:13:58dom96Another great thing I picked up recently is to write how you've tested PRs in your PR description.
20:14:07dom96Others might very well benefit
20:14:14dom96https://github.com/nim-lang/Nim/pull/11232
20:16:33*zahary quit (Quit: Leaving.)
20:26:28*Jesin joined #nim
20:30:36*theelous3 quit (Ping timeout: 246 seconds)
21:00:04FromGitter<liquid600pgm> is there any way of doing something when an async socket disconnects?
21:00:38dom96When a socket disconnects `recv` will let you know
21:00:42dom96by returning ""
21:08:30*deech joined #nim
21:13:43*bars0 quit (Quit: leaving)
21:31:38*zahary joined #nim
21:33:25*kapilp quit (Quit: Connection closed for inactivity)
21:34:40shashlick_Good to have you back @dom96
21:35:11dom96You mean it's good I'm submitting PRs? :)
21:35:36dom96I don't think I've ever left, but I guess it might seem that way
21:37:06shashlick_Just being active on irc itself
21:39:04*PMunch joined #nim
21:52:11FromGitter<liquid600pgm> dom96: is that the same for recvLine?
21:52:33dom96Yes, see the docs: https://nim-lang.org/docs/asyncnet.html#recvLine%2CAsyncSocket
21:52:51*rnrwashere joined #nim
21:53:18*NimBot joined #nim
21:54:24FromGitter<liquid600pgm> thanks!
21:55:05FromGitter<liquid600pgm> I'm trying to use the regex library, but doing `myString[match.group(1)]` yields a type mismatch. how am I supposed to get groups from my matches?
21:57:30*rnrwashere quit (Ping timeout: 252 seconds)
21:57:39dom96bah, does GitHub really not allow you to change an "active" PR into a draft staet?
21:57:40dom96*state
22:00:59*djellemah left #nim ("Leaving")
22:14:12*deech quit (Ping timeout: 245 seconds)
22:23:26*Trustable quit (Remote host closed the connection)
22:27:56*rnrwashere joined #nim
22:30:54*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:31:03*deech joined #nim
22:32:06*jjido joined #nim
22:33:29*zahary quit (Quit: Leaving.)
22:38:21dom96oh boy, I should have tested my fix in my game
22:44:52*nuxdie quit (Ping timeout: 268 seconds)
22:45:20*nuxdie joined #nim
22:45:35*nuxdie quit (Client Quit)
22:47:28*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:58:00*stefanos82 quit (Remote host closed the connection)
23:03:49*rnrwashere quit (Remote host closed the connection)
23:15:48*clyybber quit (Quit: WeeChat 2.4)
23:32:52dom96whew. I can safely say that the memory leak is now fixed in my server
23:33:30dom96The way I've reproduced it is actually a potentially effective websocket DoS
23:38:08*PMunch quit (Remote host closed the connection)
23:52:53*cyberjpn joined #nim