<< 17-03-2020 >>

00:00:16*zahary quit (Quit: Leaving.)
00:03:18axionkrux02: tbh i don't like your approach
00:08:11axionIn Common Lisp, I have a compiler for GLSL to CL such that I can define GLSL functions indistinguishable from the host language that are reusable across shader programs and can be individually live-recompiled to transitively update any programs using them, rather than dumping GLSL into a string and doing minor parsing/string replacement to inject nim variables.
00:08:11*krux02_ joined #nim
00:08:40axionI'd like to do something for Nim some day, but that was an incredible amount of work
00:08:59*sealmove quit (Ping timeout: 250 seconds)
00:10:31*krux02 quit (Ping timeout: 246 seconds)
00:13:57axiondon't get me wrong, your thing is cool and all, but a decent bit of macrology will allow you to have a reusability of gpu functions across many shader programs without code duplication, and the ability to transitively update parts of the dependency graph that changed at runtime
00:16:05axioni just don't see any value in the disconnect of writing GLSL when we have macros, with the added benefit of granular function/var code reuse
00:17:59FromDiscord<Generic> tbh I don't really see the point of writing shaders in Nim
00:18:08FromDiscord<Generic> you could reuse some code
00:18:31FromDiscord<Generic> but then you somehow have to make sure that the cpu code uses the same vector/matrix types
00:19:16FromDiscord<Generic> though what do think would be useful, is using macros to get rid of all of the boiler plate interface code
00:20:12krux02_axion, can you elaborate?
00:20:53krux02_I generally have a hard time elaborating the benefits of my shaderDsl macro to other people. Usually people don't understand it.
00:21:15axionIt's pretty amazing what you can do, and the point is you gain all the benefits of Nim if you model it as such. For example, in CL I brought higher-order functions to GLSL which never had them; I can call shader functions that accept other shader functions as arguments. It's incredibly more useful for the gpu than one might think
00:21:22krux02_Btw I have basically two project in opengl-sandbox.
00:22:50axionkrux02_: Considering you are at least somewhat familiar with emacs-lisp, I can show you my library of reusable gpu functions written in lisp
00:22:59krux02_The first on (the older one) does only shader integration. It does variable lifing for explicit variables only and there are sections for vertex and fragment shader and geometry shader. The second project, in the experiment folder, has a nim to glsl compiler written as a macro. This does allow you to do full shader development in Nim only. No glsl necessary anyomer.
00:23:00axionIt's CL, but it should make some sense to you
00:23:12krux02_yea
00:23:36axionhttps://github.com/mfiano/umbra
00:23:36krux02_I thought about writing my library in lisp as well, but for my project I need to know the types.
00:25:21krux02_I am looking at umbra cod enow, I see type annotations like ``:vec3``, but this is a symbol to lisp, not a type am I right? Or is it actually a type annotation that I don't know?
00:26:39axionThis is a dialect of Lisp I wrote in CL, so no, it's just a symbol that semantically means a GLSL type annotation
00:26:55axionIt's a dialect specifically for writing shader functions
00:27:01krux02_ok
00:27:09krux02_so you can write shader functions in glsl.
00:27:18krux02_sorry I mean lisp
00:28:03krux02_but how do you specify vertex attributes?
00:28:13krux02_and how do you access them from lisp?
00:28:24axionAh, well the way it works is
00:28:44axionsec lemme find the link
00:29:22axionhere is a program definition https://github.com/mfiano/umbra/blob/master/src/sprite.lisp#L48
00:29:49axionthat specifies a program with a vertex and fragment stage, using the respective functions named by those symbols...
00:30:34axionnow for vertex stages, the input arguments to the function are vertex attributes, and since lisp can return multiple values from a function, the first value represents the gl_Position, and all subsequent return values are passed as input arguments to the next stage
00:31:01*sealmove joined #nim
00:31:05axionFor fragment stages, multiple return values are used to specify framebuffers for multiple render targets
00:31:13axionso there is none of that i/o block nonsense anywhere
00:32:46krux02_and what is this: https://github.com/mfiano/umbra/blob/8bfcc30642537319965324236967c8c066b665c3/src/sprite.lisp#L21
00:33:06krux02_looks like an i/o block to me
00:33:42FromDiscord<Elegant Beef> You guys are talking about using nim for shader programming and im just like "i'd like a game engine to use with it"
00:33:43krux02_:P
00:34:01axionthat's an input argument to the function annotated to let it know it's an SSBO data using the layout of the spritesheet-data gpu struct
00:34:35krux02_yea, and that part is what is completely automated in my Nim macro.
00:35:51krux02_here is where I write a shader in nim: https://github.com/krux02/opengl-sandbox/blob/master/experiment/noiseSphere.nim#L272
00:36:04krux02_I call `simplex` wich is imported from a module
00:36:11krux02_so very similir to what you are doing there.
00:36:14krux02_in lisp
00:36:18axionwhere this syste really shines is it's completely interactive. hitting C-c C-c in emacs on any gpu function will compute the affected shader programs from anything in the graph that was modified and send a recompile signal to them to see the changes update in real time
00:36:54axionthat is, functions act like normal CL functions in that it is fully live-recompilable in the same ways
00:37:06krux02_the difference is here: https://github.com/krux02/opengl-sandbox/blob/master/experiment/noiseSphere.nim#L286
00:37:27axionand everything is modeled in a way to look exactly like the host language, so you use the same operators and idioms for the most part
00:38:12krux02_modelview comes from the outer scope here: https://github.com/krux02/opengl-sandbox/blob/e076f29efde28a440470dd8fec24a061819d9014/experiment/noiseSphere.nim#L266
00:38:49krux02_it is a normal varable. The macro analyzes what variables are used and all used variables are packed into a single uniform buffer object.
00:39:09axionthis codebase i linked is just my gpu stdlib. just small utilities i call from my real game's shaders
00:39:15krux02_but yea the disadvantage is that when you change the shader, you have to recompiler the entire project. You can't just hotswap the shader only.
00:39:24krux02_at least not with the nim to glsl compiler.
00:40:19axioncool
00:42:25krux02_btw did you already decide on a vectormath library?
00:43:40axiona friend and i grew frustrated with Unity and Unreal (we worked with them extensively in a game studio) about a decade ago and have been writing a fully interactive game engine ever since. it actually has a couple games written for it already, but still a ways to go before a public release. we can live recompile every aspect and see the changes instantly, not just shaders. texture definitions, mesh
00:43:42axionspecifications, prefabs, materials, etc. all just a keybind away from seeing the whole game change. That is the nice thing about macros
00:44:35*rockcavera joined #nim
00:45:02axionYes I have. I am porting our own CL math library that has all sorts of things you don't find in many math FOSS libraries
00:45:27krux02_ok
00:45:47krux02_I always try to convince people to use the glm port that I worked on :P
00:45:57krux02_https://github.com/stavenko/nim-glm
00:46:27krux02_It is basically written entirely by me by now, even though I don't host it.
00:46:32krux02_"host"
00:47:23krux02_the requirement was to have a precise glsl functionality in Nim, so that I can simply translate Nim to glsl.
00:48:01krux02_So a lot of work went into making the behavior precisely like glsl. But yea if you are looking for awesome feauters, no it just has what glsl has as well.
00:48:36krux02_but yea I guess you have your own library that you want to port ¯\_(ツ)_/¯
00:48:43axioncool
00:49:10axionYes I very much do. What we have is like nothing else and I'd like to bring it to the world of Nim
00:49:52krux02_ok
00:50:30krux02_At some point I tried using SIMD for that glm port. But lack of time prevented that I can implement it.
00:51:06krux02_btw nim-glm has full swizzle support.
00:51:29axionYeah that's very easy with macros. That was the first thing I did.
00:51:55krux02_for me as well, but you also need language support for some operations.
00:56:25axionAnother reason I want to port this math library over to Nim apart from the fact that it's just great, is because I've poured MANY years into the CL version and it's something I'm familiar enough with to know how to do it correctly and efficiently. It turns out, a lot of the math can be simplified or made more correct than what GLM and other libraries provide. I figured my knowledge here would be a
00:56:27axiongood way to learn Nim trying to reconstruct that
00:57:25*Hideki_ joined #nim
01:01:28krux02_well, glm isn't perfect that I found out.
01:01:42axionanyway, cool talk, but bed time for me. loving Nim :)
01:02:13krux02_yea, I should go, too
01:03:42*Zectbumo quit (Remote host closed the connection)
01:08:44*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:09:11*pbb joined #nim
01:09:35*pbb quit (Client Quit)
01:11:22*pbb joined #nim
01:24:06*shadowbane quit (Remote host closed the connection)
01:25:04*shadowbane joined #nim
01:31:12*dwdv quit (Ping timeout: 256 seconds)
01:36:07FromGitter<cndkhuong> hello
01:37:01FromGitter<cndkhuong> 👑️
01:38:06disrupteksup dawg
01:38:14*couven92 joined #nim
01:44:45*couven92 quit (Remote host closed the connection)
01:45:11*couven92 joined #nim
01:51:49*couven92 quit (Ping timeout: 264 seconds)
02:40:54silvernodedisruptek: yo, how's it going?
02:41:02disruptekaight, you?
02:41:35silvernodeMaking progress on the game. At least 1 commit a day. I have issues staying motivated.
02:42:13silvernodeDecided to make it a turn based game
02:42:18disruptekthen aim for two commits. 😉
02:42:36silvernodeHah, I have actually been doing more than that already
02:43:09silvernodeI might need some ideas for the next part I want to write.
02:43:20disruptekwhat's that?
02:44:10*chemist69 quit (Ping timeout: 246 seconds)
02:44:41silvernodeIn a nutshell, functions for different tasks like mining. The main game loop counts the turns and the player chooses how many turns they want and then the mining function gets ran that many times, adding ore to your cargo hold.
02:45:33silvernodeI am having trouble adding things to the cargo which is a seq that takes an object instead of a string
02:45:46silvernodeI tried using the add() proc but it wants a string
02:45:49*Hideki_ quit (Remote host closed the connection)
02:46:08disruptekwhen you define the seq, define it like `seq[SomeObject]` instead of `seq[string]`.
02:46:21*chemist69 joined #nim
02:46:41*Hideki_ joined #nim
02:47:22disruptek!repos pulseaudio
02:47:24disbothttps://github.com/pulseaudio/pulseaudio -- 9pulseaudio: 11Mirror of the PulseAudio sound server (for bug reports and pull requests go to the website!) 15 197⭐ 140🍴
02:47:25disbothttps://github.com/masmu/pulseaudio-dlna -- 9pulseaudio-dlna: 11A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux 15 1023⭐ 124🍴
02:47:25disbothttps://github.com/EHfive/pulseaudio-modules-bt -- 9pulseaudio-modules-bt: 11Adds Sony LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support to PulseAudio on Linux 15 905⭐ 38🍴 7& 27 more...
02:47:32disruptekugh.
02:48:40silvernodedisruptek: I already have seqs that take an object but I want to push new objects but that add() proc doesn't like that.
02:49:00disruptekuse variant objects so all the objects are effectively of the same type.
02:49:33silvernodehmm, varient objects
02:49:48silvernodeI will search the web for that
02:50:28disruptekaka case objects because you define them using a case statement syntax in the typedef.
02:50:49*Hideki_ quit (Ping timeout: 246 seconds)
02:52:15FromDiscord<Elegant Beef> I might be daft cause i still have 0 idea how to pass inputs into the started process 😄
02:52:29silvernodeI will have to learn more about that. I am still using common if statement structures in pretty much everything I write. I tend to understand those a bit more.
02:53:02silvernodealthough I do use case statements to take command arguments in my shell scripts.
02:53:26disrupteksilvernode: i always write the simplest code i can.
02:53:36disruptekbeef: inputs?
02:53:43disruptekbeef: you can write the proc's stdin.
02:53:54silvernodedisruptek: I try to do the same but could learn more in order to do that better.
02:54:02FromDiscord<Elegant Beef> I've tried that, but doesnt work for nano or vim
02:54:13FromDiscord<Elegant Beef> Since they dont use the stdin, so i imagine i need to change the entire terminal
02:55:24disruptekwhy guess? find a tiny emulator and see how it does it.
02:56:11FromDiscord<Elegant Beef> Well i was looking at xterm/vim to see where they get their inputs
02:56:22FromDiscord<Elegant Beef> but i couldnt find it on xterm
02:56:43FromDiscord<Elegant Beef> rather how it sends inputs in xterm
02:58:26disrupteklook at the suckless term.
03:03:26*sealmove quit (Quit: WeeChat 2.7.1)
03:09:21*Hideki_ joined #nim
03:10:13*Hideki_ quit (Remote host closed the connection)
03:11:11*muffindrake quit (Ping timeout: 272 seconds)
03:11:22FromDiscord<Elegant Beef> Im thinking i need to make use of pty, so this is pretty much all for naught atm
03:12:51*muffindrake joined #nim
03:14:50disruptekyep.
03:15:45*dadada quit (Ping timeout: 250 seconds)
03:16:02FromDiscord<Elegant Beef> How dare you agree
03:16:30FromDiscord<Elegant Beef> > Man spends more time then needed designing a shitty terminal that doesnt work properly
03:17:35*dadada joined #nim
03:17:59*dadada is now known as Guest16115
03:18:36FromDiscord<Elegant Beef> This is where i just give in and use st as a base and intercept the output to render specialties
03:18:52disrupteki mean, it's not nuts.
03:19:10FromDiscord<Elegant Beef> what isnt?
03:19:24FromDiscord<slymilano> My first package! https://github.com/nim-lang/packages/pull/1402 - Hope it passes muster and helps out some dudes
03:19:25disbotAdd filesize package
03:21:14*disruptek 🎉
03:21:17FromDiscord<Elegant Beef> Does it support to from bibytes?
03:21:43*leorize joined #nim
03:22:01FromDiscord<slymilano> no
03:22:30FromDiscord<Elegant Beef> Well time to add it 😛
03:26:01*shadowbane quit (Ping timeout: 264 seconds)
03:26:17disruptekahh, i can do polls now on stream.
03:26:24disrupteki guess that's worthwhile.
03:32:57*krux02_ quit (Remote host closed the connection)
03:38:03*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
03:44:30disruptektomorrow we will do some kind of pulseaudio shit on stream.
03:45:02disrupteki need some way to setup this stuff smoothly and programmatically.
03:45:49*adnanyaqoobvirk quit (Remote host closed the connection)
04:01:17*rockcavera quit (Remote host closed the connection)
04:30:13*jholland__ quit (Quit: Connection closed for inactivity)
04:41:25*nsf joined #nim
05:16:13silvernodehow would I simply check if an item exists in a sequence so I can do something in the event that it does exist or something else if it does not exist?
05:18:11FromDiscord<Elegant Beef> the contains proc https://play.nim-lang.org/#ix=2esY
05:18:41FromDiscord<Elegant Beef> Also worlds bestest grammar by me
05:21:07silvernodethis is on the right track however I would like to reach into the sequence and look to see if an object is there by name. In my code I add ore to the player inventory but instead of adding duplicate ore, I want to check for it and if it exists, then change an attribute of the ore object instead.
05:21:42FromDiscord<Elegant Beef> sounds like you want a table instead of a sequence
05:21:53FromDiscord<Elegant Beef> Tables store int or string to a value type
05:22:01silvernodeI didn't know we had tables in Nim
05:22:12silvernodeI used to use tables in Lua for this kind of stuff
05:22:16FromDiscord<Elegant Beef> So you could do `inventory["ironOre"] = 10`
05:22:18FromDiscord<Elegant Beef> Yep
05:22:29FromDiscord<Elegant Beef> they dont autohash types which is sorta disapointing
05:23:10silvernodeI would like to send you to some of my code, hang on.
05:24:23silvernodehttps://github.com/silvernode/space-nim/blob/experimental/src/space_nimpkg/items.nim
05:25:08FromDiscord<Elegant Beef> ok so your inventory could be a table and you could use the name as a key to the table
05:25:09silvernodeSo I have an Item type which goes into the cargo attribute of the Ship type.
05:25:23silvernodethe cargo is a seq
05:25:42silvernodeah I think I know what you mean
05:26:05FromDiscord<Elegant Beef> so in this case you could do `if(cargo.containsKey(item.name)): #do something here`
05:26:34silvernodethe name of the table is player.cargo.ore.name (or something like that)
05:30:58FromDiscord<Elegant Beef> Something like this
05:30:58FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2et2
05:32:03*silvernode-mobil joined #nim
05:32:11*narimiran joined #nim
05:37:43silvernodeI like that, however the cargo happens to be a seq that is part of the ship object so it probably complicates matters
05:38:23silvernodehttps://github.com/silvernode/space-nim/blob/experimental/src/space_nimpkg/ships.nim
05:38:55FromDiscord<Elegant Beef> how does it complicate it
05:39:00FromDiscord<Elegant Beef> It's just a different collection type
05:39:17silvernoderight, I think I am the one complicating things here
05:39:50silvernodeI need to go afk for a bit, are you going to be on irc for awhile?
05:40:02FromDiscord<Elegant Beef> Well im in discord so yes 😄
05:40:25silvernodeIt is 22:40 here and I need to stay awake all night to keep my work schedule
05:40:45FromDiscord<Elegant Beef> "Work schedule" with corona that shouldnt matter ;P
05:40:59silvernodebarely anyone is online when I have a night off. \
05:41:39silvernodeSafeway doesn't care about corona, they are making loads of cash right now. I stock for the night crew there. It's crazy right now!
05:42:02silvernodeanyway bbl
05:42:55FromDiscord<Elegant Beef> A more safe method is to use enums over strings though
05:42:55FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2et4
05:46:14*solitudesf joined #nim
06:35:14*dddddd quit (Ping timeout: 246 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:01:15*tdog joined #nim
07:04:54*gmpreussner joined #nim
07:10:17*Guest16115 is now known as dadada
07:29:20*leorize quit (Remote host closed the connection)
07:29:38*leorize joined #nim
07:29:45leorizeAraq: https://github.com/nim-lang/Nim/pull/13670
07:29:46disbotDisable Github Actions CI
07:31:07leorizeshashlick: I figured that you might be interested in moving our release pipeline away from travis
07:31:45leorizegithub actions got unlimited jobs for open source projects, so we should not be bottlenecked by travis limitations
07:36:56silvernodeleorize: That is actually huge that they are offering that
07:37:11*chemist69 quit (Ping timeout: 272 seconds)
07:37:22silvernodetravis is so slow
07:37:35*chemist69 joined #nim
07:37:51leorizeyep
07:39:48*silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
08:14:35FromDiscord<kodkuce> does nim have any Android UI lib?
08:17:24*dwdv joined #nim
08:40:32*PMunch joined #nim
08:41:55FromDiscord<djazz> What is the difference between using asyncfile and openFileStream from the streams module? When I read data into a buffer, which is blocking the thread more? For a web server, which should I use to send files to the client? Rn I use the streams module, a buffer and socket.send() which is async
08:44:44FromDiscord<djazz> I don't want it to affect other connections to the asynchttpserver
08:49:50PMunchIsn't there an asyncstreams module?
08:51:11Zevvthere is
09:03:46*koltrast quit (Ping timeout: 240 seconds)
09:04:04*Zectbumo joined #nim
09:04:16*kungtotte quit (Ping timeout: 246 seconds)
09:05:20FromDiscord<djazz> How do you do file IO with asyncstreams?
09:06:31*Zectbumo quit (Remote host closed the connection)
09:14:57*Vladar joined #nim
09:37:45FromDiscord<djazz> found readToStream, but that uses asyncfile anyway
09:45:38FromDiscord<Varriount> Azure pipes are still down?
09:57:25*zahary joined #nim
10:01:17*koltrast joined #nim
10:02:13*kungtotte joined #nim
10:03:09*krux02 joined #nim
10:08:04Zevvasync file I/O is a lie
10:12:00AraqVarriount: no, they are up
10:19:21*natrys joined #nim
10:32:46FromDiscord<Varriount> Zevv: The truth is it's all done by tiny people carrying messages back and forth in hidden pipes
10:37:47*abm joined #nim
10:39:07*arecaceae quit (Ping timeout: 246 seconds)
10:42:31*abm quit (Ping timeout: 250 seconds)
10:57:52*zahary quit (Quit: Leaving.)
11:05:36*JustASlacker joined #nim
11:05:40JustASlackerso
11:06:00JustASlackerany recommendation for a editor with nim support?
11:06:22JustASlackerthe syntax highliting in vim doesnt work sometimes
11:08:36FromDiscord<exelotl> vs code is probably your best bet
11:16:46*Zectbumo joined #nim
11:34:13*tane joined #nim
11:36:57federico3Vim
11:37:06PMunchJustASlacker, what is your problem with the syntax highlighting in Vim? I've used Vim exclusively for years now..
12:03:11JustASlackerwell, same here, I use vim for everything
12:03:21JustASlackerand I wish I knew how to debug it
12:03:42JustASlackerI have some .nim files for which it wont highlight anything
12:05:21FromDiscord<Recruit_main707> how developed is multithreading in Nim?
12:07:00*rockcavera joined #nim
12:13:36*arecaceae joined #nim
12:22:32PMunchJustASlacker, what do you use for highlighting?
12:23:10PMunchRecruit_main707, it works well, but it might be a bit hard to get right if you don't know what you're doing due to a lack of documentation
12:26:27JustASlackerzah/nim.vim as vundle plugin does the highliting I think
12:28:14PMunchHmm, same one that I use
12:28:25PMunchDo you have an example file?
12:30:13lqdev[m]I wish there was better documentation for locks. I already asked like, 3 times before but nobody was kind enough to answer
12:30:43*opal quit (Ping timeout: 240 seconds)
12:30:47lqdev[m]I get the idea of a lock, it's basically like a memory semaphore, but how does it know what memory to actually lock? C++ has std::lock which takes the locked objects as arguments, but I don't see anything like that in Nim's stdlib
12:31:03*leorize quit (Ping timeout: 240 seconds)
12:33:30FromGitter<kaushalmodi> lqdev: I have not idea what locks are but is this similar? https://nim-lang.github.io/Nim/locks.html
12:33:52*opal joined #nim
12:34:22lqdev[m]that's what I'm talking about, I'm just asking if somebody could explain to me how they work.
12:34:31FromGitter<kaushalmodi> I agree though that that locks module needs some prefacing documentation and then doc examples for all procs
12:36:02PMunchAh
12:36:09PMunchOkay, so a lock isn't actually attached to anything
12:36:15PMunchBy default anyways
12:36:45FromGitter<alehander92> it seems it allocates the memory itself
12:36:58FromGitter<alehander92> initSysLock calls L = castSysLock (c_malloc(sizeof(SysLockObj)))
12:37:09FromGitter<alehander92> and then `pthread_mutex_init`
12:37:24FromGitter<alehander92> on posix(??)
12:37:41FromGitter<alehander92> you can take a look at syslocks.nim
12:37:52FromGitter<alehander92> i am not an expert as well
12:39:27PMunchThere is however this experimental feature: https://nim-lang.org/docs/manual_experimental.html#guards-and-locks
12:39:51PMunchWhere you can tell Nim that a variable is guarded by a lock, and use a pragma to aquire said lock
12:41:06FromGitter<alehander92> interesting!
12:41:49PMunchI really should finish my article on multitasking in Nim..
12:42:02PMunchSo much to do!
12:46:24JustASlackerPMunch: https://termbin.com/hwkr
12:48:09PMunchBut to answer your question a bit more structured lqdev[m]: A lock is not anything special, you can just treat it as an object that you can call acquire and release on. The special property of a lock is that once one thread calls acquire, no other thread will be able to acquire the lock until the first thread calls release on the lock (simplifying a bit here, there are RW locks as well). Whatever you do in this so called "critical section" is up
12:48:09PMunchto you, but should include any reading/writing of shared resources that can't be interleaved with other access to the same resource. This takes a bit of careful thinking to figure out what actually needs to be locked and not for optimal performance, but that's a much wider topic. By default a lock is not attached to anything, so what you do in the critical section is completely up to you. But if you use the experimental guard feature I linked to
12:48:10PMunchNim will guarantee that a {.locks.} statement occurs around access to a {.guard.}-ed variable. As the documentation explains it doesn't actually lock anything, so you should do that with a template as it shows. Hope that helps to make it at least a bit clearer..
12:48:30*NimBot joined #nim
12:48:35axionCan someone help me with a template? I'm not sure if a template or macro is needed for this, and I'm really clueless how to approach the problem
12:49:07PMunchJustASlacker, that site is blocked by our work-network that I'm VPN-ed into atm.. Could you use ix instead?
12:49:12PMunchOr pastebin or whatever
12:49:21PMunchaxion, hit me
12:49:22JustASlackerix ?
12:49:52axionhttps://gist.github.com/mfiano/d5ed8f41697c0e468e42d4af8231e363
12:50:06PMunchJustASlacker, ix.io
12:50:13JustASlackerhttps://pastebin.com/zmbGDYYM
12:50:17JustASlackertoo late -_-
12:50:19PMunchIt's what the playground uses for its pastes :)
12:50:30JustASlackerah, good to know
12:50:43*kungtotte quit (Ping timeout: 246 seconds)
12:50:57JustASlackerhmm, pastebin isnt showing any highliting either
12:51:36PMunchHighlights fine for me: https://uploads.peterme.net/2020-03-17-135111_1229x951_scrot.png
12:51:42JustASlackerhttp://ix.io/2eur
12:52:11PMunchix also highlights it properly: http://ix.io/2eur/nim
12:52:19*kungtotte joined #nim
12:52:25PMunchErr, well up to a point..
12:52:28JustASlacker:P
12:52:43PMunchIt doesn't seem to understand the """ quotes
12:52:49JustASlackerwell, I dont really need a python mulitline thingy
12:53:29JustASlackeris that actually a valid nim construct ?
12:53:41FromGitter<alehander92> have to tell that sublime works fine
12:53:44JustASlackeror was I just lucky to get that compiled
12:53:48FromGitter<alehander92> but its not free software so yeah
12:53:56FromGitter<alehander92> but its an option
12:54:06*leorize joined #nim
12:56:13PMunchaxion, oh you want one that works with Vec[N] basically?
12:57:10JustASlackerguess I have to ask #vim
12:57:20axionPMunch: yeah
13:01:16axionPMunch: Oh forgot to mention, it should generate `<` too, so I get `>` and `>=` automatically
13:02:33PMunchaxion, something like this? https://play.nim-lang.org/#ix=2euv
13:02:56*couven92 joined #nim
13:04:20axionInteresting...inspecting. Btw, it suddenly became useful to make this macro more generic, so I can just give it an operator to generate any component-wise boolean check
13:06:03*shadowbane joined #nim
13:09:29PMunchhttps://github.com/nim-lang/packages/pull/1403 < as soon as this is merged I will add macroutils to the playground :)
13:09:31disbotAdd macroutils package
13:09:47FromDiscord<Recruit_main707> c++ `uintptr_t` is `ptr uint` in Nim?
13:10:04Yardanicocuint?
13:10:15Yardanicoah nvm
13:10:22Yardanicomaybe just "pointer" ?
13:10:42FromGitter<alehander92> PMunch https://github.com/PMunch/macroutils
13:10:46FromGitter<alehander92> where are the examples?
13:10:51Yardanicoin the docs
13:11:04Yardanicohttps://uploads.peterme.net/macroutils.html
13:11:05FromGitter<alehander92> like, i dont see them rendered
13:11:13FromGitter<alehander92> no, they are in the rst source
13:11:24FromGitter<alehander92> so they should be in github as well
13:12:20PMunchYeah I know.. For some reason GitHub doesn't seem to support code-block..
13:12:34PMunchSo I need to convert my docs to use ``` instead
13:13:09FromGitter<alehander92> yeah i recall correctly nope
13:13:11FromGitter<alehander92> https://raw.githubusercontent.com/alehander92/RFCs/master/RFCs/nilcheck.rst
13:13:18FromGitter<alehander92> i think i managed to fix it for my rfc
13:13:22FromGitter<alehander92> with using one empty line (?)
13:13:37FromGitter<alehander92> so you can use rst
13:14:12PMunchOh an empty line after .. code-block:: nim as well?
13:14:22PMunchDamn it, why is RST so fiddly!
13:16:17FromGitter<alehander92> yep it seems as maybe more proper syntax
13:16:21FromGitter<alehander92> couldnt find a good source
13:16:24FromGitter<alehander92> but yeah
13:16:43FromGitter<alehander92> no it's good if you get used it
13:18:17PMunchNo, it's not..
13:18:27*lritter joined #nim
13:18:51PMunchHmm, new line didn't work..
13:19:52FromGitter<alehander92> well it does work: the source i send gets rendered ok
13:20:19PMunchYet when I updated my file it didn't
13:20:22PMunchFound the issue
13:20:43PMunchYou need both a newline and a space between :: and nim
13:20:44axionHas anyone ever gotten an unused import warning, but the code actually does work, and removing the import line is a semantic error with nim check?
13:20:53FromGitter<alehander92> oh yes
13:21:10FromGitter<alehander92> to PMunch*
13:21:42FromGitter<alehander92> axion what are you using from that import? a macro/variable/function?
13:22:32PMunchThere! finally!
13:22:55PMunchIf RST was good it wouldn't take me two days to get code blocks to show up on GitHub..
13:23:11PMunchA semantic error?
13:23:48axionPMunch: https://gist.github.com/mfiano/d5ed8f41697c0e468e42d4af8231e363
13:24:09PMunchI still think something like this should be part of Nim by the way: https://github.com/PMunch/macroutils/blob/master/nimtorst
13:24:20axionCan anyone explain that? I have never seen it do this
13:24:40PMunchHuh, that is indeed strange
13:24:42FromGitter<alehander92> huh seems like a bug
13:24:49*shadowbane quit (Quit: Konversation terminated!)
13:24:56PMunchNim doesn't appear to consider using a const as using a module
13:25:45axionHuh
13:27:25*okcc joined #nim
13:31:16FromGitter<alehander92> probably a bug
13:31:21FromGitter<alehander92> best to report it on github
13:31:23axionI'm reporting it now
13:31:42FromGitter<alehander92> thanks!
13:34:22axionIssue #13673 is my first :D
13:34:24disbothttps://github.com/nim-lang/Nim/issues/13673 -- 3Nim doesn't appear to consider using a const as using a module ; snippet at 12https://play.nim-lang.org/#ix=2euB
13:35:02FromGitter<alehander92> :)
13:39:04FromGitter<alehander92> iirc nim maybe does turn const-s into values very early
13:39:30FromGitter<alehander92> because i think i remember some compile-time errors which used the "calculated" values instead of the const names
13:39:45*okcc quit (Quit: Leaving)
13:39:55FromGitter<alehander92> so if that's true maybe it just doesnt see a const node with original module info anymore when it checks for usage
13:40:00FromGitter<alehander92> but this might be a wrong hypothesis
13:40:30axionI hope a resolution can be found if that's the case. I typically write whole modules with nothing but constants in other languages.
13:41:07PMunchIs there a top-level {.using.} pragma?
13:41:09FromGitter<alehander92> for now as a workaround you can use the used
13:41:10FromGitter<alehander92> https://nim-lang.org/docs/manual.html#pragmas-used-pragma
13:41:22PMunchAh, meant used
13:41:30FromGitter<alehander92> but eventually it should be fixed hopefully
13:41:51FromGitter<alehander92> <3
13:42:05FromGitter<alehander92> axion i looked through your blog and other stuff and you seem as a big lisp fan
13:42:09FromGitter<alehander92> how do you find nim for now
13:42:35axionOh my blog is ancient. I don't think I updated it in years lol.
13:43:04FromGitter<alehander92> yeah i am just a curious guy sorry
13:43:14axionI find Nim...nice so far. Not Lisp by any means, for better or worse, but nice so far (only been using it a couple weeks or so)
13:43:31FromGitter<alehander92> i also liked lisp a lot before, not so much but moderately
13:43:42*Hideki_ joined #nim
13:43:47axionI have a lot of problems with Lisp after 2 decades of exclusive use.
13:43:48FromGitter<kaushalmodi> axion: (e)lisp + nim fan here
13:44:05FromGitter<alehander92> wow a lot
13:44:47axionI could list all the issues I have with it, and why Nim is better if you don't mind a huge rant
13:44:58*dddddd joined #nim
13:46:01FromGitter<kaushalmodi> You can blog about it :)
13:46:30FromGitter<alehander92> i dont mind
13:49:27axion1) Software distribution is a huge pain with Lisp. There are no versioned dependencies. Instead we rely on a central repository which pulls tracked github repositories and http tarballs once per month at a time unbeknownst to developers, and they are not included if there are build failures. So in this respect, every user of some tool is always up to a month (sometimes longer) behind, and as a
13:49:29axiondeveloper, trying to fix bugs for the next release is a losing battle because you never know when a release will occur. The fact that there is no possible way for a project to depend on different versions, and always uses the latest in the central repository is a huge point of failure.
13:51:57FromDiscord<Kiloneie> Why is Nim's survey vastly different than last year's ?
13:51:59federico3just like go
13:52:01axion2) Editor support and tooling. For Common Lisp, since it is probably the most interactive programming language in that you have access to the parser, evaluator, compiler and printer during parsing, evaluating, compiling or printing recursively, allows a lot of powerful introspection support, but absolutely requires using Emacs with a specific plugin. There are other editors with similar tools, but
13:52:03axionyou're throwing away a decent chunk of the language by using them, because Common Lisp is just built with interactivity in mind from the ground up.
13:53:06FromDiscord<Kiloneie> I think these yearly surveys could cover more topics.
13:53:47federico3axion: taking regular snapshots is a very good design, but not from a random commit obviously
13:53:51axion3) Documentation. Common Lisp software is rarely ever documented. 4) Software quality. Apart from documentation, software is usually incomplete and broken in lots of ways, due to the fact that there is no collaboration. Every piece of software is developed by a single developer for their particular use case. CL developers do not like to work together.
13:56:27axion5) The standard was published in 1994 to bring the features of Lisp since the 1960's into a standard document...an eternity in the software world, and won't ever be updated. This is nice in that software from the 60's still runs today on conforming implementations of the language, but it also means that the language is stuck in the past, and you pretty much have to write everything extra yourself (see
13:56:29axion#4 above on why this is bad).
13:57:05axionI could go on, but that's enough for now :)
13:57:39FromDiscord<Rika> nim takes on semver which is nice
13:58:03FromDiscord<Rika> it gives the benefit of 5 without the disadvantage
14:00:09FromGitter<alehander92> axion i see
14:00:14FromGitter<alehander92> interesting observations
14:00:30FromGitter<alehander92> so why did you decide to stop with clojure which i saw in your blog which seems as a more modern lips
14:00:31FromGitter<alehander92> lisp
14:01:13axionThat said, it does have a lot of benefits that other languages haven't come close to, particularly the interactivity and the power provided by its macro system. Yes, even Nim unfortunately.
14:01:43axionI don't like Clojure at all.
14:02:34axionIt sort of forces you down a particular paradigm of immutable-style FP, and it runs on the JVM where you don't really have control over memory or code generation.
14:03:07axionFor real time applications and low memory footprint, Clojure is just impractical.
14:03:41Araqfor me dynamic typing remains a showstopper
14:03:53AraqDT simply ain't for me
14:04:17*abm joined #nim
14:05:43FromGitter<alehander92> :)
14:07:14axionI have stayed with Common Lisp for so long because I'm a game developer, and I can generate efficient machine code with the right CL implementation, while being able to control every aspect of the compiler at runtime. For example, I could recompile a DSL that defines a texture to point to a new image on disk, and every entity in the game will get updated immediately, without stopping the game,
14:07:16axioncompiling and waiting, starting the game, and getting back to the point where you were. For subtle changes, you have to screenshot to even notice any effect.
14:08:31axionThat last bit was with most other languages of course.
14:11:09axionWell CL moreso has a gradual typing system.
14:11:42Araqwhen I looked at it its type system was mostly "assume type X here for optimization"
14:12:00Araqit didn't check anything
14:12:27axionType annotations are implementation-specific, so if you're talking about the language then yes you're correct. Some implementations will allow you to annotate and turn aggressive checking up so that they are compile time errors.
14:13:47Araqfair enough but I doubt it works well in practice where one tends to work with underspecified junk code :-)
14:14:07axionHence why everyone writes their own stuff
14:15:07axionI am sick of all that to be honest, but I have about 100k lines of a game engine that I will probably still work on in my off time, because it's pretty much my life's work.
14:15:52Araqwell in C++ game engines everything is written from scratch often too
14:16:05Araq(STL is bad!)
14:16:10axion:)
14:24:29*clyybber joined #nim
14:30:45*clyybber quit (Read error: Connection reset by peer)
14:31:14*clyybber joined #nim
14:34:05axion@alehander92: {.used.} on a const doesn't seem to remove the warning for me
14:34:14FromGitter<alehander92> no no
14:34:23FromGitter<alehander92> {.used.} on the whole module
14:35:03axionAh I saw the toplevel declaration in the manual, but I don't understand what `defined(numHasUsed)` is actually doing.
14:35:35FromGitter<alehander92> axion yeah
14:36:00FromGitter<alehander92> sorry, the first thing is still useful info : obviously {.used.} doesnt work for consts itself
14:36:09FromGitter<alehander92> otherwise i suspect this is for backward compat
14:36:25FromGitter<alehander92> if you happen to have a lib targetting older nim where {.used.} didnt exist?
14:36:40FromGitter<alehander92> but normally you would just do `{.used.}`
14:36:47axionI kinda feel dirty for treating the whole module as used though. I kinda want the warnings to appear for non-consts in that module to catch mistakes
14:37:00FromGitter<alehander92> yes, you're correct, that's why the bug is there
14:40:35FromGitter<alehander92> oh man i finally realized i am stopping a parent process of the one i wanted to stop..
14:44:21axionIf I have a type parameter T that is an "or" typeclass for a few different array container types, is there a way to get the containing type of that array as another parameter?
14:54:40FromGitter<qqtop> ((https://camo.githubusercontent.com/6aba6c848ec3c87a75eb8ec63f734ab70f609c88/687474703a2f2f7171746f702e6769746875622e696f2f6e696d2e6769663f7261773d74727565))
14:55:09clyybbersick
14:56:05clyybberaxion: You mean like [T: int or uint](a: array[T]) ?
14:56:41axionMaybe, lemme try in a few when I'm done with lunch. Thanks
14:59:59lqdev[m]axion: if you have sth like [T: array | seq](a: T) you'll need to write a macro that extracts generic types
15:01:09*jholland__ joined #nim
15:01:11lqdev[m]something similar to https://github.com/liquid600pgm/euwren/blob/9148e9d439ae091ccca72a71e91c466f3a0ef0e4/src/euwren.nim#L224
15:02:39clyybberlqdev[m]: You should be able to do [D, T: array[D] | seq[D]](a: T)
15:02:54clyybberignore the array only having one generic param :p
15:05:17disruptek~stream
15:05:18disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
15:05:27disruptektime to write a pulseaudio controller.
15:05:35disruptekname suggestions?
15:06:03disruptekit just has to let me automatically adjust levels and connect sinks/sources by app name.
15:07:29*sammich quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
15:08:07*crem quit (Ping timeout: 272 seconds)
15:08:16clyybberdisruptek: Nice, pulsecontrol?
15:08:30disruptekseems like this has been done so many times but i cannot find the right solution for me.
15:08:40disrupteki think i can just use dbus.
15:08:41clyybberpulsemixer?
15:08:46clyybberhave you heard of that one?
15:08:57clyybberthats what I use
15:09:14clyybberdunno, if it can connect sinks/sources by app name tho
15:09:23disruptekyeah, that's the problem.
15:09:34clyybbersounds like you are looking for jack :p
15:09:46clyybberor pipewire
15:09:46disruptekyeah, i'm just not ready to take the plunge into jack.
15:09:55disruptekthis'll be a stream hack. like 2-3hrs.
15:09:55clyybberpipewire is jack + pulseaudio
15:09:58clyybberah
15:10:00clyybberok
15:10:07disruptekstart-to-finish cli tool.
15:12:24disruptekpulsemixer is kinda what i want, but there's no way to automate it.
15:12:33disruptekpavucontrol is the same thing, basically.
15:13:04*kokzhou joined #nim
15:13:20shashlickdoes it have a wrapper
15:13:25disrupteknot yet.
15:13:44disrupteki thought about that, but i'm not the right guy to stream it. 😘
15:14:21disruptekpulseauto
15:14:32FromGitter<alehander92> oh ok so pgrep -P <pid>
15:14:35FromGitter<alehander92> is what i need
15:14:51*Hideki_ quit (Remote host closed the connection)
15:15:26*kokzhou quit (Client Quit)
15:15:35*Hideki_ joined #nim
15:20:01*Hideki_ quit (Ping timeout: 264 seconds)
15:20:19FromGitter<kristianmandrup> I'm getting `undeclared field: 'kind' for type system.NimNode`
15:20:28*JustASlacker quit (Remote host closed the connection)
15:20:32FromGitter<kristianmandrup> macro defineComponent*(body: untyped): auto = ⏎ if body.kind == nnkStmtList:
15:20:44FromGitter<kristianmandrup> defineComponent: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e70eacc11701c039554d32d]
15:21:34FromGitter<kristianmandrup> I took this directly from `react.nim` so wondering if sth in the nim internals changed?
15:21:35FromGitter<kristianmandrup> https://github.com/andreaferretti/react.nim/blob/master/example/app.nim#L42
15:22:28FromGitter<kristianmandrup> NimNode* {.magic: "PNimrodNode".} = ref NimNodeObj ⏎ ⏎ ```## Represents a Nim AST node. Macros operate on this type.``` [https://gitter.im/nim-lang/Nim?at=5e70eb33ebcea00e68fd00c4]
15:23:39*lritter quit (Remote host closed the connection)
15:24:20FromGitter<kristianmandrup> Hi @alehander92 , I'm finally back
15:25:20*lritter joined #nim
15:25:45FromGitter<alehander92> hey
15:25:49FromGitter<alehander92> welcome :)
15:25:55FromGitter<alehander92> yeah the definition is a builtin
15:26:08FromGitter<alehander92> so `kind` is defined internally afaik
15:26:58FromGitter<kristianmandrup> so what could I be missing. I literally copied the macro and using the same way of calling it as in `react.nim` example
15:27:10FromGitter<alehander92> but i have no idea why would you get missing field
15:27:32FromGitter<kristianmandrup> https://github.com/andreaferretti/react.nim/blob/master/react.nim#L155
15:28:16FromGitter<kristianmandrup> https://github.com/kristianmandrup/react-16.nim/blob/master/react16.nim#L9
15:28:23*Hideki_ joined #nim
15:28:29FromGitter<kristianmandrup> https://github.com/kristianmandrup/react-16.nim/blob/master/example/sandbox.nim#L8
15:28:51FromGitter<kristianmandrup> Been trying to upgrade the original `react.nim` to work with latest nim and React 16.x
15:29:51FromGitter<kristianmandrup> How can I best debug this issue?
15:31:11axionI'm probably overthinking slices here, but how would i write the contents of 2 smaller arrays into a larger one? a = [0, 1]; b = [2,3]; c = [0,1,2,3]?
15:31:28FromGitter<alehander92> well you can try echo body.repr
15:31:31FromGitter<alehander92> then echo body.treerepr
15:31:32axiontrying to do it concisely without multiple result slices
15:31:33FromGitter<kristianmandrup> If I look into the nim compiler, it always seems to reference `PNode`
15:31:34FromGitter<kristianmandrup> proc makeStmtList*(n: PNode): PNode = ⏎ if n.kind == nkStmtList:
15:31:35FromGitter<alehander92> in the beginning of the macro
15:31:55FromGitter<alehander92> yeah NimNode is used for macros, PNode is just a compiler detail
15:32:34FromGitter<alehander92> i guess NimNode basically is a PNode actually but that's the user facing api yeah
15:33:00FromGitter<alehander92> mostly the difference practically is to use nk for PNodes and nnk for NimNodes iirc
15:33:45FromGitter<kristianmandrup> macro defineComponent*(body: untyped): auto = ⏎ echo body.repr ⏎ echo body.treerepr ⏎ if body.kind == nnkStmtList: [https://gitter.im/nim-lang/Nim?at=5e70edd9e72d577020a0d846]
15:33:52FromGitter<kristianmandrup> Nothing is being printed
15:34:09FromGitter<alehander92> well, that's strange
15:34:20FromGitter<alehander92> can you just call it with a very simple argument next to the macro def
15:34:42FromGitter<alehander92> try a minimal repro example which works and go on from there
15:34:55axionproc foo(c: var array[4, int], a, b: array[2, int]): # is there anyway to write the values of A and B into C in a single line without two `c[N..M] = ...` lines?
15:35:00FromGitter<kristianmandrup> yeah, so I'm calling macro with a proc node
15:35:51FromGitter<kristianmandrup> I tried
15:35:52FromGitter<kristianmandrup> defineComponent: ⏎ ⏎ ```var x = 2``` [https://gitter.im/nim-lang/Nim?at=5e70ee5711701c039554e142]
15:35:59FromGitter<kristianmandrup> With
15:36:00FromGitter<kristianmandrup> macro defineComponent*(body: untyped): auto = ⏎ echo body.repr ⏎ echo body.treerepr
15:36:12FromGitter<kristianmandrup> still the same error and nothing being printed
15:36:24*sammich joined #nim
15:37:31FromGitter<kristianmandrup> nim --version ⏎ Nim Compiler Version 1.1.1 [MacOSX: amd64] ⏎ Compiled at 2020-03-17
15:37:39FromGitter<kristianmandrup> react16.nim(11, 12) Error: undeclared field: 'treerepr' for type system.NimNode
15:39:03FromGitter<alehander92> you need to import macros
15:39:13FromGitter<alehander92> maybe react is exporting them but not completely
15:39:17FromGitter<alehander92> https://play.nim-lang.org/#ix=2ev8
15:39:54FromGitter<alehander92> (click on showing output and then on Run)
15:40:23FromGitter<alehander92> and on showing output again, i mean whenever you need to see debug/compiler info
15:41:16FromGitter<alehander92> PMunch maybe we can one day show both
15:41:21FromGitter<alehander92> on a side by side view
15:41:28FromGitter<alehander92> i know tho , PR-s welcome
15:54:33clyybberPMunch: How do you know I want a string literal and not an ident?
15:54:38clyybberIn you Command example
16:18:58*a_b_m joined #nim
16:20:34*a_b_m quit (Client Quit)
16:21:25*abm quit (Ping timeout: 246 seconds)
16:24:07PMunchHuh?
16:24:25PMunchclyybber, ^
16:24:46clyybberPMunch ?
16:25:12PMunchYou asked how I know if you want as string literal
16:25:19clyybberyeah
16:25:58clyybberDid I miss your answer?
16:26:00PMunchYou mean how I know to convert the first string to an ident and the second to a tring literal?
16:26:11clyybberYeah
16:26:36clyybberDo you only implicitly convert to ident?
16:28:40PMunchAh, Command has the signature "proc Command(name: string | NimNode; arguments: varargs[NimNode]): NimNode"
16:28:58PMunchAnd string literals are auto-converted to NimNodes of a string literal
16:29:03axionif i do [N, M: static[int]] is it enforced that both must be different values, and if not, is it possible to do this?
16:29:21clyybberaxion: Yeah, but you gotta use when inside the proc/template
16:29:24clyybberPMunch: I see
16:29:35PMunchBut if Command is given a string as the first argument it is converted to an Ident
16:29:41leorizeaxion: when N == M: {.error: "Your error message here.".}
16:29:57axionI see, thanks.
16:33:16*Hideki_ quit (Remote host closed the connection)
16:34:21*Hideki_ joined #nim
16:39:13*Hideki_ quit (Ping timeout: 264 seconds)
16:56:55*zahary joined #nim
17:03:32*zahary quit (Quit: Leaving.)
17:06:58*Trustable joined #nim
17:08:26*Hideki_ joined #nim
17:08:33*lopofsky joined #nim
17:17:58FromGitter<Kvothe87> hi, can i ask for some simple help?
17:18:19FromGitter<Kvothe87> i want read a csv and convert to a json format but i have some issues
17:18:21FromGitter<Kvothe87> https://play.nim-lang.org/#ix=2evu
17:18:37FromGitter<Kvothe87> example of what i'm trying and what i am trying to obtain
17:20:55*Hideki_ quit (Ping timeout: 246 seconds)
17:22:34*actuallybatman quit (Ping timeout: 256 seconds)
17:23:13*thomasross quit (Ping timeout: 256 seconds)
17:25:17FromGitter<alehander92> why dont we detect
17:25:28FromGitter<alehander92> exportc for same names with different signatures
17:25:36FromGitter<alehander92> probably the c compiler error is good enough?
17:28:00leorizewell when you `{.exportc.}` you basically tell the compiler: I know what I'm doing
17:31:14*nsf quit (Quit: WeeChat 2.7)
17:35:20leorizeKvothe87: here you go: https://play.nim-lang.org/#ix=2evF
17:35:52leorizeI swapped to stringstreams because your version wouldn't run on the playground
17:42:54*Trustable quit (Remote host closed the connection)
17:44:50*Trustable joined #nim
17:48:53disruptek#13065
17:48:54disbothttps://github.com/nim-lang/Nim/pull/13065 -- 3Better C++ based exception handling
17:48:58disruptekany eta?
18:01:25*jjido joined #nim
18:05:54*jjido quit (Client Quit)
18:07:21*ptdel joined #nim
18:14:11*Vladar quit (Quit: Leaving)
18:14:47Araqdisruptek, found more failing tests with it
18:14:50Araqhowever
18:15:00Araq--exceptions:goto does work with 'nim cpp'
18:15:07disruptekah, nice!
18:15:17Araqand should be a good workaround
18:15:17disruptekit's not default, though, right?
18:15:22Araqnope
18:15:30Araqspeaking of which
18:15:44Araqhttps://github.com/nim-lang/Nim/issues/13668 is a worst case
18:15:47disbotgoto exceptions bug: an error cannot catch by except. ; snippet at 12https://play.nim-lang.org/#ix=2evQ
18:15:59AraqI'm rewriting the implementation yet again, rather unsuccessfully
18:16:31Araqturns out that 'getCurrentException' is hard to support :-(
18:16:47disruptekoh dear.
18:17:39disruptekwhy does that break?
18:17:58Araqconflicting code generation requirements
18:18:56Araqfor the simple case I have workarounds...
18:22:22disrupteki hate that i require defer.
18:23:22*thomasross joined #nim
18:23:27*thomasross quit (Remote host closed the connection)
18:28:45FromGitter<dumjyl> can https://github.com/nim-lang/Nim/pull/13567 be merged or should I make another PR without the unrelated changes?
18:28:46disbotAdd nnkMacroDef to RoutineNodes in macros.nim.
18:29:25Araqplease create a fresh PR that only touches macros.nim
18:30:13*cyraxjoe joined #nim
18:32:38*MightyJoe quit (Ping timeout: 268 seconds)
18:36:16*natrys quit (Quit: natrys)
18:39:31Yardanicothere's a guy in telegram asking if nim has something in stdlib to truncate a float to some decimal points, like -0.0980000 to -0.09
18:39:40FromGitter<Kvothe87> @leorize thank you
18:39:43Yardanicoright now he uses formatFloat with parseFloat
18:39:57YardanicoparseFloat(num.formatFloat...)
18:39:58disruptekstrformat
18:39:59Araqstrformat can also do it iirc
18:40:10Yardanicowell, he doesn't want to print it out
18:40:15Yardanicohe wants to truncate it as a "float" type :P
18:40:23disruptekthat's not a thing.
18:40:34leorizeyep that's not a thing
18:40:36Araqexactly
18:40:54Araqthere is round() though and friends
18:41:09leorizetell him that if he want precision, floating point isn't the right thing to use
18:41:47dom96!eval echo(("0.0980000")[0 .. 4])
18:41:49NimBot0.098
18:41:54dom96:P
18:42:06Yardanicoyeah he does something like that
18:42:12Yardanicoreturn parseFloat(i.formatFloat(ffDecimal, dec_acc+1)[0..^dec_acc])
18:42:23Araqtell him it's fine
18:42:25leorizeI'm scared :P
18:42:30Araqhmm
18:42:39Araqoh well
18:42:54clyybberfloats are overused and misunderstood
18:44:13FromGitter<matrixbot> `BarrOff` Could someone please take a look at https://github.com/nim-lang/Nim/issues/13675 ? I would really appreciate opinions and guess it is low hanging fruit.
18:44:15disbotnimcall not passable to closure parameter ; snippet at 12https://play.nim-lang.org/#ix=2ew1
18:44:52leorizeBarrOff: you can join our irc channel at #freenode_#nim:matrix.org
18:45:41Araqtype conversions are not lifted to typeclasses
18:46:26Araqno bug here and you should use overloading, Nim is not a shitty version of Go
18:49:05Araqhmm this version is close to working...
18:58:09FromGitter<matrixbot> `BarrOff` Sure, overloading with two procs solves the problem, but why doesn't it work as I had hoped for?
18:58:33Araqbecause type conversions are not lifted to "or types"
18:59:19AraqI'm not sure it would be sound :P
19:00:44Araqwooohhooo! got it
19:00:56Araqman this was a hard one...
19:00:58FromGitter<matrixbot> `BarrOff` oh, ok. Will look that one up in the documentation. Thank you for the help
19:01:15Araqprobably not covered by the spec :-(
19:02:13clyybberhehe, --threads:on is broke with --gc:arc and -d:useMalloc
19:02:55Araqhow come?
19:03:05clyybber/home/clyybber/builds/nim/lib/system/mm/malloc.nim(79, 23) Error: pragmas are only allowed in the header of a proc; redefinition of 'deallocOsPages' from /home/clyybber/builds/nim/lib/system/threads.nim(111, 8)
19:03:13clyybberBecause of this error ^
19:03:54Araqso ... I think I got it
19:04:02Araqthe code is also simpler than before
19:04:45clyybberAraq: What did you solve?
19:04:54clyybberThe exceptions thing?
19:04:54Araqissue #13668
19:04:56disbothttps://github.com/nim-lang/Nim/issues/13668 -- 3goto exceptions bug: an error cannot catch by except. ; snippet at 12https://play.nim-lang.org/#ix=2evQ
19:04:59clyybberNice
19:05:09Araqonly had to rewrite the implementation once again
19:05:17clyybberhehe
19:05:22Araqbut now it makes plenty of sense and the code is faster
19:05:31Araqless junk generated
19:07:16PMunchKvothe87, not sure if you're still around: http://ix.io/2ewa
19:10:50*abm joined #nim
19:12:07Araqand the optimization is not required anymore either, nice
19:15:23*NimBot joined #nim
19:16:06leorize~matrix is the #nim channel on Matrix can be found at #freenode_#nim:matrix.org
19:16:06disbotmatrix: 11the #nim channel on Matrix can be found at #freenode_#nim:matrix.org
19:16:16*shadowbane joined #nim
19:23:07clyybberAraq: That diff is a beauty: 7 adds, 23 dels :D
19:23:26clyybberAraq: But it can't handle currentException?
19:25:36*mattmurr quit (Quit: ZNC 1.7.5 - https://znc.in)
19:28:38*lopofsky quit (Quit: Leaving)
19:31:21*shadowbane quit (Quit: Konversation terminated!)
19:36:00*shadowbane joined #nim
19:36:59Araqyeah I think so as it's part of the intensive tests
19:37:04*ptdel quit (Ping timeout: 246 seconds)
19:37:08Araqgetting them all to pass is an art...
19:37:16clyybberNice
19:37:44*shadowbane quit (Remote host closed the connection)
19:37:44clyybberAraq: Btw, regarding the threads:on issue, when is the stub in malloc.nim required?
19:38:00AraqI dunno, aks Zevv
19:38:13clyybberZevv: ping
19:41:10*shadowbane joined #nim
19:43:46*ptdel joined #nim
19:47:30FromDiscord<Simula> does nim have a well-documented easy-to-use gui library?
19:50:07PMunchDefine well-documented
19:50:25*NimBot joined #nim
19:50:29PMunchSame for wxWidgets
19:51:13FromDiscord<Simula> i can write code without having to dig through apis and poorly documented examples
19:51:37PMunchYou might want to check this out: https://matthiashager.com/gui-options-for-nim
19:52:43FromDiscord<Simula> i checked that out, nothing fits what i need
19:52:59FromDiscord<Simula> ah well, i'll try and contribute when i can
19:53:16PMunchI have been saying for years now that I should write a UI toolkit for Nim..
19:53:30PMunchSo maybe if you wait a couple more years I'll get around to it :P
19:54:37FromDiscord<Simula> I like what exists now, I just can't figure out how to get it to work for me :/.
19:54:38FromDiscord<Simula> I like what exists now, I just can't figure out how to get it to work for me :/
19:57:28PMunchWhat is it that you can't figure out?
20:01:18FromDiscord<Simula> e v e r y t h i n g
20:01:39FromDiscord<Simula> i'm trying to make an image previewer of sorts. i want to display some image previews in a grid that scrolls along the y axis
20:02:24PMunchHaha, well everything is a bit hard to explain :P
20:04:29FromDiscord<Simula> i'm already farther in Qt haha
20:04:45FromDiscord<Rika> good qt lib when
20:05:16FromDiscord<Simula> the only good qt lib is for c++
20:05:33FromDiscord<Recruit_main707> python?
20:05:39FromDiscord<Rika> that sucks simula
20:06:51axionProbably good to contribute to existing efforts, because GUI is one of the most time consuming things you can work on - ask any game developer.
20:07:35axionTHis floated by me recently, a decent start it looks like: https://github.com/johnnovak/koi
20:07:39FromDiscord<Elegant Beef> i liked nigui but it was a pain
20:07:44FromDiscord<Elegant Beef> i liked nigui but it is a pain
20:07:49Yardanicoaxion: did you usee gintro?
20:07:53FromDiscord<Rika> but i dont need immediate mode tho
20:07:59YardanicoIMO it's the only viable option for easy desktop apps in Nim rn :P
20:08:06Yardanicowell, also nimx, but idk :D
20:09:26axionI'm not really one to "use" any toolkits. I don't even use GUIs really. I use my browser when I have to, and not with the mouse.
20:13:09*mattmurr joined #nim
20:15:03PMunchI wrote the genui macros for wxWidgets and Gtk which works pretty well. But I never really used them all that much
20:15:06*shadowbane quit (Quit: Konversation terminated!)
20:28:14*chemist69 quit (Ping timeout: 246 seconds)
20:28:17*bra-ket joined #nim
20:29:17*chemist69 joined #nim
20:30:42*zyklon quit (Ping timeout: 256 seconds)
20:33:46*chemist69 quit (Ping timeout: 246 seconds)
20:34:09*chemist69 joined #nim
20:35:01*narimiran quit (Ping timeout: 264 seconds)
20:39:30*NimBot joined #nim
20:40:36axionWhat are some good projects that exemplify writing great documentation, preferably with rich Nim DocGen output?
20:41:12*zahary joined #nim
20:43:57PMunchI try to give my projects as good documentation as I can, not sure if that counts..
20:46:09*sealmove joined #nim
20:46:23FromGitter<alehander92> i think all kinds of projects
20:46:33FromGitter<alehander92> but especially ones which can be educational
20:46:39FromGitter<alehander92> or which can have many edge cases/gotchas
20:46:43FromGitter<alehander92> in their implementation
20:46:55*shadowbane joined #nim
20:49:15*Zectbumo quit (Remote host closed the connection)
20:52:28axionOk thanks. Another question
20:53:05axionHow should you split up newlines when you have a real long type parameter section, and thus parameter list, and you want to stay within 80 columns?
20:53:37axionThe compiler doesn't like the parameter list on a new line after the type parameters
20:54:20disrupteki split on the pragma and in the parameter list, what else?
20:54:49PMunchYou mean like this? https://github.com/PMunch/macroutils/blob/master/src/macroutils.nim#L990-L994
20:55:11axionThat's fine and all, but if the type parameters doesn't leave room for the parameters that are expected to be on the same line as the last type parameter line, what to do?
20:55:40PMunchI don't understand what you mean..
20:57:16axionproc foo*[some really\nlong\ntype\parameters](parameters) = discard. Here (parameters) must be next to the ], but there isn't room in 80 columns to do that
20:57:49axionif i i mean i could do it but the shape of the code looks very bad and painful to read
20:58:01axions/if i//
20:59:06PMunchDo you have a concrete example?
20:59:37axionSure, something like: https://gist.github.com/mfiano/d5ed8f41697c0e468e42d4af8231e363
20:59:40*Zectbumo joined #nim
21:00:01axionIt reads poorly with the parameter list required to be next to the ] and not easily scanned
21:01:20PMunchI'd probably end up doing something like this: https://play.nim-lang.org/#ix=2ewT
21:01:28disruptek~stream
21:01:28disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
21:01:33disruptekfinishing this pulseaudio tool
21:01:50PMunchYou're writing a pa tool?
21:02:37axionI was considering something like that or https://play.nim-lang.org/#ix=2ewU but both just equally bad to me. I guess I'll have to get used to it :/
21:03:49FromDiscord<Simula> axion: that hurt to read
21:04:40PMunchYeah I guess that's another option
21:07:24axionis nimsuggest what is responsible for reformatting on file save in nim.nvim?
21:07:59PMunchThat might be nim --stylecheck or something like that
21:08:12axionPMunch: because with your suggestion, it is reformated to make it look like the parameter list is part of the body...even more difficult to read: https://play.nim-lang.org/#ix=2ewX
21:08:45PMunchHaha, yeah that isn't great..
21:09:01PMunchI really wish Nim was a bit more lenient on where it allowed newlines sometimes..
21:09:50FromGitter<dumjyl> @Vindaar Your recent changes to ginger are causing CI failures, infinite recursion here: https://github.com/Vindaar/ginger/blob/master/src/ginger.nim#L1779.
21:09:53axionYeah I don't know much about the compiler but it would seem to be trivial to allow newlines after a closing delimiter
21:10:08axionMust be a good reason for not allowing such though...who knows
21:12:35*abm quit (Quit: Leaving)
21:18:15*Hideki_ joined #nim
21:20:05FromGitter<Vindaar> @dumjyl oh crap. I didn't think about the fact that it'd already use the new version for `ggplotnim`
21:20:17FromGitter<Vindaar> I'll fix it! Thanks for notifying me!
21:22:55krux02axion: what do you want to pass to init?
21:23:01*Hideki_ quit (Ping timeout: 264 seconds)
21:23:49*tdog quit (Ping timeout: 246 seconds)
21:24:52krux02to me it looks like you want to pass a type and a static parameter.
21:24:52FromGitter<Vindaar> @dumjyl ok, updated. The next time CI runs it should be fine again. Sorry everyone :)
21:27:09axionkrux02: That was just a contrived example to demonstrate the identation issue.
21:27:46clyybberI guess the issue would be that [] is also used for indexing
21:28:00krux02ah, ok
21:28:24clyybberAnd the `(` in the next line could be parsed as the beginning of a tuple assignment
21:28:27krux02well you have a very unusual combination of arguments there
21:28:50FromGitter<dumjyl> @Vindaar thanks for the quick response.
21:30:08leorizeaxion: nim.nvim have no such feature....
21:31:39*dadada quit (Ping timeout: 250 seconds)
21:32:06axionleorize: Hmm, could be vim-polyglot then or something that reformats code into Nim style on save then
21:34:36krux02axion, just a question though. As a (former) lisp programmer, do you use emacs for Nim?
21:35:06*zahary quit (Quit: Leaving.)
21:35:42axionI would have expected mentioning nim.nvim and vim-polyglot to answer that
21:36:04FromDiscord<Rika> lol
21:36:05*jjido joined #nim
21:36:32krux02ok then
21:36:59axionI fucking hate Emacs.
21:37:07krux02interesting.
21:37:09axionI used it because I had to, but no more.
21:37:17axionAlways loved vim
21:37:31krux02well I used both, and I hated both
21:37:37krux02now I can use both.
21:38:18krux02I started with vim, hated it. Changed to emacs, hated it. Stopped complaining, internally resigned, and then just got along with it.
21:38:22krux02Now I like it.
21:38:27axionI do most of my work remotely, and neovim has true-color support on the terminal and is fast, so shrug
21:39:08krux02well, neovim is certainly good. But I am hoping that someday sombody comes to me on my lonely emacs nim island.
21:39:39leorizekaushalmodi is a fellow emacs user :P
21:39:43axionI use Linux for my OS, but thanks anyway
21:39:51*voltist joined #nim
21:40:14krux02I like `vim` as an editor, but I really don't like vimscript. But I do like elisp somehow. That is the most important reason for emacs.
21:41:49axionWell vimscript is a DSL, it a GP language suitable for writing the OS that is Emacs. It's designed to be concise and to conform to Vim's data structures.
21:41:50krux02I hope that someday an experienced emacs guy comes to the Nim world and starts to fix the problems that nim-mode has and that are too hard for mee to fix.
21:41:57disruptekdesigning dbus api on-stream
21:41:59axionit's not a GP language*
21:42:00disruptek~stream
21:42:01disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
21:42:30voltistCould anyone explain to me what TArg is for the Thread object?
21:42:37PMunchYes
21:42:53PMunchTArg is what the thread takes as its startup argument
21:43:04krux02What I don't like about vimscript is that I don't understand the anatomy (syntax tree) of vimscript. Everything is just unclear to me, where does a token end? What is a function etc.
21:43:09PMunchIt's only one argument, so if you need to pass more than one thing, use a tuple or an object
21:43:21krux02My knowlegde of programming languages does not map to vim.
21:43:35leorizekrux02: it uses a function-endfunction style of syntax
21:44:24axionI prefer fun-endfun myself, but yeah
21:44:24leorizeeverything in vimscript is a vim command
21:44:32voltistPMunch: So the type accepted by the proc that the Thread executes?
21:44:43krux02What I mean was, I once made something into a comment via "
21:44:47voltist*thread
21:44:54PMunchvoltist, yes. Pretty much
21:44:58krux02but then it wasn't really a comment but leaked into a package and then errors occured.
21:44:59leorizevoltist: TArg is a generic type, just like (ie. `T`)
21:45:09krux02really weird, I didn't understand
21:46:08PMunchNormally you define a thread by attaching the {.thread.} pragma to a procedure with one argument. And then you can start that thread by calling "createThread" on a variable that is a Thread with that same argument as it's TArg.
21:46:13PMunchLike they do in the example
21:46:31krux02then there are things that you just copy over from other init script that do things for example, nobody explained to be why I had to put ``call plug#begin('~/.vim/bundle')`` in there
21:46:59leorizethat's because you're using vim-plug :P
21:47:00krux02and is the # like accessing a namespace? or is it just a single identifier containing #
21:47:26krux02yea I know that it is for vim-plug :P I mean I don't understand what is going on.
21:47:28axionI suggest reading the book a friend of mine wrote "Learn Vimscript the Hard Way" available for free online
21:47:32leorizeand yea `#` is kinda a namespace
21:47:35*leorize quit (Quit: WeeChat 2.7.1)
21:47:39voltist"Error: no generic parameters allowed for Thread". Interesting...
21:47:44krux02I just have a simple time to understand emacs lisp, even though that can be tough to understand as well.
21:48:06leorize[m]axion: that's the book I used to learn vimscript for writing nim.nvim :)
21:48:26axionAh yeah I'm friends with the author who is also a Common Lisper. Good book!
21:49:06PMunchvoltist, you seem to be doing something wrong..
21:49:08rayman22201I've been a vim guy for a long time, but just started emacs to check out the "other side". I also do a lot of remote dev, and I'm actually really enjoying it. TRAMPS is pretty F*&king amazing.
21:49:31PMunchI really want to give kakoune another go
21:50:05leorize[m]I used emacs for awhile but I don't like how bloated it is
21:50:08leorize[m]kakoune is a fun editor
21:50:28voltistPMunch: Indeed
21:50:33krux02leorize[m], yea emacs is bloated, but still it starts quickly and that is what matters.
21:50:41leorize[m]they still don't have proper tab-as-space expansion the last time I checked
21:50:49krux02It just doesn't start quickly if you add a lot of bloat on top
21:50:55krux02but that is true for emacs as well
21:51:01krux02I mean true for vim as well
21:51:15*leorize joined #nim
21:51:24leorize[m]took me 30s to have it booted up on a brand new setup :P
21:51:47krux02and by now I used too many emacs featurs that I would want to switch back to Vim.
21:52:21rayman22201A big reason is, I use windows for work reasons, and I want a sane OS abstraction on top if it. Emacs works pretty good for that purpose. Also, emacs server mode works really well in windows as well. So the startup issue isn't that big of a deal for me. :-P
21:52:39axionleorize[m]: that's builtin
21:52:40rayman22201Emacs still takes up less memory than the freaking slack client I have to keep open on windows lol
21:52:54Demos[m]IMHO the correct sane OS to use on windows is NT
21:52:57krux02lol
21:53:05rayman22201lol
21:53:08Demos[m]NT is sane, very sane, windows not so much
21:53:16voltistPMunch: I'm using an Object 'ObjectX' as TArg when creating an array of Thread objects
21:53:26krux02windows NT doesn't run games.
21:53:42krux02:P
21:53:45voltistvar thr: array[0..49, Thread[ObjectX]]
21:53:50Demos[m]emacs suffers from the "I'm a linux app and I expect CreateProcess to be fast" problem :(
21:54:22clyybberkakoune is great
21:54:56rayman22201Demos[m]. Biggest disadvantage to using emacs on windows. I can live with it for now though :-P
21:56:04krux02Demos: that is better than th "I'a a windows app and I expect that you tell me where you installed the c++ compiler is for every project"
21:56:15Araqwhat's up with ggplot? broken?
21:56:51FromDiscord<Rika> more like "i expect this compiler to have specific features the compiler you have doesnt"
21:57:43PMunchclyybber, yeah I tried it for a while just as I was getting into Vim properly. But it missed some things I had configured my Vim to do, which I no longer use.
21:58:16PMunchAnd what is ObjectX, do you have a code snippet?
21:58:38Demos[m]wait does nim have a ggplot impl?
21:59:19Araqsure
21:59:54clyybberand its really great
21:59:58voltistPMunch: Here is the object https://pastebin.com/q7ZYjEKG
22:00:15federico3is treeform around?
22:00:46PMunchOh wow, that opened in a different browser from the one I normally use. Is pastebin really that full of adds?
22:01:24clyybberhastebin is a good bin
22:01:28leorizeI refuse to browse the internet without an adblocker for this exact reason
22:01:32Yardanicoublock origin blocked google tracking and some shady aj2073.online website for pastebin :P
22:01:59Yardanicoleorize: I have uBlock Origin + AdGuard Home (a blocking dns server similar to pihole but easier to set up)
22:02:27voltistYeah I don't notice thanks to my ad blocker
22:02:50leorizesimple-adblock + unbound solves it for me on my router
22:05:03PMunchvoltist, don't know what you were doing but this works fine: http://ix.io/2exd
22:05:17PMunchleorize, yeah my normal browser obviously has an ad blocker
22:05:25PMunchclyybber, ix.io is the best one IMO
22:06:01leorizeand 0x0.st for sharing pictures
22:06:26PMunchI just use my own server for that..
22:07:07leorizethat's quite a luxury to me
22:07:36PMunchEveryone should have their own server :(
22:08:22leorizetoo expensive :(
22:08:35FromGitter<Vindaar> @Araq I broke something by updating ginger (backend) and introducing a bug. It should be fixed now
22:09:34PMunchleorize, yeah I know it can be expensive..
22:09:56PMunchI guess I'm lucky, I even have a static IP at home so worst case scenario I could set up my server here
22:10:08voltistPMunch: Ah, it's because my proc has "var Worm". Would there be a thread-safe way to modify the object?
22:11:15PMunchUhm, probably not..
22:11:29PMunchWell, I mean you could add a Lock to the object
22:14:30voltistOk, I'll have a look into that
22:15:09PMunchOh well, time for bed
22:15:10*PMunch quit (Quit: leaving)
22:15:38AraqVindaar: do you use --gc:arc ?
22:17:52FromGitter<Vindaar> @Araq: nope, not yet. PMunch's persvector doesn't yet support it, afair
22:18:09Araqok so I can merge https://github.com/nim-lang/Nim/pull/13677 then
22:18:10disbotrewritten goto based exception handling; much cleaner implementation;…
22:18:56FromGitter<Vindaar> yeah, if `ggplotnim` was the only failing package, it should be safe. Was a stupid bug on my part
22:20:50*couven92 quit (Read error: Connection reset by peer)
22:21:34*solitudesf quit (Ping timeout: 246 seconds)
22:24:22Araqyeah the others were green
22:25:51FromGitter<Vindaar> ah good. I'll be off to bed now. Good night everyone!
22:27:23FromGitter<zetashift> gnight
22:33:40*zahary joined #nim
22:37:32axionIf I define a constant locally in a proc, is that okay? Will it really not have global scope, and is it idiomatic to do this?
22:39:53leorizeaxion: yes, it won't have global scope, and it's an idiomatic thing
22:40:04axiongreat thanks
22:41:32*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:42:33*jjido joined #nim
22:50:14Yardanicodamn our discord server has 781 members :P most of them are inactive though
22:53:23*voltist quit (Quit: Leaving)
22:55:28*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:56:28*jjido joined #nim
23:03:01YardanicoWhat does <//> mean in the source code? https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/collections/lists.nim#L102
23:03:15Yardanicohttps://nim-lang.org/docs/lists.html#SinglyLinkedList one of the types has parens and the other doesn't, but they're the same type
23:04:02*rmt joined #nim
23:08:18*silvernode-mobil quit (Ping timeout: 256 seconds)
23:08:41*ftsf joined #nim
23:11:00FromGitter<dumjyl> It is the `owned` operator for `--newruntime`. It was supposed to be removed but idk what happened: https://github.com/nim-lang/Nim/pull/11145
23:11:02disbotintroduce temporary <//> for 'owned' to get this compile with 0.19
23:15:50*luis_ joined #nim
23:17:16*Trustable quit (Remote host closed the connection)
23:17:34luis_Hi everyone, hope you all safe and healty... is there a quick way to check whether a website is on using nim?
23:18:14luis_I have been using something like: https://i.imgur.com/Y60yVp0.png
23:18:53luis_Or is there a quicker way?
23:19:54FromDiscord<Rika> send a head request maybe idk
23:32:37*zahary quit (Quit: Leaving.)
23:32:52*zahary joined #nim
23:33:24*zahary quit (Client Quit)
23:38:00*silvernode-mobil joined #nim
23:39:25*actuallybatman joined #nim
23:42:19*zedeus quit (Read error: Connection reset by peer)
23:42:23jjidoMmh. Looking at my chan log. It is 2020, and the Vim-Emacs argument is *still* not settled. LOL
23:47:37*silvernode-mobil quit (Ping timeout: 264 seconds)
23:47:40*zedeus joined #nim
23:48:12FromDiscord<exelotl> *laughs in normie text editors*
23:48:16*lritter quit (Quit: Leaving)
23:49:19jjidoexelotl what do you use for nim?
23:50:03FromDiscord<exelotl> I use vs code but I've also been trying textadept for some things
23:50:34jjidovs code is capable
23:51:09FromDiscord<Skaruts> how do I move an item in a seq to another position in the seq?
23:52:12FromDiscord<exelotl> I don't like how bloated vscode can be, but it's comfortable and well designed, I can always get stuff done in it
23:52:22leorizeNim-wise, vscode and neovim provides the best integration :P
23:53:20FromDiscord<Rika> huh when was vscode bloated
23:53:46leorizewhen it was born :)
23:54:08FromDiscord<exelotl> when you have a lot of extensions and several windows open
23:54:27FromDiscord<exelotl> it uses a lot of ram
23:54:39FromDiscord<exelotl> as is the nature of most electron apps
23:56:50*luis_ quit (Ping timeout: 246 seconds)
23:58:16*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:58:30*tane quit (Quit: Leaving)
23:59:19FromDiscord<exelotl> @Skaruts huh i don't see anything for it in the standard library. Simple solution would be s.delete(i) s.insert(item, j)
23:59:46FromDiscord<exelotl> but I guess if you wanted the most efficient solution you'd have to write your own procedure