<< 07-12-2019 >>

00:00:04FromGitter<Obround> Yeah...
00:00:20Yardanicoi wonder what's your use-case
00:01:35FromGitter<Obround> Oh, I just need to make a nim FFI for a different language that compiles to nim.
00:01:55YardanicoI doubt you would need to dynamically execute Nim code then
00:01:59Yardanicoif your language compiles to Nim
00:03:44FromGitter<Obround> Yeah but due to some *difficulties* I am unable to do that :(
00:05:39clyybberdynamically executing is certainly not the solution to your difficulties :)
00:06:10clyybberObround: What difficulties?
00:06:31FromDiscord<mratsim> of course you can eval just do "import compiler/nimeval"
00:06:35FromDiscord<mratsim> 😛
00:06:47FromGitter<Obround> Hmm...
00:06:54FromDiscord<mratsim> import compiler/nimeval
00:06:54FromDiscord<mratsim> echo "before"
00:06:54FromDiscord<mratsim> execute("echo 1+2")
00:07:13FromGitter<Obround> I'll look into that...
00:07:17clyybbermratsim: Not that you should, in a lang that compiles to nim tho. Seems unneccessary
00:07:28FromDiscord<mratsim> ah sorry it might be the old API: https://github.com/nim-lang/Nim/issues/7567
00:07:31disbotcompiler/nimeval execute fails with `Error: cannot open '$PWD/../lib/system.nim'` @11timotheecour; snippet at https://play.nim-lang.org/#ix=23JX
00:07:53FromDiscord<mratsim> the new one is in the test: https://github.com/nim-lang/Nim/blob/devel/tests/compilerapi/tcompilerapi.nim
00:07:56*gmpreussner joined #nim
00:08:43shashlickObround which language
00:09:00FromGitter<Obround> It's a language I am creating...
00:09:12FromGitter<Obround> nimeval fails: `Error: cannot open file: compiler/nimeval`
00:09:23FromDiscord<mratsim> nimble install compiler
00:09:50FromDiscord<mratsim> but if you write a language why do you need a Nim interpreter?
00:09:56shashlick--path:"$nim"
00:09:59shashlickDon't need to install compiler
00:09:59FromDiscord<mratsim> just write an interpreter for your language in Nim?
00:10:21FromGitter<Obround> Ok...
00:11:35FromGitter<Obround> Oh, when I run the code after installing compiler I get this error: `Error: undeclared identifier: 'delEnv'`
00:12:28FromDiscord<mratsim> unfortunaly you are now treading in uncharted waters, Here be dragons
00:15:32shashlickWhich file is complaining
00:16:12FromGitter<Obround> `C:\Users\Obround\.nimble\pkgs\compiler-0.20.0\compiler\scriptconfig.nim(122, 8)`
00:17:14shashlickYou have an old compiler package, remove it and use $nim
00:17:46shashlickBad idea to use an old package and newer Nim executable
00:18:20shashlickI don't know why there is a compiler package when compiler is right there and $nim exists
00:18:39FromGitter<Obround> Ok, how do I remove the old package
00:19:27*sealmove quit (Quit: WeeChat 2.6)
00:20:40disruptekshashlick: hmm, maybe we should fix that. i've been using compiler, too, and it's annoying.
00:21:00disruptekcan we really rely upon $nim having compiler in it?
00:21:06FromGitter<Obround> This seems to work: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5deaf072d75ad3721d69158f]
00:22:43FromGitter<Obround> Compile with: `nim compile --verbosity:0 --hints:off --path:"$nim" -d:nimOldCaseObjects --run "c:\Users\Aditiya\Desktop\Cox\bundle\cox.nim"`
00:24:52shashlickNim always ships with compiler
00:25:07shashlickIt was part of the reason I removed compiler from nimble
00:25:18disrupteknice.
00:25:22shashlicknimble remove compiler
00:25:42shashlickI didn't know about $nim then
00:25:56shashlickElse that would have been the better fix
00:28:09disruptekwait, what?
00:28:27disruptekyou removed the compiler from nimble because it ships with nim?
00:38:09shashlickCause it conflicts with Nim since it could be out of sync
00:38:25shashlickNow nimble can work with any version of compiler
00:38:47shashlickIn the past, compiler package had to match Nim executable
00:43:53*clyybber quit (Quit: WeeChat 2.6)
00:51:31FromGitter<aboisvert> are there pre-built nim (compiler) binaries for Raspberry Pi ?
00:52:32YardanicoI don't think so :( but you could cross-compile from your PC
00:52:57Yardanicoactually wait
00:53:00YardanicoI am wrong
00:54:12Yardanicohttps://github.com/nim-lang/nightlies/releases
00:54:37*krux02_ joined #nim
00:54:42YardanicoDownload from there (either latest dev build or a stable release)
00:54:54FromGitter<aboisvert> yeah i was just looking at that; trying to find stable release, thanks
00:55:49Yardanicohttps://github.com/nim-lang/nightlies/releases/tag/2019-11-26-version-1-0-97e0ce3 this is latest stable
00:55:50Yardanico1.0.4
00:58:21FromGitter<aboisvert> wouldn't it have the hash `c8998c4` based on https://github.com/nim-lang/Nim/tree/v1.0.4
00:58:32*krux02 quit (Ping timeout: 268 seconds)
00:59:03Yardanicowell it's almost the same :P
00:59:27FromGitter<aboisvert> alright, thanks! i'll go with your link, it has the right version number :)
01:05:27FromDiscord<mratsim> I hate it when untyped macros receive typed symbol :/
01:28:02rayman22201mratsim you are a macro god. Your explicit capture solution is blowing my mind right now!
01:34:31shashlickhttps://github.com/nim-lang/nightlies/releases/tag/2019-11-27-version-1-0-c8998c4 is the right one for 1.0.4
01:39:14FromGitter<aboisvert> @shashlick ok, thanks for the clarification
01:56:05*jxy quit (Quit: Lost terminal)
02:02:40*lritter quit (Ping timeout: 268 seconds)
02:02:55*lritter joined #nim
02:12:15FromDiscord<mratsim> @rayman22201 😄
02:16:55*Sargun quit (Changing host)
02:16:55*Sargun joined #nim
02:26:49*krux02_ quit (Remote host closed the connection)
02:33:15*sentreen quit (Ping timeout: 250 seconds)
02:35:00*sentreen joined #nim
02:46:20*lritter quit (Ping timeout: 265 seconds)
02:52:56*dwdv quit (Ping timeout: 240 seconds)
03:46:41madpropsis there a nim way to check if a file is a text file?
03:46:49disrupteknah.
03:47:03madpropsbasically to avoid this http://i.imgur.com/ZiUsHdW.png
03:48:28disruptekthe standard heuristic is to look for nulls, but you could just look for printable characters and a few control characters for newlines, tabs, etc.
03:57:46yumaikasSo, I have a question with how one uses templates https://play.nim-lang.org/#ix=23KA
03:58:38yumaikasBasically, is it possible to write some for of splatting that dumps an object into the AST?
04:03:38yumaikas(basically, I'd like a macro/template that allows me to splat objects into a parameter list)
04:07:50FromGitter<mrgaturus> hi everyone, i want to do a PR for add these procs to bitops ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ sometimes someone needs check multiple flags/bits, writing `(v and mask) == mask` everywhere can be a bit awful. before publishing a PR, what do you think about it? [https://gitter.im/nim-lang/Nim?at=5deb2596b065c6433c50e45d]
04:23:16madpropsdisruptek: https://play.nim-lang.org/#ix=23KI
04:23:21madpropswonder if this is too inneficient
04:24:42disruptekhow fast does it need to be? use sets, for one thing.
04:25:00disruptek{'a'..'z'} is helpful, too.
04:25:15disrupteki think strutils has some set constants you can use.
04:25:23yumaikasAnyone here familiar with how macros work?
04:25:38*rockcavera quit (Remote host closed the connection)
04:25:57disruptekyou can splat objects into parameter lists, sure.
04:26:21yumaikasdisruptek: I'm getting errors when I try to do it
04:26:30disruptekwhat kinda errors?
04:26:45yumaikas"Incorrect indentation"
04:26:59yumaikaswhen I try to write a template to do the splatting
04:27:10yumaikasBut, I suspect my understanding of things is off
04:27:50disrupteki have a macro called `keyValueToHelp` to turns key/value pairs into the {foo: bar} help syntax used by cligen, another macro.
04:27:56disruptek!repo disruptek/gully
04:27:57disbothttps://github.com/disruptek/gully -- 9gully: 11a code comment formatter 15 1⭐ 0🍴
04:28:13disrupteklook at src/gully.nim for keyValueToHelp()
04:28:47disruptekit might be the opposite direction that you want to go in. there's way, way, more complex macro code in my openapi project. it's almost all macro.
04:29:12disruptekbut it has procedure creation and stuff.
04:29:16yumaikasI think it is. I want to take one node and turn it into 4
04:29:16disruptek!repo disruptek/openapi
04:29:17disbothttps://github.com/disruptek/openapi -- 9openapi: 11OpenAPI Code Generator for Nim 15 9⭐ 0🍴
04:30:04disruptekit's probably simpler than you think.
04:30:32yumaikasProbably, but that first attempt at using a template to do it doesn't parse
04:30:48disrupteki don't think you can use a template.
04:31:11yumaikasFair enough
04:33:32yumaikasIs it possible for a macro to grab the parent node (the one around what it's invoked as?)
04:34:13disruptekby design, no. but there are really ill-advised methods around that.
04:34:31disrupteklike looking up the filename and reading it...
04:34:47madpropsdumb question but, how to i turn a string into a list of bytes?
04:34:51yumaikasAnd is that what I'd need to do to splat an object as one part of a varargs list?
04:35:33yumaikasmadprops: Do you need to turn it into a list of bytes? I think strings are already effectively seq[char]?
04:35:50madpropsbasically i want to check for nulls .. 0x00
04:35:58madpropsor whatever null is
04:36:21yumaikasMyProc(a, b, varg1, splat(obj)) is what I'd like to be able to do
04:36:42madpropsi guess null is \0
04:37:06yumaikasand/or char should be castable to some appropriate integral type
04:37:42yumaikasdisruptek: Is it possible to return multiple nodes from a macro?
04:37:50yumaikaswithout wrapping them up in a parent node?
04:54:26*yumaikas spots emit, and is intrigued
04:59:40yumaikasSo... I don't think you can write a splat() that works in the middle of a varargs list... At least from what I can see.
05:00:19yumaikasThough, writing a template that takes the other args, and then puts all of them a greater list is easy enough
05:02:45*chemist69 quit (Ping timeout: 250 seconds)
05:04:37*chemist69 joined #nim
05:08:15FromGitter<watzon> How would one go about converting an int to a big endian byte array?
05:08:36FromGitter<watzon> I found `endians.bigEndian64`, but I don't quite get how to use it
05:08:48*nsf joined #nim
05:09:48yumaikaswatzon: Mask/shift/copy?
05:11:15FromGitter<watzon> Basically I'm trying to replicate this simple Python code ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5deb34725ac7f22fb575b64e]
05:17:00yumaikaswatzon: I think you just get the bytes for that int64, and then swap them around
05:17:24FromGitter<watzon> Ahh ok, that would make sense.
05:17:39yumaikashttps://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/endians.nim#L58
05:17:53yumaikas(Well, not that specific line, but reading that source seems instructive)
05:17:59FromGitter<watzon> Is there a better way to convert an int to a byte sequence than this? ⏎ `cast[seq[byte]](integer)`
05:18:10*yumaikas checks
05:18:19yumaikasIs that even legal?
05:18:58FromGitter<watzon> Lol idk. This is my first day back to nim after almost 2 years. I'm starting to realize I don't remember crap.
05:19:48yumaikasI don't know nim. I know that C# has methods for getting the encoding of a string and the like
05:20:34yumaikasOr, rather, I don't know what Nim provides here
05:21:02FromGitter<watzon> Not much from what I've found
05:22:08yumaikasWhat's the context for what you're trying to do?
05:22:51FromGitter<yumaikas> (Trying from here, for notifications)
05:23:13FromGitter<watzon> Trying to implement the MTProto protocol
05:23:25FromGitter<watzon> Which means a lot of byte manipulation
05:24:37FromGitter<yumaikas> Indeed. At least there should be a decent amount of support for defining operators and procs here.
05:25:10FromGitter<watzon> Oh definitely
05:25:46FromGitter<watzon> Nim is an awesome language, we just seem to be missing some of the higher level features that make Python so easy to use
05:26:02FromGitter<watzon> Which is to be expected, but I thought this would be easier 😂
05:27:14FromGitter<yumaikas> Maybe something in streams? Though that will probably be pretty heavy
05:27:39FromGitter<dumjyl> cast to an `array[sizeof(T), byte]`
05:28:04shashlickUse UncheckedArray
05:28:33FromGitter<watzon> Got an example of how to do so shashlick?
05:29:24FromGitter<yumaikas> One that doesn't throw errors like this one? https://play.nim-lang.org/#ix=23KY
05:31:02FromGitter<watzon> This seems to work for the cast https://play.nim-lang.org/#ix=23KY
05:31:12FromGitter<watzon> But what about the endianness?
05:32:17FromGitter<yumaikas> When I run your link, it crashes in the playground with SIGSEGV
05:32:27FromGitter<watzon> Weird
05:33:19FromGitter<yumaikas> https://play.nim-lang.org/#ix=23KZ
05:33:28FromGitter<yumaikas> There, that should work
05:34:12FromGitter<watzon> Yeah now I just need to figure out `endians.bigEndian64`
05:34:57FromGitter<yumaikas> For the endianness, just refer to the source code for the endians module (for now, anyway)
05:36:52FromGitter<yumaikas> As long as endianess is at the byte level, rather than the nibble level, I think you can reverse the array
05:38:07FromGitter<yumaikas> That's *if* your program is compiled on a small-endian processor
05:38:25FromGitter<yumaikas> endians is designed to work with pointers, from what I can tell, not integers
05:38:27FromGitter<yumaikas> as such
05:41:49shashlickcast[UncheckedArray[byte]](xyz)
05:42:17shashlickAdvantage is that array has to be fixed size
05:42:30shashlickBut that may not work with C status
05:42:36FromGitter<yumaikas> shashlick: Why UncheckedArray, rather than just Array[]?
05:44:18FromGitter<watzon> Hmm idk, I'm giving up for tonight haha. I've been dealing with this headache for too long.
05:44:41FromGitter<yumaikas> good night.
05:44:57FromGitter<watzon> In Crystal this is super easy ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5deb3c5832df1245cbf9cef9]
05:47:26FromGitter<yumaikas> Nim is young, you could make a PR once you figure it out
05:47:31rayman22201@yumaikas: https://play.nim-lang.org/#ix=23L2
05:48:03rayman22201lets you put the splat wherever you want
05:48:32rayman22201have to hardcode the field names though. I don't like that. I need to figure out how to get untyped and typed to work together
05:49:27FromGitter<yumaikas> rayman22201: That's kinda neat, though it's from the outside. I ended up going with something less pretty
05:50:12rayman22201think of it like a function decorator from python :-P
05:50:34FromGitter<yumaikas> lol, one that's rather underpowered
05:51:22FromGitter<yumaikas> I think I'd make a template that returned a tuple, call that splat
05:51:45FromGitter<yumaikas> And then some name for the macro that flattened tuples in arg lists
05:52:05rayman22201I don't see how it's underpowered, it's macros, infinite power :-P
05:52:25FromGitter<yumaikas> I meant that macro in particular
05:52:41FromGitter<yumaikas> splat/unpack, I think is how I'd do it
05:54:03rayman22201both macros and templates have to return a single node, so that's kind of your limitation there
05:54:35FromGitter<yumaikas> Yeah, that's what I realized after staring at it all for about an hour or so
05:55:47rayman22201there is also this: https://github.com/technicallyagd/unpack
05:56:53shashlickArray cast needs a length which you might not know at compile time
05:56:56shashlickHence unchecked
05:57:28FromGitter<yumaikas> shashlick: If we're working with integral types, we should know
05:57:40FromGitter<yumaikas> rayman22201: That looks pretty cool
06:13:48shashlickSure yes
06:18:54FromDiscord<yewpad> https://play.nim-lang.org/#ix=23L5
06:30:09*endragor joined #nim
06:42:12rayman22201@yumaikas, you are probably asleep now, but I made it better. It now figures out the type automagically: https://play.nim-lang.org/#ix=23L7
06:44:02rayman22201I love writing macros. It's probably my second favorite hobby X.X
07:01:23*solitudesf joined #nim
07:01:45rayman22201Thinking about it more, with a bit more work This macro can decorate any expression. It doesn't have to be just function calls. It's not underpowered at all.
07:20:39Araqrayman22201: https://github.com/nim-lang/Nim/pull/12823 !!!
07:20:40disbotARC: cycle detector 👑11Araq
07:28:27rayman22201Christmas presents ❤️
07:31:45FromDiscord<Rika> I read recently that the rust folks are into madoka magica, so I wonder if (founder, don't wanna ping him for something unimportant) is into an anime
07:35:47Araqdoes Avatar count?
07:37:07Araqthe last air bender
07:56:01*dddddd quit (Ping timeout: 268 seconds)
07:59:06*solitudesf quit (Ping timeout: 268 seconds)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:52*gmpreussner joined #nim
08:36:00FromGitter<zacharycarter> pbr textures are going to be an interesting problem to solve for my map rendering solution
08:36:23FromGitter<zacharycarter> if I wasn't trying to support macOS this would be a lot easier
09:29:23*nif quit (Quit: ...)
09:29:33*nif joined #nim
09:30:32FromDiscord<Rika> Good enough of an answer haha
09:32:54FromDiscord<itmuckel> @Zachary Carter What are you building?
09:33:23FromGitter<zacharycarter> itmuckel: a 3d RTS game
09:33:45FromDiscord<itmuckel>
09:33:45FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/652804931870523402/pikachu.png
09:33:51FromGitter<zacharycarter> https://i.imgur.com/SC4WiAJ.mp4
09:34:01FromGitter<zacharycarter> is my map renderer at the moment
09:34:37FromDiscord<itmuckel> very nice! 👍
09:34:40FromGitter<zacharycarter> right now I'm using textures without mips that you can find on google images
09:34:41FromGitter<zacharycarter> thanks
09:34:53FromGitter<zacharycarter> I store them in a 2d texture array and sample from that in my fragment shader
09:34:59FromDiscord<Rika> macOS sucks because they're deprecating opengl for metal
09:35:11FromDiscord<itmuckel> @Rika yeah, so funny^^
09:35:13FromDiscord<Rika> Which I don't see the reason to
09:35:26FromGitter<zacharycarter> of course, if I want to support PBR materials - I'm going to have a lot more textures
09:35:59FromGitter<zacharycarter> so now I'm looking at using texture atlases for each type of texture I will have and store arrays of those
09:35:59FromDiscord<itmuckel> zachary, is there a github/gitlab-link?
09:36:09FromGitter<zacharycarter> but if they're too large, I might have to use virtual textures
09:36:28FromGitter<zacharycarter> sure: https://github.com/zacharycarter/zeal
09:36:36FromGitter<zacharycarter> I'm using bgfx so on macos I'll be using metal
09:36:50FromGitter<zacharycarter> this wouldn't be a problem if I just didn't want to target macos - but then I'd just use OpenGL and bindless textures
09:53:42FromGitter<kayabaNerve> Anyone here know how to resolve a "conflicting types" GCC error when working with Nim's FFI? ⏎ ` 62 | N_NIMCALL(void, BIG_384_58_rcopy)(BIG_384_58 x, BIG_384_58 y);` ⏎ ` 159 | extern void BIG_384_58_rcopy(BIG_384_58 x,const BIG_384_58 y);` ⏎ AFAICT the only difference is one is const. [https://gitter.im/nim-lang/Nim?at=5deb76a5d75ad3721d6ca28e]
09:53:55FromGitter<kayabaNerve> I also have no idea how to get Nim to use use a const signature.
09:54:11FromGitter<kayabaNerve> I also thought const didn't matter as it generally doesn't when calling.
09:57:11FromGitter<kayabaNerve> Eh. Declaring a new type and writing const X in the importc section worked. Just annoying as the two types register as different.
10:01:03ZevvIS there a stdlib function to convert a hslice to a seq? 5..9 -> @[5, 6, 7, 8, 9] ?
10:03:24Zevvoh, toSeq :)
10:05:17*thomasross_ joined #nim
10:05:17*thomasross is now known as Guest50801
10:05:17*thomasross_ is now known as thomasross
10:07:23*Guest50801 quit (Ping timeout: 250 seconds)
10:08:09FromGitter<zacharycarter> wtfffff
10:08:09FromGitter<zacharycarter> https://play.nim-lang.org/#ix=23Lz
10:10:01FromGitter<zacharycarter> windows is doing weird shit I feel like
10:13:17FromGitter<zacharycarter> copied values from calculator into vscode and Nim compiler goes bonkers :P
10:18:38lqdev[m]@zacharycarter time to start using GNU calc ;)
10:23:27*nc-x joined #nim
10:23:29nc-x@zacharycarter https://github.com/microsoft/calculator/issues/504
10:23:30disbotCopy paste result contains hidden character @11Cerlancism
10:25:54*nc-x quit (Remote host closed the connection)
10:39:10FromGitter<zacharycarter> lol wonderful
11:13:39*endragor quit (Remote host closed the connection)
11:22:03*endragor joined #nim
11:22:55*Trustable joined #nim
11:24:43*dwdv joined #nim
11:26:15*endragor quit (Ping timeout: 250 seconds)
11:31:45Araqyay only 4 test failures, pretty good
11:33:32*lritter joined #nim
11:35:25FromDiscord<Rika> Why even use calculator if there's repl
11:35:42FromDiscord<Rika> (doesn't have to be nim repl; after all, it's just calculations)
11:40:42*vivus joined #nim
11:41:56*solitudesf joined #nim
11:43:42*nif quit (Quit: ...)
11:43:51*nif joined #nim
11:52:06madpropswondering if there's a way to avoid using the 'var's here https://play.nim-lang.org/#ix=23LT
11:52:18madpropslike making the stuff inside 'try' part of the outer scope
11:52:22madpropsthough maybe that's not a good idea
11:57:55AraqI think it's impossible but I feel your pain ;-)
11:58:27madpropsprobably not impossible, but maybe not advisable
11:58:46madpropsbtw, is it actually possible to have some sort of flag to know it's the last iteration of a loop?
11:58:58madpropsif last: do_stuff() something like that
11:59:00madpropsthat would be awesome
11:59:07madpropsright now only way is comparing the index
12:03:30AraqI usually use
12:03:41Araq if i > 0: s.add(separator)
12:03:58Araqas the first iteration is easier to detect than the last
12:04:12Araqbut neither first nor last iterations have any shortcuts
12:09:14madpropsguessing that would be too much overhead
12:12:06Araqit's more a problem like "I have no clue how to implement it"
12:12:41Araqfirst iteration is easy, but how the heck do we know in general that it'll be the "last" iteration?
12:13:33madpropsno idea. the compiler is like magic to me
12:14:49Zevvthere actually *is* magic in the compiler!
12:18:36FromDiscord<Rika> Magic pragma lmao
12:19:13FromDiscord<Rika> Pragmas are still a mystery to me because the docs for it are scattered around from my experience
12:19:16FromDiscord<Rika> Maybe I'm just dumb
12:22:49*BitPuffin quit (Quit: killed)
12:22:52*macsek1911[m] quit (Quit: killed)
12:22:53*shashlick[m] quit (Quit: killed)
12:22:54*LEdoian[m] quit (Quit: killed)
12:22:54*meff[m] quit (Quit: killed)
12:23:02*nergal[m]1 quit (Quit: killed)
12:23:02*isaac[m]1 quit (Quit: killed)
12:23:06*zacharycarter[m] quit (Quit: killed)
12:23:06*TheManiac[m] quit (Quit: killed)
12:23:08*Demos[m] quit (Quit: killed)
12:23:09*GitterIntegratio quit (Quit: killed)
12:23:09*lqdev[m] quit (Quit: killed)
12:23:13*pigmej quit (Quit: killed)
12:23:17*planetis[m] quit (Quit: killed)
12:23:17*skrylar[m] quit (Quit: killed)
12:23:17*salotz[m] quit (Quit: killed)
12:23:19*xomachine[m] quit (Quit: killed)
12:23:20*lasso[m] quit (Write error: Connection reset by peer)
12:23:20*Connor[m] quit (Write error: Connection reset by peer)
12:23:20*Mike[m]2 quit (Write error: Connection reset by peer)
12:23:22*Balu[m] quit (Quit: killed)
12:23:22*Miguelngel[m] quit (Quit: killed)
12:23:22*Manny8888 quit (Quit: killed)
12:23:24*nc-x[m] quit (Quit: killed)
12:23:24*yglukhov[m] quit (Quit: killed)
12:23:24*spymasterd[m] quit (Quit: killed)
12:29:45FromDiscord<mratsim> @Rika Puella Magicka Madoka was really nice 🙂
12:30:09FromDiscord<yewpad> Yeah, Pragmas really could use better docs
12:32:14FromDiscord<mratsim> so how does cycle detection work @Araq? Are you painting GC-ed types in different colors and collecting them when you have a rainbow? https://github.com/nim-lang/Nim/pull/12823/files#diff-6ad8f4cae76b10fd19f3d9bddb5a4035R39-R41
12:32:16disbotARC: cycle detector 👑11Araq
12:32:50FromDiscord<mratsim> ah, found the paper: https://pdfs.semanticscholar.org/f2b2/0d168acf38ff86305809a55ef2c5d6ebc787.pdf
12:33:45FromDiscord<mratsim> I'm curious, what does Swift use?
12:36:08FromDiscord<mratsim> seems like Swift pushed the problem on the dev
12:48:30FromDiscord<itmuckel> Hey guys! Is there an iterator where I can take the address of the items?
12:48:30FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/652853940299497473/unknown.png
12:51:23solitudesfmitems
12:51:27FromDiscord<exelotl> ^
12:56:28FromDiscord<itmuckel> Nice, thx!
12:58:34FromDiscord<itmuckel> Now how do I get the address of the thing I just added? 🤔
12:58:34FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/652856475760459810/unknown.png
12:59:30FromDiscord<Rika> Do you need the address
12:59:35FromDiscord<Rika> Or do you just want to change the item
12:59:44FromDiscord<Rika> mitems stands for mutable items
12:59:57FromDiscord<Rika> You can change the yielded item itself
13:00:26FromDiscord<Rika> Does it have to be a pointer too? Can you make it a reference
13:00:46FromDiscord<Rika> Maybe that last message is pushing it already
13:00:59*nergal[m]1 joined #nim
13:00:59*lqdev[m] joined #nim
13:00:59*Demos[m] joined #nim
13:01:00*isaac[m]1 joined #nim
13:01:00*leorize[m] joined #nim
13:01:00*k0mpjut0r joined #nim
13:01:00*GitterIntegratio joined #nim
13:01:01*BitPuffin joined #nim
13:01:06*meff[m] joined #nim
13:01:06*pigmej joined #nim
13:01:06*zacharycarter[m] joined #nim
13:01:06*spymasterd[m] joined #nim
13:01:06*salotz[m] joined #nim
13:01:06*lasso[m] joined #nim
13:01:06*LEdoian[m] joined #nim
13:01:06*zielmicha[m]1 joined #nim
13:01:07*Manny8888 joined #nim
13:01:07*skrylar[m] joined #nim
13:01:07*nc-x[m] joined #nim
13:01:07*shashlick[m] joined #nim
13:01:07*joachimschmidt55 joined #nim
13:01:07*Mike[m]2 joined #nim
13:01:07*Connor[m] joined #nim
13:01:07*planetis[m] joined #nim
13:01:07*macsek1911[m] joined #nim
13:01:07*xomachine[m] joined #nim
13:01:07*Balu[m] joined #nim
13:01:07*TheManiac[m] joined #nim
13:01:07*yglukhov[m] joined #nim
13:01:07*Miguelngel[m] joined #nim
13:01:08*d-nice2[m] joined #nim
13:01:09*thomasross quit (Ping timeout: 250 seconds)
13:01:25Yardanicomatrix<->freenode bridge still sometimes goes down and up? lol
13:01:44FromDiscord<itmuckel> Well I have a Model that I want to store the textures and multiple Meshes that reference these textures, so I don't store the same texture multiple times.
13:01:44FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/652857260887769098/unknown.png
13:02:07Yardanico@itmuckel why are you using ptr Texture?
13:02:16Yardanicoyou should really only use `ptr` when using FFI
13:02:18Yardanicothere's `ref` in Nim
13:02:22FromDiscord<Rika> Yeah
13:02:30FromDiscord<Rika> Was gonna ask are you interfacing with C
13:02:47Yardanicowell he's obviously using OpenGL judging by the code
13:02:47FromDiscord<itmuckel> I do, but not in this section of my code^^
13:03:16FromDiscord<Rika> Remake OpenGL in nim :)
13:04:25Yardanico@itmuckel so you don't really need `ptr` here, do you? :P
13:05:09Yardanicoyou can also make your Texture a `ref object` so it will always be a reference to an object without specifying it elsewhere
13:05:14*thomasross joined #nim
13:05:35FromDiscord<Rika> Oh yeah Yardanico how did you make test cases for your osu replay parser
13:05:48FromDiscord<Rika> I'm having difficulty making test cases for my code
13:07:51Yardanico@Rika I just test on one cookiezi's 817pp play and comparing the fields
13:08:01Yardanicohttps://github.com/Yardanico/nim-osureplay/blob/master/tests/tester.nim I'm using Nim's stdlib unittest module
13:08:35FromDiscord<Rika> So only an integration test...
13:08:38FromDiscord<Rika> Damn
13:08:42Yardanicoyeah, nothing serious :P
13:08:50FromDiscord<itmuckel> @Yardanico Uhm, okay, so now I made my Texture a `ref object`. What are the implications? When I assign it to another Texture no copy is made, but the other Texture points to the same Texture, right?
13:08:54FromDiscord<Rika> I need unit tests ;;
13:09:04FromDiscord<Rika> Yeah itmuckel
13:09:20FromDiscord<Rika> I like to think that refs are heap pointers (idk if it's correct)
13:09:26FromDiscord<itmuckel> Nice, exactly what I needed. 👍
13:09:27FromDiscord<Rika> And that assigning is always copy
13:09:42FromDiscord<Rika> So it copies the heap pointer
13:09:48FromDiscord<Rika> That's my idea at leadt
13:09:51FromDiscord<Rika> It works for me
13:09:57FromDiscord<Rika> Idk if it's correct though
13:10:05FromDiscord<Rika> Would like corrections if needed
13:10:18FromDiscord<itmuckel> I think that they resemble Java Objects. They live on the heap and if nothing points to them anymore, then they get garbage collected.
13:10:32FromDiscord<exelotl> should it be possible to do something like this? `for filePath in walkFiles(root/"fonts"/"*.c|h"):`
13:10:47FromDiscord<Rika> It looks correct to me
13:10:56FromDiscord<Rika> Wait
13:11:07FromDiscord<Rika> The | character is an or?
13:11:11FromDiscord<Rika> Hmm
13:11:14FromDiscord<Rika> Don't think so
13:11:29Yardanico@exelotl from the docs: "On POSIX this uses the glob call. pattern is OS dependent, but at least the "*.ext" notation is supported."
13:11:41Yardanicoso if you're using it for linux then you can just use glob's patterns I guess
13:11:58FromDiscord<Rika> Won't be portable tho
13:12:06FromDiscord<exelotl> oh yeah I read that, but I'm on windows and I don't know what's supported there x)
13:12:21FromDiscord<Rika> Maybe just use an if inside the loop
13:12:59Yardanicohttps://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/os.nim#L1735 that's what windows implementation uses
13:13:58FromDiscord<Rika> Almost made the mistake opening github on mobile again
13:14:18*vivus quit (Quit: Leaving)
13:16:12FromDiscord<exelotl> oh yeah tbh the directory only contains c and h files so I guess I'm fine anyways
13:16:48*vivus joined #nim
13:30:08lqdev[m]@Rika change your browser.
13:30:22lqdev[m]github mobile only lags on chrome.
13:30:53FromGitter<auxym> Hm, I have a `func` that does nothing but call another `func`. `func1` compiles fine, then `func2` says it has side effects. Does this sound like a compiler bug?
13:31:42Yardanicocan you show the code?
13:32:09Yardanicomaybe func2 has side effecst?
13:32:13Yardanico*effects
13:34:04FromDiscord<Rika> lqdev see I would but I already have uh
13:34:09FromDiscord<Rika> Maybe 200 tabs in chrome
13:34:14FromDiscord<Rika> That would be a pain to move
13:34:22FromDiscord<Rika> Though I use Firefox on my pc
13:34:37FromDiscord<Rika> (I uh have a tab obsession I guess)
13:35:19FromDiscord<Rika> Auxym, does func2 return the same type as func1
13:35:37FromDiscord<Rika> Assuming 2 is the one inside 1
13:36:29FromGitter<auxym> I'll try to put together a minimal example
13:36:38FromGitter<auxym> working on today's aoc :o
13:38:23*rockcavera joined #nim
13:39:22FromGitter<auxym> welp, forget that: I was reading a global from `func2`. moar coffee required.
13:42:19*njoseph quit (Ping timeout: 250 seconds)
13:44:05*njoseph joined #nim
13:54:47*thomasross_ joined #nim
13:54:47*thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services)))
13:54:47*thomasross_ is now known as thomasross
13:59:22*clyybber joined #nim
14:05:38*nixfreak joined #nim
14:11:58disruptekwhat's shakin', nimions?
14:12:15disruptekneed some good news today.
14:18:16livcdresting on this day
14:18:31livcdjust trying to make old nim and old sciter bindings to work
14:22:51FromGitter<kayabaNerve> I'm replacing a bad library with a not-bad library.
14:24:57disruptekoh?
14:25:38disrupteklink?
14:28:01*tane joined #nim
14:30:51*thomasross quit (Ping timeout: 250 seconds)
14:36:56*thomasross joined #nim
14:46:07FromGitter<kayabaNerve> disruptek: To the bad library or the not so bar library? :P
14:46:19disruptekyes. 😛
14:46:27*Trustable quit (Remote host closed the connection)
14:46:50FromGitter<kayabaNerve> Lol. The library isn't bad. It just has a lot of design choices I disagree with and I'm not happy with the developer's speed towards resolving issues.
14:47:19FromGitter<kayabaNerve> You can't use it in Nim without patching. Why? They made the constructors private. Because of that, you can't declare `TYPE x;`, like Nim does.
14:47:39disruptekoi.
14:47:42FromGitter<kayabaNerve> So I'm using it with pointers, total mem leak, but it requires a patch to work properly with pointers.
14:47:56FromGitter<kayabaNerve> https://github.com/chia-network/bls-signatures
14:48:10disruptekhow is private a thing we need to worry about?
14:48:33FromGitter<kayabaNerve> I don't blame them at all to be clear. They've made certain design decisions for their flow for a library used in their work. I respect that. I just can't use them :P
14:48:47disruptekyeah, i get it.
14:49:09FromGitter<kayabaNerve> Nim declares variables in certain circumstances as `TYPE x;`, waiting to do the initialization till later
14:49:28FromGitter<kayabaNerve> That calls the constructor in C++.
14:49:55FromGitter<kayabaNerve> If you don't want to call the constructor, you need to make it a pointer. Then when you have the pointer version, you can do your work, except their library doesn't support pointered classes.
14:50:15disrupteki'm just thinking... maybe we can unprivatize stuff.
14:50:24FromGitter<kayabaNerve> I literally have a patch file in my Nim repo so it works with Nim. Pretty sure said patch is another mem leak so I never submitted it pack.
14:50:40FromGitter<kayabaNerve> Multiple users have commented. Nothing's changed. They have their flow
14:51:03FromGitter<kayabaNerve> I'm moving to a different library called Milagro from Apache. Not as friendly, much better overall.
14:51:09disruptektheir library doesn't support pointered classes?
14:51:46FromGitter<kayabaNerve> Nah, something about the zeroed memory I'd guess. You need to add a line to recreate one of the fields to the... Clear? function
14:51:53FromGitter<kayabaNerve> I think that's what they called it.
14:52:27FromGitter<kayabaNerve> Sorry, you have to add it to the assignment operator.
14:52:36FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5debbcb326eeb8518f808a0a]
14:52:59disruptekare you saying that they require zero'd memory?
14:53:08disruptek'cause it sounds like you're saying the opposite.
14:53:25FromGitter<kayabaNerve> No, I'm saying that there's a difference between a malloc'd class instance and one of their class instances and I have no idea what it is.
14:53:54disruptekah. and you can't do the alloc yourself.
14:53:58FromGitter<kayabaNerve> *alloc'd. Wasn't there a whole discussion about alloc != malloc in Nim?
14:54:21FromGitter<kayabaNerve> My only assumption is because the alloc returns 0'd memory (I at least use alloc0), that must be causing the problem.
14:54:39FromGitter<kayabaNerve> And because they don't actually provide a way to recover AFAICT... patch file it is
14:54:48FromGitter<kayabaNerve> I also have never successfully built it on Windows.
14:54:59disrupteki saw some partial-object-nonzero'd patch go through recently.
14:55:08FromGitter<kayabaNerve> Wait, nope, I did one time. I just couldn't link it after I built it and verify I built it into an usable lib.
14:55:10disruptekso i know some prior-0 is now -unzero.
14:55:54disruptekbut i feel like there's probably an easy way around this.
14:56:03FromGitter<kayabaNerve> Patch file?
14:56:13disrupteklike use their alloc in your own nim memory region, or something.
14:56:32FromGitter<kayabaNerve> There's also other reasons I'm ditching the lib to be clear
14:56:52disruptekright, water under the bridge. 😊
14:57:08FromGitter<kayabaNerve> A/B can be used interchangably for X/Y. They use A for X and B for Y. I want to use A for Y and B for X.
14:57:28FromGitter<kayabaNerve> I trust Apache more than I trust them. Apache also offers their lib in multiple other languages.
14:57:45FromGitter<kayabaNerve> Speed concerns...
14:58:08disruptekright, so that helps fix bugs.
14:58:28FromGitter<kayabaNerve> So what are you up to?
14:58:47disrupteki might implement a Never operator in nimph.
14:59:03disrupteklike version != 1.2.3
14:59:53FromGitter<kayabaNerve> Sounds interesting.
14:59:56*Vladar joined #nim
15:00:05disrupteki'm still learning how to use linked C stuff with varied memory patterns.
15:00:21disruptekdon't feel like i have a good pattern yet.
15:00:30FromGitter<kayabaNerve> GL
15:00:54disrupteki wanna try using the effects system to hint.
15:01:30FromGitter<kayabaNerve> I don't think I've ever seen anyone do a custom effect
15:01:42FromGitter<kayabaNerve> I've debated doing them to mark my FFI functions.
15:02:07disrupteki didn't mess with them because raises[] was an early bane of my existence.
15:02:25*kungtotte quit (Quit: WeeChat 2.6)
15:02:28disruptekbut it's really an orthogonal problem.
15:02:31FromGitter<kayabaNerve> I actually love raises lol
15:02:55disruptekyeah, i think we talked about the problems with it before. didn't you write a macro to fix it?
15:03:11*vivus quit (Quit: Leaving)
15:03:23FromGitter<kayabaNerve> A macro where every function must compile with a blank raises if all the raise stmts are commented :P It stops bubble up.
15:03:34disrupteki just don't want to have to support core language features myself; that feels like a dangerous recipe for disaster.
15:04:17*thomasross_ joined #nim
15:04:17*thomasross is now known as Guest71747
15:04:17*thomasross_ is now known as thomasross
15:04:20FromGitter<kayabaNerve> That said, I plan on moving to a Result system that offers the same syntax of Exceptions. I love saying raises/try/except but I have way too many `except Exception` thanks to async. With Result, I could use enums and have Nim's switch force every case be covered. Nothing would drop out of my sight thanks to Exception blindly catching everything...
15:04:45FromGitter<kayabaNerve> ... ngl, that does.
15:05:03FromGitter<kayabaNerve> You can always ship a set of patch files with your Nim work!
15:05:03disrupteki love case. use a ton of enum stuff, ranges, etc.
15:05:23FromGitter<kayabaNerve> *From experience, I can confirm that's a bad idea*
15:05:50FromGitter<kayabaNerve> Nim's forced handling of ordinals really lines up with my goals.
15:05:57disruptekyeah.
15:06:04FromGitter<kayabaNerve> That said, there's a lot of problems.
15:06:21disruptekbut exceptions... just not what i'm after.
15:06:23*Guest71747 quit (Ping timeout: 250 seconds)
15:06:36disrupteki want exceptions to be exceptional.
15:06:41FromGitter<kayabaNerve> If you want one try catch to cover multiple statements which have different enums, or you want short circuiting (if x and y where if not x, y is not run)
15:07:23disruptekyou can use `of {A, B}:` in case.
15:07:32disruptekalso just `of A, B:`
15:07:32FromGitter<kayabaNerve> TIL
15:07:38FromGitter<kayabaNerve> That one I new of
15:07:44disruptekbut the sets make things more interesting.
15:07:45FromGitter<kayabaNerve> *knew, sorry
15:07:54FromGitter<kayabaNerve> I'll send you the link to my next iteration of ForceCheck when I do it if you want ;)
15:08:07disrupteki have it starred in gist. 👍
15:11:08FromGitter<kayabaNerve> To think I'd end up siding with arnetheduck after disagreeing so much with him in the past.
15:12:12disrupteki usually agree with him. 😝
15:12:25disruptekhe's pretty practical.
15:16:09*nsf quit (Quit: WeeChat 2.6)
15:21:15FromGitter<kayabaNerve> I think my main issue was when I said I wanted an Exception thing and his solution was not use Exceptions
15:21:31FromGitter<kayabaNerve> *don't use. Typos -_-
15:21:59FromGitter<kayabaNerve> Even now, I still want Exceptions (try/catch). I just want it to actually be results pretending to be exceptions.
15:22:03disruptekwell, yeah. but, i agree that they are rarely the right tool.
15:22:16disrupteksee, i think that's wrong-headed.
15:22:40FromGitter<kayabaNerve> I think my main issue with raw results would be their verbosity.
15:22:48FromGitter<kayabaNerve> A switch around every statement?
15:22:59disrupteksure?
15:23:20FromGitter<kayabaNerve> Eh. Seems very verbose.
15:23:22disruptekdo you like the way go does it?
15:23:37FromGitter<kayabaNerve> I think right now I average one try/except per 8 lines of code right now.
15:23:49FromGitter<kayabaNerve> Probably raise two types of exceptions on averager
15:24:03disruptekyou're bananas.
15:24:15clyybberquirky excpetions are kinda like results pretending to be exceptions
15:24:21clyybberthey behave in the same way
15:24:34disruptekmost of my exceptions are Defects 😁
15:24:51disruptekyeah, quirky i like. i just think it should be default.
15:24:58FromGitter<kayabaNerve> clybber: Yeah, I actually really liked quirky exceptions. Didn't they not actually do anything though?
15:25:05FromGitter<kayabaNerve> Like you had to manually call return?
15:25:07disruptekotherwise, it's not clear how to share code.
15:25:29FromGitter<kayabaNerve> I've commented before quirky + X would be perfect, and I think X was automatically return.
15:25:30clyybberkayabaNerve: Exactly, they don't disrupt control flow. You have to manually return
15:25:44FromGitter<kayabaNerve> Side note, I've never looked into Go's exceptions.
15:25:52FromGitter<kayabaNerve> So then there's no point in having them IMO
15:25:58FromGitter<kayabaNerve> Exceptions are meant to be flow breaking
15:26:00lqdev[m]@kayabaNerve: because they don't exist. lol
15:26:21disruptekyou would like go, i think.
15:26:29lqdev[m]go uses it's idio~~ma~~tic `if x != nil {}`
15:26:40*nif quit (Quit: ...)
15:26:42FromGitter<kayabaNerve> I hate Go from what I seen
15:26:50*nif joined #nim
15:26:51disruptekaraq threatened to make quirky default. maybe we need to start a petition. 😀
15:26:51FromGitter<kayabaNerve> Their function definitions are ultra verbose, especially class methods.
15:26:59FromGitter<kayabaNerve> I also hate brackets without parentheses.
15:27:04FromGitter<kayabaNerve> if (x) {} tyvm
15:27:19lqdev[m]@kayabaNerve but, you can add these brackets
15:27:23FromGitter<kayabaNerve> If it still controlled flow, I don't think I'd have an issue with it.
15:27:30FromGitter<kayabaNerve> lqdev[m]: Add the parentheses, right.
15:27:31lqdev[m]s/brackets/parens
15:27:44FromGitter<kayabaNerve> I can't yell at other developers to use parens though :(
15:27:51lqdev[m]one thing I dislike with go is `:=`
15:27:52FromGitter<kayabaNerve> ... well I technically can
15:27:59lqdev[m]what dumbass came up with this syntac
15:28:02lqdev[m]s/syntac/syntax
15:28:17lqdev[m]it's like python's implicit declaration, but 100x worse
15:28:27clyybberlqdev[m]: No, its simply inspired by mathematics
15:28:39FromDiscord<onelivesleft> How come I'm getting a million warnings when I compile when I have `verbosity:0 hints:off`: "Warning: Potential object case transition, instantiate new object instead [CaseTransition]"
15:28:40clyybberIt would actually make sense in nim too
15:28:44lqdev[m]clyybber: but go isn't a functional language
15:28:47FromDiscord<onelivesleft> this is in a fork of the devel branch
15:29:03FromGitter<kayabaNerve> I also support var blocks.
15:29:20Yardanico@onelivesleft --warnings:off ?
15:29:25clyybberlqdev[m]: Its like typing `var i: int = 0` but leaving out the type
15:29:36FromGitter<kayabaNerve> `var i = 0`?
15:29:43lqdev[m]clyybber: the type and var
15:29:52FromGitter<kayabaNerve> :P
15:29:57FromDiscord<onelivesleft> bingo, ty
15:30:21clyybberlqdev[m]: every language is functional, its all monads :p
15:30:22lqdev[m]well, I guess this is just my preference. I'm a Nim fanatic ever since I learned about it last year :P
15:30:28clyybber(im kidding, but it is)
15:30:34FromGitter<kayabaNerve> Honestly, I'd like Nim much more if it was bracketed instead of indented (and used parentheses for if statements since `if x {` is quite jarring IMO).
15:30:36lqdev[m]anyways, back to work
15:30:53clyybberkayabaNerve: use ()
15:30:54FromGitter<kayabaNerve> I've entered a love/hate relationship with Nim.
15:31:09FromGitter<kayabaNerve> If I could go back in time, I probably would not use it like I have.
15:31:11clyybberI would hate if nim were bracketed :)
15:31:28FromGitter<kayabaNerve> Yeah, that'd make it KayabaLang, not Nim
15:31:54clyybberkayabaNerve: But you can use () to nest stuff
15:32:31FromGitter<kayabaNerve> So my codebase is just over 20k lines of Nim code right now. I have another 5k lines of Python.
15:32:44*nif quit (Quit: ...)
15:32:54*nif joined #nim
15:33:24FromGitter<kayabaNerve> I would've quit a long time ago if it wasn't in Nim, so I wouldn't tell myself to not use Nim. That said, over my year and a half of using it full times, I've found so many bugs it's been... annoying/frustrating/disappointing...
15:33:31clyybberkayabaNerve: I mean nothing is preventing you from writing if(x == 3): (let y = x; echo y)
15:33:40FromGitter<kayabaNerve> It's gotten way better over time, but 0.20 introduced a ton of regressions IIRC which was a pain.
15:33:53FromGitter<kayabaNerve> I'm also disappointed Nim isn't following semantic versioning from now on but eh.
15:34:04FromGitter<kayabaNerve> I probably won't use Nim on a project this big for another 5 years.
15:34:40FromGitter<kayabaNerve> And yes, I fully understand I can add parentheses when languages don't require them and use `if x: ()` in Nim. That wasn't my point :P
15:35:06clyybberwhat was the point then?
15:35:24clyybberI like the fact that nim doesn't force you to do stuff
15:35:29clyybberlike adding paranthees
15:35:33FromGitter<kayabaNerve> That I prefer non-identation based languages
15:35:45FromGitter<kayabaNerve> It does force you to use indentation :P
15:35:53FromGitter<kayabaNerve> *indentation, typo in that first one
15:36:14FromGitter<kayabaNerve> It's not about brackets. It's about brackets instead of indentation.
15:36:21clyybberAh
15:36:32clyybberkayabaNerve: You could use a source code filter
15:36:32FromGitter<kayabaNerve> And parentheses with brackets because brackets alone is jarring 0_o
15:36:41FromGitter<kayabaNerve> That one is literally about brackets, I concede
15:36:49FromGitter<kayabaNerve> Aren't those being removed?
15:36:54clyybberno?
15:37:03FromGitter<kayabaNerve> I think Araq said three versions ago he wanted to remove them at least
15:37:38FromGitter<kayabaNerve> The only time I've ever seriously been interested in using one is to try file wide macros. Since the SCF parses line by line though, it can't be done.
15:37:56clyybberHmm, even if they get removed you could replace them with a bash script
15:38:02FromGitter<kayabaNerve> (I tried to replace \r\n with \r\n\t or something; not actually \t ofc)
15:38:13FromGitter<kayabaNerve> I know I can build a language which compiles to Nim :P
15:38:34FromGitter<kayabaNerve> I'm not that invested. I meant it as an off comment, not something for continued discussion.
15:39:06FromGitter<kayabaNerve> I was interested in continued discussion on quirky exceptions, which we already kinda had, and Nim in large code bases though :thinking:
15:39:08clyybberHeh, I actually want to try to make a regex that does that
15:39:36*sealmove joined #nim
15:39:49clyybberkayabaNerve: You can try quirky excpetions rn
15:39:51FromGitter<kayabaNerve> I've learned some basic regexes over the past few weeks to speed up my F+Rs. It's been nice.
15:39:57disruptekclyybber: why don't you take over my literate pr?
15:40:06FromGitter<kayabaNerve> Yeah, but I expect exceptions to control flow.
15:40:16FromGitter<kayabaNerve> Exceptions which don't aren't exceptions IMO.
15:40:30disruptek!pull author:disruptek literate
15:40:32disbothttps://github.com/nim-lang/Nim/pull/11848 -- 3write markdown amidst nim via a source code filter 🧚11disruptek
15:40:37FromGitter<kayabaNerve> I could replace every instance of raise with qRaise and have that raise + return though.
15:40:45clyybberyeah
15:40:52FromGitter<kayabaNerve> That's a nice bot
15:41:09clyybberdisruptek: I don't entirely understand the purpose
15:41:22clyybberAh
15:41:30FromGitter<kayabaNerve> Didn't someone do this with a blog post on Haskell?
15:41:41FromGitter<kayabaNerve> It was entertaining but I've never seen any point other than said entertainment
15:42:15disruptekclyybber: https://cl.ly/LxEu
15:42:27disrupteki first saw it done well in coffeescript.
15:42:31clyybberAh, thanks
15:42:49FromGitter<kayabaNerve> Anyone here know of that blog post? Bit hard to search for it with generic terms :P
15:42:54clyybberwould really put me off with indentation :p
15:42:57disrupteknot a great demo, since the whole idea is that it's markdown.
15:43:14disruptekhttps://gist.github.com/jashkenas/3fc3c1a8b1009c00d9df
15:43:43disrupteki don't know the haskell post, no.
15:44:12FromGitter<kayabaNerve> I'm not sure it was Haskell. Some old language though
15:44:13clyybberTBH I don't particularily like source code filters either
15:44:23clyybberI don't think its the compilers job to do stuff like that
15:44:33*joachimschmidt55 quit (Quit: User has been idle for 30+ days.)
15:44:42disruptekwho should do it, then?
15:44:51clyybberExternal programs
15:45:08disruptekyes, but how do you propose it work?
15:45:12clyybberIn the sense that you write the markdown in comments
15:45:38clyybberdisruptek: cat code | externalmagicprogram | markdownreader/firefox
15:46:01clyybberdisruptek: Or if you want to write like that
15:46:14clyybbercat code | externalmagicprogram | nim c /dev/stdin
15:46:24FromGitter<kayabaNerve> `externalmagicprogram` I'd run this with sudo if you sent me an executable. It has a very trustworthy name.
15:46:36disruptekbe right there!
15:47:31FromGitter<kayabaNerve> I think I have a backup somewhere
15:47:52clyybberrm -rf shuf -n1 /*
15:48:18*sagax quit (Read error: Connection reset by peer)
15:48:56FromGitter<kayabaNerve> What does shuf do?
15:49:09disruptekrandomizes input
15:49:18FromGitter<kayabaNerve> Fun
15:49:36disrupteknot a viable command, but i get the idea.
15:50:00*shashlick[m] quit (Quit: User has been idle for 30+ days.)
15:50:10FromDiscord<yewpad> It's not possible to do the cross-target thingy in Nim like you do in Go with "xxx_win.go", "xxx_linux.go" and "xxx_mac.go" right?
15:50:16FromGitter<kayabaNerve> GitHub doesn't count my Markdown in my repository's language thingy :( Disappointing.
15:50:26disruptekyewpad: right
15:50:29FromGitter<kayabaNerve> You just need a C cross compiler.
15:51:14FromDiscord<yewpad> What a bummer. I really like this way of doing per-platform stuff. All those `when defined` statements get clumsy overtime
15:51:26FromGitter<kayabaNerve> The way you're asking makes me think Go has a very easy way to do cross compilation. Nim doesn't. That said, you can build Nim executables from any platform for any platform like you can C.
15:51:43clyybber`tail -f /dev/sda /dev/urandom > /dev/sda` to sprinkle a bit of surprise into life
15:51:54solitudesfyou like file clutter over couple whens?
15:52:22FromGitter<kayabaNerve> Do you know how long it took me to get this Desktop fixed?
15:52:31FromDiscord<yewpad> I wouldn't particularly say it is file clutter. Just a !another! way of structuring per-platform code
15:52:39FromGitter<kayabaNerve> I have so many cursed stories involving it that makes you question all of life's sanity.
15:52:39clyybberyewpad: nothing is stopping you
15:52:58FromDiscord<yewpad> clyybber: yewpad: nothing is stopping you
15:52:59FromDiscord<yewpad> ?
15:53:01clyybberyewpad `when windows: import xxx_win else: import xxx_unix
15:53:02solitudesfno one stopping you from making xxx.nim with conditional imports
15:53:09FromGitter<kayabaNerve> clybber: include
15:53:14FromDiscord<yewpad> oh
15:53:20FromDiscord<yewpad> i forgot about conditional imports
15:53:20FromDiscord<yewpad> omg
15:53:28FromGitter<kayabaNerve> Eh. import could work but if you want full symbol inclusion do include.
15:53:40FromGitter<kayabaNerve> If you only care about public symbols, do import.
15:54:03*sagax joined #nim
16:02:25FromDiscord<mratsim> @yewpad, Nim handles platform specific stuff in a much cleaner way than C I think
16:02:47FromDiscord<mratsim> especially the fact that you don't have to do a weird raindance to be able to use multilines #define
16:05:36FromDiscord<Rika> will `import exclude` allow me to override procs
16:05:41FromDiscord<Rika> and is there a better way\
16:07:00FromDiscord<mratsim> myNiftyModule.myProcNameThatIsNotUnique(x, y)
16:07:38FromDiscord<mratsim> or from myNiftyModule import myProcNameThatIsNotUnique as theRealProc
16:07:56FromDiscord<yewpad> `$int(floor(extractedFiles * 100 / discoveredFiles))` can this be optimized? this doesn't feel right
16:08:31FromDiscord<mratsim> you can remode the int and the floor if you just use div
16:08:49FromDiscord<mratsim> assuming your number of extracted files and discovered files are positive integers
16:08:55FromDiscord<yewpad> they are
16:09:13FromDiscord<mratsim> then `extractedFiles * 100 div discoveredFiles`
16:09:36FromDiscord<yewpad> genius!
16:09:37FromDiscord<yewpad> thanks
16:10:02FromDiscord<Rika> how can files go negative xd
16:10:11FromDiscord<mratsim> I was thinking of fractional 😉
16:10:11FromDiscord<yewpad> xD
16:12:17disrupteki've known some pretty ill-tempered files.
16:12:35disruptekthey can definitely go negative when pushed.
16:12:57FromDiscord<Rika> thats some funky file system
16:13:25disruptekbarely escaped with my life, fo' real.
16:17:46*uu91 quit (Remote host closed the connection)
16:19:50*Hideki_ joined #nim
16:33:06*dddddd joined #nim
16:42:05lqdev[m]https://play.nim-lang.org/#ix=23Oi
16:42:22lqdev[m]why do I not get a nnkClosedSymChoice for `$`?
16:43:18lqdev[m]I get one for system.add, though
16:44:56FromGitter<auxym> hey, anyone want to have a quick look at this one? https://play.nim-lang.org/#ix=23Oj
16:45:10FromGitter<auxym> `Error: unhandled exception: int128.nim(72, 11) `arg.sdata(2) == 0` out of range [AssertionError]`
16:45:49Araqauxym: fixed on devel, I hope
16:46:23lqdev[m]auxym: https://play.nim-lang.org/#ix=23Ok
16:46:38FromGitter<auxym> @Araq oh neat, I'll try it out. Out of curiosity, is there a github issue
16:47:56Araqlqdev[m]: excellent question
16:48:18Araqno idea, but notice that 'typed' ASTs are currently not part of the spec for these reasons
16:48:56FromGitter<auxym> lqdev[m]: thanks! what exactly is static doing here?
16:48:57lqdev[m]dang, how can I get all the available overloads of `$` then? It works for other procs.
16:49:13lqdev[m]auxym: static makes the parameter compile-time
16:49:51FromGitter<auxym> ah, that works for me!
16:50:21lqdev[m]I guess a temp fix for my issue would be to create a glue proc that calls my desired `$` overload… man, how painful.
16:53:54Araqlqdev[m]: I would try a workardound involving typeof(`$`)
16:55:18lqdev[m]Araq: how would typeof help in that case?
16:55:58Araqtypeof gives some control over the "prefer iterators" behaviour
17:00:03lqdev[m]can you elaborate?
17:01:31*smokevadim joined #nim
17:01:56lqdev[m]I'm not really doing anything with iterators in that case
17:03:13*nsf joined #nim
17:04:16*a_chou joined #nim
17:04:41*smokevadim quit (Remote host closed the connection)
17:04:57*a_chou quit (Client Quit)
17:05:22*a_chou joined #nim
17:06:01Araqlqdev[m]: I know, what I say makes little sense. but I have the feeling something like that is going on
17:08:01lqdev[m]huh. typeof(`$`) actually returns the thing I need
17:08:09*smokevadim joined #nim
17:08:33lqdev[m]this is so confusing
17:08:41disruptekit's almost like Araq really knows this language well.
17:09:37lqdev[m]I wonder if this happens for other operators, too
17:10:43lqdev[m]doesn't seem to be happening for `+`
17:11:09*nim_noob joined #nim
17:11:15lqdev[m]I'll just keep a hardcoded list of problematic symbols for now, and update it whenever I see a problem
17:11:28nim_noobHello there!
17:11:36lqdev[m]hi, nim_noob
17:12:08clyybberlqdev[m]: You should open an issue
17:12:19*smokevadim quit (Read error: Connection reset by peer)
17:15:31nim_noobWhenever I try to compile an *.exe from Linux, i get this error:
17:16:14*smokevadim joined #nim
17:16:30nim_noob"/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: unrecognized option '-z'
17:16:46nim_noob /usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: use the --help option for usage information
17:17:05nim_noobcollect2: error: ld returned 1 exit status"
17:18:20nim_noobAnd here is, "Error: execution of an external program failed: '/usr/bin/x86_64-w64-mingw32-gcc -o .../testWinCompilation.exe .../.cache/nim/testWinCompilation_d/stdlib_formatfloat.nim.c.o .../.cache/nim/testWinCompilation_d/stdlib_io.nim.c.o .../.cache/nim/testWinCompilation_d/stdlib_system.nim.c.o
17:18:20nim_noob.../.cache/nim/testWinCompilation_d/@mtestWinCompilation.nim.c.o -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'"
17:18:52*FromGitter quit (Remote host closed the connection)
17:19:11*FromGitter joined #nim
17:19:45*thomasross_ joined #nim
17:19:45*thomasross is now known as Guest70645
17:19:45*Guest70645 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
17:19:45*thomasross_ is now known as thomasross
17:19:52nim_noobWhat might be the problem?
17:20:38nim_noobI used this command, "nim c -d:mingw testWinCompilation.nim"
17:21:44nim_noobI also tried to specify an OS and a CPU architecture
17:23:02*Vladar quit (Quit: Leaving)
17:23:20nim_noobThe Nim version is 1.0.2
17:24:11solitudesfare you sure this is not something from your environment? i can't reproduce.
17:24:45nim_noobidk
17:27:55*smokevadim quit (Read error: Connection reset by peer)
17:27:58Araqok, my cycle collector works for simple cases
17:28:13Araqclyybber: now it's your turn.
17:28:16FromDiscord<yewpad> About to code a little lib for retrieving youtube video urls and downloading the youtube video. even though this somewhat violates yt's tos... who cares
17:28:22FromDiscord<yewpad> it's actually pretty simple lol
17:29:10Araqso ... now that we have the best GC in the world how do we market this
17:29:23FromDiscord<yewpad> the best gc in the world? what have I missed?
17:29:30disrupteknothing.
17:30:57FromDiscord<yewpad> someone wanna suggest a nim-ish name for this youtube lib thingy? i like those nim-ish names like "nimpy" and "nimph" etc.
17:31:13Yardaniconitube xD
17:31:32nim_noobI couldn't find "-z" flag in "/usr/x86_64-w64-mingw32/bin/ld --help" info
17:31:59FromDiscord<yewpad> nimtube ( ͡° ͜ʖ ͡°)
17:32:06Yardaniconimhub
17:32:12Yardanicooh no
17:32:27FromDiscord<yewpad> (ノ◕ヮ◕)ノ*:・゚✧ ✧
17:32:39*Boko_bdecb joined #nim
17:33:14clyybberAraq: benchmarks, probably :)
17:34:47*Boko_bdecb quit (Read error: Connection reset by peer)
17:34:49nim_noobCan I link '/usr/x86_64-w64-mingw32/bin/ld' to '/usr/bin/ld'?
17:35:23Yardanicouhh, what for?
17:35:30YardanicoYou want to cross-compile from linux to windows?
17:35:57Yardanicothis code might help you - https://github.com/Yardanico/nickel/blob/master/src/nickel.nims#L16 (from line 16 until the end)
17:36:27*Boko_baaba joined #nim
17:36:46Yardanicoactually you don't really need findExe for linux, but I added it so it also works on macOS because the binary has a different location there
17:36:48nim_noob'/usr/bin/ls' has got "-z" flag, mingw's one hasn't
17:37:01lqdev[m]reported https://github.com/nim-lang/Nim/issues/12831
17:37:03disbotPassing `$` to a `typed` param of a macro yields a single nnkSym instead of a nnkClosedSymChoice @11liquid600pgm; snippet at https://play.nim-lang.org/#ix=23Ow
17:37:42*Boko_baaba quit (Read error: Connection reset by peer)
17:42:24lqdev[m]nim_noob: are you using `-d:mingw` for cross-compilation?
17:42:44nim_noobYes, indeed
17:44:35*Boko_aacae joined #nim
17:45:43*Boko_aacae quit (Read error: Connection reset by peer)
17:46:03clyybberAraq: So =destroy for refs does the cycle detection now?
17:46:18clyybberAnd there is =dispose thats the rawDestroy thing we talked about?
17:46:53*tane quit (Quit: Leaving)
17:49:02*uvegbot joined #nim
17:49:23*nim_noob left #nim (#nim)
17:49:47*zyklon quit (Quit: Konversation terminated!)
17:50:09*Boko_baaab joined #nim
17:58:15rayman22201Are the async tests passing with gc:arc? If it doesn't work with async then it's not done yet 😝
17:59:41*zyklon joined #nim
18:00:18*uvegbot quit (Ping timeout: 245 seconds)
18:00:39*Boko_baaab quit (Read error: Connection reset by peer)
18:02:55*Boko_dbddd joined #nim
18:04:03*a_chou quit (Ping timeout: 250 seconds)
18:04:54*clyybber quit (Quit: WeeChat 2.6)
18:08:03*matic joined #nim
18:08:33Araqrayman22201: on Unix I got a stress test to be green fwiw
18:08:38*Boko_dbddd quit (Read error: Connection reset by peer)
18:08:41Araqbut it leaked memory
18:09:11maticHi
18:09:51Araqclyybber: correct
18:09:55Araqhi matic
18:10:18maticAny standard library procs for chopping up an int (int16, int32, int64) to an array of uint8?
18:10:24maticHey Araq
18:11:00Araq'cast' it
18:13:41maticHa, that actually works! Thanks Araq
18:14:10disruptekAraq is on a roll with all these right answers.
18:15:11matic:)
18:15:53FromGitter<auxym> Here's a fun one: https://play.nim-lang.org/#ix=23OD add `{.closure.}` to `iterinvoke` creates an infinite loop. It looks like the `yield` call does not advance the inner iterator
18:17:00FromDiscord<treeform> Is this new cycle thing on the default GC or the new one?
18:17:09Yardanico@treeform it's the addition for ARC gc
18:17:20Yardanicohttps://github.com/nim-lang/Nim/pull/12823
18:17:21disbotARC: cycle detector 👑11Araq
18:18:56Araqauxym: that's an old bug, I thought we fixed it...
18:19:34FromGitter<auxym> @Araq: seems to be happening both on 1.0.4 and latest devel
18:19:59Araqwell 1.0.4 and devel have not diverged that much
18:20:00Yardanicoworks on latest devel for me
18:20:07Yardanicooutputs 1 then 2
18:21:12FromGitter<auxym> @Yardanico: replace line 7 with `iterator iterinvoke[T](iter: iterator(): T {.closure.}): T {.closure.} =`
18:21:15Yardanicooh
18:21:29Yardanicosorry I didn't read your message fully, just opened the link :P
18:21:32FromGitter<auxym> Didn't want to link straight to a playground with an infinite loop :)
18:22:11Yardanicoyeah you're right
18:22:18FromGitter<auxym> @Araq should I create a new issue then?
18:31:06Araqsure
18:32:16FromGitter<auxym> alright, will do
18:35:54*a_chou joined #nim
18:46:34*nsf quit (Quit: WeeChat 2.6)
18:52:39FromDiscord<Rika> hello, me dumb, dont know if overriding a proc is possible; from what i tried it isnt. what are the alternatives
18:52:48Yardanicoyes, it's entirely possible
18:53:03*NimBot joined #nim
18:53:45Yardanicowhat do you exactly want to do? maybe you need something like interface (you can use tuples in Nim for that, like streams module does) or multimethods
18:54:32FromDiscord<yewpad> somebody got any idea how to decode x-www-form-urlencoded in Nim? Is there something I can use?
18:55:44*matic quit (Read error: Connection reset by peer)
18:55:46Yardanico@yewpad maybe https://nim-lang.org/docs/uri.html#decodeUrl%2Cstring ?
18:56:09*matic joined #nim
18:57:42*a_chou quit (Quit: a_chou)
18:58:13*solitudesf quit (Ping timeout: 245 seconds)
19:01:41*rockcavera quit (Remote host closed the connection)
19:02:34FromGitter<zacharycarter> so this is fun... in my fragment shader I'm sampling from the textures of neighbor tiles to do blending
19:03:04FromGitter<zacharycarter> so for each fragment I pass down indices of the textures in neighbor vertices, and I use those indices to do a lookup into my 2d texture array so I can do the color blending
19:03:28FromGitter<zacharycarter> however - if I'm packing all of these textures into an altas / virtual texture - I have no effing clue how to do the mapping in the shader
19:03:54FromGitter<matrixbot> `aeverr` it is I, Rika from Discord
19:03:58FromGitter<matrixbot> `aeverr` Discord is dying right now
19:05:31YardanicoYou don't need matrix to gitter bridge btw :) matrix is directly connected to freenode - https://github.com/matrix-org/matrix-appservice-irc/wiki/Guide:-How-to-use-Matrix-to-participate-in-IRC-rooms
19:05:52FromGitter<yewpad> (https://files.gitter.im/nim-lang/Nim/SAFF/grafik.png)
19:05:54FromGitter<yewpad> @Yardanico Thank you! This actually worked quite well
19:06:08FromGitter<yewpad> (And this link works too: https://r4---sn-j5caxn0g4-umal.googlevideo.com/videoplayback?expire=1575766778&ei=mvbrXYbnDpaD8gO0iJxQ&ip=46.128.100.132&id=o-AEDTnmMCoZI2fRDxibVE2OO77VvkTL0VBvlZ9Rv_--lr&itag=251&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-j5caxn0g4-umal%2Csn-4g5e6nzs&ms=au%2Crdu&mv=m&mvi=3&pl=18&initcwndbps=1225000&mime=audio%2Fwebm&gir=yes&clen=14308543&dur=845.321&lm
19:06:08FromGitter... t=1573308452453495&mt=1575745059&fvip=4&keepalive=yes&fexp=23842630%2C23860862&c=WEB&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRQIgE2ygBA9ymGoJlID7HF7DHzmp_5ssoWTePPnxLov9lGcCIQD4znklYm6dH17aUy87mtUKf1GeMz56EaKfF1EjCIpb9w%3D%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&l ... [https://gitter.im/nim-lang/Nim?at=5debf8206a85195b9e163752]
19:06:13FromGitter<yewpad> Exciting
19:06:18*solitudesf joined #nim
19:06:39Yardanico@yewpad that link is kinda too big :P
19:06:46FromGitter<yewpad> ya i know
19:06:52FromGitter<yewpad> can't do anything about that though
19:06:54Yardanicoespecially in IRC
19:07:08FromGitter<yewpad> ssrryyyy
19:07:34FromGitter<matrixbot> `aeverr` Yardanico, im on matrix
19:07:42FromGitter<matrixbot> `aeverr` im not using gitter
19:07:53FromGitter<matrixbot> `aeverr` huh double sending now it seems
19:08:02FromGitter<matrixbot> `aeverr` everything i use is broken!
19:08:17Yardanico@aeverr you're using matrix<-> gitter bridge :P
19:08:28FromGitter<matrixbot> `aeverr` i dont know what im using
19:08:50FromGitter<matrixbot> `aeverr` i cant be assed to open my irc client if thats what i need to do
19:10:58*aeverr[m] joined #nim
19:10:59*solitudesf quit (Client Quit)
19:11:20*solitudesf joined #nim
19:11:20FromGitter<zacharycarter> interesting - apparently I use another texture to do this
19:11:22aeverr[m]test
19:11:24Yardanicooh no https://github.com/nim-lang/Nim/issues/12833 XD
19:11:26disbotjson decode is slow than go! @11zhuxiujia; snippet at https://play.nim-lang.org/#ix=23OT
19:11:31Yardanicothese people again :(
19:12:02lqdev[m]ah shit, here we go again
19:12:15aeverr[m]nice
19:12:38aeverr[m]whos gonna point to the nimble libraries
19:12:38FromGitter<zacharycarter> he should go fucking use go then
19:13:39FromGitter<zacharycarter> lol - I love the issue description too
19:13:43FromGitter<zacharycarter> it outputs the wrong string
19:14:14disruptekthat's just the template.
19:14:38FromGitter<zacharycarter> yeah well the whole issue is fucked
19:14:45FromGitter<zacharycarter> he's complaining about runtime but refers to it as compile time
19:15:22FromGitter<zacharycarter> again, I think he should just go use go
19:15:32Yardanico"go use go" :D
19:15:41aeverr[m]go2go
19:16:18FromGitter<zacharycarter> hope he / she enjoys how terrible Go is
19:17:23FromGitter<zacharycarter> this is blowing my mind though... now I need to figure out how to compose a texture
19:17:45FromGitter<zacharycarter> I guess I'm supposed to store - ⏎ ⏎ ```x position in the cache (stored in .r) ⏎ y position (in .g) ⏎ mipmap level (in .b).``` [https://gitter.im/nim-lang/Nim?at=5debfad9c3d6795b9f3ee959]
19:17:58aeverr[m]zacharycarter is super triggered it seems
19:18:19Araqzacharycarter: way beyond my knowledge
19:19:29FromGitter<zacharycarter> I'm working towards virtual / mega textures but I want to make simple texture atlases work first
19:20:08FromGitter<zacharycarter> I just don't know how to store data in a specific channel - I guess I need to look at the format for png and figure out how the data is laid out
19:22:10FromGitter<zacharycarter> http://www.renaudpradenc.com/?tag=sparse-virtual-texture
19:23:40Araqwe could put some effort into optimizing the stdlib though
19:24:40federico3+1
19:26:52federico3or maybe finish your faster JSON parser and ship it in stdlib
19:30:48Araq1. it is finished.
19:31:06Araq2. it is a different API and cannot have the same API.
19:34:39aeverr[m]add a note to docs regards the speed
19:46:35Araqit's not surprising Go's implementation is faster, they deserialize directly into the struct
19:46:51Araqwhich we could also do but don't
19:48:24Araqproblem is that Go's implementation is also full of stuff where I can trigger pathological behaviour, you can't just "write a fast JSON library". what if the JSON has a 10GB string literal inside? what if it has object fields with 1000 entries?
19:49:19AraqJSON is used for **everything** and so you need to protect against so many different things and then once you did, it's kinda slow for the general case
19:50:01lqdev[m]gosh, that's why I stick to raw binary data.
19:50:15lqdev[m]1. it's streamable
19:50:20lqdev[m]2. it's fast to decode
19:50:27lqdev[m]problem solved.
19:52:00lqdev[m]anyways, the problem also lies within how the JSON is deconstructed into objects
19:52:33lqdev[m]because it's not parsed and unmarshalled immediately, it's first parsed into a tree and then that tree is unmarshaled
19:52:42Araqexactly
19:54:57disruptekcould use some nimph testing; just added automatic git repo rolling to match requirements.
20:00:46Araqlqdev[m]: +1 for binary data
20:03:23aeverr[m]oh what the hell matrix has seen by indicators thats cool
20:03:40lqdev[m]aeverr: and they even work on people using IRC! isn't that amazing!
20:03:50aeverr[m]definitely is
20:03:52lqdev[m]too bad their homeserver sucks
20:04:06aeverr[m]rip
20:04:26lqdev[m]it often experiences outages and slowdowns, which can be really annoyinh
20:04:31lqdev[m]s/annoyinh/annoying/
20:05:31aeverr[m]raw binary data has the issue of portability between languages right?
20:06:12disruptekand once you crack the seal it has to be refrigerated.
20:06:29Araqwtf, Go's JSON lexer is terrible
20:06:54Araqand we're beaten by this piece of junk? that's personally offending me
20:07:08aeverr[m]are you inclined to make json quicker now :V
20:07:18sealmoveterrible how?
20:07:22Araqtoo bad I'm busy spending my time on the world's best GC.
20:07:49aeverr[m]also yeah how is it terrible
20:08:27sealmoveworld's best GC == araqsgc (https://github.com/Araq/araqsgc) ?
20:08:33Yardanicosealmove: ARC
20:08:46sealmovegc:arc, ok
20:08:53Yardanicoidk what arc means though, maybe it means "araqsgc" :P
20:09:01aeverr[m]what does arc stand for
20:09:05Araqit's terrible because it uses an indirect function call for every processed byte
20:09:08sealmovearc = (something) reference counting
20:09:15aeverr[m]im guessing rc is reference counting or smth
20:09:18aeverr[m]called it
20:09:29aeverr[m]internet is just shite over here
20:10:01sealmoveautomatic
20:11:07Araqthinking about it ... it makes some sense
20:11:48Araqneed to sleep over this idea.
20:12:32sealmoveAraq: I am a bit confused about Nim's future. Since you are working on GC, does it mean we are not going for owned refs?
20:13:33sealmoveOr maybe arc GC can help on implementing owned refs?
20:14:16Araqsealmove: it's actually laid out in our RFCs/plan for 2020
20:14:31sealmovegreat, i'll go check it out
20:15:11AraqI view these things as a continuum
20:15:45Araqand both ARC and 'owned ref' use the same codebase anyway, I fix one bug for ARC, it also fixes a bug for 'owned'
20:16:47sealmovenice, makes sense
20:20:23sealmovenim is progressing so fast that I can't even keep up with RFCs and blog posts :D
20:39:26*PMunch joined #nim
20:39:50Zevvwhere can I find araqs latest writeup then?
20:40:11disruptek!rfcs author:araq
20:40:12disbothttps://github.com/nim-lang/RFCs/issues/178 -- 3lent/var/openArray inside objects/containers 👑11Araq
20:40:12disbothttps://github.com/nim-lang/RFCs/issues/177 -- 3Unify Nim's GC/memory management options 👑11Araq
20:40:12disbothttps://github.com/nim-lang/RFCs/issues/175 -- 5Conversion to unsigned integers shall not produce range checks 👑11Araq 7& 9 more...
20:47:35*tklohna joined #nim
20:53:09*filcuc joined #nim
21:08:49*nixfreak quit (Read error: Connection reset by peer)
21:12:13*nsf joined #nim
21:13:02*nixfreak joined #nim
21:16:44Zevvclosure iterator question: http://ix.io/23PA
21:22:13*ehmery quit (Remote host closed the connection)
21:29:51Araqclosure iterators are weird
21:29:59Araqyou can do
21:30:01Araqlet x = it
21:30:03Araqx()
21:30:07Araqto call it a single time
21:30:25Araqthe name of the closure iterator creates the state it needs
21:34:36Zevvhm weird indeed
21:42:24FromDiscord<demotomohiro> I think I can see closure iterator `it` as a proc that return closure iterator.
21:42:24FromDiscord<demotomohiro> So defining `it` closure iterator implicitly create a proc `it` that return closure iterator.
21:43:09FromDiscord<demotomohiro> But I cannot call it like `it()`.
21:45:17disrupteki kinda like that.
21:45:27ZevvI'm still struggling with these things every time and again. I'm always hoping to mold them into Lua corouines, but the semantics are just different enough so I can't
21:45:30disruptekit makes it easier to reason about where the state is.
21:45:51Zevvtrue
21:49:56AraqZevv: there have been proposals to change it but it's expensive to change given that async uses it heavily
21:51:31disruptekhow should nimph handle branches in your dependencies?
21:51:45*Jesin quit (Quit: Leaving)
21:53:18*Jesin joined #nim
21:58:11Araqwhat do you mean?
22:01:18disrupteki need to setup remote tracking so that when you fork something or clone one of your own repos, your remotes point to the right branches.
22:01:27disruptek!search changes to remotes
22:01:28disbothttps://github.com/disruptek/nimph/issues/22 -- 3changes to remotes should also add missing tracking branches 🧚11disruptek 7& 4 more...
22:01:56disruptekbut it begs the question, what should i assume with respect to branches.
22:02:48disruptekmaybe i shouldn't fix versions in branches that aren't master, for example. or maybe branches that aren't available at the upstream project.
22:12:34*zyklon quit (Quit: Konversation terminated!)
22:12:50*zyklon joined #nim
22:19:17*solitudesf quit (Ping timeout: 250 seconds)
22:21:16PMunchHmm, are there any compile-time image libraries out there
22:22:48*matic quit (Quit: Leaving)
22:23:37lqdev[m]why do I get an undeclared identifier here, even though the template param is `untyped`? https://play.nim-lang.org/#ix=23PT
22:25:56lqdev[m]hmm, changing the name from `connect` to `withSocket` fixed it
22:29:26Araqconnect already exists and so OR kicks in and destroys your 'untyped'
22:29:37Araqdid I mention that I have a better design for 'untyped'?
22:33:32lqdev[m]I'm getting an `Address already in use` error when binding a unix socket, what does that mean?
22:33:44lqdev[m]afaik the file exists and is not in use
22:34:38lqdev[m]I suppose I forgot to `close` it
22:34:43lqdev[m]what can I do in that case?
22:35:11disruptekthere's a reuse flag.
22:36:44lqdev[m]ah, forgot about that
22:37:05disruptekactually, i don't remember if it has a reuse.
22:37:19disruptekcrazy that i can't recall.
22:37:48disruptekdoesn't exist on linux.
22:38:15lqdev[m]crap
22:38:29disruptekrename it or remove it and recreate.
22:38:30lqdev[m]well, this seems to happen even if I change the file name
22:38:40disruptekprobably have to unlink it.
22:39:17lqdev[m]doesn't help
22:39:43disruptekdid this work, ever?
22:39:55lqdev[m]nope.
22:39:58disruptekbecause you can get that error message for other reasons.
22:40:09lqdev[m]for instance?
22:40:20disrupteksimple misconfiguration.
22:40:26disruptek!repo swayipc
22:40:27disbothttps://github.com/disruptek/swayipc -- 9swayipc: 11swayipc (i3ipc) for Nim 15 3⭐ 0🍴
22:40:35disruptekhas a good example.
22:41:31*nsf quit (Quit: WeeChat 2.6)
22:42:28lqdev[m]yeah, but you're connecting to an existing socket in this case
22:43:48lqdev[m]does addQuitProc work on SIGINT?
22:44:08lqdev[m]nvm seems to wor
22:44:11lqdev[m]s/wor/work
22:46:11*tklohna quit (Ping timeout: 252 seconds)
22:47:18*tklohna joined #nim
23:03:03*cornfeedhobo quit (Quit: ZNC - https://znc.in)
23:05:08*ng0 joined #nim
23:13:05*cornfeedhobo joined #nim
23:17:42sealmoveare nested case objects supported?
23:21:02*tklohna quit (Ping timeout: 276 seconds)
23:32:13*tklohna joined #nim
23:50:56PMunchsealmove, IIRC yes
23:51:56*ng0 quit (Quit: Alexa, when is the end of world?)
23:53:00*PMunch quit (Quit: leaving)
23:53:05*filcuc quit (Ping timeout: 268 seconds)
23:53:05*lritter quit (Ping timeout: 268 seconds)