<< 05-02-2019 >>

00:14:14FromGitter<riddl_gitlab> is it a bug? ⏎ ⏎ ```buf = buf + uint((rand(2048 - 16*amount) + 16 * amount -1792) shl 24)``` ⏎ ⏎ when there is no whitespace between minus sign and `1792` nim says ... [https://gitter.im/nim-lang/Nim?at=5c58d55678e1ed4103e1eec6]
00:14:37FromGitter<riddl_gitlab> or is it another nim thing that I am not aware of?
00:21:01rayman22201It's Command invocation synatax (called UFCS in other languages). https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax
00:21:26rayman22201It's treating that as as `amount(-1792)`
00:21:51rayman22201not a bug, correct spacing is important.
00:22:30FromGitter<riddl_gitlab> .....
00:25:22FromGitter<riddl_gitlab> sorry but this is just broken
00:26:20rayman22201To quote the Big Lebowski, "That's just like, your opinion, man"
00:26:39rayman22201If I were to code review that line, I would call you out on it. It's not good style.
00:28:03rayman22201the error message could maybe be more clear though. That's a tough problem.
00:28:33rayman22201Many people enjoy the ufcs syntax, this kind of compiler nit-pickyness is the price we pay for that feature.
00:30:44FromGitter<timotheecour> thats not UFCS though that’s command invocation syntax
00:31:03FromGitter<timotheecour> (sry for the nitpick, otherwise ya)
00:34:39FromGitter<gogolxdong> Someone used nimPDF?
00:37:15FromGitter<riddl_gitlab> > *<rayman22201>* If I were to code review that line, I would call you out on it. It's not good style. ⏎ ⏎ Well, we've got different definition of what code review should check in the first place ⏎ ⏎ > *<rayman22201>* the error message could maybe be more clear though. That's a tough problem. ... [https://gitter.im/nim-lang/Nim?at=5c58dabb78e1ed4103e210bf]
00:37:51FromGitter<riddl_gitlab> Not worth it, its convenient in very limited cases
00:38:34rayman22201It's widely used in Nim.
00:39:26FromGitter<timotheecour> ya overtime u may come to appreciate that syntax; it does look leaner
00:40:46rayman22201It makes writing DSL's much easier, something Nim is very strong at.
00:42:31FromGitter<riddl_gitlab> i dont have any problem with that syntax, its in ruby for centuries
00:44:02FromGitter<riddl_gitlab> but this should work as well ⏎ ⏎ ```var x = 10 ⏎ var z = 928 * x -3``` [https://gitter.im/nim-lang/Nim?at=5c58dc5254f21a71a1fca8a0]
00:45:08FromGitter<timotheecour> nim has significant whitespace
00:47:20FromGitter<riddl_gitlab> in case of indentations, thats reasonable, but spaces?
00:47:43FromGitter<riddl_gitlab> for someone moving from c/c++c/c#/objc its mind blowing
00:51:16rayman22201I still write plenty of C/C++ in my day job... I have had 0 issues with it
00:54:22*theelous3 quit (Ping timeout: 272 seconds)
01:05:21FromGitter<riddl_gitlab> well, people can adapt in every way, but it doesn't change that it's just broken. Someone decided that doubtful functionality is worth more that consistency. ⏎ Reason should be a differentiator here, spaces doesn't matter in arithmetic. You want that feature? Implement it in a way that doesn't break logic. Dont take me offensive, inconsistency is something I can hardly stand in general, but here its minor issue.
01:05:21FromGitter... Maybe fixable in future (g++ handles C++ syntax which is far more complex.. but it takes time:) )
01:11:46rayman22201You have to prove to us that's it's broken first. You have stated your opinion that it is broken, but not really given any evidence why. "Spaces don't matter in arithmetic". Actually they do. "-3" is not the same as "x - 3". One is a negative number, which is a particular subset of Z (the natural numbers), and the other is the "-" formal algebraic subtraction function.
01:14:30rayman22201The space becomes even more important with matrices / linear algebra because subtraction is not commutative
01:15:48FromDiscord_<juan_carlos> No problem: (amount ) -(1792)
01:16:14FromDiscord_<juan_carlos> (amount )-( 1792)
01:18:45FromGitter<riddl_gitlab> 1) substraction is just an addition of negative number, matter of abstraction ⏎ 2) spaces are not related with commutative property of matrices in any way
01:19:11FromGitter<riddl_gitlab> yeah, sure we can go with brackets here, in calculations. Great idea.
01:19:23FromGitter<riddl_gitlab> we droped brackets in function calls
01:19:40rayman22201"for someone moving from c/c++c/c#/objc its mind blowing"... Quite a few people have come to Nim from C/C++ and even embedded, and nobody has had issues with this feature. In fact many enjoy the elegance of it.
01:19:44FromGitter<riddl_gitlab> just to have them in calculations
01:19:53FromGitter<gogolxdong> (https://files.gitter.im/nim-lang/Nim/oOsh/image.png)
01:20:21FromGitter<riddl_gitlab> @rayman22201 im not talking talk func param, param2 is ugly or anything like that
01:20:23FromGitter<riddl_gitlab> its ok
01:21:28FromGitter<riddl_gitlab> but if we need to pay for it with broken syntax of arithmetic operations its something i just dislike
01:21:40FromGitter<gogolxdong> anyone graphics background, how to fill the pentagram?
01:22:03rayman22201@riddl_gitlab: " spaces are not related with commutative property of matrices in any way" The importance of spaces in formal math is relative. As long as another human can parse what you are seeing it's fine. With a machine parser more precision is required.
01:22:06FromGitter<riddl_gitlab> fill it with blood of innocent cat
01:22:10FromGitter<riddl_gitlab> ;-)
01:29:28*d10n-work quit (Quit: Connection closed for inactivity)
01:46:40FromGitter<timotheecour> (https://files.gitter.im/nim-lang/Nim/74nQ/image.png)
01:47:25FromGitter<timotheecour> @araq are you here? do you intend to have builds runing for prior versions of a branch even though u pushed new commits to that branch? travis is queing like crazy right now because of that
01:49:58FromGitter<timotheecour> (See https://travis-ci.org/nim-lang/Nim/branches) ; maybe there’s a setting we can put in .travis.yml that would kill a prior job if a new commit (wo `[skip ci]`) is pushed to that same branch (in some situations it’s useful to keep both; but in most cases it’s too resource ineffective)
02:07:47*seni quit (Ping timeout: 240 seconds)
02:23:59FromGitter<timotheecour> EDIT: figured out the setting we need to change, see https://github.com/nim-lang/Nim/issues/10556
02:28:58*a_b_m quit (Quit: Leaving)
03:02:25*banc quit (Quit: Bye)
03:05:47*dddddd quit (Remote host closed the connection)
03:24:10*banc joined #nim
03:42:33*NimBot joined #nim
03:44:57*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:15:56*nsf joined #nim
04:34:16FromGitter<timotheecour> is there a growable circular buffer implementation in either stdlib or nimble?
04:34:31FromGitter<timotheecour> Use case : queues
04:35:07leorize`lists`?
04:35:30leorizealso for queues there's `dequeues`
04:35:45leorize`deques` to be exact
04:40:50FromGitter<timotheecour> @leorize thanks! `deques` seems exactly what i need
05:59:14FromDiscord_<j$> anyone here?
05:59:36FromGitter<timotheecour> noone
05:59:55FromDiscord_<j$> hmmm
06:00:45FromDiscord_<j$> is there a way to have a variable that is accessible from all files?
06:01:06FromDiscord_<j$> or is that bad practice, in general?
06:01:06FromGitter<timotheecour> like `-d:foo:bar`
06:02:12FromGitter<timotheecour> bad practice in general but useful for debugging: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ (`nim —fullhelp`) [https://gitter.im/nim-lang/Nim?at=5c5926e49221b9382d188000]
06:05:18FromDiscord_<j$> hmm I don't think this is what I want, so there's a variable that's in my main module, I want to be able to access that variable in my imported modules, is there a way to do this, or a better way to have to same effect
06:06:22FromDiscord_<j$> I cant import the main module bc the recursive module error or whatever
06:07:11FromDiscord_<j$> the only other way I see is to declare that variable in all modules then assign them in the main
06:07:21FromDiscord_<j$> which is annoy
06:07:27FromDiscord_<j$> ing
06:07:41FromGitter<timotheecour> just have a module `common.nim` that defines ur global shared variable and let ur other modules call `import common` either explicitly or implicitly as i showed above via `—import:common.nim` (only for debugging tho)
06:10:49*kapil____ joined #nim
06:12:41FromDiscord_<j$> I didnt want to do that either but seems like the only good option
06:13:05FromDiscord_<j$> is there a reason you cant define a global variable like this?
06:16:51leorize@j$ try adding the needed variables on top of your main module
06:16:56leorizebefore any `import` statements
06:17:25leorizethen you might be able to access them
06:17:29leorizesee: http://nim-lang.github.io/Nim/manual.html#modules
06:23:24*narimiran joined #nim
06:29:15*lritter joined #nim
06:42:34FromGitter<timotheecour> thx for 2nd time today leorize, i didn’t know recursive module dependencies are (very partially…) supported
06:55:35*krux02 joined #nim
07:27:48FromDiscord_<demotomohiro> Then, everytime you reuse these modules that depends on global variables defined in main module, you have to define same global variables in the main module again or you would get ``undefined variable`` errors.
07:28:36FromDiscord_<demotomohiro> sounds like bad practice
07:35:34Araqdon't use too many globals, they make your code non .gcsafe so you won't be able to use multi-threading
07:41:27FromGitter<timotheecour> @araq all good with https://github.com/nim-lang/Nim/pull/10545 ?
07:43:33FromGitter<timotheecour> also travis didn’t use to be that slow; wondering if it’s the `araq-test-nimble-packages` builds; although even then it’s odd given that travis has a timeout per build
07:43:48*Cthalupa quit (Ping timeout: 246 seconds)
07:44:53ZevvProperly handling paths is surprisingly hard, good that Nim can handle this for me :)
07:47:24*Cthalupa joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:35*gmpreussner joined #nim
08:41:42*JustASlacker joined #nim
08:44:49*kapil____ quit (Quit: Connection closed for inactivity)
08:56:40*jubalh left #nim (#nim)
08:58:11narimiran@timotheecour regarding CIs: didn't you say that you have some updates for https://github.com/nim-lang/Nim/pull/10367 ?
09:06:15*volkov joined #nim
09:07:03Araqhttps://nim-lang.github.io/Nim/lib.html new doc style has arrived
09:07:11Araqthanks narimiran, looks much better IMO
09:08:25*floppydh joined #nim
09:15:38*kapil____ joined #nim
09:19:39Araqtimotheecour, haven't reviewed it yet
09:20:40Araqbut it should be fine if you addressed my remarks
09:20:53Araqwill review it soon, sorry
09:44:44*volkov quit (Quit: volkov)
09:48:32FromGitter<timotheecour> Ok thx; i sent u a few other PRs as well
09:49:38FromGitter<timotheecour> @narimiran yes haven’t got around to clean that azure PR, can do tmrw
09:50:07FromGitter<timotheecour> (looks like getting urgent bc travis is getting slow)
09:56:21*nc-x joined #nim
09:56:46FromGitter<mratsim> cgi applications, do we have those?
10:00:57nc-xnarimiran: http://i66.tinypic.com/672qv7.png
10:01:08nc-xmobile site does not look good
10:01:25narimirannc-x: thanks, will look into it
10:01:35FromGitter<mratsim> the lines are too long on wide screen
10:01:52FromGitter<mratsim> standard typography is 80~100 characters per line
10:16:16ZevvI guess on mobile you'd want to change the whole CSS layouting to hide the left menu
10:16:41*Vladar joined #nim
10:17:59*Cthalupa quit (Ping timeout: 268 seconds)
10:19:03*nc-x quit (Ping timeout: 256 seconds)
10:19:33*Cthalupa joined #nim
10:20:58narimiran@mratsim i'm big proponent of 80-100 chars per line, but: people complained that the pages are too narrow (ok, we could/should ignore them :)), and the code samples were "spilling over" way too frequently
10:21:34narimiranso i increased the width, *and* increased the main font size, so it is almost the same (slightly higher) char per line as before
10:21:37FromGitter<mratsim> restrict code to 80 ;)
10:25:25narimiransometimes code is under 80 but docgen does its "magic" and you have these too long lines
10:31:17narimirannc-x: how is https://nim-lang.org/docs/lib.html on mobile? (that's the old version)
10:33:07narimiranto answer my own question: it is TOC first, then the content. it might be best to do what Zevv says
10:37:50*dddddd joined #nim
10:42:55ZevvOld css folds the content div under the toc div if the window is too small
10:43:09Zevvbut having to scroll through 12 pages of toc before you reach the content is also not optimal
10:43:16narimiranyup
10:43:27ZevvI think for mobile there is no good solution, there is just too much info on the pages
10:43:56FromDiscord_<juan_carlos> Try <details>
10:44:22ZevvI do like the new CSS btw, makes better use of screen estate.
10:45:21*abm joined #nim
10:46:28narimiranthanks :)
10:49:49federico3oh - was there a release?
10:51:04federico3ok, tooted
10:58:31*absolutejam joined #nim
11:00:22absolutejammorning
11:02:34*tzui quit (Remote host closed the connection)
11:05:03*tzui joined #nim
11:20:12FromGitter<riddl_gitlab> is there any module in std proving pointers arithmetic like ptrMath in https://github.com/Vladar4/sdl2_nim/blob/master/sdl2/private/stdinc.nim or I need to provide it myself everytime?
11:21:18FromGitter<mratsim> no libs, see also: https://forum.nim-lang.org/t/4606#28851
11:27:21Zevvnarimiran: i don't know the css internal, but take a look at the python docs
11:28:02Zevvthey keep the toc frame on the left, but scale the main frame to the with of the screen. Wrapping is always ok on mobile small with, but you can still scroll left to the toc
11:28:33Zevvif I zoom in, the font grows but the main column is again resized to screen width
11:31:31FromGitter<riddl_gitlab> > no libs, see also: https://forum.nim-lang.org/t/4606#28851
11:32:31leorizethe general recommendation is to use UncheckedArray
11:34:10FromGitter<riddl_gitlab> > no libs, see also: https://forum.nim-lang.org/t/4606#28851 ⏎ ⏎ Thank you @mratsim . I have question to your optimized version of it (one with emiting c code). ⏎ If I what to use it I need always pass `pointer` (unsafeAddr of object) instead of `ptr Type`, do I understand it correct? [https://gitter.im/nim-lang/Nim?at=5c5974b2975714406b9a38fd]
11:34:46FromGitter<mratsim> you can use either pointer or ptr T, but unsafeAddr will give you ptr T
11:35:06FromGitter<mratsim> not that pointer also includes ptr T
11:43:07Araqwe need an arrayAddr that produces a ptr UncheckedArray
11:44:12FromGitter<mratsim> can be sugar
11:47:26Araqsure but it's often more correct to use ptr UncheckedArray but with addr you're encouraged to use the wrong type
11:52:44FromGitter<mratsim> yeah I’m casting to unchecked quite often
12:06:43*seni joined #nim
12:09:14livcdis nimble.directory open source ?
12:09:38livcdah i found it nvm
12:11:49*nsf quit (Quit: WeeChat 2.3)
12:14:58federico3yes
12:21:40narimiranZevv, nc-x: soon i'll have a fix for the documentation on mobile (or at least i think i will :))
12:22:06narimiranthere will be no TOC, and the main content will be of full length
12:26:26narimiran*full width
12:26:42*seni quit (Remote host closed the connection)
12:29:15*ng0 joined #nim
12:33:31*rockcavera quit (Remote host closed the connection)
12:34:49*kapil____ quit (Quit: Connection closed for inactivity)
12:35:24*stefanos82 joined #nim
12:36:35*seni joined #nim
12:36:58*rockcavera joined #nim
12:55:59*PMunch joined #nim
13:03:45*ng0 quit (Quit: Alexa, when is the end of world?)
13:15:31*Snircle joined #nim
13:23:03Araqhttps://ci.appveyor.com/project/Araq/nim/builds/22134532/tests wow only 3 failures
13:23:38Araqquite good for a heavy system.nim refactoring
13:24:24PMunchNice, what kind of refactoring?
13:24:45Araqmoved IO subsystem to its own module
13:30:01federico3is nimfind not being shipped with the latest release by choice?
13:30:26Araqyeah, the 0.19.x line is about bugfixes only
13:30:28leorizefederico3: because it's not there? :P
13:30:48Araqwe're all waiting for 0.20 :-)
13:30:51federico3same for nim-gbp? I see a tools/nim-gdb.py file
13:31:06Araqthat's probably an oversight of installer.ini
13:31:23Araqbut again, if 0.19.0 lacked it, 0.19.4 should also lack it
13:32:00federico3tools/nim-gdb.py was shipped first with 0.19.0
13:33:00federico3thanks Araq
13:33:02Araqwell I dunno
13:33:18Araqyou can argue it's just a bug and thus 0.19.x should have it
13:33:46Araqor you can argue it's a "new feature" since you can do 'source toos/nim-gdb.py' in GDB otherwise
13:34:11Araqnot worth losing sleep over, IMO.
13:35:08leorizethat is, if you install nim-gdb.py :P
13:36:15federico3I'm just asking to keep packaging.rst accurate
13:36:33AraqI see
13:37:08Araqwell packaging.rst should probably mention installer.ini which covers these things too, albeit a bit indirectly
13:46:12federico3yes, that helps
13:49:54Araqhttps://github.com/nim-lang/Nim/issues/10561 this seems to be an easy system.nim patch for those of you who'd like to get into Nim development
14:15:37FromGitter<arnetheduck> @Araq, doing https://github.com/nim-lang/RFCs/issues/67?
14:20:07Araqyeah
14:20:12Araqwas easier than expected
14:20:39FromGitter<arnetheduck> nice.
14:21:54Araqcoming soon: Move the signal handler and exception handling code out of system *cough*
14:22:11Araqoh no, first the assert-related stuff
14:22:47leorizeosproc API is terrible atm :/
14:22:56Araqhey! I like it
14:23:16leorizeI need to pass in only stdin and capture stdout
14:23:23leorizebut that's not possible with the current osproc
14:23:41Araqsure it is, that's what I did in nimedit
14:24:18leorizeoh, nice
14:24:22leorizehow did you do it?
14:25:35Araqhttps://github.com/Araq/nimedit/blob/master/console.nim#L359
14:26:08AraqI guess the API could be much better, but it's also messy because of the multi threading
14:26:50Zevvnarimiran: looks good, the TOC just drops out
14:27:53leorizeAraq: oh, I need to actually pass the stdin file to the process
14:28:04leorizeor else that will break `isatty`
14:28:40narimiranZevv: thanks, i'm quite satisfied how it looks :) (and surprised that it worked :)) notice that also font size drops a bit, so you don't have giant font on your phone or small screen/window
14:28:44Araqah there is an RFC for that :P leorize
14:29:02Zevvnarimiran: I noticed, this is pretty and usable imho
14:29:43ZevvIf you're open for more comments (which I don't know how to solve):
14:29:53narimirannow we can browse the documentation while we're on toilet :D
14:30:13ZevvThe TOC is sometimes not helping; for example in system there is this whole list from `..` to `<` which is not at all informational
14:30:22Zevvor the 6 times "len"
14:31:00Zevvthere is no type info there, so the user has no clue which one to choose
14:31:05narimiranjust resize your window and you won't be seeing it :P :D
14:31:22ZevvYeah, true, solves it for me as well :)
14:31:36narimiranjoking aside, i agree and i hope it will be solved sooner or later
14:31:47Zevvyeah, but what are the possible solutions?
14:32:06Araqmerge overloaded procs to one in the TOC
14:32:12narimiranthe best solution i came with so far: let somebody else worry and implement that :P
14:32:22ZevvI heard you're the docman :)
14:32:27narimiranshit.
14:32:36ZevvI'm just a naive user
14:34:14*aguspiza joined #nim
14:44:21Araqleorize, can you create a PR that adds a 'startProcess' that also takes stdin/stdout/stderr. Maybe it's hard though
14:49:16leorizeit shouldn't be too hard, I'll try :)
14:49:19PMunchCompanion post to my FOSDEM talk is now up: https://peterme.net/meta-programming-in-nim-fosdem-talk-companion-post.html it might be a still rough but I wanted to get something out there as fast as possible so people wouldn't forget all about it :P
14:50:50narimiranPMunch: what are your impressions? how was the audience?
14:51:48PMunchLot's of nodding, some laughing (at the right places), generally they seemed interested enough
14:52:17PMunchWill be interesting to see the video of it :P
14:52:25leorizeeveryone will be interested when you show genui :p
14:52:29PMunchHard to gauge my own performance when I'm not in the audience
14:52:40PMunchleorize, I actually just opened some genui files
14:52:45leorizetoo bad it's not available for everything
14:53:46PMunchTalked to krux02 about it at FOSDEM and after he pointed me to look at AntTweakBar I really want to start working on it again
14:54:20PMunchI was thinking about my new library, the cross-platformm one :)
14:54:40PMunchIt's really simple to make the genui macro for your platform of choice though
14:54:45narimirancould you maybe, before that, fix playground? :) people are asking about it
14:54:56PMunchStill haven't gotten access to it..
14:55:06PMunchOtherwise it would be on the top of my list
14:55:51narimiranok, who we need to ping/remind to give you the access?
14:56:05PMunchNot 100% sure TBH
14:56:46PMunchI think it's zacharycarter, but not sure
14:57:58narimirani think he's on gitter, so let's try it this way: @zacharycarter, ping :)
14:58:44PMunchDoesn't the bot auto @?
14:58:52PMunchOr is that only when it's at the start of a sentence?
14:58:59narimirandoes it? i had no idea
14:59:20PMunchIt used to at least :P
14:59:52FromGitter<Vindaar> I don't think it does. At least not in mid sentence. At the start no idea
15:00:06narimiranVindaar we can check it right now
15:00:06*kapil____ joined #nim
15:00:14narimirandid it?
15:00:18FromGitter<Vindaar> nope
15:00:29narimiranVindaar: now?
15:00:39FromGitter<Vindaar> yep
15:00:44narimiranok, : is needed
15:00:52PMunchVindaar, does this work?
15:00:56PMunchAh yes it does
15:01:00FromGitter<Vindaar> hehe :)
15:01:09PMunchVindaar- is it any symbol
15:01:12PMunchHmm, no
15:01:13narimiranin the middle of sentence Vindaar: maybe?
15:01:27FromGitter<Vindaar> nope, I think just the `@`
15:01:37PMunchSo it seems like it's the start of the sentence and only when followed by : or ,
15:03:19FromGitter<Clyybber> Im pretty sure it works in the mid of a sentence, it's just that gitters highlighting is wonky at best
15:03:51narimiranit works if i put @ in front manually, @Clyybber, like this here
15:04:11FromGitter<Clyybber> Yeah, the @ is needed
15:05:59PMunchClyybber, the IRC -> Gitter bot will automatically add an @ before the username if it's the first word and it's followed by a , or :
15:06:07*seni quit (Quit: Leaving)
15:06:09PMunchThat's what we were discussing :P
15:06:38PMunchIf you compare the IRC and gitter logs you will see what we mean: irclogs.nim-lang.org
15:06:53FromGitter<Clyybber> Oh, sry I was a bit OOL :D
15:07:06FromGitter<Clyybber> Thats pretty cool tho
15:08:24PMunchYeah it's nice, since IRC doesn't use @ to highlight and just highlights you as long as your word is in the message
15:08:32PMunchPlus many IRC clients will have tab completion for nick-names which often adds a , or : automatically
15:11:00krux02PMunch, so did you try out AntTweakBar?
15:11:31PMunchI didn't try it, but I looked at some code examples
15:12:25PMunchI mean this kind of stuff is easy to expand to in Nim: TwAddVarRW(bar, "speed", TW_TYPE_DOUBLE, &speed,
15:12:25PMunch " label='Rot speed' min=0 max=2 step=0.01 keyIncr=s keyDecr=S help='Rotation speed (turns/second)' ");
15:12:56krux02yes it is
15:13:00krux02not everything though
15:13:14krux02the stap is something that still should be added manually I think
15:13:32krux02but TW_TYPE_DOUBLE is something you shouldn't need to write manually
15:13:44PMunchCould be written as `bar.addVarRW(speed, label="Rot speed", min=0, max=0, step=0.01, keyIncr='s', keyDecr='S', help="Rotation speed (turns/second)");
15:13:55PMunchstap?
15:14:11krux02step
15:14:15PMunchOh yeah
15:14:37PMunchLooking at AntTweakBar I started to think of how you can control the widget creation
15:14:48krux02not much
15:15:08krux02I used them mostly for debugging purpose, so not real end user UI
15:15:27PMunchI kinda like the idea of "hints" that are a simple key-value pair list which the engine is free to use or discard, but with some "official" names for things that should work cross-platform.
15:15:29krux02but really fast prototyping and here everything is static, except that you can hide it
15:16:01PMunchYeah AntTweakBar definitely looks to be more geared towards debugging
15:16:13*ng0 joined #nim
15:16:20PMunchI mean the input idea is similar, but the output is vastly different
15:16:36krux02it has no intention to be end user UI, but that should be custom made in my opinion anyway
15:16:47krux02end user UI at least for games don't need much.
15:17:07PMunchWell games is a bit of a special category since they tend to be very stylized
15:17:10*aguspiza quit (Ping timeout: 246 seconds)
15:17:15krux02a few sliders in the main menue. items to choose from a list. But some fancy graphcis
15:17:29PMunchBut for something like a settings menu a similar approach to ATB should work fine
15:17:48krux02it really depends on what you want to do. But ant tweak bar is really made to be embedded in 3D applications
15:17:52krux02so mostly games
15:17:56PMunchTrue
15:18:25PMunchIt's definitely giving me some good ideas though, so thanks for telling me about it :)
15:18:41krux02you are welcome
15:19:30*aguspiza joined #nim
15:19:40krux02when you try it out. The official website only has a version that does not yet support SDL2.0 that is a bit sad. I fixed that problem, there is no way to contact the maintainer (if you still want to call him that) to merge that.
15:19:55krux02so nimAntTweakBar is already fixed
15:20:23krux02https://github.com/krux02/nimAntTweakBar
15:21:35krux02but I didn't port the examples
15:21:41PMunchOh cool
15:30:22*nsf joined #nim
15:33:56*aguspiza quit (Ping timeout: 240 seconds)
15:41:40*ng0 quit (Remote host closed the connection)
15:42:42*ng0 joined #nim
16:02:27*Trustable joined #nim
16:11:05*PMunch quit (Remote host closed the connection)
16:28:44rockcaverawhich library do I use for regular expressions? NRE or RE?
16:29:26narimirani think re is the preferred one
16:31:22*JustASlacker quit (Remote host closed the connection)
16:37:47*floppydh quit (Quit: WeeChat 2.3)
16:40:19*absolutejam quit (Ping timeout: 268 seconds)
16:48:26*solitudesf quit (Quit: ZNC - https://znc.in)
16:48:52*solitudesf joined #nim
16:51:42FromGitter<kaushalmodi> re is officially preferred, nre is unofficially by some :)
16:51:55FromGitter<kaushalmodi> And nre was officially deprecated at some point
16:52:51FromGitter<kaushalmodi> .. and there's a third one, available from nimble, not depending on PCRE: `regex`
16:55:13Araqregex doesn't compile with devel
16:55:25Araqunknown regression deep inside unittest.nim
16:56:34Araqand that's a pity because we could resolve the dispute by embracing regex
17:00:38FromGitter<Varriount> Araq: Is the compilation error straightforward?
17:02:11Araqwhat do you mean?
17:22:24FromDiscord_<akavel> Hi! Newbie question: does Nim allow overloading by only returned type of a proc?
17:23:06FromDiscord_<akavel> e.g.:
17:23:06FromDiscord_<akavel> ```
17:23:06FromDiscord_<akavel> proc foo(): uint64 = ...
17:23:06FromDiscord_<akavel> proc foo(): string = ...
17:23:06FromDiscord_<akavel> ```
17:23:53FromDiscord_<akavel> or should I distinguish them by name, e.g.:
17:23:53FromDiscord_<akavel> ```
17:23:54FromDiscord_<akavel> proc foo_uint64(): uint64 = ...
17:23:54FromDiscord_<akavel> proc foo_string(): string = ...
17:23:54FromDiscord_<akavel> ```
17:27:47narimiranisn't this easily tested by yourself? ;)
17:33:31FromGitter<Vindaar> @akavel Hey! No that is not supported. You can either distinguish by name, create a generic which you instantiate manually or use a `typedesc` argument: https://gist.github.com/Vindaar/a84bd2eb9c3d215026c219cb21b77054 ⏎ ⏎ @narimiran well, it's nice to have confirmation and some ideas for alternatives, no? ;)
17:34:04narimirantrue, sorry
17:37:20FromGitter<mratsim> proc foo(): auto = when type(CompileTimefoo()): fooUint64() else: fooString()
17:38:01FromDiscord_<akavel> @Vindaar: thanks!
17:39:02FromDiscord_<akavel> In case of a generic and `when ... elif ...`, will Nim emit an error if I try to use it for a type not listed in the `when` block?
17:39:24FromGitter<brentp> why not just ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ ? [https://gitter.im/nim-lang/Nim?at=5c59ca4cc2dba5382ee683c6]
17:39:59FromDiscord_<akavel> @brentp: ok, cool, thanks! 😃
17:41:18narimirannow for the real question: why do you need this? (aka, maybe you don't need this :))
17:41:32FromGitter<Vindaar> @akavel if you use it for a type not listed in either `when` or `elif` the function body will just be empty. So depending on your use case you should either include an `else` branch to handle all other types (error manually for instance) or use what @brentp says and already constrain the generic
17:41:59FromDiscord_<akavel> @narimiran: I'm writing a protocol parser & emitter,
17:42:41FromDiscord_<akavel> the protocol has some basic "atoms", namely: uint64, bool, string
17:43:58FromDiscord_<akavel> for the emitter, I imagine I can have `proc write(s; v: uint64)` and `proc write(s; v: string)` etc.
17:44:17FromDiscord_<akavel> but I was wondering what to do for the parser
17:45:30FromDiscord_<akavel> should I have `read_uint64()`, or somehow `read[uint64]()`, or `var v: uint64 = stream.read()` would just work because type inference via return type.
17:45:40leorize@akavel: there's the `{.error: "msg".}` pragma that you can place in the `else` branch
17:46:28FromDiscord_<akavel> @leorize: cool, thanks! Still, I suppose the type constraint has a benefit of being self-documenting in the signature
17:46:48FromDiscord_<akavel> @narimiran: do you have some other suggestions in this case? 😃
17:48:25FromGitter<brentp> @akavel, you can also do, e.g.: ⏎ ⏎ ```proc read(i:var int) = ... ⏎ proc read(s:var string) = ... ⏎ proc read(f:var float) = ...``` [https://gitter.im/nim-lang/Nim?at=5c59cc69975714406b9ca97f]
17:49:17FromDiscord_<akavel> @brentp: but this then requires 2x more lines where called, no?
17:50:51FromGitter<brentp> you mean in order to allocate the argument? not if you re-use it.
17:51:37FromDiscord_<akavel> `let x = stream.read[uint64]()` or `let x = stream.read_uint64()` looks simpler for me than:
17:51:38FromDiscord_<akavel> ```
17:51:38FromDiscord_<akavel> var x: uint64
17:51:38FromDiscord_<akavel> stream.read(x)
17:51:38FromDiscord_<akavel> ```
17:52:05FromDiscord_<akavel> especially if I do a *lot* of those
17:53:05*FromGitter quit (Remote host closed the connection)
17:54:58*jacobsin joined #nim
17:56:07FromDiscord_<akavel> Uh, ok, now I see in the streams library there are `readUint64` etc. functions, so this kinda makes me believe this is probably "the canonical way"
18:14:36Zevvdom96: I'd like to do some small refactorings on the networking code; I think getAddrInfo() should return a proper Nim data structure that can be GC'ed so freeAddrInfo() can be dropped
18:15:27Zevvand I think that some procs using inet_ntoa()/inet_ntop() might be better off moving to getnameinfo()
18:15:30Zevvany thoughts?
18:18:33*tzui quit (Ping timeout: 252 seconds)
18:19:29*lritter quit (Quit: Leaving)
18:29:35*ng0 quit (Quit: Alexa, when is the end of world?)
18:41:59*regtools quit (Quit: leaving)
18:42:09*regtools joined #nim
18:44:18AraqZevv, better embrace the destructors for this
18:48:36Zevvnot sure of that is needed at this time. getAddrInfo() will just iterate the addrinfo linked list and put the elements in a seq, and do freeaddrinfo() straight away.
18:49:02*kapil____ quit (Quit: Connection closed for inactivity)
18:49:29Zevvwhy keep the result in a linked list with ptr's
19:04:35*aguspiza joined #nim
19:16:47*jacobsin quit (Ping timeout: 240 seconds)
19:18:21*jacobsin joined #nim
19:20:01*jxy quit (Quit: leaving)
19:22:33*jacobsin quit (Ping timeout: 245 seconds)
19:23:04*nsf quit (Quit: WeeChat 2.3)
19:29:40FromDiscord_<demotomohiro> I wrote a blog post about debugging Nim code with GDB.
19:29:40FromDiscord_<demotomohiro> https://internet-of-tomohiro.netlify.com/nim/gdb.en.html
19:30:53*seni joined #nim
19:31:50*jacobsin joined #nim
19:32:27*snowolf quit (Ping timeout: 250 seconds)
19:33:50*snowolf joined #nim
19:36:10*jacobsin quit (Ping timeout: 246 seconds)
19:37:15*jacobsin joined #nim
19:37:56*jxy joined #nim
19:41:19*jacobsin quit (Ping timeout: 244 seconds)
19:42:16*jacobsin joined #nim
19:46:30*aziz joined #nim
19:49:38*jacobsin quit (Ping timeout: 245 seconds)
19:51:21*jacobsin joined #nim
19:55:26*jacobsin quit (Ping timeout: 240 seconds)
19:55:36*vlad1777d joined #nim
20:28:56*Jesin quit (Quit: Leaving)
20:31:20krux02demotomohiro: that is pretty cool
20:41:07*kobi7 joined #nim
20:47:08*Jesin joined #nim
20:47:27*Trustable quit (Remote host closed the connection)
20:49:28*aziz quit (Ping timeout: 272 seconds)
20:51:24FromDiscord_<demotomohiro> krux02 thank you!
21:01:37*aziz joined #nim
21:01:44krux02it mostly sums up the content of the video, but it also mentions things that I think are not part of the video
21:02:06krux02but I think you don't mention the key to refrash the text user interface on the terminal
21:02:18krux02it is pretty important since it can mess up pretty easily.
21:09:37krux02demotomohire: you should mention Ctrl-L
21:15:34*aziz quit (Ping timeout: 246 seconds)
21:16:20narimiran@demotomohiro thanks for the article! i think we should link to it in the gdb video description
21:21:42*theelous3 joined #nim
21:23:29*narimiran quit (Read error: Connection reset by peer)
21:26:23*kobi7 quit (Quit: Leaving)
21:26:42*kobi7 joined #nim
21:27:16kobi7cd $(nimble path yaml); nim c yaml.nim
21:27:27kobi7worksforme anyone?
21:28:27shashlickqw21OI()
21:28:32*aziz joined #nim
21:32:19*Vladar quit (Read error: Connection reset by peer)
21:32:22shashlickthat was an awesome article
21:45:31*abm quit (Read error: Connection reset by peer)
21:45:58*abm joined #nim
22:03:48*aguspiza quit (Ping timeout: 245 seconds)
22:12:41federico3Nim 0.19.4 has been uploaded and is being built in Debian https://buildd.debian.org/status/package.php?p=nim
22:15:39*aziz quit (Ping timeout: 246 seconds)
22:29:11*aziz joined #nim
22:38:35*PMunch joined #nim
22:42:44*krux02 quit (Remote host closed the connection)
22:43:32*aziz quit (Ping timeout: 268 seconds)
22:52:54*jacobsin joined #nim
22:55:20*aziz joined #nim
22:57:08*jacobsin quit (Ping timeout: 250 seconds)
23:00:03*vlad1777d quit (Ping timeout: 245 seconds)
23:00:55*fvs joined #nim
23:02:05fvshi, not sure why the following fails, any suggestions: https://pastebin.com/zeWMUykp
23:03:33*FromGitter joined #nim
23:04:09FromGitter<oprypin> thanks @genotrance
23:05:52*kobi7 quit (Quit: Leaving)
23:06:04oprypinfvs, num*8 is probably not what you meant
23:09:53FromGitter<akavel> I'm trying to use `concept`s, but I'm getting an error like below: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5a17c1ca428b06455f194e]
23:10:14FromGitter<akavel> relevant file fragments:
23:10:44FromGitter<akavel> ##serve.nim
23:11:00FromGitter<akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5a180478e1ed4103ea429f]
23:11:12FromGitter<akavel> then later:
23:11:56FromGitter<akavel> ```proc serve*(store: Store; r, w: Stream) = ⏎ # ...``` [https://gitter.im/nim-lang/Nim?at=5c5a183bceb5a2264f9de886]
23:12:09FromGitter<akavel> ##nixme.nim
23:12:30FromGitter<akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5a185d1b62f12650ab6184]
23:12:44FromGitter<akavel> ##local_store.nim
23:13:12FromGitter<akavel> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c5a188878e1ed4103ea4767]
23:13:16FromGitter<akavel> any ideas?...
23:13:26FromGitter<akavel> what I might be doing wrong?...
23:20:44*aziz quit (Remote host closed the connection)
23:21:30FromGitter<akavel> Ok, found it: seems that in the concept declaration, I should be using `... is seq[string]` instead of `... : seq[string]`
23:21:38PMunchakavel, try changing your concept to s.query_valid_paths(openArray[string]) is seq[string]
23:21:46PMunchYeah :)
23:21:49FromGitter<akavel> :)
23:22:09FromGitter<akavel> found it via `tests/concepts/` in Nim repo
23:22:41PMunchThe Nim manual also mentions this: https://nim-lang.org/docs/manual.html#generics-concepts
23:23:06FromGitter<akavel> right, also see it now; just didn't notice it's ` is `, not `:`, in the example.
23:23:08FromGitter<akavel> Thanks!
23:23:08PMunchSee for example the Stack[T] concept which has `s.pop() is T`
23:23:19PMunchNo problem :)
23:24:04PMunchThe concept syntax can be a bit confusing
23:26:30FromGitter<akavel> still, better than templates in C++ ;)
23:29:50PMunchOh for sure
23:31:21PMunchI do wish we had some kind of simpler interface syntax though
23:31:42PMunchMaybe I'll write a macro that will generate the correct concept syntax for me :P
23:32:12*PMunch quit (Remote host closed the connection)
23:41:19FromGitter<akavel> Can I define an array in multiple lines? Each element on separate line?
23:42:05FromGitter<akavel> ok, sorry, I had a different syntax error than I expected.
23:55:14*rockcavera quit (Remote host closed the connection)
23:59:20*askatasuna joined #nim