00:14:05*Acid147 joined #nim
00:16:12*Acid147 quit (Remote host closed the connection)
00:17:18*Acid147 joined #nim
00:18:27*lmariscal[m] joined #nim
00:23:12*lmariscal[m] left #nim (#nim)
00:23:22*lmariscal[m] joined #nim
00:28:45*lmariscal[m] is now known as LeonardoMariscal
00:47:45*Acid147 quit (Remote host closed the connection)
00:57:36*Jjp137 quit (Ping timeout: 248 seconds)
01:15:53*jokul quit ()
01:21:23*theelous3_ quit (Ping timeout: 268 seconds)
01:24:27*jokul joined #nim
01:29:23*sealmove joined #nim
01:44:16*Jjp137 joined #nim
01:46:53*sealmove quit (Quit: WeeChat 2.4)
02:34:21*laaron- joined #nim
02:34:29*laaron quit (Remote host closed the connection)
02:38:27leorize[m]shashlick: you can pass ucpu=amd64 to make. The makefile just reuse uname, which might be dependent on the version of mingw used
02:41:14*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:44:17*i7sDream_ joined #nim
03:00:28*jokul quit ()
03:00:48*deech_ joined #nim
03:02:08*fjellfras joined #nim
03:02:53*deech__ joined #nim
03:05:52*deech_ quit (Ping timeout: 245 seconds)
03:13:36shashlickya but will be ideal if it could auto-detect like build.bat and choosenim do
03:26:38*deech__ quit (Ping timeout: 272 seconds)
03:33:49*fjellfras_ joined #nim
03:36:46*fjellfras quit (Ping timeout: 272 seconds)
03:36:53*deech joined #nim
03:39:58*jokul joined #nim
03:41:52*fjellfras_ quit (Ping timeout: 248 seconds)
03:48:07*fjellfras_ joined #nim
03:48:36*deepend_ joined #nim
03:49:15*deepend quit (Ping timeout: 248 seconds)
03:49:15*cybj quit (Ping timeout: 248 seconds)
03:51:23*rayman22201 quit (Ping timeout: 248 seconds)
03:52:19*rayman22201 joined #nim
03:53:03*cybj joined #nim
03:55:56*deech quit (Remote host closed the connection)
03:56:21*deech joined #nim
04:00:09*dddddd quit (Remote host closed the connection)
04:04:43*deech quit (Ping timeout: 248 seconds)
04:06:16*nsf joined #nim
04:26:09*Lord_Nightmare quit (Ping timeout: 244 seconds)
04:38:49*Lord_Nightmare joined #nim
04:41:15*Lord_Nightmare quit (Excess Flood)
04:44:43*deepend_ is now known as deepend
04:47:19*Lord_Nightmare joined #nim
05:04:39*rockcavera quit (Remote host closed the connection)
05:05:00*rockcavera joined #nim
05:08:32*Trustable joined #nim
05:08:32*leorize quit (Quit: WeeChat 2.3)
05:09:17*Trustable quit (Remote host closed the connection)
05:21:55*NimBot joined #nim
05:23:37*narimiran joined #nim
05:30:43*fjellfras_ quit (Ping timeout: 258 seconds)
05:39:44shashlickgosh tables is badly broken in 0.20.0
05:40:08narimiranshashlick: what's wrong this time?
05:40:24shashlickall calls to newTable are crashing for me
05:40:32shashlickenlarge is causing a crash too
05:41:01narimirancan you make a short example?
05:41:19shashlickthis is all in my text editor so unclear if it is because of threading or boehm or what
05:42:00shashlickinitializing to size 256 by default but it adds 20 odd elements then starts from 1 again
05:42:13shashlickchecking table.len in a loop
05:42:16shashlickjust weird stuff
05:43:16Araqshashlick, do you use the new no-init feature of tables?
05:43:47*dwdv joined #nim
05:43:48shashlickno i was stuck on 0.19.6 since i didn't have time to port to devel
05:43:52narimiranhe mentions `newTable` - ref tables still have to be initialized
05:44:25shashlickam changing my TableRefs to pure Table and using no-init and it is fixing some of my plugins
05:44:34shashlickbut filetype is borked
05:45:12shashlickcrashes https://github.com/genotrance/feud/blob/master/plugins/server/filetype.nim#L46 since i'm adding more than 64 and enlarge is crashing
05:52:44shashlickalso, you could add an array to a seq, but that doesn't work anymore - gives a segmentation fault
05:57:54*leorize joined #nim
06:03:21leorizenarimiran: i've looked further into azure's windows ci
06:03:31leorizeit's just... broken
06:03:35leorizeand I don't even know why
06:04:19leorizeturns out not only tfloatrange was dying, but niminaction tests got checksum mismatch
06:04:24leorizeso faulty code was generated somehow
06:04:48shashlickobviously making a minimal example will need me to generate more grey hair
06:13:02Araqshashlick, use the older version until we figured it out, you're not the first who reported problems with boehm
06:13:28Araqprobably the newruntime will be ready before we figured out the problems with Boehm though :-)
06:18:09shashlickwell, i can try without boehm but i know all sorts of memory issues will show up
06:18:21*PMunch joined #nim
06:19:26shashlickokay what does NimMain do in a DLL?
06:19:48shashlickfor some weird reason, my onLoad() proc runs even though it hasn't been LoadLib()'d
06:20:11shashlicksorry symAddr()'d
06:20:43AraqNimMain should run the module init sections, always
06:21:04Araqit doesn't matter if you generate a DLL or a program, the init sections must run
06:21:54shashlickbut how is it calling my exportc proc
06:22:29shashlickugh never mind
06:25:35shashlickwell, here's a change in behavior - in 0.19.6, when my dll had an isMainModule, it didn't get pulled into NimMain, in 0.20.0, it does
06:25:44shashlicki am compiling with --app:lib
06:26:10*cyberjpn joined #nim
06:26:18Araqinteresting but I cannot tell what is the better/right behaviour
06:26:19narimiranleorize: we can always just disable that two tests on windows ;)
06:26:45leorizeandddd hcr gone flaky again :p
06:30:51*rheoli joined #nim
06:31:48*rheoli quit (Client Quit)
06:32:54PMunchHmm, is there any documentation for what parseFloat can actually parse?
06:33:51*Senketsu quit (Quit: WeeChat 2.4)
06:34:21*cyberjpn quit (Quit: WeeChat 2.4)
06:34:26Araqa floating point number :P
06:35:29PMunchWell yes
06:35:33PMunchBut the format of tehm
06:35:54PMunch3.14 is obviously valid, 10e5 as well
06:36:31PMunch10_000 is also valid, which might suprise some people
06:38:48shashlickokay i need to bed, been frustrating getting my < 1500 line editor ported from 0.19.6 => 0.20.0
06:39:24PMunchHmm, what's the trouble shashlick?
06:39:35PMunchI found porting most my things was fairly easy
06:39:37AraqBoehm GC afaict
06:39:55Araqand DLLs
06:40:29PMunchAah, yeah I've never gotten those to work properly..
06:41:08leorizenarimiran: I'm downgrading windows to win server 2016 now (similar to appveyor), hopefully that'll make a difference
06:41:31shashlicktable enlarge crash
06:44:39PMunchAh, that looks fun
06:44:43leorizeAraq: nimsuggest won't work unless compiled with -d:danger, should I file an issue?
06:45:05shashlickeven though I asked it to init at 256
06:45:22shashlickbasically this is overflowing elsewhere and i'm just poking at the wrong thing
06:46:49Araqleorize, yes, please. or better: fix it
06:52:13leorizenarimiran: yay, tried on travis' windows: tfloatrange failing too
06:52:22narimiranyay :P
06:52:56leorizeif I'm lucky, this "downgrade" should "fix" the problem
06:58:55shashlickokay replaced every instance of TableRef/newTable with a Table and i think it is kind of working
07:00:00*gmpreussner quit (Quit: kthxbye)
07:03:59shashlicktbd 🙂
07:04:31*gmpreussner joined #nim
07:05:15shashlicknope, still get random crashes
07:05:21shashlickrun 3 out of 4 times
07:08:26*krux02 joined #nim
07:17:19ZevvPMunch: https://nim-lang.github.io/Nim/manual.html#lexical-analysis-numerical-constants?
07:19:01PMunchAha, so it's just exactly the same as what Nim considers a float
07:21:43*Vladar joined #nim
07:26:16*couven92 joined #nim
07:27:56*NimBot joined #nim
07:32:34shashlickdoes parsexml now work at compile time?
07:33:47shashlickor xmlparser
07:35:09shashlicknope - Error: VM is only allowed to 'cast' between integers and/or floats of same size
07:35:51leorizeshashlick: https://github.com/nim-lang/Nim/pull/11459
07:38:07leorizeshashlick: what version of gcc did you use for tfloatrange test?
07:47:12*Vladar quit (Remote host closed the connection)
08:04:24*leorize quit (Remote host closed the connection)
08:06:28*floppydh joined #nim
08:08:41*Acid147 joined #nim
08:09:01*leorize joined #nim
08:27:06*salewski joined #nim
08:28:20salewskiWhen we have active moderation for new forum users, why then posting such garbage:
08:29:22salewskiIf it is not obvious, it is just a fragment from a recent tread.
08:29:33Araqit was obvious to me
08:29:48Araqwhat do you want me to do? Move it over to the other thread?
08:30:14Araqthe OP lost his account and created a new one for all I can tell
08:30:29salewskiDelete it, it is obvious a new spammer. It is his first post.
08:31:07Araqthere is not even a link in this post
08:32:44salewskiI think we had similar post a few times. Seems to test access, then later modify into spam.
08:33:41Araqwe'll watch out
08:33:48salewskiWell, the disadvantage of moderation is that some new users have to wait often a day until their messages becomes visible. With serious content.
08:33:58*salewski quit (Quit: WeeChat 2.4)
08:39:54*laaron- quit (Quit: ZNC 1.7.1 - https://znc.in)
08:40:16*laaron joined #nim
08:40:32leorizenarimiran: I've zero idea on how to fix this https://dev.azure.com/alaviss/Nim/_build/results?buildId=163&view=logs&jobId=4611d2f1-10c9-5098-fc7e-c3332b76496f&taskId=56919d9c-8ffa-540b-29b8-a1f041571ec1&lineStart=3377&lineEnd=3378&colStart=1&colEnd=1
08:41:39*stefanos82 joined #nim
08:44:57Araqleorize, summary of the log?
08:48:05*leorize quit (Ping timeout: 256 seconds)
08:48:20leorize[m]azure is buggy...
08:48:36*Jjp137 quit (Read error: Connection reset by peer)
08:48:38leorize[m]well, it's line 3377, search for "niminaction"
08:48:49leorize[m](click on the log then ctrl+f, because browser search can't find it)
08:49:11*Jjp137 joined #nim
08:54:05*leorize joined #nim
08:58:40leorizeah, I think I know why now
08:58:54leorizegit for windows will swap all lf -> crlf
09:10:58Araqyou should turn that off ;-)
09:14:13leorizeanyone here with windows 10 version 1803 or newer?
09:15:04*nc-x joined #nim
09:15:10leorizetfloatrange stop erroring out when I downgraded CI to windows server 2016
09:15:22nc-xAraq: add .gitattributes to nim repo like done here https://github.com/nim-lang/c2nim/commit/a791d3516d9d6408779a2c562fce41b95a78590b
09:16:33nc-xleorize: I have windows 10 x64 1809 at home. will be able to check whatever you want me to check in a few hours.
09:17:17leorizethanks, can you try running the tests/float/tfloatrange.nim test?
09:18:15nc-xI will report back here in about 3-3:30 hours from now.
09:18:57*nc-x quit (Client Quit)
09:21:22leorizethis will likely be the first green build :D https://dev.azure.com/alaviss/Nim/_build/results?buildId=166&view=results
09:30:40*fjellfras_ joined #nim
09:42:32*fjellfras_ quit (Ping timeout: 245 seconds)
09:43:19*lukego joined #nim
09:52:12FromGitter<alehander42> @krux02 thanks for the tuple static fix, really helped one of my lib usages
09:52:29lqdev[m]does nimterop support function pointers?
09:52:35krux02@alehander42 you are welcome
09:53:08*sealmove joined #nim
09:53:35FromGitter<alehander42> i wondered about that, when we get an error in the vm in debug mode, is it possible to automatically include line+path of the last processed node in the exception
09:54:16FromGitter<alehander42> its not hard to add manually a `debug/echo` statement in the compiler as well, but this way its way easier to see from which macro does a crash come from
09:54:29FromGitter<alehander42> on the other hand, probably those cases are too rare anyway
09:55:06*fjellfras_ joined #nim
09:55:09*alexander92 joined #nim
09:59:36leorizenarimiran: https://github.com/nim-lang/Nim/pull/11485
09:59:57narimiranyeah, i've just opened that before you've sent the link
10:00:59*ftsf quit (Read error: Connection reset by peer)
10:06:09*Vladar joined #nim
10:08:00leorizejust when you thought you fixed those flaky tests, they come back and hit you right when you open a PR
10:09:57narimiranstory of my life
10:10:12dom96Araq: now passing https://github.com/nim-lang/Nim/pull/11232. Take a look plz :)
10:15:12*leorize quit (Remote host closed the connection)
10:16:36leorize[m]dom96: shouldn't you use a result variable for newOSError instead?
10:17:33dom96There is no strict rule for this.
10:17:43dom96The code originally used this variable name so I didn't change it
10:20:01*leorize joined #nim
10:20:09Araqit's ok but I'm pretty sure our style guides encourage 'result' over 'return'
10:20:47lqdev[m]^ true
10:21:56Araqdom96, is it a bugfix-only or also a minor breaking change?
10:22:16*leorize quit (Client Quit)
10:23:55*lukego quit (Ping timeout: 256 seconds)
10:27:12dom96Depends what you consider breaking
10:27:13dom96Behaviour before: `send` would be left waiting forever
10:27:42dom96Behaviour after: `send` will raise an exception
10:27:58dom96I guess that is a breaking change
10:28:21dom96I commented the test thoroughly so you should be able to understand what is going on
10:28:48*fjellfras_ quit (Ping timeout: 248 seconds)
10:28:52narimiransame question, asked differently: should this be part of 1.0?
10:29:15dom96yes. It fixes a major memory leak
10:29:58dom96I will likely make a follow up PR to reclassify `ERROR_NETNAME_DELETED` as not a "disconnection error" on Windows (this will be breaking)
10:30:32dom96but it will ensure that behaviour on Windows and Linux is the same
10:36:08PMunchHmm, is there no rfind for seq?
10:40:00*theelous3_ joined #nim
10:40:27*vlad1777d quit (Ping timeout: 248 seconds)
10:43:49FromDiscord_<niv> TWIMC https://github.com/niv/nim-docset docset for dash/zeal (i think) and nim 0.20.0
10:45:05*sealmove quit (Quit: WeeChat 2.4)
10:51:53*vlad1777d joined #nim
10:57:07*dwdv quit (Quit: quit)
11:02:27*dddddd joined #nim
11:12:08*vlad1777d quit (Ping timeout: 245 seconds)
11:27:44*deech__ joined #nim
11:28:42*smitop joined #nim
11:40:43*deech__ quit (Ping timeout: 248 seconds)
11:59:52*nsf quit (Quit: WeeChat 2.4)
12:03:23*deech__ joined #nim
12:05:04*AndChat|624225 joined #nim
12:05:53narimiranleorize[m]: now that you brought my attention to it - yep, nimsuggest crashes constantly :)
12:07:32*i7sDream_ quit (Quit: WeeChat 2.5)
12:07:43leorize[m]fix it :p
12:08:31*envoyt quit (Ping timeout: 272 seconds)
12:09:25FromGitter<kaushalmodi> The other day I was looking for a CLI item selector.. I think wrapping this library would work out perfectly: https://github.com/p-gen/smenu
12:09:44FromGitter<kaushalmodi> Check out the gif on that repo
12:09:48narimiranleorize[m]: -d:danger does the trick :P
12:23:07*AndChat|624225 quit (Ping timeout: 246 seconds)
12:24:01*envoyt joined #nim
12:24:25*solitudesf joined #nim
12:28:23alexander92relatively good example of a nim usecase
12:34:50FromGitter<mratsim> alexander92 == alehander42?
12:37:52*nc-x joined #nim
12:38:37nc-xleorize[m]: the test passes on my laptop
12:39:49*nc-x quit (Client Quit)
12:40:55*lritter joined #nim
12:41:45*Snircle joined #nim
12:49:56leorize[m]narimiran: I've given up on those tests
12:50:25leorize[m]pushed a commit to downgrade osx, windows suddenly stop failing
12:50:47narimiranperfectly logical :D
12:55:52*envoyt quit (Read error: Connection reset by peer)
12:56:12*envoyt joined #nim
12:56:18alexander92mratsim yes, i am a 90s kid now
13:29:27PMunchFor those of you who read my post the other day about read- and maintainability with Nim macros, I just uploaded the project that was dealing with on GitHub: https://github.com/PMunch/stacklang
13:29:53PMunchIf you want to see how that code is used in the actual program
13:32:00Araqyour readme is hard to read, too few paragraphs
13:32:14Araqalso mention the new --expandMacro switch
13:34:51*alexander92 quit (Ping timeout: 244 seconds)
13:35:12*leorize joined #nim
13:39:12*alexander92 joined #nim
13:40:26dom96Araq still no merge?
13:40:33FromGitter<alehander42> yes, i'd say more code blocks with examples and what do they do exactly, otherwise awesome
13:44:38PMunchHmm, you're right, it is a bit hard to read..
13:44:43PMunchIt was written in one sitting :P
13:45:52PMunchHuh, neat
13:46:17PMunchNow I don't need the when defined(somethingINeverRemember): echo result.repr in all my macros
13:47:18WilhelmVonWeineris it possible to have a module force fully qualified symbols
13:47:48PMunchPossible? Yes (with some hacks). Should you do it? No
13:47:56*smitop quit (Quit: Connection closed for inactivity)
13:47:57WilhelmVonWeinerI wouldn't dare
13:48:05WilhelmVonWeinerbut it's an interesting question
13:51:25leorizesomeone did it
13:51:32leorizecheck the conio module
13:51:38PMunchIf you look at cliptomania it does this
13:51:39leorizeexcept it's terrible
13:51:53PMunchAh yes, same guy
13:53:06WilhelmVonWeiner"using Δ: type con"
13:53:21alexander92 using
13:53:23alexander92Δ: type clip
13:53:28alexander92oh yes, saw the same, awesome
13:54:13WilhelmVonWeiner"Enforced prefix (con.) API isolation." is a feature
13:54:35alexander92well, it almost is sometimes honestly
13:54:57alexander92i have some modules where i try to always use <module>.fun(..)
13:54:58leorizeapparently a lot of python users hate how Nim "pollute" the namespace
13:55:04alexander92but i have no way to make the compiler enforce it to me
13:56:29PMunchleorize, yeah I'm not sure why that is..
13:56:50alexander92nim has to pollute the namespace only because of `$` and similar operators and macros afaik
13:56:52PMunchI'm still a bit annoyed that this: self was removed..
13:57:25leorize"easy to find out which module the symbol came from" <-- the argument that I saw popped up the most
13:57:26PMunchWith a proper type system like Nim has it really isn't that much of a problem
13:57:30alexander92otherwise i agree with python users: it's great to be able to import * if you want, but having the option to import x and have to x.<stuff> is also good
13:57:34alexander92no, it is
13:57:39PMunchleorize, we have tools for that..
13:57:43alexander92you have to use good ide-s and tools
13:57:46alexander92which suck imo
13:57:52leorizePMunch: not mine arguments :p
13:57:55alexander92i love to be able to analyze my code without having to hover
13:57:59PMunchleorize, yeah I know
13:58:13alexander92and depend on a complicated stack of plugins
13:58:20Araqso your "analyse" step amounts to "where was this declared?"
13:58:31alexander92it makes some things easier
13:58:40Araqlike what?
13:58:41PMunchalexander92, yeah I'm partially kidding. It is nice to be able to read it without knowing the content of every imported module (especially with overloaded names)
13:58:46alexander92now, obviously that's not nim's philosophy and i am fine with that
13:58:57WilhelmVonWeineroverloaded names is wack yo
13:58:59PMunchBut it doesn't outweight the benefit of not having to type module names all day IMO
13:59:02alexander92just saying i don't like overrelying on tools sometimes
13:59:08narimiran" having the option to import x and have to x.<stuff> is also good" --- `from x import nil`
14:00:03WilhelmVonWeinerthe .f syntax would be awfully long with pythonic imports
14:00:08alexander92PMunch, but my point is that you dont have to type those names in python as well: the import user decides for himself
14:00:25alexander92i almost never qualify my nim imports
14:00:50alexander92but i like to do it in like 10% of the cases, where i use a certain api/utils module etc
14:01:01WilhelmVonWeinerimports in Python are deceptive. I used to think it only imported the functions you asked for if you used `from` and I know many others who did too
14:01:05alexander92but narimiran's solution seems great, forgot about `as nil`
14:01:30alexander92well it's just a language feature, one has to learn how it works
14:01:47Araqit helps to get the arguments right first.
14:02:15Araqbut I'm too lazy to do that, it's been discussed a hundred times already.
14:02:19alexander92indeed :P
14:02:50leorizenarimiran: I've issued a rebuild on azure for that downgrading commit, and sure enough, everything is passing
14:03:16leorizewent ahead and try a rebuild on the parent commit, osx passing, win failing
14:03:18alexander92as i said, i am ok with the nim's behavior, just i can also see the python people's point so i appreciate usage as in cliptomania
14:03:42alexander92one thing i dont like in python lately is
14:04:08alexander92the type annotations: i see why they use List[..] Dict[..] Union[..] but it still seems overly verbose
14:04:15narimiranit boils down to: the caller decides if he wants full qualification or not, both in python and in nim.
14:04:27*PMunch quit (Remote host closed the connection)
14:04:35Araqthe problem with the Python's people point of view is that it is simply wrong
14:05:08Araqand they are living a delusion if they think they "always know where stuff is declared", Python is super dynamic, MUCH much moreso than Nim is
14:05:12alexander92yes, it was more about what's the best default: imo nim's default is good for nim because of its lang features and the fact you can easily define overloads in different files
14:05:22narimiranit is just that the defaults are different in those two languages
14:05:33alexander92well if you have a.Type or a.fun it's almost always in the `a` module
14:05:48alexander92but i'd argue nim's default isn't good for python indeed
14:06:02WilhelmVonWeinerI remember seeing a typeclass feature in Nim so a function can take only a numeric argument
14:06:05narimiran...and vice-versa
14:06:11WilhelmVonWeinerbut I cannot find this list of typeclasses
14:06:19alexander92the simple fact is that many python people prefer it compared to e.g. ruby, so that's proof that it works for them
14:06:28alexander92prefer the qualification*
14:06:43leorizeWilhelmVonWeiner: it's not really typeclass, just a list of possible generic overloads :p
14:06:55FromGitter<mratsim> depends on your area, for webdev Ruby is still way more used than Python
14:07:23alexander92maybe yeah, but it loses in everything else imho
14:07:44Araq"proof"? strong words for very weak opinions based on taste and illusions
14:07:44leorizeWilhelmVonWeiner: the syntax is Type1 | Type2, and you can find some predefined types here: https://nim-lang.org/docs/system.html#SomeNumber
14:07:46WilhelmVonWeinerleorize: is there a list of em somewhere though?
14:08:13alexander92Araq, meh, most language design choices are based on taste and illusions
14:08:35FromGitter<mratsim> Yeah and some languages succeed despite those (Java *cough*)
14:08:47alexander92that's the whole point: if python users have similar taste and illusions as the author, that's their deal
14:10:55WilhelmVonWeineroh, I found them in the manual under "Type Classes", not "Typeclasses". lol.
14:11:43Araqif module.bar(args) is good for "navigability" (don't confuse that with "readability" btw), (path/module:line).bar(args) would be even better
14:12:12FromGitter<mratsim> (I would sometimes like that in stacktraces with lots of imports)
14:12:32FromGitter<mratsim> at least knowing which utils.nim we're talking about
14:12:33leorizenarimiran: have you heard of cirrus ci? looks like for projects like Nim there'd be practically unlimited parallel jobs
14:12:37WilhelmVonWeinerleorize: missed your post, ta
14:12:48narimiranleorize: i haven't
14:13:28alexander92Araq well in python you usually have the "path" thing as a.b.c.module anyway
14:14:10Araqah but then I have to analyse the import list, so I jump around a couple of times to figure things out
14:14:23alexander92the :line thing is obviously different, as a function is "owned" by a module in most languages, but not by a line in any lang
14:14:43Araqand instead of jumping around I prefer to tell my editor/IDE "goto definition"
14:14:52alexander92i dont understand why you keep arguing with me: argue with all python users instead
14:15:05Araqit's simply not a substitute for poor tooling.
14:15:10FromGitter<mratsim> (aka write a blog post for the HN/reddit crowds)
14:15:13alexander92literally the fact that they like it, means that it's ok for some people
14:15:18alexander92each trains has its passengers
14:15:36alexander92i agree, but when i criticize go for the same reason
14:15:44alexander92people say that go is genius in its simplicity :(
14:16:28leorizenarimiran: https://cirrus-ci.org/faq/#are-there-any-limits
14:17:09narimiranleorize: so now that you finally mastered azure setup, you want to try something else? :D
14:18:54leorizeeverything seems easy compared to azure :P
14:19:03alexander92but i'd still argue it has readability value in rare cases
14:19:05Calinouthanks for Cirrus CI, I didn't know about it:)
14:19:37alexander92e.g. i want all invocations of my "YApi" to be obvious and to be able to immediately see them/grep for them easily
14:19:53Calinouthey even have FreeBSD runners :o
14:20:07narimiranleorize: heh, then i expect that soon you'll have some numbers on running times on cirrus :)
14:20:32shashlick@lqdev - yes nimterop supports function pointers
14:20:39alexander92i can't reallty depend on the args to include that and having yapiFun hungary notation doesnt seem better to me
14:20:53alexander92but its a niche case indeed and works with `as nil`
14:21:25*Vladar quit (Remote host closed the connection)
14:21:27leorizenarimiran: not yet :p gotta generalize CI setup steps into scripts first
14:21:51shashlick@leorize - i tested with gcc 8.1.0
14:21:59leorizealso, this might sounds crazy but the osx downgrade commit seems to have an effect on windows test runs
14:22:07*deech__ quit (Ping timeout: 245 seconds)
14:22:35leorizerun the parent commit on CI twice and windows is always failing
14:22:39*Senketsu joined #nim
14:22:44AraqI lost a day on the difference between
14:22:44leorizeazure is a mess
14:22:44shashlick@leorize - x86_64-posix-sjlj
14:22:48AraqskipTypes(arg.typ, abstractVar-{tyTypeDesc}).kind == tyTuple
14:23:02AraqskipTypes(f, abstractVar-{tyTypeDesc}).kind == tyTuple
14:23:23Araqthey looked the same to me. Bloat this up further and the difference becomes less visible
14:23:44Araqthere are many dimensions to "readability"
14:23:58alexander92you can just use a light scheme which colors different variables differently
14:24:00alexander92tooling :O
14:24:00Araqand verbosity kills the algorithmic view
14:24:27shashlickhow do i create a table out of an xml file at compile time
14:24:36shashlicknone of our xml packages support ct
14:24:50Araqmost bugs are in subtly wrong algorithms, that's where I lose all my productivity
14:24:59alexander92i agree: that's why i said i'd use it niche cases, i wouldnt qualify widely used functions as skipTypes
14:25:36leorizeshashlick: thanks :)
14:25:50leorizealso, here's a test run on travis' windows: https://travis-ci.org/alaviss/Nim/jobs/544585303
14:25:57alexander92but the compiler already does hat: genMagicX vs gen_magic.x is the same
14:26:01alexander92from readability point
14:26:30Araqso I cannot relate to this eternal "omg, where is this declared?!" problem. Where stuff is declared is the least of my worries, I can click onto the identifier to find out
14:27:02FromGitter<mratsim> but when browsing code on Github you can't
14:27:04Araqin contrast, there are no tools available for shortening the code down to the essentials
14:27:20*nsf joined #nim
14:27:25krux02mratsim: you can still do a code search.
14:27:25FromGitter<mratsim> when you are doing code reviews that's important
14:27:44FromGitter<mratsim> how?
14:27:45krux02often names get you to the declaration
14:28:00leorizefor stuff that isn't nim: sourcegraph have github integration that works quite well for code search
14:28:02alexander92yeah thats one problem with tooling, it's good when it's there and it works, but it's not so easy to get it everywhere and make it work correctly
14:28:06FromGitter<mratsim> that doesn't work if you import several modules
14:28:08alexander92we all had problems with nimsuggest etc
14:28:10krux02I often search for `proc procName` to get to the declaration.
14:28:52alexander92but you can't know from the callsite if it's proc or func or maybe even template or macro sometimes
14:29:16alexander92i also do that, often with procName* instead if i am sure its exported to match all those cases
14:30:20Araqmratsim: code reviews should focus on finding bugs and inefficiencies.
14:30:27FromGitter<mratsim> ultimately Nim allows prefixing with the module name, so bigger projects should use this
14:30:38Araqbut WHY? where is the proof?
14:31:10alexander92ok, so people report a pain point, and this is not proof enough?
14:31:14Araqso now you know from which module the proc comes from. hurray. Does it have fewer bugs?
14:31:28FromGitter<mratsim> because when your projects get over 100k lines with several dependencies it gets hard to track everything
14:31:57FromGitter<mratsim> I like the flexibility
14:32:00Araqwhat exactly do you think 'implicitConv' does? what if I tell you it's 'sigmatch.implicitConv'?
14:32:10FromGitter<mratsim> I'm not for or against the default Nim/Python
14:32:32Araqit creates an implicit conversion either way, ta-da.
14:33:25alexander92ok, but if i compare run() with gdb.run() or select() with db.select() vs channel.select() suddenly this helps me
14:33:48alexander92again, not a huge fan of this, but some people prefer this style
14:34:42Araqyou're free to prefer this, but don't bullshit me with the typical "big projects and scale"
14:34:56CalinouGitHub is integrating "go to declaration" these days
14:35:00Calinou(it's currently in beta)
14:36:09alexander92Araq we just want to label our code to make it easier for machine learning to take over
14:36:36leorizewouldn't machines be superior and don't have to rely on our labels? :p
14:36:43alexander92Calinou what does github use? LSP?
14:37:01FromGitter<mratsim> Actually you can run this text generator on Nim sources (https://github.com/mratsim/Arraymancer/blob/master/examples/ex06_shakespeare_generator.nim) and generate Nim code :p
14:37:21CalinouI don't know
14:37:39alexander92leorize no, agi will never happen, machines will always be limited to playing mediocre go
14:38:20FromGitter<mratsim> They play superhuman go though :p
14:39:18leorizesince it's github, I'll guess that it's some javascript-based code scanning engine :p
14:39:55alexander92they use treesitter, but i assumed they do something more involved
14:40:22alexander92after all, github has to somehow understand nim's overload/type system to make goto def actually work
14:40:35leorizealso the macros system
14:41:04alexander92so yeah, either interface with lang plugins, or just guess
14:41:38alexander92i always had this dream that one day the jsgen is able to compile nim programs using localstorage and the jsbackend
14:44:29Araqthe run() example is also pretty terrible, as in Python it would be mythread.run() (good!) or t.run() (worse), exactly the same as in Nim. You see, in Python, the "where does it come from" is lost just as easily as soon as you have some OOP'ish code.
14:45:09*NimBot joined #nim
14:45:36alexander92i agree, i do something similar to `gdb.run(t<which is actually variable with the receiver>)` sometimes
14:45:58alexander92i was talking about quallification, not particularly about python's impl of it in this case
14:46:08*deech joined #nim
14:46:09Araqand I've yet to find a single person on this planet who argues that "Python code shouldn't use OOP for better readability"
14:46:46alexander92people from mars must hate oop
14:47:36alexander92yes, it's not a very strong case, but most of the stuff people bikeshed about is like that
14:47:48alexander92people fought for their `print without ()` so long
14:49:03alexander92btw what happened with the "being able to use the same module from two different nimble versions of the same package" thing
14:50:07Araqit's done, no such restriction for 0.20
14:53:18Araqso now even utils.foo(args) can be ambiguous, be happy.
14:55:39alexander92come on you simply (fulldomain:/utils-2.4.foo:24(args))
14:55:50*fjellfras_ joined #nim
14:56:32Araqdo that to a codebase of any size and watch your "readability" explode into a Java-esque experience where you'd rather rewrite the code than to *read* it
14:56:51alexander92i was kidding in this case
14:57:03alexander92i'd just md5 the name
14:59:07alexander92but if we go to this end, why don't we just autoimport some modules
14:59:22Araqthere is --import for that
14:59:37alexander92but i guess you need to pass stuff explicitly to it?
15:00:39AraqI hate it. But not because it's bad (TM) for reading code. But because it's hard to maintain in the compiler
15:01:15Araqand the feature doesn't carry its costs. I am fine with 'include karax/prelude' and the like
15:01:19alexander92what i meant was, e.g. you find out <x> is used: you look for it in the accessible modules and if there is match without collision, you add the import
15:01:38alexander92seems unpractical from impl point, but similar from readability point
15:01:51alexander92ruby code looks like that
15:02:08alexander92i see
15:04:05AraqI don't see how the compiler could "auto import" files, well ok, I can see how that can work but --path is bad, --nimblePath is worse and features on top of this are bad
15:05:21FromGitter<kaushalmodi> this doesn't work: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d0114b1ee9dda04629cd632]
15:05:37FromGitter<kaushalmodi> > Error: invalid command line option: '--hint[Processing]'
15:05:42FromGitter<kaushalmodi> what am I doing wrong?
15:06:26FromGitter<kaushalmodi> I was trying to add this as an answer to https://www.reddit.com/r/nim/comments/byzq7d/go_run_for_nim/
15:06:32FromGitter<kaushalmodi> but am surprised that above doesn't work
15:07:44*alexander92 quit (Ping timeout: 272 seconds)
15:08:30Araqthe syntax is
15:08:39Araqhint("Processing", off)
15:08:46AraqI think.
15:09:04lqdev[m]when should I use {.incompleteStruct.}?
15:09:12FromGitter<kaushalmodi> Araq: thanks
15:09:16FromGitter<kaushalmodi> I see.. https://nim-lang.github.io/Nim/nimscript.html#hint%2Cstring%2Cbool
15:09:48FromGitter<kaushalmodi> Araq: do you think that the above `switch` style should also work?
15:10:03FromGitter<kaushalmodi> :)
15:10:28AraqI think on the command line it's now --hint-processing:off
15:10:45Araqor something like that because shells interpret the [], sometimes.
15:10:54disruptekis the #? directive documented somewhere? i'd like to put my tab->indent replacement somewhere other than the source files.
15:10:59leorizeyou can always just quote
15:11:04leorizedisruptek: search for source code filter
15:11:15leorizethey can do more than just tab -> indent :)
15:11:18FromGitter<kaushalmodi> Araq: ok
15:11:29FromGitter<kaushalmodi> I see that `hint` takes bool as second arg
15:11:34lqdev[m]I guess incompleteStruct is for when you're too lazy wrapping a struct hierarchy?
15:11:36FromGitter<kaushalmodi> just saying
15:11:36disruptektough to search for `#?` in google. ;-)
15:12:39lqdev[m]disruptek: won't searching for `"#?"` work?
15:13:04disruptekit didn't work for me.
15:13:06*disruptek shrugs.
15:14:10*alexander92 joined #nim
15:14:22lqdev[m]ah well
15:14:30lqdev[m]duckduckgo also doesn't provide any useful results
15:14:59disruptekyes, that's my default se.
15:15:46*floppydh quit (Quit: WeeChat 2.4)
15:16:38alexander92i used !g too often
15:16:50shashlick@lqdev - i have a strategy for n-arrays which i will implement soon
15:17:02shashlickbut still no good ideas for nested structs
15:18:18lqdev[m]I guess creating temporary `[parentName]_nested` structs could be a possibility?
15:18:40lqdev[m]it seems this is the only option for now
15:20:09shashlickya creating, I use c2nim for guidance, but detecting is the difference
15:20:45shashlicki have to create a recursive pattern that nimterop can look for
15:21:40alexander92<<<< HEAD is valid nim syntax
15:22:34alexander92you can override HEAD and <<<<<<< HEAD to
15:22:42leorizeunary operator `<<<<` applied on identifier `HEAD` :p
15:22:43alexander92echo stuff if you forget it in your merges
15:23:09leorize!eval import macros; dumpTree: <<<< HEAD
15:23:12NimBotStmtList↵ Prefix↵ Ident "<<<<"↵ Ident "HEAD"
15:25:17*solitudesf quit (Remote host closed the connection)
15:25:33alexander92also >>>>> commit message
15:25:38alexander92but the ==== is hard
15:26:34*PMunch joined #nim
15:27:00leorizetemplates can be used without the `()` :)
15:29:07leorizethe >>>>> commit message can be solved with templates + astToStr
15:29:21leorizemaybe :p
15:30:04*Acid147 quit (Remote host closed the connection)
15:30:47*Acid147 joined #nim
15:31:28leorize!eval echo astToStr a commit message
15:31:31NimBota commit message
15:31:50alexander92oh yeah
15:32:06alexander92so in this case i can make my wrongly merged code work in horrible ways
15:32:26shashlickwhat does this mean - widestrs.nim(99, 12) Error: cannot create null element for: tyUncheckedArray
15:32:36shashlickno context with my code
15:32:46leorizeAraq: ^
15:33:38*solitudesf joined #nim
15:35:27leorizealexander92: `template `<<<<<<<`(body: untyped): untyped = {.error: "You forgot a merge conflict at " & $instantiationInfo().}
15:36:24lqdev[m]is Nim `ptr pointer` equivalent to C `void **`?
15:37:22leorizepoor man's generics
15:38:22dom96leorize: Does that actually work? :O
15:40:12lqdev[m]is it possible to create a `const void *` param in Nim?
15:40:51FromGitter<kaushalmodi> the args would be const by default IIUC
15:41:02FromGitter<kaushalmodi> to make them not const they need to be `var`
15:41:41leorizeC context of const void * is that the target procedure won't modify the pointer contents
15:41:52FromGitter<kaushalmodi> leorize: ok
15:42:19leorizewell, it's not verifiable anyway :p
15:44:52alexander92leorize this should be a lib
15:47:09leorize!eval template `<<<<<<<`(body: untyped): untyped; <<<<<<< HEAD; `template `<<<<<<<`(body: untyped): untyped = {.error: "You forgot a merge conflict at " & $instantiationInfo().}
15:47:11NimBotCompile failed: /usercode/in.nim(1, 1) Error: implementation of '<<<<<<<' expected
15:48:27alexander92just add a dummy code section
15:48:52alexander92hm i dont think you can forward declare templates
15:50:25alexander92@dom96 why is toJson not exported
15:50:43FromGitter<kaushalmodi> leorize: that's a cool template :)
15:50:56lqdev[m]how do you wrap a union with just a single member?
15:50:56*c3v0axz quit (Ping timeout: 248 seconds)
15:51:00lqdev[m]can I just ignore it and include the member directly?
15:51:07leorize{.union.} :p
15:51:42dom96alexander92: toJson where?
15:51:42*c3v0axz joined #nim
15:51:48lqdev[m]it's unnamed
15:52:16leorizelqdev[m]: then give it a name
15:53:06alexander92@dom96 in json.nim
15:53:19dom96link plz
15:56:07alexander92what i meant was that only %* is exported in the stdlib
15:56:18alexander92and i wanted to use a less symbol-y name
15:57:01leorizeenjoy your merge conflicts https://play.nim-lang.org/index.html?ix=1LBj
15:59:26shashlickcan you have a const table of objects generated at compile time?
16:00:20noonienin an `{.async.}` proc that returns a `Future[Foo]`, how can i access `result` such that it's a `Future[Foo]` and not a `Foo`?
16:00:32*alexander92 quit (Ping timeout: 248 seconds)
16:01:23*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/MRbmuvrlMSHVVDCgjJKofFrh >
16:02:26leorize{.align: <n>.}
16:04:46lqdev[m]that pragma doesn't exist
16:05:51leorizeah, I see
16:06:04leorizewell usually {.codegenDecl.} is used to customize these things
16:07:20lqdev[m]I think I'll be okay if I ignore the alignment bit, I'm only declaring the structs for their size
16:07:31lqdev[m]I don't use those structs anyway.
16:08:30lqdev[m]well if I don't use them why am I bothered with wrapping all those fields then? I think I'm just gonna `{.incompleteStruct.}` them and call it a day
16:10:20leorizewhy do you even bother wrapping them? :p
16:10:36leorizeif you don't use them DCE will eliminate them anyway
16:11:15lqdev[m]nimterop can't wrap them and it gives compile-time errors
16:11:26shashlickwhich ones specifically
16:11:29leorizethere's a way to skip them
16:11:39leorizecIgnore iirc
16:13:14lqdev[m]fuck, I wasted all this time just to be told this exists. I'm such an idiot sometimes, not reading the docs. thanks for the help!
16:13:35*alexander92 joined #nim
16:14:31lqdev[m]`/home/daknus/Coding/Nim/rapid/src/rapid/lib/rapid_caudio.nim(24, 1) Error: request to generate code for .compileTime proc: cSkipSymbol`
16:14:51lqdev[m]all I did is `cSkipSymbol(@["ma_channel_router_config"])`
16:15:13shashlickput it in a static block
16:15:25lqdev[m]ah, makes sense
16:16:02leorizeshashlick: you can turn them into a macro and save the `static:` part...
16:16:20lqdev[m]well, it doesn't help because I still get the same error as before. should I just skip all the symbols that use `ma_channel_router_config`?
16:16:22shashlickit used to be all macros
16:16:38shashlick@timotheecour felt compiletime procs were better
16:16:45lqdev[m]can I give a whitelist of the symbols I need to nimterop?
16:17:01shashlickthere's no whitelist capability yet
16:17:13shashlickwhat is the actual failure you are seeing
16:17:25leorizeI'd say `static: cSkipSymbol` is just noise
16:17:31leorizea macro is much much better
16:17:44leorizewe shouldn't pretend something is a proc when it clearly isn't
16:17:58shashlicki preferred macros anyway
16:18:26*tyler569 joined #nim
16:18:28*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/OPAYbjPbWOJwuAXCAvqejSrh >
16:18:32shashlickit isn't really a macro since it is not doing any macro stuff, just setting some vars
16:18:36dom96noonien: you can't
16:19:00nooniencan i return a new Future[Foo]?
16:19:05shashlick@lqdev - you are getting that error since procs that use the symbol are wrapped
16:19:12dom96Why do you want to?
16:19:23shashlickjust add type ma_channel_router_config = object in cOverride and call it a day
16:19:30shashlickif you aren't using those procs
16:19:38noonieni need a reference to the Future i'm returning, because i'm passing it to another proc that completes it
16:20:00noonienhmm, i'm guessing {.async.} doesn't make sense there then
16:20:02dom96alexander92: Giving users the choice between %* and toJson will make %* even more confusing though
16:20:28lqdev[m]I mentioned I could just use incompleteStruct
16:20:47shashlickya good enough unless you need access to the internals
16:21:02shashlickthen you could run that struct thru c2nim and override it correctly
16:21:47dom96noonien: passing the future to another proc that completes it sounds a bit iffy :)
16:22:21alexander92compile time procs are ok i think
16:22:30lqdev[m]good thing is, I don't. all I need is to write samples to the audio device
16:23:13nooniendom96: well, i'm actually registering it in a table, and there's another proc that manages that table that handles when those futures get completed
16:23:14alexander92@dom96 hm, maybe, but it will calm down the "i dont want perl-ish operators everwyehre" people
16:23:29leorizeshashlick: at least give them a macro so I can omit the `static:`
16:30:37*Trustable joined #nim
16:33:11*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
16:35:34*laaron joined #nim
16:59:47*fjellfras_ quit (Quit: Leaving)
17:00:54*Trustable quit (Remote host closed the connection)
17:01:19lqdev[m]how can I wrap this? https://termbin.com/eafc
17:02:12shashlicknimterop doesn't handle?
17:03:08shashlickyou need to set one of those #defines with cDefine()
17:03:20shashlickelse the struct is empty and nimterop will skip
17:05:23*Jesin quit (Quit: Leaving)
17:05:48lqdev[m]problem is, this is used in a nested struct https://termbin.com/kd8g
17:06:11lqdev[m]and I need this struct
17:06:57shashlickso ma_device_id should work when you have a cDefine
17:07:08lqdev[m]can I just declare ma_device_id with `{.incompleteStruct, union, size: sizeof(char) * 256.}`?
17:07:09shashlickma_device_config only uses it
17:07:33*Jesin joined #nim
17:09:27shashlickhttp://ix.io/1LBA/Nim <= that's c2nim output for ma_device_config
17:09:31shashlickjust throw that into cOverride
17:10:04shashlickwell, actually, you will run into that issue where stuff in it is not cImported yet
17:10:16shashlickideally you can incomplete struct that
17:10:39lqdev[m]wait, so you already implemented nested structs?
17:10:56shashlickthat's c2nim
17:11:00shashlicki don't support it yet
17:11:54shashlicki can add double or even triple nested but it isn't going to be recursive with my current thought process
17:12:12shashlickbut i feel like kicking someone who wants to nest more than twice
17:12:43lqdev[m]kick David Reid (the author of miniaudio), then
17:13:06lqdev[m]line 917 in miniaudio.h
17:15:01*nsf quit (Quit: WeeChat 2.4)
17:15:59shashlickyep I saw it earlier and felt even more frustrated at the limitation
17:16:09shashlickanyway, i have a route for n-arrays so first that
17:46:39*PMunch quit (Remote host closed the connection)
17:50:34*uvegbot quit (Quit: Konversation terminated!)
17:58:00lqdev[m]what does an incompleteStruct do exactly in a sizeof expression?
18:00:38*envoyt quit (Ping timeout: 272 seconds)
18:01:42*uvegbot joined #nim
18:06:30lqdev[m]what's the deal with this: `typedef ma_uint32 (* ma_format_converter_read_proc)(ma_format_converter* pConverter, ma_uint32 frameCount, void* pFramesOut, void* pUserData);` apparently nimterop can't translate it
18:12:43*alexander92 quit (Ping timeout: 248 seconds)
18:17:28*envoyt joined #nim
18:21:57*fab_ joined #nim
18:22:08*fab_ is now known as Guest56412
18:22:37*Guest56412 quit (Client Quit)
18:22:54*Guest56412 joined #nim
18:24:25*Guest56412 quit (Client Quit)
18:24:38*Guest56412 joined #nim
18:24:38*Guest56412 is now known as the_fab
18:25:12*the_fab quit (Client Quit)
18:25:57*jjido joined #nim
18:28:15lqdev[m]YES! I finally finished writing all the cOverrides. I'll just have to check if they work 🤞
18:34:01*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:41:23*alexander92 joined #nim
18:41:48*envoyt quit (Ping timeout: 272 seconds)
18:42:10*envoyt joined #nim
18:44:27*solitudesf- joined #nim
18:44:37*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/FEJzrAcEWWHWPykxWtOaLlca >
18:45:50lqdev[m]wait, it's on Linux and BSD, not POSIX
18:45:59Araq{.passL: "-lpthread -lm -ldl".}
18:46:05Araq^ that one too
18:47:03lqdev[m]that worked, thanks
18:47:07*solitudesf quit (Ping timeout: 245 seconds)
18:48:55*nsf joined #nim
18:49:31*alexander92 quit (Ping timeout: 248 seconds)
18:59:42*sealmove joined #nim
19:01:08*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/LlJTpxyZtyZHhgHbMjmEsgeM >
19:20:21shashlick@lqdev - that typedef should have worked
19:20:58shashlickseems to work in isolation
19:42:29FromGitter<jivank> for coro, https://nim-lang.org/docs/coro.html , how would you go about running a proc every X minutes? it looks like sleep doesn't correctly inside a proc when you have multiple scheduled ( i tried 1 second and 10 proc that echo'd a string, both printed at the same time)
19:44:11*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:46:43*marvel_ joined #nim
19:47:24*nsf quit (Quit: WeeChat 2.4)
19:49:14*laaron joined #nim
19:52:26*laaron quit (Client Quit)
19:52:42marvel_Anyone here?
19:57:18*marvel_ quit (Quit: Updating details, brb)
19:57:26*marvel_ joined #nim
19:57:38Araqjivank: better use .asnc + await, coro is hardly tested
19:59:10*laaron joined #nim
20:06:01*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:06:51*laaron joined #nim
20:09:53*laaron quit (Client Quit)
20:11:31*laaron joined #nim
20:15:02FromGitter<xmonader> I'll be responsible for summer internship in my current company and I'm planning to introduce lots of nim to the interns :)
20:15:09dom96Araq, we should remove it
20:18:01*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:19:35*jjido joined #nim
20:20:01*laaron joined #nim
20:20:33*leorize quit (Ping timeout: 256 seconds)
20:23:23dom96Araq, is the `using` statement here to stay?
20:23:30*laaron quit (Client Quit)
20:25:36*leorize joined #nim
20:26:08*laaron joined #nim
20:27:38*vlad1777d joined #nim
20:30:53*laaron quit (Client Quit)
20:34:42*laaron joined #nim
20:35:34*laaron quit (Client Quit)
20:35:40*lf-araujo joined #nim
20:36:57Araqdom96: why not? it's not like the other features that cause on-going trouble
20:37:26dom96Araq, It's not easy to see where it ends
20:37:41*laaron joined #nim
20:37:42Araqit's module-wide
20:38:43*narimiran quit (Ping timeout: 246 seconds)
20:38:53dom96yeah, it shouldn't be, if anything it should be based on indentation
20:40:27Araqbut then we would need to indent all the procs that use it...
20:40:32Araqsucks IMO
20:41:50dom96I disagree and in fact doing it this way would be possible via a macro
20:41:56*lf-araujo quit (Read error: Connection reset by peer)
20:41:56dom96so IMO that's another strike against this feature
20:42:09*lf-araujo joined #nim
20:43:05*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:44:08*laaron joined #nim
20:46:16FromGitter<jivank> @xmonader nice :D
20:47:08Araqever considered that it's not a macro because of that?
20:48:20FromGitter<kaushalmodi> @xmonader awesome!
20:49:43*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:50:07dom96Araq, yes, but I dislike that aspect of it, so to me it should simply be removed
20:50:11FromGitter<jivank> i also have a question about source code filters, https://nim-lang.org/docs/filters.html , when i run `$myVar.someFunc()` it comes out as `myValue()` . is that expected behavior? should you not be running functions inside a filter? i think it doesn't work when a function takes more than one argument
20:50:38Araqwell it's a language feature because it cannot be done via a macro
20:51:16dom96Araq, btw you should improve the title on this video lol https://www.youtube.com/watch?v=E1J3OL4Jz8w
20:51:39*laaron joined #nim
20:51:58FromGitter<jrfondren> good video btw
20:52:53dom96Araq, I don't want to have to go through various `using` statements to find the type of my function's arguments :/
20:53:27xacedo we have something that is similiar/equivalent to: `while (var i = somefunction()) == 1:`
20:53:58dom96while (var i = someFunc(); i == 1):
20:54:00FromGitter<jivank> i tried `$someFunc(a,b)` and the compiler claims, received someFunc(A) , expected someFunc(A,B). same thing with `$a.someFunc(b)`
20:54:17FromGitter<kaushalmodi> @jivank You can do this (an example) to run funcs to derives values for the source code filters: http://ix.io/1LCT
20:54:24xacedom96: thanks
20:55:14FromGitter<jrfondren> I'd prefer `while true: let i = somefunction(); if i == 1: break`
20:55:30FromGitter<jrfondren> on three lines.
20:56:19FromGitter<kaushalmodi> Araq: talking about source code filters, there's no way to use just a single `let` in a filter like this: http://ix.io/1LCT, right?
20:56:32FromDiscord_<exelotl> yeah one-liners are overrated
21:00:34Araqdom96: so... don't use 'using'? I don't want to listen to made-up situations where you assume to read some bad source code written by bad programmers. You cannot design a language this way nor can you ever accomplish any real work. What if your coworker is a moron that nests his 'if' statements 30 levels deep and doesn't use procs... should we remove 'if' from Nim because of that?
21:01:13dom96No, because there is no replacement for an if statement
21:01:23Araqthere is 'case'.
21:01:25dom96There is a replacement for `using`: just write out the types
21:01:32dom96case has the same problem as `if`
21:01:35dom96it's not a replacement
21:01:51*I_Right_I joined #nim
21:04:29FromGitter<jrfondren> people can use type aliases that leave you with the same problem of having to do some work to know what you're dealing with
21:05:32FromGitter<jrfondren> or they can use a type that's not even defined in the file, now you have to go looking for it if that concerns you
21:06:08FromGitter<jrfondren> with using I'd split the screen and jump to the top of the file and go, oh, OK. Probably.
21:07:05FromGitter<jrfondren> vi-like editors are a lot better at jumping to the top of the file than they are at telling me why the entire display is indented, unfortunately :/
21:08:12FromGitter<jrfondren> this comes up in languages with C-like syntax, where I can at least add a temporary } and jump to its twin. With Nim I'd have to do something like ?^ [^ ] (counting spaces)
21:10:59Araqmaybe. I don't use vi-like editors.
21:11:00*lf-araujo quit (Read error: Connection reset by peer)
21:11:01dom96You make a very good point jrfondren. Even so, I don't think this feature will get enough use to be part of the language. Nim aims to have a "small core", and this is one construct that I think deserves to be let go.
21:20:07I_Right_II've been away for a while but congrats on 'nim 0.20.0'
21:25:56sealmoveO__O haven't seen the blog video!
21:26:02sealmovewhat am I doing with my life?
21:27:35*theelous3_ quit (Ping timeout: 268 seconds)
21:29:33lqdev[m]damn miniaudio, so cool yet so hard to wrap
21:31:32lqdev[m]also, my executable is strangely large
21:31:55lqdev[m]that did not happen when using the library in C
21:33:20Araqdom96: 'using' is a small feature and a barrier for introducing ever more type inference into Nim. before we had it there always was some pressure to add more type inference to get a Haskell-like experience
21:35:17dom96okay, maybe it'll grow on me
21:35:22Araqit also encourages one to be consistent in one's parameter names across procs, it's not a feature-from-hell to confuse you.
21:39:37shashlick@lqdev - try -d:danger
21:40:01shashlickCan you share your wrapper? Will help improve nimterop
21:40:10shashlickHave to make this easier
21:40:24lqdev[m]it doesn't work just yet
21:43:17sealmovenim cpp is kinda the go-to if you don't need interfacing with C?
21:43:43shashlick@lqdev - will help to know what features would help make life easier
21:43:44sealmoveI've always been using nim c, thought of it as default
21:44:06shashlickObviously supporting every data structure but if not then what would help
21:44:27*rockcavera quit (Ping timeout: 248 seconds)
21:44:55lqdev[m]shashlick: I think the biggest problem will be ma_device, I can't just leave it as an incomplete struct, and its code is super-convoluted
21:47:13lqdev[m]I guess if you'd make double-nested structs supported it would help a ton
21:47:47sealmovelove the suppressing of the other (often irrelevant) 123451234 type signatures in error msgs
21:48:16Araqsealmove: thanks :-)
21:49:19*c2V0a3U joined #nim
21:52:51*c3v0axz quit (Quit: Leaving)
21:55:36*solitudesf- quit (Ping timeout: 272 seconds)
21:55:38Araqkaushalmodi: I guess not. Are source code filters still a thing? surprisingly popular feature
21:56:59FromGitter<kaushalmodi> Araq: it very much is a "thing" for me :)
21:57:12FromGitter<kaushalmodi> I use it as a templating engine at work
21:57:29FromGitter<kaushalmodi> the snippet is a very run down version, I do much more in the actual filter
21:57:43FromGitter<kaushalmodi> *please keep on supporting this feature*
21:57:48*laaron quit (Remote host closed the connection)
21:58:24*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:59:28*laaron joined #nim
22:00:19Araqniminst is built on top of it and dom96's book uses it extensively too
22:00:29Araqso it's safe
22:01:03shashlick@lqdev do you think it's worth adding a cOverride that can be in the middle
22:01:08xacedoes -d:danger imply -d:release or should i specify both `-d:release -d:danger`
22:01:36FromGitter<kaushalmodi> Araq: Thanks, that's good :)
22:01:41Araq-d:danger implies -d:release
22:02:39lqdev[m]shashlick: I think it would be worth making cOverride accept an untyped block, and inject all the types and stuff into its own sections in the generated code
22:02:52lqdev[m]I'm not sure if that's possible with your current arch, though
22:04:21shashlickThat's a better idea
22:04:49shashlickSo the override will get injected where it is found during cimport
22:04:51marvel_Anyone who has used the book, 07Nim in 07Action?
22:05:17FromGitter<kaushalmodi> I have
22:05:29dom96I have not only used it but also written it ;)
22:05:52sealmoveWe need a new book after 1.0
22:06:10FromGitter<jrfondren> called Nim in Motion, naturally
22:08:11dom96`Error: expression cannot be cast to KeyboardEventObj=object` hm
22:08:27dom96Would be nice of the compiler to tell me why
22:08:38shashlickBut that's hard since nimterop won't typically recognize what needs to be cOverride
22:09:06sealmovejrfondren: +1
22:09:42dom96jrfondren: not sure if you know but Manning actually has a series called this: https://www.manning.com/livevideo/linux-in-motion
22:10:18Araqdom96: different sizeof()s
22:10:31Araqis usually the only reason for un-castability
22:10:35dom96Araq, ahh :/
22:10:35FromGitter<jrfondren> should be fine then? My primary interest is in the acronym
22:11:49dom96If you want to make a live video series about Nim then do get in touch with Manning
22:11:55dom96That would indeed make a great acrony,
22:12:16Araq^ Nim's development
22:12:53*lqdev[m] uploaded an image: image.png (24KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/ZmNcZFBMsVOOILHkRDzpEogS >
22:12:57lqdev[m]what is this language lol
22:13:49FromGitter<jrfondren> google translate says turkish
22:14:22lqdev[m]btw, +1 for using Kurzgesagt <3
22:14:27FromGitter<jrfondren> supposedly MTL is famously bad for Turkish. People ask simple questions about webhosting (in Turkish) and it comes across as a death threat involving hand grenades.
22:16:27I_Right_Ihow just look over the release note... again good job!
22:16:27dom96Araq, I thought marking it with {.incompleteStruct.} would make it shut up, but nope :(
22:17:06I_Right_Ihow = wow
22:17:13lqdev[m]oh yes my dearest friend {.incompleteStruct.}
22:17:36*krux02 quit (Remote host closed the connection)
22:20:54I_Right_ISo I noticed newruntime mentioned in bug fixes section in the release notes for 0.20.0 whats the current status of the newruntime? How(How != wow) is it coming along?
22:22:40*rockcavera joined #nim
22:25:06FromGitter<zetashift> For Nim 1.0 it should still be enabled with a switch but from what I've read it's coming along nicely: https://github.com/nim-lang/Nim/issues/11217
22:27:36I_Right_II just tested it with a few apps and no problems
22:27:50I_Right_Ivery nice
22:33:20AraqI_Right_I: can you submit some of these apps? we need more tests for --newruntime
22:35:41*marvel_ left #nim (#nim)
22:37:59*marvel_ joined #nim
22:40:36I_Right_II don't mind submitting at all. But I was Liberal with the word App. I should have said test programs.
22:41:15I_Right_IWhat is the submit process?
22:42:21rayman22201Thanks for the video Araq! I'm excited for part 2 and 3, any estimated time on their release lol?
22:43:34AraqI_Right_I: create a PR, look at tests/destructor/twidgets.nim for a good example
22:44:04Araqrayman22201: Thursday and Friday
22:46:59rayman22201🎉 excellent news!
22:48:13I_Right_IAraq: Okay I already have some code in a PR. I haven'tested it yet. But I was planning on working on it sometime in the next few days. Should I just post here when I am done?
22:48:52Araqwhatever you feel like
22:50:41I_Right_II just tested the some examples that use raylib and they seemed to work fine.
22:53:19I_Right_IWhat I would like to do is go back to using a thread pool in the STD. Are thread pools stable now?
22:55:57Araqthey got bugfixes but I don't consider them to be stable
23:04:02I_Right_IWell I'll give them a shot. I really hope to be able to get some time in learning and using nim. I freed up some time for it next week and hopefully longer.
23:11:32Araqone week is enough to learn Nim.
23:12:29*envoyt quit (Ping timeout: 244 seconds)
23:13:43*envoyt joined #nim
23:17:07FromGitter<kayabaNerve> Araq: I've never seen one actually seen one used; only brought up in discussion about file-wide macros. That said, they can't be used that way, because the replace macro doesn't allow you to replace line end characters :( Damn line-by-line parsing.
23:21:26I_Right_Ioh yeah, I come from c and never use pythonish syntax before. And I was up and running with nim in a day or two. But there are somethings I skimmed over. But yeah "Easy to learn" is a good bullet point for nim.
23:22:15*stefanos82 quit (Quit: Quitting for now...)
23:26:15FromGitter<zetashift> I_Right_I what raylib bindings are you currently using?
23:35:06sealmoveAraq: is making `case` work for tuple of ordinals too PITA to implement/maintain?
23:37:47*I_Right_I quit (Remote host closed the connection)
23:38:38Araqsealmove: it exists already
23:39:29Araqgood night
23:39:46*abm joined #nim
23:44:57sealmoveeh, can't find that file
23:45:15*redlegion quit (Remote host closed the connection)
23:47:10sealmoveanyway, I guess it's implementable with case statement macro
23:47:57FromGitter<kayabaNerve> In Nim, is hasKey O(1) or O(n)?
23:48:21FromGitter<kayabaNerve> I always thought Tables were O(1) lookup but O(n) key check. That said, it looks like both use rawGet.
23:54:36FromGitter<jrfondren> O(1) of course. checking for a key any other way would be an optimization, since you're deviating from the natural way, and O(n) probably isn't an optimization over O(1)
23:55:35FromGitter<jrfondren> due to hash collision you're always checking that the key exists when you perform a lookup.