<< 08-01-2020 >>

00:00:01*Vladar quit (Quit: Leaving)
00:07:12*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:12:25rockcaveradeepend https://nim-lang.org/docs/strutils.html#insertSep%2Cstring%2Cchar%2Cint
00:13:21deependoh jeez, I read that page and everything. thanks, rockcavera
00:16:42*krux02_ joined #nim
00:19:03*krux02 quit (Ping timeout: 245 seconds)
00:38:26*endragor joined #nim
00:39:02*endragor quit (Remote host closed the connection)
00:39:46*endragor joined #nim
00:45:16zedeusYardanico: don't forget to close those http clients, otherwise you'll slowly gather many open file descriptors
01:02:06*ng0 quit (Quit: leaving)
01:36:21Yardanicozedeus: ah, right, forgot about it
01:56:28*Zevv quit (Ping timeout: 260 seconds)
02:02:22*Jjp137 quit (Read error: Connection reset by peer)
02:04:00*Jjp137 joined #nim
02:06:19*uu91 joined #nim
02:07:52*Zevv joined #nim
02:07:52*Zevv quit (Changing host)
02:07:52*Zevv joined #nim
02:07:54*krux02_ quit (Remote host closed the connection)
02:09:54*Jjp137 quit (Read error: Connection reset by peer)
02:13:15disrupteki could never remember the address to the directory and so i'd go to nimble's github repo to find out but it's almost impossible to find there, also.
02:56:42leorizeit's in the "Learn" page in nim-lang.org
03:28:41*icebattl1 joined #nim
03:32:19*icebattle quit (Ping timeout: 268 seconds)
03:33:25*icebattl1 quit (Ping timeout: 258 seconds)
03:33:38*endragor_ joined #nim
03:34:36disrupteki wonder what that is.
03:36:50*endragor quit (Ping timeout: 240 seconds)
03:38:08disruptekoh, i see. i see, i see.
03:40:18*MightyJoe joined #nim
03:42:11*cyraxjoe quit (Ping timeout: 268 seconds)
03:57:32*muffindrake quit (Ping timeout: 260 seconds)
03:59:47*muffindrake joined #nim
04:03:39*cyraxjoe joined #nim
04:05:48*MightyJoe quit (Ping timeout: 268 seconds)
04:08:23*Jjp137 joined #nim
04:18:33Yardanicoi'm gonna run the discord-irc nim bridge in #nim-offtopic for now, it's linked to #offtopic on Nim discord server, so you can try to break it (and you'll probably succeed but I made it restart on crash, and I'll get some logs :P)
04:19:40disruptekneat, i'll try to mess with it somehow.
04:20:23Yardanicooh no
04:33:37*chemist69 quit (Ping timeout: 252 seconds)
04:35:38*chemist69 joined #nim
04:43:31*gangstacat quit (Quit: Ĝis!)
04:45:05*thomasross joined #nim
04:50:03*marmotini_ joined #nim
04:52:09*nsf joined #nim
04:55:10*icebattle joined #nim
05:00:04*icebattle quit (Ping timeout: 268 seconds)
05:00:11*gangstacat joined #nim
05:03:48*marmotin_ joined #nim
05:03:48*marmotin_ quit (Remote host closed the connection)
05:04:14*marmotini_ quit (Read error: Connection reset by peer)
05:04:16*marmotin_ joined #nim
05:09:36*marmotin_ quit (Remote host closed the connection)
05:10:01*uu91 quit (Ping timeout: 258 seconds)
05:10:18*marmotini_ joined #nim
05:15:26*narimiran joined #nim
05:31:20*dddddd quit (Ping timeout: 268 seconds)
05:45:36*ltriant quit (Quit: leaving)
05:50:07*marmotini_ quit (Remote host closed the connection)
05:51:59*marmotini_ joined #nim
05:52:00*marmotini_ quit (Remote host closed the connection)
05:52:16*marmotini_ joined #nim
05:53:03*leorize quit (Ping timeout: 240 seconds)
05:57:55*marmotini_ quit (Remote host closed the connection)
05:58:28*marmotini_ joined #nim
06:00:57FromDiscord<treeform> Yardanico, is the bridge made with nim?
06:02:38disruptek!repo Yardanico/ircord
06:02:39disbothttps://github.com/Yardanico/ircord -- 9ircord: 11Discord <-> IRC bridge in Nim 15 2⭐ 0🍴
06:02:50*marmotini_ quit (Ping timeout: 240 seconds)
06:14:56*Zevv quit (Quit: leaving)
06:15:20*Zevv joined #nim
06:21:44*gmpreussner joined #nim
06:23:19*gmpreussner_ quit (Ping timeout: 268 seconds)
06:25:41*gmpreussner_ joined #nim
06:26:18*gmpreussner quit (Ping timeout: 258 seconds)
06:30:10*ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
07:00:20*solitudesf joined #nim
07:04:10*PMunch joined #nim
07:06:59*narimiran quit (Quit: leaving)
07:08:09*narimiran joined #nim
07:12:53*marmotini_ joined #nim
07:43:30*marmotini_ quit (Remote host closed the connection)
07:43:56*marmotini_ joined #nim
07:46:51*marmotini_ quit (Remote host closed the connection)
07:46:57*marmotini_ joined #nim
07:54:12*marmotini_ quit (Remote host closed the connection)
07:54:38*marmotini_ joined #nim
07:57:17*marmotini_ quit (Remote host closed the connection)
07:57:24*marmotini_ joined #nim
08:00:00*gmpreussner_ quit (Quit: kthxbye)
08:05:04*gmpreussner joined #nim
08:14:43PMunchAnother thing I miss from Nim, the `$` operator..
08:14:54PMunchSeriously, I can't print out an array of strings?
08:21:19Zevvand not just being able to .repr anything
08:21:55Zevvaraq: what is the plan with the os:standalone rework, will there be an RFC for that?
08:28:21FromDiscord<Rika> Is there an async semaphore in the stdlib
08:33:23PMunchYep, repr is nice
08:34:34*krux02 joined #nim
08:38:10*kungtotte quit (Quit: WeeChat 2.7)
08:42:37*NimBot joined #nim
08:44:04Araqrepr is dead, arc doesn't have it :P
08:44:23Araqwe could write a new repr though that is not based on the old RTTI
08:44:30Araqsame for marshal.nim
08:44:53Araqthere is no technical reason this won't work, but it's too much work for us
08:45:01Araqso please PR ahead
08:45:54*kungtotte joined #nim
08:46:40PMunchOh repr is based on RTTI?
08:48:24Araqyep
08:51:17*ng0 joined #nim
08:51:17*ng0 quit (Changing host)
08:51:17*ng0 joined #nim
09:01:26Araqrepr should be in its own module and could be based on $'s implementation
09:01:34Araqthen you could also override it for custom types
09:07:50*floppydh joined #nim
09:22:33PMunchIsn't that sorta the point with repr though? That it isn't something that has to be implemented?
09:27:12*marmotini_ quit (Remote host closed the connection)
09:27:38*marmotini_ joined #nim
09:28:31*icebattle joined #nim
09:32:27*marmotini_ quit (Ping timeout: 268 seconds)
09:33:13*icebattle quit (Ping timeout: 260 seconds)
09:41:23lqdev[m]make it a macro, problem solved ;)
09:44:52*solitudesf quit (Ping timeout: 258 seconds)
10:00:15*marmotini_ joined #nim
10:00:32FromGitter<Varriount> PMunch: or imported
10:10:07AraqZevv, I'll tinker with an implementation before writing an RFC
10:17:29*letto quit (Quit: Konversation terminated!)
10:18:14*letto joined #nim
10:26:50PMunchTrue enough, but if you have already imported the module a type is in then the `repr` implementation should logically be right there next to it
10:29:44*marmotini_ quit (Remote host closed the connection)
10:29:52*marmotini_ joined #nim
10:36:06Araqextensible or not, how system.`$` does it would work for repr too
11:01:33FromDiscord<inv> Hello, can I duplicate here from telegram?
11:01:47FromDiscord<inv> ```nim
11:01:48FromDiscord<inv> var c = 0
11:01:48FromDiscord<inv> var s = ""
11:01:48FromDiscord<inv> try:
11:01:48FromDiscord<inv> let s_in = newFileStream("1.json", fmRead)
11:01:48FromDiscord<inv> while not s_in.atEnd():
11:01:49FromDiscord<inv> s_in.read(s)
11:01:50FromDiscord<inv> echo s
11:01:51FromDiscord<inv> c += 1
11:01:53FromDiscord<inv> except IOError:
11:01:54FromDiscord<inv> echo getCurrentExceptionMsg()
11:01:56FromDiscord<inv> finally:
11:01:57FromDiscord<inv> echo c
11:01:58FromDiscord<inv> ```
11:02:14FromDiscord<inv> echo s do SIGSEGV: Illegal storage access.
11:02:34FromDiscord<inv> is I remove echo s then:
11:02:34FromDiscord<inv> cannot read from stream
11:02:34FromDiscord<inv> 83516
11:04:01Araquse packedjson to deal with JSON
11:06:57FromDiscord<inv> Please ignore json here - it is just a file I found in current ditr
11:07:06FromDiscord<inv> Please ignore json here - it is just a file I found in current dir
11:08:41FromDiscord<yewpad> Can somebody tell me which one of these styles is easier to read? Not just visually but also contextually, the ease to grasp what this code is doing. I find it pretty hard to find the right "mixture" of which syntax style to use. I always tell myself "Use whatever is easier to read" but that would mean to use both styles in your codebase and that feels pretty inconsistent and inconsistency isn't what I want. https://imgur.com/a/kaKH2LA
11:09:17FromDiscord<yewpad> Thank you in advance
11:09:57Araqinv: newFileStream returns nil if the file does not exist iirc
11:10:33FromDiscord<inv> it exists, because counter is 83516
11:11:42Araqyewpad: use the callHere(path) syntax
11:11:48FromDiscord<inv> I added ```nim if not isNil(s_in):``` but it is the same
11:11:56FromDiscord<inv> I added ```nim if not isNil(s_in):``` but result is the same
11:12:07Araqinv: you don't close the stream and run out of file handles
11:12:15FromDiscord<yewpad> Araq: You mean the style on the first image?
11:12:25Araqyes
11:12:53Araqespecially removeDir(x) stresses the removeDir operation
11:12:55FromDiscord<yewpad> Why? Is it easier to read or is it easier to grasp the context
11:13:08Araqand since that's quite some effect, it's wise to stress it
11:13:33FromDiscord<inv> ```nim
11:13:33FromDiscord<inv> var c = 0
11:13:34FromDiscord<inv> var s = ""
11:13:34FromDiscord<inv> let s_in = newFileStream("1.json", fmRead)
11:13:34FromDiscord<inv> try:
11:13:34FromDiscord<inv> if not isNil(s_in):
11:13:34FromDiscord<inv> while not s_in.atEnd():
11:13:36FromDiscord<inv> s_in.read(s)
11:13:37FromDiscord<inv> # echo s
11:13:39FromDiscord<inv> c += 1
11:13:40FromDiscord<inv> except IOError:
11:13:42FromDiscord<inv> echo getCurrentExceptionMsg()
11:13:43FromDiscord<inv> finally:
11:13:44FromDiscord<inv> s_in.close()
11:13:46FromDiscord<inv> echo c
11:13:47FromDiscord<inv> ```
11:13:48FromDiscord<inv> and it is still the same 😦
11:13:51narimiranyay, discord paste
11:14:18FromDiscord<inv> Araq, but I check for .atEnd
11:14:37Araqyewpad: Also I avoid 'continue' like the plague and I use case\nof without the additional indentation
11:14:42*skelett1 quit (Quit: WeeChat 2.5)
11:15:09*skelett joined #nim
11:15:12FromDiscord<yewpad> I already figured that with the additional indentation. I wanted to fix this already but didn't get to it just yet
11:15:33*dddddd joined #nim
11:15:57FromDiscord<yewpad> The thing is with not using 'continue' is that I have to cover the case in some sort. What do I do instead? Use 'discard'?
11:16:05Araqyes.
11:16:37FromDiscord<yewpad> well... yeah.. obvious. thank you for the tip
11:16:40FromDiscord<yewpad> hint*
11:18:08FromDiscord<Clyybber> Araq: I think I found the solution to my storing of PNodes/PSym problem. I will use a tree structure for them
11:18:22FromDiscord<Clyybber> Where field accesses are childs
11:18:30FromDiscord<inv> ```nim
11:18:30FromDiscord<inv> var c = 0
11:18:31FromDiscord<inv> var s = ""
11:18:31FromDiscord<inv> let s_in = newFileStream("1.txt", fmRead)
11:18:31FromDiscord<inv> try:
11:18:31FromDiscord<inv> if not isNil(s_in):
11:18:31FromDiscord<inv> echo "stream is ok"
11:18:33FromDiscord<inv> while not s_in.atEnd():
11:18:34FromDiscord<inv> s_in.read(s)
11:18:36FromDiscord<inv> # echo s
11:18:37FromDiscord<inv> c += 1
11:18:39FromDiscord<inv> except IOError:
11:18:40FromDiscord<inv> echo getCurrentExceptionMsg()
11:18:41FromDiscord<inv> finally:
11:18:43FromDiscord<inv> s_in.close()
11:18:44FromDiscord<inv> echo c
11:18:45FromDiscord<inv> ```
11:18:47FromDiscord<inv> stream is ok
11:18:48FromDiscord<inv> cannot read from stream
11:18:49FromDiscord<inv> 83516
11:19:06FromDiscord<yewpad> inv: Discord code snippets are discouraged. Please use a code paste service such as pastebin, hastebin or even Nim's playground. πŸ™‚
11:19:16FromDiscord<inv> ok, np
11:19:24FromDiscord<Clyybber> Araq: Btw, I spotted a bug along the way, we optimize `b = a[i]; i += 1; a[i] = b` even though i is not constant and could have changed along the way
11:19:38FromDiscord<Clyybber> This may be the source of the bugs disruptek is seeing
11:19:49FromDiscord<Clyybber> because they were all related to iterators/loops in some way
11:20:08FromDiscord<Clyybber> I'm gonna fix it along the way
11:20:30Araqorginally the code was specially crafted to prevent this from happening :P
11:20:51Araqand then somebody "fixed" it
11:21:09FromDiscord<Clyybber> lol
11:22:03FromDiscord<inv> https://play.nim-lang.org/#ix=26Oz
11:23:15Araqinv: unless you also give us your 1.txt nobody can reproduce it
11:23:25*uu91 joined #nim
11:23:59Araqand even then it's likely that it works for most of us, streams are used quite a bit
11:31:26FromDiscord<inv> 1.txt: https://gist.github.com/inv2004/64ac2f2536f851aef0dd5247711ef3b5
11:31:42FromDiscord<inv> 1.txt: https://gist.githubusercontent.com/inv2004/64ac2f2536f851aef0dd5247711ef3b5/raw/67b54b56ac7ceb3eae95bd5537e59e6e61e6b93a/1.txt
11:31:57FromDiscord<inv> please ignore that it is json - just file I found
11:32:05FromDiscord<inv> please ignore that it is really json - just file I found
11:32:06FromDiscord<krptr> quick question from a noob: is there a way to declare a converter from literals? Simple example: https://play.nim-lang.org/#ix=26OC
11:32:54FromDiscord<krptr> tried to find in docs, but didn't find how
11:36:55Araqkrptr: proc makeCustomType(v: int): CustomType = CustomType(value: uint32(v))
11:37:11Araqor maybe
11:37:29Araqproc makeCustomType(v: range[0..int(high(uint32))]): CustomType = CustomType(value: v)
11:38:35AraqI would use 12'u32 though or simply don't use uint32, I usually don't need modulo arithmetic
11:38:48FromDiscord<yewpad> Is this discouraged? I think I have read something about that in the docs but I really like it. It is visually more "appealing" to me https://imgur.com/a/iWwu1PM
11:43:41FromDiscord<krptr> @araq: aham... I'm ok with the range snippet, thanks (using uints is 'mandatory' when LLE of old consoles :P)
11:43:58*lritter joined #nim
11:44:20Araqyewpad: I personally don't use the first red line
11:44:29Araqbut the other two red lines are fine
11:44:38FromDiscord<yewpad> aight, thanks!
11:44:56FromGitter<alehander92> PMunch i think `$` should work for every value
11:45:23FromGitter<alehander92> because otherwise its the same now (i cant print ref object? )
11:53:55Araqyewpad: In general I try not to confuse beauty with readability. Readability is about stressing the important parts, beauty is more about uniformity.
11:57:25FromGitter<sheerluck> I like to write beautiful code. That's why I hate Golang
12:02:31*abm joined #nim
12:04:41*ng0 quit (Quit: leaving)
12:07:54planetis[m]is it wise to have an Exception with a ``kind`` field, like ``CairoError(kind: NullPointer)`` (not a case object btw) so that i can avoid the extra if statements that map status codes to raise newException?
12:10:36planetis[m]pbl not because the user will have to do ``except CairoError as e: case e.kind``,...
12:15:25planetis[m]is it recommented to remove the prefix from exceptions ``CairoWriteError`` ?
12:18:08Araqit's always recommended to remove prefixes
12:19:32*marmotini_ quit (Remote host closed the connection)
12:19:59*marmotini_ joined #nim
12:24:38*marmotini_ quit (Ping timeout: 265 seconds)
12:25:42ZevvIf/when `$` is available for every value, what reason does repr have to live then?
12:27:24Araq$ is not avaiable for every value.
12:30:58FromGitter<alehander92> Zevv, repr can be a lower level including addresses thing, but i admit i am not sure why its needed
12:34:10planetis[m]is it possible to map (WriteFunc, closure) to nim closures or provide a nim api for it? closure here is data pointer and writedfunc a proc pointer which takes as first parameter the closure data. here is an example https://github.com/freedesktop/cairo/blob/61122127943dcaff41501e1b06df2a852c576e9b/test/imagediff.c
12:35:33*chemist69 quit (Quit: WeeChat 2.6)
12:37:32*marmotini_ joined #nim
12:37:32planetis[m]look for ``stdio_write_func`` and ``write_png``
12:47:20planetis[m]better make a forum post for this one
12:55:38FromDiscord<krptr> for some reason I cannot make it work (the int literal converter) when using ranges @araq... 😦 probably I'm doing something wrong https://play.nim-lang.org/#ix=26OY
12:56:06planetis[m]one more question and i leave you guys alone :), the rust bindings convert procs that have in/out parameters to return tuples https://github.com/gtk-rs/cairo/blob/c88d6d39a46fe7f58e31bcfbb4267f4185b61d18/src/matrices.rs#L106 and only out https://github.com/gtk-rs/cairo/blob/c88d6d39a46fe7f58e31bcfbb4267f4185b61d18/src/patterns.rs#L217 does the same changes make sense for a more nim like api?
12:56:13FromDiscord<krptr> anyway, I'll keep using XXXX'u32 for now, not really a problem
13:04:04*Vladar joined #nim
13:26:09FromDiscord<Rika> ar*q (anti ping lol), is there a benefit of not using a colon'ed case (aka has addtl indentation) vs to what you usually use?
13:26:25FromDiscord<Rika> i mean vs the other*
13:35:09*solitudesf joined #nim
13:36:01FromGitter<alehander92> but if you dont ping him, how would he see it
13:37:43PMunchUhm: Error: ambiguous call; both common.data(option: CustomOptions[uint32 or float32, system.uint32]) and common.data(option: CustomOptions[uint32 or float32, uuids.UUID]) match for: (ptr CustomOptionsImpl[system.int32, system.uint32])
13:44:19FromDiscord<Rika> alehander92, if he checks the server, then he sees it. if he doesnt, then ill ask some other time
13:45:24FromGitter<alehander92> fair!
13:45:28*marmotini_ quit (Remote host closed the connection)
13:45:54*marmotini_ joined #nim
13:48:29AraqRika: after ':' a list of statements follows, but after 'case x' a list of 'of' sections follows
13:48:36Araqso my way is more consistent
13:50:47*marmotini_ quit (Ping timeout: 260 seconds)
14:03:41*marmotini_ joined #nim
14:09:57*sagax quit (Ping timeout: 268 seconds)
14:11:31*sagax joined #nim
14:23:51*kitech1 quit (Remote host closed the connection)
14:24:09*kitech1 joined #nim
14:24:13FromDiscord<Rika> i see
14:27:36Araqplanetis[m], I like in/out parameters more fwiw but it depends
14:32:40planetis[m]I think where there is ``red, green, blue, alpha: var float64`` I should use a RGBA color type but i'm not sure about the down conversion to float32
14:34:04planetis[m]and in general i'm not sure if float64 should be used or do float -> cdouble conversion
14:35:47narimiranfloat == float64
14:37:52planetis[m]really!?
14:38:10narimiranlook at system.nim, line 41 :)
14:38:22narimiran(and lines 37 and 39)
14:38:56planetis[m]narimiran :)
14:52:14Araqhttps://forum.nim-lang.org/t/5784 new year, new forum post
14:52:38*kitech1 quit (Max SendQ exceeded)
14:53:03*kitech1 joined #nim
14:58:01*ng0 joined #nim
14:58:01*ng0 quit (Changing host)
14:58:01*ng0 joined #nim
15:01:50*PMunch quit (Quit: Leaving)
15:13:39*ng0_ joined #nim
15:15:19*ng0 quit (Ping timeout: 268 seconds)
15:16:47Zevvyou're late
15:18:42Araqikr, time to do --os:standalone properly
15:18:48Zevv\o/
15:20:57FromGitter<alehander92> yess
15:21:24FromGitter<alehander92> i might use that in lodka
15:21:41*ng0_ is now known as ng0
15:26:20Araqplanetis[m], well *out* parameters are to be kept in the return type, *in out* parameters are 'var T'
15:28:52*couven92 joined #nim
15:32:21*nsf quit (Quit: WeeChat 2.7)
15:32:35Zevvlook look, you're on reddit/programming fp already
15:54:19Araqer ... what's the problem again? --os:standalone sucks? yes it does, so don't use it
15:55:27Araqwe only use Ansi C features with --gc:arc, what's the trouble you're having?
15:55:51Araqesp what #include file(s) do we have to avoid?
15:56:15ZevvThe trouble I was having now is that memory allocation is being too smart
15:56:51Zevvhttps://github.com/nim-lang/Nim/blob/master/lib/system/osalloc.nim#L278
15:57:52Araqyes but that's under hostOS == "standalone"
15:57:53ZevvIMHO we should either just assume malloc/free/realloc will do the work, or make some method for explicitly registring these functions for nim to use
15:57:57Zevvsure
15:58:09Araqso why do you use --os:standalone
15:58:09Zevvbut we don't have a hostOs == "nothing"
15:58:18FromGitter<alehander92> yeah i tweaked that for lodka somehow
15:58:33Zevvalehander92: same for me when running inside the linux kernel
15:58:40Zevvaraq: what should I use then?
15:58:42Araqis lodka the wodka with love?
15:58:52Araq--os:linux
15:59:01Zevvbut I'm not running on linux
15:59:11ZevvI'm runing on some bare metal chip with a half baked libc implementation
15:59:18Zevvlike PMunch with his atmel
15:59:30Araqyeah ok, so we need a new --os switch
15:59:36FromGitter<alehander92> :D it's boat in bulgarian/probably russian
15:59:36FromGitter<alehander92> it seems we do have many words in -odk
15:59:36FromGitter<alehander92> odka, because why not
16:00:02Araqbut --os:linux is not really Linux specific
16:00:02Zevvright, --os:custom, --os:none, or whatever
16:00:26Zevvok, but there are no posixy-things available as well. It's basically ansi C with nothing
16:00:26FromGitter<alehander92> if yours is half baked mine is probably raw flour
16:00:52AraqZevv, do you have stdio.h?
16:00:56Zevvalehander92: I have them in all levels from raw to well-done
16:01:05FromGitter<bung87> how can I check `net_connections(pid = 461)` programatically ? I’m porting psutil support mac
16:01:06ZevvAraq: usually yes, and if not, I'm willing to provide one
16:01:19Zevvand put in whatever is needed.
16:02:14FromGitter<bung87> using thread or child process ?
16:03:06FromGitter<sheerluck> @alehander92 Russian here, lodka is a boat
16:05:28FromGitter<sheerluck> Ukrainian
16:05:46*marmotini_ quit (Remote host closed the connection)
16:07:05*marmotini_ joined #nim
16:07:59*ptdel joined #nim
16:09:38FromGitter<sheerluck> I have a feeling that I put a damper on this chat :(
16:11:14*marmotini_ quit (Ping timeout: 240 seconds)
16:15:15AraqZevv, do you have pthreads.h or something?
16:17:08Araqmaybe we should name it --os:ansic
16:19:56Zevvnope, no threads
16:20:08Zevvthink turbo C 1.0
16:21:25Zevv--os:ansic would be a good fit I think. If users want to go lower then that they coul/should provide or stub the necessities
16:22:21*icebattle joined #nim
16:22:34*Trustable joined #nim
16:25:11AraqZevv, can you add it? I'm afraid I cannot test it afterwards anyway
16:25:39AraqI had something else in mind, where you can import a custom runtime implementation detached from system.nim
16:25:58Araqbut that's more work and I should work on something else
16:26:37FromGitter<alehander92> @sheerluck yep, in bulgarian to
16:27:32FromGitter<alehander92> i think the custom runtime thing might make sense as well in theory
16:27:36shashlickhow can I check if a type has a specific field?
16:27:48shashlicklike if object has field x:
16:31:56Zevvaraq: ok
16:32:38Zevvdid/does nim ever run on msdos?
16:37:26Araqnever tried it, but good old DOS always had a place in the implementation, see doslikeFileSystem
16:37:29*floppydh quit (Quit: WeeChat 2.6)
16:39:01FromDiscord<Skaruts> @Araq, do you think it would be worth it for me to suggest adding a python-like "range" iterator to Nim? I implemented one for myself, and tbh I can't think of a reason why Nim shouldn't provide such a thing out of the box (and I know about `countup` and `countdown` but they aren't python-like). I could potentially offer mine for Nim, if people like it
16:41:04FromDiscord<mratsim> If we are allowed to use the "range" keyword for new things, Range would be quite useful once we have first class openarrays for the C++/D-like ranges.
16:41:53FromDiscord<mratsim> but then if we say "use ranges" we will have 3 kinds of ranges: the range for the type constraint (imo the less useful) the range for iterator, the range for streams
16:42:10FromDiscord<Skaruts> or "xrange", I just named mine range for the moment because I didn't think of xrange sooner (although I had no issues with conflicts with system range)
16:42:18FromDiscord<mratsim> no xrange is bad
16:42:28FromDiscord<Skaruts> why so?
16:42:33FromDiscord<mratsim> why x?
16:43:01FromDiscord<Skaruts> because it excludes the upper limit, so it could stand for "exclusive range" (in contrast to other Nim ranges)
16:43:39FromDiscord<Skaruts> personally I prefer range anyway, xrange is just the next best thing I could think of
16:44:01FromDiscord<Skaruts> to avoid confusion and stuff
16:44:31FromDiscord<Skaruts> I don't like repeat, or iter
16:44:41FromDiscord<Skaruts> or iterate, which is leaning on verbosity
16:44:41FromDiscord<mratsim> ah I see
16:44:49FromDiscord<mratsim> never made the connection with exclusive
16:44:58FromDiscord<Skaruts> me neither πŸ˜„
16:45:06narimiran@Skaruts you're not the first one to propose excluding ranges (and you'll not be the last one who Araq will reject :P)
16:45:10FromDiscord<Skaruts> I just thought of it like 10 miuntes ago
16:45:28FromGitter<alehander92> interesting
16:45:40Araq1. It's true that I have good arguments against exclusive ranges.
16:45:51FromDiscord<Skaruts> I got a list of good reasons for it lined up for the suggestion post
16:45:52Araq2. Nim already offers them though, written as ..<
16:46:04Araq(which is IMHO beautiful)
16:46:08FromDiscord<Rika> "they arent pythonic" i'm gonna guess
16:46:27FromDiscord<Skaruts> pythonic? screw pythonic...
16:46:38FromGitter<alehander92> his idea is kinda valid in that its hard to use custom step
16:46:55FromDiscord<Skaruts> a wise man once said *"if it's readable it's not pythonic enough"*
16:47:00FromGitter<alehander92> so some way to do it would be ok
16:47:00FromDiscord<mratsim> In Weave, it's exclusive range all the way down :p
16:47:42FromDiscord<mratsim> even in the random stdlib, the inclusive ranges cause problem in the uniform sampling algorithm
16:48:35FromDiscord<Skaruts> @Araq, none of that is a good reason why Nim couldn't provide it, anyone can use whichever they prefer, and I disagree with 2 ..< has a few disadvantages
16:49:21FromDiscord<Rika> i feel like xrange is too far of a name to countup to not make it confusing for new devs
16:49:59narimiran`countupto`
16:50:09FromDiscord<Skaruts> xrange is unified, it counts in either direction
16:50:13narimiran`countuptill`
16:50:34FromDiscord<mratsim> counting in either direction is bug-prone though
16:50:36Araqmratsim: In no language I know of does a[a.len] actually work
16:50:42AraqI mean
16:50:49Araqin no language that uses 0 based indexing
16:50:55FromDiscord<Rika> haha
16:51:05Araqso that's the root cause for this "exclusive is superior" idea
16:51:05FromDiscord<Rika> was about to say "but julia"
16:51:10FromDiscord<mratsim> but what's the link with exclusive range?
16:51:43Araqthe link is obvious to me, indexing is close to slicing
16:52:37Araqnot to mention that exlusive countup is not symmetric to countdown
16:52:57Araq(countdown with an exclusive starting point is unheard of)
16:53:08FromDiscord<Skaruts> that's true, but Nim offers other ways to loop that are
16:53:15Araqbut this is all besides the point
16:53:20FromDiscord<Skaruts> https://play.nim-lang.org/#ix=26PV
16:53:23Araqwe do have ..< and it's beautiful
16:53:28Araqso what's wrong with ..< ?
16:53:48FromDiscord<mratsim> it's not about ..<
16:53:52narimirani feel this is an another "& is too hard to reach"
16:53:58FromDiscord<mratsim> it's about countup(0, n-1, 2)
16:54:07FromDiscord<Skaruts> no narimiran, it's not
16:54:12Araqok, so you need the step argument
16:54:16FromDiscord<mratsim> no
16:54:17Araqis it about the step?
16:54:22FromDiscord<mratsim> it's the n-1 that is error prone
16:54:35narimiranand having two ranges is not error prone?
16:54:57Araqif the step doesn't matter there is already ..<
16:54:58narimiranhow can i be sure that author really wanted excluding/including range at some point in their code?
16:55:17FromDiscord<mratsim> Having ..< which is exclusive and countup which is inclusive is error prone yes
16:55:18AraqI'm waiting for Skaruts's reply
16:55:20FromDiscord<Rika> ~~especially when one is called xrange and the other is countup~~ πŸ˜› not serious here
16:55:21disbotno footnotes for `~especially`. πŸ™
16:55:28FromDiscord<Rika> ?????
16:55:34FromDiscord<Rika> disbot wtf
16:55:36FromDiscord<mratsim> ~Rika is a footnote
16:55:37Araqignore disbot
16:55:37disbotRika: 11a footnote
16:55:47FromDiscord<Skaruts> Arraq, when I was starting learning nim I had a real beef with `..<`, because I would forget many `<`s and then I struggled to find the source of errors becuse it's really easy to overlook a missing `<`. Plus, the difference between `..<` and `..` in the loop lines is very subtle, makes the code less readable than `range(10)` vs `range(10+1)`
16:55:53FromDiscord<Rika> i am now a footnote
16:56:22FromDiscord<Rika> skaruts, i'd say a +1 or -1 is just as hard to spot as a <
16:56:22FromDiscord<mratsim> `..<` `..` is OK for me though
16:56:39shashlickAraq: I have created an nkIdent("cchar") but in renderer.nim, it gets converted into a cstring - is this a known issue?
16:56:39AraqRuby uses .. vs ...
16:56:45narimiran"I would forget many `<`s" -- and you're telling me this is not "& is too hard to reach" :)
16:57:21FromDiscord<mratsim> it's the constant jump between "a ..< b" and "countup(a,b-1,step)" that I find annoying
16:57:32FromDiscord<Rika> γ‚„γ‚γ¦γ‚ˆ
16:57:48FromDiscord<Rika> ~~im not even N5, i should not use japanese...~~
16:57:48disbotno footnotes for `~im`. πŸ™
16:57:52FromDiscord<Rika> damn it
16:58:01Araqok so for mratsim it is all about the 'step', a fair point
16:58:12FromDiscord<Rika> the step one is a compelling argument yes
16:59:17*marmotini_ joined #nim
16:59:26FromDiscord<mratsim> in Weave I use "for i in 0 ..< 100, stride = 10:" (pseudocode, with my own parallel for)
16:59:47Araqfor in strided(0, N, 3)
16:59:57FromDiscord<mratsim> you forgot the N-1
17:00:00Araqwould be an acceptable addition
17:00:13Araqmratsim: no, it's exclusive
17:00:19FromDiscord<mratsim> ~-~
17:00:20disbotno footnotes for `-~`. πŸ™
17:00:31FromDiscord<Rika> strided sounds
17:00:36Araqfor i in strided(0, N, 3) # my proposal
17:00:37FromDiscord<Rika> kinda cryptic to me
17:00:43FromDiscord<Clyybber> if something is exclusive I think it should always get the x prefix
17:00:45Araqbut a better name would be nice
17:00:46FromDiscord<Clyybber> so xstrided
17:00:59FromDiscord<Rika> why strided anyway?
17:01:06FromDiscord<Clyybber> right
17:01:12Araqdunno, so come up with something better
17:01:13FromDiscord<Clyybber> thats what I was about to ask
17:01:22Araqbut remember: no more additions to system.nim ...
17:01:26FromDiscord<mratsim> Strided is common in machine learning/linear algebra/scientific computing
17:01:27FromDiscord<Clyybber> I mean why does ..< not suffice?
17:01:41Araqbecause it lacks the 'step', Clyybber
17:01:42FromDiscord<Skaruts> narimiran, is a noob's perspective only valuable when you agree with it? Because I didn't see you arguing against anyone who defends something with "this might confuse noobs", well ..< confused me as a noob
17:01:55FromDiscord<Clyybber> Aah
17:01:55FromDiscord<mratsim> when you jump by more than 1 in matrix accesses we call that a stride
17:02:30FromDiscord<mratsim> and in low-level programming it's a strided memory access
17:02:41narimiraneh, if i wanted to fix everything that was confusing to me when i started with nim, not much would be left by now :D
17:03:08AraqSwift also has ..< iirc
17:03:19AraqRust choose .. vs ..=
17:03:20FromDiscord<Skaruts> I'm not trying to fix everything that confused me, so your point is moot
17:03:23Araq*chose
17:03:35FromDiscord<mratsim> ..= is ugly
17:03:38FromDiscord<Clyybber> @Skaruts ..< is not gonna go away
17:03:43FromDiscord<Clyybber> we agreed yesterday
17:03:46FromDiscord<Clyybber> didn't we?
17:03:50FromDiscord<Skaruts> I'm not trying to make it go away!!!!
17:03:52FromDiscord<Clyybber> that its better to have .. be inclusive
17:03:53FromDiscord<Skaruts> geeez
17:04:05AraqSkaruts: please relax
17:04:12FromDiscord<mratsim> it's about replacing countup/or add an alternative to countup
17:04:16FromDiscord<Skaruts> and I'm not arguing against the inclusive loops
17:04:24FromDiscord<Skaruts> I'm just suggesting adding a python like one.
17:04:32FromDiscord<Clyybber> ok
17:04:41FromDiscord<Clyybber> xcountup xcountdown?
17:04:56FromDiscord<mratsim> xup xup
17:05:02FromDiscord<Skaruts> sorry Araq, but I begin feeling like it's hard to talk about things here
17:06:29Araqwell we are trying to ensure a non-toxic environment
17:06:43Araqanyhow, what do you think about xcountup?
17:07:03FromDiscord<mratsim> anyway, I find the iterator OK, probably in sugar.
17:07:03FromDiscord<mratsim> I don't know about the names
17:07:13FromDiscord<Rika> xcountup sounds ok yeah
17:07:17FromDiscord<Skaruts> well the point of the iterator was to be unified, you can count either up or down, and also choose the step
17:07:30FromDiscord<Skaruts> (and to exclude the limit)
17:07:38FromDiscord<mratsim> how would xrange work when counting down?
17:07:54FromDiscord<Skaruts> https://play.nim-lang.org/#ix=26PV
17:07:58FromDiscord<mratsim> do you exclude the beginning or the end?
17:08:12FromDiscord<Rika> end i assume
17:08:22FromDiscord<Skaruts> it's like python's
17:08:38FromDiscord<Rika> so end
17:08:43FromDiscord<Clyybber> the fact that its not intuitively clear which end we should exclude makes it not a good idea IMO
17:08:53FromDiscord<mratsim> it's always the end
17:08:57FromDiscord<Skaruts> yea
17:08:59FromDiscord<Rika> yeah
17:09:07FromDiscord<mratsim> that's easier than in some case the begining and in the other the end
17:09:33FromDiscord<Rika> i dont know any language that excludes the start when counting down
17:10:06FromDiscord<Clyybber> then it wont be much useful to counting down
17:10:16FromDiscord<Clyybber> for indexes
17:10:45FromDiscord<Clyybber> since you'd have to do: xrange(a.len-1, -1) ?
17:11:06FromDiscord<Rika> yeah
17:11:11FromDiscord<Rika> thats what i thought too
17:11:13FromDiscord<Skaruts> I suppose you can see the code I posted on nim-playground? (@Clyybber was telling me yesterday that they couldn't)
17:11:20FromDiscord<Skaruts> I can post elswhere if needed
17:11:31FromDiscord<Rika> i should have left 30 minutes ago
17:11:32FromDiscord<Clyybber> was probably some ff bug, it worked the second time
17:11:35FromDiscord<Rika> goodbye for real
17:11:36narimiranIIRC the reason why we have both countup and countdown is that you can do `countup(someLargeNo, someSmallNo)` and there will be nothing to iterate
17:11:41FromDiscord<Clyybber> bb
17:12:02narimiranthis won't play nice if you have only one xrange for both up and down
17:12:07FromDiscord<Skaruts> well you already have those, so
17:12:22FromDiscord<mratsim> it's an addition not a all-encompassing replacement
17:12:25FromDiscord<Clyybber> its just not a good candidate for the stdlib IMO
17:12:33FromDiscord<Skaruts> I'm not asking to take anything away from Nim, only to add something more
17:12:39FromDiscord<mratsim> I think it's good in sugar
17:12:42FromGitter<alehander92> but sometimes this is bad
17:12:48FromGitter<alehander92> because it gives you too many options
17:12:56FromGitter<alehander92> and makes code less uniform
17:13:14FromGitter<alehander92> i dont want to see both 0 ..< n and range(0, n) everywhere, its good to have certain style
17:13:15FromDiscord<Skaruts> well that would be an argument against macros...
17:13:33FromGitter<alehander92> not really
17:13:41FromDiscord<Clyybber> this whole where do we cut 1 off, is evidence that a range iterator would be better than an xrange iterator
17:13:50FromDiscord<mratsim> but you have to even today due to ..< not supporting counting down or steps
17:13:51FromGitter<alehander92> you can have both original and just replacing api-s created with macros
17:14:04FromDiscord<Clyybber> because having the -1 or +1 will be less confusing than having to know how xrange behaves
17:14:10FromDiscord<Skaruts> yea you already have differnt code as it is
17:14:15FromGitter<alehander92> but i agree that range might be useful in sugar, just tried to point out
17:14:21FromDiscord<mratsim> the -1 is very annoying
17:14:48FromGitter<alehander92> Skaruts i am talking about different ways to do the same very simple thing
17:14:53FromDiscord<Clyybber> @mratsim keep in mind I'm talking about range, not xcountup or xcountdown
17:14:53FromGitter<alehander92> cant see what macros have to do with it
17:15:03FromDiscord<Clyybber> xrange(a.len-1, -1) this is even more annoying
17:15:05FromGitter<alehander92> just tried to show you that there are many possible angles
17:15:12Araqone thing that I will never accept is basing the iteration order on a runtime value
17:15:14FromGitter<alehander92> otherwise i agree range in sugar might be ok
17:15:16FromDiscord<mratsim> but then you can use countdown
17:15:35FromGitter<alehander92> but you also have to accept other people's views
17:15:46FromDiscord<mratsim> for generic code that needs to support iterating in multiple direction, xrange would be useful
17:15:49FromDiscord<Clyybber> @mratsim You can always use countdown and countup, no range required
17:15:50Araqbecause I've never seen a convincing example of its usefulness
17:15:54FromDiscord<Clyybber> @mratsim no it wouldn't
17:16:02FromDiscord<Clyybber> because youd still have to special case it
17:16:07FromDiscord<Clyybber> xrange(a.len-1, -1) ?
17:16:23FromDiscord<Skaruts> if that's annoying on xrange, it's annoying on ..< and countdown
17:16:24FromDiscord<mratsim> no, it's just exclusive
17:16:46FromDiscord<Clyybber> @Skaruts no because countdown is inclusive and ..< only counts up
17:17:10FromDiscord<Clyybber> @mratsim Exclusive can have two meanings, and which one you want depends on the case
17:17:17FromDiscord<Skaruts> and besides, it's just (a.len, 0) in my implementation, you don't need the steping in that case
17:17:22FromDiscord<Clyybber> so that makes it a bad candidate for the sdtlib iMO
17:17:33FromDiscord<Skaruts> actually no, you need the -1 on a.len
17:17:41FromDiscord<Clyybber> exactly
17:18:00FromDiscord<Skaruts> but the stepping is the optional 3rd argument, not second, second is the limit
17:18:11FromDiscord<Clyybber> in my case too
17:18:15FromDiscord<mratsim> Well all my use cases: Arraymancer slicing and Parallel For loop are much more naturall mapped with exclusive range and strides
17:18:31FromDiscord<Clyybber> @Skaruts Its counting down from a.len -1 to 0
17:18:44FromDiscord<Skaruts> everything just fits into place with exclusive ranges... hence why every nim loop includes a `<`
17:18:44FromDiscord<Clyybber> but since it will exclude the zero you have to do -1
17:18:58FromDiscord<Skaruts> (I'm generalizsing of course, there are exceptions)
17:19:03FromDiscord<Clyybber> nothing fits
17:19:40FromDiscord<Skaruts> then why is everyone using `<` all the time?
17:19:42FromDiscord<Clyybber> Either you do exclude the upper bound, or you say always exclude the end and end up with this: xrange(a.len-1, -1)
17:19:50FromDiscord<Clyybber> @Skaruts BECAUSE IT ONLY COUNTS UP
17:19:53FromDiscord<mratsim> personally I wrote much more loops that needs the a.len-1 than those that countdown to 0
17:20:01FromDiscord<mratsim> please @Clyybber don't shout
17:20:12FromDiscord<Clyybber> its not meant as shouting
17:20:17FromDiscord<Clyybber> just as bold text
17:20:19FromDiscord<Clyybber> or something
17:20:26FromDiscord<Skaruts> countdowns don't fit but count downs are rare cases @Clyybber
17:20:58FromDiscord<mratsim> anyway, I think we should stop the bikeshedding there
17:21:20FromDiscord<mratsim> I propose that you open a PR in sugar.nim, and use xrange for the name
17:21:47planetis[m]for anyone who wants to help https://github.com/b3liever/cairo2 these are cairo bindings for nim, it compiles and works @treefrom
17:22:42FromDiscord<Skaruts> I've never opened a PR, tbh I have no clue what to do
17:23:03FromDiscord<Clyybber> @Skaruts IMO consistency and logic > I need this often spare me two keypresses
17:23:45FromGitter<alehander92> Skaruts sorry i was very nervous its a very interesting discussion keep motivation
17:24:04FromDiscord<Skaruts> no worries mate
17:24:37FromDiscord<Skaruts> @Clyybber xrange is consistent with Nim's tendency to make things implicit in favor of readibility and clean code, unlike countup and countdown which require typing both ends explicitly
17:24:52FromDiscord<Skaruts> (always)
17:25:10FromGitter<alehander92> thanks, so about PR-s, you clone the repository, use devel branch ! (optionally you create a new branch), and you add the new function in the code on your computer, add eventually a test file and then push, and in github you will see UI for PR
17:25:12FromDiscord<Clyybber> no
17:25:39FromDiscord<Clyybber> @Skaruts we don't make things explicit to make them logically ambiguous
17:25:56FromDiscord<Skaruts> there's nothing ambiguous about xrange mate
17:26:12FromDiscord<Clyybber> there is
17:26:14FromDiscord<Skaruts> people have been using it in python for ages
17:26:22FromDiscord<Clyybber> it is not clear wether you exclude the end or the upper bound
17:26:33FromDiscord<Skaruts> it's always the end
17:26:45FromDiscord<Clyybber> yeah but thats arbitrarily defined
17:27:09FromDiscord<Clyybber> in fact I'd argue excluding the upper bound makes more sense
17:27:21AraqClyybber: don't fight it too much, if it's called 'xrange' like in Python it should behave like in Python
17:27:30FromDiscord<Skaruts> alehander, thanks gonna take a look
17:27:32FromDiscord<Clyybber> But its illogical
17:27:40FromDiscord<Clyybber> or not illogical
17:27:44FromDiscord<Skaruts> Araq, exactly (although I made two slight improvements)
17:27:49FromDiscord<Clyybber> but there is no justification for the behaviour
17:27:57Araqand it's not about saving "-1" as keystrokes, it's that you can forget them and get a runtime error
17:27:58FromDiscord<Clyybber> so IMO it should just not exist in nim
17:28:35FromDiscord<Clyybber> Araq: Forgetting the x in xrange is about equally likely I'd argue
17:29:02FromDiscord<Skaruts> countup(a.len-1)?
17:29:14FromDiscord<Skaruts> xrange(a.len)
17:29:24FromDiscord<Clyybber> @Skaruts there is no countup with one arg
17:29:33FromDiscord<Skaruts> yuo get the point mate
17:29:36FromDiscord<Clyybber> no
17:29:40FromDiscord<Skaruts> but that help my point further
17:29:46FromDiscord<Clyybber> because if there is xrange there would also be range
17:29:56FromDiscord<Skaruts> countup(0, a.len) vs xrange(a.len)
17:30:02FromDiscord<mratsim> come on, let's stop
17:30:12FromDiscord<Skaruts> correction: countup(0, a.len-1) vs xrange(a.len)
17:30:22*tane joined #nim
17:30:40FromDiscord<Clyybber> @Skaruts My point was that when range exists, it is equally easy to miss the x in xrange and write range instead
17:31:01FromDiscord<mratsim> range doesn't exist though
17:31:19FromDiscord<Skaruts> ok but that's a compiler error saying the error is right thre, and not a out of bounds somewhere else
17:31:20FromDiscord<mratsim> and in python range used to exist and has been deprecated to xrange during Python 2.1 iirc
17:31:22FromDiscord<Clyybber> @mratsim If xrange existed it would be weird to have range not exist, wouldnt it?
17:31:43FromDiscord<Clyybber> @Skaruts No it would not
17:31:52FromDiscord<Clyybber> Because if range existed it would just be an oob
17:31:54FromDiscord<Clyybber> error
17:32:09FromDiscord<mratsim> ah, Python 3 removed incluive range, only kept xrange and renamed it range
17:32:19FromDiscord<Clyybber> oh god
17:32:29FromDiscord<Skaruts> undeclared identified range (or maybe ambiguuous call with system range or whatever), it's very different from an obscure segmentation fault
17:32:45FromDiscord<mratsim> actually no
17:32:47FromDiscord<Skaruts> yup, xrange = python 2, range python 3
17:32:56FromDiscord<mratsim> range vs xrange was about list vs generator
17:33:04FromDiscord<Skaruts> that too
17:33:05FromDiscord<mratsim> not about inclusive/exclusive
17:33:15FromDiscord<Clyybber> @Skaruts Please listen to me.
17:33:32FromDiscord<Clyybber> I said if xrange and range existed you could miss the x and then end up calling range
17:33:38FromDiscord<Clyybber> it wont be a compile time error
17:33:51FromDiscord<mratsim> but there is no range
17:34:02FromDiscord<mratsim> and no reason to add it
17:34:21FromDiscord<Skaruts> range does exist (in system), so if you miss the x you'll get an error, I got it while developing this
17:34:35FromDiscord<mratsim> yes but it's a type
17:34:37FromDiscord<Skaruts> but it tells the proper line
17:34:43FromDiscord<Skaruts> yes
17:35:40FromDiscord<Skaruts> while missing a `<` may give you either undefined behavior or an out of bounds index somewhere else which makes it harder to find the source
17:35:57FromDiscord<Skaruts> or bugs
17:35:59FromDiscord<Clyybber> no, no undefined behaviour
17:36:27FromDiscord<Clyybber> @mratsim if there is no reason to add range there is no reason to add xrange either
17:36:30FromDiscord<Skaruts> if you're drawing a terminal emulator you'll draw beyond the screen
17:36:39FromDiscord<Clyybber> so we should just add xcountup and xcountdown
17:36:50FromDiscord<Clyybber> @Skaruts Ok, fair enough
17:36:57FromDiscord<Skaruts> no thanks, too verbose names
17:37:07FromDiscord<Clyybber> what the hell
17:37:27FromDiscord<Skaruts> I prefer shorter names, and I prefer the unified thing tbh
17:37:33*Trustable quit (Remote host closed the connection)
17:37:42FromDiscord<Clyybber> are you aware that xrange has a runtime impact??
17:37:45FromDiscord<Skaruts> *"one iterator to rule them all!"*
17:37:48FromDiscord<mratsim> Nim iterators take a large inspiration from Python.
17:37:48FromDiscord<mratsim> xrange/range are also in Python.
17:37:48FromDiscord<mratsim> They also address a pattern that is demanded but missing, exclusive iteration with steps
17:38:43FromDiscord<Skaruts> do function overloads have overhead?
17:38:46FromDiscord<Skaruts> proc*
17:38:49FromDiscord<Clyybber> no
17:38:57FromDiscord<mratsim> Ideally, I'd like a coherent iteration/sequtils/C++-like ranges design, but since we have none, something in sugar is the next best thing
17:39:04FromDiscord<Skaruts> then what's the runtime impact?
17:39:06FromDiscord<Clyybber> but range must decide at runtime which direction to iterate in
17:39:14FromDiscord<mratsim> the overhead is the if/else switch
17:39:38FromDiscord<Skaruts> ok. fair enough. It tests the condition only once though
17:39:44FromDiscord<mratsim> And there is a codebloat overhead as well
17:39:53FromDiscord<mratsim> because you inline the iterator code twice
17:40:15FromDiscord<Skaruts> not sure what you mean by that
17:40:15FromDiscord<mratsim> this one is a bit more worrying
17:40:36FromDiscord<mratsim> the body of the for loop is inlined in the iterator
17:40:43FromDiscord<mratsim> but you have 2 branches
17:40:50FromDiscord<mratsim> so the body will be inlined twice
17:41:08FromDiscord<Skaruts> by inlined you mean the body of the loop is in the same line?
17:41:33FromDiscord<Skaruts> as the for
17:42:37FromDiscord<mratsim> What I mean is that when you create an iterator with branching, take a big for loop with lots of stuff inside, compile it, and ensure that that big body is not duplicated.
17:43:32FromDiscord<Clyybber> so disadvantages of having xrange: Excluding end is arbitrarily defined, runtime impact.
17:43:42FromDiscord<Clyybber> advantages: not having to write xcountup, xcountdown
17:43:52solitudesfis this "i used to how its done in python, so i refuse to adjust" round infinity?
17:44:11FromDiscord<mratsim> that's not the only advantages, you don't need to write the beginning, it's implictly 0, and you don't need to do len-1
17:44:21*rockcavera quit (Read error: Connection reset by peer)
17:44:32FromDiscord<mratsim> It's about reusing good design as well.
17:44:36FromDiscord<Skaruts> I'm still not getting it tbh... πŸ˜•
17:44:36*rockcavera joined #nim
17:44:52FromDiscord<Clyybber> not writing the beginning is even worse
17:44:57FromDiscord<mratsim> put "echo "There can only be one""
17:45:11FromDiscord<Clyybber> even more ambiguity yay!!!
17:45:13FromDiscord<mratsim> and check in the C code that this line is outputted one or twice
17:45:35FromDiscord<mratsim> if it's outputted twice, it means that anythin in that loop will be duplicated
17:45:52FromDiscord<Clyybber> IMO a seperate `repeat` iterator would be a much better idea
17:46:02FromDiscord<mratsim> not critical but some crazy people put crazy stuff in iterators
17:46:08FromDiscord<mratsim> (like me)
17:46:09FromDiscord<Skaruts> I checked with an echo before the for loops and it was only once
17:46:13FromDiscord<mratsim> good
17:46:24FromDiscord<Skaruts> although, I will check again because I made some changes meanwhile
17:47:41*nsf joined #nim
17:50:57FromDiscord<Skaruts> echoes only once on all cases
17:51:27FromDiscord<Skaruts> I suppose you meant it in this order `if cond: echo "bla"; for bla bla`
17:52:38Araqcan we end the discussion now? you can write a PR and we can vote about it
17:54:31FromDiscord<mratsim> seconded
17:54:33FromDiscord<Skaruts> kinda seems like it already ended, mratsim was just giving me some tips on the code I wrote
17:56:19FromDiscord<mratsim> btw @Araq, is that data structure something that cannot be supported at all in C++ and I'm doomed or fixing the Nim codegen will make my code great again? https://github.com/nim-lang/Nim/issues/13062
17:56:21disbotβž₯ C++ Atomics in union: ::<unnamed union>::<unnamed struct>::field with constructor not allowed in anonymous aggregate ; snippet at 12https://play.nim-lang.org/#ix=26Qh
18:01:59Araqmratsim: I've been thinking about it
18:07:55YardanicoMaybe some people already know it, but there's a neat Chrome extension (which will of course work on any chromium-based browser) which creates links for stdlib modules on github and even works on local modules of the project (sometimes) https://chrome.google.com/webstore/detail/module-linker/dglofghjinifeolcpjfjmfdnnbaanggn
18:08:18YardanicoSadly it has some issues like it doesn't know about std/module or "from module import something", and looks like that: https://i.imgur.com/RB9SGir.png
18:08:38YardanicoLight green are "local" modules (in the same folder, if you click you'll go directly to them), deep green are stdlib modules
18:08:53Yardanico(by clicking on them you go directly to the stdlib docs)
18:09:16YardanicoThe developer probably just used Python import syntax parsing as a base for this, but it works pretty well :P
18:10:58FromGitter<Albus70007> why do asyncnet sockects return Future[system.string]??
18:11:08Yardanicobecause you need to "await" them
18:11:29FromGitter<Albus70007> so i cant print the data recieved?
18:11:32Yardanicoor asyncCheck, or some other thing, but that's how async works
18:11:49Yardanicoyou can, check https://nim-lang.org/docs/asyncnet.html#examples-chat-server
18:11:55Yardanico"let line = await client.recvLine()"
18:12:12FromGitter<Albus70007> but i am recieving a buffer of data
18:13:39Yardanicothen it's await client.recv(size)
18:14:03FromGitter<Albus70007> await seems to throw me an error
18:14:18YardanicoBasically that's the main difference between async and sync, with async you can let IO-heavy tasks kinda run in the background
18:14:23FromGitter<Albus70007> undeclared identifier: await
18:14:28Yardanicodid you import asyncdispatch ?
18:14:38YardanicoThat's the nim stdlib module used for writing async code
18:15:17FromGitter<Albus70007> ok
18:15:37disruptekthe difference between range and xrange in python has nothing to do with "exclusivity".
18:15:44Araqmratsim: for now my only idea is the usual solution
18:15:58disruptekone the pre-alloc'd and xrange is generated jit.
18:16:02Araqmove the ' impl: PledgeImpl' declaration out of the 'case'
18:16:19Araqin your example this causes no further memory overhead
18:16:32FromGitter<Albus70007> it says: rootsocket.recv(1024) has no type (or is ambiguous)
18:18:14YardanicoCan you show us the code? maybe paste it on ix.io or bpaste.net or paste.debian.net or del.dog or whatever paste service you like :)
18:18:49FromGitter<Albus70007> i think i had to put {.async.} in the functions
18:18:58YardanicoAh, yeah, of course, to make them async you need to do that
18:19:31YardanicoI'd suggest you to read some docs or examples from asyncdispatch :)
18:22:00*rauss quit (Quit: WeeChat 2.7)
18:27:17FromDiscord<mratsim> @Araq, the full example is there: https://github.com/mratsim/weave/blob/master/weave/channels/pledges.nim#L150-L158, there is no memory overhead because I allocate from a fixed size block from a memory pool but I lose the safety of variants
18:27:30FromDiscord<mratsim> *if I move outside of the case
18:29:36Araqsure but I have no other solution for now
18:30:17Araqso weird that Atomic has a non-trivial constructor
18:31:46YardanicoA guy in telegram just found out that if you put ; instead of # in nim.cfg the compiler segfaults :D
18:32:40Araqwhat?
18:32:48Yardanicoyes
18:32:50Araqgotta try this
18:32:52FromGitter<Varriount> Araq: If runtime type information is no longer present in ARC, how will modules such as marshal work?
18:33:12AraqVarriount: by code generation through macros
18:33:30Araqor maybe by good old overloading and fieldPairs()
18:50:29ZevvPff lot of hairy cases in the allocator code in system lib
18:50:42disruptekif you put ; instead of # ???
18:50:46disruptekwut
18:51:09disruptekthat's such a lame bug.
18:51:10disruptekjesus.
18:51:44disruptekback in my old shop, we had a special shrine to nouns like that.
18:51:49disruptekthe wall of shame.
18:51:52Araqdisruptek, fix it already
18:51:55disruptekit actually wasn't even a wall.
18:52:06YardanicoI wonder how that guy actually stumbled upon it :D
18:52:17disruptekit was a window. and we'd line up all our trophies of confidence there.
18:52:26disruptekand also amazing finds from customer cars.
18:52:34narimiranYardanico: just some lisper using ; for comments?
18:52:47solitudesfmy editor thinks that default comment symbol for cfg files is ;
18:52:52disruptek; is a comment in the .ini format nimble used to use, right?
18:53:19Yardanicoit also crashes with &
18:53:26disruptekcan't quite fathom the relation.
18:53:43disrupteki'll fix it. man, that's awesome.
18:54:04AraqZevv, as I said -d:useMalloc --gc:arc avoids Nim's custom allocator
18:55:08Zevvyeah but there's nooks and crannies
18:55:13ZevvI'm fine but it takes some digging
18:55:22YardanicoI'll test with all printable ASCII characters right now, I'm really curious
18:55:32disrupteknooks and crannies, huh
18:55:49disrupteki think that's a new one on me.
18:56:15disruptekzevv, if you need some help over there, just ask, buddy.
18:56:26Zevvnah, just need to do some code reading
18:56:53Zevvthere's just tons of whens() which all depend on other things which depend
18:56:53Zevvetc
18:57:38disruptekoh, i guess that does sound kinda tricky.
18:57:49AraqI'm patching the code with 'and not defined(StandaloneHeapSize)'
18:58:12Araqbecause that's the one piece of logic in all of --os:standalone that makes sense
18:58:48Araqso you can do
18:58:50Araqnim c --d:StandaloneHeapSize=50 -r --gc:arc temp.nim
18:58:52Araqor
18:58:59Araqnim c --d:useMalloc -r --gc:arc temp.nim
18:59:26Zevvbut we do need an --os:somethingnew probably, right
18:59:39Araqright.
18:59:51ZevvI don't want to pull in mmdisp for example
19:00:08Araqmmdisp is only whens
19:00:18Araqit doesn't produce any code
19:00:26Araqsafe to keep it around
19:01:28Yardanicoso nim.cfg crashes with all of these at the start of the line
19:01:29Yardanico40:(, 41:), 44:,, 48:0, 49:1, 50:2, 51:3, 52:4, 53:5, 54:6, 55:7, 56:8, 57:9, 59:;, 91:[, 93:], 96:`, 123:{, 125:},
19:02:07Zevvleorize[m]: got another situation with """ parsing
19:02:18Yardanicohttps://play.nim-lang.org/#ix=26RI
19:02:33Yardanicobe careful, it will create 255 folders :P
19:06:29narimiranZevv: please, no more improvements for you :P the last one made highlighting of system.nim awful (it is now fixed)
19:07:14disruptekwut
19:07:18disruptek255 folders?
19:07:27disruptekis this some kind of practical joke?
19:07:37Yardanico?
19:07:45disruptekam i on camera right now?
19:07:58solitudesfyou are, im recording and streaming this irc right now
19:08:09Yardanicohey mom im on the tv
19:08:18disruptekget a load of this guy.
19:09:56disrupteki repro'd with a ; at the end of a line.
19:10:25FromGitter<Albus70007> i have an issue i commented yesterday with some c++ server sending me json data, can someone help me?
19:10:47disrupteksure, albus, but please use a pastebin.
19:11:09FromGitter<Albus70007> yes, i already have one
19:11:11Yardanicopastebin is not cool, they have ands :(
19:11:13Yardanico*ads
19:11:28disruptekwell, whatever the kids are calling it these das.
19:11:32disruptek^days
19:11:38FromGitter<Albus70007> https://pastebin.com/u13H9MYe
19:11:41Yardanico:(
19:11:43FromGitter<Albus70007> thats my nim client
19:11:46disrupteklol
19:12:14Yardanico@Albus70007, well, from the start, your toJson can be greatly simplified if you use %* or json.to
19:12:15disruptekyou guys are hilarious to me today for some reason.
19:12:20Zevvnarimiran: well, don't go to system.nim line 3558 then
19:12:40disrupteki dare you to go there.
19:13:06disruptekwhat are you waiting for?
19:13:14FromGitter<Albus70007> which is able to recieve data from the server (which i can only provide the executable) a few iterations, 3 with C backend and 27 with C++ backend
19:13:14disruptekdo not deny me this.
19:13:44disruptekalbus: really? the c backend produces different results?
19:14:12disruptekthat's pretty interesting.
19:14:13FromGitter<Albus70007> and also the number of echos i have between iterations
19:14:22Yardanico@Albus70007 can you give the executable? maybe upload it on transfer.sh or something
19:14:26YardanicoI'll try to run it via wine :P
19:15:04Yardanicoalso please give PlayerInputs module :)
19:15:10FromGitter<Albus70007> ill try, ok
19:15:40FromGitter<Albus70007> PlayerInputs its just a type with those fields i fill, i will add it to the pastebin
19:17:06FromGitter<Albus70007> not gonna lie, idk how to use transfer.sh :p
19:17:31disruptekit doesn't matter. πŸ˜‰
19:18:17Zevvaraq: am I supposed to fall into the 'elif defined(nimV2) or usesDestructors:' branch in mmdisp:511 ?
19:18:26Yardanicoyou can just upload fiels via the browser on https://transfer.sh :)
19:18:35Yardanicoor use any other file sharing platform like google drive
19:18:48Yardanicotransfer.sh has this "click to browse." button
19:19:07*narimiran went to line 3558 and never came back
19:19:38Zevvand please, can you disable the message at exit about the nimsuggest termination
19:19:40Zevvit is noise
19:19:43Zevvand not informative
19:19:55AraqZevv, yeah
19:20:04lqdev[m]is there any way of "flattening" generic types in macros? eg. I have a glm `Vec2[float]`, and I'd like to get the final object implementation. simply doing `x[0].getTypeInst[1].getTypeImpl` doesn't help, because I get a typedesc for an nnkGenericBody, but I'd like an nnkObject
19:20:24FromGitter<Albus70007> ok, it says, Uploading... loopback.exe has it finished yet?
19:20:34Yardanicowell it will show a progress bar :)
19:20:34ZevvAraq: ok, that's good then.
19:20:36lqdev[m]this works for variables, eg. calling `getTypeImpl` on `var a: Vec2[float]` works fine
19:20:48ZevvThis basically works, although I probably touched stuff I shouldn't have
19:20:48Yardanicoand is that server yours or is it available publicly anywhere?
19:20:54lqdev[m]:s/works fine/does what I want/
19:21:01Yardanicoor did you get the protocol stuff by reverse engineering (just curious)?
19:21:35FromGitter<Albus70007> progress bar is at 100%
19:21:44Yardanicowell upload it using your own file sharing platform
19:21:53FromGitter<Albus70007> ok
19:21:59Yardanicothe one you like
19:22:59FromGitter<Albus70007> https://drive.google.com/file/d/1loaTp5P4KwIPDdbofAAgsodfmSbmQmiB/view?usp=sharing
19:23:43FromGitter<Albus70007> this will run the server for a thousand iterations i think and will return some stats
19:23:51FromGitter<Albus70007> usage is like this:
19:24:35FromGitter<Albus70007> loopback.exe -port myportnumber(8085 hardcoded in my program) -num_cars 2
19:25:58FromGitter<Albus70007> also PlayerInputs are in the pastebin now
19:26:17federico3https://nim-lang.org/araq/gotobased_exceptions.html "In the goto based exceptions mode checked runtime errors like Index out of bounds or integer overflows are not catchable" ... this is a very big drawback
19:26:38Yardanicook it seems I got it to run in wine lemme check
19:27:12Yardanico"n = n or pair.b.uint16 shl pair.a" undeclared b here
19:27:30FromGitter<Albus70007> in my code?
19:27:35Yardanicoyes
19:27:42FromGitter<Albus70007> line?
19:27:57Yardanico46-47 on pastebin
19:28:01Yardanico"n = n or pair.b.uint16 shl pair.a"
19:28:24FromGitter<Albus70007> i guess its bs
19:28:49Yardanicomaybe it's pair[1] and pair[0]?
19:29:06Yardanicoat least it compiles that way
19:29:36FromGitter<Albus70007> i borrowed that code from someone in here, idk
19:29:47Yardanicowhat to do after starting both?
19:30:21FromGitter<Albus70007> nothing, it should print a few times the inputs and then stop
19:30:51Yardanicowell yeah it only prints one time and hangs
19:30:57FromGitter<Albus70007> i commented every echo maybe
19:31:36Yardanicono
19:31:57FromGitter<Albus70007> whats your nim version?
19:32:39Yardanicolatest devel, it hangs on bot.rootsocket.recv after first iteration
19:32:42YardanicoI'll do some things to check why
19:32:47Zevvar_q: is there a way to avoid instantiation of a 13Kb MemRegion object?
19:35:11FromGitter<Albus70007> @Yardanico , b is just a type that zip() returns
19:35:21Yardanicowhat's your nim version btw?
19:35:30FromGitter<Albus70007> 1) 0.4
19:35:43FromGitter<Albus70007> the one on the web basically
19:36:07YardanicoAnd can I read about the protocol of that loopback.exe somewhere?
19:36:10AraqZevv, not with TLSF
19:36:13Yardanicoor a working example
19:36:15Yardanicoin another language
19:36:15Araqthat its cost
19:36:26FromGitter<Albus70007> @Yardanico python one
19:36:31Yardanicowell, can you give it?
19:36:38FromGitter<Albus70007> sure
19:37:37FromGitter<Albus70007> https://drive.google.com/file/d/1B-jXzXaEZcaOo2enwFNcBO33-Z-FPikv/view?usp=sharing
19:38:16FromDiscord<Clyybber> Hey, goto exceptions are looking great
19:38:46Yardanicoand what is expected to happen when I run this python script?
19:38:51Yardanicoit seems to run forever too
19:39:21FromGitter<Albus70007> correctly or freezed
19:39:35Yardanicowell it just runs 10 iterations in the while loop and then freezes
19:39:39Yardanicowith nothing happening
19:39:53Yardanicomaybe your program loopback.exe itself is not correct?
19:40:08FromGitter<Albus70007> let me check
19:40:48FromGitter<Albus70007> mine runs fine the python one at least
19:41:03ZevvAraq: so how do I get rid of that then?
19:42:06FromGitter<Albus70007> Maybe its not compatible with linux/wine
19:42:12FromGitter<Albus70007> i will ask
19:42:22FromGitter<codenoid> hellow, i'm new in Nim
19:42:28FromDiscord<Clyybber> sup
19:42:29FromGitter<Albus70007> welcome then
19:44:09disruptek~codenoid is new in Nim
19:44:10disbotcodenoid: 11new in Nim
19:45:09FromGitter<Albus70007> @Yardanico answer might take long unfortunatley
19:46:31FromGitter<Albus70007> you are passing the args i told you right? and this: ⏎ 1048 bytes / packet ⏎ RLBot controller connected! ⏎ appears on the exe's console? [https://gitter.im/nim-lang/Nim?at=5e1631970ba7b60f20468dbd]
19:48:28*marmotini_ quit (Remote host closed the connection)
19:48:42Yardanicoit tells me 1050 bytes / packet though
19:49:03FromGitter<Albus70007> thats definetely wrong
19:49:23FromGitter<Albus70007> try pasing 1 in the bots_num
19:49:58FromGitter<Albus70007> that should be 737
19:50:30*marmotini_ joined #nim
19:50:30*marmotini_ quit (Remote host closed the connection)
19:50:49lqdev[m]uh? https://play.nim-lang.org/#ix=26S1
19:50:56lqdev[m]so how am I supposed to know what `float` really is?
19:50:57disruptek~goto is a new high-performance, zero-drawback exception system in Nim's devel branch; see https://forum.nim-lang.org/t/5784
19:50:57disbotgoto: 11a new high-performance, zero-drawback exception system in Nim's devel branch; see https://forum.nim-lang.org/t/5784
19:51:03*marmotini_ joined #nim
19:52:03disrupteklqdev: i dunno, it's like there's always a black art to getting type data, somehow.
19:52:12krux02lqdev[m], yea you got a typedesc sneak in.
19:52:39krux02typdesc are wrapper symbols that pretend to be the symbol that you are looking for, but they are not
19:52:45FromGitter<codenoid> is nim have exact function like https://golang.org/pkg/encoding/binary/#Read
19:52:45lqdev[m]krux02: after playing with macros for a while I know why you hate typedesc so much.
19:52:45krux02you have to unwrap them
19:52:59lqdev[m]ikr, but getImpl yields a nilLit in case of primitives
19:53:05krux02yes
19:53:13AraqZevv, via -d:useMalloc
19:53:28krux02when you have a typedesc, you have to access the first child
19:53:36krux02and call getImpl on that.
19:53:55krux02I opened an issue about that a very long time ago
19:54:00*marmotini_ quit (Remote host closed the connection)
19:54:07lqdev[m]seems like I have to do `x.getTypeImpl[1].typeKind` in that case
19:54:25*marmotini_ joined #nim
19:54:34krux02the symbol and the typedesc appear the same. They show equal when compared, they print that they are the same symbol, but nope they are not.
19:54:45krux02yes
19:54:48krux02you understood it.
19:55:04FromDiscord<Clyybber> Araq: Do you know why we check ins.n aliases loc *and* loc aliases ins.n here: https://github.com/nim-lang/Nim/blob/devel/compiler/dfa.nim#L628
19:55:58*leorize joined #nim
19:56:06ZevvAraq: nope
19:56:52FromGitter<codenoid> i'm trying to do this `endians.bigEndian64(@[196, 175, 160, 214, 14], p)` just like golang `binary.Read()`
19:56:55ZevvI do fall into that branch of ifs I just asked, and that is where the MemRegion comes from
19:57:18FromGitter<codenoid> i have no idea what i do now
19:57:56leorizeZevv: what's the highlighting prob?
19:58:28Zevvwrong """ long strings again, but let me first check if I'm properly up to date
19:58:36Zevvbut first first I have to get my wifi fixed because this is borked here
19:58:46leorizeif it's in system.nim, then I fixed that yesterday
19:59:12FromGitter<matrixbot> `grantmwilliams` is there a type i can use for iterating over a seq, array, openArray or string?
19:59:24AraqZevv, strange, beyond my knowledge then
19:59:39Araqwell it's a bug I think
19:59:50leorize@grantmwilliams: can you please connect via the freenode bridge :p
19:59:58leorizeanyhow, wdym by type for iterating?
20:00:00Yardanico@grantmwilliams what do you mean "type"?
20:00:05Yardanicoyou just use for loops for any of them
20:00:20Yardanicothey all have items() iterators defined for them
20:00:30FromGitter<Albus70007> @Yardanico , any news? ⏎ wine compatibility hasnt been tested
20:00:45leorizeZevv: also, you want me to hide nimsuggest crashing?
20:00:55Yardanicoyou mean num_cars?
20:00:56leorizeoh just the one on exit
20:01:00FromGitter<Albus70007> yes
20:01:05FromGitter<matrixbot> `grantmwilliams` yeah ill try the freenode bridge again in a bit. it didnt work for me last time..
20:01:10Yardanicoif I pass 1 instead of 2 I get 739 bytes / packet
20:01:33FromGitter<matrixbot> `grantmwilliams` i wanted a generic function that takes something you can iteratre through (an array of numbers a string of characters) and lets you create an iterable of an infinite cycle of it
20:01:53FromGitter<Albus70007> i am asking for the source code, not sure if i can get it
20:01:55Yardanicofor 1 you use openArray
20:02:03FromGitter<matrixbot> `grantmwilliams` was wondering if there was some type T that worked for an iterable container similar to how someNumber works for floats and ints
20:02:14YardanicoopenArray :)
20:02:22FromGitter<matrixbot> `grantmwilliams` beautiful
20:02:24FromGitter<matrixbot> `grantmwilliams` thank you
20:02:29Yardanicoit works for strings, arrays, sequences
20:02:59FromGitter<matrixbot> `grantmwilliams` that is exactly what i wanted. thank you
20:03:08leorizehttps://play.nim-lang.org/#ix=26Se
20:03:09leorize:P
20:03:15FromGitter<Albus70007> maybe try printing what do you receive, probably the header is not being encoded
20:04:49Yardanicoleorize: Error: 'a' is of type <openArray[char]> which cannot be captured as it would violate memory safety, declared here: /usercode/in.nim(1, 17)
20:04:50Yardanico0_0
20:05:03Yardanicoah wait maybe I'm using it the wrong way
20:05:15leorizemake it a template
20:05:18leorizeproblem solved lol
20:08:07FromGitter<matrixbot> `grantmwilliams` yeah i just did openArray[T] because i also want it to work with numeric values
20:08:44*marmotini_ quit (Remote host closed the connection)
20:10:49leorizeZevv: alright, hidden that message on latest nim.nvim
20:11:18FromGitter<Albus70007> @Yardanico Thanks for trying anyway, ill investigate it
20:11:50FromDiscord<Clyybber> Araq: ping
20:11:54FromGitter<matrixbot> `grantmwilliams` Nim doesnt have union types does it?
20:12:04FromDiscord<Clyybber> we have case objects
20:12:33FromDiscord<Clyybber> they are implemented using union types
20:12:48FromGitter<matrixbot> `grantmwilliams` interesting
20:12:52leorizeif you want C-style bit-reinterpreting union type, then we don't have that
20:13:09leorize`cast` can be used for that purpose though
20:13:38FromGitter<matrixbot> `grantmwilliams` i was curious if you could have a proc or func that took string | int32 or something similar
20:13:44Yardanicoyes
20:13:54leorizenot at runtime, but yes
20:14:12FromGitter<matrixbot> `grantmwilliams` i think you can do it erlang style right?
20:15:26leorizewhat's erlang style :P
20:15:28Yardanicoyou just check for types in the proc compile-time if which is "when"
20:15:34Yardanicoand I don't know what is erlang style :P
20:15:56Yardanicobasically doing string | int32 is the same as making two procedures with same name when one accepts string and other one accepts int32
20:16:11FromGitter<matrixbot> `grantmwilliams` yeah thats what you'd do in erlang
20:16:12Yardanicoit's just that in some cases it might be better to make them into one proc if they share a lot of code
20:16:26*lxbarbosa joined #nim
20:16:40FromGitter<matrixbot> `grantmwilliams` in erlang its also common to have a variable number of arguments
20:18:18*sagax quit (Ping timeout: 265 seconds)
20:18:24lxbarbosais Nim in action still a good start even after Nim 1.0? tx
20:19:00narimiranlxbarbosa: yeah
20:19:05Yardanicowhy not? all nim in action code is checked in the test suite
20:19:11Yardanicoso it'll still work :)
20:20:13lxbarbosaoh, great! getting it late, thanks!
20:20:50Zevvleorize: no, sure, reporting crashes makes sense
20:20:57*nsf quit (Quit: WeeChat 2.7)
20:21:02Zevvbut normal termination could be silent i guess
20:21:20leorizeyea, I've just done that :P
20:21:30Zevvsweet, takk
20:21:49leorizeit's actually tricky to detect when neovim is exiting without the use of autocmd :P
20:26:53*lxbarbos` joined #nim
20:27:46Yardanicolol https://github.com/nim-lang/Nim/issues/13074
20:27:48disbotβž₯ Think about the title, twice ; snippet at 12https://play.nim-lang.org/#ix=26Sw
20:27:48*lxbarbosa quit (Ping timeout: 248 seconds)
20:27:58FromGitter<matrixbot> `grantmwilliams` i should probably read that book. right now im just writing code and occasionally checking the docs or here...
20:28:23*sagax joined #nim
20:32:08*filcuc joined #nim
20:36:28*lxbarbos` quit (Ping timeout: 260 seconds)
20:42:26*sagax quit (Ping timeout: 240 seconds)
20:54:26*narimiran quit (Ping timeout: 240 seconds)
21:09:21*sagax joined #nim
21:20:30FromGitter<Albus70007> how can i set an string to be ascii / encode it as ascii
21:24:38lqdev[m]strings are encoded as ascii
21:25:08FromGitter<Albus70007> so how do i convert them to utf8, unicode, etc
21:25:27lqdev[m]with the unicode module, https://nim-lang.org/docs/unicode.html
21:25:36FromGitter<Albus70007> thank you
21:25:44lqdev[m]but you rarely need this, as UTF-8 was built to be compatible with ASCII
21:26:18FromGitter<Albus70007> ok, its for learning purposes more than actually using it
21:26:18FromDiscord<IanIAnIAN> Readting r/nim I feel it is a bad time to ask for some help with about exceptions
21:27:56Zevvas good or bad as any time I guess?
21:28:57Araqthere is also encodings.nim for converting between encodings
21:30:35AraqIanIAnIAN: please ask but I'm about to leave
21:36:19Zevvaraq: I seem to get away with only https://github.com/zevv/Nim/commit/33fae452ec18a9dd48e6e9c65277c4133bc28a45
21:36:45Zevvbut strv2 does not use my osalloc memory functions but those from getLocalAllocator()
21:37:12Zevvso I need to do some more learning to see what the philosophy behind all that is
21:38:31FromDiscord<mratsim> @leorize @grantmwilliams we have both tagged and untagged unions
21:38:54FromDiscord<mratsim> tagged unions / ADTs are called object variants in Nim
21:39:25FromDiscord<mratsim> untagged unions are objects with fields and the pragma {.union.}, fields share the underlying memory buffer
21:40:53FromDiscord<IanIAnIAN> I was reading https://sergio.dev/posts/how-to-parse-rss-feeds-with-nim/ and well it was useful till I got here https://play.nim-lang.org/#ix=26SY
21:45:49disrupteki want named else branches.
21:45:55disruptekthat i can break from.
21:45:57FromDiscord<Clyybber> what
21:46:04FromDiscord<Clyybber> why?
21:46:12disruptekif foo: else bakery: ... break bakery
21:46:34FromDiscord<Clyybber> what is the use case?
21:46:39FromDiscord<Clyybber> why not put a block into the else?
21:46:49FromDiscord<mratsim> can't you wrap the whole thing in a bakery?
21:46:52disruptekalso i want while foo: else: bar and for foo in bar: else:
21:46:57FromDiscord<mratsim> and ship it while it's hot
21:47:14FromDiscord<Clyybber> hes messin with us
21:47:14disruptekfor one thing, it adds an indent to both clauses.
21:47:23FromDiscord<mratsim> aren't you asking for a duff's device?
21:47:23disruptekc'mon, be serious.
21:48:23FromDiscord<Clyybber> while cond: ... else: ... is not thaat crazy
21:48:34FromDiscord<Clyybber> but for foo in bar: ... else: ...
21:48:50disruptekit's exactly the same.
21:49:04disruptekwhile/else doesn't mean "do this if the loop never ran".
21:49:04FromDiscord<Clyybber> oh
21:49:24FromDiscord<Clyybber> what else would it mean then?
21:49:24disruptekit means, "do this if we did not prematurely terminate the loop".
21:49:50*NimBot joined #nim
21:50:08FromDiscord<Clyybber> disruptek: Wrap the loop in a block and break?
21:50:22disruptekbecause if the loop exits normally, that's essentually truthy, right? and if we terminate it early, that's false.
21:50:22Araqyour gist is ok except your patch to osalloc.nim
21:50:38disruptekclyybber: this is what i do now. i just want to do it more elegantly.
21:50:59FromDiscord<Clyybber> its as elegant as it gets
21:51:01FromDiscord<IanIAnIAN> I wondered what the correct way to handle an rss feed with no pubDate in this code was? My attempt was b0rked https://play.nim-lang.org/#ix=26T6
21:51:05FromDiscord<Clyybber> else is just confusing IMO
21:51:25FromDiscord<Clyybber> I would have never guessed the behaviour you are looking for
21:51:28disruptekhmm, maybe we should look at some examples.
21:51:35disruptekthis is a feature of python, fwiw.
21:52:07FromDiscord<IanIAnIAN> Some features aren't worth having πŸ™‚
21:52:16AraqIanIAnIAN: sorry, not in my domain
21:52:52FromDiscord<IanIAnIAN> too simple, eh?
21:53:02AraqI would avoid the empty 'except' though and only catch exceptions you saw happening
21:53:10Araqlike ValueError, IOError, OSError
21:53:48FromDiscord<mratsim> @disruptek, the main issue with your proposal is that it breaks the AST and parser
21:54:01FromDiscord<Clyybber> and that its redundant
21:54:21FromDiscord<Clyybber> and kind of confusing IMO
21:54:58Araq'else' on a 'for' loop in Python always was a WTF moment for me
21:54:59FromDiscord<mratsim> it's OK, but I'm not even sure I've seen it in the wild in Python
21:55:02disruptekhttps://gist.github.com/disruptek/272e966152bb3c46f964939ab6803c2b
21:55:16Araqmratsim: it's actually common in Python
21:55:30FromDiscord<mratsim> well maybe not in data science code then πŸ˜›
21:55:40disrupteki mean, i use it all the time in python, so that's why i write nim the way i do.
21:55:54FromDiscord<Clyybber> disruptek: Hmm, I guess a macro that accomplishes that would be a better idea
21:56:05disruptekyes, i would obviously start with a macro.
21:56:09disruptek!repo disruptek/forelse
21:56:10disbothttps://github.com/disruptek/forelse -- 9forelse: 11a macro adding `for: else:` and `while: else:` syntax to nim 15 0⭐ 0🍴
21:56:14FromDiscord<Clyybber> Nice!
21:56:20disruptekwell, i haven't written yet.
21:56:22Araqsomebody should review and merge this, https://github.com/nim-lang/Nim/pull/13069
21:56:23disbotβž₯ System cleanup, part 1
21:56:53FromDiscord<Clyybber> Araq: Sorry, busy with the dfa thingy
21:57:07Araqfair enough
21:57:10FromDiscord<mratsim> Sorry trying to generate docs while staying sane
21:57:13kungtotteDon't name it 'else' though :P Lots of people get tripped up by the naming in Python
21:57:25disruptekwhat do you propose?
21:57:26FromDiscord<mratsim> want to get a stable release of Arraymancer before I break everything
21:57:33FromDiscord<mratsim> otherwise
21:57:39FromDiscord<Clyybber> disruptek: Call it search and found
21:57:45FromDiscord<Clyybber> search for the loop
21:57:48kungtottedisruptek: a common suggestion in the Python world is nobreak
21:57:49FromDiscord<Clyybber> found for the else
21:57:50FromDiscord<mratsim> nah, otherwise is better
21:58:14disruptekotherwise sounds better to me.
21:58:18FromDiscord<mratsim> nobreak? wow I wouldn't even understand what it would mean
21:58:20FromDiscord<IanIAnIAN> if else wrong
21:58:20Araqfor x in bar: echo "y"
21:58:23FromDiscord<treeform> Hey dom96, when you submitted openSSL 9 years it had a huge `when true` disabling a huge part of the code and it's still there. Is that on purpose? Can I enable some functions? https://github.com/nim-lang/Nim/commit/d68782cd38142be328e4df41e782654cebafc8b7#diff-09ce05d4800aaaa6014de76809a63957R224 should we remove the rest?
21:58:25Araqempty: echo "n"
21:58:51disruptekempty. that's interesting.
21:58:57Araq"for ... in ...: body empty: body"
21:59:07disruptekbut it's only when the iterator is empty, right?
21:59:09Araqor maybe "ifempty"
21:59:29Araqwhy do you ask me? I can barely remember the Python idiom
21:59:42disruptekwe're talking about nim 2020 here, not python. 🀣
21:59:42kungtottemratsim: https://news.ycombinator.com/item?id=17169331
21:59:51kungtotte(and everyone else too for that matter)
22:00:55*Vladar quit (Quit: Leaving)
22:01:23disruptekdo you think the current idiom is more readable?
22:03:00kungtottedisruptek: with the block found? No, for-else makes more sense to me. But then I'm experienced in Python and I've internalised for-else as a concept. It looked really strange to me when I first encountered it because I hadn't seen it anywhere else. I had nothing to go on and my intuition about it was wrong.
22:03:40disrupteki use a ton of named block: and i like how explicit it is.
22:03:59disruptekbut the current idiom is more wtf to me than the proposal.
22:04:30Araqfwiw block+break was based on a paper that I lost
22:04:54disruptekupdated with otherwise and named otherwise: https://gist.github.com/disruptek/272e966152bb3c46f964939ab6803c2b
22:05:00Araqit was about how to get control flow primitives right
22:05:22disruptekwell, i'm glad you impl it.
22:06:08FromDiscord<mratsim> ah the for else in python is indeed very strange
22:06:24disruptekfunny that some people think it's weird.
22:06:59disruptekit's neat to think that we can even have opinions on structures this simple.
22:07:11FromGitter<Albus70007> how can i optimise my code?
22:07:19FromDiscord<mratsim> !repo documentation
22:07:19disbothttps://github.com/FedericoCeratto/nim-package-directory -- 9nim-package-directory: 11Nim package directory - documentation builder 15 24⭐ 9🍴 7& 4 more...
22:07:32FromDiscord<mratsim> !repo docgen
22:07:33disbothttps://github.com/reactjs/react-docgen -- 9react-docgen: 11A CLI and toolbox to extract information from React component files for documentation generation purposes. 15 2522⭐ 233🍴 7& 29 more...
22:07:41FromDiscord<mratsim> :/
22:07:49disruptekwhat are you looking for?
22:07:57FromDiscord<mratsim> I guess I'm gonna generate my documentation like a caveman again
22:08:08FromDiscord<Clyybber> asciidoc
22:08:09disruptekjust do it in version-1-0.
22:08:19disruptekis it that bad?
22:09:18FromDiscord<mratsim> something to avoid having to do this: https://github.com/mratsim/Arraymancer/blob/master/nimdoc.cfg#L40 and this: https://github.com/mratsim/Arraymancer/blob/master/arraymancer.nimble#L221 and avoid having to learn CSS mouse-over and resizing rules: https://mratsim.github.io/Arraymancer/
22:09:40FromDiscord<mratsim> this way I can put that in CI
22:10:41FromGitter<matrixbot> `grantmwilliams` iterators arent lazy in nim right? seeing some conflicting results online
22:11:03disruptekthey are lazy.
22:11:10Zevvso am I
22:11:35disruptek~zevv is lazy and so is he.
22:11:36disbotzevv: 11lazy and so is he.
22:12:39Zevvehm, but how can an iterator *not* be lazy?
22:13:02Zevvisnt that the whole point? otherwise you just generate a seq of something?
22:13:15disruptekthis nimdoc.cfg is blowing my mind right now.
22:13:37FromDiscord<mratsim> it's just a big hack that was left for 2 years
22:15:02disruptekbut this is pretty cool.
22:15:19disruptekand it actually renders fairly nicely on my display, which is not the case for the default docs for whatever reason.
22:15:37Zevvalbus7007: optimize how?
22:15:45disruptek~compiler
22:15:46disbotcompiler: 11https://nim-lang.org/docs/nimc.html -- the Nim Compiler User Guide -- disruptek
22:17:03FromDiscord<mratsim> it's broken on resize @disruptek
22:17:10FromDiscord<mratsim> you need to have a widescreen
22:17:21disruptekis that what i'm doing wrong?
22:17:40disrupteki'm on 4k and i view almost everything at 2up.
22:17:45FromDiscord<mratsim> the docs is completely broken on mobile :p
22:17:50FromDiscord<mratsim> are*
22:18:18FromDiscord<mratsim> @Albus70007 what are you developing?
22:18:22disruptekactually, it seems to be rendering okay right now.
22:18:38disrupteki guess the site renders a little better for whatever reason.
22:18:48FromDiscord<mratsim> the mouse over shoul be annoying
22:19:02FromDiscord<mratsim> but well if it works better and I didn't do anything I guess I'll take the win
22:19:59FromGitter<Albus70007> well, we have a community of rocket league bot designers, and the framework will soon change to use json, i am working on a nim one (basically a socket client, but its being very slow compared to its c++ brother)
22:20:06FromDiscord<mratsim> but in general a good doc generation library or bondings to Sphinx would be quite helpful
22:20:30FromDiscord<mratsim> maybe naive but do you compile with -d:release or -d:danger?
22:20:41FromGitter<Albus70007> nope
22:20:45FromGitter<Albus70007> let me see
22:20:52FromDiscord<mratsim> easy win there ;
22:21:01FromGitter<Albus70007> i hope
22:23:14FromGitter<Albus70007> it says Debug Build) so i guess i am not compiling it as i should
22:26:20FromDiscord<mratsim> just do nim c -d:release yourfile.nim
22:26:41FromDiscord<mratsim> the difference is that with -d:release Nim passes -O3 to gcc
22:27:05FromDiscord<mratsim> and with -d:danger it also disables assertions, bound checks stacktraces
22:27:06Zevv-d:danger will bring you more, but it will omit runtime out of bounds checks
22:27:23FromDiscord<mratsim> danger is similar to C/C++ release
22:27:34FromDiscord<mratsim> but it's hard to debug
22:27:51Zevvnope, you can just mix with --debugger:native
22:28:02Zevvthats the funny part
22:28:09FromDiscord<mratsim> yes that works
22:28:22FromDiscord<mratsim> it's actually the only sane way to debug Weave :p
22:28:37FromDiscord<mratsim> Nim stacktraces in remote threads tend to get eaten on exceptions
22:29:10Araquse -d:noSignalHandler
22:29:27Araqour signal handler is not "signal handling safe"
22:29:37FromGitter<Albus70007> almost no improvement, i will try danger
22:29:44Araqwhatever that actually means
22:31:36FromGitter<Albus70007> AYE! now thats better! THX
22:31:59*tane quit (Quit: Leaving)
22:33:33Araqtime to optimize -d:release
22:33:57Araqesp since I almost never use -d:danger anymore
22:34:07*lritter quit (Quit: Leaving)
22:34:55shashlickAraq: going nuts, need your help with compiler AST
22:36:15FromDiscord<mratsim> @Araq, @stefantalpalaru works on libbacktrace should help a lot, in Nimbus Nim stacktraces are among the top contenders for slowness
22:36:22FromGitter<Albus70007> i still want to point out that my code reaches 0.0791937ms while the c++ one reaches 0.00138526ms
22:37:23FromDiscord<mratsim> Unless your code deals with string which are a pain to optimize, or you use dynamic dispatch, there is no reason for Nim code to be slower than C or C++
22:37:39shashlickAraq: https://pastebin.com/6gRkdywP - I'm generating compiler AST from tree-sitter's AST
22:38:08shashlicknote how A14 has a field a1 of type cchar and the associated AST
22:38:20FromGitter<Albus70007> mratsim, actually sending and receiving json packets so is that bad?
22:38:21*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
22:38:45FromDiscord<mratsim> ah for json, try packedjson from !rep packedjson
22:38:48shashlickand when I add A1 which has a field a2 with cstring type, A14's a1 also gets modified but not the field name in the AST
22:38:51FromDiscord<mratsim> !repo packedjson
22:38:52disbothttps://github.com/Araq/packedjson -- 9packedjson: 11packedjson is an alternative Nim implementation for JSON. The JSON is essentially kept as a single string in order to save memory over a more traditional tree representation. 15 38⭐ 4🍴
22:39:08FromDiscord<mratsim> Nim json is optimized for ergonomics
22:39:19disruptekthat's a nice way of putting it.
22:39:20FromDiscord<mratsim> but it allocates a table at each tree node
22:39:35FromDiscord<mratsim> i.e. it's mega slow
22:40:13FromGitter<Albus70007> swapping will be as easy as changing the import?
22:40:44FromDiscord<mratsim> who knows, ask @Araq
22:41:57*ltriant joined #nim
22:42:37*Lord_Nightmare joined #nim
22:47:43*solitudesf quit (Ping timeout: 260 seconds)
22:48:46FromGitter<Albus70007> there is a very slight improvement, but since its compatible with my code out of the box i will use it, thank you, now i only need to unhardcode the headers and it should be done
22:49:11*cyraxjoe quit (Ping timeout: 268 seconds)
22:49:14*MightyJoe joined #nim
22:51:51FromGitter<Albus70007> we are actually still below python's speed XD by x2
23:02:22FromDiscord<mratsim> pretty sure Python json is implemented in pure C so
23:03:05FromGitter<Albus70007> yeah, thats what i read i think, could i do the same with nim though?
23:03:21disruptekyou /are/ doing the same in nim.
23:03:42FromGitter<Albus70007> then why it is slower?
23:04:53FromDiscord<mratsim> Fast json parsing is hard, see https://github.com/lemire/simdjson and https://arxiv.org/abs/1902.08318 (this is a very good read)
23:05:47FromGitter<Albus70007> ok, i will also ask other people to run my code in their computers, they probably have better ones
23:06:31FromDiscord<mratsim> even D json was slower than python πŸ˜‰ https://forum.dlang.org/thread/20151014090114.60780ad6@marco-toshiba
23:07:13FromDiscord<mratsim> anyway, the code and the explanations are out there and we could just Nimify some C code. It's just a question of time/interest
23:07:28FromGitter<Albus70007> good news, in my machine python is actually slower than nim so nim +1
23:07:43FromGitter<Albus70007> i hope in theirs nim is fast af
23:09:17*abm quit (Quit: Leaving)
23:16:37FromDiscord<exelotl> uhhh so I forgot to add a {.compile:"foo.c".} in my code
23:17:43FromDiscord<exelotl> have a bunch of {.importc, extern:"xyz".} variables which are only defined in foo.c
23:18:05FromDiscord<exelotl> yet my code compiled anyway
23:18:22FromDiscord<exelotl> and my program crashed because it was reading garbage
23:19:12FromDiscord<exelotl> how could this even happen? shouldn't it have failed at link time/
23:19:15FromDiscord<Clyybber> probably because you at some point had foo.c compiled
23:19:24FromDiscord<Clyybber> and it was still in your cache
23:19:27FromDiscord<Clyybber> I presume
23:19:59FromDiscord<exelotl> I'm using a local nimcache and I cleaned the project many times
23:20:44FromDiscord<Clyybber> hmm
23:34:55*filcuc quit (Remote host closed the connection)
23:44:09FromDiscord<exelotl> on the plus side I got this cool gif https://cdn.discordapp.com/attachments/312199400875360256/664605561152864258/GIF24.gif
23:44:25FromDiscord<Clyybber> is that on the gba?
23:44:30FromDiscord<exelotl> ye
23:44:33FromDiscord<Clyybber> damn
23:44:35FromDiscord<Clyybber> amazing
23:44:46FromDiscord<exelotl> haha you should see it when it's working ;)
23:45:14FromDiscord<Clyybber> I checked yours/or your artists twitter some time ago, your game really looks amazing
23:45:26disrupteki wanna see.
23:45:34FromDiscord<Clyybber> I also want to make a game for the gba with nimone day
23:45:59FromDiscord<Clyybber> its just such a nice console
23:46:02FromDiscord<mratsim> Arraymancer 0.6 tagged: https://github.com/mratsim/Arraymancer/releases/tag/v0.6.0
23:46:27FromDiscord<Clyybber> @mratsim Nice!
23:46:29FromDiscord<mratsim> One day I want to finish my snes emulator
23:46:39FromDiscord<mratsim> and my go playing bot
23:46:45FromDiscord<Clyybber> one day arraymancer is gonna run on the gba
23:47:01FromDiscord<Clyybber> lol
23:47:03disruptekoh, i know what my next project'll be.
23:47:06FromDiscord<mratsim> crawl maybe, run, that's quite optimistic
23:47:17disruptektest coverage reports.
23:47:25FromDiscord<Clyybber> oh no
23:47:41FromDiscord<Clyybber> I don't want test coverage reports
23:47:56disruptekyou're gonna love them.
23:48:01FromDiscord<mratsim> there was something to plug cov or whatever it's called to Nim using debugger:native
23:48:03FromDiscord<Clyybber> I dont want to see those pesky 0.0%
23:48:11disruptek!report coco
23:48:24FromDiscord<Clyybber> !repo coco
23:48:27disbothttps://github.com/cocos2d/cocos2d-x -- 9cocos2d-x: 11Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world. 15 14055⭐ 6821🍴 7& 29 more...
23:48:30disruptekoh, it's html according to github.
23:48:37disruptek!repo coco nim
23:48:38disbothttps://github.com/samuelroy/coco -- 9coco: 11Code coverage for Nim lang (CLI + library) 15 21⭐ 1🍴 7& 1 more...
23:48:47FromDiscord<Clyybber> did you just misuse your own bot?
23:48:54disruptekyeah.
23:49:22disrupteki just made some cookies last night and they are kinda blowing my mind right now.
23:49:25FromDiscord<demotomohiro> Can I rerun azure-pipeline without commit?
23:49:25FromDiscord<demotomohiro> Some checks were not successful, but I think it is not related to my PR.
23:49:25FromDiscord<demotomohiro> https://github.com/nim-lang/Nim/pull/13011
23:49:55FromDiscord<Clyybber> disruptek: canabutter or what?
23:50:11disruptekactually, shortening.
23:50:15FromDiscord<exelotl> disruptek: here's a rather old gif from last year https://twitter.com/hot_pengu/status/1137819284246323203
23:50:32disruptekright, i saw that one. 😁
23:50:33*lxbarbosa joined #nim
23:50:38FromDiscord<exelotl> there's another gif I like more but it seems to have vanished :\
23:51:01disruptekit's always cool seeing parallax on these things.
23:51:33disrupteki can't believe how much time we spent on sidescrollers.
23:51:43FromDiscord<Clyybber> the art is so damn nice, and I suspect the code must be magic too, to run all that on a gba
23:53:56FromDiscord<exelotl> the code was pretty subpar when this gif was made... enemy spawning and stuff was super janky, and the levels are supposed to loop horizontally/vertically which lead to nasty bugs
23:54:43FromDiscord<exelotl> this is why we haven't been putting out more gifs... we had to take a step back and figure out how to do this stuff properly, so that the game can grow
23:58:36FromDiscord<Clyybber> @exelotl how much can the game grow before you hit size constraints?
23:59:56FromDiscord<exelotl> it's currently 2MB, max is 32MB