00:06:39 | FromDiscord | <Yardanico> https://isc.sans.edu/diary/27230 |
00:07:01 | FromDiscord | <Yardanico> Although the script to extract strings seems to be very overengineered |
00:10:46 | leorize[m] | I'm glad they make sure to read oldruntime source instead of newruntime string literals :P |
00:14:28 | * | krux02 quit (Remote host closed the connection) |
00:22:11 | FromDiscord | <Yardanico> xdd |
00:35:50 | * | j is now known as jess |
00:36:28 | * | wasted_youth2 joined #nim |
01:43:36 | * | timdorohin_ joined #nim |
01:47:03 | * | timdorohin quit (Ping timeout: 265 seconds) |
01:47:11 | * | timdorohin_ is now known as timdorohin |
01:52:29 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:52:48 | * | njoseph joined #nim |
02:03:17 | * | abm quit (Quit: Leaving) |
02:14:22 | FromDiscord | <aryn> how would i go about including cacert.pem inside the binary? since its required for https requestes |
02:14:25 | FromDiscord | <aryn> (edit) "requestes" => "requests" |
02:20:52 | FromDiscord | <ElegantBeef> You can `const Cert = staticRead("cacert.pem")` then output that on runtime wherever you need |
02:21:56 | FromDiscord | <aryn> oh cool |
02:24:22 | FromDiscord | <Yardanico> @aryn don't forget you also need to ship openssl dlls on win |
02:24:39 | FromDiscord | <aryn> its designed to be a cli util for linus |
02:24:40 | FromDiscord | <aryn> (edit) "linus" => "linux" |
02:24:48 | FromDiscord | <aryn> more specifically uploading stuff to virustotall |
02:24:49 | FromDiscord | <aryn> (edit) "virustotall" => "virustotal" |
02:24:51 | FromDiscord | <Yardanico> but why do you need cacert.pem then? some custom https server? |
02:25:00 | FromDiscord | <Yardanico> (edit) "server?" => "server without a valid certificate?" |
02:25:07 | FromDiscord | <Yardanico> any modern distro ships with cacert.pem |
02:25:07 | FromDiscord | <aryn> or is cacert only needed on windows :OMEGALUL: |
02:25:11 | FromDiscord | <Yardanico> yes |
02:25:21 | FromDiscord | <aryn> welp, that solves that |
02:25:28 | FromDiscord | <aryn> windows™️ |
02:26:06 | FromDiscord | <Yardanico> you can check https://github.com/nim-lang/Nim/blob/devel/lib/pure/ssl_certs.nim for the ssl certificate logic |
02:26:17 | FromDiscord | <aryn> yeah is saw that |
02:26:38 | FromDiscord | <aryn> https://media.discordapp.net/attachments/371759389889003532/823744515541434408/unknown.png |
02:26:38 | FromDiscord | <aryn> will do |
02:26:55 | FromDiscord | <Yardanico> when instead of if |
02:27:10 | FromDiscord | <Yardanico> also you can just fail compilation if it's not being compiled for a linux targetr |
02:27:11 | FromDiscord | <Yardanico> (edit) "targetr" => "target" |
02:27:37 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2TOj |
02:27:41 | FromDiscord | <aryn> oh thats neat |
02:27:46 | FromDiscord | <Yardanico> put it at the top of the file for example, maybe after the imports |
02:27:52 | FromDiscord | <aryn> whats the difference between when and if here btw? |
02:27:54 | FromDiscord | <Yardanico> but why do you want to put a strict no-win check? |
02:28:03 | FromDiscord | <aryn> because cacert will break |
02:28:05 | FromDiscord | <aryn> and i cba |
02:28:13 | FromDiscord | <Yardanico> it won't "break" |
02:28:13 | FromDiscord | <Rika> compile time |
02:28:18 | FromDiscord | <Yardanico> @aryn `when` checks at compile-time, doesn't introduce a new scope |
02:28:18 | FromDiscord | <Rika> when is compile time if is runtime |
02:28:26 | FromDiscord | <aryn> ah |
02:28:49 | FromDiscord | <Yardanico> `when` branches get resolved by the compiler so the compiler binary contains at max 1 possible branch from your when statements |
02:29:03 | FromDiscord | <Yardanico> but yeah, even if you don't want to deal with cacert.pem on windows _yourself_, you don't need to |
02:29:14 | FromDiscord | <Yardanico> cacert.pem is shipped with Nim stuff on windows anyway |
02:29:27 | FromDiscord | <Yardanico> so putting this check is kind of weird, you can just say "this app has only been tested on Linux" in the readme |
02:30:18 | FromDiscord | <aryn> alright, this is weird as a java dev, since idk the ideas over there are more: you do everything so the end user doesnt have to |
02:30:25 | FromDiscord | <aryn> nim appears to think a bit differently |
02:30:59 | FromDiscord | <Yardanico> i don't think it's specific to java really, you just don't provide windows binaries and say that the app has only been tested on linux, that's all |
02:31:15 | FromDiscord | <Yardanico> a typical "end user" wouldn't install it anyway then, since it'll require him to install nim itself |
02:31:24 | FromDiscord | <Rika> you can more explicitly say no warranty for windows users hahah |
02:31:35 | FromDiscord | <aryn> hehe |
02:32:08 | FromDiscord | <Yardanico> @Rika <boring mode on>most OSS licenses already mention that</boring mode off> |
02:32:28 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2TOk |
02:32:38 | FromDiscord | <Rika> no support then |
02:34:36 | FromDiscord | <aryn> the optparser is also pretty decent |
04:05:00 | * | spiderstew joined #nim |
04:06:15 | * | spiderstew_ quit (Ping timeout: 265 seconds) |
04:33:06 | FromDiscord | <ShadowElf37> is it dangerous to do `cast[ptr cint](ptr int)` |
04:35:35 | * | sixtyten quit (Quit: Leaving) |
04:37:07 | leorize[m] | yes |
04:37:31 | FromDiscord | <ShadowElf37> why |
04:37:49 | leorize[m] | on major platforms (64-bit), `cint` is shorter than `int` |
04:38:33 | leorize[m] | so casting ends up truncating the integer |
04:39:32 | leorize[m] | !eval echo "sizeof(int): ", sizeof(int), " vs sizeof(cint): ", sizeof(cint) |
04:39:34 | NimBot | sizeof(int): 8 vs sizeof(cint): 4 |
04:39:58 | leorize[m] | `int` most of the time is twice as big, so you're losing half of the data if you cast |
04:40:07 | FromDiscord | <ShadowElf37> ok interesting |
04:42:21 | leorize[m] | !eval echo "high(int): ", high(int), " vs cast[cint](high(int)): ", cast[cint](high(int)) |
04:42:23 | NimBot | high(int): 9223372036854775807 vs cast[cint](high(int)): -1 |
04:44:34 | FromDiscord | <ShadowElf37> !eval echo "int: ", 2 shl 34, " - cint: ", cast[cint](2 shl 34) |
04:44:37 | NimBot | int: 34359738368 - cint: 0 |
04:52:41 | FromDiscord | <Yardanico> In reply to @ShadowElf37 "ok interesting": Why do you want to do that? |
05:15:20 | * | Kaivo quit (Ping timeout: 256 seconds) |
05:16:02 | * | Kaivo joined #nim |
05:21:20 | FromDiscord | <ShadowElf37> I’m doing stuff with SDL and didn’t want my abstractions littered with cints |
05:21:35 | FromDiscord | <ShadowElf37> But I guess I’ll have to 😁 |
05:21:58 | FromDiscord | <Yardanico> You don't have to though |
05:22:13 | FromDiscord | <Yardanico> just show the code where you actually need that logic |
05:22:26 | FromDiscord | <Yardanico> seems like an x y problem to me |
05:23:22 | FromDiscord | <ShadowElf37> it's sdl functions that take int pointers |
05:23:30 | FromDiscord | <ShadowElf37> so i cant just convert the values right |
05:24:01 | FromDiscord | <Yardanico> just show a piece of code where you wanted to use that cast :) |
05:24:37 | FromDiscord | <Yardanico> Also, did you see https://github.com/Vladar4/sdl2_nim ? |
05:25:13 | FromDiscord | <ShadowElf37> er, im using whatever sdl2 binding is on the curated packages list |
05:25:16 | FromDiscord | <ShadowElf37> idk if thats the one |
05:25:36 | FromDiscord | <Yardanico> this one is more idiomatic kind of |
05:26:10 | FromDiscord | <Yardanico> Also "curated package list" is not really enforced or anything, anyone can add a library to it |
05:26:22 | FromDiscord | <ShadowElf37> so its not "curated" lol |
05:26:46 | FromDiscord | <Yardanico> ??? |
05:27:06 | FromDiscord | <ShadowElf37> sent a code paste, see https://play.nim-lang.org/#ix=2TOO |
05:27:13 | FromDiscord | <ShadowElf37> I'd expect curated to mean someone found the best packages and put them together |
05:27:20 | FromDiscord | <Yardanico> Not really |
05:30:49 | * | lritter joined #nim |
05:30:54 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2TOS |
05:31:14 | FromDiscord | <Yardanico> You can use your original way as well, it should work for most cases, but no guarantees |
05:31:22 | FromDiscord | <ShadowElf37> overhead 😳 |
05:31:41 | FromDiscord | <Yardanico> it's negligible really |
05:31:46 | FromDiscord | <ShadowElf37> 😱 |
05:32:20 | FromDiscord | <Yardanico> ? |
05:32:44 | FromDiscord | <ShadowElf37> lol i'll consider it, it depends how much i end up needing to convert and how much trouble it'll cause me writing the extra lines |
05:32:50 | FromDiscord | <ShadowElf37> good solution though |
05:33:13 | FromDiscord | <Yardanico> also why do you have Image as a ref object? |
05:33:27 | FromDiscord | <ShadowElf37> cause im gonna reuse it for multiple entities and stuff |
05:33:36 | FromDiscord | <Yardanico> it already contains a pointer to an sdl image, so there's no need to add yet another pointer indirection |
05:33:57 | FromDiscord | <ShadowElf37> mm i'll still be reusing it but thats a fair point |
05:34:36 | FromDiscord | <Yardanico> and you current code will fail at runtime because you didn't initialize your Image since it's a ref |
05:34:48 | FromDiscord | <ShadowElf37> i have new i just deleted it for this |
06:11:28 | * | narimiran joined #nim |
06:14:08 | * | haxscramper joined #nim |
06:25:56 | * | NimBot joined #nim |
06:35:11 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:46:15 | * | haxscramper quit (Remote host closed the connection) |
06:46:40 | * | haxscramper joined #nim |
07:03:05 | * | a_chou joined #nim |
07:03:05 | * | a_chou quit (Remote host closed the connection) |
07:29:41 | * | xet7 quit (Quit: Leaving) |
07:45:59 | * | xet7 joined #nim |
07:49:44 | * | vicfred quit (Quit: Leaving) |
08:23:54 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2TPv |
08:25:28 | FromDiscord | <ElegantBeef> When you want to be doubly sure `result` is returned |
08:40:08 | FromDiscord | <haxscramper> https://github.com/h3rald/litestore/blob/b47f906761bf98c768d814ff124379ada24af6f6/litestore.nimble#L1 this syntax was valid for some time in nimble, or this is just broken config? I'm talking about `[Package]` part together with `@["test"]` |
08:40:33 | FromDiscord | <haxscramper> I know there is an old format that should be handled by `parseCfg`, but this looks like a mix of both variants |
08:40:41 | * | PMunch joined #nim |
08:45:03 | FromDiscord | <KnorrFG> sent a code paste, see https://play.nim-lang.org/#ix=2TPy |
08:46:01 | FromDiscord | <haxscramper> If you pass `typed` argument you can get to object implementation using `getTypeImpl` |
08:46:37 | Clonkk[m] | Does ``foreignDep`` from distros install the package ? Or is it just informative ? |
08:46:42 | FromDiscord | <KnorrFG> ty |
08:48:22 | FromDiscord | <haxscramper> In reply to @Clonkk "Does ``foreignDep`` from distros": IIRC this is just information, but we have `std/distros` that supports checking for current distribution and selecting appropriate package manager so you could print `"please install package X using 'command for specific distro'"` |
08:49:22 | Clonkk[m] | <FromDiscord "<haxscramper> In reply to @Clonk"> Okay, thanks ! And another question, are the dependencies transitive ? If package A uses package B and package B have external dependencies, will I have this information in package A ? |
08:50:16 | PMunch | @Araq, @dom96, since NimLSP uses nimsuggest as a library I will sometimes get error reports like these: https://github.com/PMunch/nimlsp/issues/76, https://github.com/PMunch/nimlsp/issues/74. I believe these are caused by a bug in the compiler or nimsuggest. Where should I tell them to raise it? |
08:54:50 | FromDiscord | <haxscramper> In reply to @Clonkk "<FromDiscord "<haxscramper> In reply": I think it is transitive in a sense that you will get hints for all your dependencies - https://github.com/nim-lang/nimble#external-dependencies. But I don't know how to actually access this information inside nimble |
08:55:28 | Clonkk[m] | Thank you, that's what I needed to know |
09:00:08 | * | vegai1 quit (Quit: Idle for 30+ days) |
09:00:08 | * | retroedgetech[m] quit (Quit: Idle for 30+ days) |
09:05:58 | * | shmorgle quit (Ping timeout: 276 seconds) |
09:22:02 | * | krux02 joined #nim |
09:40:53 | FromDiscord | <KnorrFG> is there a way to fallthrough to the next of-section in a case statement: |
09:40:56 | FromDiscord | <KnorrFG> (edit) "statement:" => "statement?" |
09:41:35 | FromDiscord | <haxscramper> no |
09:41:59 | FromDiscord | <KnorrFG> too bad 😦 |
09:42:30 | FromDiscord | <haxscramper> You can always to `of expr1, expr2: if switch-expr == expr1:` |
09:42:55 | FromDiscord | <KnorrFG> ah, i didnt know that |
09:42:57 | FromDiscord | <KnorrFG> thx |
10:14:27 | * | Vladar joined #nim |
10:28:56 | * | l1x joined #nim |
11:05:55 | * | haxscram` joined #nim |
11:07:45 | * | haxscramper quit (Ping timeout: 256 seconds) |
11:08:02 | * | haxscram` left #nim (#nim) |
11:20:16 | * | Guest20418 quit (Quit: leaving) |
11:20:25 | * | WilhelmVonWeiner joined #nim |
11:20:52 | FromDiscord | <clyybber> @flywind Why does merge use a var result param? |
11:21:35 | FromDiscord | <clyybber> Ah, nevermind, I reread the convo |
11:35:01 | ozzz | Trying to understand how pass objects to threads, is it possible to pass pointer to threaded function? |
11:35:32 | FromDiscord | <Rika> which threads are we talking about, `threads`, `threadpool`, etc |
11:36:32 | ozzz | threads, I have proc called worker: void {.thread, nimcall.} |
11:37:17 | ozzz | inside of it I use FCGX_Accept_r from C lib fcgi, it requires pointer to struct |
11:40:37 | ozzz | I got segfaults at this moment, threads not work with global defined objects, I saw there is methods how to silent warnings, etc.. but in same time I wan't to make it relatively "Safe" |
11:56:49 | ozzz | Isee that such practice considered as unsafe... |
11:57:14 | ozzz | I need to dig in to {.gcsafe.} |
12:05:40 | PMunch | ozzz, welcome to the world of threading. Here be dragons |
12:06:48 | PMunch | Basically the default Nim GC doesn't work across threads. So if you simply sent a reference object (like a string or seq for example) to another thread the original thread wouldn't see that reference and could end up cleaning the reference, not good. |
12:07:27 | PMunch | That's why threads have to be gcsafe, this ensures that they don't use globals, and don't try to access memory from other threads. |
12:08:07 | PMunch | Pointers on the other hand is one way of passing data between threads, but you have to be sure that the underlying data isn't garbage collected while you're using it |
12:09:11 | PMunch | You can use the `channels` module to create data channels which you can use to pass data between threads safely. |
12:11:47 | PMunch | The new ARC/ORC garbage collection scheme will make this situation better. But very little documentation exists about those and threads at the moment, so it might be tricky to figure out what you can and cannot do. |
12:16:09 | ozzz | PMunch, yeah, I see it is completely different comparing to pthread lib in C |
12:16:34 | PMunch | Well, it's not that different |
12:16:52 | ozzz | looks more like fork() for me |
12:16:57 | PMunch | Threads in Nim are quite a slim wrapper around the underlying thread concept |
12:18:04 | PMunch | How so? |
12:18:20 | ozzz | well, I will do some experiments |
12:18:27 | PMunch | I mean if you look at `createThread` for example you can see that it just pretty much calls pthread: https://github.com/nim-lang/Nim/blob/version-1-4/lib/system/threads.nim#L307-L328 |
12:20:46 | ozzz | PMunch, yeah, I just make my conclusion based on analogy what comes on mind :) |
12:20:48 | FromDiscord | <mratsim> Nim threads are very much C threads |
12:20:59 | FromDiscord | <mratsim> same issues, same solutions |
12:21:34 | FromDiscord | <mratsim> the difficulties is when you involve ref objects/seq/strings and you use the default GC because the default GC is thread-local |
12:21:48 | ozzz | but with limitations, global objects are null's as I see inside of thread |
12:22:03 | FromDiscord | <mratsim> no global objects are global |
12:22:11 | FromDiscord | <mratsim> they are not null |
12:22:56 | ozzz | access to them not allowed |
12:22:58 | ozzz | SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
12:23:33 | FromDiscord | <mratsim> I can access them: https://github.com/mratsim/weave/blob/master/weave/contexts.nim#L28 |
12:23:50 | FromDiscord | <mratsim> it's more likely that your code is buggy |
12:24:11 | ozzz | I tried that {.threadvar.} |
12:24:27 | FromDiscord | <mratsim> threadvar is for thread-local objects |
12:24:40 | FromDiscord | <mratsim> my global context has no threadvar pragma, it's just global |
12:25:00 | ozzz | ah, so I misunderstand smth |
12:25:20 | ozzz | Thanks a lot guys |
12:27:16 | PMunch | Yeah {.threadvar.} basically makes a copy of that global variable per thread |
12:34:30 | * | Q-Master quit (Ping timeout: 246 seconds) |
12:35:45 | * | superbia joined #nim |
12:38:35 | ForumUpdaterBot | New thread by Modolo: Converter string to raw, see https://forum.nim-lang.org/t/7684 |
12:43:46 | PMunch | Hmm, the documentation for escape seems to be incorrect |
12:44:45 | krux02 | PMunch, what escape? |
12:45:14 | PMunch | strutils.escape |
12:45:45 | PMunch | https://play.nim-lang.org/#ix=2TQQ |
12:46:15 | krux02 | PMunch, yes, I've complained about that for years. |
12:46:16 | PMunch | It says to see `addEscapedChar` for the escaping scheme, but it doesn't actually follow that scheme: https://nim-lang.org/docs/strutils.html#escape%2Cstring%2Cstring%2Cstring |
12:47:28 | krux02 | What I complained about was, that it doesn't specify for what the escaping should be useful for. |
12:47:30 | krux02 | Shell? |
12:47:32 | krux02 | Bash? |
12:47:34 | krux02 | Fish? |
12:47:36 | krux02 | C code? |
12:47:42 | krux02 | javascript? |
12:48:00 | krux02 | it just does some randome escaping that might be useful for something, but isn't. |
12:48:08 | PMunch | Well it can be useful for anything. But it's not very useful when it's not clear what scheme it uses.. |
12:48:09 | superbia | how do you send data from one process (nim) to another process (lets say java) |
12:48:26 | PMunch | superbia, any kind of IPC |
12:48:33 | krux02 | superbia, normally I would try to use a pipe for that. |
12:48:46 | PMunch | Or a socket |
12:48:59 | superbia | socket was my first choice, but I want to explore other options |
12:49:03 | * | Q-Master joined #nim |
12:49:03 | krux02 | but I am not an expert in process to process communication here at all. |
12:49:18 | PMunch | Pipes work fine for certain stuff |
12:49:27 | PMunch | Haven't really tried to push them though |
12:49:30 | superbia | it has to work on Windows (TM) also |
12:52:34 | PMunch | Then sockets are probably your best bet |
12:52:48 | PMunch | What are you transfering? |
12:53:02 | PMunch | Simple control messages, or high volume streams of data? |
12:53:46 | * | Q-Master quit (Ping timeout: 256 seconds) |
12:54:13 | Zoom[m] | Hey all! Looking at new channels. Good stuff. Why does it err on `and not defined(nimdoc)` ? |
12:54:31 | FromDiscord | <zetashift> What is your error message? |
12:55:18 | Zoom[m] | I'm just looking at code. Line 86 |
12:56:38 | FromDiscord | <zetashift> It probably wants nimdoc to generate documentation? |
12:57:53 | Zoom[m] | But it errs with an unrelated message in this case. I was just a bit confused by this line |
12:58:01 | PMunch | Link? |
12:58:04 | * | Q-Master joined #nim |
12:58:22 | Zoom[m] | https://github.com/nim-lang/Nim/blob/c27cd83265558195316e0d3b6d13ccadcaecc728/lib/std/channels.nim#L86 |
12:59:30 | superbia | PMunch: tuple (x, y, timestamp) |
12:59:32 | PMunch | Ah, that's just to not throw an error when you're generating the documentation |
12:59:33 | superbia | at 60Hz |
12:59:36 | superbia | :) |
12:59:51 | PMunch | One way? |
13:00:02 | superbia | yeah |
13:00:04 | PMunch | Just a binary tuple over a socket should work fine for that |
13:00:12 | PMunch | Just remember that Java doesn't have unsigned integers :P |
13:00:47 | superbia | socket it is thanks boys |
13:00:53 | Zoom[m] | Ah, thanks PMunch |
13:04:53 | FromDiscord | <sealmove> Guys, `genSym` really confuses me. I use it in a proc, and it looks like the same symbol is produced every time I call the proc. Is this normal behavior? How can I generate a new symbol with every call? |
13:05:45 | PMunch | You use it in a proc? |
13:05:50 | FromDiscord | <sealmove> yes |
13:05:58 | PMunch | But genSym is compile-time |
13:06:40 | FromDiscord | <sealmove> oh, this is the insight i was missing lol |
13:06:46 | FromDiscord | <sealmove> makes sense now |
13:07:18 | FromDiscord | <sealmove> so the proc will always yield the same symbol |
13:08:54 | PMunch | Well, unless it is a compile-time procedure, yes |
13:09:06 | PMunch | I wasn't even aware you could use genSym in a normal procedure |
13:09:19 | * | Q-Master quit (Ping timeout: 265 seconds) |
13:15:23 | FromDiscord | <Rika> i dont see why not |
13:15:28 | FromDiscord | <Rika> its just kinda not very useful |
13:17:28 | FromDiscord | <sealmove> sent a code paste, see https://play.nim-lang.org/#ix=2TQZ |
13:18:31 | * | Q-Master joined #nim |
13:18:40 | ForumUpdaterBot | New thread by Devosalain2: Gtk gintro , list of class objects and functions, see https://forum.nim-lang.org/t/7685 |
13:28:41 | ForumUpdaterBot | New thread by Arnetheduck: Resolving incorrectly deduced `raises` violations, see https://forum.nim-lang.org/t/7686 |
13:37:02 | FromDiscord | <clyybber> @sealmove I think genSym might have a critical bug, it's probably better to create your symbols manually for now |
13:37:27 | FromDiscord | <sealmove> @clyybber thanks a lot |
13:40:44 | ForumUpdaterBot | New thread by Miran: 2nd Nim online meetup, see https://forum.nim-lang.org/t/7687 |
13:41:52 | krux02 | it is a pity that I don't have time on Friday. |
13:43:10 | PMunch | I'll try to not calculate my timezones backwards this time :P |
13:43:19 | Prestige | Haha |
13:43:30 | Prestige | glad there's another meet happening soon, hope I can make this one |
13:43:45 | PMunch | Aren't these in the middle of the night for you? |
13:43:56 | narimiran | PMunch: you were there last time at 3pm? :P |
13:43:57 | Prestige | I'm -5 so like 11am |
13:44:05 | PMunch | Ah okay |
13:44:16 | PMunch | narimiran, yes, and I had made plans for 5PM :P |
13:44:19 | Prestige | Will just have to slip away from work for a bit |
13:44:22 | narimiran | PMunch: :D |
13:45:19 | FromDiscord | <clyybber> @timotheecour Why does the CI for the latest commit on a PR run on your sourcehut account? |
13:47:37 | FromDiscord | <flywind> interesting, I thought timotheecour restarted my PR last week 😜 |
13:48:09 | FromDiscord | <clyybber> huh, it's not even last commit |
13:48:44 | FromDiscord | <clyybber> on this PR https://github.com/nim-lang/Nim/pull/17472 freebsd is ran on timothees account and openbsd on araqs |
13:49:08 | FromDiscord | <clyybber> but if you look at the first commit in that PR it's all ran on araqs |
13:49:36 | FromDiscord | <clyybber> and on this PR https://github.com/nim-lang/Nim/pull/17474 it's all on timothees account |
13:52:16 | FromDiscord | <clyybber> and on this one https://github.com/nim-lang/Nim/pull/17471 it's only openbsd-1 thats ran on timothees account and everything else on araqs, while for the commit before the last one of that PR it's all ran on timothees account |
13:52:21 | FromDiscord | <clyybber> is this random :D ? |
13:54:23 | FromDiscord | <flywind> maybe it can relieve resource restrictions. |
13:54:33 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/issues/17107 |
13:55:48 | FromDiscord | <clyybber> I hope we don't do this to circumvent resource restrictions |
13:58:32 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=2TR9 |
13:59:29 | FromDiscord | <haxscramper> `{thread, eula}` is a bitset, it cannot be cast to `int` directly |
13:59:52 | FromDiscord | <ajusa> I'm basing this off of https://nim-lang.org/docs/manual.html#set-type-bit-fields fwiw |
14:00:02 | Zoom[m] | @flywind nice article on the new Channel! Please, see my suggested change on GH |
14:00:15 | FromDiscord | <haxscramper> In reply to @ajusa "I'm basing this off": There where is ` {.size: sizeof(cint).} `? |
14:00:23 | FromDiscord | <haxscramper> in your code |
14:00:24 | FromDiscord | <flywind> In reply to @Zoom "<@658563905425244160> nice article on": Ok, thanks |
14:01:22 | FromDiscord | <ajusa> In reply to @haxscramper "in your code": good point. After adding it though I have the same issue |
14:01:44 | FromDiscord | <ajusa> maybe that cast doesn't work if I assign explicit values to the enum? |
14:03:04 | FromDiscord | <gokr> @flywind Hey, creator of Prologue, right? |
14:03:10 | FromDiscord | <flywind> yeah |
14:03:37 | FromDiscord | <gokr> So.... I am thinking of using it for a REST backend for a game me and a friend are making |
14:04:29 | FromDiscord | <gokr> I have been working in Dart for quite some time, but the backend frameworks there... I dunno, got burnt on one (Aqueduct not maintained anymore) and now hesitate on jumping onto another. |
14:05:22 | FromDiscord | <gokr> @flywind Btw, was that... odd bug resolved (httpbeast I think)? Jester seems to have a warning right now in the github repo |
14:05:37 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2TRf |
14:05:43 | FromDiscord | <flywind> In reply to @gokr "<@!658563905425244160> Btw, was that...": not yet |
14:06:05 | FromDiscord | <haxscramper> In reply to @haxscramper "Maybe. But my points": Or even `proc toNum[E: enum](f: set[E]): int = ` |
14:06:10 | FromDiscord | <gokr> @flywind I am also looking at Luckyframework (Crystal) but that would introduce a third language in the project and... feels silly. Have you looked at it any? |
14:07:18 | FromDiscord | <gokr> And while I am hammering you with questions (sorry), what's the plan around Prologue - is it used in a company or? |
14:09:24 | FromDiscord | <flywind> I'm a college student. I don't spare much time to maintain `Prologue` because I focus on contributing to Nim repo. I only update or refactor it before Nim feature release. |
14:10:01 | FromDiscord | <gokr> I just realized I joined the Prologue discord - can move questions there |
14:11:04 | FromDiscord | <flywind> yeah |
14:17:33 | * | vicfred joined #nim |
14:29:11 | * | shmorgle joined #nim |
14:31:02 | FromDiscord | <Rika> @ajusa the values of enums are the "amounts of shifts" when put into a set |
14:31:13 | FromDiscord | <Rika> a value of 1 on an enum will give 1 << 1 when put into a set |
14:31:37 | FromDiscord | <Rika> if you have a 1 and 2 in a set, you get 1<<1 | 1<<2 |
14:31:43 | FromDiscord | <Rika> well "ish" but not really |
14:31:53 | FromDiscord | <Rika> its a bit more nuanced than that, but the basic idea is there |
14:32:24 | FromDiscord | <Rika> (the nuance is that the first element of an enum, regardless of the value i think, will be shift 0) |
14:32:34 | FromDiscord | <Rika> ill test that |
14:33:23 | FromDiscord | <Rika> yeah |
14:34:00 | FromDiscord | <Rika> In reply to @Rika "a value of 1": ~~btw i mean 1 << 0, sorry xd~~ |
14:34:47 | FromDiscord | <ajusa> hm, okay. So each one of the "custom" values I specified is getting shifted to the left based on how low it is in the definition? Like 0x20 << 1? |
14:35:03 | FromDiscord | <Rika> no, its 1 << 0x20 |
14:35:06 | FromDiscord | <Rika> "ish" |
14:35:09 | FromDiscord | <ajusa> yeah, I see what you mean now |
14:35:15 | FromDiscord | <Rika> again, its not really like that |
14:35:23 | FromDiscord | <Rika> its not based on the value but the "index" of the enum |
14:35:42 | FromDiscord | <Rika> threed would be 1 << 0 and eula would be 1 << 1 |
14:36:05 | FromDiscord | <Rika> prolly shouldnt be like that but oh well... |
14:36:26 | FromDiscord | <Rika> add dummy values i guess? or just manually handle the bits |
14:37:52 | FromDiscord | <ajusa> yeah, so the exact use case is that there is a bitmask that skips a few values, so I need the later ones to also skip |
14:38:15 | FromDiscord | <ajusa> so for that I would change the value of something so that it gets shifted the number of spots to skip basically |
14:39:01 | FromDiscord | <Rika> oh oh oh |
14:39:01 | FromDiscord | <Rika> wait |
14:39:06 | FromDiscord | <Rika> i didnt realize |
14:39:31 | FromDiscord | <Rika> only the first element is enforced to be "1 << 0", if you set the other elements to another value, it will skip to that value |
14:40:13 | FromDiscord | <Rika> so you can put a dummy first value and have the expected output |
14:41:00 | FromDiscord | <ajusa> awesome, thanks! |
14:41:01 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2TRv |
14:44:34 | * | rockcavera joined #nim |
14:45:45 | * | rockcavera quit (Remote host closed the connection) |
14:46:34 | * | rockcavera joined #nim |
14:46:43 | FromDiscord | <Gary M> so I'm abusing templates and I'm trying to make an initializer "proc" but I'm getting "identifier expected, but found '100'" where 100 was the first argument |
14:47:05 | FromDiscord | <Gary M> despite the fact that just using a proc is the right way to do this, I'm curious what I'm doing wrong with the template |
14:47:20 | FromDiscord | <Gary M> `template vec3(x, y, z: float32)` |
14:47:39 | FromDiscord | <Rika> nothing looks wrong? whats the body |
14:47:52 | FromDiscord | <Gary M> `Vec3(v: InternalVec4(x: x, y: y, z: z, w: 0.0f))` |
14:47:55 | FromDiscord | <Rika> im guessing theres |
14:47:56 | FromDiscord | <Rika> yeah |
14:48:00 | FromDiscord | <Rika> x: x becomes 100: 100 |
14:48:01 | FromDiscord | <Rika> haha |
14:48:08 | FromDiscord | <Rika> use different names, maybe x1 or w/e |
14:48:14 | FromDiscord | <Gary M> ohhhhh fuck me |
14:51:26 | FromDiscord | <clyybber> you can just quote them |
14:51:40 | FromDiscord | <Gary M> what do you mean |
14:52:56 | FromDiscord | <Rika> You can??? |
14:53:22 | FromDiscord | <clyybber> heh, ok you can't :D |
14:53:23 | PMunch | Hmm, anyone knows how I can fix this error? Error: system module needs: nimErrorFlag |
14:53:26 | FromDiscord | <clyybber> I thought you could |
14:54:22 | PMunch | Ah never mind |
14:54:52 | FromDiscord | <Gary M> damn that's some stinky numbers here |
14:55:01 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823932853334966342/unknown.png |
14:55:11 | FromDiscord | <Gary M> 7.584 ms isn't that terrible? |
14:55:44 | FromDiscord | <clyybber> I think your Vec3 is bigger |
14:55:55 | FromDiscord | <Gary M> well, jokes on me anyways |
14:55:57 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823933091273506846/unknown.png |
14:56:03 | FromDiscord | <Gary M> I still managed to make it faster. |
14:56:08 | FromDiscord | <clyybber> heh |
14:56:19 | FromDiscord | <clyybber> how big is your Vec3? |
14:56:28 | FromDiscord | <Gary M> basically a Vec4. |
14:56:33 | FromDiscord | <Gary M> I'm hogging an entire m128 for it |
14:56:46 | FromDiscord | <Gary M> so it's 1 wasted float for padding |
14:56:51 | FromDiscord | <clyybber> ah, that's fine |
14:57:28 | FromDiscord | <Gary M> I want to get creative with Vec2's though |
14:57:53 | FromDiscord | <Gary M> because 2 wasted floats is more egregious |
14:59:26 | * | rockcavera quit (Ping timeout: 240 seconds) |
15:00:57 | ForumUpdaterBot | New thread by Jseb: Auto declaration of function prototype, see https://forum.nim-lang.org/t/7688 |
15:02:21 | * | rockcavera joined #nim |
15:06:33 | * | Q-Master quit (Ping timeout: 264 seconds) |
15:10:53 | PMunch | Hmm, damn it.. It seems like something has changed with how let is defined in the C output.. |
15:11:05 | PMunch | Which breaks the PROGMEM things I had for Arduinos.. |
15:11:17 | PMunch | Unless I was using a custom compiler version.. |
15:34:38 | PMunch | It now outputs const PROGMEM stuff, but with uninitialised data and a nimMemCopy to copy the data into it |
15:34:39 | * | FromDiscord quit (Read error: Connection reset by peer) |
15:34:57 | * | FromDiscord joined #nim |
15:35:03 | * | madnight quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:35:13 | * | madnight_ joined #nim |
15:35:30 | * | unclechu quit (Ping timeout: 265 seconds) |
15:35:41 | * | idxu quit (Quit: ZNC - https://znc.in) |
15:35:47 | * | watzon quit (Ping timeout: 246 seconds) |
15:35:48 | * | Avatarfighter[m] quit (Ping timeout: 246 seconds) |
15:35:58 | * | idxu joined #nim |
15:35:58 | * | Benjamin[m]2 quit (Ping timeout: 265 seconds) |
15:35:59 | * | j-james[m] quit (Ping timeout: 265 seconds) |
15:35:59 | * | antholop[m] quit (Ping timeout: 265 seconds) |
15:36:00 | * | reversem3 quit (Ping timeout: 246 seconds) |
15:36:02 | * | nxnl[m] quit (Ping timeout: 264 seconds) |
15:36:26 | * | leorize[m] quit (Ping timeout: 240 seconds) |
15:36:27 | * | Simon[m]4 quit (Ping timeout: 265 seconds) |
15:36:38 | * | stefantalpalaru quit (Ping timeout: 264 seconds) |
15:36:39 | * | Clonkk[m] quit (Ping timeout: 244 seconds) |
15:36:51 | * | GitterIntegratio quit (Ping timeout: 258 seconds) |
15:37:03 | PMunch | And that seems to trigger exception handling, which adds a bunch more code.. |
15:37:10 | * | lnxw37d4 quit (Ping timeout: 244 seconds) |
15:37:15 | * | stisa quit (Ping timeout: 240 seconds) |
15:37:21 | PMunch | Damn it, I should've written this stuff down.. |
15:37:24 | * | mahlon quit (Ping timeout: 246 seconds) |
15:37:35 | * | Stephen[m]2 quit (Ping timeout: 240 seconds) |
15:37:35 | * | fbpyr[m] quit (Ping timeout: 240 seconds) |
15:37:41 | * | sekao[m] quit (Ping timeout: 244 seconds) |
15:37:41 | * | Avahe[m] quit (Ping timeout: 244 seconds) |
15:37:41 | * | MTRNord quit (Ping timeout: 244 seconds) |
15:37:56 | * | ShalokShalom[m] quit (Ping timeout: 240 seconds) |
15:37:56 | * | k0mpjut0r quit (Ping timeout: 240 seconds) |
15:37:56 | * | jfondren[m] quit (Ping timeout: 240 seconds) |
15:37:59 | * | rwiser[m] quit (Ping timeout: 258 seconds) |
15:37:59 | * | drbixx[m] quit (Ping timeout: 258 seconds) |
15:37:59 | * | BitPuffin quit (Ping timeout: 258 seconds) |
15:38:08 | * | Zoom[m] quit (Ping timeout: 268 seconds) |
15:38:08 | * | ee7[m] quit (Ping timeout: 268 seconds) |
15:38:08 | * | liblq-dev quit (Ping timeout: 268 seconds) |
15:38:08 | * | Northstrider[m] quit (Ping timeout: 268 seconds) |
15:38:12 | * | i_use_arch_btw[m quit (Ping timeout: 244 seconds) |
15:38:14 | FromDiscord | <Gary M> is there an easy way to give a template 2 names without redefining it |
15:38:21 | * | Cthalupa quit (Ping timeout: 264 seconds) |
15:38:28 | FromDiscord | <clyybber> use a template lmao |
15:38:48 | FromDiscord | <Gary M> yeahhhh I know, just a lot of code repetition there |
15:39:02 | FromDiscord | <Gary M> the templated alias is 2 chars shorter |
15:39:05 | FromDiscord | <clyybber> no I mean use a template that defines your 2 templates |
15:39:23 | FromDiscord | <Gary M> 🤔 |
15:40:11 | FromDiscord | <clyybber> it would have two args; the names of the templates |
15:40:20 | * | mahlon joined #nim |
15:40:40 | FromDiscord | <Gary M> can you post an example |
15:40:45 | * | Q-Master joined #nim |
15:40:47 | * | Cthalupa joined #nim |
15:42:54 | FromDiscord | <clyybber> I was about to, but I realized it can't work, cause you need to pass in the params too |
15:43:04 | FromDiscord | <clyybber> you can use a macro of course |
15:45:53 | * | Q-Master quit (Ping timeout: 245 seconds) |
15:49:23 | FromDiscord | <clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2TRQ |
15:49:24 | FromDiscord | <clyybber> :D |
15:50:30 | FromDiscord | <clyybber> (edit) "https://play.nim-lang.org/#ix=2TRQ" => "https://play.nim-lang.org/#ix=2TRR" |
15:51:18 | FromDiscord | <clyybber> the hidden power of templates |
15:52:52 | * | watzon joined #nim |
15:55:34 | * | Northstrider[m] joined #nim |
15:59:12 | * | GitterIntegratio joined #nim |
16:00:12 | * | stefantalpalaru joined #nim |
16:00:32 | * | leorize[m] joined #nim |
16:01:17 | FromDiscord | <clyybber> @timotheecour, narimiran: Please see https://irclogs.nim-lang.org/23-03-2021.html#13:45:19 ; this is really becoming a problem I think https://github.com/nim-lang/Nim/issues/17479 |
16:02:27 | * | Clonkk[m] joined #nim |
16:03:45 | * | clyybber joined #nim |
16:04:13 | * | clyybber quit (Client Quit) |
16:04:18 | FromDiscord | <clyybber> @Araq ^ |
16:04:22 | * | unclechu joined #nim |
16:04:27 | * | lnxw37d4 joined #nim |
16:04:36 | FromDiscord | <clyybber> @Araq ^ (pinged the wrong araq it seems :D) |
16:04:48 | * | Avatarfighter[m] joined #nim |
16:04:51 | narimiran | @clyybber oooh, had no idea of the amount! |
16:05:36 | narimiran | and yeah, we could use sr.ht only for merged commits, not for PRs |
16:05:52 | FromDiscord | <clyybber> or maybe autocancel it for old commits |
16:06:13 | FromDiscord | <clyybber> narimiran: Do you know why some CI jobs for sourcehut are ran on timothees account? |
16:06:46 | * | jfondren[m] joined #nim |
16:07:29 | narimiran | @clyybber i've seen you mention it earlier, i had no prior knowledge of that. it might be his logic to circumvent the problem? (if so: i do not agree with doing it like that) |
16:07:56 | FromDiscord | <clyybber> yeah; if this is intentional circumvention this is very bad |
16:08:07 | * | j-james[m] joined #nim |
16:08:17 | * | reversem3 joined #nim |
16:09:06 | * | Benjamin[m]2 joined #nim |
16:09:13 | * | antholop[m] joined #nim |
16:10:43 | FromDiscord | <no name fits> Should I open an issue for the example code at <https://nim-lang.org/docs/asynchttpserver.html> not working? I was trying to learn async yesterday |
16:12:07 | * | Simon[m]4 joined #nim |
16:13:03 | * | MTRNord joined #nim |
16:13:10 | * | liblq-dev joined #nim |
16:13:30 | * | vicfred quit (Remote host closed the connection) |
16:13:43 | * | vicfred joined #nim |
16:15:57 | * | BitPuffin joined #nim |
16:16:12 | * | i_use_arch_btw[m joined #nim |
16:16:14 | * | sekao[m] joined #nim |
16:16:15 | * | Avahe[m] joined #nim |
16:16:39 | narimiran | "You have submitted 275 builds today alone" -- that means we also triggered ~830 github actions and ~550 azure pipelines |
16:16:50 | * | drbixx[m] joined #nim |
16:16:50 | * | rwiser[m] joined #nim |
16:17:05 | narimiran | here's the answer when somebody asks why our CIs are so slow.... |
16:17:25 | * | nxnl[m] joined #nim |
16:17:25 | FromDiscord | <no name fits> Are they considered slow? |
16:18:28 | narimiran | "why do i have to wait X hours for CIs to run for my PR?" |
16:18:33 | * | k0mpjut0r joined #nim |
16:19:25 | FromDiscord | <no name fits> I thought it was fine?↵PMunch: Did you guys figure out anything about the asynchttp after I went to bed? |
16:19:27 | FromDiscord | <clyybber> narimiran: Should we open a PR to check if it's disabled? |
16:19:48 | FromDiscord | <clyybber> Because you only disabled it for the ~araq account right? |
16:19:54 | narimiran | ouch! |
16:20:32 | narimiran | i disabled it in our settings-webhooks, but i guess that's just araq's account |
16:20:35 | FromDiscord | <Gary M> @clyybber how would you expand that to a 3rd alias 😄 |
16:20:43 | FromDiscord | <Gary M> really cool btw didn't know that's how you'd do it |
16:20:46 | FromDiscord | <clyybber> In reply to @Gary M "<@!107882072974065664> how would you": easy, one minute |
16:20:58 | FromDiscord | <clyybber> In reply to @Gary M "really cool btw didn't": nested templates are magic :D |
16:20:58 | * | ee7[m] joined #nim |
16:22:15 | FromDiscord | <clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2TS0 |
16:22:19 | * | ShalokShalom[m] joined #nim |
16:22:24 | * | Zoom[m] joined #nim |
16:23:04 | FromDiscord | <no name fits> Also remember to hydrate and take a break from the screen everyone 😎 |
16:24:01 | * | stisa joined #nim |
16:24:22 | * | Stephen[m]2 joined #nim |
16:25:43 | FromDiscord | <Gary M> cool |
16:25:47 | reversem3 | why so Zig is faster than nim? interesting |
16:25:57 | * | fbpyr[m] joined #nim |
16:25:59 | FromDiscord | <clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2TS1 |
16:26:08 | FromDiscord | <Gary M> yeah, but what about 5? |
16:26:11 | FromDiscord | <Gary M> I think I'd be stumped |
16:26:12 | FromDiscord | <clyybber> In reply to @reversem3 "why so Zig is": huh? We were talking about CI |
16:26:22 | FromDiscord | <clyybber> 😩 |
16:26:27 | reversem3 | <FromDiscord "<lbart> ">https://benhoyt.com/writ"> Why so nim is faster than C and C++ but slower than zig ? |
16:26:51 | FromDiscord | <no name fits> Page not found? |
16:26:56 | FromDiscord | <Gary M> man I am abusing the shit out of {.union.} and I'm loving it |
16:27:39 | * | jess quit (Quit: K-Lined) |
16:27:45 | narimiran | @clyybber i've made a PR: https://github.com/nim-lang/Nim/pull/17480 |
16:27:46 | reversem3 | <FromDiscord "<clyybber> In reply to @reversem"> sorry , my bad I forgot to actually reply to a prior discussion |
16:28:07 | FromDiscord | <clyybber> In reply to @reversem3 "<FromDiscord "<clyybber> In reply": ah, I see, the link you sent is cut off tho :D |
16:28:44 | reversem3 | https://benhoyt.com/writings/count-words/#other-languages |
16:28:45 | FromDiscord | <no name fits> Hmmm, so I would love to open an issue about the example at <https://nim-lang.org/docs/asynchttpserver.html> not working, but I have no idea how to phrase the issue correctly? I built with 1.4.4 and it just hangs the browser and my pc runs out of memory |
16:28:50 | FromDiscord | <clyybber> In reply to @narimiran "<@107882072974065664> i've made a": neat; seems to have worked; not sure what the reason for the account splitting was then |
16:29:00 | reversem3 | Hows that |
16:29:13 | FromDiscord | <clyybber> @no name fits Maybe try on devel |
16:30:43 | FromDiscord | <no name fits> Sorry for asking dumb questions, but how do I try on devel? |
16:31:36 | FromDiscord | <clyybber> In reply to @no name fits "Sorry for asking dumb": Are you on linux or windows? |
16:31:53 | FromDiscord | <clyybber> In reply to @reversem3 "https://benhoyt.com/writings/count-words/#other-lan": Interesting, thanks |
16:31:55 | FromDiscord | <no name fits> Windows 10 |
16:32:15 | FromDiscord | <no name fits> Some people yesterday also tried it and they had the same result. One sec |
16:32:41 | reversem3 | choosenim devel |
16:32:46 | reversem3 | choosenim update devel |
16:32:49 | reversem3 | choosenim show |
16:32:59 | FromDiscord | <no name fits> Around here https://discord.com/channels/371759389889003530/371759389889003532/823312322852159488 |
16:33:16 | FromDiscord | <no name fits> Alright I'll try |
16:34:30 | FromDiscord | <clyybber> Oh and if you do you should probably also use snippet from the devel docs: https://nim-lang.github.io/Nim/asynchttpserver |
16:35:19 | FromDiscord | <no name fits> Oh ok |
16:35:36 | FromDiscord | <no name fits> I'm also very afraid of doing anything wrong because I'm still new so |
16:35:41 | FromDiscord | <no name fits> Sorry if I'm awkward |
16:36:22 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823958355205685268/unknown.png |
16:36:29 | FromDiscord | <Gary M> hey finally something vmath is worse at than glm |
16:36:51 | FromDiscord | <Gary M> cough but nglm is still faster cough cough |
16:39:25 | FromDiscord | <clyybber> In reply to @no name fits "Sorry if I'm awkward": not at all |
16:39:41 | FromDiscord | <clyybber> don't worry :) |
16:39:54 | FromDiscord | <clyybber> In reply to @Gary M "*cough but nglm is": nice |
16:39:59 | FromDiscord | <clyybber> is it on github yet? |
16:40:02 | FromDiscord | <Gary M> nope |
16:40:07 | FromDiscord | <Gary M> very smol code so far |
16:40:16 | FromDiscord | <clyybber> smol code is gud |
16:40:20 | FromDiscord | <Gary M> also I'm going to try rewriting that to use simd set |
16:40:29 | FromDiscord | <Gary M> see how much faster it might be |
16:40:58 | FromDiscord | <clyybber> I thought you use SSE already? |
16:41:14 | FromDiscord | <Gary M> specifically for the vec3.xy |
16:41:20 | FromDiscord | <Gary M> since that returns a vec2 |
16:41:27 | FromDiscord | <Gary M> but I know what I need to do |
16:43:09 | FromDiscord | <Gary M> hahahaahaha fuuuuuck |
16:43:13 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823960078436270100/unknown.png |
16:43:33 | FromDiscord | <Gary M> no simd needed for that one |
16:43:56 | * | waleee-cl joined #nim |
16:43:59 | FromDiscord | <Gary M> swizzling the xy is as difficult as casting it to Vec2 and calling it a day |
16:44:29 | FromDiscord | <clyybber> hehe |
16:48:28 | FromDiscord | <Gary M> but yeah the majority of simd ops are just in the actual MADS stuff |
16:48:28 | FromDiscord | <clyybber> can't wait to replace glm with your lib :D |
16:48:28 | FromDiscord | <Gary M> lol |
16:48:29 | FromDiscord | <Gary M> it's going to need a lot of testing |
16:48:29 | FromDiscord | <clyybber> good, I have some tests |
16:49:40 | FromDiscord | <clyybber> @Gary M Are you implementing this from scratch or optimizing glm ? |
16:49:48 | FromDiscord | <Gary M> from scratch |
16:49:50 | FromDiscord | <clyybber> Neat |
16:50:03 | FromDiscord | <clyybber> will wait until you have quat then :D |
16:50:06 | FromDiscord | <Gary M> sent a code paste, see https://play.nim-lang.org/#ix=2TSf |
16:50:11 | FromDiscord | <Gary M> it's one types and three types 😄 |
16:50:18 | FromDiscord | <Gary M> one type even |
16:50:42 | FromDiscord | <clyybber> your pragma placement is cursed 😁 |
16:50:58 | FromDiscord | <Gary M> what you want an extra space in there? |
16:50:59 | FromDiscord | <Gary M> You people are hard to please |
16:51:15 | FromDiscord | <Gary M> sent a code paste, see https://play.nim-lang.org/#ix=2TSg |
16:53:19 | FromDiscord | <clyybber> better 😌 |
16:53:27 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2TSh |
16:53:28 | FromDiscord | <clyybber> lol |
16:53:54 | FromDiscord | <clyybber> a little known fact is that these are actually the 4 things you can choose from |
16:53:56 | FromDiscord | <clyybber> pick one |
16:53:58 | FromDiscord | <clyybber> loose all the others |
16:54:30 | FromDiscord | <no name fits> I already don't have a job or a life, and having a mortgage I usually hear referred to as bad, so I'll pick Nim I guess |
16:54:37 | FromDiscord | <clyybber> haha |
16:57:44 | FromDiscord | <Gary M> time for the next little test |
16:57:51 | FromDiscord | <Gary M> backwards yx swizzle |
17:00:33 | FromDiscord | <no name fits> @clyybber won't compile |
17:01:44 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2TSm |
17:02:40 | FromDiscord | <no name fits> sent a code paste, see https://play.nim-lang.org/#ix=2TSo |
17:02:49 | FromDiscord | <no name fits> Copy paste from the example at devel |
17:05:35 | FromDiscord | <Gary M> you might have to enable -d:ssl or something like that |
17:06:02 | FromDiscord | <clyybber> did you import asynchttpserver? |
17:06:05 | FromDiscord | <Gary M> also I'm not following the convo very well |
17:06:38 | FromDiscord | <Gary M> anyways, here's the yx swizzle |
17:06:40 | FromDiscord | <clyybber> In reply to @no name fits "Copy paste from the": have to add import asynchttpserver |
17:06:41 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823965984518832169/unknown.png |
17:07:05 | FromDiscord | <clyybber> In reply to @Gary M "": huh how? |
17:07:13 | FromDiscord | <no name fits> sent a code paste, see https://paste.rs/spB |
17:07:14 | ForumUpdaterBot | New thread by Cnerd: Search engine for free assets, see https://forum.nim-lang.org/t/7689 |
17:07:35 | FromDiscord | <Gary M> In reply to @Clyybber "huh how?": because all my vec2/vec3/vec4 are internally the same stride of floats |
17:08:16 | FromDiscord | <Gary M> so I just used a simd instruction to set the fields |
17:08:33 | FromDiscord | <Gary M> sent a code paste, see https://play.nim-lang.org/#ix=2TSr |
17:08:44 | FromDiscord | <no name fits> ok now it works |
17:09:03 | FromDiscord | <Gary M> is it wasteful to have 2 floats like that? Maybe. |
17:09:06 | FromDiscord | <no name fits> Also tried with the browser |
17:09:09 | FromDiscord | <Gary M> But it's fast as fuck boy |
17:11:57 | FromDiscord | <Gary M> basically it stands for "set reverse precision: single" |
17:12:58 | FromDiscord | <Gary M> doing mm_set_ps (not reversed) lays it backwards due to not caring about endianess |
17:13:07 | FromDiscord | <Gary M> but we have setr so 🤷 |
17:15:55 | FromDiscord | <no name fits> @clyybber So am I supposed to do something to help? The devel works with the extra import? Should I be learning on devel? |
17:16:47 | * | fredrikhr quit (Ping timeout: 265 seconds) |
17:22:59 | * | rockcavera quit (Remote host closed the connection) |
17:24:00 | FromDiscord | <Gary M> apparently I can't do Vec3 = Vec3 in vmath |
17:24:10 | FromDiscord | <Gary M> or even just Vec3 Vec3 |
17:26:09 | FromDiscord | <no name fits> Did you mean to take the dot product? |
17:27:21 | FromDiscord | <InventorMatt> there are 3 different possible multiplications that it could represent so it kind of makes sense |
17:27:32 | FromDiscord | <no name fits> Yeah I was wondering |
17:27:37 | FromDiscord | <Gary M> hm |
17:28:14 | FromDiscord | <no name fits> There's multiplication by a scalar, dot product and cross product |
17:28:26 | FromDiscord | <no name fits> If I'm not super mistaken |
17:28:59 | * | rockcavera joined #nim |
17:32:32 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823972493445300224/unknown.png |
17:32:45 | FromDiscord | <haxscramper> What is the closes alternative to a "function that returns a type"? I'm trying to figure out how to wrap C++ template metaprogramming, and the best approach I've come up with so far is something like `typeof(sizeType(StdString))` (for C++'s `std::string::size_type`) |
17:33:17 | ForumUpdaterBot | New thread by HJarausch: Nim doc generates code with invalid indentation, see https://forum.nim-lang.org/t/7690 |
17:33:19 | FromDiscord | <haxscramper> It probably is going to work, but I will just have to add trillion `typeof`s absolutely everywhere |
17:40:24 | PMunch | @no name fits, ah no I went on to do something else |
17:42:00 | * | Q-Master joined #nim |
17:43:48 | * | lritter quit (Ping timeout: 245 seconds) |
17:47:02 | * | Q-Master quit (Ping timeout: 260 seconds) |
17:47:16 | * | stefantalpalaru quit (Changing host) |
17:47:16 | * | stefantalpalaru joined #nim |
17:51:19 | ForumUpdaterBot | New thread by Devosalain2: Gtk gintro, hello world in object oriented way., see https://forum.nim-lang.org/t/7691 |
17:53:49 | * | Q-Master joined #nim |
18:02:59 | FromDiscord | <Gary M> https://media.discordapp.net/attachments/371759389889003532/823980153582387212/unknown.png |
18:03:05 | FromDiscord | <Gary M> anyways here's the last test before I sleep |
18:03:14 | FromDiscord | <Gary M> Vec3 float |
18:03:55 | * | vicfred quit (Quit: Leaving) |
18:09:52 | * | Vladar quit (Remote host closed the connection) |
18:13:22 | * | Vladar joined #nim |
18:14:11 | * | rockcavera quit (Remote host closed the connection) |
18:14:26 | * | Q-Master quit (Ping timeout: 240 seconds) |
18:16:37 | * | m4r35n357 joined #nim |
18:16:42 | * | m4r35n357_ joined #nim |
18:16:55 | * | m4r35n357 quit (Remote host closed the connection) |
18:16:55 | * | m4r35n357_ quit (Remote host closed the connection) |
18:17:12 | * | m4r35n357 joined #nim |
18:20:53 | * | rockcavera joined #nim |
18:33:26 | FromGitter | <timotheecour> @Clyybber @narimiran ⏎ ⏎ *<FromDiscord>* <clyybber> @timotheecour Why does the CI for the latest commit on a PR run on your sourcehut account? ⏎ ⏎ I don’t know, I had no interaction with https://github.com/nim-lang/Nim/pull/17472, it could be a bug on the sourcehut end or any other reason, but yes, we need to look into it. ... [https://gitter.im/nim-lang/Nim?at=605a3476c1e10242c5bb450f] |
18:33:31 | FromDiscord | <jtiai> I have bit hard time to get around nim docs. Like where I can find documentation that explains what `` means after function names and for example what `template` means instead of `proc`? |
18:35:15 | FromDiscord | <haxscramper> In reply to @jtiai "I have bit hard": https://nim-lang.org/docs/manual.html#procedures-export-marker |
18:35:27 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#templates |
18:35:44 | FromDiscord | <DavidKunz> `` means that it's a public function, with a `template` you can do meta programming: https://nim-lang.org/docs/tut2.html#:~:text=Templates%20are%20a%20simple%20substitution,call%20it%20like%20a%20procedure. |
18:36:08 | FromDiscord | <haxscramper> `template` is more of a code substitution, like C macro |
18:36:27 | FromDiscord | <haxscramper> You can do some metaprogramming, but it has quite limited set of features |
18:37:16 | FromDiscord | <haxscramper> `proc` is just regular procedure like in any other language |
18:39:09 | FromDiscord | <jtiai> "regular" procedure for me means something that you call and what doesn't return anything. Functions do... |
18:40:58 | FromDiscord | <haxscramper> Minor terminological difference. nim `proc` == "function" most mainstream programming languages (like `function` in js, `fn` in rust and so on) |
18:41:11 | FromDiscord | <haxscramper> `func` in nim is a procedure with no side effects |
18:41:22 | FromDiscord | <jtiai> I don't use js or rus... 🙂 |
18:43:05 | * | Q-Master joined #nim |
18:46:31 | FromDiscord | <jtiai> So if I understood correctly proc can return value by either using implicit `result` a `return` statment and if all that is missing it's implicitly last expression value... |
18:47:53 | FromDiscord | <haxscramper> Correct |
18:48:37 | FromDiscord | <haxscramper> So ``proc plus(a, b: int): int = a + b`` is the same as one with `result = a + b`, or `return a + b` |
18:58:40 | FromDiscord | <arnetheduck> "There should be three-- and preferably exactly three --obvious ways to do it." |
19:02:15 | FromDiscord | <jtiai> Not to mention that explicit is better than implicit... 😄 |
19:02:50 | FromDiscord | <jtiai> Is there code formatter tool for nim? |
19:04:25 | FromDiscord | <jtiai> And while I am it (feeling like 5 year old asking all stuff): does nim has classes or do modules work like ones? |
19:06:35 | FromDiscord | <DavidKunz> Yes, there is Nimpretty |
19:07:10 | FromDiscord | <DavidKunz> Usage: `nimpretty yourfile.nim` |
19:08:13 | FromDiscord | <arnetheduck> btw PMunch how is nim null-pointer-dereference-safe? |
19:09:54 | FromDiscord | <jtiai> Given that I had first contact with nim about 3 days ago I must admit that I somewhat like it. |
19:10:18 | FromDiscord | <DavidKunz> I'm also new to Nim, immediately fell in love. |
19:10:49 | FromDiscord | <jtiai> Given that last 12 years I've been writing almost solely Python code familiarity appeals. |
19:11:09 | FromDiscord | <DavidKunz> There are no classes (which is a good thing), you still can do OOP: https://nim-lang.org/docs/tut2.html |
19:16:52 | FromDiscord | <DavidKunz> What I like most about Nim is that it's very easy to read (compared to C[++] or Rust), you can concentrate on your business logic. |
19:17:29 | FromDiscord | <jtiai> Never really wrote rust and from my C[++] times are over 30 years ago... |
19:18:34 | FromDiscord | <jtiai> Though nothing beats BASIC from my first computer ever... 🙂 |
19:19:47 | * | Q-Master quit (Quit: Ушел) |
19:20:29 | FromDiscord | <hamidb80> In reply to @jtiai "Though nothing beats BASIC": try nim |
19:21:00 | FromDiscord | <haxscramper> In reply to @DavidKunz "There are no classes": To be more specific - we don't have constructors and multiple inheritance. everything else (single inheritance, methods, override) can be done in nim |
19:21:29 | FromDiscord | <haxscramper> We do have destructors, and constructors are usually just replaced with `newT` procs |
19:21:38 | FromDiscord | <DavidKunz> Nim kind of brings the fun back to programming. Even though I'm new to it (and haven't written anything meaningful yet), I catched myself looking into RFCs just to see where the language is heading, it really is exciting |
19:27:30 | FromDiscord | <jtiai> In reply to @hamidb80 "try nim": I'm trying all the time. It's just that no language can bring back that joy of finding programming that young me did. That moment passed and I'm very happy that it ever did. |
19:34:03 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2TT1 |
19:34:33 | FromDiscord | <haxscramper> Just any ideas, maybe it is something very stupid again, but I'm complete lost here |
19:34:57 | FromDiscord | <haxscramper> I also printed typed tree for `rebindOther` call separately, together with resolved identifiers etc |
19:35:34 | FromDiscord | <haxscramper> And `getTypeImpl` for symbole that `rebindOther` resolved to has nnkEmpty node kind in formal params return value |
19:37:01 | FromDiscord | <zidsal> I'm pretty lost on the code, but this isn't because its an ambigious type rather then a alck of type? |
19:38:00 | FromDiscord | <zidsal> nevermind I made var tmp a string and it still errors |
19:38:04 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2TT3 |
19:38:11 | FromDiscord | <zidsal> (edit) "nevermind I made var tmp a string ... and" added "which shouldn't be ambigious" |
19:38:28 | FromDiscord | <haxscramper> So this tree dump with `Sym 113:23` show that `rebindOther` was resolved to correct proc |
19:38:51 | FromDiscord | <haxscramper> But `Empty` in `FormalParams` show that for some unknown reason compiler decided the proc does not have a return type |
19:39:00 | FromDiscord | <haxscramper> Even though it almost certainly does |
19:39:13 | FromDiscord | <hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=2TT4 |
19:39:19 | * | Q-Master joined #nim |
19:39:40 | FromDiscord | <Solitude> sent a code paste, see https://play.nim-lang.org/#ix=2TT5 |
19:40:18 | FromDiscord | <hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=2TT6 |
19:40:26 | FromDiscord | <Solitude> In reply to @hamidb80 "type mismatch: got <int": a[] = 3 |
19:40:47 | FromDiscord | <hamidb80> In reply to @Solitude "a[] = 3": that's it, tnx |
19:40:52 | FromDiscord | <zidsal> @haxscramper clutching at straws with my limited nim knowledge and google foo, but what if you made npos and template that returns typed? or does that not do what i think it does |
19:41:02 | FromDiscord | <haxscramper> In reply to @haxscramper "But `Empty` in `FormalParams`": So main problem is it got resolved in a very weird way |
19:41:37 | FromDiscord | <haxscramper> In reply to @zidsal "<@!608382355454951435> clutching at straws": Yes, it could be done much simpler, but the problem is I think I need it exactly the way it is |
19:41:40 | FromDiscord | <haxscramper> For C++ interop |
19:41:52 | FromDiscord | <haxscramper> I'm trying to wrap C++ template metaprogramming |
19:42:07 | FromDiscord | <haxscramper> Or rather reimplement it in nim, to get all static type guarantees |
19:42:16 | FromDiscord | <haxscramper> Subtype relations and all this unholy mess |
19:42:28 | FromDiscord | <zidsal> ah, what about something like returning ` type[CharT, Traits, Alloc]` ? |
19:42:32 | FromDiscord | <haxscramper> And that's the best I've managed to come up with |
19:43:10 | FromDiscord | <jtiai> 5 year old me asks again: what does `0x00.uint8` mean and how it differs from `cast[uint8](0x00)` ? |
19:43:20 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2TT7 |
19:44:13 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2TT8 |
19:44:46 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2TT9 |
19:45:04 | FromDiscord | <haxscramper> (edit) "https://play.nim-lang.org/#ix=2TT9" => "https://play.nim-lang.org/#ix=2TTa" |
19:45:07 | FromDiscord | <zidsal> not going to lie, you've lost me 😛 althought I've never touched c++ before |
19:46:07 | FromDiscord | <haxscramper> Yes, I just explained what is going on, so maybe someone else can have an idea. But that is mostly a nim problem (type resolution), not `C++` |
19:46:36 | FromDiscord | <haxscramper> It doesn't really have anything to do with `C++` besides the logic behind this very weird code |
19:49:13 | FromDiscord | <haxscramper> But if this works (and my latter idea works too), I would be able to claim [almost] full compatibility with C++ template metaprogramming, and subsequently being able to handle horrors like boost/stdlib |
19:51:10 | FromDiscord | <Yardanico> In reply to @jtiai "5 year old me": safe conversion vs an unsafe cast |
19:51:44 | FromDiscord | <Yardanico> and for literals you don't need .uint8, you can just 0x00'u8 |
19:54:07 | FromDiscord | <jtiai> Oooo.. (looking some example codes which had those) |
19:55:05 | FromDiscord | <Yardanico> and also if you're doing it in an array/seq, you only need to specify the type of the first literal |
19:55:14 | FromDiscord | <Yardanico> like const mydata = [0x00'u8, 0x01, 0x02] |
19:57:16 | FromDiscord | <jtiai> I'm just writing an operating system... 🙂 |
19:57:38 | FromDiscord | <haxscramper> Here is a simplified code https://play.nim-lang.org/#ix=2TTf, it still has more indirection that probably necessary, but I cut out all C++-related parts |
20:03:58 | FromDiscord | <haxscramper> Oh, yeah, of course, silent error that breaks everything |
20:04:34 | FromDiscord | <haxscramper> Seems like `typedesc[SizeT]` field broke everything |
20:10:10 | * | SunDwarf joined #nim |
20:13:18 | FromDiscord | <Goel> I don't understand how to use this proc (terminal module of Nim)↵`proc setForegroundColor(f: File; color: Color) {...}`↵What do i need to use as `File`? I checked it to be more specified it says "File = ptr CFile. The type representing a file handle." That proc should just change the foreground color of the terminal when set |
20:13:45 | FromDiscord | <Yardanico> `stdout` |
20:13:46 | FromDiscord | <Yardanico> or stderr |
20:13:55 | FromDiscord | <Yardanico> or other files that you might want to write colored stuff into |
20:14:48 | FromDiscord | <Goel> Ah i see, i though i had to point at the Terminal itself, but i didn't understand exactly how to do it |
20:14:56 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2TTo |
20:15:16 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/824013448404009010/unknown.png |
20:15:39 | FromDiscord | <Yardanico> of course don't forget to also reset all attributes with stdout.resetAttributes() when you're done writing stuff |
20:16:09 | * | narimiran quit (Ping timeout: 264 seconds) |
20:17:50 | FromDiscord | <Goel> Does it work also if i write that parameter `stdout` inside the proc instead of `File`? Or your example is the only way to make it work? |
20:18:03 | FromDiscord | <Yardanico> wdym? |
20:18:32 | FromDiscord | <Goel> proc setForegroundColor(stdout, fgGreen) |
20:18:49 | FromDiscord | <Yardanico> you don't call procs with `proc` |
20:19:23 | FromDiscord | <Yardanico> `setForegroundColor(stdout, fgGreen)` will work, yes, because both `stdout.setForegroundColor(fgGreen)` and `setForegroundColor(stdout, fgGreen)` mean the exact same thing |
20:19:45 | FromDiscord | <Yardanico> https://nim-lang.org/docs/tut2.html#object-oriented-programming-method-call-syntax |
20:20:13 | * | cornfeedhobo quit (Quit: ZNC - https://znc.in) |
20:25:18 | FromDiscord | <zidsal> btw I've finally been able to work out https://forum.nim-lang.org/t/7669 After digging through the testament code it turns out you can pass a file param (which was documented in https://nim-lang.org/docs/testament.html) |
20:28:36 | FromDiscord | <Yardanico> the file param? or errormsG? |
20:28:38 | FromDiscord | <Yardanico> (edit) "errormsG?" => "errormsg?" |
20:30:50 | FromDiscord | <zidsal> the file param 😛 |
20:31:12 | FromDiscord | <zidsal> errormsg I found plenty of examples of, in the compiler |
20:36:19 | FromDiscord | <clyybber> In reply to @no name fits "<@!107882072974065664> So am I": devel is the next release so you can just wait for that or use devel :) |
20:37:03 | FromDiscord | <clyybber> In reply to @timotheecour "<@107882072974065664> @narimiran ⏎": ah ok, thanks |
21:41:18 | * | superbia quit (Quit: WeeChat 3.1) |
21:41:51 | * | Gustavo6046 quit (Ping timeout: 265 seconds) |
21:42:53 | * | Gustavo6046 joined #nim |
21:43:52 | ForumUpdaterBot | New thread by Lotib48819: I am confused. Javascript, WASM coroutine support ?, see https://forum.nim-lang.org/t/7692 |
21:53:29 | ozzz | PMunch, mratsim, and all other, thanks a lot! |
21:53:37 | ozzz | I made it work |
21:54:21 | ozzz | here is example, on my home's rpi(lighttp) + app server on laptop (nim_libFCGI) |
21:54:23 | ozzz | http://46.49.41.80/ace/ |
21:54:32 | ozzz | here is example ^ |
21:55:14 | ozzz | 20 threads currently for testing |
22:01:54 | ForumUpdaterBot | New thread by Lotib48819: GlobalThis is not defined although node version is v14.4.0, see https://forum.nim-lang.org/t/7693 |
22:11:21 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:16:17 | * | Gustavo6046 joined #nim |
22:16:43 | FromDiscord | <jfmonty2> Trying to come up with a generic description of a type that behaves like a seq except that has a fixed maximum size |
22:16:52 | FromDiscord | <jfmonty2> but it seems to crash the compiler |
22:16:52 | FromDiscord | <jfmonty2> sent a code paste, see https://play.nim-lang.org/#ix=2TTV |
22:17:59 | FromDiscord | <ElegantBeef> `I: static int` |
22:19:45 | FromDiscord | <jfmonty2> sent a code paste, see https://play.nim-lang.org/#ix=2TTX |
22:19:51 | FromDiscord | <ElegantBeef> Well yea you're giving a slice for a static int |
22:19:54 | FromDiscord | <Gary M> Hello |
22:19:55 | FromDiscord | <ElegantBeef> It should just be an int of `5` |
22:20:03 | FromDiscord | <jfmonty2> ohh, ok |
22:20:31 | FromDiscord | <jfmonty2> Gotcha, thanks |
22:20:38 | FromDiscord | <Gary M> You seen my Vector3 implementation benchmarks Beef? |
22:20:42 | FromDiscord | <ElegantBeef> I did |
22:20:53 | FromDiscord | <Gary M> It's a fast-boy |
22:29:46 | FromGitter | <ynfle> Is there a Date type other than DateTime? |
22:44:37 | FromGitter | <ynfle> @haxscramper did you solve your no type issue? |
22:45:40 | FromGitter | <ynfle> You are basically using recursion on a proc that has `auto` as a return type and no base case so the type can't be determined |
22:46:46 | FromDiscord | <Solitude> it wasnt recursive |
22:47:04 | FromGitter | <ynfle> It looks like it is |
22:47:05 | FromGitter | <ynfle> Why not? |
22:47:17 | FromDiscord | <Solitude> its just overloaded |
22:50:02 | FromGitter | <ynfle> But it doesn't call the the over "version" of the proc? |
22:58:04 | * | Vladar quit (Quit: Leaving) |
23:07:18 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
23:14:18 | * | Gustavo6046 joined #nim |
23:16:19 | FromDiscord | <jfmonty2> Is there an easier way to declare a generic "any integer type" other than `T: int|uint|int8|uint8|int16|uint16|int32|uint32|int64|uint64` ? |
23:17:49 | FromDiscord | <ElegantBeef> `SomeInteger` |
23:18:34 | FromGitter | <ynfle> SomeInteger is already declared, but you can use a type section like ⏎ ⏎ ```type ⏎ MyCollectionOfInts = int | unit | unit8 | int16``` [https://gitter.im/nim-lang/Nim?at=605a774a3a9448256c26729f] |
23:18:52 | FromDiscord | <ElegantBeef> Yea you can make your own typeclass |
23:19:07 | FromDiscord | <jfmonty2> Right, of course, I just figured it was pretty likely there was one already floating around |
23:19:38 | FromDiscord | <jfmonty2> Is there a list of pre-defined union types like that floating around anywhere? Or do I just have to look in the `system` module documentation? |
23:20:10 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/system.html#SomeOrdinal |
23:20:17 | FromDiscord | <ElegantBeef> They're all around there |
23:20:38 | FromDiscord | <jfmonty2> Cool, thanks. |
23:21:55 | PMunch | @arnetheduck, that was a mistake on my part. I really should update that.. |
23:22:19 | PMunch | ozzz, oh nice! Good to hear you made it work |
23:22:20 | * | fredrikhr joined #nim |
23:31:48 | * | zedeus quit (Ping timeout: 246 seconds) |
23:50:45 | * | PMunch quit (Quit: leaving) |
23:58:20 | FromDiscord | <ajusa> might be a bit of a weird question, but was there a nim package that would output to markdown basically? Like you could write nim code and have it be embedded/ran and export to markdown or HTML. I swear I saw a package that did this, maybe for someone's blog? |
23:58:46 | FromDiscord | <ajusa> (edit) "might be a bit of a weird question, but was there a nim package that would output ... to" added "code" |