<< 01-06-2019 >>

00:00:01rockcaveraWindows works normally
00:02:32dom96This isn't a Nim issue, it's a limitation imposed by Linux
00:02:56dom96You need to change the max number of FDs your Linux system allows
00:04:15rockcaverathanks
00:04:16rockcavera;)
00:05:19*rnrwashere joined #nim
00:07:08*deech_ quit (Ping timeout: 245 seconds)
00:07:28*deech quit (Ping timeout: 272 seconds)
00:07:33*envoyt quit (Ping timeout: 245 seconds)
00:09:36*envoyt joined #nim
00:10:04*rnrwashere quit (Ping timeout: 252 seconds)
00:11:25*deech joined #nim
00:12:57*deech_ joined #nim
00:14:16*deech_ quit (Read error: Connection reset by peer)
00:15:45*deech_ joined #nim
00:16:49*deech_ quit (Read error: Connection reset by peer)
00:17:42*deech_ joined #nim
00:17:49*deech_ quit (Read error: Connection reset by peer)
00:20:24*deech_ joined #nim
00:29:24*Jesin quit (Quit: Leaving)
00:33:41*Jesin joined #nim
00:36:22*rnrwashere joined #nim
00:41:03*rnrwashere quit (Ping timeout: 252 seconds)
00:41:41*Tyresc quit (Quit: WeeChat 2.5-dev)
00:53:38*uptime quit (Quit: It's been a pleasure working with some of you, and I will not forget those of you soon. But remember, while today it is me, we all shall fall. In other words, I'm quitting.)
00:56:19*rnrwashere joined #nim
00:59:29*ng0 quit (Quit: Alexa, when is the end of world?)
01:00:48*rnrwashere quit (Ping timeout: 248 seconds)
01:03:56*uptime joined #nim
01:10:12FromDiscord_<nothing to no one> I just want to thank everyone here. This is the nicest, most welcoming programming community I've ever been in. You guys are super helpful and awesome, thanks a bunch :)
01:12:32*deech_ quit (Ping timeout: 248 seconds)
01:12:43shashlick👍
01:13:16FromDiscord_<Avatarfighter> ngl I'm in the same boat, this community is what really got me into nim
01:19:02FromDiscord_<nothing to no one> Definitely. "There are bad apples in every community", but I've never met anyone into Nim that was anything less than incredibly polite and helpful
01:20:08FromDiscord_<Avatarfighter> ^
01:20:41*NimBot joined #nim
01:20:49*rockcavera quit (Remote host closed the connection)
01:22:23*Hexeratops left #nim ("Goodbye for now!")
01:26:13*dddddd quit (Read error: Connection reset by peer)
01:41:31*rockcavera joined #nim
01:43:06deechWhat does this {.partial.} pragma do?
01:46:09*rockcavera quit (Remote host closed the connection)
01:52:02*rockcavera joined #nim
01:52:30*envoyt quit (Quit: Bye)
01:55:16*arecaceae quit (Remote host closed the connection)
01:55:36*arecaceae joined #nim
02:00:42*uptime quit (Quit: Downsizing? I have no problem with that. I have been recommending downsizing since I first got here. I even brought it up in my interview. I say, bring it on.)
02:10:09*uptime joined #nim
02:21:09*deech quit (Ping timeout: 244 seconds)
02:33:54*deech joined #nim
02:38:21*rayman22201 quit (Quit: Connection closed for inactivity)
02:42:08*deech quit (Ping timeout: 245 seconds)
03:16:49*chemist69 quit (Ping timeout: 250 seconds)
03:18:59*chemist69 joined #nim
03:41:03*vlad1777d quit (Ping timeout: 268 seconds)
03:55:12FromGitter<Varriount> deech: Where did you see it?
04:14:14*arecaceae quit (Remote host closed the connection)
04:14:33*arecaceae joined #nim
04:28:12*surma quit (Ping timeout: 252 seconds)
04:31:43*r4vi quit (Ping timeout: 276 seconds)
04:32:46*rnrwashere joined #nim
04:33:50*rnrwashere quit (Read error: Connection reset by peer)
04:34:36*rnrwashere joined #nim
04:36:57*vlad1777d joined #nim
04:54:38*r4vi joined #nim
04:56:51*surma joined #nim
05:01:44*rnrwashere quit (Remote host closed the connection)
05:02:16*rnrwashere joined #nim
05:03:07*rnrwashere quit (Remote host closed the connection)
05:03:20*hoijui joined #nim
05:03:20*rnrwashere joined #nim
05:19:19*nsf joined #nim
05:23:45*Jesin quit (Quit: Leaving)
05:26:23*Jesin joined #nim
05:43:57*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
05:44:27*laaron joined #nim
05:48:58*laaron quit (Remote host closed the connection)
05:49:40*laaron joined #nim
06:00:47*solitudesf joined #nim
06:11:53*rnrwashere quit (Remote host closed the connection)
06:12:30*rnrwashere joined #nim
06:15:52*hoijui quit (Quit: Leaving)
06:16:00*hoijui joined #nim
06:17:00*rnrwashere quit (Ping timeout: 258 seconds)
06:32:01*narimiran joined #nim
06:39:56*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
06:40:30*laaron joined #nim
06:53:20*rayman22201 joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:36*gmpreussner joined #nim
07:24:18*laaron quit (Remote host closed the connection)
07:26:06*laaron joined #nim
07:29:01*hoijui quit (Ping timeout: 250 seconds)
07:38:42*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:39:29*laaron joined #nim
07:40:13*laaron quit (Client Quit)
07:43:43*laaron joined #nim
07:46:21*laaron quit (Client Quit)
07:46:40*laaron joined #nim
07:57:18*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:57:40*laaron joined #nim
08:00:07*narimiran quit (Ping timeout: 258 seconds)
08:05:01*hoijui joined #nim
08:23:47*vlad1777d quit (Ping timeout: 252 seconds)
08:29:21*leorize quit (Ping timeout: 256 seconds)
08:29:22*vlad1777d joined #nim
08:34:03*vlad1777d quit (Ping timeout: 252 seconds)
08:35:42*hoijui quit (Ping timeout: 252 seconds)
08:36:45*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
08:37:07*laaron joined #nim
08:37:56*solitudesf quit (Ping timeout: 272 seconds)
09:02:13*rayman22201 quit (Quit: Connection closed for inactivity)
09:13:38*neceve joined #nim
09:22:06*dddddd joined #nim
09:23:23*neceve quit (Ping timeout: 245 seconds)
09:24:02*leorize joined #nim
09:24:45*neceve joined #nim
09:58:05*neceve quit (Read error: Connection reset by peer)
10:00:24*deech_ joined #nim
10:03:40*tiorock joined #nim
10:03:40*tiorock quit (Changing host)
10:03:40*tiorock joined #nim
10:03:40*rockcavera quit (Killed (barjavel.freenode.net (Nickname regained by services)))
10:03:40*tiorock is now known as rockcavera
10:18:21*stefanos82 joined #nim
10:33:13*sealmove joined #nim
10:34:39*deech_ quit (Ping timeout: 248 seconds)
10:37:08*matt-m joined #nim
10:37:12*Vladar joined #nim
10:38:58*matt-m quit (Remote host closed the connection)
10:41:46*matt-m joined #nim
10:50:41*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
10:51:02*laaron joined #nim
10:51:10*al_ joined #nim
10:52:28livcdshashlick:
10:56:15*envoyt joined #nim
10:58:38*deech_ joined #nim
11:03:37*elrood joined #nim
11:20:28*envoyt quit (Ping timeout: 245 seconds)
11:22:18*neceve joined #nim
11:23:59*envoyt joined #nim
11:24:47*matt-m quit (Ping timeout: 248 seconds)
11:33:23*matt-m joined #nim
11:37:51*deech_ quit (Ping timeout: 258 seconds)
11:40:30*envoyt quit (Read error: Connection reset by peer)
11:50:12*deech_ joined #nim
11:56:17*solitudesf joined #nim
12:41:40FromDiscord_<nothing to no one> say i have two files: `main_library.nim` and `helper_functions.nim`. I'd like to expose some functions in `helper_functions.nim` so my `main_library.nim` can access them, but I don't want anybody else to be able to import them. what's the best way to accomplish that?
12:47:11Araquse the export marker and write a doc comment to say ## internal API.
12:49:16Araqit might surprise you but nobody ever quantified the costs vs benefits of this "Information hiding" principle, so relax and focus on your actual problems
12:53:08AraqIME bugs are very rarely of the form "oh damn, I shouldn't have called this insufficiently hidden proc".
12:54:30Zevvalthough I've heard rumours of people shouting "Where the hell does this symbol come from, and why the hell is it cluttering my namespace"
12:57:27Araqhttps://github.com/nim-lang/Nim/wiki/Destructors,-2nd-edition anyway, a new spec arrived
12:58:25Zevvweren't you supposed to be on holidays for a few days?
12:58:43Zevvor is this the output of your train ride?
12:59:52Araqit's what I did in the train.
13:00:13Zevvsweet
13:00:51*rnrwashere joined #nim
13:02:02AraqI also wanted to implement it but the train went faster than expected
13:02:13Zevvhaha
13:02:33ZevvI bet the community can scrape together another ticket for you if that is what it takes
13:05:01*rnrwashere quit (Ping timeout: 252 seconds)
13:06:36*lritter joined #nim
13:08:33deech_What does the {.partial.} pragma do? https://github.com/nim-lang/Nim/blob/devel/tests/fields/tfields.nim#L83-L88
13:10:24Araqit means "fill it in the proc body via the var obj.field syntax"
13:11:01Araqit's undocumented, the beginnings of how to write closures with fewer builtin language features
13:13:26deech_Araq, so the fields names are completely dynamic? Is it possible to know what fields an object supports statically?
13:13:49Araqno they are not dynamic at all
13:14:57Araqthey are filled in later, but not at runtime
13:15:17Araqthe feature works in combination with the also undocumented {.liftLocals: t.}
13:15:26Araqtransformation.
13:16:05deech_Araq, so in the example linked if there was another function below `my` that added the 'bar' field does that mean 'Foo' now has 'foo','other' and 'bar' or just 'bar' within the scope of that function?
13:16:26Araqfoo, other and bar.
13:17:52deech_So fields are statically added in the order in which the compiler sees the procs? So presumably if 'Foo.foo' was redefined to a string later it would be a type error?
13:18:17Araqit should be, but please ignore that it exists, it's not production ready, it's a sketch how to do closures and closure iterators without baking the memory managment regime into the design
13:19:16Araqactually, there should be no redefinition error the language scoping rules are still active
13:19:25Araqyou would get 2 different foo fields
13:19:27deech_It's just that it's difficult to know what to do in the following case 'let f.foo {.compileTime.} = ...'
13:19:53deech_I'm working on ironing out issues in let/var compile time bindings.
13:20:05Araqnice.
13:20:46Araqwell 'let f.foo {.compileTime.} = ...' is the same as 'let f {.compileTime.}'
13:21:03Araqmaybe.
13:22:07deech_Can we just make that illegal? I can't think of a compile time case 'let f.foo = ...' that couldn't go in a static block instead, that's if partial objects are even supported by the vm.
13:26:07Araqwell the syntax is one thing, the other is that this is used internally for closures
13:26:16Araqconsider this:
13:26:21Araqproc outer =
13:26:32Araq let x {.compileTime.} = ...
13:26:40Araq proc inner = use(x)
13:26:56*narimiran joined #nim
13:27:09Araqyou have to ensure that 'inner' can use 'x' without being turned into a .closure
13:28:00*lritter quit (Ping timeout: 272 seconds)
13:28:19deech_proc outer =
13:28:27deech_ let x {.compileTime.} = ...
13:28:37deech_ const X = x
13:28:50deech_ proc inner = use(X)
13:29:36*apodo joined #nim
13:29:43deech_The way I'm working out the issues all runtime access to compile time variables has to mediated by 'const'.
13:29:46dom96Araq, do the new object variant changes result in a runtime error?
13:30:41Araqdom96: yup
13:30:57dom96why? This will break a lot of programs at runtime
13:32:48deech_Araq, also your example is currently pretty brittle in 'dev', there's lots of illegal storage errors that happen if you assign to anything more complex than an 'int' or something like that ...
13:32:50*lritter joined #nim
13:33:08Araqdeech_: :-)
13:33:54Araqdom96: I didn't find a better solution and it's an old loophole in Nim's memory safety that must be closed for v1
13:34:08deech_I've fixed a lot of them but corner cases like partial objects keep popping up.
13:34:27dom96Araq, why not disallow assignments to 'kind' etc?
13:35:00Araqdom96: that would break even more code, but it's nice for a 'linter'
13:35:57dom96Why would it? From what I see the code breaks as soon as an assignment happens, when is it allowed?
13:36:32Araqit is allowed when the assignments do not trigger an "object branch switch"
13:37:39dom96so disallow only assignments that cause a object branch switch?
13:37:48Araqexactly.
13:37:49*nsf quit (Quit: WeeChat 2.4)
13:38:02dom96can't you determine this statically and error?
13:38:11Araqnope.
13:38:52AraqI considered a static analysis for a subset but it makes the spec terrible
13:40:17Araqthe good solution forward here is to disallow these assignments altogether
13:40:24dom96Could we at least have a "transition" state for fields that change the object branch?
13:40:36dom96So that doing: result.kind = Foo; isn't a problem?
13:40:48*hoijui joined #nim
13:41:01Araqwhat do you mean by "transition state"?
13:42:35Araqyou can compile your code with -d:nimv019 for a transition period, but I doubt that's what you mean
13:43:02dom96I mean that you're allowed to switch the branch as long as it wasn't set before
13:43:21dom96I guess by default it gets the "default" state
13:43:42dom96a "transition" state would allow us to at least set it once
13:43:54dom96but meh, I guess that would be too complex
13:44:03Araqthat would change the object layouts in memory and would have been more work and more complexity
13:45:09Araqand in the end, 'case objects' didn't age well, I'd rather have ML-styled sum types nowadays
13:45:59Araqand syntax aside, in ML/Rust/Haskell you cannot assign the discriminator field at all
13:46:13Araqso that's what we should do IMO.
13:47:52*vlad1777d joined #nim
13:49:44lqdev[m]is there any serial library for Nim?
13:51:49*SenasOzys joined #nim
13:52:15Zevvlqdev[m]: yes, and its called serial
13:52:37Zevvlmnstfy: Let Me "nimble search" That For You :)
13:52:47lqdev[m]Zevv: nice
13:57:49*vlad1777d quit (Ping timeout: 252 seconds)
14:04:06*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/zVvHuangMbwtvacNQPEIMMxB >
14:04:10lqdev[m]not nice
14:09:46*SenasOzys quit (Read error: Connection reset by peer)
14:16:35*rnrwashere joined #nim
14:24:13*al_ quit (Quit: al_)
14:40:21*solitudesf quit (Ping timeout: 252 seconds)
14:44:44*sealmove quit (Quit: WeeChat 2.4)
14:53:02deech_Which function can I use in the compiler to generate a temporary symbol?
14:55:15*rnrwashere quit (Remote host closed the connection)
14:56:35zestyrmaybe this https://nim-lang.org/docs/macros.html#genSym%2CNimSymKind%2Cstring
14:57:34*rnrwashere joined #nim
14:59:07*PMunch joined #nim
15:00:41leorizeAraq: I think windows CI should use the mingw @ nim-lang.org, no?
15:01:22Araqtrue
15:03:16leorizenarimiran: the boxes for featured projects on nim-lang.org doesn't have any gaps between them
15:04:04leorizeand shouldn't css grid be used instead of flex here?
15:04:22leorizenvm that last statement :P
15:05:42FromDiscord_<Stuffe> Maybe a silly question, but if I declare variables in a function using "let", will the memory be allocated on each function call or only once?
15:06:17leorizeif it's a stack-based var, then it's definitely created every function call
15:06:38leorizewell but the stack is insanely fast anw so you shouldn't have to care
15:06:54*smitop joined #nim
15:07:22smitopWhy is there a 0.19.4 and 0.19.6, but no 0.19.5?
15:07:35leorize0.19.5 is the dev version
15:07:38FromDiscord_<Stuffe> its a table[sting: int], its really long though
15:08:02leorizeodd versions are development ones, stable ones are even
15:08:58leorize@Stuffe: well the stack works by moving the stack pointer (afaik), which is fast, so you don't have to care about that
15:08:58deech_zestyr, That looks promising, I'd like to get the generated symbol as a string, do you know how to do that?
15:09:19leorizeyou can't
15:12:54*rnrwashere quit (Remote host closed the connection)
15:25:49*deech_ quit (Ping timeout: 252 seconds)
15:34:04Araqdeech: search for 'proc getTemp' or something
15:43:02*solitudesf joined #nim
15:43:33FromDiscord_<Avatarfighter> Would anyone happened to know who is the creator of the nim discord server?
15:44:03*rnrwashere joined #nim
15:48:33*rnrwashere quit (Ping timeout: 258 seconds)
15:51:47*deech_ joined #nim
16:07:01*laaron quit (Remote host closed the connection)
16:07:51*laaron joined #nim
16:16:53*Vladar quit (Remote host closed the connection)
16:17:04*rnrwashere joined #nim
16:19:17*ng0 joined #nim
16:33:39*neceve quit (Ping timeout: 244 seconds)
16:42:14skrylar[m]@zacharycarter i have heard great things of vuejs as well
16:45:02Araqvuejs is terrible.
16:49:10Araqmaybe it's good if you think HTML+CSS+JS is a good way to develop web apps, but I know HTML is bad, CSS is worse and JS a cancer, so no thanks.
16:50:43Araqdisclaimer: I did use vue.js extensively, got paid for it and would love to erase my memories about it.
16:55:13*nsf joined #nim
16:57:56*PMunch quit (Remote host closed the connection)
17:03:48FromDiscord_<exelotl> I don't get it, the web *is* HTML+CSS+JS and those are the three languages that everyone knows
17:04:40Zevvbut that doesn't mean they're any good
17:06:56leorizeanyone have windows here?
17:07:00Araqexelotl: that's why you compile real programs to this crapfest
17:07:07Araqyou don't use it directly.
17:11:21shashlick@livcd what's up
17:12:17leorizeanyone have a working windows console with mingw that I can borrow?
17:13:31*rnrwashere quit (Remote host closed the connection)
17:13:35skrylar[m]i think what he's trying to say is vuejs is fine unless you're still wishing to write BASIC on a C64. 8)
17:14:07shashlick@leorize I can test for you
17:14:44skrylar[m](actually i'm not a super fan of the html/css/js stack but i'm still a retained mode derp so my hate for it is less)
17:14:55leorizeshashlick: can you give me the output for `uname`?
17:14:56shashlick@Araq - failing at runtime for the object variant case is very pythonish
17:15:02shashlickHate that it fails only on use
17:15:12shashlickBut sounds like it is too hard to detect at compile time
17:15:13FromDiscord_<exelotl> Araq: sure I would probably do that if I was starting a new personal project, but I don't think people should be expected to do that. I think Vue leverages what people already know in a particularly clean and intuitive way
17:15:53Araqshashlick: will give you a better switch
17:16:36*smitop quit (Quit: Connection closed for inactivity)
17:17:33shashlickI haven't used object variants anywhere yet so wasn't impacted but nimble was
17:17:43AraqI noticed
17:18:25shashlick@leorize - check out the choosenim init.sh script
17:18:34shashlickbut I get MSYS_NT-10.0-WOW
17:19:06shashlickin mingw console I get MINGW64_NT-10.0-WOW
17:19:28shashlickin gitbash i get MINGW64_NT-10.0
17:20:16leorizealright, so capturing mingw* and msys* is the way to go
17:21:03leorizeI'm gonna make the csources makefile aware of windows
17:21:16leorizethe batch file took like 1m just to done building csources
17:21:55Araqexelotl: well I cannot argue against success but vue.js's design has inherent problems.
17:22:44Araqlike for instance, not actually being able to work... https://vuejs.org/v2/guide/reactivity.html#Change-Detection-Caveats
17:23:11Araqthis one affect me all the time.
17:23:15Araq*affected
17:23:51leorizeAraq: would you like testing MSVC on CI?
17:24:07shashlick@leorize what you working on
17:24:16FromDiscord_<Stuffe> Why doesn't nim compile to webassembly instead of javascript?
17:24:21leorizeshashlick: azure pipelines
17:24:38skrylar[m]eeh. how does one fail on object variants at compile time
17:24:51skrylar[m]pascal also fails at runtime if i remember
17:25:14skrylar[m]i mean sure if you have haske/rust algebra types you could carry the type field statically
17:25:59leorizeStuffe: webasm doesn't exist when the js backend was around
17:26:23skrylar[m]is webasm a good idea for regular logic tho
17:26:29leorizealso iirc DOM operations from webasm is slow
17:26:50leorizeI heard ppl are gonna make servers with webassembly
17:27:02FromDiscord_<Stuffe> I dont think you can do DOM operations directly yet, you would have to wrap it in JS until they get around to it
17:27:04*skrylar[m] slits wrists
17:27:38*xet7 joined #nim
17:27:42FromDiscord_<Stuffe> But it just seems easier and less bug prone to compile to webassembly than javascript
17:27:43skrylar[m]anyhoo. the bmessage stuff is a thing. still have to name that framework and then do the plumbing for the non-threaded version.. but eh.
17:35:48*ng0 quit (Quit: Alexa, when is the end of world?)
17:38:05skrylar[m]at least once the plumbing is done the actual gui code can start
17:43:27*narimiran quit (Ping timeout: 248 seconds)
17:44:16skrylar[m]somewhat strange is that where VCL has canvas objects that are attached to forms and whatnot, [BView](https://www.haiku-os.org/docs/api/classBView.html)s *are* the canvases and then buttons or whatnot are just built off of those
17:44:37*rnrwashere joined #nim
17:49:01*rnrwashere quit (Ping timeout: 246 seconds)
17:58:48*xet7 quit (Remote host closed the connection)
18:00:00lqdev[m]omg `-d:release` is so amazing, my frame time was about 5ms and it dropped about 10× when I compiled with `-d:release`
18:02:15*xet7 joined #nim
18:02:43lqdev[m]ah wait, it's `--opt:speed` that does the trick
18:03:07lqdev[m]I can debug with quick startup times and stack traces!
18:03:56leorizeor just do -d:release --stacktrace:on :p
18:04:30lqdev[m]does `--opt:speed` disable all checks?
18:04:35leorizenope
18:04:53lqdev[m]I know `-d:release` does
18:05:07leorizehttps://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L55
18:05:25leorize--opt:speed only instruct the C compiler to optimize
18:05:59Araqit should always be active IMO.
18:06:08lqdev[m]my game is a tiny bit slower on just `--opt:speed` (1ms frame time) than on `-d:release`, but it's blazing fast nonetheless
18:06:14Araqwe need to change these setings
18:06:29lqdev[m]launching took about a second with the default config, now it's instant
18:06:55FromDiscord_<DeltaPHC> Yeah, compilers are quite smart at optimization
18:06:55lqdev[m]I'm setting `--opt:speed` as the default in my `run_debug` task, as I value fasr prototyping.
18:07:09Araqat least -O1 should be our default
18:07:14lqdev[m]fast*
18:07:25lqdev[m]is it -O0 now?
18:07:34FromDiscord_<DeltaPHC> The main worry is optimizations getting in the way of debugging
18:07:38leorizeor just go for -O2 and use -Og when --debugger:native is passed
18:07:43ZevvAraq: even when debugging?
18:07:59Araqsure, even for debugging.
18:08:00Zevv^
18:08:03Zevvwhy
18:08:22FromDiscord_<Marrakezh> Hi
18:08:27Zevvhi
18:08:31lqdev[m]hello!
18:08:32Araqbecause it's the compiler's job to not lose line informations when optimizing
18:08:50leorizeAraq: -Og for debugging please, or else inlining will occur
18:09:03Zevvsome linese might not exist, and I'm here waiting for my breakpoint
18:09:10Araqthe optimizations that Nim does itself cannot even be turned off
18:09:34ZevvOg as leorize says, thhats why it exists
18:09:54leorizealso on clang -O2 try to vectorize loops
18:10:00leorizenot really nice for debugging
18:10:19Araqwhat's the problem with inlining? if inlining loses debug info, file a bug report
18:11:09leorizejust that you can't break on a function when you should be able to
18:11:20AraqI mean ok, being practical and all that we can make -Og the default
18:11:26Zevvghehe
18:11:44ZevvI was already typing ramblings
18:11:52*xet7 quit (Quit: Leaving)
18:12:09Araqbut please note that you're effectively describing compiler/debugger bugs to me
18:12:21leorize22m for a osx build on azure pipelines
18:12:24leorizepretty impressive
18:12:30FromDiscord_<Marrakezh> Whats is the bot doing
18:12:48Zevvleorize: who pays for these CI's or is azure for free?
18:13:00leorize!eval echo "Hi! @Marrakezh"
18:13:01FromDiscord_<Avatarfighter> The bot is relaying messages from discord to the IRC chats and the IRC chats to discord @Marrakezh
18:13:03NimBotHi! @Marrakezh
18:13:17FromDiscord_<Marrakezh> ohhhh
18:13:17leorizeoh, thought they were talking about nimbot :p
18:13:19FromDiscord_<Avatarfighter> It also has eval which is pretty awesome!
18:13:27leorizeZevv: azure is free
18:13:40FromDiscord_<Avatarfighter> Its always good to show NimBot, it's awesome, leorize
18:13:41lqdev[m]by the way, why doesn't choosenim cache the Nim git repo/C sources, but rather re-downloads everything every time you do `nim update devel`?
18:13:58Zevvleorize: ah sweet
18:14:15*xet7 joined #nim
18:14:20leorizealso 25m for a windows packages testing build
18:14:30FromDiscord_<Marrakezh> So, Iam trying use Nim to gamedev, anyone recommend any framework?
18:14:59Araqthe JVM inlines aggressively and doesn't produce misleading stack traces. maybe one day gcc+gdb can replicate this feature in the upcoming decades
18:15:06Zevvhow low do you want to go? nim_sld2 is ok
18:15:23FromDiscord_<Marrakezh> I just want make some 2d games
18:15:42leorizegodot-nim
18:15:50leorizenever tried, but I heard that godot is a decent engine
18:16:05FromDiscord_<Marrakezh> I go see it
18:16:26skrylar[m]godot is nice yes
18:16:39Zevvproblem with sdl2 is that it is not nimmish, its a thin C wrapper so you need to addr and ptr your way around
18:18:41lqdev[m]Marrakezh: afaik there's nimgame by Vladar https://vladar4.github.io/nimgame2/, I'm also working on a game engine but it's far from complete https://github.com/liquid600pgm/rapid
18:19:01FromDiscord_<Marrakezh> I go see it
18:19:28shashlick@Araq what remains for 0.20
18:19:44lqdev[m]Nimgame uses SDL2, my engine uses Glad, GLFW and FreeType
18:20:21lqdev[m]I'm thinking about making a WebGL backend for rapid, that would be fun
18:20:43*hoijui quit (Ping timeout: 252 seconds)
18:20:47leorizeshashlick: showstopper bugs :p
18:21:12FromDiscord_<Avatarfighter> this might be a bad question but currently I have a wrapper in which I have to do ptr and addr for my procs and I was wondering is there anything I can do to avoid using ptr and addr?
18:22:04lqdev[m]wrap the wrapper in a type-safe wrapper
18:22:20skrylar[m]depending on what you are handling, `distinct pointer` is nice
18:23:01leorizeI usually use `ptr object`
18:23:10FromDiscord_<Avatarfighter> uhhh
18:23:32leorizeAvatarfighter: make a wrapper that use `var`
18:23:44FromDiscord_<Avatarfighter> just var?
18:23:56leorize`var` is passed to C as pointer, but it's an implementation thing
18:24:07leorizeAraq: can we rely on that ^
18:24:09leorize?
18:24:23FromDiscord_<Avatarfighter> I can do that, I'm not going to lie I'm interested in seeing an example for what lqdev and skrylar said
18:24:29FromDiscord_<Avatarfighter> sounds interested
18:24:37Araqleorize: yeah. it sucks a bit, but yes
18:24:39FromDiscord_<Avatarfighter> sounds interesting
18:24:53skrylar[m]@AvatarFighter well i don't know what your code looks like?
18:25:13lqdev[m]Avatarfighter: here's a type-safe wrapper example https://github.com/jackmott/easygl/blob/master/src/easygl.nim
18:25:38skrylar[m]in a binding, opaque pointers can be implemented as `type OpaqueBagel = distinct pointer` and your wrappers can typecast from pointers to the distinct, and the nim side will type check that you don't mix up the pointer types
18:26:37skrylar[m]if you are just trying to hide `ptr foo`, then `type BagelHandle = object secret*: ptr Bagel` will seal the pointer up in an object of identical size and you can slap procs on the handle type that wrap around the pointer stuff
18:27:08FromDiscord_<Avatarfighter> skrylar: that's really, really cool I'll try and cook up something that uses that wow that's awesome
18:27:13skrylar[m]i think you can say foo = distinct ptr bar but i've never tried that
18:27:21skrylar[m]yes distinct is great
18:27:36FromDiscord_<Avatarfighter> lqdev: thank you for the example you guys are helping me grow my knowledge of this language 😃
18:28:08skrylar[m]ex. distinct strings too, so you can have the type system treat sanitized strings separate from untrusted ones etc
18:28:49FromDiscord_<Avatarfighter> That's actually nuts wow
18:28:50lqdev[m]^ Nim has this built-in for input from files, it's called taint mode
18:29:07skrylar[m]yes but thats a specific case
18:29:11skrylar[m]distinct doesn't require magic
18:29:48FromGitter<alehander42> araq
18:29:54FromGitter<alehander42> we have slower trains
18:30:05FromGitter<alehander42> with very nice views
18:30:06skrylar[m]ex. if you're in unicode hell you can make distinct strings for each normalization type so an ex. string->NFKC proc tests for correctness, then returns a string that can be handed to ex. sorting procs that only want normalized input
18:30:18FromGitter<alehander42> you can come and work in them :)
18:30:34FromDiscord_<Avatarfighter> Hello alehander 👋
18:30:45skrylar[m]or distinct floats to represent degrees and rads :)
18:30:48FromGitter<alehander42> trains are nice for prototyping indeed
18:31:17skrylar[m]actually has anyone abused distincts for math yet
18:31:36skrylar[m]it occurs to me that you could use the implicit converters to make it so degrees(45) gets implicitly converted to radians
18:31:58lqdev[m]this is a brilliant idea
18:32:26lqdev[m]I wonder why this isn't a thing in `math` yet
18:32:45skrylar[m]its a little bit magic
18:33:19FromGitter<alehander42> araq
18:33:27FromGitter<alehander42> btw what do you think about svelte
18:33:48lqdev[m]ah of course, it imports those functions from `<math.h>`
18:33:53lqdev[m]so it's not that simple
18:34:08lqdev[m]I don't think it would cause problems with the FFI tho
18:34:10FromGitter<alehander42> it has different approach than most diff based frameqwork it generates syncing reactive code on "compile" time or something
18:34:14FromGitter<alehander42> have to read more
18:34:21FromGitter<alehander42> hello avatarfigther
18:38:28shashlickMaybe some of this should go into nimterop
18:38:40shashlickInstead of pointers
18:42:36*xet7 quit (Quit: Leaving)
18:43:29leorizeAraq: I've just tried the nim-lang.org mingw on azure, and got a few tests failing
18:43:41FromDiscord_<Avatarfighter> Would anyone happen to know who is the owner of the nim discord server?
18:44:08*smitop joined #nim
18:44:56*xet7 joined #nim
18:48:56FromDiscord_<Avatarfighter> nvm I found them
18:49:04*rnrwashere joined #nim
18:50:16*xet7 quit (Quit: Leaving)
18:50:48*rnrwashere quit (Remote host closed the connection)
18:52:33*xet7 joined #nim
18:56:46*rnrwashere joined #nim
19:00:17*xet7 quit (Quit: Leaving)
19:01:50FromDiscord_<Marrakezh> I never see he so idk
19:02:00*disruptek_ joined #nim
19:02:52*disruptek quit (Ping timeout: 246 seconds)
19:03:45*marcazar joined #nim
19:04:43*solitudesf quit (Ping timeout: 252 seconds)
19:05:46*xet7 joined #nim
19:09:01leorizelive CI test view: https://dev.azure.com/alaviss/Nim/_build/results?buildId=117&view=ms.vss-test-web.build-test-results-tab
19:09:01Araqalehander42: I never heard of svelte before
19:10:49shashlick@Araq anything high priority you want me to take a look at?
19:11:26*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
19:11:50*laaron joined #nim
19:12:40*nsf quit (Quit: WeeChat 2.4)
19:13:59Araqthe Nimble issue where 'tests' is an alias for 'test' but doesn't work anymore
19:14:57shashlickI'll take a look
19:15:03*xet7 quit (Quit: Leaving)
19:15:49*stefanos82 quit (Quit: Quitting for now...)
19:17:20*xet7 joined #nim
19:27:56FromGitter<kayabaNerve> Namimiran:
19:28:16FromGitter<kayabaNerve> And I did not mean to send that. Sorry. Gitter mobile sucks.
19:29:10FromGitter<kayabaNerve> narimiran: https://github.com/nim-lang/Nim/issues/11375 is what I meant to send.
19:29:39FromGitter<kayabaNerve> Realized I horribly messed up the username, scrolled up to check, and gitter screws me...
19:31:01FromGitter<kayabaNerve> This is what I was discussing the other day.
19:31:02leorize[m]narimiran: https://dev.azure.com/alaviss/Nim/_build/results?buildId=118&view=ms.vss-test-web.build-test-results-tab <- that's our current CIs put into one. Any more feature requests?
19:37:35*xet7 quit (Quit: Leaving)
19:38:55Araqer ... https://raw.githubusercontent.com/nim-lang/Nim/master/compiler/sigmatch.nim
19:39:24Araqvs https://github.com/nim-lang/Nim/blob/master/compiler/sigmatch.nim wtf github?
19:39:42*Marrakezh joined #nim
19:39:53Marrakezha
19:39:58FromDiscord_<Marrakezh> double me
19:42:58*Jjp137 quit (Read error: Connection reset by peer)
19:43:41*Jjp137 joined #nim
19:46:35*Marrakezh quit (Ping timeout: 256 seconds)
19:47:31*deech joined #nim
19:48:08deechOk, _now_ I've got it ... I think. https://github.com/nim-lang/Nim/pull/11341
19:51:42FromDiscord_<Marrakezh> I trying learn nim, anyone recommend something to I do, like a project
19:53:32shashlick@Araq - nimble doesn't advertise or implement that test and tests are synonyms
19:54:58lqdev[m]Marrakezh: creating a simple game isn't bad for a first project
19:55:04*nsf joined #nim
19:55:14lqdev[m]it doesn't have to be original, you can make a clone of an existing game if you don't have any idead
19:55:17lqdev[m]ideas*
19:55:24FromDiscord_<Marrakezh> ok
19:56:00shashlicktake an existing small project of yours and reimplement in nim for fun
19:56:04ZevvMarrakezh: also depends on your experience in other languages of course. I'd pick something where you can learn "the nim way" of doing things
20:02:24FromDiscord_<Marrakezh> anyone here use nim-csfml?
20:13:25*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
20:13:46*laaron joined #nim
20:19:52lqdev[m]Marrakezh: it uses a pretty outdated SFML version
20:20:50lqdev[m]also, it probably won't run on the latest Nim due to the fact that a) it's made for 0.17.0, we're on 0.19.6 b) it uses the old Nimble package format
20:21:34*disruptek_ is now known as disruptek
20:22:22Araqyou can always update it
20:22:47lqdev[m]true
20:30:09skrylar[m]speaking of version differences
20:30:16skrylar[m]i was looking at those newfangled CIs people like using these days
20:33:04*hoijui joined #nim
20:34:28shashlick@Araq - do you want tests to be a synonym of test?
20:34:41*jjido joined #nim
20:40:43Araqshashlick: no, I want that it works as before
20:40:50Araqas andreaferretti reported
20:40:56shashlick@dom96 - https://github.com/nim-lang/nimble/pull/661
20:41:12shashlicki don't understand Araq - not sure what you are talking about then, do you have a link?
20:41:40shashlickoh okay, that issue is already fixed
20:41:57shashlickthat was this PR - https://github.com/nim-lang/nimble/pull/659
20:44:53Araqah ok, sorry
20:45:18shashlickno problem, fixed another problem while i was at it
20:45:19Araqthen you can implement a nice warning for "object field discriminator" assignments
20:45:56Araqshould be rather easy
20:46:21*noonien joined #nim
20:46:27shashlicki don't know much about the compiler at all, have carefully avoided it all this time 😄
20:46:50shashlickdo you have an issue#? i can try
20:47:10*apodo quit (Ping timeout: 258 seconds)
20:47:18Araqgrep for sfDiscriminant and in the codegen or earlier add a new type of warning: "warning: manual code inspection required about potential object case transitions"
20:47:27Araqthere is no issue for this
20:47:34noonienhello folks
20:47:54noonienis it possible to execute a process and only get a pipe to stdin, and not stdout and stderr?
20:48:08noonienas far as I can tell from the stdlib, it's not.
20:48:27noonienif so, is there any workaround, apart from reimplementing osproc
20:48:53shashlickwhat's missing in osproc? you can get a specific handle
20:49:13shashlickinputHandle and inputStream?
20:49:22noonienyou can't if you pass poParentStreams
20:49:44shashlickwell then no luck
20:50:05shashlicki don't even think it is possible
20:50:14nooniensure it is
20:50:27noonienit's just that osproc seems to be all or nothing
20:51:19skrylar[m]doesn't posix work this way too (you get all the pipes)
20:51:55noonienno, you assign what FDs you want, and can pass a pipe to just what you need
20:55:07Araqyou don't have to use poParentStreams, you know
20:55:38noonienyes, but in that case, a pipe gets created for stdout and stderr
20:55:48CalinouAraq: change detection in Vue.js 3 will be strongly improved (since IE11 support will be dropped by default)
20:56:05Calinouif you wish to support IE11, it's still possible, but you won't fully benefit from these upcoming changes
20:56:08noonienand printing the output of stdout, and stderr separetely, while reading input and passing it along gets a LOT harder
20:56:23Calinouhttps://blog.cloudboost.io/reactivity-in-vue-js-2-vs-vue-js-3-dcdd0728dcdf
20:56:51noonienunless i'm missing an obvious way to set the FD of stdout/stderr
20:57:03noonienerr, stdin*
20:57:25Calinoualso, it will be written in TypeScript: https://medium.com/the-vue-point/plans-for-the-next-iteration-of-vue-js-777ffea6fabf
20:57:59shashlick@noonien - will be awesome if you could expand osproc for this
20:58:05shashlicki know i'll definitely appreciate it
20:58:30AraqCalinou: ok, so they agree with me, previously it was bad
20:58:48Calinouof course :) I stumbled upon the same issue during my internship
20:59:41Araqand afterwards it will still be bad because the very idea of a "component" does suck, HTML still sucks, HTML templates still suck and the 'C' in CSS still is a design bug
21:01:03noonienshashlick: i would, but it seems there's quite a bit of code in osproc, and doing this might change the API quite a bit
21:01:07Araqso Vue version 6 will tell me to write TypeScript instead of CSS and version 7 will tell me to write TypeScript instead of HTML templates
21:01:53noonienhmm, i guess we could hae poParent{Stdin,Stdout,Stderr} and maintain compatibility
21:02:29*apodo joined #nim
21:02:40noonienalongside poParentStreams
21:04:39Araqand then Vue will be like my Karax with my "reactive" extensions which I abandoned because -- guess what -- "reactive" sucks. And reactive programming has nothing to do with React btw...
21:05:02Calinouyou'll still be able to use JavaScript with Vue.js
21:05:11Calinouthey just decided to port it to TypeScript because it's more maintainable for a large library
21:05:39Calinouand no, in my experience, Vue.js developers care about about keeping the learning curve reasonable
21:05:56Calinouwhich is why they don't delve into CSS-in-JS territory and stuff like that
21:08:31Araqwhat "learning curve"? you cannot "learn" CSS. CSS is debug-only code, you can learn it for 10 years and only once you threw it away you become productive
21:09:07Calinouit seems to work well enough for a few million programmers :P
21:09:13federico3the only thing to learn is to stay away from it
21:09:44noonieni completely agree with Araq, "welll enough" is subjective
21:10:27*rockcavera quit (Remote host closed the connection)
21:10:40noonienwhile CSS is the best we have, it's pretty bad
21:11:04noonienand so is HTML/the dom, hence why there's so many frameworks trying to fix it
21:14:32jjidoEverything sucks? Components do?
21:15:05Araqvue.js's components surely do.
21:15:41Araqhow do I get data into the component, heck how do I even *create* one component instance for every instance in my list...
21:16:35Araqhow do I get data out of my component? what happened with the idea of using 'functions' in programming?
21:17:43*rnrwashere quit (Remote host closed the connection)
21:18:05jjidoI was not exposed to their awesomeness ;)
21:18:13Araqjust use Elm if Karax doesn't suit you but everything else is bullshit.
21:20:12*hoijui quit (Ping timeout: 252 seconds)
21:23:13*rnrwashere joined #nim
21:24:18CalinouSvelte doesn't use a virtual DOM, for what it's worth
21:25:18FromGitter<jrfondren> I've gotten good use out of https://mithril.js.org/ , but I don't shop around much. Last webapp (in Nim) is just a CGI script emitting HTML in strings.
21:25:41Calinou"Mithril is used by companies like Vimeo and Nike, and open source platforms like Lichess." heh :P
21:25:44Calinouit's pretty much liblichess in the open source world
21:31:17*rnrwashere quit (Remote host closed the connection)
21:38:28*jjido quit (Remote host closed the connection)
21:48:51*matt-m quit (Remote host closed the connection)
21:50:11*rnrwashere joined #nim
21:54:29*rnrwashere quit (Ping timeout: 252 seconds)
21:55:35*Trustable joined #nim
22:14:28*Trustable quit (Remote host closed the connection)
22:17:28*apodo quit (Ping timeout: 272 seconds)
22:17:58Araqis m68k still a thing?
22:18:08Araqhttps://github.com/nim-lang/Nim/pull/11366
22:18:51FromGitter<jrfondren> haven't seen one since the PalmOS
22:20:11FromGitter<jrfondren> http://www.linux-m68k.org/ - 2 Apr 2000
22:21:17Araqwell I merged it. surely we can support 19 year old OSes
22:24:36Araq"Historically, the Motorola 680x0 (abbreviated as "m68k") port was the first Free Pascal port to CPU architectures other than i386. During the big refactoring for FPC 2.0, the code left without maintenance and the support broke and was partly removed. The Motorola 680x0 code generator got revived more than 10 years later, before FPC 3.0. "
22:39:05*xet7 joined #nim
22:42:20*nsf quit (Quit: WeeChat 2.4)
22:46:13*xet7 quit (Quit: Leaving)
22:54:40federico3any tool to find a definition of a type across multiple files?
22:58:16Araqnimsuggest/nimgrep/nimfind
23:13:15*enthus1ast quit (Ping timeout: 250 seconds)
23:25:29*narimiran joined #nim
23:27:05*enthus1ast joined #nim
23:30:51*sealmove joined #nim
23:37:19*elrood quit (Remote host closed the connection)
23:38:31skrylar[m]fpc is neat
23:39:48skrylar[m]are we still supposed to be using supernatural puns for project names
23:40:28Xeskrylar[m]: why not?
23:41:19sealmovedoes Nim have atexit or something similar/
23:41:29skrylar[m]i think it does
23:41:46Xeonquit or something IIRC
23:43:08sealmovefound it, addQuitProc
23:43:20Xeyes that :D
23:43:44skrylar[m]Xe: well google threw a fit when nimrod wasn't name changed
23:43:57skrylar[m]they were like "you named this after a christian how dare you"
23:44:30skrylar[m]~~only satanist names are allowed </thread>~~ have to find a suitable supernatural thing to steal the name from
23:44:31Xeskrylar[m]: i just gave a talk introducing a project of mine named after something from new age woo, so i'm probably a bad comparator here
23:44:54skrylar[m]daedalus was tempting because he builds more or less every widget in greek mythology
23:49:06sealmoveeh, I get:
23:49:10sealmoveError: type mismatch: got <proc (){.gcsafe, locks: 0.}>
23:49:11sealmovebut expected one of:
23:49:13sealmoveproc addQuitProc(quitProc: proc () {.noconv.})
23:49:28Xewhat's your code look like? gist it?
23:50:11skrylar[m]did you specifically say your procedure is gcsafe or was that inferred
23:51:06sealmoveno
23:51:22sealmovehttps://termbin.com/kebz
23:52:20Xeyou know what
23:52:28Xetry adding a {.noconv.} pragma
23:52:31Xelet's see where that goes
23:52:58sealmove-.- wow that worked
23:54:29Xeah cool
23:54:31Xe:D
23:56:34sealmoveis calling conventions inferring asking for too much? :D
23:59:09FromGitter<jrfondren> sounds like it inferred gcsafe and locks: 0. asking for inference that says "oh, he's only passing it to addQuitProc, so it should probably be noconv" is probably too much.