00:04:17*ofelas joined #nim
00:13:21*bung quit (Ping timeout: 265 seconds)
00:22:35*lritter quit (Quit: Leaving)
00:26:03*oddp quit (Ping timeout: 258 seconds)
00:28:36*bung joined #nim
00:41:27FromDiscord<codic> @Vindaar nah, that isn't what i want. it's really awesome though
00:42:04FromDiscord<codic> oh hey daylight!
00:42:35FromDiscord<codic> i need them all executed in one shell
00:42:35Yardanico@codic you can easily run shell commands with osproc lol
00:42:40Yardanicoin the same one?
00:42:43FromDiscord<codic> yes
00:42:45Yardanicothen start bash
00:42:47Yardanicoand communicate with it
00:42:49nisstyrebash foo.sh
00:42:50FromDiscord<codic> so i can store stuff like environment variables
00:42:56FromDiscord<codic> wait
00:43:07Yardanicoyou can start a process and then communicate with it
00:43:09FromDiscord<codic> can i just add the input to a file and re evaluate it every time
00:43:20FromDiscord<codic> That'd be inefficent though↡How do i communicate with it?
00:43:24FromDiscord<codic> aka send it commands
00:43:26Yardanicowhy would it be inefficient?
00:43:32nisstyreyou can use a pipe
00:43:38Yardanicodidn't you want a "session" youself?
00:44:45FromDiscord<codic> i was saying re evaluating every time would be inefficent lol
00:44:55FromDiscord<codic> yeah, i wanna have it all in one session. how do i use a pipe?
00:45:01FromDiscord<codic> (i'm trying to implement a basic shell here)
00:45:03nisstyreyou get a file descriptor, standard input
00:45:05nisstyreyou write to it
00:45:08nisstyrebash evaluates it
00:45:17nisstyrethat's how your shell works when you type stuff in it normally
00:45:21nisstyreso you do the same thing with nim
00:45:22FromDiscord<codic> could you show a quick example?
00:51:13*fredrikhr quit (Ping timeout: 264 seconds)
00:53:07Yardanicoone sec
00:53:52Yardanicoof course you can wrap this in a more usable way
00:54:26Yardanicoah right, also add
00:55:07Yardanicoso it would search for the binary in PATH
00:55:24Yardanicoof course instead of calling exit in bash you can just kill it
00:55:37Yardanicolike "bash.kill()"
00:58:16nisstyreBTW the reason for the flush() is because it's line buffered
00:58:27Yardanicomaybe there's a better way, idk, I've never really used startProcess before :)
00:58:28nisstyreI always forget to do that
00:59:41nisstyrebecause bash doesn't immediately evaluate everything you give it, you usually want to give it a complete line (i.e. command)
01:00:39nisstyrethe tricky part of this is getting output in a useful structured way though
01:00:48nisstyrebecause say you execute a command that takes 20 seconds
01:00:56nisstyreyou don't really know when it's finished
01:01:10nisstyrebash will set $? of course
01:01:18nisstyrebut it's tricky to deal with that in this scenario
01:02:05nisstyreusually you just want to block until the command is finished
01:20:03rayman22201is leorize or any Azure CI experts around to help me debug why my Async PR is failing?
01:22:23*endragor joined #nim
01:31:15leorizelink please :)
01:34:58disbotβž₯ 3Fix asyncdispatch drain behavior (#14820)
01:35:41FromGitter<YusufCakan> Hi, when i try to debug a file called test with "gdb-nim test" I get an error "nim-gdb: line 11: -f: command not found"
01:36:01FromGitter<YusufCakan> does anyone know what i should do.
01:36:13leorizerayman22201: your test is time sensitive
01:36:51leorizesince mac vms have 4 vcores that's thrashed by testament, an iteration might have take more time than it should
01:37:08leorizemaybe you should build some tolerance in?
01:37:25rayman22201leorize: it's time dependent but not time sensitive.
01:37:40leorizelike use getMonoTime() to verify that it take +/- 50ms?
01:37:58leorizeyea, I used the wrong word :P
01:39:06rayman22201I actually don't think it should matter. But now I need to think about what you are saying more closely :-P
01:40:18leorizewell it also could be that we have a huge inefficiency somewhere that stalled the thing :P
01:40:23leorizeyour choice :P
01:41:06*krux02_ quit (Remote host closed the connection)
01:41:28rayman22201I could also increase the timeouts so it's a much slower test. Less likely to be affected by an I/O stall.
01:42:39leorizeyou can add some code to gauge the time
01:42:47leorizestd/monotimes is useful for this
01:43:00leorizeshould let you know how much time drifted
01:43:21leorizeif it's too large then we will have to look closer
01:43:57rayman22201I'm still not clear what exactly is happening. I purposefully am counting iterations and not explicit time for this exact reason. I know it's variable. But you are saying the ioselector missed an entire interval.
01:44:56leorizewe don't know what could've been running in the background
01:45:19leorizesome GC tests allocates over 4GB of RAM and might've stalled the thing due to swapping
01:45:26*ForumUpdaterBot quit (Remote host closed the connection)
01:45:34*ForumUpdaterBot joined #nim
01:45:37rayman22201true, but I would expect it to respect the timeout and have more iterations in that case, not less...
01:45:37leorizethough I don't think mac have the same swapping prob as with linux
01:45:59rayman22201but maybe not?
01:47:48leorizemaybe you can add a time debug print just to see how can one iteration was lost?
01:48:02*chemist69 quit (Ping timeout: 260 seconds)
01:48:15rayman22201yeah. I'm tempted to do that
01:48:24rayman22201makes for a messy PR but oh well
01:50:06*chemist69 joined #nim
01:50:07rayman22201Does my concern make sense? I get that a slow VM might cause it to miss a deadline, but it looks like the OS is not respecting the timeout value, which is concerning to me...
01:50:53leorizeiirc we run the tests on macOS 10.14
01:51:00leorizeso maybe a bug from then?
01:51:23rayman22201the config shows 10.5
01:51:33Yardanicowe certainly don't use that :)
01:51:34leorizedebug prints then
01:52:04rayman22201:-) aye aye capn! debugs away!
02:05:43*thomasross joined #nim
02:32:15ForumUpdaterBotNew thread by Tibo: Benefit of the effect system?, see https://forum.nim-lang.org/t/6507
02:34:17FromDiscord<Rika> moderated :ThonkDumb:
02:36:27*r4vi quit (Ping timeout: 272 seconds)
02:37:36*muffindrake quit (Ping timeout: 246 seconds)
02:38:21*r4vi joined #nim
02:38:47*surma quit (Ping timeout: 260 seconds)
02:39:56*muffindrake joined #nim
02:40:22*BlameTheRoomba quit (Quit: Default Quit Message)
02:41:33FromDiscord<Yardanico> New account
02:41:57FromDiscord<Yardanico> You can read the post in https://forum.nim-lang.org/posts.json?id=6507 XD
02:42:37rayman22201lol. I add extra debug print statements to my test, and the problem goes away XD
02:47:18*surma joined #nim
02:52:24FromDiscord<Rika> its really hard to read the post like that
02:53:27FromDiscord<Rika> rayman22201: bugs are allergic to debugging, theyll come back once you remove debugging stuff πŸ˜›
02:59:19*dddddd quit (Ping timeout: 244 seconds)
03:12:21*thomasross quit (Ping timeout: 256 seconds)
03:19:38shashlick@leorize - https://github.com/nimterop/nimterop/issues/234 any thoughts?
03:19:39disbotβž₯ 3Leading underscores and exported fields
03:53:38ForumUpdaterBotNew thread by Juancarlospaco: Connection-Pooling Compile-Time ORM, see https://forum.nim-lang.org/t/6508
03:54:37*vicfred quit (Quit: Leaving)
03:55:27FromDiscord<Rika> cool
03:56:13FromDiscord<Rika> actually really cool, reading through it now
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:32*marnix joined #nim
04:06:43*supakeen joined #nim
04:15:22*nsf joined #nim
04:16:27*NimBot joined #nim
04:18:24*narimiran joined #nim
04:45:52*waleee-cl quit (Quit: Connection closed for inactivity)
05:38:40*fredrikhr joined #nim
05:43:57*marnix quit (Ping timeout: 265 seconds)
05:45:42*solitudesf joined #nim
05:48:42*chemist69 quit (Ping timeout: 246 seconds)
05:49:08*chemist69 joined #nim
05:53:56*opDispatch quit (Quit: Konversation terminated!)
05:54:02*narimiran quit (Ping timeout: 246 seconds)
06:02:26*marnix joined #nim
06:23:28*Tlanger is now known as loggerer___
06:25:36*loggerer___ is now known as Tanger
06:30:54*fredrikhr quit (Ping timeout: 240 seconds)
06:32:08*PMunch joined #nim
06:42:13*Vladar joined #nim
06:49:04PMunchTurns out adding JSON output to the RST generator was trickier than I imagined..
06:49:33PMunchMostly because JSON, unlike HTML and Latex, requires strings to be enclosed in quotes.
06:53:52*narimiran joined #nim
07:04:21PMunchJust realised that pandoc has a JSON output, but it is beyond terrible
07:04:49PMunchAlthough it seems to have been spawned by the same issue
07:06:27PMunchIt turns this: http://ix.io/2qxR/rst into this http://ix.io/2qxP/json
07:08:58*pietroppeter joined #nim
07:18:41narimirannew blog post: Ray tracing in Nim β€” https://nim-lang.org/blog/2020/06/30/ray-tracing-in-nim.html
07:21:08ForumUpdaterBotNew thread by Miran: New blog post: Ray tracing in Nim, see https://forum.nim-lang.org/t/6509
07:34:09*marnix quit (Ping timeout: 265 seconds)
07:35:58PMunchOh wow, what is up with that GCC 10 OpenMP performance? @mratsim
07:44:27PMunch"[...] a fast VM that gives Nim the speed of Python at compile-time [...]" did you benchmark this? When I tried some simple stuff in NimScript it was about 0.5x the speed of Python
07:45:11*marnix joined #nim
07:45:28FromDiscord<Rika> TIL heisenbug
07:45:29FromDiscord<Rika> lol
07:47:32*marnix_ joined #nim
07:48:17FromDiscord<Elegant Beef> Pmunch i think that's more just saying "Runs like ass" than "Runs on par with python"
07:51:14*marnix quit (Ping timeout: 240 seconds)
07:53:47*chemist69 quit (Ping timeout: 260 seconds)
07:53:53PMunchHaha, the way it's worded seems to indicate that it's a good thing :P
07:54:18FromDiscord<Elegant Beef> idk your mileage my vary
07:54:20*chemist69 joined #nim
07:54:21FromDiscord<Elegant Beef> may*
08:05:56ForumUpdaterBotNew thread by Tanguymario: Tables and Import, see https://forum.nim-lang.org/t/6510
08:10:10*muffindrake quit (Quit: muffindrake)
08:17:56*muffindrake joined #nim
08:18:56PMunchUgh this JSON output is a mess..
08:19:03PMunchI need more coffee
08:23:55FromDiscord<Elegant Beef> The json data for the structured docs?
08:25:10PMunchYeah, I'm trying to convert RST to JSON
08:25:14FromDiscord<mratsim> @PMunch, I'm just taking Araq's words
08:25:30FromDiscord<mratsim> I don't know what's up with GCC10 OpenMP
08:26:32PMunch@Elegant Beef, so that you can use `nim jsondoc` and then convert that output into whatever format you want
08:26:54PMunch@mratsim, ah I see
08:27:51FromDiscord<Elegant Beef> Interesting
08:29:00PMunchSo you could for example convert it to Markdown, or to a different HTML representation, or to something completely different
08:32:22*Trustable joined #nim
08:34:57*FromDiscord quit (Remote host closed the connection)
08:35:12*FromDiscord joined #nim
08:36:18FromDiscord<Elegant Beef> Time to make a DSL for it in nim so i can convert it back into compileable code and repeat
08:38:19PMunchOh, the FromDiscord bot was down for a second
08:38:31*watzon quit (Quit: killed)
08:38:31*k0mpjut0r quit (Quit: killed)
08:38:31*planetis[m] quit (Quit: killed)
08:38:31*unclechu quit (Quit: killed)
08:38:32*GitterIntegratio quit (Quit: killed)
08:38:32*BitPuffin quit (Quit: killed)
08:38:32*lnxw37d4 quit (Quit: killed)
08:38:33*sendell quit (Quit: killed)
08:38:33*neceve quit (Quit: killed)
08:38:36*dzamo[m] quit (Quit: killed)
08:38:37*oneark quit (Quit: killed)
08:38:37*ee7[m] quit (Quit: killed)
08:38:37*Zoom[m] quit (Quit: killed)
08:38:37*xicheng[m] quit (Quit: killed)
08:38:37*skrylar[m] quit (Quit: killed)
08:38:41*codic quit (Quit: killed)
08:38:47*MTRNord[m] quit (Quit: killed)
08:41:40*Trustable quit (Ping timeout: 246 seconds)
08:51:15PMunchHmm, I'm starting to think this can't be done in a sane way without rewriting the entire RST generator..
08:52:46*lnxw37d4 joined #nim
08:53:40PMunchThe insane output that pandoc gives should be possible though
08:54:08PMunchMaybe the "right" thing to do here is let the rstgen module output the crazy output, then post-parse that in docgen..
08:54:39PMunchOr in the "rstToJson" procedure in rstgen
08:54:41FromDiscord<mratsim> and posted to HN as well: https://www.reddit.com/r/programming/comments/hijj3c/ray_tracing_in_nim/fwghjn9/
08:54:45FromDiscord<mratsim> Reddit*
08:55:57FromDiscord<Rika> interesting reddit username πŸ˜›
08:56:28FromDiscord<mratsim> Well I had no idea what to call myself and I was in chapter 400 something of the manga :p
08:57:31FromDiscord<mratsim> I watched the movie in a flight to Japan, it's meh though :/
08:58:09FromDiscord<Rika> ~~i dont know what series you're talking about~~
09:02:05FromDiscord<mratsim> https://en.wikipedia.org/wiki/Kingdom_(manga)
09:02:47FromDiscord<Rika> looks old πŸ€”
09:09:38*muffindrake quit (Quit: muffindrake)
09:12:09*Trustable joined #nim
09:27:27*GitterIntegratio joined #nim
09:27:27*MTRNord[m] joined #nim
09:27:27*BitPuffin joined #nim
09:27:27*unclechu joined #nim
09:27:27*sendell joined #nim
09:27:27*neceve joined #nim
09:27:27*codic joined #nim
09:27:27*nerdrat[m] joined #nim
09:27:27*watzon joined #nim
09:27:28*dzamo[m] joined #nim
09:27:28*planetis[m] joined #nim
09:27:28*k0mpjut0r joined #nim
09:27:28*oneark joined #nim
09:27:33*skrylar[m] joined #nim
09:27:34*Zoom[m] joined #nim
09:27:34*xicheng[m] joined #nim
09:27:35*ee7[m] joined #nim
09:33:19*oddp joined #nim
09:49:33*muffindrake joined #nim
10:12:43*haxscramper joined #nim
10:21:29haxscramperHow I can generate documentation comments for `NimNode` when constructing using `newTree`? Comments added in `quote do` are visible in documentation but not in `astGenRepr`. In particular I want to add documentation for object field.
10:32:12*krux02 joined #nim
10:36:37PMunchHmm, I think that's just a bug with astGenRepr not showing them
10:37:10PMunchnnkCommentStmt is the node type you need to create for them
10:38:44PMunchSo newCommentStmtNode("This is my documentation comment") should create a comment node
10:38:50PMunchhaxscramper ^
10:40:44haxscramperIf I want to add comment for a field where do I put it? It worked for `proc` (added as first statement in `stmtList` in the body).
10:41:15haxscramper*for specific field and object itself too
10:45:29*fredrikhr joined #nim
10:48:23*leorize quit (Ping timeout: 240 seconds)
10:50:35*leorize joined #nim
10:55:36*muffindrake quit (Quit: muffindrake)
11:04:08krux02haxscramper, the comment for fields in put into a hidden member of the ast node that you can't access.
11:05:40PMunchI guess parseStmt is the only way then?
11:20:24*nsf quit (Quit: WeeChat 2.8)
11:21:28PMunchhaxscramper, krux02, an ugly hack to get around this: https://play.nim-lang.org/#ix=2qyK
11:22:06PMunchShould probably throw an assert(identDef.kind == nnkIdentDef) in at the top of the document procedure..
11:23:57krux02I think the best solution for Nim as a language would be to put the comment into an accessable membor of ident, and symbol, because only they can have comments attached to them.
11:24:16PMunchBasically it creates a dummy node with the comment set, and then it populates it with the children from the node you pass in. It's not pretty, but it works
11:25:01krux02PMunch, yes it works, it is ugly.
11:25:22PMunchkrux02, that comment seems to be attached to the nnkIdentDef node and not to the nnkIdent node
11:25:40krux02yea, that is bad.
11:25:41PMunchAs you can see I copy the ident with the name from the node that's passed in.
11:26:02krux02the comments in the ast are really not designed well.
11:26:08krux02They are very very sloppy
11:26:16PMunchI don't think nnkIdent even can have comments, can they?
11:26:36krux02and it is hard to clean it up afterwards. And it will certainly break such hacks as you just proposed.
11:26:55PMunchYeah I guess it was added this way to preserve backwards compatibility at some point
11:26:57krux02PMunch, what I said was, nnkIdend should have a comment member.
11:27:11krux02currently everything can have a comment attached to it.
11:27:22PMunchAh, but then you could've documented both the field name and the integer could have a comment
11:27:25krux02PNode (NimNode internally) has a comment member.
11:27:37PMunchIt would be fine if IdentDef was the only thing that could have a comment
11:28:07krux02but that member should not be there as it really increates the size of all nim nodes in the compiler but is rarely occupied with anything.
11:28:18krux02PMunch, no
11:28:23FromDiscord<gokr> Howdy guys
11:28:32PMunchI guess a nice way would be to add a `comment=` proc that checks if the node is a valid kind and sets the hidden field
11:28:36krux02I think about proc symbols
11:28:48PMunchHi @gokr!
11:29:11krux02PMunch, constants, templats, macros.
11:29:35krux02everythin that you can document has one thing in common. It has a name.
11:29:51PMunchBut not everything with a name can be documented
11:30:09*muffindrake joined #nim
11:30:31krux02I don't think it would be had if everything with a name could be documented.
11:30:35PMunchArguments? Proc level variables? Blocks?
11:31:19krux02currently, every not, addition, subtractions, simple braces, can have a documentation node.
11:31:22krux02I think that is worse.
11:31:31PMunchOh yeah, I'm not saying it's better
11:31:55PMunchI'm just saying that everything with a name wouldn't be correct either
11:32:20PMunchIf we are going to fix it, why not fix it properly
11:32:21krux02I also don't think it would be bad if you could suddenly attach documentation comments (via macros) to arguments proc lovel variables, blocks etc.
11:33:07FromDiscord<gokr> Just wanted to share a small thing. So I had a chat with someone that was quite turned off about Nim after having had a bad initial experience on the Nim forum. I am not going into more detail, but that's a bit frustrating and after reading the thread I understand him. Just a general "heads up".
11:33:13PMunchWell it wouldn't be horrible to have that even in normal code
11:33:20PMunchNot quite sure how it would be rendered though
11:33:58PMunch@gokr, that's sad to hear. What kind of experience?
11:34:36FromDiscord<Rika> why wouldnt arguments be documentable? we have nestable/non-full-line comments dont we
11:35:27FromDiscord<gokr> Well, a sarcastic reply. Not a biggie, but the first thing to a beginner that probably was hesitant in posting in the first place - I would probably have felt "ok, fine, I am not welcome" too.
11:36:09narimiransomebody gives up on programming language because of a sarcastic comment on its forum??
11:36:16FromDiscord<Rika> ~~who posted it~~
11:36:25PMunchIt's kinda hard to address that though..
11:36:38FromDiscord<Rika> any language's gonna have some fuckers
11:36:38krux02gokr: feel free to ask your question. You are welcome. I am just a grumpy old programmer. But still willing to help if I can. Makes me feel less grumpy.
11:36:39PMunchI guess a "First post" flair might be useful
11:36:54FromDiscord<Rika> krux02: its not them, its their friend who had the issue
11:37:20FromDiscord<Rika> PMunch: or at least some indicator, yeah
11:37:34FromDiscord<gokr> @krux02 I am a fairly long time Nimmer, but haven't been super active granted.
11:37:39PMunchI mean people can still be assholes, but at least then it is clear to everyone that they are an asshole to completely new users :P
11:38:11PMunchMaybe we should have a "Grumpy asshole" flair as well :P At least then you know it's not personal
11:38:34FromDiscord<gokr> It was just an observation, and... I don't know, for some odd reason we (the Nim people) tend to have had a fair share of these things.
11:38:36FromDiscord<Rika> then someone puts that tag on ar---
11:38:49FromDiscord<Rika> *gets stabbed*
11:39:04PMunch@Rika, TBF he kinda deserves one, but so do I probably
11:39:08krux02I am not an asshole to new users, that treatment is something you need to earn.
11:39:14PMunchAt least until I get my morning coffee
11:39:44krux02I like new users. They are generally very positive. I like that.
11:39:55PMunchYeah, that's why a "New user"/"First post" flair might be nice. I can also be crass to people I know can take it
11:39:55FromDiscord<gokr> I tied explaining that "we are mostly good guys" etc and I hope I can get him/her to try again.
11:40:53krux02you don't need ot convince him/her to come back. If it works better to not stay in here, it might be healthier.
11:41:07haxscramperAbout documentation of function parameters: I think it will be great to be able to document them. I mean - it is possible to put some kind of 'param `a1` affects that, param `a2` affects this' directly in the function body, but explicitly attaching notes to arguments will be much better. Parameters is the most important part of the function user really interacts with, so it would make sense to add some extra documentation capabilities
11:41:07haxscramperfor them.
11:41:09krux02Don't force people to do something they don't want.
11:41:56FromDiscord<Rika> haxscramper imagine something like `proc s(p: int ##[doc lol]##, ...)` LOL (i'm not serious)(
11:41:58FromDiscord<gokr> I know, sure. At the same time, our discussion about this was on an open channel - so who knows how many in that other community that felt "ok, that's the way it works in Nim, I am not going there"...
11:42:14PMunchI think the Nim community is super nice, but since we've been fairly small for a while we might appear a bit cold and harsh because we know each other fairly well
11:42:25FromDiscord<Rika> (also i am pretty sure nim already supports that)
11:42:33krux02haxscramper, I would not go so far and say, it would be explicitly better to document parameter directly. Maybe it would even make things worse, because now it is ambiguous to users where they should put their documentation.
11:42:55PMunchLike if someone told me to "fuck off" I would take it as a joke and not as an insult, even though that meaning can't really be extrapolated from the words directly.
11:43:06FromDiscord<mratsim> Well we need a sidebar wih a FAQ because some things trigger the grumpy programmers: "Why indentation", "Why OOP/FP second citizen)"
11:43:29FromDiscord<mratsim> "imports are wrong"
11:43:32FromDiscord<mratsim> and so on
11:43:38FromDiscord<Rika> i dont feel like fp is a second citizen, maybe not first but it doesnt feel like a second citizen to me
11:43:58FromDiscord<mratsim> I've noticed some bad responses (for example drkameleon)
11:44:10FromDiscord<mratsim> thankfully it's not too often
11:44:18haxscramperRika: Well, `##[notes]##` might not look that good, but putting parameters on their own lines might work.
11:46:24FromDiscord<Rika> haxscramper: but how would you address the comment usually being after the comma of the param πŸ˜›
11:46:53PMunchSomething like this (the documentation comments on the arguments) might work: https://play.nim-lang.org/#ix=2qyT
11:46:57haxscramperkrux02: Although RST has description lists, they work pretty well. Just slightly annoying to type each parameter twice. And on top of that: I haven't seen a lot of people meticulously documenting each parameter.
11:47:00PMunchStill not sure it's a good idea though..
11:47:42PMunchhaxscramper, yeah if you look at tools like what Java/Android has it creates the doc comment automatically, but I think they are mostly left unpopulated..
11:47:55PMunchIt seldom makes sense to document arguments if you give them good names
11:48:12PMunchHaving types works pretty well as well
11:48:24FromDiscord<exelotl> I previously used just ``` ## `foo` description of foo ``` which looks nice in comments but probably awful in the generated docs
11:48:25haxscramperRika: oh, yeah I just forgot about this. This way it certainly looks like implementing it would be either too ugly or too hacky.
11:48:37PMunchJust reading `document(NimNode, static[string]): NimNode` you can probably already guess what this proc does
11:48:42FromDiscord<exelotl> but recently I've been using definition lists, which works out pretty well: https://exelotl.github.io/trick/trick/mmutil.html#makeSoundbank,string,string,
11:49:03krux02haxscramper, I like the emacs covention of short documentation strings. Once sentence that contains each parameter like if it is a normal word.
11:51:44*vicfred joined #nim
11:54:47*ofelas quit (Ping timeout: 240 seconds)
11:59:50PMunchDocumentation can have images?! https://juancarlospaco.github.io/nim-gatabase/
12:00:07PMunchI guess it's obvious, just never thought about it before :P
12:00:25FromDiscord<Rika> prolly manually inserted
12:00:33FromDiscord<Rika> also ngl those images are really uh
12:00:35FromDiscord<Rika> cringy
12:02:11PMunchHaha, yeah they are something else
12:03:31*ofelas joined #nim
12:03:49Yardanico@Rika I'd have to agree with you on this one ;)
12:04:34*nerdrat[m] quit (Quit: Idle for 30+ days)
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:12FromDiscord<mratsim> omg what'w with the cat
12:06:38*supakeen joined #nim
12:28:21*nikita` joined #nim
12:37:25*endragor_ joined #nim
12:37:25*endragor quit (Read error: Connection reset by peer)
12:48:21FromDiscord<Skaruts> apparently I found a way to crash the compiler: https://play.nim-lang.org/#ix=2qz3
12:48:25FromDiscord<Skaruts> I have no idea why
12:48:32Yardanicowell I wouldn't be surprised :P
12:48:43FromDiscord<Skaruts> I'm using 1.2.2
12:49:15Yardanicoon devel I get "/home/dian/Projects/prntsc-downloader/as.nim(10, 31) Error: template instantiation too nested"
12:49:30Yardanicoand that's indeed true
12:49:32FromDiscord<Rika> not surprised
12:49:34Yardanicosince you call has_clipping in itself
12:49:36Yardanicoand it's a template
12:49:37FromDiscord<Rika> you're recursively calling it a lot
12:49:40Yardanicoit's being expanded recursively
12:50:05FromDiscord<Skaruts> hmm... makes sense
12:50:13FromDiscord<Rika> a proc would work just fime
12:50:17FromDiscord<Rika> fine
12:50:21FromDiscord<Skaruts> yea a proc works
12:50:22Yardanicoif you care about performance you can make a proc inline
12:50:40FromDiscord<Skaruts> using a pragma?
12:50:44Yardanicothen nim will emit it in the same C file as the place it's being called from (duplicate that for every file)
12:50:55Yardanicoso the C compiler will almost surely inline it
12:51:04Yardanicounless it thinks that this will make the perf worse
12:51:05Yardanicoyeah, just a pragma
12:51:11Yardanicoproc myproc(data: string) {.inline.}
12:51:26FromDiscord<Skaruts> I never knew what inline meant πŸ˜„
12:51:48Yardanicoit tries to trick the C compiler into inlining the proc :P
12:51:50FromDiscord<Skaruts> I'm not sure I need that though
12:52:00FromDiscord<Clyybber> can't inline general recursion
12:52:02Yardanicoit's not 100% anyway, but it's pretty likely to be inlined
12:52:04Yardanicowell yeah
12:52:14FromDiscord<Clyybber> even with "really_really_force_inline"
12:52:26FromDiscord<Rika> i read online that most compilers ignore manual inline annotations
12:52:37FromDiscord<Skaruts> by the way @Yardanico, what did you mean by devel? (or how did you get to the error?)
12:52:50Yardanico@Skaruts devel -> latest development version of nim compiler
12:52:53YardanicoI just get this error
12:52:57FromDiscord<Skaruts> ah ok
12:53:04Yardanico@Rika nim also copies the proc definition to every module it's called from
12:53:06Yardanicoif it's inline
12:53:09YardanicoI guess that might help too
12:53:29FromDiscord<mratsim> Nim inline use "static inline" and I have yet to come with an example were the C compiler ignores it
12:53:34FromDiscord<Clyybber> @Rika They don't ignore it, but they can choose to say we are smarter than you
12:54:01FromDiscord<Clyybber> they certainly will ignore it in non-tail call recursion
12:54:23FromDiscord<mratsim> well you have no alternative
12:54:41FromDiscord<Rika> oh i see
12:54:59FromDiscord<Rika> well im pretty sure compilers are smarter than me in any case and time
12:55:09Yardanicoalthough this inline can in rare cases come and bite you, e.g. the devel regression for inline :P
12:55:33Yardanicoit's not a big deal though https://github.com/nim-lang/Nim/issues/14758
12:55:35disbotβž₯ 3C compiler error with inline and a proc field in an object  ; snippet at 12https://play.nim-lang.org/#ix=2qz4
12:55:40Yardanicosince the workaround is quite easy
13:00:49PMunchOh my, my JSON sanitizer worked on the first try
13:01:02ZevvI bet your json was already clean
13:01:11PMunchHmm, I must've spent all my luck for today, gotta watch out so I don't kill myself..
13:01:18PMunchZevv, nah it was a mess
13:01:28PMunchThat's why I wrote a sanitizer :P
13:06:22FromDiscord<Rika> does it save your sanity
13:06:36Yardanicodoes a hand sanitizer save your sanity
13:06:43FromDiscord<kodkuce> why i cant do this var playerSlots:seq[Player] = @[nil,nil,nil] ?
13:06:50FromDiscord<Rika> yardanico tis a joke
13:06:55Yardanicoi am know
13:07:00Yardanico@kodkuce what is Player?
13:07:11Yardanicoand anyway it's better to just do newSeq[Player](3) then
13:07:20narimiranthis ^
13:07:22FromDiscord<kodkuce> i want to have an array or a seq with 20 slots for players and when someslot is empty want to just null it
13:07:33Yardanicoyou can use nil if only if it's a "ref object"
13:07:43FromDiscord<kodkuce> it is
13:07:44Yardanicobut yeah, just use newSeq as I said :)
13:07:57FromDiscord<kodkuce> sent a code paste, see https://play.nim-lang.org/#ix=2qz6
13:08:03FromDiscord<kodkuce> oh sorry i frogot irc
13:08:09Yardanicoits okay
13:08:13Yardanicowe have a bot now
13:08:37FromDiscord<Rika> yardanico i think you're ignoring []s too hard since i see "newSeqPlayer" from your messages
13:09:23FromDiscord<kodkuce> and it will all be instalized with nills?
13:09:39Yardanicothat means they won't be initialised at all
13:09:45Yardanico"nil" literally means "not initialised"
13:09:59krux02nil means "not in list"
13:10:16Yardanicooh :P
13:10:39krux02comes from lisp
13:11:14FromDiscord<Rika> nil means "now? initialize later"
13:11:19FromDiscord<Rika> lol
13:11:31Yardaniconil means "nah! it'll crash"
13:11:44FromDiscord<Rika> lmaooo
13:13:24*muffindrake quit (Quit: muffindrake)
13:15:22FromDiscord<Clyybber> lol, krux02 Yardanico, not sure if you are joking but nil is not an abbreviation
13:15:43FromDiscord<Rika> no that resolves to naa
13:15:48FromDiscord<Clyybber> lol
13:15:51YardanicoNIL IS NAA
13:16:05FromDiscord<Rika> nin
13:16:38FromDiscord<KingDarBoja> Nil is the future
13:17:40*waleee-cl joined #nim
13:18:00FromDiscord<Clyybber> my faith is nil
13:18:27FromDiscord<kodkuce> @treeform hmm why Error: expression 'close(ws)' has no type (or is ambiguous) i get whenwer i try to use ws.close()
13:18:46FromDiscord<Rika> maybe ws is the module name
13:18:54FromDiscord<kodkuce> it is
13:19:00FromDiscord<Rika> if it is, then itll try resolving that first
13:19:02FromDiscord<Rika> and end there
13:19:09FromDiscord<kodkuce> yep probbaly shound named this diffendt
13:19:12FromDiscord<Rika> yeah
13:20:19FromDiscord<kodkuce> sent a code paste, see https://play.nim-lang.org/#ix=2qzb
13:20:46FromDiscord<Rika> im assuming wss is another symbol defined in ws πŸ˜›
13:20:59FromDiscord<Rika> because wss means something like https is to http
13:21:12YardanicoI don't really think so
13:21:16Yardanicomaybe wss.close() doesn't need await
13:21:18Yardanicothat's why it errors
13:21:20FromDiscord<Rika> i'm just assuming
13:21:27Yardanicohow dare you to assume something in 2020
13:21:32FromDiscord<Rika> true
13:21:39FromDiscord<Rika> all programs must now be eager
13:26:45FromDiscord<kodkuce> i tryed wdd too πŸ™‚ , ye it dosent need await tough duno why when that is gracefull close it sends client its closing too i think
13:27:46Yardanicoit handles the closing gracefully if you check the source
13:28:04Yardanicoit actually sends the closing frame so it's fine
13:28:39FromDiscord<kodkuce> ye but when i send other stuff i do with await ws.send so i expected same for close
13:28:56Yardanicowell I guess the reason is that ws.close might be used outside of async procedures
13:29:03Yardanicoe.g. in error handlers or something
13:30:56PMunchHmm, okay I should be safe, it didn't work 100%
13:37:49FromDiscord<treeform> @kodkuce Yeah made close not await exactly because of error handlers. Original it was await but it cased issues.
13:49:19FromDiscord<treeform> Is there a function I could "when" on in a template, that would tell me if a type is fully self contained and has no pointers or refs and is contagious in memory ... So it's safe to memcopy?
13:49:58FromDiscord<Clyybber> I don't think so. But you could easily write one yourself
13:56:47*leorize quit (Quit: WeeChat 2.8)
14:00:03*lritter joined #nim
14:07:39FromDiscord<MapleSyrup|TagMeIfReply> what are some good gui libs?
14:07:54FromDiscord<MapleSyrup|TagMeIfReply> need something for windows too
14:11:23*Vladar quit (Remote host closed the connection)
14:11:49*Senny joined #nim
14:11:54*lbart quit (Ping timeout: 240 seconds)
14:13:57*PMunch quit (Quit: Leaving)
14:23:08nisstyreactually apparently Qt has better windows support so use that
14:23:26FromDiscord<Rika> worse nim sopport tho
14:23:28FromDiscord<Rika> su*
14:23:43FromDiscord<mratsim> QML seems to work
14:24:24FromDiscord<mratsim> ah we don't have Windows build yet: https://github.com/status-im/nim-status-client/releases
14:24:54FromDiscord<Rika> CPP tho :thonk:
14:25:45FromDiscord<mratsim> well, it's better than what we had before: Go+Electron+ReactNative+Javascript
14:26:29*nsf joined #nim
14:30:46FromDiscord<Rika> oof
14:43:36disruptekrika: compilers are smarter than you in any case?
14:43:48disrupteki dunno... https://play.nim-lang.org/#ix=2qwm
14:53:39FromDiscord<MapleSyrup|TagMeIfReply> hmm, yeah I think I'll give Qt a shot then
14:53:43FromDiscord<MapleSyrup|TagMeIfReply> thanks yall
14:56:25FromDiscord<Shucks> Could I reach that without the proc? https://play.nim-lang.org/#ix=2qzH
14:57:53FromDiscord<Rika> disruptek: i dont get it
14:58:00FromDiscord<Rika> its working as intended
14:58:59FromDiscord<Rika> @Shucks wdym
15:00:53FromDiscord<Shucks> oring all varargs. If theres some better way instead of using a whole proc again ;p
15:01:16FromDiscord<Shucks> like some fancy unpack and oring it at one line
15:03:10FromDiscord<Rika> make it a template
15:14:16*nsf quit (Quit: WeeChat 2.8)
15:18:49FromDiscord<Shucks> Well im reading the manual over and over again and I still don't get the benefit of using a template or macro. I know the fact that I can manipulate operators with templates and I'm able to use blocks on templates/macros. Thats it for now lol
15:19:39FromDiscord<Rika> templates dont have a stack cost technically
15:19:59FromDiscord<Yardanico> With macros you can transform any valid (syntax wise) Nim code into anything you want
15:20:24FromDiscord<Yardanico> You can emit AST for any Nim statement/expression etc
15:21:02FromDiscord<Clyybber> @Shucks templates are a bit like inlined procs
15:21:08FromDiscord<Yardanico> And of course you should use the least powerful construct :)
15:21:23FromDiscord<Clyybber> @Shucks But can do a bit more
15:21:25FromDiscord<Clyybber> for example
15:21:57FromDiscord<Clyybber> You can have a `template doSomething: untyped = echo a, b, c, d, e, f, g`
15:22:00FromDiscord<Clyybber> And use it like this:
15:22:27FromDiscord<Clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2qzM
15:22:37FromGitter<ynfle> Any reason I keep getting `.choosenim/toolchains/nim-1.2.4/lib/pure/collections/sequtils.nim(780, 11) Error: internal error: environment misses: result\`gensym14015042`? I don't which LOC is causing it
15:22:58FromDiscord<Clyybber> ynfle: Are you using toSeq?
15:23:04FromGitter<ynfle> Yup
15:23:11FromDiscord<Clyybber> Look at generic instantiation of toSeq
15:23:22FromDiscord<Clyybber> (edit) 'Look at ... generic' => 'Look attemplate or'
15:23:28FromGitter<ynfle> Whith a `nimNode.childrenIterator`iterator
15:24:05FromGitter<ynfle> *`.children`
15:38:02*marnix_ quit (Ping timeout: 264 seconds)
15:38:13FromDiscord<Clyybber> ynfle: Do you have a snippet?
15:38:47*dddddd joined #nim
15:44:15*marnix joined #nim
15:47:12FromDiscord<Shucks> https://play.nim-lang.org/#ix=2qzS
15:47:16FromDiscord<Shucks> still confused lol
15:48:00*NimBot joined #nim
15:48:39Yardanicothat's how it will look roughly (after a lot of processing done by the compiler)
15:49:32Yardanicotemplates get fully inlined (that's why it's code substitution)
15:49:39Yardanicowith a proc you're calling another procedure
15:51:32FromDiscord<Shucks> so its more like a optimizing thing than having a benefit on my end. On my end the code still looks cleaner with using a proc
15:51:43Yardanicowell templates aren't mainly used for optimization
15:51:45FromDiscord<Shucks> since i got result there
15:51:47Yardanicothey're used for template features :)
15:52:21FromDiscord<Shucks> oh heck. Some day.
15:52:23FromDiscord<Shucks> ;D
15:52:28Yardanicoone simple example from my old snippet
15:52:48*muffindrake joined #nim
15:52:50Yardanicoit's a template which makes templates which call the log procedure with the appropriate log level
15:53:27Yardanicoand then you can use it like
15:53:38YardanicologInfo(a = 1, "hello", b = 3.0)
15:54:39Yardanicoalthough that version seems to be a little broken, I have a newer one
15:54:50Yardanicohttps://github.com/Yardanico/nickel/blob/master/src/log.nim this one
15:55:03FromDiscord<Shucks> thats cool. So if every template usage gets inlined wouldn't that result in a lot more c code at the end.
15:55:14Yardanicowell yes, but templates aren't used for optimization as I said
15:55:22Yardanicowell they can be
15:55:26Yardanicobut that's not their main use case :P
15:57:25Yardanicoanother example of templates - https://github.com/def-/nimes/blob/master/src/nes/cpu.nim
15:57:42Yardanicoto avoid repetition
15:58:37FromDiscord<Shucks> I see
15:59:25FromDiscord<Shucks> Thank you. I guess its a bit clearer now. I guess on my example there it's still better to use a usual proc. At some day I will be able to actually see when a template/macro makes sense in my code ;D
16:00:05FromDiscord<Shucks> Im still on that dll injection wrapper btw
16:01:10FromGitter<ynfle> @Clyybber , https://play.nim-lang.org/#ix=2qzX
16:01:41*haxscramper quit (Remote host closed the connection)
16:04:26FromDiscord<TheCrappyCoder> youtube.com/watch?v=ypNegFmdjts
16:07:38FromDiscord<Yardanico> ?
16:07:45FromDiscord<Yardanico> @TheCrappyCoder we have <#371759607934353448>
16:08:08FromDiscord<TheCrappyCoder> oh sorry I missed it
16:13:27*Senny quit (Ping timeout: 260 seconds)
16:19:07FromDiscord<kodkuce> so i can nil only ref objects
16:19:16FromDiscord<kodkuce> that sux i am used to niling πŸ™‚
16:28:27*marnix quit (Ping timeout: 240 seconds)
16:39:30FromDiscord<exelotl> > *templates aren't used for optimization* https://media.discordapp.net/attachments/371759389889003532/727563974266191872/dd0.png
16:39:39YardanicoI meant that's not their main use imo :P
16:43:07FromDiscord<exelotl> that's fair
16:48:50FromDiscord<Rika> @kodkuce look into options module and just `none T` everything i guess?
17:02:55FromGitter<ynfle> `Error: '*' expected ⏎ lineinfos.nim(254) raiseRecoverableError ⏎ Error: unhandled exception: '*' expected [ERecoverableError]`. What is this error from `nim doc`? ` ## Ident | Postfix(*, Ident) (proc name)` This is the line that it throws the error on
17:03:07Yardanicowhat nim version?
17:03:29Yardanicoah yeah it still exists in the compiler
17:03:34Yardanicoshow more code so we can help :P
17:05:17FromGitter<ynfle> 1) 2.4
17:06:28FromGitter<ynfle> https://play.nim-lang.org/#ix=2qAe
17:09:49solitudesfyou need to escape `\*`
17:13:34FromGitter<ynfle> πŸ‘
17:23:49disruptekyou think we should formalize case ... elsif in the spec?
17:24:04FromDiscord<Rika> ?
17:24:25disrupteki would say it's a little creepy because order matters. you say it's "working as intended."
17:26:26*abm joined #nim
17:55:12*ofelas quit (Ping timeout: 260 seconds)
17:56:09*Senny joined #nim
18:04:13*ofelas joined #nim
18:06:15disruptekthe key to exotic dancing is to picture the audience naked.
18:07:42*kenran joined #nim
18:10:16*bung_ joined #nim
18:13:31*bung quit (Ping timeout: 260 seconds)
18:21:06*haxscramper joined #nim
18:22:53FromDiscord<Clyybber> whats creepy?
18:22:57FromDiscord<Clyybber> case .. elif?
18:23:10FromDiscord<Clyybber> how is it creepy?
18:23:33FromDiscord<Clyybber> order matters for ever if
18:23:39FromDiscord<Clyybber> (edit) 'ever' => ''
18:23:41Yardanicowell, see
18:24:14*sentreen quit (Ping timeout: 265 seconds)
18:24:15Yardanicomaybe it's just not documented that you can use "case" with "elif"
18:24:35Yardanicoand indeed it's not documented :P
18:24:42Yardaniconothing about elif in https://nim-lang.org/docs/manual.html#statements-and-expressions-case-statement
18:24:59FromDiscord<Clyybber> guess it can be documented
18:25:27haxscramperDoes `nim doc` support foonotes? I'm writing `[1]_` in text and then `.. [1] Some text` below. And footnote text is not visible in the documentation at all.
18:25:37Yardanicoah well, case expression has elif documented
18:25:41Yardanicoit shows in example
18:26:03*vsantana joined #nim
18:26:20FromDiscord<Clyybber> its also formalized in the grammar
18:26:24Yardanicobtw, how can I use strformat to format 6 strings of different len to always be centered with same width?
18:26:43Yardanicowith {str:^7} they're not always centered because they're of different length
18:28:21*sentreen joined #nim
18:29:08Yardanicowell seems like it's mostly fine
18:31:22Yardanicoe.g. see how NOTICE sticks out a bit here
18:31:48Yardanicolol sorry I meant https://play.nim-lang.org/#ix=2qAz
18:32:33FromDiscord<Clyybber> what do you expect?
18:32:56FromDiscord<Clyybber> it can't be completely centered
18:32:59YardanicoNOTICE to start at the same letter as INFO :P
18:33:10*vicfred quit (Ping timeout: 246 seconds)
18:33:13FromDiscord<Clyybber> but why would it?
18:33:29FromDiscord<Clyybber> it wouldn't be *more* consistent
18:33:50FromDiscord<Clyybber> if it can't be perfectly centered it gets moved half a character to the left
18:34:02FromDiscord<Clyybber> thats the consistent behaviour accross all cases
18:34:33FromDiscord<Clyybber> afaict what you want is that it conditionally moves them half a character right or left when it can't perfectly center them so that their starting points are aligned?
18:34:42Yardanicoyeah I guess so
18:34:52Yardanicobut it's not a big deal
18:35:52FromDiscord<Clyybber> would be a bit of a niche case to provide something builtin for
18:35:57Yardanicoyeah of course
18:36:09YardanicoI was just asking how could i do not, not "why it's not in strformat" :P
18:36:11Yardanicodo it*
18:36:34FromDiscord<Clyybber> oh, heh, manually of course :D
18:38:20FromDiscord<KingDarBoja> I feel a Big pain after seeing the result
18:38:27FromDiscord<KingDarBoja> Not centered x.x
18:39:18FromDiscord<KingDarBoja> https://media.discordapp.net/attachments/371759389889003532/727594124227641364/IMG-20200627-WA0058.jpg
18:40:37FromDiscord<Clyybber> lol
18:40:45FromDiscord<Clyybber> weird german but ok
18:41:34*sentreen quit (Ping timeout: 240 seconds)
18:41:59FromDiscord<KingDarBoja> I lost the emoji I had for these moment :)
18:45:08*sentreen joined #nim
18:45:36*wontruefree[m] joined #nim
18:49:37*sentreen quit (Ping timeout: 246 seconds)
18:50:06disrupteksure; i'll start using case/elif everywhere and we can see what works and what needs fixing. πŸ‘
18:51:14Yardanicowhy though
18:51:30Yardanicoyou might as well use converters, term rewriting templates, source code filters and concepts too
18:51:31Yardanicoall at once
18:52:00*sentreen joined #nim
18:53:38FromDiscord<lqdev> i use concepts.
18:53:44Yardanicowell it's okay to use them :P
18:53:56FromDiscord<lqdev> converters, too.
18:53:59Yardanicoi mean all obscure features at once
18:54:07FromDiscord<lqdev> case elif seems weird lol
18:59:50FromDiscord<Clyybber> what?
18:59:51FromDiscord<Clyybber> lol
18:59:59FromDiscord<Clyybber> case elif is not broken. Its really simple
19:00:36FromDiscord<Clyybber> there won't be anything that needs fixing; fingers crossed
19:01:09disrupteksure, sure.
19:10:35FromDiscord<Clyybber> disruptek: Lol, a test relied on this broken behaviour
19:10:53FromDiscord<Clyybber> accidently though, I think I may have found a regression
19:11:36disruptekwhat broken behavior?
19:12:30FromDiscord<Clyybber> disruptek: The method call syntax one
19:13:28disrupteknot surprising; it's been a "feature" for a long time afaik.
19:19:09FromDiscord<Clyybber> Araq: ping
19:29:00ForumUpdaterBotNew thread by Snej: Multithreaded await, see https://forum.nim-lang.org/t/6511
19:30:55disruptekshouldn't `(var i = 0); (var i = 0)` fail?
19:31:37Yardanicoah well it does fail :P
19:32:46FromDiscord<Clyybber> disruptek: Yeah it does
19:33:15disruptekshould it not?
19:33:26FromDiscord<Clyybber> perhaps it should
19:33:27disrupteki would expect it to fail.
19:33:31FromDiscord<Clyybber> yeah
19:33:47FromDiscord<Clyybber> but in templates its not supposed to?
19:34:05FromDiscord<Clyybber> I say: Either it should fail in all cases or in none
19:34:08disrupteki thought () enables multiline substitution but not scope.
19:35:10disruptekit's essentially a statement list, right?
19:35:15FromDiscord<Clyybber> Yeah
19:35:32disruptekwhat's the argument for it to succeed?
19:35:51FromDiscord<Clyybber> I guess that it looks like scopes?
19:36:37disrupteki think we need it scope-free more than we need it to look scopeful.
19:36:52FromDiscord<Clyybber> not sure. scopeful is way nicer for arc
19:36:57FromDiscord<Clyybber> but would be a breaking change
19:37:04Yardanicowhen we get the scoped PR merged? :P
19:37:12disruptekthere are other ways to create scopes...
19:37:43FromDiscord<Clyybber> disruptek: Yes there are, but be aware that `echo (var i = 0;i) \necho i` also works
19:38:05FromDiscord<Clyybber> which is not what arc expects btw
19:38:09disruptekas it should; it's not a scope.
19:39:00FromDiscord<Clyybber> oh, actually arc doesn't care much
19:39:20FromDiscord<Clyybber> but I'm not sure its the best behaviour
19:39:25disruptekwe've talked about introducing a 1st-class scope node into the ast.
19:40:52disruptekit's a naive idea i had, anyway. it hasn't been vetted by science. 😁
19:43:45FromDiscord<Clyybber> ok, so non-scoped it is.
19:44:19FromDiscord<Clyybber> I guess its best
19:44:45*a_b_m joined #nim
19:47:01*abm quit (Ping timeout: 246 seconds)
20:02:14*Jesin quit (Quit: Leaving)
20:12:02*dsrw joined #nim
20:13:12*dsrw quit (Client Quit)
20:14:55FromGitter<ynfle> What's the difference Call string and Call ie. `echo"Hello"` & `echo "Hello"`?
20:15:33*Guest94576 joined #nim
20:17:36*Jesin joined #nim
20:17:43*Guest94576 quit (Client Quit)
20:18:02FromDiscord<Elegant Beef> In that case i think they're identical as the compiler realizes `"` cannot be apart of a signature, but if you were to do that with an int the former version wouldnt compile
20:18:05*kenran quit (Quit: leaving)
20:18:56shashlickcan you add a search path with a pragma
20:19:10shashlicklike `{.path: "xyz".}`
20:19:43FromDiscord<Shucks> How does the compile pragma work? I mean could I pass a cpp file to the compile pragma and still compile my nim code with `nim c`?
20:20:34shashlickyes it will know what to do
20:20:53FromDiscord<Elegant Beef> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-pragma
20:21:02FromDiscord<Elegant Beef> Says what it does right there
20:21:18FromDiscord<Shucks> Thats magic isnt it
20:21:19FromDiscord<Shucks> ;p
20:21:31FromDiscord<Elegant Beef> Nah abusing the fact nim goes to C/C++ πŸ˜›
20:22:28FromDiscord<Shucks> So just to make it clear. I could write a cpp function, use the compile pragma, wrap it in nim and still be able to call it even compiled with `nim c`
20:22:33FromDiscord<Elegant Beef> What's real magic is what impbox did for getting stb_vorbis in his framework↡https://github.com/ftsf/nico/blob/master/nico/stb_vorbis.nim#L29
20:23:32FromDiscord<mratsim> @Shucks Yes, and you can replace Make/CMake with {.compile.} https://github.com/numforge/agent-smith/blob/master/third_party/ale_build.nim
20:23:37FromDiscord<Elegant Beef> I have no clue about that, i imagine so
20:23:43FromDiscord<Elegant Beef> Well there you go
20:24:09FromDiscord<mratsim> and here is wrapping it: https://github.com/numforge/agent-smith/blob/master/third_party/ale_wrap.nim
20:24:46FromDiscord<mratsim> but nim c will not work because you need to use C++ name mangling to call the functions so you need to compile with cpp
20:24:54FromDiscord<mratsim> unless you use the C FFI of the C++ library
20:25:36FromDiscord<Shucks> aye, thats what I was wondering
20:25:44FromDiscord<exelotl> "you can replace Make/CMake with {.compile.}" +1 to this, I'm doing it in my game and it works great :)
20:26:01FromGitter<ynfle> @Elegant Beef, so why here https://nim-lang.org/docs/manual.html#statements-and-expressions-case-expression is it `animal.endsWith"whale"`
20:28:35FromDiscord<Elegant Beef> cause it doesnt matter in the case of a string
20:28:40FromDiscord<Elegant Beef> `"` cannot be an identifier
20:31:00FromDiscord<Elegant Beef> that is intepreted as↡`endsWith(animal, "whale")` ↡as far as i know
20:31:28FromGitter<ynfle> So `fmt"hello, {name}"` is the same as `fmt("hello {name")`
20:31:44*tane joined #nim
20:32:40*cyraxjoe quit (Ping timeout: 256 seconds)
20:33:08*cyraxjoe joined #nim
20:33:15FromDiscord<Elegant Beef> https://nim-lang.org/docs/manual.html#templates-limitations-of-the-method-call-syntax
20:33:31FromDiscord<Elegant Beef> Wait im in the wrong section
20:33:32FromDiscord<Elegant Beef> πŸ˜„
20:34:31FromDiscord<Elegant Beef> But yes that's how the UFCS converts a.b() becomes b(a)
20:34:59FromDiscord<Elegant Beef> UFCS replaces the need for member procs by making all procs usable as member or "static"
20:35:40FromDiscord<Shucks> Isnt nep1 covering stuff like that. It should do it ;D
20:36:15FromDiscord<Shucks> im just catching myself everytime mixing stuff up
20:36:27FromDiscord<Shucks> And im doing really weird stuff like `"config.json".write_file((% s).`
20:36:47*chemist69 quit (Ping timeout: 240 seconds)
20:37:15FromDiscord<Elegant Beef> Nep1 seems mostly just as a convention guideline, so just do whatever you like unless publishing to nimble or the like
20:37:25FromDiscord<Shucks> or `var myvar = int32 5` in the next line im using `var myvar = 5.int32`
20:37:55*chemist69 joined #nim
20:39:29FromDiscord<Elegant Beef> I mean it should be consistant inside the single code base
20:39:43FromDiscord<Elegant Beef> but i typically would do `var myvar:int32 = 5`
20:48:37*haxscramper quit (Remote host closed the connection)
20:50:33*kungtotte quit (Read error: Connection reset by peer)
20:50:59*kungtotte joined #nim
20:53:41*BlameTheRoomba joined #nim
20:54:47*ofelas quit (Ping timeout: 240 seconds)
20:56:00*vicfred joined #nim
20:57:44FromDiscord<Solitude> `var myvar = 5'i32`
20:58:38disruptekyou're making me grumpy.
20:58:52disrupteki need the asshole avatar.
21:03:27*ofelas joined #nim
21:08:09FromDiscord<Elegant Beef> Disruptek show me on this anatomically inaccurate doll where the bad man touched you
21:08:45disruptek2nd week off my meds is always the worst.
21:09:18FromDiscord<Elegant Beef> Even worse when you're near me
21:09:39*waleee-cl quit (Quit: Connection closed for inactivity)
21:11:35*marnix_ joined #nim
21:13:54*narimiran quit (Ping timeout: 240 seconds)
21:14:34*jholland__ quit (Ping timeout: 258 seconds)
21:14:37*Hotbees quit (Read error: Connection reset by peer)
21:14:48*Hotbees joined #nim
21:15:05*euantor quit (Read error: Connection reset by peer)
21:15:19*euantor joined #nim
21:15:27*jholland__ joined #nim
21:16:31*MightyJoe joined #nim
21:17:42*cyraxjoe quit (Ping timeout: 260 seconds)
21:20:17*marnix__ joined #nim
21:24:14*marnix_ quit (Ping timeout: 256 seconds)
21:26:12*a_b_m quit (Quit: Leaving)
21:28:09*waleee-cl joined #nim
21:34:28*solitudesf quit (Ping timeout: 246 seconds)
21:38:03*thomasross joined #nim
21:45:50*vsantana quit (Quit: leaving)
21:54:59*tane quit (Quit: Leaving)
21:57:52*marnix__ quit (Ping timeout: 265 seconds)
22:06:12*lritter quit (Quit: Leaving)
22:08:18*nikita` quit (Quit: leaving)
22:14:16Zoom[m]Hm, something's up with the Matrix bridge. I'm getting all messages doubled.
22:14:35disrupteklike what?
22:14:36disrupteklike what?
22:14:56disrupteksend a screenshot.
22:14:56disrupteksend a screenshot.
22:15:19FromDiscord<Elegant Beef> lol
22:17:31Zoom[m]Huh, the last "lol" is actually not doubled. Strange
22:18:06disruptekwhere's my screenshot?
22:18:06disruptekwhere's my screenshot?
22:18:07disruptekwhere's my screenshot?
22:18:07disruptekwhere's my screenshot?
22:18:15FromDiscord<Yardanico> stop disruptek
22:18:16FromDiscord<Elegant Beef> Disruptek, i think you need those meds
22:18:30FromDiscord<Yardanico> @Zoom congrats, you've been trolled on IRC :)
22:18:41FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/727649329145184408/Screenshot_2020-07-01-01-18-32-870_com.discord.jpg
22:19:19Zoom[m]I see what's DIsruptek been doing, this goes on for a couple of days now
22:19:27disruptekbeep beep i'm a bot.
22:19:27disruptekbeep beep i'm a bot.
22:19:49FromDiscord<Yardanico> Disruptek did you do too much C# again
22:20:46FromDiscord<Elegant Beef> Few too many attibutes
22:20:51FromDiscord<Elegant Beef> (edit) 'attibutes' => 'attributes'
22:24:47*ofelas quit (Ping timeout: 240 seconds)
22:32:10ForumUpdaterBotNew thread by ZadaZorg: GetFileSize async and sync, see https://forum.nim-lang.org/t/6512
22:33:23*ofelas joined #nim
22:49:22*BlameTheRoomba quit (Ping timeout: 246 seconds)
22:54:53*Trustable quit (Remote host closed the connection)
23:06:25FromDiscord<Clyybber> @Yardanico Spot on analysis
23:06:49FromDiscord<Yardanico> @Clyybber btw, found another arc codegen bug with inline iterators πŸ˜„
23:06:55FromDiscord<Clyybber> nice \oo/
23:06:57FromDiscord<Clyybber> :D
23:07:02disrupteknice tits.
23:08:02FromDiscord<Clyybber> okbr
23:08:36FromDiscord<Yardanico> https://github.com/nim-lang/Nim/issues/14864
23:08:38disbotβž₯ 3[ARC] C compiler error with inline iterators and imports ; snippet at 12https://play.nim-lang.org/#ix=2qBN
23:09:47*ofelas quit (Ping timeout: 240 seconds)
23:22:53*ofelas joined #nim
23:26:45FromDiscord<Technisha Circuit> Can someone give me a link to the telegram community for nim?
23:27:23Yardanicoyes, but it's not connected to the bridges so it's less active :)
23:27:34FromDiscord<Technisha Circuit> Thanks
23:28:02FromDiscord<KingDarBoja> I love u new avatar
23:28:57FromDiscord<Technisha Circuit> Thanks
23:29:02FromDiscord<Technisha Circuit> :p
23:29:15FromDiscord<Technisha Circuit> Gacha Club came out so i remade it
23:30:36*thomasross quit (Remote host closed the connection)
23:31:01*thomasross joined #nim
23:32:27*ofelas quit (Ping timeout: 240 seconds)
23:34:29FromDiscord<KingDarBoja> Technisha one πŸ˜„
23:35:03FromDiscord<KingDarBoja> That's certainly something Rika would like too
23:36:22*krux02_ joined #nim
23:39:22*krux02 quit (Ping timeout: 260 seconds)
23:43:23*ofelas joined #nim
23:49:08*ofelas quit (Ping timeout: 244 seconds)
23:51:58*ofelas joined #nim
23:56:47*ofelas quit (Ping timeout: 240 seconds)