<< 22-10-2018 >>

00:03:57*Snircle joined #nim
00:26:06*PrimHelios joined #nim
00:36:04*darithorn quit ()
00:39:44*darithorn joined #nim
00:41:28*vlad1777d_ quit (Ping timeout: 264 seconds)
01:08:33*stefanos82 joined #nim
01:11:27*abm quit (Ping timeout: 264 seconds)
01:15:24FromGitter<gogolxdong> How to choose between nuklear and vulkan?
01:15:35FromGitter<zacharycarter> huh?
01:15:40FromGitter<zacharycarter> they are apples to oranges
01:15:54FromGitter<zacharycarter> you could use nuklear with vulkan
01:17:43FromGitter<zacharycarter> nuklear is a graphics api agnostic immediate mode graphical user interface library
01:17:55FromGitter<gogolxdong> Example uses nuklear+opengl+sdl2 , we don't have a vulkan wrapping ,right?
01:18:05FromGitter<zacharycarter> vulkan is the successor to opengl
01:18:15FromGitter<zacharycarter> sdl2 is the windowing api
01:19:08FromGitter<zacharycarter> https://github.com/nimious/vulkan
01:19:28FromGitter<zacharycarter> I'd use bgfx if I was going to do any hardware accelerated rendering tbh
01:19:35FromGitter<kayabaNerve> @zacharycarter But what if
01:19:46FromGitter<kayabaNerve> You wrap binary in ASM in C in C++ in another thing
01:19:49FromGitter<kayabaNerve> And call this new thing
01:19:51FromGitter<zacharycarter> OS vendors are too whimsical these days in terms of deciding what graphics APIs they want to support and which ones they don't
01:19:51FromGitter<kayabaNerve> "Nim"
01:19:56FromGitter<zacharycarter> hahaha
01:20:07FromGitter<kayabaNerve> MacOS deprecated OpenGL.
01:20:13FromGitter<kayabaNerve> Such an idiot move...
01:20:25FromGitter<zacharycarter> krux02 has issues with that terminology :P
01:20:28FromGitter<zacharycarter> he'llb e like
01:20:32FromGitter<gogolxdong> ok, I will check bgfx more.
01:20:35FromGitter<zacharycarter> how can you deprecate a graphics API?
01:20:52FromGitter<zacharycarter> @gogolxdong - I can help you in the near future - just need my house to sell so I can quit my job :)
01:20:55FromGitter<kayabaNerve> wat.
01:21:07FromGitter<kayabaNerve> Deprecation means it's marked as old; should no longer be used; will be removed.
01:21:17FromGitter<zacharycarter> yeah but you can't just do that as a OS vendor
01:21:22FromGitter<zacharycarter> you can stop supporting it
01:21:30FromGitter<zacharycarter> but you can't just declare you're deprecating the API
01:21:35FromGitter<kayabaNerve> But they did
01:21:39FromGitter<zacharycarter> I guess that was his beef with apple's statement
01:21:43FromGitter<zacharycarter> yeah - they have some cajones
01:21:54FromGitter<kayabaNerve> https://developer.apple.com/macos/whats-new/
01:22:20FromGitter<zacharycarter> it's funny they call OpenGL legacy techonolgy
01:22:22FromGitter<kayabaNerve> They're deprecating their support of the OpenGL API
01:22:25FromGitter<kayabaNerve> It is pretty old
01:22:38FromGitter<zacharycarter> yeah - but I mean it's still used on a ton of hardware
01:22:50FromGitter<zacharycarter> and people are still writing new software with it, to this day
01:23:10FromGitter<zacharycarter> it doesn't matter - Apple never really embraced OpenGL or khronos group
01:23:20FromGitter<zacharycarter> they've had an agenda with metal since forever - they wanted their own directx
01:23:33FromGitter<kayabaNerve> It's awesome. It's still used. It's not dead. It's old. The design arguably doesn't match the modern world.
01:23:36FromGitter<zacharycarter> now we have a mess - just like we have with every other facet of software
01:23:48FromGitter<zacharycarter> but thankfully - we have bgfx and branimir whatever his last name is - to save us
01:24:15FromGitter<zacharycarter> or if you fancy rust - gfx-rs
01:24:50FromGitter<zacharycarter> well - whether the design suits today or not, it's still a bold ass and stupid move to just throw your arms up and be like - yeah fuck you guys
01:25:00FromGitter<zacharycarter> use our shit or gtfo
01:25:24FromGitter<kayabaNerve> I just compile my game as an independent OS.
01:25:27FromGitter<zacharycarter> and don't mention moltenvk as a answer to that :P
01:25:31FromGitter<zacharycarter> lol
01:25:35FromGitter<zacharycarter> I like your style
01:25:53FromGitter<kayabaNerve> You don't need to support any OS if you support the CPU *puts finger to head*
01:26:23FromGitter<zacharycarter> <div class="tenor-gif-embed" data-postid="8012899" data-share-method="host" data-width="100%" data-aspect-ratio="1.7777777777777777"><a href="This">https://tenor.com/view/man-tapping-head-meme-gif-8012899">This Is Using Your Head Smart GIF</a> from <a href="Thisisusingyourhead">https://tenor.com/search/thisisusingyourhead-gifs">Thisisusingyourhead GIFs</a></div><script type="text/javascript" async src="">https://tenor.com/embed.js"></script>
01:26:24FromGitter<zacharycarter> omg
01:26:43FromGitter<zacharycarter> why
01:26:52FromGitter<zacharycarter> https://tenor.com/HMGt.gif
01:27:41FromGitter<zacharycarter> assuming my house sells soon - I'm going to have tons of time to explore OS development and other cool low level projects
01:27:47FromGitter<zacharycarter> I want to write a forth interpreter
01:27:51FromGitter<gogolxdong> bgfx doesn't support vulkan
01:28:05FromGitter<zacharycarter> it doesn't need to yet
01:28:12FromGitter<zacharycarter> the backend is being built
01:28:31FromGitter<gogolxdong> understood
01:28:56FromGitter<zacharycarter> bgfx is bridging - opengl, metal, metal2, vulkan, webgl, and other APIs
01:29:03FromGitter<zacharycarter> and he's doing it in the order it makes sense
01:29:32FromGitter<zacharycarter> so like - he's making sure each OS has some basic support via some API before he works on support for the next gen of whatever OS
01:29:47FromGitter<zacharycarter> bgfx also does a lot more than just provide an abstraction to the various graphics APIs
01:30:15FromGitter<zacharycarter> it does draw sort-based draw call bucketing
01:30:25FromGitter<zacharycarter> and if you want to know what that is : http://realtimecollisiondetection.net/blog/?p=86
01:30:57FromGitter<zacharycarter> it also provides a generic shader language - which is arguably a detraction from the library since shaders need to be compiled - but if you build it into your workflow correctly and automate it, it's a trivial task
01:31:14FromGitter<zacharycarter> but I'd expect some friction with BGFX - specially if you're not coming from the C/C++ world
01:31:36FromGitter<zacharycarter> you really need to have those languages down to not struggle with the library IMO - and it also helps to have a good handle on premake
01:31:58FromGitter<zacharycarter> and geNIE would be even better
01:33:17FromGitter<zacharycarter> you'll find that bgfx expects you to use certain libraries - not that it forces it upon you - it's just often times not using the library and trying to rely on example code, doesn't work out well
01:33:29FromGitter<zacharycarter> for instance - bgfx has custom support for imgui and not nuklear
01:33:54FromGitter<zacharycarter> as well as nanovg - and there's even a fork of nanovg specifically built for bgfx
01:34:11FromGitter<zacharycarter> I've used nuklear, imgui, and nanovg with bgfx - but it takes tweaking for some of those libs
01:34:52FromGitter<zacharycarter> you can probably even just get away with SDL2 + nuklear
01:35:23FromGitter<zacharycarter> I guess not - I guess it needs opengl access
01:35:54FromGitter<zacharycarter> maybe smfl/csfml would be simpler - I saw the app you were trying to build but - I'm still not sure that immediate mode GUI is the best way to go for that kind of app
01:36:04FromGitter<zacharycarter> especially if you're having this much friction with it
01:36:45FromGitter<zacharycarter> it really all boils down to how much state you have to retain in the first place
01:37:47FromGitter<zacharycarter> immediate mode generally infers state is tossed out for every draws operation
01:38:04FromGitter<zacharycarter> retained mode = state is preserved between draw frames
01:38:24FromGitter<zacharycarter> for butt simple guis - like menus - immediate mode gui rocks
01:38:45FromGitter<zacharycarter> for more complex guis - retained mode generally makes more sense
01:39:12FromGitter<zacharycarter> when I say menus - I mean like a pause menu in diablo or starcraft or something
01:39:22FromGitter<zacharycarter> where there's like six buttons - and barely any state
01:44:00FromGitter<gogolxdong> got it, I was thinking about retained mode rendering.
01:45:53FromGitter<gogolxdong> Never dabbled in graphical programming.
01:46:54FromGitter<gogolxdong> neither my students, we need some experts on it.
02:04:59*banc quit (Quit: ZNC - http://znc.in)
02:05:39FromGitter<zacharycarter> heh - I'm far from an expert but it's a very complex topic
02:06:18FromGitter<zacharycarter> tbh - if you want to get into graphics programming - the #1 place to start is math
02:06:28FromGitter<zacharycarter> and specifically - linear algebra
02:20:15FromGitter<gogolxdong> If we had that time, most devs in China stays application level , not that deep down. But it's necessary for fundamental research.
02:22:01*banc joined #nim
03:07:52*chemist69 quit (Ping timeout: 264 seconds)
03:09:39*chemist69 joined #nim
03:34:29*Senketsu quit (Quit: WeeChat 2.2)
03:56:16FromGitter<gogolxdong> Is there a doc describes what configuration covered for .cfg?
03:56:41FromGitter<kaushalmodi> what do you mean by that?
03:57:41FromGitter<gogolxdong> like --cc: clang
03:57:52FromGitter<gogolxdong> got Assertion failed: ctx->current != win && "You cannot update a currently in procecss window", file nimnuklear/src/nuklear_window.c, line 550 ⏎ SIGABRT: Abnormal termination.
03:58:26*dddddd quit (Remote host closed the connection)
03:58:49FromGitter<kaushalmodi> sorry, I am not familiar with nuklear or Nim in windows
03:59:12FromGitter<kaushalmodi> but if you have `--cc: clang`, in your .cfg file, then that should be applied
03:59:40FromGitter<gogolxdong> what else configurable?
03:59:56FromGitter<kaushalmodi> ah, I'd have to guess all Nim switches
04:00:02FromGitter<kaushalmodi> do nim --fullhelp
04:01:43FromGitter<kaushalmodi> see this config/nim.cfg that ships with Nim installation for a detailed example: https://ptpb.pw/0Yt9 (github is down, else would have directly linked there)
04:02:17leorizehttps://github.com/nim-lang/Nim/blob/devel/config/nim.cfg
04:02:22leorizeit's not :P
04:02:36FromGitter<kaushalmodi> hmm, looks like it's up now
04:03:05FromGitter<kaushalmodi> https://status.github.com/messages
04:03:07FromGitter<gogolxdong> Isn't there a documentation?
04:03:15FromGitter<kaushalmodi> may be it is intermittent? (about github)
04:04:37*darithorn quit ()
04:04:46FromGitter<kaushalmodi> I am more of a .nims fan (than .cfg), but I believe this would be a good doc for .cfg: https://nim-lang.github.io/Nim/parsecfg.html
04:05:27leorizeobviously `.nims` is vastly superior
04:06:19FromGitter<kaushalmodi> I know some people are fans of .cfg for simplicity, but I don't quite get that point
04:06:33FromGitter<kaushalmodi> make .nims as simple or as complex you like :)
04:07:49FromGitter<gogolxdong> then is there a doc describes .nims?
04:08:22FromGitter<kaushalmodi> replace "parsecfg" in that earlier link with "nims"
04:08:49leorizehttp://nim-lang.github.io/Nim/nims.html
04:08:57FromGitter<kaushalmodi> and https://nim-lang.github.io/Nim/nimscript.html
04:09:09FromGitter<kaushalmodi> this latter link is like API doc for nimscripts
04:10:03FromGitter<kaushalmodi> @gogolxdong It's useful to bookmark https://nim-lang.github.io/Nim/theindex.html
04:10:30FromGitter<gogolxdong> got it.
04:10:33FromGitter<gogolxdong> thanks
04:13:14FromGitter<kaushalmodi> I need a second pair of eyes to point out why Travis doesn't like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bcd4e5a435c2a518ee535da]
04:13:36FromGitter<kaushalmodi> Travis just dies at that first if cond: https://api.travis-ci.org/v3/job/444542654/log.txt
04:13:42FromGitter<kaushalmodi> and fails without any useful error msg
04:14:25FromGitter<kaushalmodi> and that too when TRAVIS_OS_NAME is linux
04:14:31FromGitter<kaushalmodi> .. too
04:15:12FromGitter<kaushalmodi> its earlier form: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ works [https://gitter.im/nim-lang/Nim?at=5bcd4ed0ef4afc4f28b04674]
04:15:58FromGitter<kaushalmodi> (this is with respect to my on going efforts from last week to improve Nim nightly builds)
04:20:17FromGitter<kaushalmodi> ok, travis randomly fails.. I guess I should wait till GitHub is stable again
04:21:38*endragor joined #nim
04:24:54*tiorock joined #nim
04:24:54*rockcavera is now known as Guest19785
04:24:54*tiorock quit (Changing host)
04:24:54*tiorock joined #nim
04:24:54*Guest19785 quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
04:24:54*tiorock is now known as rockcavera
04:45:27FromGitter<kayabaNerve> @kaushalmodi You didn't say please?
04:45:45FromGitter<kayabaNerve> (for why Travis fails)
04:51:13*kapil____ joined #nim
05:03:39*nsf joined #nim
05:19:06*leorize quit (Quit: WeeChat 2.2)
05:38:05*elf_ joined #nim
05:52:30*smt quit (Read error: Connection reset by peer)
05:55:05*krux02 joined #nim
06:05:47*leorize joined #nim
06:22:15*stefanos82 quit (Quit: Quitting for now...)
06:32:02*elf_ quit (Quit: Leaving)
06:36:01*Vladar joined #nim
06:42:39*elf_ joined #nim
07:00:25*mech422 joined #nim
07:03:07*mech422__ quit (Ping timeout: 240 seconds)
07:48:28*abm joined #nim
07:54:36FromGitter<tim-st> this doesnt work?: for line in lines(filename): if "|" in line: echo line
07:55:02FromGitter<tim-st> (TaintedString not compatible?)
07:55:40FromGitter<tim-st> `Error: type mismatch: got <TaintedString, string>`
07:56:22FromGitter<tim-st> ok, replacing `"|"` by `'|'` makes it work
07:56:30leorizejust convert it to `string` with `string(line)` :P
07:58:12FromGitter<tim-st> ah, it works, when importing strutils :\
08:01:42*stefanos82 joined #nim
08:10:38*floppydh joined #nim
08:11:42*PMunch joined #nim
08:18:08*NimBot joined #nim
08:44:06*elf_ quit (Quit: Leaving)
09:03:23*leorize quit (Ping timeout: 245 seconds)
09:03:32*gmpreussner_ joined #nim
09:04:18*gmpreussner quit (Ping timeout: 252 seconds)
09:26:13*Vladar quit (Remote host closed the connection)
09:28:17*Vladar joined #nim
09:30:19*kapil____ quit (Quit: Connection closed for inactivity)
09:44:18*leorize joined #nim
10:12:00FromGitter<alehander42> is github still having problems?
10:43:20*kapil____ joined #nim
10:44:01FromGitter<Vindaar> @alehander42 https://status.github.com/messages
10:44:04FromGitter<Vindaar> so yeah
10:49:35FromGitter<gogolxdong> Why does chrome use FreeBSD third party libraries?
11:03:41*PrimHelios quit (Quit: Leaving)
11:04:29*a_b_m joined #nim
11:06:56*a__b__m joined #nim
11:08:03*abm quit (Ping timeout: 252 seconds)
11:08:18*a__b__m is now known as abm
11:10:52*a_b_m quit (Ping timeout: 264 seconds)
11:12:49FromGitter<mratsim> license?
11:34:46*dddddd joined #nim
11:35:00*Vladar quit (Remote host closed the connection)
11:46:47PMunchDo we have a general CRC library in Nim?
11:56:13*Vladar joined #nim
11:58:22FromGitter<Quelklef> Any reason tables.nim has no `proce mergeK, V (t0, t1: Table[K, V]): Table[K, V]`?
12:00:58leorizewhat would you do if the two tables have different data in the same key?
12:01:10FromGitter<Quelklef> Second one overwrites the first
12:01:22FromGitter<narimiran> ouch
12:01:35FromGitter<alehander42> yes, that's a good default
12:01:49FromGitter<alehander42> one can always have an optional param for another strategy
12:02:12*elrood joined #nim
12:02:50FromGitter<Quelklef> imo it'd be better to make other procs
12:02:54FromGitter<Quelklef> but it doesn't really matter
12:03:03FromGitter<andreaferretti> emmy (https://github.com/unicredit/emmy/blob/master/emmy/tableops.nim) defines `+` for tables
12:03:15FromGitter<andreaferretti> as long as there is a `+` to merge the values
12:03:39FromGitter<andreaferretti> slightly different semantics - values need an operation to be merged together
12:03:59FromGitter<Quelklef> Yeah not quite what I'm looking for
12:04:34FromGitter<andreaferretti> (you can just define locally a + b = b for your value if you want to recover the semantics)
12:04:48FromGitter<andreaferretti> but it is easy enough to implement merge in a few lines
12:04:57FromGitter<andreaferretti> no need for stdlib support
12:05:06FromGitter<Quelklef> Yeah, that's what I did
12:05:29FromGitter<Quelklef> but I'm looking at my rather large `util.nim` file and wondering if some of these shouldn't already be in the stdlib...
12:05:50FromGitter<narimiran> hey @andreaferretti! i didn't know you're here, so a quick question for you :)
12:05:51FromGitter<Quelklef> like `seq.pop`
12:06:15FromGitter<andreaferretti> @narimiran yeah, I come here less often nowadays
12:06:21FromGitter<andreaferretti> please, ask
12:07:31FromGitter<narimiran> i didn't try (yet), but is there a way in neo to define `M = [[M1, 0], [0, M2]]` where `M1` and `M2` are matrices of some (different) size, and `0` is a matrix with zeros?
12:07:33FromGitter<andreaferretti> @Quelklef https://nim-lang.org/docs/system.html#pop%2Cseq%5BT%5D
12:08:08FromGitter<alehander42> @Quelklef I don't agree they should be different procs, you can have 10s of them, a custom proc handler which is invoked for merging individual elements seems simpler
12:08:10FromGitter<Quelklef> Sorry, you're right, I meant `seq.pop(i)`
12:08:25FromGitter<alehander42> something like @andreaferretti 's `+` but pass-able as arg
12:08:34FromGitter<Quelklef> @alehander42 Yeah, fair, I was thinking you meant passing the strategy as a predefined enum
12:08:44FromGitter<Quelklef> But no that sounds like a natural extension
12:08:49FromGitter<andreaferretti> @narimiran you can use matrix concatenation, but it will produce some intermediate matrices
12:09:21FromGitter<alehander42> yeah I thought about that too, but there isn't a limited amount of possible strategies
12:09:48FromGitter<andreaferretti> it should be doable with hstack, vstack and zero matrices
12:10:27FromGitter<andreaferretti> something like `vstack(hstack(M1, zeros(?, ?)), hstack(zeros(?, ?), M2))
12:10:53FromGitter<andreaferretti> where I am not sure of the ? dimensions, you can compute them according to M1 and M2 dimensions
12:11:32FromGitter<narimiran> @andreaferretti thanks, i was thinking about either that kind of thing, or manually looping through the matrices.
12:12:33FromGitter<andreaferretti> yes, both approaches will do
12:12:44FromGitter<narimiran> btw, if i know the dimensions at the compile time, should i use static matrices or it isn't a big difference?
12:12:54FromGitter<narimiran> generally, not only for this example
12:12:59FromGitter<andreaferretti> well, I mostly use dynamic matrices
12:13:20FromGitter<andreaferretti> but sometimes it is nice to use static ones to have an additional check on dimensions
12:13:40FromGitter<andreaferretti> they can be freely converted in both directions, so you should be able to mix them
12:13:52FromGitter<narimiran> thanks once again! (and please come here more often :))
12:13:56FromGitter<andreaferretti> (i.e. only use static ones for some parts where dimensions are known)
12:14:05FromGitter<andreaferretti> yeah, you're right :-)
12:14:16FromGitter<andreaferretti> I will try to hang around more often
12:16:43FromDiscord<PusiteGA> hmm, {.async.} proc can have return value right
12:19:09*smt joined #nim
12:25:11FromGitter<alehander42> yes, it has to be Future[Something] though
12:59:25*anamok joined #nim
12:59:27anamokhu
12:59:32anamokhi
13:00:21anamokThe Nimble packages are split into official and unofficial lists. How to see just the official packages?
13:01:04FromGitter<zetashift> Aren't they all just listed here? https://nimble.directory/
13:01:34anamokThey are, but how to know which ones are official?
13:01:43FromGitter<krux02> @alehander42 no that is not a good default, that is horrible
13:02:06FromGitter<krux02> sorry I just realized I am very late in the history, I mean the default for merge tables
13:02:20FromGitter<krux02> merge tables must be symmetric everything else is a bad default
13:03:19FromGitter<alehander42> well, you can't have a default "symmetric"
13:03:27FromGitter<alehander42> unless you pass a element-merge handler
13:03:53FromGitter<alehander42> btw does somebody know if jester ignores some extensions for static files
13:09:48FromGitter<alehander42> have anybody here used any of the existing orm-s?
13:09:52FromGitter<alehander42> has*
13:10:07FromGitter<Quelklef> @krux02 What do you mean symmetric?
13:10:21FromGitter<Quelklef> I personally have never ever needed to merge a table and NOT wanted to have that overwriting behavior
13:11:59FromGitter<alehander42> I agree that in a perfect world some way to preserve everything might be less surprising, but I agree in practice defaults should sometimes follow the common usage
13:12:42FromGitter<krux02> well then I suggest to not use a name that implies it's opperation does not favor one operand over the other
13:13:03FromGitter<Quelklef> I don;t think `merge` implies that in the slightest
13:13:15FromGitter<krux02> well I do
13:13:24FromGitter<Quelklef> The only thing `merge` tells me for certain is that it *somehow* combines the two tables. The rest comes from your intuition, which is unreliable
13:13:35FromGitter<Quelklef> We have different intuitions and every user will have different intuitions
13:13:51FromGitter<krux02> get creative and use a different name
13:14:09FromGitter<alehander42> well if you don't have a better name, merge still is the best name
13:14:10FromGitter<Quelklef> That's not my job; you objected
13:14:16FromGitter<Quelklef> it lies on you to suggest an alternative
13:15:29*endragor quit (Remote host closed the connection)
13:16:05FromGitter<krux02> ``setAll``
13:16:51FromGitter<Quelklef> That suffers from the same issue
13:16:58FromGitter<krux02> ``mergePreferLeft``
13:17:02FromGitter<Quelklef> All I get from that is that *something* is being set *somehow*
13:17:11FromGitter<Quelklef> mergePreferLeft is good but wordy
13:17:11FromGitter<alehander42> setAll is worse, it make me think it updates an arg
13:17:29FromGitter<alehander42> but the point is that it prefers the right
13:17:45FromGitter<alehander42> mergeInto ?
13:17:56FromGitter<krux02> ``mergePreferRight``?
13:17:57FromGitter<alehander42> nah, this is confusing too
13:18:02FromGitter<alehander42> (mergeInto)
13:18:18FromGitter<Quelklef> Here's the thing
13:18:18FromGitter<Quelklef> Right
13:18:35FromGitter<Quelklef> is that a `merge` that is fully generic, i.e., we have no constraints on `K` or `V` for `Table[K, V]`
13:18:40FromGitter<Quelklef> HAS to either prefer left or right
13:18:45*endragor joined #nim
13:18:48FromGitter<Quelklef> it can't be symmetric since it knows nothing about the types
13:19:02FromGitter<Quelklef> So having a default prefer right on `merge` is kind of intuitive since it's only one of two choices
13:19:08FromGitter<Quelklef> By the type, we know it's gotta be one
13:19:17FromGitter<alehander42> and because actually it would be unintuitive compared to most other merge-s
13:19:20FromGitter<alehander42> in other lang/libs
13:19:27FromGitter<krux02> you are wrong, you have to optimize the names for reading the code
13:20:06FromGitter<krux02> if you see merge(a,b) you don't think: "ah, yea it has to prefer the elements of one of them, so it has to be ..."
13:20:33FromGitter<alehander42> well that's what it usually means
13:20:33FromGitter<krux02> @alehander42 "most"?
13:21:03FromGitter<alehander42> yes
13:21:13FromGitter<krux02> is it like this in c++?
13:23:07*endragor quit (Ping timeout: 240 seconds)
13:24:03FromGitter<Quelklef> No idea, but it's like this in Python, at least
13:24:41FromGitter<krux02> is it like this in Java?
13:25:06FromGitter<Quelklef> No, since Java has no builtin table merge
13:25:11FromGitter<alehander42> well c++'s merge just does the opposite
13:25:21FromGitter<krux02> see?
13:25:26FromGitter<alehander42> what `see` ?
13:25:26FromGitter<Quelklef> Java has `putAll`, mutating the arg
13:25:31FromGitter<alehander42> they chose one of those
13:25:39FromGitter<alehander42> and they didn't call it mergePreferLeft
13:25:44FromGitter<Quelklef> How about `mergeL` and `mergeR` or something
13:25:49FromGitter<alehander42> I didn't say `c++`, I said most
13:25:50FromGitter<Quelklef> unambiguous and not unweildy
13:26:07FromGitter<alehander42> now, I admit we need a big lang table to test it
13:26:13FromGitter<alehander42> if i have time later, I'll check
13:26:47*Vladar quit (Remote host closed the connection)
13:27:41FromGitter<alehander42> maybe mergeUpdate and mergePreserve
13:28:00FromGitter<Quelklef> yeah I was thinking `update` and something else
13:29:25FromGitter<Quelklef> the issue then is that `update` sounds like a mutative operation
13:29:46FromDiscord<PusiteGA> i need to fetch some data, process it and store it to DB, it should not freeze my main thread, so my logic is to run it in background thread, i dont need to share anything between threads , meybe only progress update so i know when finished, so i should spawn , right?
13:30:41*vlad1777d_ joined #nim
13:31:03FromGitter<Quelklef> try it!
13:32:23FromDiscord<PusiteGA> * so i should use "spawn", right?
13:33:41FromDiscord<PusiteGA> and this https://nim-lang.org/docs/threads.html i copy pasted just to try it crys error on Thread -- undeclared indifier
13:34:19anamokbye
13:34:21*anamok quit (Remote host closed the connection)
13:35:10FromGitter<Vindaar> @PusiteGA: to use the threads module, you need to compile with `--threads:on` as well
13:38:12*vlad1777d_ quit (Ping timeout: 252 seconds)
13:46:09FromDiscord<PusiteGA> ye i know, meybe just vs is crying for no reson
13:47:00FromDiscord<PusiteGA> yep vs code showed errors even it compiled no problem
13:50:00FromGitter<krux02> nimsuggest (resposible for error messages) and the nim compiler often get out of sync with compiler arguments
13:50:45FromGitter<krux02> as far as I am aware you have to manually set --threads:on for nimsuggest as well so it can provide you correct results, but I am not sure right now.
13:51:10leorizeshouldn't a project's `.nims` file work?
13:52:38*PrimHelios_ joined #nim
13:55:07FromDiscord<PusiteGA> i have .nimble no .nims
13:55:44leorize`.nims` is a type of compiler configuration file
13:59:07FromDiscord<PusiteGA> so i sould create myproject.nims
13:59:54FromDiscord<PusiteGA> and fill it with what ? nim c --cc:clang --threads:on -o:"/home/me/Documents/Nim/kAlt/kAlt" "/home/me/Documents/Nim/kAlt/src/syncData.nim"
14:10:16leorize`myproject.nims` is for flags you wanted to set
14:10:25leorizelike `--threads:on` or `--cc:clang`
14:15:01*floppydh quit (Quit: WeeChat 2.2)
14:25:04FromDiscord<PusiteGA> hmm, is there some documenation about that , i named it same as myapp.nim
14:28:25leorizehttp://nim-lang.github.io/Nim/nims.html
14:47:16FromDiscord<PusiteGA> duno how i didnet find it 😃
14:47:46FromDiscord<PusiteGA> and now it works np no vscode cry, ty
14:58:02FromGitter<vinodvinu> if (expr1 and expr2) and (expr3 and expr4) : ⏎ This if statement is not compiling.
15:00:26leorizeany example?
15:07:03*darithorn joined #nim
15:15:07*PrimHelios_ quit (Ping timeout: 240 seconds)
15:16:08*floppydh joined #nim
15:18:43FromGitter<vinodvinu> Sorry, I changed my mind delete the code. I have changed my plan and i am not checking it now. Actually, this was the full data ⏎ expr1 = itemState in DRAWITEMSTRUCT ⏎ expr2 = ODS_SELCTED value ⏎ expr3 = a button handle (HWND) ⏎ expr4 = same as expr3 [https://gitter.im/nim-lang/Nim?at=5bcdea53c7bf7c366250f683]
15:19:43FromGitter<kaushalmodi> kcvinu: That's still not very useful. If you can share a snippet that someone can run rightaway to recreate the issue, it can be fixed
15:20:27leorizeI don't think you can `if` a button handle
15:20:37leorizeit has to be `int`
15:21:11FromGitter<vinodvinu> Then how can i check if one variable is a button handle ?
15:21:37leorizeit has to be `bool`, sorry :P
15:21:38FromGitter<kaushalmodi> `VAR is TYPE`
15:21:51leorizevinodvinu: what do you mean?
15:21:52FromGitter<kaushalmodi> also, that has to be in `when`
15:22:15*narimiran joined #nim
15:22:29FromGitter<kaushalmodi> kcvinu: see this example: https://github.com/kaushalmodi/elnim/blob/f48f1cc14ac404eaea21edba058e019c6472ef72/src/elnim.nim#L136-L156
15:23:59FromGitter<vinodvinu> @‌leorize, i mean, i have button HWND, in a function, i will get another button HWND varibale as parameter. So i need to check and ensure that they are same
15:24:26FromGitter<vinodvinu> Thanks @kaushalmodi
15:24:55leorizeyea, a code snippet would be helpful
15:25:38FromGitter<vinodvinu> Its a large function. I will do one thing. I will post the code in pastebin
15:27:11*PMunch quit (Quit: Leaving)
15:28:53FromGitter<vinodvinu> here is the link ⏎ https://pastebin.com/j2JFsMBt
15:29:23narimiranso you didn't read the NEP-1 link i gave you on the forum ;)
15:29:45leorizewhich line is causing the problem?
15:29:56FromGitter<vinodvinu> My proble is, ⏎ I have two owner draw buttons. ⏎ I wrote code to change the back color of those buttons in mouse enter/leave and clicking events
15:29:58leorizesince your snippet is not self-contained
15:30:29FromGitter<vinodvinu> this question is something related to logic. not related to code
15:31:07leorizeI thought it was about the fact that your complex `if` statement doesn't work somehow?
15:31:11FromGitter<vinodvinu> Please tell me, how can we paint/draw only one button at a time
15:31:45FromGitter<vinodvinu> that was failed try
15:31:53FromGitter<vinodvinu> So i gave up that idea
15:32:27leorizeany context?
15:32:48leorizebecause I've absolutely no idea what you are doing
15:32:48FromGitter<vinodvinu> Let me explain the whole matter. ⏎ I have two Owner draw buttons. But they were get painted same time when i click one
15:33:17FromGitter<vinodvinu> But my intention is to paint only clicked button
15:34:10FromGitter<vinodvinu> So how to ensure that the other(non clicked) button is not pinted
15:34:23FromGitter<vinodvinu> painted
15:34:24FromGitter<iffy> Where's the recommended place to keep data files in a nimble package?
15:35:08leorize`<your project name>/<data folder name>`
15:35:10FromGitter<vinodvinu> @kaushalmodi ,
15:35:49FromGitter<iffy> k, thanks
15:35:54*Trustable joined #nim
15:36:00leorizevinodvinu: it depends on what you're using to paint the buttons
15:36:41FromGitter<vinodvinu> @kaushalmodi , ⏎ I have read that link, but it says that it will check if something is nil or not. But i have different requirement. I have a button handle and i will get another button handle inside a function. So i need to check both handles are same or not
15:37:04leorize`if handle1 != handle2`?
15:37:20FromGitter<vinodvinu> @leorize, I am using WM_DRAWITEM msg for painting those buttons
15:37:47leorizeso you're using Windows
15:37:55FromGitter<vinodvinu> yup
15:37:56leorizesorry, I can't help in that case
15:38:09FromGitter<vinodvinu> Ok thanks for the help.
15:38:47FromGitter<vinodvinu> There are few or no people with nim + windows i think
15:39:21FromGitter<vinodvinu> I think it is better to ask any windows only programming language's forums
15:39:37FromGitter<vinodvinu> Actually language is just a tool.
15:39:41leorizeAraq uses Windows
15:39:46FromGitter<kaushalmodi> kcvinu: Nim lead uses Windows. I am no help here either; firstly no exp with GUI and secondly, don't use Nim on windows
15:40:09FromGitter<vinodvinu> Its ok, @kaushalmodi No problems
15:40:14leorizemost of the time the problem is that not everyone write native Windows GUI code...
15:40:15FromGitter<kaushalmodi> you can get better help if you post a snippet with all the required details on Nim forum
15:40:25FromGitter<vinodvinu> @leorize, Araq may be busy
15:40:46leorizetry to look at how C++ people write such thing
15:40:56leorizeit should be trivial to reimplement in Nim
15:41:03FromGitter<vinodvinu> There is guy named ward who created the wnim library
15:41:33FromGitter<vinodvinu> Yeah i know its a simple thing, but i am struck now.
15:41:56FromGitter<vinodvinu> Yeah you are right, C++ or FreeBasic forums will be a help
15:42:16*Vladar joined #nim
15:44:32FromGitter<vinodvinu> @kaushalmodi one question, How did you find the isValid proc ? I mean, if i encounter a specific programming problem, how do i search for a proc ?
15:44:55FromGitter<kaushalmodi> that's a custom proc
15:45:07FromGitter<vinodvinu> i didnt get you
15:45:15FromGitter<vinodvinu> custom proc ?
15:45:21leorizethat mean they didn't find it
15:45:23leorizethey wrote it
15:45:53FromGitter<vinodvinu> Oh, then isValid is written by you . Am i right ?
15:46:12FromGitter<kaushalmodi> I understand it, credit for it goes to @Vindaar
15:46:23FromGitter<kaushalmodi> but it's part of my little elnim library
15:46:31FromGitter<vinodvinu> Oh i see
15:46:48Araqwhat's up?
15:47:22FromGitter<kaushalmodi> `(not GitHub)`
15:47:40FromGitter<vinodvinu> Araq, could you pls help to solve a logical proble about Owner draw button in windows
15:53:31leorizeI'm writing a program that manages a bunch of contacts with only basic infos: Name, Birthday, Address
15:53:40leorizeI need to be able to search within this list
15:53:45leorizeand save it to disk
15:54:14leorizewhat should I use for that? sql or json?
15:54:30leorizeand... any good libraries in Nim? :P
15:54:56FromGitter<vegai> leorize: sounds like a job for sqlite
15:55:53Araqthat's beyond my Win API skills, I don't do UIs
15:56:17AraqI get by by googling around and copy&paste win API examples
15:57:37FromGitter<vinodvinu> ha ha @Araq
15:58:19FromGitter<vinodvinu> never mind, i have asked my question in freeBasic forum
16:00:53*floppydh quit (Quit: WeeChat 2.2)
16:01:55leorizevegai: thanks. do you have any sql library in mind that could easily serialize a bunch of objects?
16:02:01leorizeI've never used sql before :P
16:02:46FromGitter<kaushalmodi> leorize: I read about https://nim-lang.org/docs/db_mysql.html in Nim In Action.
16:02:51FromGitter<vegai> I don’t know how complicated thing you’re about to write, but if it’s not too complicated, I’d just generate the SQL statements
16:03:03FromGitter<kaushalmodi> But I just skipped through all that because that requires sql syntax knowledge
16:03:07FromGitter<kaushalmodi> (which I also don't have)
16:03:54FromGitter<vinodvinu> @leorize, if you want, i can give you a sqlite library for AutoIt
16:04:00FromGitter<vegai> yeah, nim in action uses sqlite, and uses plain SQL to do it
16:04:26leorizevinodvinu: no, thanks, I'm writing this in Nim
16:04:41FromGitter<kaushalmodi> @vegai ah OK, I wouldn't know the difference
16:05:01FromGitter<vinodvinu> AutoIt is a basic style scripting language. Someone wrote that lib for autoit but we can easily translate that into nim
16:05:04FromGitter<kaushalmodi> I see that in does use `db_sqlite`; section 7.3.2 onwards
16:05:11FromGitter<kaushalmodi> s/in does/it does
16:05:13FromGitter<vinodvinu> Oh its ok
16:05:21leorizehow hard can SQL be :P
16:05:35leorizelet's see if I can crunch this language in a day or so
16:05:36narimiranleorize: it is not hard
16:05:39FromGitter<vegai> pretty easy, if you compare it to writing the files yourself :P
16:05:43FromGitter<kaushalmodi> it's just that I have never needed it (not in software programming field)
16:07:22leorizethe only problem I have with sql is that it requires a server
16:07:29leorizebut looks like sqlite is self-contained
16:10:43*vivus joined #nim
16:11:41vivushow do we search the nim IRC logs?
16:12:32leorize`site:irclogs.nim-lang.org search`
16:12:42leorizeput it in your search engine of choice
16:17:12vivusaah yeah, that option I guess
16:18:22FromGitter<vegai> can I build-time configure nim to use some other compiler than gcc
16:18:56leorizeit's in config/nim.cfg
16:19:31FromGitter<vegai> leorize: ah, thanks
16:20:02vivusleorize: can I compile a Windows binary on Linux?
16:20:02FromGitter<vegai> trying to build this on the latest openbsd
16:20:27leorizevivus: you can, certainly
16:20:46vivusleorize: I am checking the docs right now and it doesn't explain how
16:21:25leorizeuse `--os:windows` switch to generate code for windows
16:21:47leorizethen override gcc to mingw gcc with `--gcc.exe`, `--gcc.linker.exe`
16:22:42vivus`nim c -d:release --os:windows myfile.nim` ?
16:23:06leorizeyep, but you also have to override the gcc compiler with mingw compiler
16:23:43vivus`nim c -d:release --os:windows --gcc.exe --gcc.linker.exe myfile.nim` ?
16:25:08leorizemore like this: `nim c -d:release --os:windows --gcc.exe:'mingw-gcc-binary-name' --gcc.linkerexe:'mingw-gcc-binary-name' myfile.nim`
16:25:10vivusis that correct? leorize
16:30:10FromGitter<vegai> hmm, by changing gcc to clang, everything else seems to build just fine on openbsd-6.4
16:30:31FromGitter<vegai> …but nimscriptsupport.nim says (8, 11) Error: cannot open file: compiler/ast
16:33:05leorizeis that a part of nimble?
16:34:32FromGitter<vegai> oh, right yes. `nimblepkg/nimscriptsupport.nim(8, 110) ERror: cannot openfile: compiler/ast`
16:35:10leorizehow are you building nimble?
16:35:35FromGitter<vegai> using build_all.sh, which I believe calls `koch tools`
16:37:16leorizetry `./koch nimble`
16:37:35FromGitter<vegai> yeah, same result
16:37:52vivusleorize: you saw my question above? is my command correct?
16:38:09leorizevivus: did you see my command?
16:38:40vivusoh wow, how did I miss that :O
16:39:19vivusleorize: what is this: mingw-gcc-binary-name ? is it the actual name or placeholder text?
16:39:30narimiranvivus: placeholder
16:39:32leorizeplaceholder text, obviously :P
16:40:20vivusso what I put in there is the name of my program or something else? Im a bit ignorant on compiling to windows or OSX but I want to provide releases for at least 1 other platform besides linux
16:40:53narimiranyou put there.... wait for it.... mingw-gcc-binary-name :D
16:40:58narimiransorry, couldn't resist
16:41:14vivuswhere do I find what the mingw-gcc-binary-name is?
16:41:41leorizeapparantly you don't know how a C source could be cross compiled
16:41:43narimiranvivus: first you need to install it. check you repo's package manager
16:42:06vivustrue, I don't know.
16:42:07leorizeso, basically, you need a special compiler targeting the OS you want
16:42:19FromGitter<kaushalmodi> vivus: I haven't tried this, but this travis might help: https://github.com/kdheepak/github-release/blob/master/.travis.yml
16:42:51leorizefor Windows the mingw project provides those "special" compilers and libraries
16:42:57FromGitter<kaushalmodi> @kdheepak is releasing his github-release utility on all 3 platforms: https://github.com/kdheepak/github-release/releases
16:44:57narimiranbut this question is very often asked here. we should have some official source on cross compiling!
16:44:58vivusDoesn't windows support bash now? Does that mean Linux binaries will work on windows?
16:45:21leorizeonly if you install bash ofc
16:45:25leorizeit's not available by default
16:45:25shashlick@kaushalmodi: that's nice - I wrote a python script to do all that for me for px
16:45:47vivusalright so first I must install mingw
16:46:54shashlickvivus: download the windows zip and run finsh
16:47:15vivusI have no idea what you are talking about shashlick
16:47:19leorizeshashlick: they're asking how to cross compile from linux...
16:47:33shashlickokay never mind 😄
16:48:11FromGitter<kdheepak> @kaushalmodi thanks for pointing to my repo! :)
16:48:34FromGitter<kdheepak> @vivus feel free to ask any questions about the cross compiling
16:48:40vivuswhat do you guys put into your releases?
16:48:44FromGitter<kdheepak> As far as I can tell, it works like a charm
16:49:01vivus@kdheepak does your tool do cross-compiling?
16:49:13FromGitter<kdheepak> Travis-CI also officially supports Windows now, so that might be a way to go in the future.
16:49:46FromGitter<kdheepak> `github-release` is a CLI utility written in Nim that lets you upload releases to github.
16:49:48FromGitter<kaushalmodi> @kdheepak Also see if you can refactor your travis config to use the `|` preceeded multi-line string syntax
16:49:52FromGitter<kaushalmodi> https://github.com/OrgTangle/ntangle/commit/7211325a940438dc2a6a7e54a828482acbe48583
16:50:04narimiran@kdheepak instead of answering various questions: would you maybe write a short how-to blogpost?
16:50:28FromGitter<kaushalmodi> ^ +1
16:50:36FromGitter<kdheepak> @narimiran I really should do that.
16:50:49FromGitter<kdheepak> I'll commit to getting a blog post out by the end of the week.
16:51:00FromGitter<kdheepak> Wanted to redo my blog in Nim first :P
16:51:08narimiranit would be very useful, because these questions are quite often
16:51:26vivusthere is some documentation on it: https://nim-lang.org/docs/nimc.html#cross-compilation but it isn't very helpful
16:51:49narimiranand it would be nice if we had some go-to reference we can link, instead of repeating ourselves over and over again
16:52:06vivusnarimiran: see the link above :P
16:52:11shashlickvivus: start out with getting mingw working - what distro of linux? `apt-get install mingw-w64` for ubuntu for example
16:52:18FromGitter<kdheepak> @kaushalmodi you are right, the multi-line in travis would be nicer.
16:52:34FromGitter<kdheepak> @vivus, are you trying to get it working locally or on Travis?
16:52:36narimiranbtw, i've never cross-compiled, and i'm sure once i had to do it — i'll have the same questions as many guys before me
16:52:52vivus@kdheepak locally. not using automated builds
16:53:10narimiranvivus: yeah, that's not helpful at all for somebody with no experience with cross-compilation
16:53:30FromGitter<kdheepak> Okay. If you are using ubuntu, you need to install the following ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce008a1e23486b93fe396c]
16:53:50vivusif @kdheepak is planning on writing something, improving those docs would be better vs. linking to an external blog
16:54:15narimiranvivus: true
16:54:15leorizeit's too OS-dependant IMO
16:54:25FromGitter<kdheepak> And add a config.nims to the root of the repository ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce00c1ae7be940169b248c]
16:54:46FromGitter<kdheepak> I'll write up a blog post.
16:54:58FromGitter<kdheepak> I can also submit a PR to the docs if people are interested in that.
16:55:30FromGitter<kaushalmodi> @kdheepak I think vivus is referring to the Nim wiki that anyone can edit
16:55:39FromGitter<kdheepak> Got it.
16:55:47FromGitter<kaushalmodi> *checks above link* .. nope
16:55:50FromGitter<kaushalmodi> sorry :)
16:56:01vivusthere's a wiki? where? :O
16:56:20FromGitter<kaushalmodi> https://github.com/nim-lang/Nim/wiki
16:56:30FromGitter<kaushalmodi> may be a cross compiling page can be added there
16:56:49narimiranadd it to the manual, please
16:57:09narimiranit is "more official" than wiki
16:57:19FromGitter<kaushalmodi> let's start with *somewhere*: blog/wiki/manual
16:58:12FromGitter<kaushalmodi> may be start with your blog, get feedback, make updates, link to your blog in wiki, add the updated instructions to manual
16:58:28*narimiran thumbs up
16:59:46*druonysus joined #nim
16:59:46*druonysus quit (Changing host)
16:59:46*druonysus joined #nim
17:00:54shashlickI suggest expanding nim.cfg to work with mingw on linux
17:01:06shashlickso you can set --cpu, --os and --cc and get it to work
17:01:22FromGitter<kaushalmodi> shashlick: that would be nice
17:03:16*PrimHelios_ joined #nim
17:14:46FromGitter<krux02> I just found out about this website: https://nimble.directory/
17:14:56FromGitter<krux02> I wonder what "Most Queried" means
17:15:16FromGitter<krux02> because I wrote that library
17:15:24FromGitter<krux02> I wasn't aware of my popularity.
17:15:29narimiranit changes quite often
17:15:44narimiranprobably it is "most queried in last __ days"
17:15:59FromGitter<krux02> queried where?
17:16:08FromGitter<krux02> that website?
17:16:13FromGitter<krux02> and what is a query?
17:16:17narimirani would guess that, yeah
17:21:16FromGitter<juancarlospaco> For a long chain of string concatenation at runtime, which one has more performance `&`, `fmt""`, `"".format()`, `["", ""].join` ?
17:21:32FromGitter<zetashift> Probably queried nimble to install a package
17:22:31leorizejuancarlospaco: use `rope`
17:22:59leorizeoh sorry, thought you were referring to super long strings
17:24:13FromGitter<juancarlospaco> No super long
17:24:30FromGitter<juancarlospaco> Just many short strings
17:24:36shashlickwell that was easy - just `apt install mingw-w64` and few lines in nim.cfg and cross compile works
17:24:45*nsf quit (Quit: WeeChat 2.2)
17:25:01FromGitter<juancarlospaco> 10~20 chars strings
17:25:23FromGitter<juancarlospaco> to join together at runtime
17:25:29Calinouso I was talking about replacing shell scripts with Nim last weekend, I did a small POC that works well for my use case :) https://gist.github.com/Calinou/c2b49f69d6b58ee4f60d70b0f4c8d076
17:25:39Calinou(it's unrelated to the 0x0 wrapper, but it's another script I needed)
17:26:01leorizejuancarlospaco: run some benchmark perhaps? I wouldn't surprise if all of them turns out to have the same speed
17:26:42FromGitter<kaushalmodi> Calinou: also look at https://github.com/Vindaar/shell
17:26:55FromGitter<juancarlospaco> Oh, ok, I was curious maybe somene done it before me, ok.
17:27:38Araqjuancarlospaco: it was bench'ed year ago, don't remember the results
17:28:14Araqbut in properly written code Ropes always lose :P
17:28:25Araqwhich is why the compiler is built on top of them... *sigh*
17:28:39FromGitter<juancarlospaco> I really google it, but cant find it, seen some 3dr party lib, but I meant for std lib strings
17:29:15FromGitter<kaushalmodi> Araq: what does `{ :; }` in `if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then shell_session_update() { :; }; fi` in the nightlies Travis do?
17:30:05Araqlol you ask *me* that question?
17:30:23AraqI only copied it blindly from Nim's travis file
17:30:28FromGitter<kaushalmodi> it was there to begin with and that's a bashism I am not aware of
17:30:42FromGitter<kaushalmodi> any bash expert here?
17:30:57FromGitter<kaushalmodi> what does `shell_session_update() { :; }` on osz in travis config mean?
17:31:05shashlickvivus: to cross compile, just add these 6 lines into nim.cfg
17:31:06shashlick```
17:31:07shashlicki386.windows.gcc.path = "/usr/bin"
17:31:08shashlicki386.windows.gcc.exe = "i686-w64-mingw32-gcc"
17:31:10shashlicki386.windows.gcc.linkerexe = "i686-w64-mingw32-gcc"
17:31:12shashlickamd64.windows.gcc.path = "/usr/bin"
17:31:13shashlickamd64.windows.gcc.exe = "x86_64-w64-mingw32-gcc"
17:31:15shashlickamd64.windows.gcc.linkerexe = "x86_64-w64-mingw32-gcc"
17:31:16shashlick```
17:32:21FromGitter<timotheecour> hi @araq did you see my PM?
17:32:33Araqno...
17:32:53FromGitter<rayman22201> @kaushalmodi { :; } is just null command.
17:32:58FromGitter<rayman22201> just null and return true
17:33:00FromGitter<timotheecour> hmm, you’re not seeing direct messages?
17:33:10FromGitter<rayman22201> https://unix.stackexchange.com/questions/367108/what-does-while-mean
17:33:17shashlickAraq: I tried adding those lines within `if @unix` but it wasn't picked up - https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L101
17:33:56FromGitter<kaushalmodi> @rayman22201 thanks so those braces are part of the command, so some syntax to escape things in yaml
17:33:57FromGitter<kaushalmodi> ?
17:34:23FromGitter<kaushalmodi> googling led me to https://github.com/direnv/direnv/issues/210#issuecomment-203377471 but still doesn't explain what that does
17:35:56Araqtimotheecour: I'm usually on IRC, not gitter, that's why
17:36:25FromGitter<timotheecour> i c no worries
17:36:43*stefanos82 quit (Quit: Quitting for now...)
17:38:14FromGitter<kaushalmodi> @rayman22201 OK, found something: https://unix.stackexchange.com/questions/157329/what-does-env-x-command-bash-do-and-why-is-it-insecure
17:38:26FromGitter<rayman22201> @kaushalmodi I'm not really sure. It seems like a dummy function because some dependent scripts expects it to exist
17:40:42FromGitter<timotheecour> @kaushalmodi one nit: when you edit a msg (eg https://github.com/nim-lang/Nim/issues/9405#issuecomment-431513474 ) make sure whoever’s reading the thread can understand the flow; a good practice is to use ```~~old msg~~ [EDIT] new msg ``` instead of just ```new msg``` overwriting your old msg
17:41:08FromGitter<timotheecour> (```~~foo~~``` is strike-through)
17:41:18FromGitter<kaushalmodi> @timotheecour I do that usually
17:41:27FromGitter<kaushalmodi> but in that case, the removed message was irrelevant
17:41:34FromGitter<kaushalmodi> to the parent thread
17:41:42FromGitter<timotheecour> okok end of nit :)
17:42:02FromGitter<kaushalmodi> I normally quote things that I think would serve as context
17:42:12FromGitter<kaushalmodi> so even if the original message is editted/removed, I control the context
17:46:53Araqshashlick, because it's not @if unix when you do --os:windows ?
17:47:26Araqtarget vs host OS problems... all the defines are wrong, RFC... (just kiddin)
17:48:08FromGitter<rayman22201> I heard you like RFC's, so I made an RFC to make an RFC for your RFC :-P
17:48:28Araqobligatory pic of a cat missing
17:48:56FromGitter<rayman22201> https://i.kinja-img.com/gawker-media/image/upload/s--IrlM6tFL--/c_scale,f_auto,fl_progressive,q_80,w_800/hl6z0qcdryjtvmrdnnkd.png
17:49:09FromGitter<rayman22201> fixed ;-)
17:58:17shashlickAraq: but it is a cross compile - so we are running on Linux but passing --os:windows to choose a different compiler
17:58:35shashlickso what you are saying is that --os:windows affects the @if and not the OS you are running on
17:59:42Araqwell it seems to me the @if is for the target, not the host
17:59:49Araqso in your case @if windows
17:59:56shashlickmy only worry is that setting `i386.windows.gcc.exe = "i686-w64-mingw32-gcc"` at top level like for Raspberry Pi will break windows compile in general
18:00:05shashlickbut i tried it on windows and it didn't make any difference
18:00:28AraqI would introduce a -d:rasp and use '@if rasp'
18:00:47vivusty shashlick
18:00:56FromGitter<juancarlospaco> ```1.0 & ⏎ 2.0 fmt"{}" ⏎ 3.0 "".format() ⏎ 2.0 ["", ].join``` [https://gitter.im/nim-lang/Nim?at=5bce1058435c2a518eea6a2a]
18:00:58FromGitter<juancarlospaco> https://pastebin.com/PuijFZQQ
18:00:58shashlickso this is for mingw Windows cross compile on Linux
18:01:30shashlickvivus: did it work
18:02:06vivusshashlick: I decided to abandon cross-compiling to windows because the mingw installer is bloated (uses up 700+MB of space)
18:02:13shashlick😄
18:02:21Araqvivus, try clang for Windows instead
18:02:48vivustravis can build releases right?
18:02:50shashlickworked super easy for me
18:03:06Araqer, I just noticed my clang/LLVM takes 938MB :-/
18:03:30FromGitter<kaushalmodi> vivus: did you miss the earlier link I pasted about the .github-release project's travis.yml
18:03:31FromGitter<kaushalmodi> ?
18:03:50*vivus scrolls up
18:04:15FromGitter<juancarlospaco> `&` is best, `fmt""` second, `"".format()` is worse.
18:04:21vivusI see it now, ty @kaushalmodi
18:04:57FromGitter<kaushalmodi> 👍 Just for ref: https://irclogs.nim-lang.org/22-10-2018.html#16:42:19
18:18:19*PMunch joined #nim
18:21:53*chemist69 quit (Ping timeout: 244 seconds)
18:22:46bozaloshtshIn threadpool, I don't see a blockUntilAll(openArray[FlowVar[T]]) proc. How should I wait for all my flowvars to be resolved?
18:24:54Araqiirc it's called join()
18:24:56leorizerun a for loop?
18:26:12*chemist69 joined #nim
18:26:40bozaloshtshAlso, what would cause ^spawn func() to return nil, even though my func() returns a non-nullable type
18:26:51*Arrrr joined #nim
18:26:59bozaloshtshoh, I guess the fact that it is actually nullable would be the answer here, nvm :p
18:27:13bozaloshtshAraq: I don't see join() in threadpool, is it in a different module?
18:27:38bozaloshtshlike so: https://nim-lang.org/docs/threads.html#joinThreads%2Cvarargs%5BThread%5BTArg%5D%5D
18:28:00leorizebozaloshtsh: shouldn't `for i in s: i.blockUntil` works?
18:28:17narimiran@timotheecour do you use markdown syntax on nim forum on purpose to make a point about pros of switching to .md from .rst? :)
18:28:41*Arrrr quit (Client Quit)
18:28:42bozaloshtshleorize: I suppose, yeah
18:29:08*Arrrr joined #nim
18:29:09bozaloshtshI just thought this was common enough of an idiom to warrant a proc in the stdlib
18:31:56leorizeyou may also use it with sequtils
18:32:49leorizebut tbh is the for loop that complex?
18:32:58*PrimHelios_ quit (Ping timeout: 245 seconds)
18:34:32Araqleorize, problem is threadpool is under-developed and worse, blockuntilAny() is really hard to make reliable...
18:36:58*hitchhooker[m] left #nim ("User left")
18:37:00*Mobilpadde joined #nim
18:38:36*Mobilpadde quit (Client Quit)
18:39:23FromGitter<Mobilpadde> Hey, I have a problem with asynchttpserver. Any of you had any luck with calling custom proc's from it?
18:40:02FromGitter<Mobilpadde> I mean, I made a parser, and want to show the parsed text on a new request to the server
18:40:50FromGitter<Mobilpadde> Getting this error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce19b282893a2f3b22517e]
18:42:30*endragor joined #nim
18:44:22dom96try adding {.closure.} to your proc
18:45:28FromGitter<Mobilpadde> ```'.closure' calling convention for top level routines is invalid```
18:45:47FromGitter<Mobilpadde> I'm quite new to nim :D
18:46:55*endragor quit (Ping timeout: 246 seconds)
18:47:15dom96hrm, can you gist your code?
18:47:30FromGitter<zacharycarter> @Mobilpadde - problem there is closures need to be nested within another proc
18:47:35FromGitter<zacharycarter> unless it's a closure iterator
18:47:38FromGitter<zacharycarter> from my understanding anyway
18:48:33FromGitter<Mobilpadde> Hmm, not happy to gist it for now. :/
18:49:09dom96that's okay
18:49:18dom96Did you see this example? https://nim-lang.org/docs/asynchttpserver.html#examples
18:49:24dom96Might be worth comparing what your code looks like to that
18:49:37dom96(Double check that example compiles on its own, might be broken due to some compiler changes)
18:50:08FromGitter<Mobilpadde> So like: ⏎ ⏎ ```let stuff = proc(): string = ⏎ proc(stuff: string) {.closure.} = ⏎ return stuff``` ⏎ ⏎ Something like that? [https://gitter.im/nim-lang/Nim?at=5bce1bdfef4afc4f28b58efe]
18:50:32dom96You shouldn't need to do that
18:50:47FromGitter<Mobilpadde> It does compile, so that's a plus. Just can't get it to compile with the async-stuff
18:51:01FromGitter<Mobilpadde> 👍
18:51:22*deepend quit (*.net *.split)
18:51:39*deepend joined #nim
18:51:41*zachk joined #nim
18:51:49FromGitter<Mobilpadde> https://gist.github.com/Mobilpadde/724da6f1c32ca9bbe93781474585ce8f <- this
18:52:09FromGitter<Mobilpadde> tiny.parse does it's job and compiles on it's own
18:52:24FromGitter<Mobilpadde> Not with the asynchttpserver, though
18:52:47*zachk quit (Read error: Connection reset by peer)
18:52:59dom96where is the rest of the code? i.e. the code that uses mainHandler?
18:53:13*zachk joined #nim
18:53:24FromGitter<Mobilpadde> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce1ca3435c2a518eeac059]
18:53:41FromGitter<Mobilpadde> Didn't think that was important 🐓
18:54:27*banc quit (Ping timeout: 252 seconds)
18:55:49FromGitter<Mobilpadde> Also, can start the server without the `tiny`-module
18:56:06FromGitter<Mobilpadde> Just can't figure how to connect those two :p
18:57:31*banc joined #nim
18:58:45FromGitter<Mobilpadde> Oh, actually got a quick-fix by adding `{.gcsafe.}` to the `tiny`.`parse` :D
18:58:51FromGitter<Mobilpadde> Thanks!
18:59:04dom96ah
18:59:04FromGitter<Mobilpadde> If anybody knows a better way to fix, please do tell! :D
18:59:29dom96This really needs a better error
18:59:58dom96Araq: Can we get the compiler to scream "The proc is missing a gcsafe annotation, because tiny.parse isn't gc safe"?
19:00:06FromGitter<Mobilpadde> Ya
19:00:26FromGitter<Mobilpadde> :D
19:00:39Araqdom96, I improved this error message months ago
19:00:51Araqprobably it's some variant of it I didn't catch?
19:01:06dom96I guess so
19:01:27narimiranare we sure @Mobilpadde uses devel? ;)
19:01:34FromGitter<Mobilpadde> I
19:02:05dom96What I really would like to do is to create a nice error framework for the Nim compiler that makes it as easy as possible to add cases like this
19:02:24FromGitter<Mobilpadde> ```choosenim show ⏎ Channel: devel ⏎ Version: #devel``` [https://gitter.im/nim-lang/Nim?at=5bce1ec0435c2a518eead18c]
19:02:40narimiran`nim -v` ?
19:02:42FromGitter<alehander42> i thought about that, especially for hints
19:02:46Araq'koch temp c foo.nim'
19:03:01FromGitter<alehander42> (e.g. maybe you want ...this fixed version ..)
19:03:03FromGitter<Mobilpadde> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce1ee7600c5f6423eed9c0]
19:03:04Araqgives you a stack trace within the compiler so you can patch the error message
19:03:07FromGitter<alehander42> but no idea how hard woudl it be
19:03:24dom96Araq: Of course. I need time :)
19:03:30dom96And the determination
19:03:36Araqhint: it's hard.
19:03:44dom96lol
19:03:47dom96There goes the determination :
19:03:48dom96:P
19:03:49narimiran@Mobilpadde ok, this definitely means "it's some variant of it [Araq] didn't catch"
19:04:01bozaloshtshWhy can't not nil be proven here?: https://ptpb.pw/lRrt/nim
19:04:05FromGitter<Mobilpadde> Anyhow, thank you so much, guys. For making nim a language :D
19:04:13FromGitter<alehander42> i have plans for like 5-6 nim lib
19:04:16FromGitter<alehander42> libs anyway
19:04:28FromGitter<alehander42> and I am barely maintaining the ones I have :D
19:04:33FromGitter<alehander42> no time for this
19:05:21bozaloshtshbasically, the compiler will not prove not nil for awaiting a spawn with a proc that returns a not nil type
19:05:58Araqgood question
19:05:58bozaloshtshcan spawn just shit the bed and return null even the proc its calling is not nil
19:06:22Araqnot really but 'spawn' confuses the compiler :P
19:06:43bozaloshtshthis isn't really an issue for me because I can just manually check for nil, was just curious
19:08:14*zachk quit (Changing host)
19:08:14*zachk joined #nim
19:10:54bozaloshtshhmm, also shouldn't nil be a member of seq[T not nil]?
19:12:44bozaloshtshok, manual nil checking didn't work either... this seems like a bug so I'm going to file an issue
19:15:36Araqok, but there is a reason we moved that feature to .experimental :-)
19:16:17bozaloshtshAraq: is it going to be phased out in favor of something better?
19:17:15bozaloshtshI guess using two experimental features at the same time isn't how you get things done :P
19:27:44*xet7_ joined #nim
19:29:28*xet7 quit (Ping timeout: 264 seconds)
19:30:50FromGitter<alehander42> is is possible that in the far future each ref usage not protected by isNil branch (or not nil annotation) will be a compile time error?
19:31:03FromGitter<alehander42> i guess this will break too much code even if it's functional
19:31:29*PrimHelios_ joined #nim
19:31:31Araqin the far future I don't have an 'ref' in my code :-)
19:32:17FromGitter<alehander42> I hope so, but ref objects are still going to exist ? :D
19:32:20FromGitter<alehander42> I guess?
19:33:06*xet7_ is now known as xet7
19:33:40*Vladar quit (Remote host closed the connection)
19:33:51*xet7 quit (Quit: Leaving)
19:34:22*xet7 joined #nim
19:34:26ArrrrHe wants to go full managed
19:37:28FromGitter<alehander42> full unmanaged ? :D
19:38:01*Trustable quit (Remote host closed the connection)
19:38:35ArrrrManaged by your hand
19:38:57dom96It'll be tough to pry 'ref' out of my hands :P
19:39:19FromGitter<alehander42> a gc can't give you, what your hand can
19:40:13FromGitter<alehander42> i don't care for ref(I guess it can be replaced with opt / no-ref / seq most of the time)
19:40:36FromGitter<alehander42> but I can't imagine how it would support all the old code :D
19:40:53*nsf joined #nim
19:58:28Araqwe said "far future"
20:02:31*PrimHelios_ quit (Ping timeout: 246 seconds)
20:29:57FromGitter<xmonader> good evening guys
20:30:20*kapil____ quit (Quit: Connection closed for inactivity)
20:30:41FromGitter<zetashift> hello
20:33:27Calinoucross-compiling from Linux to Windows no longer adds .exe to the executable name, is that intended?
20:33:31*PrimHelios joined #nim
20:33:35Calinouit looks like it changed in 0.19.0
20:33:57FromGitter<xmonader> today made a pre-release today from our first ever project in nim, it was a long 14 hours but we made it, however i need to say the concurrency primitives needs lots and lots of work and also it'd be amazing if documentation gets some love or some project like this https://a-tour-of-go-in-haskell.syocy.net/en_US/index.html
20:38:01FromDiscord<Shield> I'd like to ask does the js backend add any overhead and if it's possible to fully rely on it without problem
20:38:25*nsf quit (Quit: WeeChat 2.2)
20:42:04*narimiran quit (Ping timeout: 264 seconds)
20:44:07Araqxmonader: do you mean async or threading?
20:52:13FromGitter<xmonader> well async is lovely, but for instance i was trying to do cancellation channel and passing it to a thread (sounds easy, it's easy..) however I couldn't and even posted the question here twice, searched for snippets but no luck too
20:55:19Araqwell now I'm here, wanna ask again?
20:56:46FromGitter<xmonader> yeah sure
20:57:01FromGitter<xmonader> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce399dbbdc0b25058303d7]
20:57:14FromGitter<zetashift> oh yikes might wanna pastebin that for irc people
20:58:11FromGitter<xmonader> https://pastebin.com/nmg3EMx3
20:58:49FromGitter<xmonader> basically i'm trying to fire a procedure p in a thread and pass it a channel to check if it should cancel its load or not @Araq
21:00:42FromGitter<xmonader> and the error in nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce3a79c08b8b306757a486]
21:04:41Calinouhttps://github.com/Calinou/gits :)
21:10:45FromGitter<alehander42> @Shield no, it should be comparable with js
21:10:47FromGitter<alehander42> pure js
21:11:40*vlad1777d_ joined #nim
21:15:23Araqtemp.nim(37, 36) Error: type mismatch: got <Thread[ptr Channel[system.bool]], proc (cancelChan: ptr Channel[system.bool]): bool{.gcsafe, locks: 0.}, ptr Channel[system.bool]>
21:15:23Araqbut expected one of:
21:15:23Araqproc createThread[TArg](t: var Thread[TArg];
21:15:25Araq tp: proc (arg: TArg) {.thread, nimcall.}; param: TArg)
21:15:27Araq first type mismatch at position: 2
21:15:29Araq required type: proc (arg: TArg){.gcsafe.}
21:15:31Araq but expression 'p' is of type: proc (cancelChan: ptr Channel[system.bool]): bool{.gcsafe, locks: 0.}
21:15:37Araqyour proc returns "bool", createThread doesn't like that
21:16:01AraqI came to this conclusion by reading the error message
21:18:02FromGitter<xmonader> @Araq I see, but then how should i manage the return code from the thread? using a response channel too?
21:20:39*vlad1777d_ quit (Ping timeout: 244 seconds)
21:21:04Araqyeah
21:22:56*PMunch quit (Remote host closed the connection)
21:27:02FromDiscord<Shield> thanks @alehander42
21:30:08FromGitter<mratsim> @Araq, is there a way to passC only to the current .nim file? I’m looking into providing cpu dispatch for CPU with SSE3, AVX (and a default fallback).
21:34:34Araqthere is an undocumented feature for that, let's see
21:35:06dom96xmonader: btw concurrency = async, parallelism = threads
21:36:00*zachk quit (Quit: Leaving)
21:36:05FromGitter<mratsim> aha, yet another undocumented feature :p
21:36:42*PrimHelios quit (Ping timeout: 252 seconds)
21:37:20FromGitter<timotheecour> @narimiran (regarding markdown on forum): no, sorry, it’s muscle memory ; i should be more careful about using rst in forum; (but I have a glimmer of hope as @dom96 just mentioned he’d be open to use nim-markdown in forum )
21:37:54Araqin your nim.cfg use
21:38:07Araq<modulename>.always = "flags here"
21:38:30dom96So I don't think I'll be applying for a FOSDEM stand this year
21:38:41*PrimHelios joined #nim
21:39:35FromGitter<mratsim> ok, I have to check how it combines with “global” flags, does it unset them for the file or are they added.
21:39:47Araqadded
21:40:24FromGitter<mratsim> cool, thanks
21:48:39*zachk joined #nim
21:49:40*zachk quit (Changing host)
21:49:40*zachk joined #nim
21:50:35FromDiscord<smitop> i'm trying to use the opengl bindings, but as soon as i call an opengl proc, i get
21:50:35FromDiscord<smitop> SIGSEGV: Illegal storage access. (Attempt to read from nil?)
21:52:42*PrimHelios_ joined #nim
21:53:54FromGitter<xmonader> @Araq i tried to do the resp Channel version ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Even that i'm reaching the "cancelling proc " line and I send in cancelChan, hasData is always false? [https://gitter.im/nim-lang/Nim?at=5bce46f2ab17df2631d4814e]
21:55:24*PrimHelios quit (Ping timeout: 252 seconds)
21:56:39Araqsmitop: loadExtensions() as the docs say
21:59:58FromDiscord<smitop> thx
22:01:48*Jesin joined #nim
22:03:49FromGitter<zacharycarter> smitop: might want to look at glut or some other opengl loader others are using w/ Nim these days
22:04:15FromGitter<zacharycarter> apparently it allows for finer-grained OpenGL initialization - @krux02 is probably a good resource to ping when he's available
22:04:41krux02I am available
22:04:45FromGitter<zacharycarter> I don't use OpenGL anymore - so I can't be any more helpful than that
22:04:47Araqwhen I wrote this my approach was better than glut :P
22:04:54FromGitter<zacharycarter> I indirectly use OpenGL :P
22:05:08FromGitter<zacharycarter> Araq: no shade meant to be thrown your way :P I've built plenty on your bindings
22:05:29Araqbut OpenGL with its never updated extensions crap is pretty terrible
22:05:36Araqand yeah, I know MS is also to blame here
22:05:47krux02SDL2 is the best opengl context creation library, it is used in many commercial games.
22:06:18krux02OpenGL extensions are actually quite a cool thing
22:06:27FromGitter<zacharycarter> I like BGFX / GFX-RS
22:06:33FromGitter<zacharycarter> I haven't used the latter / don't plan on using it
22:06:44krux02you don't get OpenGL extensions with it :P
22:06:47FromGitter<zacharycarter> but I think this is the correct approach moving forward - bgfx takes the cake too IMO due to its built-in draw call optimizations
22:06:56FromGitter<zacharycarter> I'm fine without them :P
22:07:14FromGitter<zacharycarter> I don't have to worry about an OS vendor "deprecating" support for the API I build my projects around
22:07:58FromGitter<zacharycarter> whatever friction bgfx imposes - IMO - is worth it
22:08:13FromGitter<zacharycarter> friction can be smoothed via automation - what Apple did can't :P
22:09:22krux02well there are efforts to implement OpenGL and Vulkan on Apple
22:09:41FromGitter<zacharycarter> meh
22:10:04krux02but they are not great, because Metal has fewer features
22:10:14krux02I think it lacks a geometry shader
22:10:44FromGitter<zacharycarter> thing is - the guy behind BGFX knows what he's doing obviously - and he's built into the core of his library sort-based draw call bucketing
22:10:46shashlickCalinou: tried earlier today, it added exe to my binary
22:10:49FromGitter<zacharycarter> so IMO - the abstraction is totally worth it
22:11:06FromGitter<zacharycarter> I don't have to worry about platform / api inconsistency and availability
22:11:23FromGitter<zacharycarter> and I get rendering optimizations right from the get go by using the library
22:15:17krux02well my goal is to fix the two language problem
22:15:30krux02so my only alternative would be vulkan
22:15:41FromGitter<zacharycarter> yeah
22:16:30krux02if I would work on an Apple I might even concider using Metal, because it is more a research project, not cross platform at all costscomputer, I
22:16:49krux02remove the "computer, I "
22:16:54krux02forgot to delete it
22:22:21*Arrrr left #nim (#nim)
22:23:55krux02I go sleep
22:24:01krux02good night
22:24:09*krux02 quit (Remote host closed the connection)
22:24:45FromGitter<zacharycarter> gn!
22:26:03*crem quit (Ping timeout: 250 seconds)
22:27:24*PrimHelios_ quit (Quit: Leaving)
22:28:09*crem joined #nim
22:31:59*elrood quit (Quit: Leaving)
22:50:36*crem quit (Ping timeout: 252 seconds)
22:51:42*crem joined #nim
23:21:04FromGitter<zacharycarter> https://status.github.com/messages \0/
23:28:31*gangstacat quit (Ping timeout: 260 seconds)
23:34:18*gangstacat joined #nim
23:39:00*darithorn quit ()