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:24 | FromGitter | <gogolxdong> How to choose between nuklear and vulkan? |
01:15:35 | FromGitter | <zacharycarter> huh? |
01:15:40 | FromGitter | <zacharycarter> they are apples to oranges |
01:15:54 | FromGitter | <zacharycarter> you could use nuklear with vulkan |
01:17:43 | FromGitter | <zacharycarter> nuklear is a graphics api agnostic immediate mode graphical user interface library |
01:17:55 | FromGitter | <gogolxdong> Example uses nuklear+opengl+sdl2 , we don't have a vulkan wrapping ,right? |
01:18:05 | FromGitter | <zacharycarter> vulkan is the successor to opengl |
01:18:15 | FromGitter | <zacharycarter> sdl2 is the windowing api |
01:19:08 | FromGitter | <zacharycarter> https://github.com/nimious/vulkan |
01:19:28 | FromGitter | <zacharycarter> I'd use bgfx if I was going to do any hardware accelerated rendering tbh |
01:19:35 | FromGitter | <kayabaNerve> @zacharycarter But what if |
01:19:46 | FromGitter | <kayabaNerve> You wrap binary in ASM in C in C++ in another thing |
01:19:49 | FromGitter | <kayabaNerve> And call this new thing |
01:19:51 | FromGitter | <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:51 | FromGitter | <kayabaNerve> "Nim" |
01:19:56 | FromGitter | <zacharycarter> hahaha |
01:20:07 | FromGitter | <kayabaNerve> MacOS deprecated OpenGL. |
01:20:13 | FromGitter | <kayabaNerve> Such an idiot move... |
01:20:25 | FromGitter | <zacharycarter> krux02 has issues with that terminology :P |
01:20:28 | FromGitter | <zacharycarter> he'llb e like |
01:20:32 | FromGitter | <gogolxdong> ok, I will check bgfx more. |
01:20:35 | FromGitter | <zacharycarter> how can you deprecate a graphics API? |
01:20:52 | FromGitter | <zacharycarter> @gogolxdong - I can help you in the near future - just need my house to sell so I can quit my job :) |
01:20:55 | FromGitter | <kayabaNerve> wat. |
01:21:07 | FromGitter | <kayabaNerve> Deprecation means it's marked as old; should no longer be used; will be removed. |
01:21:17 | FromGitter | <zacharycarter> yeah but you can't just do that as a OS vendor |
01:21:22 | FromGitter | <zacharycarter> you can stop supporting it |
01:21:30 | FromGitter | <zacharycarter> but you can't just declare you're deprecating the API |
01:21:35 | FromGitter | <kayabaNerve> But they did |
01:21:39 | FromGitter | <zacharycarter> I guess that was his beef with apple's statement |
01:21:43 | FromGitter | <zacharycarter> yeah - they have some cajones |
01:21:54 | FromGitter | <kayabaNerve> https://developer.apple.com/macos/whats-new/ |
01:22:20 | FromGitter | <zacharycarter> it's funny they call OpenGL legacy techonolgy |
01:22:22 | FromGitter | <kayabaNerve> They're deprecating their support of the OpenGL API |
01:22:25 | FromGitter | <kayabaNerve> It is pretty old |
01:22:38 | FromGitter | <zacharycarter> yeah - but I mean it's still used on a ton of hardware |
01:22:50 | FromGitter | <zacharycarter> and people are still writing new software with it, to this day |
01:23:10 | FromGitter | <zacharycarter> it doesn't matter - Apple never really embraced OpenGL or khronos group |
01:23:20 | FromGitter | <zacharycarter> they've had an agenda with metal since forever - they wanted their own directx |
01:23:33 | FromGitter | <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:36 | FromGitter | <zacharycarter> now we have a mess - just like we have with every other facet of software |
01:23:48 | FromGitter | <zacharycarter> but thankfully - we have bgfx and branimir whatever his last name is - to save us |
01:24:15 | FromGitter | <zacharycarter> or if you fancy rust - gfx-rs |
01:24:50 | FromGitter | <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:00 | FromGitter | <zacharycarter> use our shit or gtfo |
01:25:24 | FromGitter | <kayabaNerve> I just compile my game as an independent OS. |
01:25:27 | FromGitter | <zacharycarter> and don't mention moltenvk as a answer to that :P |
01:25:31 | FromGitter | <zacharycarter> lol |
01:25:35 | FromGitter | <zacharycarter> I like your style |
01:25:53 | FromGitter | <kayabaNerve> You don't need to support any OS if you support the CPU *puts finger to head* |
01:26:23 | FromGitter | <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:24 | FromGitter | <zacharycarter> omg |
01:26:43 | FromGitter | <zacharycarter> why |
01:26:52 | FromGitter | <zacharycarter> https://tenor.com/HMGt.gif |
01:27:41 | FromGitter | <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:47 | FromGitter | <zacharycarter> I want to write a forth interpreter |
01:27:51 | FromGitter | <gogolxdong> bgfx doesn't support vulkan |
01:28:05 | FromGitter | <zacharycarter> it doesn't need to yet |
01:28:12 | FromGitter | <zacharycarter> the backend is being built |
01:28:31 | FromGitter | <gogolxdong> understood |
01:28:56 | FromGitter | <zacharycarter> bgfx is bridging - opengl, metal, metal2, vulkan, webgl, and other APIs |
01:29:03 | FromGitter | <zacharycarter> and he's doing it in the order it makes sense |
01:29:32 | FromGitter | <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:47 | FromGitter | <zacharycarter> bgfx also does a lot more than just provide an abstraction to the various graphics APIs |
01:30:15 | FromGitter | <zacharycarter> it does draw sort-based draw call bucketing |
01:30:25 | FromGitter | <zacharycarter> and if you want to know what that is : http://realtimecollisiondetection.net/blog/?p=86 |
01:30:57 | FromGitter | <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:14 | FromGitter | <zacharycarter> but I'd expect some friction with BGFX - specially if you're not coming from the C/C++ world |
01:31:36 | FromGitter | <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:58 | FromGitter | <zacharycarter> and geNIE would be even better |
01:33:17 | FromGitter | <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:29 | FromGitter | <zacharycarter> for instance - bgfx has custom support for imgui and not nuklear |
01:33:54 | FromGitter | <zacharycarter> as well as nanovg - and there's even a fork of nanovg specifically built for bgfx |
01:34:11 | FromGitter | <zacharycarter> I've used nuklear, imgui, and nanovg with bgfx - but it takes tweaking for some of those libs |
01:34:52 | FromGitter | <zacharycarter> you can probably even just get away with SDL2 + nuklear |
01:35:23 | FromGitter | <zacharycarter> I guess not - I guess it needs opengl access |
01:35:54 | FromGitter | <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:04 | FromGitter | <zacharycarter> especially if you're having this much friction with it |
01:36:45 | FromGitter | <zacharycarter> it really all boils down to how much state you have to retain in the first place |
01:37:47 | FromGitter | <zacharycarter> immediate mode generally infers state is tossed out for every draws operation |
01:38:04 | FromGitter | <zacharycarter> retained mode = state is preserved between draw frames |
01:38:24 | FromGitter | <zacharycarter> for butt simple guis - like menus - immediate mode gui rocks |
01:38:45 | FromGitter | <zacharycarter> for more complex guis - retained mode generally makes more sense |
01:39:12 | FromGitter | <zacharycarter> when I say menus - I mean like a pause menu in diablo or starcraft or something |
01:39:22 | FromGitter | <zacharycarter> where there's like six buttons - and barely any state |
01:44:00 | FromGitter | <gogolxdong> got it, I was thinking about retained mode rendering. |
01:45:53 | FromGitter | <gogolxdong> Never dabbled in graphical programming. |
01:46:54 | FromGitter | <gogolxdong> neither my students, we need some experts on it. |
02:04:59 | * | banc quit (Quit: ZNC - http://znc.in) |
02:05:39 | FromGitter | <zacharycarter> heh - I'm far from an expert but it's a very complex topic |
02:06:18 | FromGitter | <zacharycarter> tbh - if you want to get into graphics programming - the #1 place to start is math |
02:06:28 | FromGitter | <zacharycarter> and specifically - linear algebra |
02:20:15 | FromGitter | <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:16 | FromGitter | <gogolxdong> Is there a doc describes what configuration covered for .cfg? |
03:56:41 | FromGitter | <kaushalmodi> what do you mean by that? |
03:57:41 | FromGitter | <gogolxdong> like --cc: clang |
03:57:52 | FromGitter | <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:49 | FromGitter | <kaushalmodi> sorry, I am not familiar with nuklear or Nim in windows |
03:59:12 | FromGitter | <kaushalmodi> but if you have `--cc: clang`, in your .cfg file, then that should be applied |
03:59:40 | FromGitter | <gogolxdong> what else configurable? |
03:59:56 | FromGitter | <kaushalmodi> ah, I'd have to guess all Nim switches |
04:00:02 | FromGitter | <kaushalmodi> do nim --fullhelp |
04:01:43 | FromGitter | <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:17 | leorize | https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg |
04:02:22 | leorize | it's not :P |
04:02:36 | FromGitter | <kaushalmodi> hmm, looks like it's up now |
04:03:05 | FromGitter | <kaushalmodi> https://status.github.com/messages |
04:03:07 | FromGitter | <gogolxdong> Isn't there a documentation? |
04:03:15 | FromGitter | <kaushalmodi> may be it is intermittent? (about github) |
04:04:37 | * | darithorn quit () |
04:04:46 | FromGitter | <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:27 | leorize | obviously `.nims` is vastly superior |
04:06:19 | FromGitter | <kaushalmodi> I know some people are fans of .cfg for simplicity, but I don't quite get that point |
04:06:33 | FromGitter | <kaushalmodi> make .nims as simple or as complex you like :) |
04:07:49 | FromGitter | <gogolxdong> then is there a doc describes .nims? |
04:08:22 | FromGitter | <kaushalmodi> replace "parsecfg" in that earlier link with "nims" |
04:08:49 | leorize | http://nim-lang.github.io/Nim/nims.html |
04:08:57 | FromGitter | <kaushalmodi> and https://nim-lang.github.io/Nim/nimscript.html |
04:09:09 | FromGitter | <kaushalmodi> this latter link is like API doc for nimscripts |
04:10:03 | FromGitter | <kaushalmodi> @gogolxdong It's useful to bookmark https://nim-lang.github.io/Nim/theindex.html |
04:10:30 | FromGitter | <gogolxdong> got it. |
04:10:33 | FromGitter | <gogolxdong> thanks |
04:13:14 | FromGitter | <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:36 | FromGitter | <kaushalmodi> Travis just dies at that first if cond: https://api.travis-ci.org/v3/job/444542654/log.txt |
04:13:42 | FromGitter | <kaushalmodi> and fails without any useful error msg |
04:14:25 | FromGitter | <kaushalmodi> and that too when TRAVIS_OS_NAME is linux |
04:14:31 | FromGitter | <kaushalmodi> .. too |
04:15:12 | FromGitter | <kaushalmodi> its earlier form: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ works [https://gitter.im/nim-lang/Nim?at=5bcd4ed0ef4afc4f28b04674] |
04:15:58 | FromGitter | <kaushalmodi> (this is with respect to my on going efforts from last week to improve Nim nightly builds) |
04:20:17 | FromGitter | <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:27 | FromGitter | <kayabaNerve> @kaushalmodi You didn't say please? |
04:45:45 | FromGitter | <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:36 | FromGitter | <tim-st> this doesnt work?: for line in lines(filename): if "|" in line: echo line |
07:55:02 | FromGitter | <tim-st> (TaintedString not compatible?) |
07:55:40 | FromGitter | <tim-st> `Error: type mismatch: got <TaintedString, string>` |
07:56:22 | FromGitter | <tim-st> ok, replacing `"|"` by `'|'` makes it work |
07:56:30 | leorize | just convert it to `string` with `string(line)` :P |
07:58:12 | FromGitter | <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:00 | FromGitter | <alehander42> is github still having problems? |
10:43:20 | * | kapil____ joined #nim |
10:44:01 | FromGitter | <Vindaar> @alehander42 https://status.github.com/messages |
10:44:04 | FromGitter | <Vindaar> so yeah |
10:49:35 | FromGitter | <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:49 | FromGitter | <mratsim> license? |
11:34:46 | * | dddddd joined #nim |
11:35:00 | * | Vladar quit (Remote host closed the connection) |
11:46:47 | PMunch | Do we have a general CRC library in Nim? |
11:56:13 | * | Vladar joined #nim |
11:58:22 | FromGitter | <Quelklef> Any reason tables.nim has no `proce mergeK, V (t0, t1: Table[K, V]): Table[K, V]`? |
12:00:58 | leorize | what would you do if the two tables have different data in the same key? |
12:01:10 | FromGitter | <Quelklef> Second one overwrites the first |
12:01:22 | FromGitter | <narimiran> ouch |
12:01:35 | FromGitter | <alehander42> yes, that's a good default |
12:01:49 | FromGitter | <alehander42> one can always have an optional param for another strategy |
12:02:12 | * | elrood joined #nim |
12:02:50 | FromGitter | <Quelklef> imo it'd be better to make other procs |
12:02:54 | FromGitter | <Quelklef> but it doesn't really matter |
12:03:03 | FromGitter | <andreaferretti> emmy (https://github.com/unicredit/emmy/blob/master/emmy/tableops.nim) defines `+` for tables |
12:03:15 | FromGitter | <andreaferretti> as long as there is a `+` to merge the values |
12:03:39 | FromGitter | <andreaferretti> slightly different semantics - values need an operation to be merged together |
12:03:59 | FromGitter | <Quelklef> Yeah not quite what I'm looking for |
12:04:34 | FromGitter | <andreaferretti> (you can just define locally a + b = b for your value if you want to recover the semantics) |
12:04:48 | FromGitter | <andreaferretti> but it is easy enough to implement merge in a few lines |
12:04:57 | FromGitter | <andreaferretti> no need for stdlib support |
12:05:06 | FromGitter | <Quelklef> Yeah, that's what I did |
12:05:29 | FromGitter | <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:50 | FromGitter | <narimiran> hey @andreaferretti! i didn't know you're here, so a quick question for you :) |
12:05:51 | FromGitter | <Quelklef> like `seq.pop` |
12:06:15 | FromGitter | <andreaferretti> @narimiran yeah, I come here less often nowadays |
12:06:21 | FromGitter | <andreaferretti> please, ask |
12:07:31 | FromGitter | <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:33 | FromGitter | <andreaferretti> @Quelklef https://nim-lang.org/docs/system.html#pop%2Cseq%5BT%5D |
12:08:08 | FromGitter | <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:10 | FromGitter | <Quelklef> Sorry, you're right, I meant `seq.pop(i)` |
12:08:25 | FromGitter | <alehander42> something like @andreaferretti 's `+` but pass-able as arg |
12:08:34 | FromGitter | <Quelklef> @alehander42 Yeah, fair, I was thinking you meant passing the strategy as a predefined enum |
12:08:44 | FromGitter | <Quelklef> But no that sounds like a natural extension |
12:08:49 | FromGitter | <andreaferretti> @narimiran you can use matrix concatenation, but it will produce some intermediate matrices |
12:09:21 | FromGitter | <alehander42> yeah I thought about that too, but there isn't a limited amount of possible strategies |
12:09:48 | FromGitter | <andreaferretti> it should be doable with hstack, vstack and zero matrices |
12:10:27 | FromGitter | <andreaferretti> something like `vstack(hstack(M1, zeros(?, ?)), hstack(zeros(?, ?), M2)) |
12:10:53 | FromGitter | <andreaferretti> where I am not sure of the ? dimensions, you can compute them according to M1 and M2 dimensions |
12:11:32 | FromGitter | <narimiran> @andreaferretti thanks, i was thinking about either that kind of thing, or manually looping through the matrices. |
12:12:33 | FromGitter | <andreaferretti> yes, both approaches will do |
12:12:44 | FromGitter | <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:54 | FromGitter | <narimiran> generally, not only for this example |
12:12:59 | FromGitter | <andreaferretti> well, I mostly use dynamic matrices |
12:13:20 | FromGitter | <andreaferretti> but sometimes it is nice to use static ones to have an additional check on dimensions |
12:13:40 | FromGitter | <andreaferretti> they can be freely converted in both directions, so you should be able to mix them |
12:13:52 | FromGitter | <narimiran> thanks once again! (and please come here more often :)) |
12:13:56 | FromGitter | <andreaferretti> (i.e. only use static ones for some parts where dimensions are known) |
12:14:05 | FromGitter | <andreaferretti> yeah, you're right :-) |
12:14:16 | FromGitter | <andreaferretti> I will try to hang around more often |
12:16:43 | FromDiscord | <PusiteGA> hmm, {.async.} proc can have return value right |
12:19:09 | * | smt joined #nim |
12:25:11 | FromGitter | <alehander42> yes, it has to be Future[Something] though |
12:59:25 | * | anamok joined #nim |
12:59:27 | anamok | hu |
12:59:32 | anamok | hi |
13:00:21 | anamok | The Nimble packages are split into official and unofficial lists. How to see just the official packages? |
13:01:04 | FromGitter | <zetashift> Aren't they all just listed here? https://nimble.directory/ |
13:01:34 | anamok | They are, but how to know which ones are official? |
13:01:43 | FromGitter | <krux02> @alehander42 no that is not a good default, that is horrible |
13:02:06 | FromGitter | <krux02> sorry I just realized I am very late in the history, I mean the default for merge tables |
13:02:20 | FromGitter | <krux02> merge tables must be symmetric everything else is a bad default |
13:03:19 | FromGitter | <alehander42> well, you can't have a default "symmetric" |
13:03:27 | FromGitter | <alehander42> unless you pass a element-merge handler |
13:03:53 | FromGitter | <alehander42> btw does somebody know if jester ignores some extensions for static files |
13:09:48 | FromGitter | <alehander42> have anybody here used any of the existing orm-s? |
13:09:52 | FromGitter | <alehander42> has* |
13:10:07 | FromGitter | <Quelklef> @krux02 What do you mean symmetric? |
13:10:21 | FromGitter | <Quelklef> I personally have never ever needed to merge a table and NOT wanted to have that overwriting behavior |
13:11:59 | FromGitter | <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:42 | FromGitter | <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:03 | FromGitter | <Quelklef> I don;t think `merge` implies that in the slightest |
13:13:15 | FromGitter | <krux02> well I do |
13:13:24 | FromGitter | <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:35 | FromGitter | <Quelklef> We have different intuitions and every user will have different intuitions |
13:13:51 | FromGitter | <krux02> get creative and use a different name |
13:14:09 | FromGitter | <alehander42> well if you don't have a better name, merge still is the best name |
13:14:10 | FromGitter | <Quelklef> That's not my job; you objected |
13:14:16 | FromGitter | <Quelklef> it lies on you to suggest an alternative |
13:15:29 | * | endragor quit (Remote host closed the connection) |
13:16:05 | FromGitter | <krux02> ``setAll`` |
13:16:51 | FromGitter | <Quelklef> That suffers from the same issue |
13:16:58 | FromGitter | <krux02> ``mergePreferLeft`` |
13:17:02 | FromGitter | <Quelklef> All I get from that is that *something* is being set *somehow* |
13:17:11 | FromGitter | <Quelklef> mergePreferLeft is good but wordy |
13:17:11 | FromGitter | <alehander42> setAll is worse, it make me think it updates an arg |
13:17:29 | FromGitter | <alehander42> but the point is that it prefers the right |
13:17:45 | FromGitter | <alehander42> mergeInto ? |
13:17:56 | FromGitter | <krux02> ``mergePreferRight``? |
13:17:57 | FromGitter | <alehander42> nah, this is confusing too |
13:18:02 | FromGitter | <alehander42> (mergeInto) |
13:18:18 | FromGitter | <Quelklef> Here's the thing |
13:18:18 | FromGitter | <Quelklef> Right |
13:18:35 | FromGitter | <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:40 | FromGitter | <Quelklef> HAS to either prefer left or right |
13:18:45 | * | endragor joined #nim |
13:18:48 | FromGitter | <Quelklef> it can't be symmetric since it knows nothing about the types |
13:19:02 | FromGitter | <Quelklef> So having a default prefer right on `merge` is kind of intuitive since it's only one of two choices |
13:19:08 | FromGitter | <Quelklef> By the type, we know it's gotta be one |
13:19:17 | FromGitter | <alehander42> and because actually it would be unintuitive compared to most other merge-s |
13:19:20 | FromGitter | <alehander42> in other lang/libs |
13:19:27 | FromGitter | <krux02> you are wrong, you have to optimize the names for reading the code |
13:20:06 | FromGitter | <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:33 | FromGitter | <alehander42> well that's what it usually means |
13:20:33 | FromGitter | <krux02> @alehander42 "most"? |
13:21:03 | FromGitter | <alehander42> yes |
13:21:13 | FromGitter | <krux02> is it like this in c++? |
13:23:07 | * | endragor quit (Ping timeout: 240 seconds) |
13:24:03 | FromGitter | <Quelklef> No idea, but it's like this in Python, at least |
13:24:41 | FromGitter | <krux02> is it like this in Java? |
13:25:06 | FromGitter | <Quelklef> No, since Java has no builtin table merge |
13:25:11 | FromGitter | <alehander42> well c++'s merge just does the opposite |
13:25:21 | FromGitter | <krux02> see? |
13:25:26 | FromGitter | <alehander42> what `see` ? |
13:25:26 | FromGitter | <Quelklef> Java has `putAll`, mutating the arg |
13:25:31 | FromGitter | <alehander42> they chose one of those |
13:25:39 | FromGitter | <alehander42> and they didn't call it mergePreferLeft |
13:25:44 | FromGitter | <Quelklef> How about `mergeL` and `mergeR` or something |
13:25:49 | FromGitter | <alehander42> I didn't say `c++`, I said most |
13:25:50 | FromGitter | <Quelklef> unambiguous and not unweildy |
13:26:07 | FromGitter | <alehander42> now, I admit we need a big lang table to test it |
13:26:13 | FromGitter | <alehander42> if i have time later, I'll check |
13:26:47 | * | Vladar quit (Remote host closed the connection) |
13:27:41 | FromGitter | <alehander42> maybe mergeUpdate and mergePreserve |
13:28:00 | FromGitter | <Quelklef> yeah I was thinking `update` and something else |
13:29:25 | FromGitter | <Quelklef> the issue then is that `update` sounds like a mutative operation |
13:29:46 | FromDiscord | <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:03 | FromGitter | <Quelklef> try it! |
13:32:23 | FromDiscord | <PusiteGA> * so i should use "spawn", right? |
13:33:41 | FromDiscord | <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:19 | anamok | bye |
13:34:21 | * | anamok quit (Remote host closed the connection) |
13:35:10 | FromGitter | <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:09 | FromDiscord | <PusiteGA> ye i know, meybe just vs is crying for no reson |
13:47:00 | FromDiscord | <PusiteGA> yep vs code showed errors even it compiled no problem |
13:50:00 | FromGitter | <krux02> nimsuggest (resposible for error messages) and the nim compiler often get out of sync with compiler arguments |
13:50:45 | FromGitter | <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:10 | leorize | shouldn't a project's `.nims` file work? |
13:52:38 | * | PrimHelios_ joined #nim |
13:55:07 | FromDiscord | <PusiteGA> i have .nimble no .nims |
13:55:44 | leorize | `.nims` is a type of compiler configuration file |
13:59:07 | FromDiscord | <PusiteGA> so i sould create myproject.nims |
13:59:54 | FromDiscord | <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:16 | leorize | `myproject.nims` is for flags you wanted to set |
14:10:25 | leorize | like `--threads:on` or `--cc:clang` |
14:15:01 | * | floppydh quit (Quit: WeeChat 2.2) |
14:25:04 | FromDiscord | <PusiteGA> hmm, is there some documenation about that , i named it same as myapp.nim |
14:28:25 | leorize | http://nim-lang.github.io/Nim/nims.html |
14:47:16 | FromDiscord | <PusiteGA> duno how i didnet find it 😃 |
14:47:46 | FromDiscord | <PusiteGA> and now it works np no vscode cry, ty |
14:58:02 | FromGitter | <vinodvinu> if (expr1 and expr2) and (expr3 and expr4) : ⏎ This if statement is not compiling. |
15:00:26 | leorize | any example? |
15:07:03 | * | darithorn joined #nim |
15:15:07 | * | PrimHelios_ quit (Ping timeout: 240 seconds) |
15:16:08 | * | floppydh joined #nim |
15:18:43 | FromGitter | <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:43 | FromGitter | <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:27 | leorize | I don't think you can `if` a button handle |
15:20:37 | leorize | it has to be `int` |
15:21:11 | FromGitter | <vinodvinu> Then how can i check if one variable is a button handle ? |
15:21:37 | leorize | it has to be `bool`, sorry :P |
15:21:38 | FromGitter | <kaushalmodi> `VAR is TYPE` |
15:21:51 | leorize | vinodvinu: what do you mean? |
15:21:52 | FromGitter | <kaushalmodi> also, that has to be in `when` |
15:22:15 | * | narimiran joined #nim |
15:22:29 | FromGitter | <kaushalmodi> kcvinu: see this example: https://github.com/kaushalmodi/elnim/blob/f48f1cc14ac404eaea21edba058e019c6472ef72/src/elnim.nim#L136-L156 |
15:23:59 | FromGitter | <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:26 | FromGitter | <vinodvinu> Thanks @kaushalmodi |
15:24:55 | leorize | yea, a code snippet would be helpful |
15:25:38 | FromGitter | <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:53 | FromGitter | <vinodvinu> here is the link ⏎ https://pastebin.com/j2JFsMBt |
15:29:23 | narimiran | so you didn't read the NEP-1 link i gave you on the forum ;) |
15:29:45 | leorize | which line is causing the problem? |
15:29:56 | FromGitter | <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:58 | leorize | since your snippet is not self-contained |
15:30:29 | FromGitter | <vinodvinu> this question is something related to logic. not related to code |
15:31:07 | leorize | I thought it was about the fact that your complex `if` statement doesn't work somehow? |
15:31:11 | FromGitter | <vinodvinu> Please tell me, how can we paint/draw only one button at a time |
15:31:45 | FromGitter | <vinodvinu> that was failed try |
15:31:53 | FromGitter | <vinodvinu> So i gave up that idea |
15:32:27 | leorize | any context? |
15:32:48 | leorize | because I've absolutely no idea what you are doing |
15:32:48 | FromGitter | <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:17 | FromGitter | <vinodvinu> But my intention is to paint only clicked button |
15:34:10 | FromGitter | <vinodvinu> So how to ensure that the other(non clicked) button is not pinted |
15:34:23 | FromGitter | <vinodvinu> painted |
15:34:24 | FromGitter | <iffy> Where's the recommended place to keep data files in a nimble package? |
15:35:08 | leorize | `<your project name>/<data folder name>` |
15:35:10 | FromGitter | <vinodvinu> @kaushalmodi , |
15:35:49 | FromGitter | <iffy> k, thanks |
15:35:54 | * | Trustable joined #nim |
15:36:00 | leorize | vinodvinu: it depends on what you're using to paint the buttons |
15:36:41 | FromGitter | <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:04 | leorize | `if handle1 != handle2`? |
15:37:20 | FromGitter | <vinodvinu> @leorize, I am using WM_DRAWITEM msg for painting those buttons |
15:37:47 | leorize | so you're using Windows |
15:37:55 | FromGitter | <vinodvinu> yup |
15:37:56 | leorize | sorry, I can't help in that case |
15:38:09 | FromGitter | <vinodvinu> Ok thanks for the help. |
15:38:47 | FromGitter | <vinodvinu> There are few or no people with nim + windows i think |
15:39:21 | FromGitter | <vinodvinu> I think it is better to ask any windows only programming language's forums |
15:39:37 | FromGitter | <vinodvinu> Actually language is just a tool. |
15:39:41 | leorize | Araq uses Windows |
15:39:46 | FromGitter | <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:09 | FromGitter | <vinodvinu> Its ok, @kaushalmodi No problems |
15:40:14 | leorize | most of the time the problem is that not everyone write native Windows GUI code... |
15:40:15 | FromGitter | <kaushalmodi> you can get better help if you post a snippet with all the required details on Nim forum |
15:40:25 | FromGitter | <vinodvinu> @leorize, Araq may be busy |
15:40:46 | leorize | try to look at how C++ people write such thing |
15:40:56 | leorize | it should be trivial to reimplement in Nim |
15:41:03 | FromGitter | <vinodvinu> There is guy named ward who created the wnim library |
15:41:33 | FromGitter | <vinodvinu> Yeah i know its a simple thing, but i am struck now. |
15:41:56 | FromGitter | <vinodvinu> Yeah you are right, C++ or FreeBasic forums will be a help |
15:42:16 | * | Vladar joined #nim |
15:44:32 | FromGitter | <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:55 | FromGitter | <kaushalmodi> that's a custom proc |
15:45:07 | FromGitter | <vinodvinu> i didnt get you |
15:45:15 | FromGitter | <vinodvinu> custom proc ? |
15:45:21 | leorize | that mean they didn't find it |
15:45:23 | leorize | they wrote it |
15:45:53 | FromGitter | <vinodvinu> Oh, then isValid is written by you . Am i right ? |
15:46:12 | FromGitter | <kaushalmodi> I understand it, credit for it goes to @Vindaar |
15:46:23 | FromGitter | <kaushalmodi> but it's part of my little elnim library |
15:46:31 | FromGitter | <vinodvinu> Oh i see |
15:46:48 | Araq | what's up? |
15:47:22 | FromGitter | <kaushalmodi> `(not GitHub)` |
15:47:40 | FromGitter | <vinodvinu> Araq, could you pls help to solve a logical proble about Owner draw button in windows |
15:53:31 | leorize | I'm writing a program that manages a bunch of contacts with only basic infos: Name, Birthday, Address |
15:53:40 | leorize | I need to be able to search within this list |
15:53:45 | leorize | and save it to disk |
15:54:14 | leorize | what should I use for that? sql or json? |
15:54:30 | leorize | and... any good libraries in Nim? :P |
15:54:56 | FromGitter | <vegai> leorize: sounds like a job for sqlite |
15:55:53 | Araq | that's beyond my Win API skills, I don't do UIs |
15:56:17 | Araq | I get by by googling around and copy&paste win API examples |
15:57:37 | FromGitter | <vinodvinu> ha ha @Araq |
15:58:19 | FromGitter | <vinodvinu> never mind, i have asked my question in freeBasic forum |
16:00:53 | * | floppydh quit (Quit: WeeChat 2.2) |
16:01:55 | leorize | vegai: thanks. do you have any sql library in mind that could easily serialize a bunch of objects? |
16:02:01 | leorize | I've never used sql before :P |
16:02:46 | FromGitter | <kaushalmodi> leorize: I read about https://nim-lang.org/docs/db_mysql.html in Nim In Action. |
16:02:51 | FromGitter | <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:03 | FromGitter | <kaushalmodi> But I just skipped through all that because that requires sql syntax knowledge |
16:03:07 | FromGitter | <kaushalmodi> (which I also don't have) |
16:03:54 | FromGitter | <vinodvinu> @leorize, if you want, i can give you a sqlite library for AutoIt |
16:04:00 | FromGitter | <vegai> yeah, nim in action uses sqlite, and uses plain SQL to do it |
16:04:26 | leorize | vinodvinu: no, thanks, I'm writing this in Nim |
16:04:41 | FromGitter | <kaushalmodi> @vegai ah OK, I wouldn't know the difference |
16:05:01 | FromGitter | <vinodvinu> AutoIt is a basic style scripting language. Someone wrote that lib for autoit but we can easily translate that into nim |
16:05:04 | FromGitter | <kaushalmodi> I see that in does use `db_sqlite`; section 7.3.2 onwards |
16:05:11 | FromGitter | <kaushalmodi> s/in does/it does |
16:05:13 | FromGitter | <vinodvinu> Oh its ok |
16:05:21 | leorize | how hard can SQL be :P |
16:05:35 | leorize | let's see if I can crunch this language in a day or so |
16:05:36 | narimiran | leorize: it is not hard |
16:05:39 | FromGitter | <vegai> pretty easy, if you compare it to writing the files yourself :P |
16:05:43 | FromGitter | <kaushalmodi> it's just that I have never needed it (not in software programming field) |
16:07:22 | leorize | the only problem I have with sql is that it requires a server |
16:07:29 | leorize | but looks like sqlite is self-contained |
16:10:43 | * | vivus joined #nim |
16:11:41 | vivus | how do we search the nim IRC logs? |
16:12:32 | leorize | `site:irclogs.nim-lang.org search` |
16:12:42 | leorize | put it in your search engine of choice |
16:17:12 | vivus | aah yeah, that option I guess |
16:18:22 | FromGitter | <vegai> can I build-time configure nim to use some other compiler than gcc |
16:18:56 | leorize | it's in config/nim.cfg |
16:19:31 | FromGitter | <vegai> leorize: ah, thanks |
16:20:02 | vivus | leorize: can I compile a Windows binary on Linux? |
16:20:02 | FromGitter | <vegai> trying to build this on the latest openbsd |
16:20:27 | leorize | vivus: you can, certainly |
16:20:46 | vivus | leorize: I am checking the docs right now and it doesn't explain how |
16:21:25 | leorize | use `--os:windows` switch to generate code for windows |
16:21:47 | leorize | then override gcc to mingw gcc with `--gcc.exe`, `--gcc.linker.exe` |
16:22:42 | vivus | `nim c -d:release --os:windows myfile.nim` ? |
16:23:06 | leorize | yep, but you also have to override the gcc compiler with mingw compiler |
16:23:43 | vivus | `nim c -d:release --os:windows --gcc.exe --gcc.linker.exe myfile.nim` ? |
16:25:08 | leorize | more like this: `nim c -d:release --os:windows --gcc.exe:'mingw-gcc-binary-name' --gcc.linkerexe:'mingw-gcc-binary-name' myfile.nim` |
16:25:10 | vivus | is that correct? leorize |
16:30:10 | FromGitter | <vegai> hmm, by changing gcc to clang, everything else seems to build just fine on openbsd-6.4 |
16:30:31 | FromGitter | <vegai> …but nimscriptsupport.nim says (8, 11) Error: cannot open file: compiler/ast |
16:33:05 | leorize | is that a part of nimble? |
16:34:32 | FromGitter | <vegai> oh, right yes. `nimblepkg/nimscriptsupport.nim(8, 110) ERror: cannot openfile: compiler/ast` |
16:35:10 | leorize | how are you building nimble? |
16:35:35 | FromGitter | <vegai> using build_all.sh, which I believe calls `koch tools` |
16:37:16 | leorize | try `./koch nimble` |
16:37:35 | FromGitter | <vegai> yeah, same result |
16:37:52 | vivus | leorize: you saw my question above? is my command correct? |
16:38:09 | leorize | vivus: did you see my command? |
16:38:40 | vivus | oh wow, how did I miss that :O |
16:39:19 | vivus | leorize: what is this: mingw-gcc-binary-name ? is it the actual name or placeholder text? |
16:39:30 | narimiran | vivus: placeholder |
16:39:32 | leorize | placeholder text, obviously :P |
16:40:20 | vivus | so 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:53 | narimiran | you put there.... wait for it.... mingw-gcc-binary-name :D |
16:40:58 | narimiran | sorry, couldn't resist |
16:41:14 | vivus | where do I find what the mingw-gcc-binary-name is? |
16:41:41 | leorize | apparantly you don't know how a C source could be cross compiled |
16:41:43 | narimiran | vivus: first you need to install it. check you repo's package manager |
16:42:06 | vivus | true, I don't know. |
16:42:07 | leorize | so, basically, you need a special compiler targeting the OS you want |
16:42:19 | FromGitter | <kaushalmodi> vivus: I haven't tried this, but this travis might help: https://github.com/kdheepak/github-release/blob/master/.travis.yml |
16:42:51 | leorize | for Windows the mingw project provides those "special" compilers and libraries |
16:42:57 | FromGitter | <kaushalmodi> @kdheepak is releasing his github-release utility on all 3 platforms: https://github.com/kdheepak/github-release/releases |
16:44:57 | narimiran | but this question is very often asked here. we should have some official source on cross compiling! |
16:44:58 | vivus | Doesn't windows support bash now? Does that mean Linux binaries will work on windows? |
16:45:21 | leorize | only if you install bash ofc |
16:45:25 | leorize | it's not available by default |
16:45:25 | shashlick | @kaushalmodi: that's nice - I wrote a python script to do all that for me for px |
16:45:47 | vivus | alright so first I must install mingw |
16:46:54 | shashlick | vivus: download the windows zip and run finsh |
16:47:15 | vivus | I have no idea what you are talking about shashlick |
16:47:19 | leorize | shashlick: they're asking how to cross compile from linux... |
16:47:33 | shashlick | okay never mind 😄 |
16:48:11 | FromGitter | <kdheepak> @kaushalmodi thanks for pointing to my repo! :) |
16:48:34 | FromGitter | <kdheepak> @vivus feel free to ask any questions about the cross compiling |
16:48:40 | vivus | what do you guys put into your releases? |
16:48:44 | FromGitter | <kdheepak> As far as I can tell, it works like a charm |
16:49:01 | vivus | @kdheepak does your tool do cross-compiling? |
16:49:13 | FromGitter | <kdheepak> Travis-CI also officially supports Windows now, so that might be a way to go in the future. |
16:49:46 | FromGitter | <kdheepak> `github-release` is a CLI utility written in Nim that lets you upload releases to github. |
16:49:48 | FromGitter | <kaushalmodi> @kdheepak Also see if you can refactor your travis config to use the `|` preceeded multi-line string syntax |
16:49:52 | FromGitter | <kaushalmodi> https://github.com/OrgTangle/ntangle/commit/7211325a940438dc2a6a7e54a828482acbe48583 |
16:50:04 | narimiran | @kdheepak instead of answering various questions: would you maybe write a short how-to blogpost? |
16:50:28 | FromGitter | <kaushalmodi> ^ +1 |
16:50:36 | FromGitter | <kdheepak> @narimiran I really should do that. |
16:50:49 | FromGitter | <kdheepak> I'll commit to getting a blog post out by the end of the week. |
16:51:00 | FromGitter | <kdheepak> Wanted to redo my blog in Nim first :P |
16:51:08 | narimiran | it would be very useful, because these questions are quite often |
16:51:26 | vivus | there is some documentation on it: https://nim-lang.org/docs/nimc.html#cross-compilation but it isn't very helpful |
16:51:49 | narimiran | and it would be nice if we had some go-to reference we can link, instead of repeating ourselves over and over again |
16:52:06 | vivus | narimiran: see the link above :P |
16:52:11 | shashlick | vivus: start out with getting mingw working - what distro of linux? `apt-get install mingw-w64` for ubuntu for example |
16:52:18 | FromGitter | <kdheepak> @kaushalmodi you are right, the multi-line in travis would be nicer. |
16:52:34 | FromGitter | <kdheepak> @vivus, are you trying to get it working locally or on Travis? |
16:52:36 | narimiran | btw, 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:52 | vivus | @kdheepak locally. not using automated builds |
16:53:10 | narimiran | vivus: yeah, that's not helpful at all for somebody with no experience with cross-compilation |
16:53:30 | FromGitter | <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:50 | vivus | if @kdheepak is planning on writing something, improving those docs would be better vs. linking to an external blog |
16:54:15 | narimiran | vivus: true |
16:54:15 | leorize | it's too OS-dependant IMO |
16:54:25 | FromGitter | <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:46 | FromGitter | <kdheepak> I'll write up a blog post. |
16:54:58 | FromGitter | <kdheepak> I can also submit a PR to the docs if people are interested in that. |
16:55:30 | FromGitter | <kaushalmodi> @kdheepak I think vivus is referring to the Nim wiki that anyone can edit |
16:55:39 | FromGitter | <kdheepak> Got it. |
16:55:47 | FromGitter | <kaushalmodi> *checks above link* .. nope |
16:55:50 | FromGitter | <kaushalmodi> sorry :) |
16:56:01 | vivus | there's a wiki? where? :O |
16:56:20 | FromGitter | <kaushalmodi> https://github.com/nim-lang/Nim/wiki |
16:56:30 | FromGitter | <kaushalmodi> may be a cross compiling page can be added there |
16:56:49 | narimiran | add it to the manual, please |
16:57:09 | narimiran | it is "more official" than wiki |
16:57:19 | FromGitter | <kaushalmodi> let's start with *somewhere*: blog/wiki/manual |
16:58:12 | FromGitter | <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:54 | shashlick | I suggest expanding nim.cfg to work with mingw on linux |
17:01:06 | shashlick | so you can set --cpu, --os and --cc and get it to work |
17:01:22 | FromGitter | <kaushalmodi> shashlick: that would be nice |
17:03:16 | * | PrimHelios_ joined #nim |
17:14:46 | FromGitter | <krux02> I just found out about this website: https://nimble.directory/ |
17:14:56 | FromGitter | <krux02> I wonder what "Most Queried" means |
17:15:16 | FromGitter | <krux02> because I wrote that library |
17:15:24 | FromGitter | <krux02> I wasn't aware of my popularity. |
17:15:29 | narimiran | it changes quite often |
17:15:44 | narimiran | probably it is "most queried in last __ days" |
17:15:59 | FromGitter | <krux02> queried where? |
17:16:08 | FromGitter | <krux02> that website? |
17:16:13 | FromGitter | <krux02> and what is a query? |
17:16:17 | narimiran | i would guess that, yeah |
17:21:16 | FromGitter | <juancarlospaco> For a long chain of string concatenation at runtime, which one has more performance `&`, `fmt""`, `"".format()`, `["", ""].join` ? |
17:21:32 | FromGitter | <zetashift> Probably queried nimble to install a package |
17:22:31 | leorize | juancarlospaco: use `rope` |
17:22:59 | leorize | oh sorry, thought you were referring to super long strings |
17:24:13 | FromGitter | <juancarlospaco> No super long |
17:24:30 | FromGitter | <juancarlospaco> Just many short strings |
17:24:36 | shashlick | well 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:01 | FromGitter | <juancarlospaco> 10~20 chars strings |
17:25:23 | FromGitter | <juancarlospaco> to join together at runtime |
17:25:29 | Calinou | so 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:39 | Calinou | (it's unrelated to the 0x0 wrapper, but it's another script I needed) |
17:26:01 | leorize | juancarlospaco: run some benchmark perhaps? I wouldn't surprise if all of them turns out to have the same speed |
17:26:42 | FromGitter | <kaushalmodi> Calinou: also look at https://github.com/Vindaar/shell |
17:26:55 | FromGitter | <juancarlospaco> Oh, ok, I was curious maybe somene done it before me, ok. |
17:27:38 | Araq | juancarlospaco: it was bench'ed year ago, don't remember the results |
17:28:14 | Araq | but in properly written code Ropes always lose :P |
17:28:25 | Araq | which is why the compiler is built on top of them... *sigh* |
17:28:39 | FromGitter | <juancarlospaco> I really google it, but cant find it, seen some 3dr party lib, but I meant for std lib strings |
17:29:15 | FromGitter | <kaushalmodi> Araq: what does `{ :; }` in `if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then shell_session_update() { :; }; fi` in the nightlies Travis do? |
17:30:05 | Araq | lol you ask *me* that question? |
17:30:23 | Araq | I only copied it blindly from Nim's travis file |
17:30:28 | FromGitter | <kaushalmodi> it was there to begin with and that's a bashism I am not aware of |
17:30:42 | FromGitter | <kaushalmodi> any bash expert here? |
17:30:57 | FromGitter | <kaushalmodi> what does `shell_session_update() { :; }` on osz in travis config mean? |
17:31:05 | shashlick | vivus: to cross compile, just add these 6 lines into nim.cfg |
17:31:06 | shashlick | ``` |
17:31:07 | shashlick | i386.windows.gcc.path = "/usr/bin" |
17:31:08 | shashlick | i386.windows.gcc.exe = "i686-w64-mingw32-gcc" |
17:31:10 | shashlick | i386.windows.gcc.linkerexe = "i686-w64-mingw32-gcc" |
17:31:12 | shashlick | amd64.windows.gcc.path = "/usr/bin" |
17:31:13 | shashlick | amd64.windows.gcc.exe = "x86_64-w64-mingw32-gcc" |
17:31:15 | shashlick | amd64.windows.gcc.linkerexe = "x86_64-w64-mingw32-gcc" |
17:31:16 | shashlick | ``` |
17:32:21 | FromGitter | <timotheecour> hi @araq did you see my PM? |
17:32:33 | Araq | no... |
17:32:53 | FromGitter | <rayman22201> @kaushalmodi { :; } is just null command. |
17:32:58 | FromGitter | <rayman22201> just null and return true |
17:33:00 | FromGitter | <timotheecour> hmm, you’re not seeing direct messages? |
17:33:10 | FromGitter | <rayman22201> https://unix.stackexchange.com/questions/367108/what-does-while-mean |
17:33:17 | shashlick | Araq: 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:56 | FromGitter | <kaushalmodi> @rayman22201 thanks so those braces are part of the command, so some syntax to escape things in yaml |
17:33:57 | FromGitter | <kaushalmodi> ? |
17:34:23 | FromGitter | <kaushalmodi> googling led me to https://github.com/direnv/direnv/issues/210#issuecomment-203377471 but still doesn't explain what that does |
17:35:56 | Araq | timotheecour: I'm usually on IRC, not gitter, that's why |
17:36:25 | FromGitter | <timotheecour> i c no worries |
17:36:43 | * | stefanos82 quit (Quit: Quitting for now...) |
17:38:14 | FromGitter | <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:26 | FromGitter | <rayman22201> @kaushalmodi I'm not really sure. It seems like a dummy function because some dependent scripts expects it to exist |
17:40:42 | FromGitter | <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:08 | FromGitter | <timotheecour> (```~~foo~~``` is strike-through) |
17:41:18 | FromGitter | <kaushalmodi> @timotheecour I do that usually |
17:41:27 | FromGitter | <kaushalmodi> but in that case, the removed message was irrelevant |
17:41:34 | FromGitter | <kaushalmodi> to the parent thread |
17:41:42 | FromGitter | <timotheecour> okok end of nit :) |
17:42:02 | FromGitter | <kaushalmodi> I normally quote things that I think would serve as context |
17:42:12 | FromGitter | <kaushalmodi> so even if the original message is editted/removed, I control the context |
17:46:53 | Araq | shashlick, because it's not @if unix when you do --os:windows ? |
17:47:26 | Araq | target vs host OS problems... all the defines are wrong, RFC... (just kiddin) |
17:48:08 | FromGitter | <rayman22201> I heard you like RFC's, so I made an RFC to make an RFC for your RFC :-P |
17:48:28 | Araq | obligatory pic of a cat missing |
17:48:56 | FromGitter | <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:09 | FromGitter | <rayman22201> fixed ;-) |
17:58:17 | shashlick | Araq: but it is a cross compile - so we are running on Linux but passing --os:windows to choose a different compiler |
17:58:35 | shashlick | so what you are saying is that --os:windows affects the @if and not the OS you are running on |
17:59:42 | Araq | well it seems to me the @if is for the target, not the host |
17:59:49 | Araq | so in your case @if windows |
17:59:56 | shashlick | my 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:05 | shashlick | but i tried it on windows and it didn't make any difference |
18:00:28 | Araq | I would introduce a -d:rasp and use '@if rasp' |
18:00:47 | vivus | ty shashlick |
18:00:56 | FromGitter | <juancarlospaco> ```1.0 & ⏎ 2.0 fmt"{}" ⏎ 3.0 "".format() ⏎ 2.0 ["", ].join``` [https://gitter.im/nim-lang/Nim?at=5bce1058435c2a518eea6a2a] |
18:00:58 | FromGitter | <juancarlospaco> https://pastebin.com/PuijFZQQ |
18:00:58 | shashlick | so this is for mingw Windows cross compile on Linux |
18:01:30 | shashlick | vivus: did it work |
18:02:06 | vivus | shashlick: I decided to abandon cross-compiling to windows because the mingw installer is bloated (uses up 700+MB of space) |
18:02:13 | shashlick | 😄 |
18:02:21 | Araq | vivus, try clang for Windows instead |
18:02:48 | vivus | travis can build releases right? |
18:02:50 | shashlick | worked super easy for me |
18:03:06 | Araq | er, I just noticed my clang/LLVM takes 938MB :-/ |
18:03:30 | FromGitter | <kaushalmodi> vivus: did you miss the earlier link I pasted about the .github-release project's travis.yml |
18:03:31 | FromGitter | <kaushalmodi> ? |
18:03:50 | * | vivus scrolls up |
18:04:15 | FromGitter | <juancarlospaco> `&` is best, `fmt""` second, `"".format()` is worse. |
18:04:21 | vivus | I see it now, ty @kaushalmodi |
18:04:57 | FromGitter | <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:46 | bozaloshtsh | In threadpool, I don't see a blockUntilAll(openArray[FlowVar[T]]) proc. How should I wait for all my flowvars to be resolved? |
18:24:54 | Araq | iirc it's called join() |
18:24:56 | leorize | run a for loop? |
18:26:12 | * | chemist69 joined #nim |
18:26:40 | bozaloshtsh | Also, 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:59 | bozaloshtsh | oh, I guess the fact that it is actually nullable would be the answer here, nvm :p |
18:27:13 | bozaloshtsh | Araq: I don't see join() in threadpool, is it in a different module? |
18:27:38 | bozaloshtsh | like so: https://nim-lang.org/docs/threads.html#joinThreads%2Cvarargs%5BThread%5BTArg%5D%5D |
18:28:00 | leorize | bozaloshtsh: shouldn't `for i in s: i.blockUntil` works? |
18:28:17 | narimiran | @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:42 | bozaloshtsh | leorize: I suppose, yeah |
18:29:08 | * | Arrrr joined #nim |
18:29:09 | bozaloshtsh | I just thought this was common enough of an idiom to warrant a proc in the stdlib |
18:31:56 | leorize | you may also use it with sequtils |
18:32:49 | leorize | but tbh is the for loop that complex? |
18:32:58 | * | PrimHelios_ quit (Ping timeout: 245 seconds) |
18:34:32 | Araq | leorize, 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:23 | FromGitter | <Mobilpadde> Hey, I have a problem with asynchttpserver. Any of you had any luck with calling custom proc's from it? |
18:40:02 | FromGitter | <Mobilpadde> I mean, I made a parser, and want to show the parsed text on a new request to the server |
18:40:50 | FromGitter | <Mobilpadde> Getting this error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce19b282893a2f3b22517e] |
18:42:30 | * | endragor joined #nim |
18:44:22 | dom96 | try adding {.closure.} to your proc |
18:45:28 | FromGitter | <Mobilpadde> ```'.closure' calling convention for top level routines is invalid``` |
18:45:47 | FromGitter | <Mobilpadde> I'm quite new to nim :D |
18:46:55 | * | endragor quit (Ping timeout: 246 seconds) |
18:47:15 | dom96 | hrm, can you gist your code? |
18:47:30 | FromGitter | <zacharycarter> @Mobilpadde - problem there is closures need to be nested within another proc |
18:47:35 | FromGitter | <zacharycarter> unless it's a closure iterator |
18:47:38 | FromGitter | <zacharycarter> from my understanding anyway |
18:48:33 | FromGitter | <Mobilpadde> Hmm, not happy to gist it for now. :/ |
18:49:09 | dom96 | that's okay |
18:49:18 | dom96 | Did you see this example? https://nim-lang.org/docs/asynchttpserver.html#examples |
18:49:24 | dom96 | Might be worth comparing what your code looks like to that |
18:49:37 | dom96 | (Double check that example compiles on its own, might be broken due to some compiler changes) |
18:50:08 | FromGitter | <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:32 | dom96 | You shouldn't need to do that |
18:50:47 | FromGitter | <Mobilpadde> It does compile, so that's a plus. Just can't get it to compile with the async-stuff |
18:51:01 | FromGitter | <Mobilpadde> 👍 |
18:51:22 | * | deepend quit (*.net *.split) |
18:51:39 | * | deepend joined #nim |
18:51:41 | * | zachk joined #nim |
18:51:49 | FromGitter | <Mobilpadde> https://gist.github.com/Mobilpadde/724da6f1c32ca9bbe93781474585ce8f <- this |
18:52:09 | FromGitter | <Mobilpadde> tiny.parse does it's job and compiles on it's own |
18:52:24 | FromGitter | <Mobilpadde> Not with the asynchttpserver, though |
18:52:47 | * | zachk quit (Read error: Connection reset by peer) |
18:52:59 | dom96 | where is the rest of the code? i.e. the code that uses mainHandler? |
18:53:13 | * | zachk joined #nim |
18:53:24 | FromGitter | <Mobilpadde> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce1ca3435c2a518eeac059] |
18:53:41 | FromGitter | <Mobilpadde> Didn't think that was important 🐓 |
18:54:27 | * | banc quit (Ping timeout: 252 seconds) |
18:55:49 | FromGitter | <Mobilpadde> Also, can start the server without the `tiny`-module |
18:56:06 | FromGitter | <Mobilpadde> Just can't figure how to connect those two :p |
18:57:31 | * | banc joined #nim |
18:58:45 | FromGitter | <Mobilpadde> Oh, actually got a quick-fix by adding `{.gcsafe.}` to the `tiny`.`parse` :D |
18:58:51 | FromGitter | <Mobilpadde> Thanks! |
18:59:04 | dom96 | ah |
18:59:04 | FromGitter | <Mobilpadde> If anybody knows a better way to fix, please do tell! :D |
18:59:29 | dom96 | This really needs a better error |
18:59:58 | dom96 | Araq: Can we get the compiler to scream "The proc is missing a gcsafe annotation, because tiny.parse isn't gc safe"? |
19:00:06 | FromGitter | <Mobilpadde> Ya |
19:00:26 | FromGitter | <Mobilpadde> :D |
19:00:39 | Araq | dom96, I improved this error message months ago |
19:00:51 | Araq | probably it's some variant of it I didn't catch? |
19:01:06 | dom96 | I guess so |
19:01:27 | narimiran | are we sure @Mobilpadde uses devel? ;) |
19:01:34 | FromGitter | <Mobilpadde> I |
19:02:05 | dom96 | What 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:24 | FromGitter | <Mobilpadde> ```choosenim show ⏎ Channel: devel ⏎ Version: #devel``` [https://gitter.im/nim-lang/Nim?at=5bce1ec0435c2a518eead18c] |
19:02:40 | narimiran | `nim -v` ? |
19:02:42 | FromGitter | <alehander42> i thought about that, especially for hints |
19:02:46 | Araq | 'koch temp c foo.nim' |
19:03:01 | FromGitter | <alehander42> (e.g. maybe you want ...this fixed version ..) |
19:03:03 | FromGitter | <Mobilpadde> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce1ee7600c5f6423eed9c0] |
19:03:04 | Araq | gives you a stack trace within the compiler so you can patch the error message |
19:03:07 | FromGitter | <alehander42> but no idea how hard woudl it be |
19:03:24 | dom96 | Araq: Of course. I need time :) |
19:03:30 | dom96 | And the determination |
19:03:36 | Araq | hint: it's hard. |
19:03:44 | dom96 | lol |
19:03:47 | dom96 | There goes the determination : |
19:03:48 | dom96 | :P |
19:03:49 | narimiran | @Mobilpadde ok, this definitely means "it's some variant of it [Araq] didn't catch" |
19:04:01 | bozaloshtsh | Why can't not nil be proven here?: https://ptpb.pw/lRrt/nim |
19:04:05 | FromGitter | <Mobilpadde> Anyhow, thank you so much, guys. For making nim a language :D |
19:04:13 | FromGitter | <alehander42> i have plans for like 5-6 nim lib |
19:04:16 | FromGitter | <alehander42> libs anyway |
19:04:28 | FromGitter | <alehander42> and I am barely maintaining the ones I have :D |
19:04:33 | FromGitter | <alehander42> no time for this |
19:05:21 | bozaloshtsh | basically, the compiler will not prove not nil for awaiting a spawn with a proc that returns a not nil type |
19:05:58 | Araq | good question |
19:05:58 | bozaloshtsh | can spawn just shit the bed and return null even the proc its calling is not nil |
19:06:22 | Araq | not really but 'spawn' confuses the compiler :P |
19:06:43 | bozaloshtsh | this 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:54 | bozaloshtsh | hmm, also shouldn't nil be a member of seq[T not nil]? |
19:12:44 | bozaloshtsh | ok, manual nil checking didn't work either... this seems like a bug so I'm going to file an issue |
19:15:36 | Araq | ok, but there is a reason we moved that feature to .experimental :-) |
19:16:17 | bozaloshtsh | Araq: is it going to be phased out in favor of something better? |
19:17:15 | bozaloshtsh | I 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:50 | FromGitter | <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:03 | FromGitter | <alehander42> i guess this will break too much code even if it's functional |
19:31:29 | * | PrimHelios_ joined #nim |
19:31:31 | Araq | in the far future I don't have an 'ref' in my code :-) |
19:32:17 | FromGitter | <alehander42> I hope so, but ref objects are still going to exist ? :D |
19:32:20 | FromGitter | <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:26 | Arrrr | He wants to go full managed |
19:37:28 | FromGitter | <alehander42> full unmanaged ? :D |
19:38:01 | * | Trustable quit (Remote host closed the connection) |
19:38:35 | Arrrr | Managed by your hand |
19:38:57 | dom96 | It'll be tough to pry 'ref' out of my hands :P |
19:39:19 | FromGitter | <alehander42> a gc can't give you, what your hand can |
19:40:13 | FromGitter | <alehander42> i don't care for ref(I guess it can be replaced with opt / no-ref / seq most of the time) |
19:40:36 | FromGitter | <alehander42> but I can't imagine how it would support all the old code :D |
19:40:53 | * | nsf joined #nim |
19:58:28 | Araq | we said "far future" |
20:02:31 | * | PrimHelios_ quit (Ping timeout: 246 seconds) |
20:29:57 | FromGitter | <xmonader> good evening guys |
20:30:20 | * | kapil____ quit (Quit: Connection closed for inactivity) |
20:30:41 | FromGitter | <zetashift> hello |
20:33:27 | Calinou | cross-compiling from Linux to Windows no longer adds .exe to the executable name, is that intended? |
20:33:31 | * | PrimHelios joined #nim |
20:33:35 | Calinou | it looks like it changed in 0.19.0 |
20:33:57 | FromGitter | <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:01 | FromDiscord | <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:07 | Araq | xmonader: do you mean async or threading? |
20:52:13 | FromGitter | <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:19 | Araq | well now I'm here, wanna ask again? |
20:56:46 | FromGitter | <xmonader> yeah sure |
20:57:01 | FromGitter | <xmonader> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce399dbbdc0b25058303d7] |
20:57:14 | FromGitter | <zetashift> oh yikes might wanna pastebin that for irc people |
20:58:11 | FromGitter | <xmonader> https://pastebin.com/nmg3EMx3 |
20:58:49 | FromGitter | <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:42 | FromGitter | <xmonader> and the error in nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bce3a79c08b8b306757a486] |
21:04:41 | Calinou | https://github.com/Calinou/gits :) |
21:10:45 | FromGitter | <alehander42> @Shield no, it should be comparable with js |
21:10:47 | FromGitter | <alehander42> pure js |
21:11:40 | * | vlad1777d_ joined #nim |
21:15:23 | Araq | temp.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:23 | Araq | but expected one of: |
21:15:23 | Araq | proc createThread[TArg](t: var Thread[TArg]; |
21:15:25 | Araq | tp: proc (arg: TArg) {.thread, nimcall.}; param: TArg) |
21:15:27 | Araq | first type mismatch at position: 2 |
21:15:29 | Araq | required type: proc (arg: TArg){.gcsafe.} |
21:15:31 | Araq | but expression 'p' is of type: proc (cancelChan: ptr Channel[system.bool]): bool{.gcsafe, locks: 0.} |
21:15:37 | Araq | your proc returns "bool", createThread doesn't like that |
21:16:01 | Araq | I came to this conclusion by reading the error message |
21:18:02 | FromGitter | <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:04 | Araq | yeah |
21:22:56 | * | PMunch quit (Remote host closed the connection) |
21:27:02 | FromDiscord | <Shield> thanks @alehander42 |
21:30:08 | FromGitter | <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:34 | Araq | there is an undocumented feature for that, let's see |
21:35:06 | dom96 | xmonader: btw concurrency = async, parallelism = threads |
21:36:00 | * | zachk quit (Quit: Leaving) |
21:36:05 | FromGitter | <mratsim> aha, yet another undocumented feature :p |
21:36:42 | * | PrimHelios quit (Ping timeout: 252 seconds) |
21:37:20 | FromGitter | <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:54 | Araq | in your nim.cfg use |
21:38:07 | Araq | <modulename>.always = "flags here" |
21:38:30 | dom96 | So I don't think I'll be applying for a FOSDEM stand this year |
21:38:41 | * | PrimHelios joined #nim |
21:39:35 | FromGitter | <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:47 | Araq | added |
21:40:24 | FromGitter | <mratsim> cool, thanks |
21:48:39 | * | zachk joined #nim |
21:49:40 | * | zachk quit (Changing host) |
21:49:40 | * | zachk joined #nim |
21:50:35 | FromDiscord | <smitop> i'm trying to use the opengl bindings, but as soon as i call an opengl proc, i get |
21:50:35 | FromDiscord | <smitop> SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
21:52:42 | * | PrimHelios_ joined #nim |
21:53:54 | FromGitter | <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:39 | Araq | smitop: loadExtensions() as the docs say |
21:59:58 | FromDiscord | <smitop> thx |
22:01:48 | * | Jesin joined #nim |
22:03:49 | FromGitter | <zacharycarter> smitop: might want to look at glut or some other opengl loader others are using w/ Nim these days |
22:04:15 | FromGitter | <zacharycarter> apparently it allows for finer-grained OpenGL initialization - @krux02 is probably a good resource to ping when he's available |
22:04:41 | krux02 | I am available |
22:04:45 | FromGitter | <zacharycarter> I don't use OpenGL anymore - so I can't be any more helpful than that |
22:04:47 | Araq | when I wrote this my approach was better than glut :P |
22:04:54 | FromGitter | <zacharycarter> I indirectly use OpenGL :P |
22:05:08 | FromGitter | <zacharycarter> Araq: no shade meant to be thrown your way :P I've built plenty on your bindings |
22:05:29 | Araq | but OpenGL with its never updated extensions crap is pretty terrible |
22:05:36 | Araq | and yeah, I know MS is also to blame here |
22:05:47 | krux02 | SDL2 is the best opengl context creation library, it is used in many commercial games. |
22:06:18 | krux02 | OpenGL extensions are actually quite a cool thing |
22:06:27 | FromGitter | <zacharycarter> I like BGFX / GFX-RS |
22:06:33 | FromGitter | <zacharycarter> I haven't used the latter / don't plan on using it |
22:06:44 | krux02 | you don't get OpenGL extensions with it :P |
22:06:47 | FromGitter | <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:56 | FromGitter | <zacharycarter> I'm fine without them :P |
22:07:14 | FromGitter | <zacharycarter> I don't have to worry about an OS vendor "deprecating" support for the API I build my projects around |
22:07:58 | FromGitter | <zacharycarter> whatever friction bgfx imposes - IMO - is worth it |
22:08:13 | FromGitter | <zacharycarter> friction can be smoothed via automation - what Apple did can't :P |
22:09:22 | krux02 | well there are efforts to implement OpenGL and Vulkan on Apple |
22:09:41 | FromGitter | <zacharycarter> meh |
22:10:04 | krux02 | but they are not great, because Metal has fewer features |
22:10:14 | krux02 | I think it lacks a geometry shader |
22:10:44 | FromGitter | <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:46 | shashlick | Calinou: tried earlier today, it added exe to my binary |
22:10:49 | FromGitter | <zacharycarter> so IMO - the abstraction is totally worth it |
22:11:06 | FromGitter | <zacharycarter> I don't have to worry about platform / api inconsistency and availability |
22:11:23 | FromGitter | <zacharycarter> and I get rendering optimizations right from the get go by using the library |
22:15:17 | krux02 | well my goal is to fix the two language problem |
22:15:30 | krux02 | so my only alternative would be vulkan |
22:15:41 | FromGitter | <zacharycarter> yeah |
22:16:30 | krux02 | if 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:49 | krux02 | remove the "computer, I " |
22:16:54 | krux02 | forgot to delete it |
22:22:21 | * | Arrrr left #nim (#nim) |
22:23:55 | krux02 | I go sleep |
22:24:01 | krux02 | good night |
22:24:09 | * | krux02 quit (Remote host closed the connection) |
22:24:45 | FromGitter | <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:04 | FromGitter | <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 () |