<< 17-09-2019 >>

00:00:23shashlickWe need to go thru and fix as many bugs as possible and freeze on new features for nimble
00:00:25FromGitter<zetashift> tomorrow!
00:01:09shashlickAnd still keep enough time to fix any bugs related to the bug fixes
00:02:15shashlickA scrub of the issue list is warranted, and a freeze date after which no more new features
00:11:43*actuallybatman joined #nim
00:15:03*exelotl quit (Ping timeout: 264 seconds)
00:24:57disruptekccache works well for me with nim.
00:49:16disruptekfyi, there's a small bug with httpclient: a Host: header is included, potentially duplicating any existing Host: specified by the user. because headers are additive, you can end up sending "Host: some.host.one,some.host.one" or "Host: some.host.one,some.host.two" depending upon the target url. this breaks, for example, request signing for some web APIs. i will submit a proper bug report and/or patch.
01:15:50*ng0_ joined #nim
01:18:16*ng0 quit (Ping timeout: 260 seconds)
01:23:50*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
01:25:30*laaron joined #nim
01:27:51*poopBot quit (Remote host closed the connection)
01:57:59*laaron quit (Remote host closed the connection)
01:59:00*laaron joined #nim
02:18:42*nc-x[m] quit (Remote host closed the connection)
02:18:45*Miguelngel[m] quit (Remote host closed the connection)
02:18:45*spymasterd[m] quit (Read error: Connection reset by peer)
02:18:47*zielmicha[m]1 quit (Read error: Connection reset by peer)
02:18:48*isaac[m]1 quit (Read error: Connection reset by peer)
02:18:49*lqdev[m] quit (Read error: Connection reset by peer)
02:18:51*TheManiac[m] quit (Read error: Connection reset by peer)
02:18:52*muxueqz[m] quit (Write error: Connection reset by peer)
02:18:53*LEdoian[m] quit (Write error: Connection reset by peer)
02:18:54*macsek1911[m] quit (Write error: Connection reset by peer)
02:18:57*pigmej[m] quit (Read error: Connection reset by peer)
02:18:58*planetis[m] quit (Remote host closed the connection)
02:19:00*GitterIntegratio quit (Read error: Connection reset by peer)
02:19:01*Connor[m] quit (Read error: Connection reset by peer)
02:19:08*gh0st[m] quit (Remote host closed the connection)
02:19:09*BitPuffin quit (Read error: Connection reset by peer)
02:19:09*encryptize[m] quit (Read error: Connection reset by peer)
02:19:11*narimiran[m] quit (Remote host closed the connection)
02:19:13*xomachine[m] quit (Remote host closed the connection)
02:19:13*leorize[m] quit (Read error: Connection reset by peer)
02:19:14*meff[m] quit (Remote host closed the connection)
02:19:15*skrylar[m] quit (Remote host closed the connection)
02:19:15*nergal[m] quit (Read error: Connection reset by peer)
02:19:16*yglukhov[m] quit (Write error: Connection reset by peer)
02:19:16*k0mpjut0r quit (Write error: Connection reset by peer)
02:19:16*jaens[m] quit (Write error: Connection reset by peer)
02:19:16*Demos[m] quit (Write error: Connection reset by peer)
02:26:36*Connor[m] joined #nim
02:40:44*laaron quit (Remote host closed the connection)
02:42:30*laaron joined #nim
02:48:22*BitPuffin joined #nim
02:48:22*Demos[m] joined #nim
02:48:22*LEdoian[m] joined #nim
02:48:23*k0mpjut0r joined #nim
02:48:23*planetis[m] joined #nim
02:48:23*GitterIntegratio joined #nim
02:48:23*isaac[m]1 joined #nim
02:48:23*leorize[m] joined #nim
02:48:23*jaens[m] joined #nim
02:48:23*gh0st[m] joined #nim
02:48:23*nergal[m] joined #nim
02:48:24*pigmej[m] joined #nim
02:48:29*narimiran[m] joined #nim
02:48:29*macsek1911[m] joined #nim
02:48:29*spymasterd[m] joined #nim
02:48:29*TheManiac[m] joined #nim
02:48:29*encryptize[m] joined #nim
02:48:29*Miguelngel[m] joined #nim
02:48:30*skrylar[m] joined #nim
02:48:30*xomachine[m] joined #nim
02:48:30*yglukhov[m] joined #nim
02:48:30*meff[m] joined #nim
02:48:30*zielmicha[m]1 joined #nim
02:48:30*muxueqz[m] joined #nim
02:48:31*lqdev[m] joined #nim
02:48:31*nc-x[m] joined #nim
02:48:50*laaron quit (Remote host closed the connection)
02:50:53*xomachine[m] quit (*.net *.split)
02:50:53*yglukhov[m] quit (*.net *.split)
02:50:53*spymasterd[m] quit (*.net *.split)
02:50:53*TheManiac[m] quit (*.net *.split)
02:50:53*isaac[m]1 quit (*.net *.split)
02:50:53*k0mpjut0r quit (*.net *.split)
02:50:53*Demos[m] quit (*.net *.split)
02:50:54*LyndsySimon quit (*.net *.split)
02:50:54*surma quit (*.net *.split)
02:51:07*xomachine[m] joined #nim
02:51:08*Demos[m] joined #nim
02:51:08*spymasterd[m] joined #nim
02:51:14*rockcavera quit (Remote host closed the connection)
02:51:34*isaac[m]1 joined #nim
02:51:34*TheManiac[m] joined #nim
02:51:34*yglukhov[m] joined #nim
02:54:43*laaron joined #nim
02:55:08*rockcavera joined #nim
02:56:20*k0mpjut0r joined #nim
02:56:20*LyndsySimon joined #nim
02:56:20*surma joined #nim
02:56:24*k0mpjut0r quit (Changing host)
02:56:24*k0mpjut0r joined #nim
03:02:42*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
03:18:58*k0mpjut0r quit (*.net *.split)
03:18:58*LyndsySimon quit (*.net *.split)
03:18:58*surma quit (*.net *.split)
03:19:16*k0mpjut0r joined #nim
03:22:59*chemist69 quit (Ping timeout: 246 seconds)
03:24:13*laaron joined #nim
03:24:21*LyndsySimon joined #nim
03:24:21*surma joined #nim
03:25:12*chemist69 joined #nim
03:26:58*laaron quit (Client Quit)
03:41:05*laaron joined #nim
03:42:02FromGitter<gogolxdong> importc and importcpp is really confusing by name, most people are once confused :)
03:43:20nc-x[m]gogolxdong: there was an accepted rfc for renaming them to import and importpattern, and it was scheduled for 1.0 but it got forgotten after being moved to nim-lang/RFC repo
03:44:21FromGitter<gogolxdong> yeah, this could make easier life.
03:44:42FromGitter<gogolxdong> Hope it can be merged for v1.0.
03:51:42*fjellfras joined #nim
04:00:11*rockcavera quit (Remote host closed the connection)
04:11:32skrylar[m]i think i've almost finally understood this cassowary stuff
04:12:53FromGitter<gogolxdong> Great, can you apply it to nim GUI library?
04:34:10*theelous3 joined #nim
04:45:38*nsf joined #nim
05:00:09*narimiran joined #nim
05:18:09*a_chou joined #nim
05:32:34*a_chou quit (Quit: a_chou)
05:41:20*krux02 joined #nim
05:50:05*owl_000 joined #nim
06:10:19*dddddd quit (Remote host closed the connection)
06:12:25*PMunch joined #nim
06:12:27*fjellfras quit (Remote host closed the connection)
06:12:55*fjellfras joined #nim
06:12:57*fjellfras quit (Max SendQ exceeded)
06:19:51FromGitter<zacharycarter> just curious - does anyone know how one would approach debugging and fixing: https://github.com/nim-lang/Nim/issues/11974 ?
06:28:47AraqI do
06:29:49*solitudesf joined #nim
06:30:23*kungtotte quit (Ping timeout: 276 seconds)
06:31:08PMunchHmm, how do I build this? "could not load: libnimhcr.so"
06:32:03PMunchAraq, just checked and wxNim seem to work fine on the latest devel as well :)
06:33:58Araqadd it to important_packages.nim
06:36:53Araqzacharycarter: GC_disable should be a workaround, can be enabled after Nim got the stack pointer right?
06:43:51PMunchAraq was that for me?
06:44:36Araqyes+
06:45:39PMunchIt requires wxWidgets to be installed on the machine to build though..
06:46:52PMunchWhich I guess the CI doesn't have
06:47:40*alexander92 joined #nim
06:49:11PMunchWell it doesn't have to be installed, pulling the sources should also work
06:50:26Araqoh my...
06:50:50*MrAxilus joined #nim
06:50:53Araqwhat's wrong with "write/generate Nim code and create a Nimble package out of it"?
06:51:29PMunchYou're the one who created wxNim...
06:51:41PMunchI just sorta took it over after I created the genui macro :P
06:51:59*ng0_ quit (Quit: Alexa, when is the end of world?)
06:52:02Araqmy stuff shipped with the required C++ files, I'm sure :P
06:52:41PMunchHmm, all the headers are actually still in the repo
06:52:54PMunchNot the .cpp files, but the .h files
06:53:07PMunchBut I think they are only used to generate the .nim files with the script
06:54:33PMunchBut no, in your examples/nim.cfg it imports ../../wkWidgets-3.0.2/<file>
06:55:26PMunchSo you were just supposed to pull wxWidgets and wxNim and have them next to each other
06:56:01Araqdon't do what I do, do what I say
06:56:05MrAxilushas anyone looked at the language Zig? I just came across it and wanted to know how it compared to nim from a heavy nim users perspective.
06:56:08PMunchI changed it (with help from couven92) to grab the system install, or accept a path as an argument
06:56:09PMunchHaha
06:57:07AraqMrAxilus, dunno much about it, only watched a talk about it and was bored to death, yeah, you care about OOM, good for you. the industry doesn't.
06:58:09PMunchMrAxilus, well were to start, they are two fairly different languages
06:58:26Araqit felt like the usual "C is great/bad" schizo and "I never heard about Ada" attitutude
06:59:04owl_000there is another lang i heard that is vimlang
06:59:16owl_000vlang sorry
06:59:23PMunchowl_000, haha vimlang :P
06:59:36PMunchI mean there is vimscript, but I wouldn't use it for programming anything
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:11owl_000lol, v lang
07:00:16PMunchMrAxilus, Zig and Nim have two very different focuses it seems (just reading through the Feature highlights on their page)
07:00:36PMunchZig seems to go for simplicity, Nim chooses expresiveness
07:00:43narimiran"lol, v lang" -- my reaction too :P
07:00:49*shashlick quit (Remote host closed the connection)
07:00:55Araqyeah, just use Ada ffs. it doesn't have these bad allocations, it doesn't "hide stuff", it can actually be used and was used to develop software running in aircrafts, it's memory-safe
07:01:32*shashlick joined #nim
07:01:39*laaron quit (Remote host closed the connection)
07:02:45PMunchZig goes for the ever vague "safety", in Nim you would use its expressiveness to make safe patterns but it can also do unsafe things
07:02:50MrAxilusthanks guys
07:03:29PMunchZig has manual memory allocation, Nim has a GC but allows you to tune it or turn it off should you need to run on e.g. a MicroController
07:04:11Araqand with nim devel you can write your own GC
07:04:36*ng0 joined #nim
07:04:46*gmpreussner joined #nim
07:04:59PMunchBoth have compile-time code execution, but Nim takes it a bit further and gives you macros to play with (again harking back to expressiveness stuff)
07:05:09owl_000lot of **safety** around rust-lang, i tried to learn rust before nim lang. from python to rust, and then i left it. my head safety first
07:05:21*laaron joined #nim
07:05:46*absolutejam1 joined #nim
07:05:56PMunchZig does some dance with C, didn't get the entire gist of it from scrolling through the page. Nim just compiles to C (or to JS for that matter) and passes it on to a C compiler.
07:06:12PMunchOh yeah, Zig targets only native, Nim targets both native and JS.
07:07:32*laaron quit (Remote host closed the connection)
07:07:38PMunchZig has some built in concurrency things, Nim supports threads from the compiler side of things, but all sorts of things are implemented in modules (including in the standard library).
07:08:04PMunchBoth come with a build system, I guess people have gotten tired of those
07:08:31PMunchTired of what happens when a language doesn't have one I mean
07:10:06PMunchBoth integrate well with C, Zig seems to be ever so slightly more transparent about it, with it's @cImport thing directly making them available while Nim needs a mapping (that can be generated with c2nim).
07:10:23*laaron joined #nim
07:11:05PMunchSo yeah, that about sums up the differences I could glance from a quick scroll through ziglang.org's homepage and what I know about Nim MrAxilus
07:11:33Araqand @cImport is a breaking-your-neck feature
07:11:37Araqsee C++
07:11:41PMunchHow so?
07:12:01AraqC is wonderfully underspecified, T* can mean too many things, you will never get it typesafe
07:12:07PMunchowl_000, yeah I've heard good things about Rust, but also too much about how clunky it feels to use and how hard it can be to learn.
07:13:06Araqsee C++, it too could #inlcude C files and it too has eternal pointer problems
07:13:06PMunchOh right, another thing Zig didn't really say anything about it's type system (apart from using option types instead of nil values and treating errors like non-discardable values). Nim's type system is pretty amazing
07:13:20skrylar[m]@PMunch well having a build system has the possible-but-often-not-used advantage of not having to recycle state :\
07:13:39PMunchskrylar[m], what do you mean
07:13:50skrylar[m]one of the +'s from clisp/smalltalk is you don't load the entire friggin compiler suite every time you want to compile one file
07:14:21PMunchHow does that work?
07:14:23skrylar[m]or in c/c++ case how you end up parsing a file, writing an object, then parsing a new file, possibly re-parsing things you already parsed before...
07:14:38k0mpjut0rdom96: the main motivation for wanting to try hot code reloading is to speed up the development cycle. Yes I will spend most of the time waiting to compile, and I could run the server in an infinite loop and set makeprg to compile and kill the running server, but hot code reloading sounds cleaner at least in theory
07:14:54PMunchOh right, I mean both Nim and Zig have build systems. They're just built in to the compiler
07:15:04*absolutejam1 quit (Quit: WeeChat 2.5)
07:15:55*absolutejam joined #nim
07:16:02MrAxilus<PMunch "So yeah, that about sums up the "> You gave me a much better overview than what I was expecting, thanks! :)
07:16:32*kungtotte joined #nim
07:16:44PMunchMrAxilus, no problem :)
07:17:06*laaron quit (Remote host closed the connection)
07:18:13owl_000i think nim should focus on marketing.
07:23:09*laaron joined #nim
07:26:15*actuallybatman quit (Ping timeout: 258 seconds)
07:27:15*actuallybatman joined #nim
07:37:12*ng0 quit (Ping timeout: 260 seconds)
07:41:02*ng0 joined #nim
07:44:40alexander92i think zig
07:45:12alexander92has non-null pointers and null pointers for c interop and stuff like this
07:45:23alexander92so afaik they tried to tackle this unsafety bit a bit
07:45:33PMunchOh right, yeah it probably needs that somehow
07:45:52PMunchOr it treats nil pointers like an option value that's false
07:46:14PMunchWhich is a bit like how Nim does uninitialized seqs isn't it?
07:46:42alexander92the biggest differences are mostly language design imo: zig tries to make stuff relatively "obvious", like more explicit frame/memory stuff for async/await , explicit allocators, etc
07:46:52alexander92but i am really not an expert in both
07:48:47alexander92about zig vs ada, not sure what's the relation, iirc zig didn't really focus on memory safety too much: even compared to nim, not talking about rust at all, maybe you meant they just want less undefined behavior on runtime?
07:49:38alexander92PMunch well, i guess it's something like what we wanted to do with nil-able ref-s, and what other languages do with nil-able values indeed
07:49:41alexander92but no idea
07:49:49alexander92how practical is
07:50:36PMunchIt was Araq who mentioned Ada. It also has an interesting type system though, something which I think Zig doesn't
07:52:24alexander92yeah, well i feel they have a bit more go-like approach to that
07:53:24PMunchgo-like?
07:53:27FromGitter<zacharycarter> sorry - got tied up at work. Araq: I will see if this goes away with GC_Disable
07:54:31alexander92well, like, trying to go for "simpler" type system
07:54:50alexander92but no idea honestly, i don't know zig
07:55:31PMunchWell "simpler" type systems aren't really a good thing
07:55:45PMunchMy toy calculator/language thing has two types, and it's a mess :P
07:57:36alexander92i might be wrong about it, don't count my impression on zig , research it for yourself
07:57:57alexander92otherwise i like type systems as well
07:59:32PMunchFound another interesting language the other day, Red
08:05:16FromGitter<zacharycarter> my supervisor took a look at Nim and wasn't impressed with generics
08:05:25FromGitter<zacharycarter> he's a Scala guy
08:13:01PMunchHow do they work in Scala?
08:16:11alexander92well, did he look at https://nim-lang.org/docs/tut2.html#generics
08:16:17*Vladar joined #nim
08:16:32alexander92because this does showcase a simple usecase
08:16:45alexander92but not most of their
08:16:49alexander92possibilities
08:17:07alexander92(e.g. constraints, typedesc, concepts etc )
08:17:47alexander92(i mean, it's not a good general overview, it's only a good tutorial intro)
08:35:03*sagax quit (Remote host closed the connection)
08:38:02*absolutejam quit (Ping timeout: 240 seconds)
08:48:04*absolutejam joined #nim
09:00:07*sagax joined #nim
09:01:21*alexander92 quit (Ping timeout: 268 seconds)
09:04:58*endragor joined #nim
09:13:44*alexander92 joined #nim
09:19:21*theelous3 quit (Ping timeout: 265 seconds)
09:19:56nc-x[m]well if anybody looks at the hcr stack corruption issue, they also need to fix the system.nim imports another files issue. My hacky patch works only for simple cases.
09:28:30*endragor quit (Remote host closed the connection)
09:46:50*mattmurr quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
09:54:23*absolutejam quit (Ping timeout: 268 seconds)
09:54:42*lritter_ joined #nim
10:03:01FromGitter<zacharycarter> alexander92: he did mention concepts but I explained that I thought they were being reworked
10:03:40FromGitter<zacharycarter> what are the constraints you mentioned? I think his main observation was that they were implemented more like C++ templates than true generics
10:03:54Araqthat's correct
10:06:24FromGitter<zacharycarter> I don't really spend too much of my time worrying about Nim's type system - it works for what I need to do and my projects tend to be small enough that I know what I've written and can generally keep my projects in my head
10:07:51FromGitter<zacharycarter> but I guess if you're working on a larger team or working on a code base you didn't author, you might want more
10:08:22*Calinou quit (Ping timeout: 245 seconds)
10:08:59*absolutejam joined #nim
10:13:53*absolutejam quit (Ping timeout: 246 seconds)
10:17:16*laaron quit (Remote host closed the connection)
10:18:58*absolutejam joined #nim
10:20:12Araqdoesn't really apply, not all code must be generic, generic is for containers
10:20:18Araqand most code is not about containers
10:22:51*laaron joined #nim
10:24:05*laaron quit (Remote host closed the connection)
10:27:25*laaron joined #nim
10:32:10*NimBot joined #nim
10:51:38FromGitter<zacharycarter> that's all I use them for
11:03:21owl_000i want to pass, rgb value to a proc which will return another rgb value, should i make a type or pass array or pass tuple
11:04:02owl_000*type = object
11:17:24*actuallybatman quit (Ping timeout: 258 seconds)
11:18:28FromGitter<mratsim> If you use it pervasively just make it a type
11:22:29owl_000thank you, i will upload my code, please then review my code
11:38:29*gangstacat quit (Ping timeout: 276 seconds)
11:39:52*gangstacat joined #nim
11:49:32*rockcavera joined #nim
12:09:46*cgfuh joined #nim
12:12:50owl_000https://play.nim-lang.org/#ix=1Vxg please review my code, and guide me about which things are bad and what is the good practice.
12:15:09*dddddd joined #nim
12:16:17owl_000side note: many nim packages are not complying with nim style guide. --styleCheck:error , which is not good. i need to turn it off to compile successfully.
12:21:56FromGitter<zacharycarter> well - it's not like it's mandatory to do so
12:22:06FromGitter<zacharycarter> and it's the user's choice to use a linter
12:23:06owl_000nim's standard library?
12:24:06FromGitter<zacharycarter> oh - I thought you meant like nimble modules
12:24:16FromGitter<zacharycarter> err packages rather
12:24:24FromGitter<zacharycarter> I didn't realize you were referring to sdtlib modules
12:25:03FromGitter<zacharycarter> but again - a lot of these existed before the style checker... maybe make an issue listing the modules that are failing the check, if one doesn't already exist?
12:27:03owl_000now i can't remember which module, one month ago i faced that.
12:27:38FromGitter<zacharycarter> might be able to just compile Nim and turn on that check and see what it spits out
12:28:09narimiranowl_000: iirc, Araq went on a crusade to fix all of stdlib when it is run with `--styleCheck`, so it should work
12:29:11owl_000that is what i found now, i compile some of my old example that works perfectly with style check.
12:29:35owl_000by the way, review my code. please
12:30:04narimiranowl_000: as for code review, it is a nit-pick, but `isItTheValue` could be just `return rgb.r == rgb2.r and rgb.g == rgb2.g and rgb.b == rgb2.b` (and you can even remove `return`)
12:30:44*endragor joined #nim
12:30:51narimiranand if you want some nice/pretty style, put some space between `#` and the comment :)
12:31:55narimiran`countup(0,len(imgPixels)-1,3)` this is incorrect (and it lacks some spaces ;))
12:32:49owl_000that is true, though it is strange, difference in space produce different result in nim
12:33:01narimiranit shouldn't
12:33:16narimirandid you spot the error in the countup?
12:33:22owl_000no, but
12:34:08owl_000in case proc() and proc () produces error. (*not result, but errors)
12:34:26*vsantana quit (Quit: leaving)
12:35:16narimiranyes, there is a difference between `echo(1, 2)` and `echo (1, 2)`, for example
12:35:19owl_000and .. >= something like this sometime produce error.
12:35:33narimiranthe second one is basically `echo((1, 2))`
12:36:33*endragor quit (Remote host closed the connection)
12:36:44*endragor joined #nim
12:41:27owl_000`proc hello()`, do you think error message produced by `hello ()` is clear?
12:42:30owl_000`proc hello(name: string)` `hello ("blue")`
12:43:01narimirani just got this in the error message: "maybe misplaced space between hello and '('" -- and yeah, that is surprisingly good error message
12:44:22owl_000but i got F:\Nim\testing\raw\test.nim(2, 17) Error: type mismatch: got <string, string>, but expected one of: then huge list of proc
12:49:58owl_000nim version 0.20.2 [windows: amd64]
12:54:54owl_000https://play.nim-lang.org/ entire error message, first type mismatch at position: 1 and but expression '"hello "' is of type: string are repeatation and make error log huge.
12:55:36owl_000https://play.nim-lang.org/#ix=1VxC
12:57:09FromGitter<vsantana> string concatenation operator is `&` not `+`
12:58:26FromGitter<vsantana> the error mgs says ⏎ ⏎ proc `+`(x: int8): int8 ⏎ first type mismatch at position: 1 ⏎ required type: int8 [https://gitter.im/nim-lang/Nim?at=5d80d8722e8fd94630ead595]
12:58:33owl_000shame
12:58:35owl_000on me
13:00:41*vsantana joined #nim
13:00:52*vsantana quit (Client Quit)
13:02:38owl_000no shame, i am a student.
13:08:09*endragor quit (Remote host closed the connection)
13:10:47*vsantana joined #nim
13:11:22vsantananice!
13:20:17*endragor joined #nim
13:21:39Araqhttps://www.youtube.com/watch?v=c1UBJbfR-H0
13:24:15Zevvthanks for the tables fix araq
13:25:03AraqZevv, it also was krux02's work
13:25:26Araqwe don't even want to know how much this speeds up the VM for certain workloads...
13:25:57Zevvhaha. For me it was a 8x improvement compiling a java parser
13:26:00Araqeffectively the VM uses "pass by copy" for Nim's parameter passing semantics which is what no other backend does and the language spec says not to do this
13:26:35Zevvso this probably also speeds up the regular tests/tests, right?
13:26:52*lritter_ quit (Remote host closed the connection)
13:27:07Zevvand no wonder I got lost trying to find it myself, the fix is not trivial it seems
13:29:27*tribly quit (Remote host closed the connection)
13:29:56*tribly joined #nim
13:30:12Araqit's not really hard when you know about Lua's/Sparc's register windows
13:30:26Araqthat are used to implement the proc calling mechanism
13:31:39*laaron quit (Remote host closed the connection)
13:34:10*laaron joined #nim
13:35:58disruptekyeah, zevv, try reading a book some time.
13:37:35Araqdisruptek, don't troll him please, Zevv is awesome
13:37:52disruptekoh, i know, i'm just kidding. ;-)
13:38:33disruptekthe tables fix is a 4x speed bump for me.
13:39:06disrupteki was gonna fix it myself, but... meh.
13:39:20disruptek😁
13:43:16ZevvRight :)
13:50:48disruptekany reason not to offer a `$`() for HttpHeaders? i really don't like this impl but at least i could improve it slightly.
13:51:57*Vladar quit (Ping timeout: 265 seconds)
13:53:55*endragor quit (Remote host closed the connection)
13:56:27*Vladar joined #nim
14:03:06*PMunch quit (Remote host closed the connection)
14:04:57*lritter joined #nim
14:05:29*Vladar quit (Ping timeout: 265 seconds)
14:13:36*couven92 joined #nim
14:14:51*fredrik92 joined #nim
14:16:42*couven92 quit (Disconnected by services)
14:16:45*fredrik92 is now known as couven92
14:19:39Araqhmm what's the best way to make mmap return blocks aligned by 2MB, not just 4K?
14:39:12disruptekcommon divisors.
14:45:49*Vladar joined #nim
14:49:28Araqdisruptek: what do you mean?
14:49:48Araq"just allocate something and throw away the prefix and suffix"?
14:50:23disrupteki mean 4k is a divisor of 2mb. if you want a specific alignment, all you can do is ask.
14:50:56disruptekthrow away the prefix and suffix?
14:52:00disrupteki don't think you can be assured of alignment if you require a specific block length. at least on linux...
14:57:52FromGitter<gogolxdong> Any recommandation of video player library in Nim?
15:00:16FromGitter<danielecook> I'm trying to overload the json operator so that that a string of a single period (`.`) is converted to null
15:00:34FromGitter<danielecook> Tried this but didn't work: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d80f511ba12e0644888f0fa]
15:00:56FromGitter<danielecook> because it appears to completely overwrite the `%*` function
15:01:14FromGitter<danielecook> now I'm trying to just make a new function and can't get the case statement to work
15:01:30*owl joined #nim
15:01:31FromGitter<danielecook> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d80f54b5d40aa0d7d51bc93]
15:01:33*owl quit (Client Quit)
15:01:47FromGitter<danielecook> This doesn't work either though...
15:01:57FromGitter<danielecook> actually due to a syntax error
15:02:06disruptekgitter is ridiculous; despite a 4k display, that code paste is reduced to 5-char columns.
15:02:15disruptekhow does anyone tolerate that product?
15:02:27disruptekoh, and it's a scrollable region.
15:03:06FromGitter<danielecook> I'm not a fan of gitter either...but a lot of projects I use are on it
15:03:12disruptekdid you try hacking the `%` proc instead?
15:03:55FromGitter<danielecook> no...
15:04:28*owl_000 quit (Ping timeout: 245 seconds)
15:04:47disruptekthat dot_to_null makes no kinda sense to me. what are you trying to do?
15:05:08disruptekJsonNodeKind is an enum type of which JNull is a member value...
15:05:34disruptekJsonNode is a different sort of critter; it's an actual node object ref that also holds the value in addition to the kind, etc.
15:06:10*Trustable joined #nim
15:06:31FromGitter<danielecook> The overall goal is to convert a certain data format to JSON. In this format, a period is equivelent to a null value
15:07:08FromGitter<danielecook> So I'd like to be able to substitute a function in place of `%*` to convert '.' to null
15:07:38disruptekproc myNewJString = ... case value: of ".": return newJNull(); else: return newJString(value) ...
15:08:16FromGitter<danielecook> Thanks, but I don't necessarily know if the input value is a string or a number
15:08:27FromGitter<danielecook> So the advantage of the `%*` is I don't need to know the type
15:08:32FromGitter<danielecook> so I'm trying to maintain that advantage
15:08:35disruptekyou'd only use that on strings. numbers will rarely have the value ".".
15:09:08FromGitter<danielecook> right - so numbers will never have that value, but I don't know if what I'm passing to this function is a number of a string to begin with
15:09:31disruptekhow could you not know the type?
15:09:58FromGitter<danielecook> The file format is kind of heterogeneous
15:10:12FromGitter<danielecook> Fields can be arbitrarily specified as having a certain type by the user
15:10:20disruptekwhat i mean is, nim is typed...
15:10:27FromGitter<danielecook> i know1
15:10:48FromGitter<danielecook> but the json module can handle this issue with no problem
15:11:31FromGitter<danielecook> ive got to run unfortunately...
15:11:45FromGitter<danielecook> but I'll be back and I'm gonna figure out someway of handling this!
15:11:49FromGitter<danielecook> thanks tho
15:11:57disrupteki don't think the json module will perform string->int conversion for you.
15:12:34disruptekso, you'll already have done that, thus determining the type...
15:12:59*absolutejam quit (Ping timeout: 276 seconds)
15:27:24lqdev[m]what's the point of `create`, `createU`, `createShared`, and `createSharedU` when there's `alloc`, `alloc0`, `allocShared`, and `allocShared0`?
15:31:27lqdev[m]@danielecook the thing is, JSON already has numbers, so strings should always be strings.
15:33:16Araqlqdev[m]: legacy. in theory they are a tiny bit easier to use because you don't have to use sizeof
15:33:55lqdev[m]oh I see, they accept a typedesc argument
15:34:18lqdev[m]and you don't have to cast the result
15:35:50Araqyeah. pretty nice, but I never used it :D
15:36:11FromGitter<mratsim> I use them I think, in proof-of-concept
15:36:19FromGitter<mratsim> until I need to write my own allocator
15:36:36Araqmratsim: with devel you can write your own GC
15:36:46Araqwell
15:36:58*alexander92 quit (Ping timeout: 245 seconds)
15:37:07AraqI'm playing with it and hope to be able to release 'araqsgc' as a Nimble package
15:37:17FromGitter<mratsim> that would be nice
15:37:41Araqthe interface finally supports most things that I had in mind
15:38:18FromGitter<mratsim> we have a memory leak when running nim-beacon-chain for a couple of hours and I think that given seq doesn’t return small memory allocation back to the OS, we need to use memory pools or object pools for some of our sequences
15:39:36*Vladar quit (Ping timeout: 258 seconds)
15:43:04AraqI know, I'm working on it
15:43:32ZevvAraq: afaik there is no way for mmap to align other then on page boundaries. If you really want that, you alloc 2M extra and find the first aligned address yourself
15:44:08disruptekbut then your length is off.
15:45:04disrupteki mean, that's a pretty expensive solution, right?
15:45:22Zevvwhat is 2Mb these days :)
15:45:44Zevvand as long as you don't write to the first 0..2048 Kb, nothing will happen under the hood
15:45:59Zevvit's only address space, but nothing is actually allocated
15:46:27ZevvThere's books about that stuff, you know :)
15:46:36disruptektrue; i guess i would start with asking for the 2mb chunk i want and then fallback to manual calculation for alignment.
15:47:21disruptekcan i borrow seq's `[]`?
15:47:31disruptek^ .borrow.
15:47:33Zevvyou can have mine, I'm not using them
15:47:46disrupteksweet, thanks. 👍
15:49:34FromGitter<mratsim> I don’t think you can because seq is generic
15:49:44FromGitter<mratsim> and borrowing from generic is verboten
15:49:56disruptekyeah, i'm sad about it.
15:52:41FromGitter<mratsim> I’m tagging high priority on https://github.com/nim-lang/Nim/issues/2684
15:53:13disruptekyou think it's high priority?
15:53:59disrupteki think araq said recently that he doesn't like borrow. maybe it's just particular examples, or maybe it's just that he doesn't like that it doesn't work for generics. 😉
15:54:09FromGitter<mratsim> it’s one of the reason we don’t use distinct in our codebase even though we would like to
15:54:32FromGitter<mratsim> also there are like 4-5 duplicates opened with a slightly different twist on borrowing from generics
15:54:57FromGitter<mratsim> well I think it should be reimplemented with a macro
15:55:03FromGitter<mratsim> and he probably thinks the same
15:55:27disrupteki guess it makes sense to fish or cut bait on the deficiency.
15:56:11FromGitter<mratsim> macro that takes a typed symbol, check the signature, is one of them matching the distinct base? Yes? lift the implementation and paste it in a new proc
15:56:59FromGitter<mratsim> Also I’ve done 75% of the work already :p
15:57:36FromGitter<mratsim> Here: https://github.com/numforge/laser/blob/af191c086b4a98c49049ecf18f5519dc6856cc77/laser/lux_compiler/frontend/lux_sigmatch.nim
16:01:35*Vladar joined #nim
16:15:25*tiorock joined #nim
16:15:25*tiorock quit (Changing host)
16:15:25*tiorock joined #nim
16:15:25*rockcavera is now known as Guest5662
16:15:25*Guest5662 quit (Killed (cherryh.freenode.net (Nickname regained by services)))
16:15:25*tiorock is now known as rockcavera
16:17:00disruptekwell, i can now see why you prefer not to use distinct.
16:19:02FromGitter<mratsim> we are even remove ranges on some of our types
16:19:16FromGitter<mratsim> it doesn’t compose well at the moment
16:19:23disruptekclearly not.
16:19:47disruptekworse than composition is gratuity of code and even resource consumption.
16:25:40disruptekhow do i run the tests, now? koch tests doesn't work, testament doesn't seem to work...
16:26:31disruptekis there a book?
16:26:45FromGitter<mratsim> koch
16:27:04*nif quit (Quit: ...)
16:27:09disruptekyeah but no.
16:27:13*nif joined #nim
16:27:18disruptekError: cannot open '/home/adavidoff/git/Nim/testament/tester.nim'
16:27:32FromGitter<mratsim> well last time I tried it worked for me
16:27:36FromGitter<mratsim> using stuff like ./koch tests cat async
16:27:41FromGitter<mratsim> or stdlib
16:27:51disruptekmaybe i need to build_all since the new testament changes.
16:29:42disruptekyeah, that solved it.
16:33:59*ng0 quit (Remote host closed the connection)
16:34:03*cgfuh quit (Ping timeout: 245 seconds)
16:35:18*ng0 joined #nim
16:49:25*couven92 quit (Ping timeout: 268 seconds)
16:56:05planetis[m]hi, what is the difference between ntyGenericInvocation and ntyGenericInst and how do I get ntyGenericInst when I have a ntyGenericInvocation node?
16:59:01*sentreen quit (Quit: sentreen)
17:01:46*cgfuh joined #nim
17:02:46*sentreen joined #nim
17:07:54planetis[m]My problem is when I pass GenericObj[int] to a typed macro getTypeImpl returns a genericInst and everythink works, but when its an object field it returns genericInvocation
17:10:22*natrys joined #nim
17:19:00FromGitter<Vindaar> @danielecook unless I'm misunderstanding, you want to override the `%` proc for strings and not the definition of the `%*` macro. The macro simply calls `%` for all the elements. So https://play.nim-lang.org/#ix=1VzP should do what you want
17:24:51*solitudesf- joined #nim
17:25:31*solitudesf- quit (Client Quit)
17:30:05Araqmratsim: no idea why you remove 'range' or 'distinct', they work well and have been battle-tested. *shrug*
17:30:27Araq.borrow doesn't work with generics yeah, but so what, I don't need .borrow
17:30:37Araqand Ada doesn't either
17:51:45*Trustable quit (Remote host closed the connection)
17:53:10*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:53:44*laaron joined #nim
17:55:20*nsf quit (Quit: WeeChat 2.5)
18:10:06*abm joined #nim
18:49:53ZevvOberon doesn't
18:52:08*Vladar quit (Remote host closed the connection)
18:53:30disrupteki don't know why i still find myself composing github issues on a web-page. such a waste of time when i manage to lose them.
18:54:37ZevvIs there a better alternative? I always write down stuff in My Favourite Editor, and cut-n-paste it when posting
18:56:28disruptekhttps://github.com/stephencelis/ghi
18:56:42disruptekkrux02 turned me on to it.
18:57:06*absolutejam joined #nim
18:57:51Zevv"Use your $EDITOR"
18:58:26Zevvand its in debian. you're my hero for today!
18:59:57disruptekyeah, it's an improvement. i just tend to be searching a repo right before i compose a new issue, so i forget to jump back to a shell.
19:04:47*actuallybatman joined #nim
19:06:51*exelotl joined #nim
19:08:27ZevvCould someone run a small test for me on windows?
19:15:46ZevvI'd like to know if the output of "nim c -d:npegGraph test.nim" of this snippet http://ix.io/1VBl comes out acceptable
19:20:40*enthus1ast quit (Quit: WeeChat 1.6)
19:24:32*ZORR0W joined #nim
19:24:51*ZORR0W quit (Client Quit)
19:25:17*ZORR0W joined #nim
19:39:52federico3$ on an ipaddr is returning (family: IPv4, address_v4: [69, 164, 217, 10])
19:41:47federico3(with $ not being imported from the net module)
19:46:04*Ven`` joined #nim
19:48:54exelotlZevv: https://cdn.discordapp.com/attachments/239878713016188939/623606267042201652/unknown.png
19:49:07exelotlfancy
19:49:46Zevvwow that is unexpected
19:49:51Zevvsweet, thanks for testing that!
19:50:03Zevvthat's windows 10 normal console, not linux-on-windows, or what its called?
19:50:49Zevvaraq was still complaining about utf8 rendering on windows the other day i believe, but this is not bad
19:50:50exelotlhmm well it's an msys2 terminal
19:50:55Zevvaah right
19:50:56Zevvthere it is :)
19:51:46Zevvthanks dude
19:52:03exelotlit came out garbage in the VSCode terminal (even though it's still using the msys2 shell)
19:52:15exelotlbut I think that's just generally a problem with all unicode in there
19:52:23*nsf joined #nim
19:52:26exelotlnever found a good solution for it
19:52:32Zevvdoes the vscode terminal show nim compiler output colors then?
19:57:24exelotlcolors are fine but the characters aren't https://media.discordapp.net/attachments/239878713016188939/623607783849459712/unknown.png
19:57:45disruptekwow
19:58:03disruptekhow much did you pay for that?
19:58:28exelotlhehe
19:58:40exelotlregular cmd.exe has the same problem https://cdn.discordapp.com/attachments/239878713016188939/623608647800586261/unknown.png
19:58:54Zevvok, work to do here :/
19:59:03ZevvI'll have to spin up a vm I guess
19:59:08skrylar[m]cmd doesn't understand vt100 escapes IIRC
19:59:10disruptekthat program is free with your $250 purchase of Windows, right?
19:59:44disruptekthis new-fangled vt100 technology is tough to implement.
19:59:54ZevvI was hoping windows 10 would be able to handle these things by now
20:00:12*disruptek <-- actually owns gnufangled.com
20:00:32*ZORR0W quit (Quit: leaving)
20:01:45Zevvpart of the problem is that I'm trying to do this at compile time, and stdout/stderr don't exist there, so ther terminal lib is kind of limping
20:05:21rockcaveraIs there int128 in Nim? Or in any package?
20:07:03FromGitter<deech> Dumb question: how do I create `seq[typedesc]`, the obvious way `const ts = @[int,string,bool]` didn't work.
20:09:50dom96you can't do that
20:11:57FromGitter<deech> Why not?
20:12:30narimiranrockcavera: https://github.com/status-im/nim-stint ?
20:14:42rockcaveranarimiran, thanks
20:18:12dom96deech: because typedesc isn't a value type
20:18:24dom96deech: closest you can get is to have a NimNode which represents it stored in a seq
20:18:41FromGitter<deech> Understood, thanks!
20:18:43dom96deech: your question definitely isn't dumb though :)
20:24:25*narimiran quit (Ping timeout: 265 seconds)
20:28:20exelotlAraq: about making an RFC for addressable consts, would you definitely say `let foo {.section:rodata.}` is the way to go?
20:28:25exelotlcause I feel like the meaning of the .elf sections is somewhat arbitrary, and as you mentioned we already have codegenDecl for it
20:28:37exelotlwhat's most important is the constness of the variable in the generated code
20:31:08Araqexelotl: it would be .section: "rodata"
20:31:33Araqthe sections are platform specific, why hide that
20:32:03Zevveven application specific, when doing embedded stuff
20:32:48exelotloh yeah ok string parameter makes sense
20:36:36exelotlI guess what I mean is, should the .section pragma be the primary way to make the variable const? I think 'variable goes in section foo' and 'variable is generated as a const' are two different things
20:37:43Araqexactly and Nim has a completely different idea about 'const'
20:40:45*Calinou joined #nim
20:42:56*nsf quit (Quit: WeeChat 2.5)
20:43:13Araqexelotl: thinking about it, we can patch the codegen to be smarter about 'let'
20:43:37Araqonce intialization works as for consts, .codegenDecl would work
20:43:49Araqturning this feature request into a mere bugfix
20:46:14exelotlsomething like "if this top-level 'let' only refers to constants and other top-level 'let's, then it can be initialised at the top level in C" ?
20:46:14dom96hm, forum response times have slowed down quite a bit lately
20:46:44Araqexelotl: yes
20:46:48Zevvexelotl: not even top level, static would be ok as well, as it is constant
20:47:22exelotloh yeah, that's what I mean to say x)
20:48:06exelotlokay cool, this seems like a good solution :)
20:49:19dom96Good news: Nimforum has been running for 5 months without crashing. Bad News: it's OOMed the machine and OOM killer hasn't killed it :) https://gist.github.com/dom96/e8a49ce0c62b57cca8d7f1f5dab0eb02
20:49:44exelotllmao wo
20:49:45exelotlw
20:52:29Araqthe OOM killer is cool. We also need a file descriptor killer though, if process A uses too many open files, process B should be killed
20:53:34federico3dom96: you have to configure it
20:56:01dom96federico3, it managed to work fine for years :P
20:58:22federico3...
21:02:03FromGitter<awr1> what was the forum previously based on
21:02:30FromGitter<awr1> maybe i'm not remembering correctly
21:02:52FromGitter<awr1> was it always built in nim?
21:03:04FromGitter<mratsim> Yes
21:03:12federico3the NIH syndrome is strong
21:03:16FromGitter<mratsim> But without discuss like feel
21:03:27FromGitter<awr1> yeah i kinda remember now
21:03:34FromGitter<mratsim> It's also a proof of concept
21:06:28FromGitter<awr1> the NIH-ness comes naturally with being a "C++ replacement"
21:06:46dom96The NIH allows us to prove that Nim is production ready
21:07:25exelotlwho's in charge of the discord bridge btw? it's been down for days
21:07:44Araqhow do you invent a new PL without NIH? anyway, we are not even the worst, the Rust people have to re-create a full OS
21:07:44dom96didn't someone ban it?
21:07:55exelotl:O
21:09:26FromGitter<awr1> i mean you can say what you will about the rust community but i feel like their RIIR mentality is really not a result of any specific aspect of rust (i.e. the safety, in spite of what they say) besides the fact that it is in that domain of "new systems programming language"
21:09:47AraqRIIR?
21:09:47FromGitter<awr1> and RIIR is really synonymous with NIH
21:09:53FromGitter<awr1> rewrite it in rust
21:11:13Araqthe less C code out there, the better, I don't mind a new OS written in Rust
21:11:21FromGitter<awr1> oh i agree on that front
21:13:12FromGitter<awr1> we are all at least united on the opinion that people should abandon C/C++
21:14:27FromGitter<awr1> well, maybe its a little bit more ambiguous with the Dlang users
21:15:04lqdev[m]what's NIH?
21:15:20FromGitter<awr1> since Alexandrescu (and i think some other D people?) contribute to the modern C++ spec
21:15:22FromGitter<awr1> not invented here
21:16:45Araqhmm maybe I should give ReactOS a try
21:16:49FromGitter<awr1> my only reservation with a new OS written in rust is that it would be more ideal if it wasn't quite so POSIX-y
21:17:03FromGitter<awr1> isn't it called redox OS?
21:17:18FromGitter<awr1> oh wait nvm you're talking about the win32 reimpl one
21:18:41Araqyeah, not gonna try redox OS, why would I, I don't care about "everything is a URL now, aren't you happy"
21:18:49FromGitter<awr1> i had a little wire-crossing moment and was like "an OS written in react? what?"
21:20:33FromGitter<awr1> supposedly some of fuchsia is written in rust. but i don't really know what they're doing there
21:22:01FromGitter<mratsim> ReactOS is a supposed to be win32 compatible
21:25:07FromGitter<arnetheduck> fwiw, one potential direction for `nlvm` is to start interacting with other languages on an llvm level (rust, c) - that would be pretty interesting because suddenly cross-language ABI becomes a lot more easy to deal with - as well as getting some nice optimization benefits because now the optimizer can inline, constant-propagate etc across barriers.
21:29:05FromGitter<awr1> there is a certain wanting i have for `nlvm` to have JIT support, specifically in a similar manner to Scopes
21:29:25FromGitter<awr1> https://scopes.readthedocs.io/en/latest/about.html
21:30:03FromGitter<awr1> but i might be being too presumptuous.
21:32:42Araqah I forgot, Redox actually understands things quite a bit
21:32:44Araq> With "Everything is a file" all sorts of devices, processes, and kernel parameters can be accessed as files in a regular filesystem. This leads to absurd situations like the hard disk containing the root filesystem / contains a folder named dev with device files including sda which contains the root filesystem. Situations like this are missing any logic. Furthermore many file properties don't make sense on these 'special files': What is the size
21:32:44Araqof /dev/null or a configuration option in sysfs?
21:32:57AraqNails it.
21:35:37*natrys quit (Quit: natrys)
21:43:09*ng0 quit (Quit: Alexa, when is the end of world?)
21:46:11FromGitter<awr1> @exelotl good luck on your GBA game, btw!
21:46:40exelotlahh thank you :)
21:48:34exelotlit's coming along quite well but sometimes real life gets in the way
21:49:05FromGitter<awr1> i know that all too well
21:49:24exelotlrecently I spent a lot of time on entities and spawners, which was a lot of work with very little visual progress xD
21:49:53exelotlbut hopefully we can move forward with levels and enemies again in the coming weeks
21:50:07disruptekdom96: you really didn't get the Monty Python reference?
21:50:12FromGitter<awr1> it's my last semester before i finish my bachelors and being constantly busy with homework is cutting in my time to do anything nim-related
21:50:40disruptekthat film is totally worth your time.
21:51:19FromGitter<awr1> that's a good thing though! entity systems are important
21:59:55Araqdisruptek: Monty Python is overrated ;-)
21:59:57*Araq ducks
22:00:02*solitudesf quit (Ping timeout: 245 seconds)
22:00:18Araqnah, it's awesome
22:03:38disruptekopinions come and go so quickly here. ;-)
22:03:41dom96I love these issues https://github.com/dom96/choosenim/issues/134
22:24:30*krux02 quit (Remote host closed the connection)
22:29:48exelotlAraq: hey, about static initialisation of top-level 'let' variables... It's not really specific to let right?
22:30:00exelotlA top level 'var' could also be initialised statically as long as the same restrictions hold true (only refers to constants or other top-level vars)
22:30:09Araqsure
22:31:01exelotlOk, I'll make the issue more general then
22:38:40*cyraxjoe quit (Quit: I'm out!)
23:07:48*snooptek quit (Remote host closed the connection)
23:10:02*absolutejam quit (Ping timeout: 245 seconds)
23:24:42*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:45:17*theelous3 joined #nim
23:52:25*abm quit (Quit: Leaving)
23:53:23*theelous3 quit (Remote host closed the connection)