00:00:12 | * | tk quit (Quit: Well, this is unexpected.) |
00:00:37 | * | tk joined #nim |
00:09:04 | * | flynn quit (Ping timeout: 246 seconds) |
00:09:45 | FromDiscord | <huantian> I'd personally just not convert it in get |
00:09:51 | FromDiscord | <huantian> and manually write to myself |
00:09:59 | FromDiscord | <huantian> (edit) "to myself" => "`to` myself, just as explicit" |
00:10:02 | FromDiscord | <huantian> (edit) "explicit" => "explicit, if not more" |
00:10:30 | FromDiscord | <Elegantbeef> You mean pass `var T` into it? |
00:10:31 | * | flynn joined #nim |
00:10:52 | * | vicfred quit (Quit: Leaving) |
00:11:26 | FromDiscord | <huantian> no just do `c.get(url).await.to(T)` each time |
00:11:41 | FromDiscord | <Elegantbeef> Ah |
00:12:24 | FromDiscord | <Elegantbeef> Also wait a minute try you're using http requests for IPC |
00:12:34 | FromDiscord | <Elegantbeef> Jesus that's gotta be overlkill and a half |
00:13:20 | FromDiscord | <huantian> ipc = intra program communication? |
00:13:39 | FromDiscord | <Elegantbeef> inter |
00:13:49 | FromDiscord | <huantian> mk |
00:13:53 | FromDiscord | <Elegantbeef> intra is internal, inter is external |
00:14:31 | FromDiscord | <Rika> In reply to @Elegantbeef "Also wait a minute": Lol |
00:14:38 | FromDiscord | <Elegantbeef> Yes it's funny internal starts with inter |
00:15:36 | FromDiscord | <Elegantbeef> I've never seen anyone use http for IPC so this is super odd |
00:16:08 | FromDiscord | <huantian> just used named pipes ez |
00:16:40 | FromDiscord | <huantian> what is normally used for ipc? |
00:16:59 | FromDiscord | <Elegantbeef> Sockets, memfiles, stdin/stdou |
00:19:58 | FromDiscord | <Elegantbeef> Then they use either like json, protobuf or similar for parsing commands and the like |
00:19:58 | FromDiscord | <Elegantbeef> Or their own internal format |
00:22:34 | * | flynn quit (Read error: Connection reset by peer) |
00:23:46 | * | flynn joined #nim |
00:37:03 | * | flynn quit (Read error: Connection reset by peer) |
00:38:15 | * | flynn joined #nim |
00:43:21 | FromDiscord | <Infinidoge> Out of curiosity, is it possible/are there any libraries to format disks with Nim, outside of just shelling out to something like parted? |
00:43:38 | FromDiscord | <Elegantbeef> It's possible |
00:44:38 | FromDiscord | <Elegantbeef> You'll probably end up using system calls to do it so only half true |
00:44:44 | FromDiscord | <Infinidoge> Ah |
00:44:45 | FromDiscord | <Infinidoge> Hmm |
00:44:52 | FromDiscord | <Infinidoge> Probably easiest to shell out then, I suppose |
00:53:43 | * | flynn quit (Ping timeout: 256 seconds) |
00:58:16 | * | flynn joined #nim |
01:02:40 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
01:04:48 | * | vicfred joined #nim |
01:05:27 | * | Lord_Nightmare joined #nim |
01:09:36 | FromDiscord | <!Patitotective> hey leorize ~~beef~~↵now i need to download hundreds of images and i need to use async, right? cause creating hundreds of threads is not great (?) |
01:09:54 | FromDiscord | <Yardanico> async is better for that, yes, since it's about IO |
01:09:58 | FromDiscord | <Elegantbeef> Like we said yesterday you should be using async for it presently |
01:10:10 | FromDiscord | <Yardanico> using threads is possible, but it'll have much more overhead and be harder to use |
01:10:19 | NimEventer | New Nimble package! metatag - A metadata reading & writing library, see https://github.com/sauerbread/metatag |
01:10:25 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Like we said yesterday": do you mean for fetching json stuff? |
01:10:34 | FromDiscord | <leorize> run async on your IO thread, basically |
01:10:50 | * | flynn quit (Read error: Connection reset by peer) |
01:12:01 | * | flynn joined #nim |
01:12:59 | FromDiscord | <!Patitotective> so i create only one thread (apart from the ui one) in which i download the images asynchronously sending them through channels to the ui thread? 🤔 |
01:13:19 | FromDiscord | <leorize> yep |
01:13:26 | FromDiscord | <!Patitotective> 🙃 |
01:13:28 | FromDiscord | <!Patitotective> thanks |
01:14:48 | * | vicecea quit (Remote host closed the connection) |
01:15:14 | FromDiscord | <!Patitotective> also, where should i save those images? is there some _cache_? |
01:15:18 | * | vicecea joined #nim |
01:16:58 | FromDiscord | <!Patitotective> cause when my app is built as an appimage saving them next to it would be not good hehe |
01:23:24 | * | flynn quit (Read error: Connection reset by peer) |
01:24:35 | * | flynn joined #nim |
01:27:30 | * | lumo_e quit (Ping timeout: 250 seconds) |
01:28:22 | * | lumo_e joined #nim |
01:31:13 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vp6 |
01:31:48 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Vp8" => "https://play.nim-lang.org/#ix=3Vp7" |
01:39:01 | * | flynn quit (Read error: Connection reset by peer) |
01:39:43 | FromDiscord | <huantian> https://github.com/huantianad/rd-downloader/blob/24d8f811778cf637a1ab12db261ff5d03d57d670/src/rd_downloader.nim#L63-L113↵this is what I did for concurrent downloads, not exactly what you want to do but the general idea remains |
01:40:06 | FromDiscord | <huantian> though actually it's a lot simplier if you wanna just download all you images at the same time |
01:40:12 | * | flynn joined #nim |
01:40:26 | FromDiscord | <huantian> in that case you can use all: https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D |
01:42:03 | FromDiscord | <huantian> actually I have no idea what I'm saying |
01:44:28 | FromDiscord | <huantian> ok so |
01:45:42 | FromDiscord | <!Patitotective> In reply to @huantian "https://github.com/huantianad/rd-downloader/blob/24": what you are doing here is creating 8 threads? |
01:47:21 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vpa |
01:47:48 | FromDiscord | <huantian> In reply to @Patitotective "what you are doing": well not actual "threads", but 8 concurrent downloads↵but thinking about it, you probably ahve a different usecase so the linked code is probably not too helpful |
01:48:28 | FromDiscord | <!Patitotective> In reply to @huantian "if you have a": oh, clients can only download one file? |
01:48:40 | FromDiscord | <!Patitotective> (edit) "file?" => "file at once?" |
01:48:45 | FromDiscord | <!Patitotective> (edit) "once?" => "the same itme?" |
01:48:47 | FromDiscord | <!Patitotective> (edit) "itme?" => "time?" |
01:49:02 | FromDiscord | <huantian> yeah |
01:49:12 | FromDiscord | <huantian> you'll want a different client for each download you're doing at a time |
01:49:18 | FromDiscord | <!Patitotective> ok, thanks, let me try to implement _your_ code |
01:49:44 | FromDiscord | <huantian> another thing you could probably do is use callbacks, so at the end of each callback, you can send something through the channel |
01:49:53 | FromDiscord | <huantian> (edit) "end" => "completion" | "callback," => "download," |
01:51:31 | FromDiscord | <!Patitotective> like `cliend.downloadFile(...).addCallback`? |
01:53:06 | * | flynn quit (Read error: Connection reset by peer) |
01:54:17 | * | flynn joined #nim |
02:00:59 | * | jkl quit (Quit: Gone.) |
02:02:21 | * | jkl joined #nim |
02:02:37 | * | flynn quit (Read error: Connection reset by peer) |
02:03:47 | * | flynn joined #nim |
02:05:12 | * | lumo_e quit (Ping timeout: 250 seconds) |
02:05:38 | FromDiscord | <huantian> yeah |
02:06:04 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vpe |
02:09:12 | FromDiscord | <Yardanico> you also don't need to forget to close `client` after downloading the file |
02:09:16 | FromDiscord | <Yardanico> otherwise you'll leak FDs |
02:11:23 | FromDiscord | <huantian> sent a code paste, see https://paste.rs/Vo7 |
02:11:29 | * | flynn quit (Read error: Connection reset by peer) |
02:11:45 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=3Vpf" => "https://paste.rs/FgF" |
02:12:39 | * | flynn joined #nim |
02:12:55 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vpg |
02:13:07 | FromDiscord | <huantian> (edit) "https://paste.rs/3YI" => "https://paste.rs/Xnk" |
02:13:14 | FromDiscord | <huantian> (edit) "https://paste.rs/qXm" => "https://play.nim-lang.org/#ix=3Vph" |
02:15:23 | FromDiscord | <huantian> maybe cus I deleted dataType accedientaly |
02:15:27 | FromDiscord | <huantian> wow I can't type |
02:16:00 | FromDiscord | <!Patitotective> In reply to @huantian "maybe cus I deleted": i corrected that lol↵still the same error |
02:16:17 | FromDiscord | <!Patitotective> In reply to @huantian "wow I can't type": ~~i cant spell donwload correctly~~ |
02:17:50 | FromDiscord | <huantian> that's weird?? |
02:20:29 | FromDiscord | <huantian> I don't do threads much so I have no idea |
02:21:02 | FromDiscord | <!Patitotective> 😕 |
02:21:05 | FromDiscord | <Elegantbeef> `Thread[datatype]` is invalid |
02:21:27 | FromDiscord | <Elegantbeef> Actually it might not be but you're better to do `(ptr data, len)` |
02:21:44 | * | flynn quit (Read error: Connection reset by peer) |
02:22:42 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "`Thread[datatype]` is invalid": why? does it need to be an array or? |
02:22:55 | * | flynn joined #nim |
02:22:55 | FromDiscord | <Elegantbeef> I need to check if it's safe |
02:23:04 | FromDiscord | <Elegantbeef> I think it might be, but could be wrong |
02:25:58 | FromDiscord | <Elegantbeef> Yea the issue is openarray |
02:27:55 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vpi |
02:28:36 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=3Vpi" => "https://paste.rs/Ema" |
02:29:16 | FromDiscord | <Elegantbeef> Shows you how to do it |
02:29:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vpj |
02:30:51 | FromDiscord | <huantian> Btw for where to download the files, you might wanna look at getCacheDir and maybe std/tempfiles |
02:31:57 | FromDiscord | <!Patitotective> In reply to @huantian "Btw for where to": :OOOOOOOOOO exactly what i needed, thanks |
02:33:21 | * | flynn quit (Read error: Connection reset by peer) |
02:34:31 | * | flynn joined #nim |
02:36:43 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/nRB |
02:44:11 | FromDiscord | <huantian> hmmm |
02:44:11 | FromDiscord | <huantian> it's just not printing the messages for me what |
02:44:44 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vpl |
02:45:22 | * | flynn quit (Read error: Connection reset by peer) |
02:46:18 | FromDiscord | <huantian> oh it's cus recv is blocking |
02:46:34 | * | flynn joined #nim |
02:46:53 | FromDiscord | <!Patitotective> yea but it should block until `toDown` sends something, shouldn't it? |
02:49:21 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vpm |
02:54:37 | FromDiscord | <huantian> Actually might be right forgot waitForDoenloadss wasn’t a sync |
02:54:44 | FromDiscord | <huantian> (edit) "a sync" => "async" |
02:57:35 | FromDiscord | <!Patitotective> actually its not downloading anything |
02:57:42 | FromDiscord | <!Patitotective> if you pass an invalid url, it will return true |
02:57:47 | FromDiscord | <!Patitotective> (edit) "if you pass an invalid url, it will return true ... " added "as well" |
02:57:49 | * | flynn quit (Read error: Connection reset by peer) |
02:58:18 | FromDiscord | <huantian> I thought it was cus recv doesn’t pass execution to the event loop |
02:58:25 | FromDiscord | <huantian> Not sure |
02:59:01 | * | flynn joined #nim |
03:02:55 | FromDiscord | <huantian> The future might be failing causing it to run the callback |
03:07:03 | * | flynn quit (Read error: Connection reset by peer) |
03:07:06 | FromDiscord | <!Patitotective> to get the future error message we would need to store it somewhere right? :confsu |
03:07:11 | FromDiscord | <!Patitotective> (edit) ":confsu" => "😕" |
03:08:02 | * | zeus-supreme quit (Ping timeout: 250 seconds) |
03:08:13 | * | flynn joined #nim |
03:13:41 | FromDiscord | <huantian> sent a code paste, see https://paste.rs/STe |
03:15:03 | FromDiscord | <!Patitotective> oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh |
03:15:12 | FromDiscord | <!Patitotective> we are not compiling with `-d:ssl` |
03:15:14 | FromDiscord | <Yardanico> oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh? |
03:15:23 | FromDiscord | <Yardanico> In reply to @Patitotective "we are not compiling": wait are you not checking for errors |
03:15:23 | FromDiscord | <!Patitotective> In reply to @Yardanico "ooooooooooooooooooooooooooooooooooooooooooooooooooo": yes oooooooooooooooooooooooooooooooooooh |
03:15:28 | FromDiscord | <Yardanico> ah right you just set the callback |
03:15:35 | FromDiscord | <Yardanico> you must also check for exceptions |
03:15:37 | FromDiscord | <Yardanico> yourself |
03:15:43 | FromDiscord | <Yardanico> if you use`callback` |
03:16:11 | FromDiscord | <huantian> i mean you should but downloadFile should handle that↵but yeah you probably should anywyas |
03:16:23 | FromDiscord | <huantian> the base issue is still that Channel.recv() is, asyncwise, blocking |
03:16:26 | FromDiscord | <Yardanico> @huantian no it's not about downloadFile |
03:16:31 | FromDiscord | <huantian> (edit) "anywyas" => "anyways" |
03:16:35 | FromDiscord | <Yardanico> it's about the fact that async exceptions are hidden in future error field |
03:16:41 | FromDiscord | <Yardanico> so if you don't check that and don't raise, you'll never know about them |
03:17:17 | FromDiscord | <Yardanico> need to use https://nim-lang.org/docs/asyncfutures.html#failed,FutureBase in callback |
03:17:37 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/4Ii |
03:18:22 | FromDiscord | <huantian> yeah i see what you mean |
03:19:35 | FromDiscord | <!Patitotective> did you mean `getStackTrace`? cause `Error: undeclared identifier: 'injectStacktrace'` |
03:19:46 | * | flynn quit (Read error: Connection reset by peer) |
03:19:55 | FromDiscord | <Yardanico> that's because injectStacktrace is an internal asyncfutures proc |
03:20:11 | FromDiscord | <Yardanico> you can just use getStackTrace but your stack trace will be different from the usual async one |
03:20:37 | FromDiscord | <!Patitotective> but how do i use injectStacktrace? |
03:20:57 | * | flynn joined #nim |
03:21:25 | FromDiscord | <Yardanico> just use something like `fut.read()`, it'll raise if future has an error |
03:21:59 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Vpt |
03:22:29 | FromDiscord | <!Patitotective> three let statements? 🤮 |
03:22:37 | FromDiscord | <Yardanico> ?? |
03:22:46 | FromDiscord | <Yardanico> ah yeah you can group them, but I don't do that usually |
03:22:53 | FromDiscord | <!Patitotective> but i can do `fut.asyncCheck()` as well, right? |
03:23:02 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vpu |
03:23:10 | FromDiscord | <Yardanico> In reply to @Patitotective "but i can do": true |
03:23:32 | FromDiscord | <Yardanico> but the problem is, asyncCheck sets the callback for the future |
03:23:33 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/B9k |
03:23:52 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/Fbl |
03:23:57 | FromDiscord | <Yardanico> ehh i mean in the callback future is already done |
03:23:59 | FromDiscord | <huantian> (edit) "https://play.nim-lang.org/#ix=3Vpw" => "https://play.nim-lang.org/#ix=3Vpv" |
03:24:04 | FromDiscord | <Yardanico> no need for asyncCheck which sets another callback for the future |
03:24:36 | FromDiscord | <!Patitotective> but i can but `fut.asyncCheck` before adding the callback, right? |
03:24:40 | FromDiscord | <!Patitotective> (edit) removed "but" |
03:24:56 | FromDiscord | <Yardanico> but then you won't be able to _catch_ that exception |
03:24:57 | FromDiscord | <huantian> yeah you should be able to |
03:25:00 | FromDiscord | <huantian> yeah |
03:25:02 | FromDiscord | <Yardanico> and I assume you want to |
03:25:03 | FromDiscord | <!Patitotective> lmao |
03:25:28 | FromDiscord | <!Patitotective> In reply to @Yardanico "but then you won't": i wont need to cause asyncCheck would raise it (?) |
03:25:38 | FromDiscord | <Yardanico> yes, but then your whole program will shut down |
03:25:47 | * | nsyd joined #nim |
03:26:01 | FromDiscord | <!Patitotective> does this count no connection exceoption? |
03:26:04 | FromDiscord | <!Patitotective> (edit) "exceoption?" => "exception?" |
03:26:05 | FromDiscord | <Yardanico> yes of course |
03:26:08 | FromDiscord | <!Patitotective> :[ |
03:26:09 | FromDiscord | <Yardanico> and i don't think you want your application crashing just because it couldn't download an image for some app |
03:26:42 | FromDiscord | <!Patitotective> In reply to @Yardanico "and i don't think": some app? i need exactly 1312 (or more) images |
03:30:06 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vpx |
03:30:16 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vpy |
03:30:53 | FromDiscord | <!Patitotective> cause im receiving one file (never finishes) and nothing else happens :confsu |
03:30:58 | FromDiscord | <!Patitotective> (edit) ":confsu" => "😕" |
03:31:34 | * | arkurious quit (Quit: Leaving) |
03:32:58 | FromDiscord | <!Patitotective> In reply to @huantian "maybe use a result?": even more elegant 🧐: create a `NoException` exception so it can be `tuple[error: Exception, path: string]` |
03:33:00 | * | flynn quit (Read error: Connection reset by peer) |
03:33:21 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vpz |
03:34:10 | * | flynn joined #nim |
03:36:23 | FromDiscord | <huantian> now it gives bad file descriptor what |
03:36:50 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VpA |
03:36:53 | FromDiscord | <!Patitotective> (edit) |
03:37:25 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3VpA" => "https://play.nim-lang.org/#ix=3VpB" |
03:37:49 | FromDiscord | <huantian> hm that error seems to be from the client.close()??? |
03:38:14 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VpC |
03:38:29 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3VpC" => "https://play.nim-lang.org/#ix=3VpD" |
03:39:51 | * | flynn quit (Read error: Connection reset by peer) |
03:40:03 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=3VpE |
03:40:16 | FromDiscord | <!Patitotective> why are you not closing the client? |
03:40:25 | FromDiscord | <huantian> because that gives an error for soem reason |
03:40:59 | FromDiscord | <huantian> might be a weird it using a previous variable thingy whatever you call it |
03:41:02 | * | flynn joined #nim |
03:41:59 | FromDiscord | <huantian> closure that's the word |
03:42:01 | FromDiscord | <huantian> yeah I messed that up |
03:42:55 | FromDiscord | <huantian> cus that closes the same client multiple times |
03:43:22 | FromDiscord | <!Patitotective> maybe keep a stack with the clients? |
03:43:58 | FromDiscord | <!Patitotective> no, it wouldnt work, cause one client can start first and finish first so it would break the stack |
03:46:54 | FromDiscord | <Yardanico> i don't think it's due to client.close |
03:46:59 | FromDiscord | <Yardanico> it fails with that error even without it |
03:47:08 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/5q5 |
03:47:14 | FromDiscord | <huantian> what's the way to capture the current client and path into the callback? |
03:47:25 | FromDiscord | <Yardanico> they are captured already, it's working correctly |
03:47:30 | FromDiscord | <Yardanico> probably |
03:47:35 | FromDiscord | <Yardanico> if not we can try closureScope |
03:47:56 | FromDiscord | <!Patitotective> In reply to @Patitotective "yea, it breaks because": (if you swap them so `feed.json` starts first it works) |
03:48:11 | FromDiscord | <Yardanico> seems to work |
03:48:20 | FromDiscord | <Yardanico> sent a code paste, see https://paste.rs/k58 |
03:48:52 | FromDiscord | <Yardanico> fun fact - `closureScope` literally just creates an empty proc and calls it immediately afterwards, but it captures the needed variables that way |
03:49:10 | FromDiscord | <huantian> yep closure scope works for me |
03:49:14 | FromDiscord | <Yardanico> and yeah, not sure about sending `ref Exception` through channels - refc is local heap |
03:49:26 | FromDiscord | <Yardanico> with arc it might work if you GC_ref, but I doubt it's that useful |
03:49:26 | FromDiscord | <huantian> yeah probably not a good idea |
03:49:33 | FromDiscord | <Yardanico> you can always get the error right in the callback itself |
03:50:45 | FromDiscord | <!Patitotective> :DDDDDDDDDDD |
03:50:51 | FromDiscord | <!Patitotective> thank you so much guys |
03:51:20 | FromDiscord | <Yardanico> you should probably limit it somewhat so it doesn't download images for all apps at the same time, but that's up for you to decide |
03:52:06 | FromDiscord | <huantian> Complexity goes ⤴️ a bit tho |
03:52:06 | * | flynn quit (Read error: Connection reset by peer) |
03:52:31 | FromDiscord | <Yardanico> can't he just download images for apps that are in view and about to appear in view? |
03:52:34 | FromDiscord | <!Patitotective> i need to see how it performs, and maybe is not worth cause once you downloaded them they got stored in cache |
03:52:43 | FromDiscord | <huantian> In reply to @Yardanico "can't he just download": Actually yeah that’s probably not too hard |
03:52:56 | FromDiscord | <!Patitotective> In reply to @huantian "Complexity goes ⤴️ a": i dont know if i have another choice lol |
03:53:18 | * | flynn joined #nim |
03:53:19 | FromDiscord | <!Patitotective> In reply to @Yardanico "can't he just download": 👍 |
03:53:34 | FromDiscord | <Yardanico> btw, any reason you're creating so many apps with your imgui app framework? :P to get people interested in it? |
03:53:40 | FromDiscord | <Yardanico> or you're planning on making a linux distro? :D |
03:55:18 | FromDiscord | <Yardanico> i quite like the idea, but for some reason I don't like using imgui for "normal" GUI apps because it doesn't integrate with the rest of the OS that well |
03:55:44 | FromDiscord | <Yardanico> but these are just my taste preferences, of course yours are different |
03:56:21 | FromDiscord | <!Patitotective> actually i just like to make app images and now you say, its also a nice way to get people interested↵and making a linux distro sounds like a lot of work on something i dont know how to do, which im not going to be able to maintain (or even get stable), also adding more "noise" to linux distros↵im fine with ubuntu hehe (no, arch no) |
03:58:38 | FromDiscord | <!Patitotective> In reply to @Yardanico "i quite like the": yea, id also like to be _native_ but i dont think its worth cause it adds a lot of dependencies, you need to limit the widgets a lot, it wont look the same as you planned it to look (at least you test it on various systems which would be a hell to change the GUI depending on the os) |
03:58:56 | FromDiscord | <!Patitotective> plus imgui is super fast and small |
03:59:27 | FromDiscord | <Yardanico> i guess my biggest problem with imgui is that it doesn't natively support multiple windows in the main branch |
03:59:31 | FromDiscord | <Yardanico> and same for modals, etc |
03:59:47 | FromDiscord | <Yardanico> there is a branch with separate windows support, and I might try it, but I will need to update nimgl's bindings for that |
03:59:51 | FromDiscord | <huantian> Hm I wonder can you send closures through channels |
04:00:07 | FromDiscord | <Yardanico> they're GC'd so that'd be quite dangerous :P |
04:00:17 | FromDiscord | <Yardanico> but might work with ARC if you somehow trick it into not destroying the closure |
04:00:25 | FromDiscord | <Elegantbeef> Just gcref them and go to town 😛 |
04:00:35 | FromDiscord | <Yardanico> does gcref work on closures? I haven't really checked |
04:00:55 | FromDiscord | <Elegantbeef> I imagine you can just `GcRef(cast[ref int](myClosure))` |
04:00:56 | FromDiscord | <!Patitotective> In reply to @Yardanico "i guess my biggest": yea, ive saw people having trouble with that but i never needed them |
04:01:00 | FromDiscord | <Elegantbeef> Perhaps not |
04:01:18 | FromDiscord | <!Patitotective> In reply to @Yardanico "there is a branch": if you updated the bindings please fix `NonUDT` procs |
04:01:21 | FromDiscord | <!Patitotective> (edit) "In reply to @Yardanico "there is a branch": if you updated the bindings please fix `NonUDT` procs ... " added "lol" |
04:01:35 | FromDiscord | <Yardanico> but yes, imgui is nice, I've used it for a game hack in C++ cough (only for educational purposes) |
04:01:54 | FromDiscord | <Yardanico> easy to change the theme as well |
04:02:06 | * | flynn quit (Read error: Connection reset by peer) |
04:02:14 | FromDiscord | <!Patitotective> In reply to @Yardanico "easy to change the": https://github.com/Patitotective/ImStyle 😳 |
04:02:59 | FromDiscord | <!Patitotective> In reply to @Yardanico "but yes, imgui is": one thing that imgui lacks, horribly is alignment↵cause to center things you need to pre-calculate their size and thats fricking horrible and sometimes hard |
04:03:17 | * | flynn joined #nim |
04:03:22 | FromDiscord | <Yardanico> In reply to @Patitotective "https://github.com/Patitotective/ImStyle 😳": doesn't imgui also allow you to save its settings to imgui.ini or something? |
04:03:32 | FromDiscord | <Elegantbeef> Yes |
04:03:36 | FromDiscord | <Elegantbeef> I think it does it by default |
04:04:01 | FromDiscord | <Elegantbeef> Almost like imgui isnt really good for proper applications↵(@!Patitotective) |
04:04:29 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Almost like imgui isnt": well, yeah, i think its for (dev) _tools_ |
04:04:40 | FromDiscord | <Yardanico> yeah for that it's amazing |
04:05:04 | FromDiscord | <Yardanico> I really like the idea of https://sciter.com/ but it's still closed-source sadly, since there wasn't enough interest (and money) from people to make it go open-source |
04:05:36 | FromDiscord | <Yardanico> you can think of it as lightweight electron with a custom html/css engine + quickjs for UI layout or simple scripts |
04:05:52 | FromDiscord | <Yardanico> the whole DLL with everything compiled in is ~5mb |
04:05:54 | FromDiscord | <huantian> money is so often the issue with open source 😔 |
04:05:58 | FromDiscord | <!Patitotective> web stuff scares me 💀 |
04:06:05 | FromDiscord | <Yardanico> In reply to @Patitotective "web stuff scares me": this isn't real "web" stuff |
04:06:17 | FromDiscord | <Yardanico> it's written from ground up for desktop applications, it just happens to use html/css as those are generally good tools for design |
04:06:18 | FromDiscord | <!Patitotective> it scares me as it were 💀 |
04:06:19 | FromDiscord | <Elegantbeef> I atleast like the declarative part of owlkettle though would be nice if it was crossplatform 😄 |
04:06:29 | FromDiscord | <huantian> I was like onivim2 looks decent but then it's also somewhat dead 😔 |
04:06:34 | FromDiscord | <Elegantbeef> Debian says "No mingw-gtk" |
04:06:35 | FromDiscord | <Yardanico> In reply to @huantian "money is so often": well, the dev of sciter gets a lot of money even if his app is closed source :) |
04:06:40 | FromDiscord | <Yardanico> most antiviruses use sciter :DD |
04:06:43 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "I atleast like the": d-declarative imgui? 😳 |
04:06:45 | FromDiscord | <Yardanico> so there's definitely enough money |
04:07:00 | FromDiscord | <Elegantbeef> Yea onivim2 didnt get enough patreon funding so it is now on the back burner |
04:07:05 | FromDiscord | <Yardanico> In reply to @Elegantbeef "Yea onivim2 didnt get": lol |
04:07:07 | FromDiscord | <Elegantbeef> Declarative imgui doesnt make much sense |
04:07:18 | FromDiscord | <Yardanico> isn't it already "declarative" as it's "immediate" |
04:07:25 | FromDiscord | <Yardanico> the start/end blocks |
04:07:44 | FromDiscord | <Elegantbeef> Kinda i mean it's not nealy as ergonomic as owlkettle's |
04:08:16 | FromDiscord | <!Patitotective> In reply to @Yardanico "isn't it already "declarative"": fidget was declarative and inmediate though |
04:08:36 | FromDiscord | <Yardanico> treeform is still busy writing fidget 2 or his game (I think?) |
04:08:48 | FromDiscord | <Yardanico> at least he said before that fidget 1 is effectively dead |
04:08:51 | FromDiscord | <!Patitotective> In reply to @Yardanico "treeform is still busy": he has so many cool projects |
04:08:59 | FromDiscord | <Yardanico> yes, all of them are for his main project |
04:09:01 | FromDiscord | <Yardanico> which is still secret :P |
04:09:11 | FromDiscord | <!Patitotective> sus ඞ |
04:09:30 | FromDiscord | <!Patitotective> _conquering the world with nim?_ |
04:09:39 | FromDiscord | <!Patitotective> _kill go?_ |
04:11:17 | FromDiscord | <!Patitotective> sent a code paste, see https://paste.rs/LCz |
04:11:22 | FromDiscord | <Yardanico> i used huantian's example i guess |
04:11:27 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3VpK" => "https://play.nim-lang.org/#ix=3VpJ" |
04:11:28 | FromDiscord | <Yardanico> you will close them yourself, right? |
04:11:35 | FromDiscord | <!Patitotective> hehe |
04:12:09 | FromDiscord | <huantian> in the example it's hard to see exactly where to close the channels |
04:12:18 | FromDiscord | <!Patitotective> In reply to @huantian "in the example it's": after the main loop |
04:12:18 | FromDiscord | <huantian> you can close them whenever you want |
04:12:29 | FromDiscord | <huantian> ok but I didn't add anythign to exit the main loop cus lazy |
04:12:59 | FromDiscord | <!Patitotective> In reply to @Yardanico "you will close them": yes, i will in my `proc terminate(app: var App) = ` that i can easily find because of a minimap 😁 |
04:14:37 | * | flynn quit (Read error: Connection reset by peer) |
04:15:25 | FromDiscord | <!Patitotective> In reply to @Yardanico "doesn't imgui also allow": i-ini? 🤮 |
04:15:34 | FromDiscord | <Yardanico> eh, ini isn't so bad |
04:15:40 | FromDiscord | <!Patitotective> lmfao |
04:15:41 | FromDiscord | <Yardanico> I actually like TOML |
04:15:47 | FromDiscord | <Yardanico> which is the logical continuation of ini |
04:15:48 | * | flynn joined #nim |
04:15:56 | FromDiscord | <Yardanico> In reply to @Patitotective "lmfao": nim has an ini parser (with some extensions) in the stdlib as well |
04:15:57 | FromDiscord | <!Patitotective> i actually like niprefs 💀 |
04:16:00 | FromDiscord | <huantian> toml's cool |
04:16:08 | FromDiscord | <Yardanico> In reply to @Patitotective "i actually like niprefs": => seems weird for me 🤷 |
04:16:13 | FromDiscord | <Yardanico> https://nim-lang.org/docs/parsecfg.html |
04:16:27 | FromDiscord | <Yardanico> https://github.com/toml-lang/toml↵https://github.com/toml-lang/toml |
04:16:31 | FromDiscord | <Yardanico> (edit) "https://github.com/toml-lang/toml↵https://github.com/toml-lang/toml" => "https://github.com/toml-lang/toml↵https://github.com/NimParsers/parsetoml" |
04:16:47 | FromDiscord | <!Patitotective> In reply to @Yardanico "=> seems weird for": thats because niprefs was a python library 💀 |
04:16:47 | FromDiscord | <huantian> but parsetoml isn't as cool of a name as tomly |
04:17:03 | FromDiscord | <huantian> (edit) "tomly" => "tomly, treeform needs to make a toml parser" |
04:17:06 | FromDiscord | <Yardanico> it's in style with the stdlib |
04:17:06 | FromDiscord | <!Patitotective> In reply to @Patitotective "thats because niprefs was": and python = weird |
04:17:28 | FromDiscord | <!Patitotective> In reply to @huantian "but parsetoml isn't as": haha, sure he loves cute names |
04:19:09 | FromDiscord | <!Patitotective> maybe even tommy |
04:19:10 | FromDiscord | <!Patitotective> lmfao |
04:21:52 | * | slowButPresent quit (Quit: leaving) |
04:23:39 | FromDiscord | <!Patitotective> In reply to @Yardanico "btw, any reason you're": also ive always wanted to have _decent yet simple_ gui apps for my _portfolio_ |
04:26:16 | FromDiscord | <!Patitotective> does puppy have a downloadFile-like proc? |
04:26:41 | FromDiscord | <!Patitotective> (edit) "downloadFile-like" => "downloadFile equivalent" |
04:27:13 | * | flynn quit (Read error: Connection reset by peer) |
04:28:24 | * | flynn joined #nim |
04:28:28 | FromDiscord | <huantian> you can always just fetch and write the body to a file |
04:29:40 | FromDiscord | <huantian> though that comes with the side effect of loading the file into memory |
04:29:46 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VpL |
04:29:58 | FromDiscord | <!Patitotective> (edit) "https://play.nim-lang.org/#ix=3VpL" => "https://paste.rs/fVD" |
04:31:21 | FromDiscord | <Yardanico> get data |
04:31:28 | FromDiscord | <Yardanico> write data to file |
04:31:32 | FromDiscord | <Yardanico> done |
04:32:37 | FromDiscord | <huantian> https://media.discordapp.net/attachments/371759389889003532/965469879165657098/unknown.png |
04:32:40 | FromDiscord | <huantian> you gotta use this thingy |
04:32:47 | FromDiscord | <huantian> maybe |
04:33:01 | FromDiscord | <huantian> actually I don't know you can probably just directly write the result from fetch into your file |
04:33:21 | FromDiscord | <!Patitotective> oh, but it's not async? :[ |
04:33:39 | FromDiscord | <huantian> I think puppy just isn't async |
04:34:21 | FromDiscord | <huantian> so yeah no async |
04:35:13 | FromDiscord | <!Patitotective> actually, is it important that its async? wouldnt just work with a thread and fetches |
04:35:15 | FromDiscord | <!Patitotective> (edit) "fetches" => "fetches?" |
04:35:26 | FromDiscord | <!Patitotective> (edit) "that its" => "for it to be" |
04:35:26 | FromDiscord | <Rika> it doesnt say its threadsafe |
04:35:34 | FromDiscord | <Rika> so it might not be |
04:36:11 | FromDiscord | <!Patitotective> @huantian and using normal http clients? |
04:36:18 | FromDiscord | <huantian> in an issue they mention that they plan on adding async parallel requests to puppy, but it seems like it doesn't support async rn |
04:36:40 | FromDiscord | <!Patitotective> In reply to @Patitotective "<@300050030923087872> and using normal": i mean the `waitForDownloads` stuff |
04:36:47 | FromDiscord | <!Patitotective> does it really need async? |
04:37:00 | FromDiscord | <huantian> i mean it has to be async if you want it to download asynchronously |
04:37:13 | FromDiscord | <Rika> i saw you guys use callbacks |
04:37:17 | FromDiscord | <Rika> you guys are sick |
04:37:18 | FromDiscord | <Rika> in the mind |
04:37:27 | FromDiscord | <!Patitotective> In reply to @huantian "i mean it has": would it take the same time? |
04:37:33 | FromDiscord | <Rika> In reply to @Patitotective "would it take the": no |
04:37:37 | FromDiscord | <Rika> it will take longer |
04:37:41 | FromDiscord | <Elegantbeef> Well rewrite it better rika |
04:37:43 | FromDiscord | <Rika> much longer |
04:37:50 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Well rewrite it better": haha, yes |
04:37:54 | FromDiscord | <Rika> which version |
04:37:57 | FromDiscord | <huantian> yes show us the way rika without callbacks |
04:38:00 | FromDiscord | <Rika> i can |
04:38:07 | FromDiscord | <Rika> give me the one to base on tho |
04:38:11 | FromDiscord | <!Patitotective> wait |
04:38:25 | FromDiscord | <Elegantbeef> async is single threaded but it gives up the cpu at points marked `await` code without async is called synchronously if there isnt an `await` |
04:38:27 | FromDiscord | <Rika> expect it within a few hours, i have to leave for now xd |
04:39:02 | * | flynn quit (Ping timeout: 250 seconds) |
04:39:03 | FromDiscord | <Elegantbeef> `await` is basically "give up the cpu and we'll continue when the procedure finishes" if code doesnt have it you're running a blocking operation |
04:40:28 | * | flynn joined #nim |
04:41:09 | FromDiscord | <!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VpM |
04:41:23 | FromDiscord | <!Patitotective> dont forget `-d:ssl` :] |
04:41:54 | FromDiscord | <huantian> you should move `let (url, path) = maybe.msg` inside your closure scope |
04:42:13 | FromDiscord | <huantian> maybe |
04:42:19 | FromDiscord | <!Patitotective> :[ |
04:43:05 | FromDiscord | <huantian> also the callback isn't sending into the channel? |
04:43:57 | FromDiscord | <!Patitotective> what, who changed that? 💀 |
04:44:08 | FromDiscord | <huantian> yard probably when he was testing |
04:44:16 | FromDiscord | <Elegantbeef> Dont look now but you're the author |
04:44:21 | FromDiscord | <Elegantbeef> If you arent auditing the code who is? |
04:45:29 | FromDiscord | <!Patitotective> are you talking to me beef? ;-; |
04:46:31 | FromDiscord | <huantian> I beleef so |
04:46:46 | FromDiscord | <!Patitotective> LMFAO |
04:47:08 | FromDiscord | <Elegantbeef> Quite possibly i am |
04:48:46 | FromDiscord | <!Patitotective> its just that discord doesn't have a minimap so i needed to scroll up but its toooo late, im tired and that was the first snippet i found :[ |
04:49:37 | * | flynn quit (Read error: Connection reset by peer) |
04:50:48 | * | flynn joined #nim |
04:51:25 | FromDiscord | <Rika> Let me see if I can program on my iPad |
04:51:35 | FromDiscord | <!Patitotective> i-pad? 💀 |
04:51:39 | FromDiscord | <!Patitotective> (edit) "i-pad?" => "i-ipad?" |
04:53:35 | FromDiscord | <Rika> The playground is down |
04:55:23 | FromDiscord | <huantian> Yep |
04:55:24 | FromDiscord | <!Patitotective> frick yeaaaaaaaaaaaaaaaaaaaaaaaaah↵thank you yard and huantian ❤️ ↵im done for today :]]]]]]]]]]] https://media.discordapp.net/attachments/371759389889003532/965475610153599027/ImAppImage.mp4 |
04:55:41 | FromDiscord | <Rika> Still cursed for using callbacks |
04:55:46 | FromDiscord | <!Patitotective> and beef :] |
04:55:49 | FromDiscord | <!Patitotective> and rika :] |
04:55:53 | FromDiscord | <!Patitotective> good night |
04:55:55 | FromDiscord | <!Patitotective> 🌃 |
04:56:01 | FromDiscord | <!Patitotective> In reply to @Rika "Still cursed for using": :[ |
04:56:07 | FromDiscord | <Rika> Good night, I’ll fix it sooner or later |
04:56:17 | FromDiscord | <huantian> Soon™️ |
04:56:23 | FromDiscord | <!Patitotective> lmfao gngngngnngng |
05:02:33 | * | flynn quit (Read error: Connection reset by peer) |
05:03:43 | * | flynn joined #nim |
05:13:20 | * | flynn quit (Read error: Connection reset by peer) |
05:14:32 | * | flynn joined #nim |
05:16:06 | * | rockcavera quit (Remote host closed the connection) |
05:22:33 | * | flynn quit (Read error: Connection reset by peer) |
05:23:46 | * | flynn joined #nim |
05:28:28 | FromDiscord | <Skaruts> sent a code paste, see https://paste.rs/wCp |
05:28:52 | FromDiscord | <Skaruts> (edit) "https://paste.rs/uLg" => "https://play.nim-lang.org/#ix=3VpQ" |
05:28:57 | FromDiscord | <Rika> [0] / index it |
05:29:03 | FromDiscord | <Skaruts> (edit) |
05:29:21 | FromDiscord | <Rika> Naturally this won’t work if you want a many digit numbers |
05:29:31 | FromDiscord | <Rika> I’m which case use parseInt in strutils |
05:29:36 | FromDiscord | <Skaruts> ah that worked |
05:29:37 | FromDiscord | <Rika> In |
05:30:10 | FromDiscord | <Skaruts> but won't parseInt error if the param isn't a number? |
05:30:35 | FromDiscord | <Rika> It will, I guess, so catch it and handle the exception |
05:30:56 | FromDiscord | <Rika> Try except can be used as an expression |
05:32:19 | * | flynn quit (Read error: Connection reset by peer) |
05:33:32 | * | flynn joined #nim |
05:34:34 | FromDiscord | <Skaruts> hmm... I totally skipped then exception handling class lol |
05:34:39 | FromDiscord | <Skaruts> (edit) "then" => "the" |
05:34:54 | FromDiscord | <Skaruts> for years |
05:35:13 | FromDiscord | <Skaruts> I'll see if can manage it |
05:35:14 | FromDiscord | <Skaruts> thanks |
05:37:19 | FromDiscord | <Rika> That doesn’t sound good |
05:37:26 | FromDiscord | <Rika> Good luck I guess |
05:41:58 | * | flynn quit (Read error: Connection reset by peer) |
05:43:09 | * | flynn joined #nim |
05:43:47 | * | nrds quit (*.net *.split) |
05:43:47 | * | systemdsucks quit (*.net *.split) |
05:43:48 | * | NimEventer quit (*.net *.split) |
05:43:58 | * | NimEventer joined #nim |
05:44:00 | * | systemdsucks joined #nim |
05:44:00 | * | nrds joined #nim |
05:46:40 | FromDiscord | <Skaruts> seems like I got it 🙂 |
05:48:17 | * | Amun-Ra quit (*.net *.split) |
05:48:17 | * | gshumway quit (*.net *.split) |
05:48:54 | * | Amun-Ra joined #nim |
05:51:30 | * | gshumway joined #nim |
05:52:17 | * | flynn quit (Read error: Connection reset by peer) |
05:53:29 | * | flynn joined #nim |
05:55:44 | FromDiscord | <Skaruts> what would be the appropriate exception to raise there, `ValueError`? |
05:57:49 | FromDiscord | <Rika> In this case you don’t raise again, if you get a parse error that means it’s not a number and therefore you return false |
05:58:53 | FromDiscord | <Rika> So it’s like↵`…and (try: discard paramStr(2).parseInt; true except: false) and…` |
05:59:23 | FromDiscord | <Rika> I mean, there are better ways to do this (I’m not sure if there’s an is number) but this is what came to mind first |
06:01:08 | FromDiscord | <TryAngle> In reply to @Rika "Let me see if": I did some programming on my ipad |
06:01:11 | * | flynn quit (Read error: Connection reset by peer) |
06:01:13 | FromDiscord | <Skaruts> well I do want to stop the program if the param is invalid in this case |
06:01:14 | FromDiscord | <TryAngle> works pretty well |
06:01:16 | FromDiscord | <Rika> In reply to @TryAngle "I did some programming": It’s not fun |
06:01:25 | FromDiscord | <Rika> In reply to @Skaruts "well I do want": Ah, okay |
06:01:44 | FromDiscord | <TryAngle> In reply to @Rika "It’s not fun": I mean just use vim on a linux server u ssh into |
06:01:49 | FromDiscord | <TryAngle> XD |
06:01:52 | FromDiscord | <Rika> I don’t have a keyboard with me |
06:02:00 | FromDiscord | <TryAngle> oh, I have keyboard |
06:02:04 | FromDiscord | <TryAngle> so it works well |
06:02:24 | * | flynn joined #nim |
06:12:28 | * | flynn quit (Read error: Connection reset by peer) |
06:13:40 | * | flynn joined #nim |
06:23:28 | * | flynn quit (Read error: Connection reset by peer) |
06:24:41 | * | flynn joined #nim |
06:29:18 | FromDiscord | <Yayko> Hello everyone, I tried to create an object with a "pos" for the name's field, it's a tuple.↵I can't declare this tuple in the "()", can someone help me? https://media.discordapp.net/attachments/371759389889003532/965499241265000508/unknown.png |
06:32:06 | FromDiscord | <Rika> can you show how you do it |
06:32:13 | FromDiscord | <Yayko> https://media.discordapp.net/attachments/371759389889003532/965499977143042078/unknown.png |
06:33:19 | FromDiscord | <Yayko> sorry i didn't see that i deleted it |
06:34:28 | FromDiscord | <Rika> `pos: (x: 10, y: 10\)` |
06:34:30 | FromDiscord | <Rika> (edit) "10\)`" => "10)`" |
06:37:10 | FromDiscord | <Yayko> it doesn't work ... https://media.discordapp.net/attachments/371759389889003532/965501223719567380/unknown.png |
06:38:19 | * | flynn quit (Read error: Connection reset by peer) |
06:39:31 | * | flynn joined #nim |
06:40:11 | FromDiscord | <Yayko> In reply to @Rika "`pos: (x: 10, y:": it works thank you, I thought this syntax could work everywhere ^^ |
06:45:44 | * | flynn quit (Read error: Connection reset by peer) |
06:46:56 | * | flynn joined #nim |
06:56:19 | * | flynn quit (Read error: Connection reset by peer) |
06:57:32 | * | flynn joined #nim |
06:58:05 | FromDiscord | <Yayko> In reply to @Rika "`pos: (x: 10, y:": I tried replacing the ints with cint, it doesn't work anymore ^^ |
06:58:17 | FromDiscord | <Rika> where |
06:58:24 | FromDiscord | <Rika> show code again |
07:01:46 | FromDiscord | <Yayko> https://media.discordapp.net/attachments/371759389889003532/965507414478708746/unknown.png |
07:02:05 | FromDiscord | <Rika> integer literals arent coerced into cint |
07:02:09 | FromDiscord | <Rika> `10.cint` for both |
07:04:14 | FromDiscord | <Yayko> Oh thank you again, it's not always easy to be a newbie ^^ |
07:04:45 | FromDiscord | <Rika> sometimes the issue isnt obvious |
07:04:56 | FromDiscord | <Rika> why are you using cint btw? |
07:05:06 | FromDiscord | <Rika> theres not much reason to use it unless you're doing interop with other languages |
07:08:09 | FromDiscord | <Yayko> Yes, I use Raylib 8) |
07:08:26 | FromDiscord | <Yayko> (edit) removed "8)" |
07:08:29 | * | flynn quit (Read error: Connection reset by peer) |
07:09:41 | * | flynn joined #nim |
07:11:46 | * | gsalazar joined #nim |
07:17:11 | * | flynn quit (Read error: Connection reset by peer) |
07:18:23 | * | flynn joined #nim |
07:26:49 | * | flynn quit (Read error: Connection reset by peer) |
07:28:01 | * | flynn joined #nim |
07:37:56 | * | flynn quit (Read error: Connection reset by peer) |
07:39:08 | * | flynn joined #nim |
07:45:49 | * | flynn quit (Read error: Connection reset by peer) |
07:47:00 | * | flynn joined #nim |
07:50:48 | NimEventer | New thread by Sauerbread: Metatag - an audio metadata library, see https://forum.nim-lang.org/t/9112 |
07:52:35 | FromDiscord | <aph> ah i should've found this earlier `http://kaitai.io/`, would have 200% less work for my mmd parser↵i might want to help with their nim code gen later probably, if i manage to do that |
07:54:15 | * | flynn quit (Read error: Connection reset by peer) |
07:55:27 | * | flynn joined #nim |
08:02:18 | * | flynn quit (Read error: Connection reset by peer) |
08:03:30 | * | flynn joined #nim |
08:10:48 | * | flynn quit (Read error: Connection reset by peer) |
08:12:00 | * | flynn joined #nim |
08:19:34 | * | flynn quit (Read error: Connection reset by peer) |
08:20:45 | * | flynn joined #nim |
08:26:35 | * | Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected]) |
08:30:07 | * | flynn quit (Read error: Connection reset by peer) |
08:31:19 | * | flynn joined #nim |
08:36:35 | * | nsyd quit (Quit: WeeChat 3.5) |
08:40:58 | * | flynn quit (Read error: Connection reset by peer) |
08:42:11 | * | flynn joined #nim |
08:50:47 | * | neceve joined #nim |
08:50:59 | * | flynn quit (Read error: Connection reset by peer) |
08:52:10 | * | flynn joined #nim |
08:59:50 | * | flynn quit (Read error: Connection reset by peer) |
09:01:01 | * | flynn joined #nim |
09:12:41 | * | flynn quit (Read error: Connection reset by peer) |
09:13:53 | * | flynn joined #nim |
09:21:14 | * | flynn quit (Read error: Connection reset by peer) |
09:22:26 | * | flynn joined #nim |
09:23:56 | FromDiscord | <morgan> so i have made some mildly cursed code, but it does compile. no clue if it’ll work when i call it i didn’t get that far https://media.discordapp.net/attachments/371759389889003532/965543187995295774/unknown.png https://media.discordapp.net/attachments/371759389889003532/965543188301488168/unknown.png |
09:24:34 | FromDiscord | <morgan> maybe the three back to back could be one when expression |
09:25:11 | FromDiscord | <morgan> also as of tonight i have 4 concurrent open prs on saem’s extension lmao |
09:30:20 | * | flynn quit (Read error: Connection reset by peer) |
09:31:33 | * | flynn joined #nim |
09:36:27 | FromDiscord | <d4rckh> sent a code paste, see https://play.nim-lang.org/#ix=3Vqu |
09:36:55 | FromDiscord | <d4rckh> (edit) "https://play.nim-lang.org/#ix=3Vqu" => "https://play.nim-lang.org/#ix=3Vqv" |
09:39:24 | * | flynn quit (Read error: Connection reset by peer) |
09:40:36 | * | flynn joined #nim |
09:45:10 | FromDiscord | <Rika> because fgWhite and fgYellow arent actually written in the string |
09:45:33 | FromDiscord | <Rika> styledwriteline processes them and does the right thing depending on the os |
09:46:21 | FromDiscord | <d4rckh> i could split logArgument by `[]` and do it like `part[0], fgYellow, "[]", part[1], fgWhite` but logArgument might have multiple `[]`s that need to be highlighted |
09:46:50 | FromDiscord | <Rika> use styledwrite (not the one with line) and write each part via for loop |
09:47:37 | FromDiscord | <d4rckh> okay, thanks |
09:47:38 | * | flynn quit (Read error: Connection reset by peer) |
09:48:51 | * | flynn joined #nim |
09:53:21 | * | lumo_e joined #nim |
09:56:28 | * | flynn quit (Read error: Connection reset by peer) |
09:57:41 | * | flynn joined #nim |
09:58:07 | * | jmdaemon quit (Ping timeout: 240 seconds) |
09:59:48 | * | lumo_e quit (Ping timeout: 276 seconds) |
10:00:37 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Vqz |
10:00:49 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#ix=3Vqz" => "https://paste.rs/g6K" |
10:01:01 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#ix=3VqA" => "https://play.nim-lang.org/#ix=3Vqz" |
10:01:39 | FromDiscord | <m4ul3r> My current solution is a bunch of if-elif-elif-else. case seems like it would be cleaner |
10:05:00 | * | flynn quit (Read error: Connection reset by peer) |
10:06:12 | * | flynn joined #nim |
10:07:20 | FromDiscord | <lantos> nim playground dead or just for me? |
10:07:25 | FromDiscord | <lantos> (edit) "me?" => "me?↵https://play.nim-lang.org/" |
10:11:39 | FromDiscord | <Rika> not just you |
10:11:52 | FromDiscord | <Rika> In reply to @m4ul3r "Is there anyway to": no, you need to use ifs here |
10:12:47 | FromDiscord | <Yayko> In reply to @lantos "nim playground dead or": I went to see and it's the same for me, I think it's general. |
10:14:13 | * | flynn quit (Read error: Connection reset by peer) |
10:14:13 | FromDiscord | <lantos> found dis, actually quite nice https://doongjohn.github.io/nim-playground/ |
10:15:24 | * | flynn joined #nim |
10:15:42 | FromDiscord | <Phil> In reply to @m4ul3r "Is there anyway to": The "case" statement is for covering all cases of an variable's values (e.g. when using an enum). What you're doing is you're checking a condition, and for that you'll need to use if/else statements |
10:15:53 | FromDiscord | <Phil> (edit) "values" => "value" |
10:16:05 | FromDiscord | <Phil> (edit) "an" => "a" |
10:16:11 | FromDiscord | <Phil> (edit) "In reply to @m4ul3r "Is there anyway to": The "case" statement is for covering all cases of a variable's value (e.g. when using an enum). What you're doing is you're checking a condition, and for that you'll need to use if/else statements ... " added "as Rika suggested" |
10:17:21 | FromDiscord | <m4ul3r> I'm currently 10 elifs deeps and I'm expecting about 10-15 more 😆 |
10:17:37 | FromDiscord | <Phil> Hmmm what are you precisely trying to do? as in, why so many conditions? |
10:17:45 | FromDiscord | <Phil> That many elifs hint towards there being a simpler solution |
10:20:38 | FromDiscord | <m4ul3r> There probably is. I'm creating an interactive prompt to take a user input and do stuff based on the input |
10:21:31 | FromDiscord | <Phil> Is the number of allowed inputs finite in the sense that you could throw them in an enum?? |
10:21:33 | FromDiscord | <Phil> (edit) "enum??" => "enum?" |
10:21:56 | FromDiscord | <Phil> Oh wait, the if-elses come about because of the user having to make that many choices |
10:21:58 | FromDiscord | <Phil> Nevermind |
10:24:12 | FromDiscord | <m4ul3r> Yeah the user input is limiting me but I do need it to be interactive. I'm doing something like `get apple 1`, `set apple 2`, `mov banana 3`. ↵I'm calling functions based off of the startsWith and handling the input with split(' ') |
10:24:30 | FromDiscord | <m4ul3r> (edit) "apple 1`," => "apple_1`," | "apple" => "apple_2" |
10:25:24 | * | flynn quit (Read error: Connection reset by peer) |
10:26:36 | * | flynn joined #nim |
10:35:23 | * | flynn quit (Read error: Connection reset by peer) |
10:36:35 | * | flynn joined #nim |
10:40:51 | NimEventer | New Nimble package! pantry - Client library for https://getpantry.cloud/, see https://github.com/ire4ever1190/pantry-nim |
10:45:51 | * | flynn quit (Read error: Connection reset by peer) |
10:47:03 | * | flynn joined #nim |
10:53:32 | * | flynn quit (Read error: Connection reset by peer) |
10:54:44 | * | flynn joined #nim |
11:00:36 | * | flynn quit (Read error: Connection reset by peer) |
11:01:48 | * | flynn joined #nim |
11:04:42 | FromDiscord | <ShalokShalom> In reply to @Isofruit "The "case" statement is": Then this error message is not very specific |
11:07:43 | NimEventer | New thread by Veksha: Async stdin/stdout errors (compiling nimlsp on Windows), see https://forum.nim-lang.org/t/9113 |
11:10:59 | * | flynn quit (Read error: Connection reset by peer) |
11:12:11 | * | flynn joined #nim |
11:19:12 | * | flynn quit (Read error: Connection reset by peer) |
11:20:23 | * | flynn joined #nim |
11:25:39 | * | flynn quit (Read error: Connection reset by peer) |
11:26:51 | * | flynn joined #nim |
11:28:43 | FromDiscord | <Phil> Errr.... how do I write a macro again to resolve to the code `obj.fieldName` for a given obj with fieldName as a static string?↵I had a macro for that once upon a time, but I refactored that out and I can't find it anymore.↵I still have the discussion I had with beef about this, but I can't find it for the life of me:↵` macro getField(it: untyped, fieldName: static string): untyped = nnkDotExpr.newTree(ident("it"), ident fieldName)` T |
11:29:29 | FromDiscord | <Phil> (edit) "Errr.... how do I write" => "sent" | "macro again to resolve to the code `obj.fieldName` for a given obj with fieldName as a static string?↵I had a macro for that once upon a time, but I refactored that out and I can't find it anymore.↵I still have the discussion I had with beef about this, but I can't find it for the life of me:↵` macro getField(it: untyped, fieldName: static string): untyped = nnkDotExpr.newTree(ident("it") |
11:33:44 | * | flynn quit (Remote host closed the connection) |
11:34:55 | * | flynn joined #nim |
11:37:47 | NimEventer | New thread by Didlybom: Installing choosenim (on Windows) on a custom folder does not seem to work, see https://forum.nim-lang.org/t/9114 |
11:41:56 | * | flynn quit (Read error: Connection reset by peer) |
11:43:08 | * | flynn joined #nim |
11:49:37 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/965579852822499348/Japanese_Goblin_Phonk_Edit480P.mp4 |
11:49:58 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/965579940231786506/06BA8DB5-C8DD-4033-B9BD-763A43C4DAA1.jpg |
11:51:24 | * | flynn quit (Read error: Connection reset by peer) |
11:51:58 | FromDiscord | <Phil> blinks |
11:52:36 | * | flynn joined #nim |
11:54:39 | FromDiscord | <Rika> Pop |
11:54:42 | FromDiscord | <Rika> Oops |
11:54:44 | FromDiscord | <Rika> Wrong server |
11:54:47 | FromDiscord | <Rika> My bad lmao |
11:57:45 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=3VqX |
11:57:57 | FromDiscord | <amadan> (edit) "https://play.nim-lang.org/#ix=3VqX" => "https://play.nim-lang.org/#ix=3VqY" |
11:59:34 | * | flynn quit (Read error: Connection reset by peer) |
12:00:46 | * | flynn joined #nim |
12:04:06 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Vr0 |
12:04:26 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Vr1 |
12:08:21 | * | flynn quit (Read error: Connection reset by peer) |
12:09:32 | * | flynn joined #nim |
12:16:07 | * | flynn quit (Read error: Connection reset by peer) |
12:17:19 | * | flynn joined #nim |
12:19:55 | * | jjido joined #nim |
12:23:05 | * | flynn quit (Read error: Connection reset by peer) |
12:24:16 | * | flynn joined #nim |
12:27:44 | * | rockcavera joined #nim |
12:27:44 | * | rockcavera quit (Changing host) |
12:27:44 | * | rockcavera joined #nim |
12:32:35 | * | flynn quit (Read error: Connection reset by peer) |
12:33:47 | * | flynn joined #nim |
12:36:11 | FromDiscord | <Phil> Heck yeah! Give it a couple more weeks and this'll be the basis of a convenience proc to query multiple many-to-X relationships in one go |
12:41:59 | * | flynn quit (Read error: Connection reset by peer) |
12:43:11 | * | flynn joined #nim |
12:48:27 | * | v9fk quit (Remote host closed the connection) |
12:49:22 | * | flynn quit (Read error: Connection reset by peer) |
12:50:33 | * | flynn joined #nim |
12:59:36 | * | flynn quit (Read error: Connection reset by peer) |
13:00:47 | * | flynn joined #nim |
13:02:08 | * | kayabaNerve_ joined #nim |
13:04:27 | * | kayabaNerve quit (Ping timeout: 240 seconds) |
13:08:45 | * | flynn quit (Read error: Connection reset by peer) |
13:09:56 | * | flynn joined #nim |
13:12:32 | * | v9fk joined #nim |
13:13:18 | * | v9fk quit (Remote host closed the connection) |
13:13:44 | * | v9fk joined #nim |
13:18:49 | * | flynn quit (Read error: Connection reset by peer) |
13:20:01 | * | flynn joined #nim |
13:29:58 | * | flynn quit (Read error: Connection reset by peer) |
13:31:10 | * | flynn joined #nim |
13:32:39 | * | arkurious joined #nim |
13:39:17 | * | flynn quit (Read error: Connection reset by peer) |
13:39:55 | * | tiorock joined #nim |
13:39:55 | * | tiorock quit (Changing host) |
13:39:55 | * | tiorock joined #nim |
13:39:55 | * | rockcavera is now known as Guest5429 |
13:39:55 | * | tiorock is now known as rockcavera |
13:40:09 | * | Guest5429 quit (Ping timeout: 276 seconds) |
13:40:28 | * | flynn joined #nim |
13:46:44 | * | flynn quit (Read error: Connection reset by peer) |
13:47:57 | * | flynn joined #nim |
13:50:15 | * | noeontheend joined #nim |
13:56:38 | * | flynn quit (Read error: Connection reset by peer) |
13:57:50 | * | flynn joined #nim |
14:03:47 | FromDiscord | <pmunch> Rebooted the server↵(@lantos) |
14:03:59 | FromDiscord | <pmunch> I really should look into getting us something better.. |
14:04:16 | FromDiscord | <lantos> In reply to @pmunch "I really should look": what do you mean by this? |
14:04:21 | * | lumo_e joined #nim |
14:04:57 | * | flynn quit (Read error: Connection reset by peer) |
14:06:10 | * | flynn joined #nim |
14:08:18 | FromDiscord | <demotomohiro> !eval echo static staticExec "uptime" |
14:08:21 | NimBot | 14:08:20 up 4 min, load average: 0.60, 0.80, 0.36 |
14:13:36 | FromDiscord | <deech> Any Emacs' users here? I use nim-mode via Doom Emacs (https://github.com/hlissner/doom-emacs/tree/master/modules/lang/nim) and I've noticed that indentation doesn't work well, it often goes to the beginning of the line and resists when I try to align manually with spaces. If anyone has tips on config I'd appreciate it. |
14:15:47 | * | flynn quit (Read error: Connection reset by peer) |
14:16:59 | * | flynn joined #nim |
14:22:37 | * | flynn quit (Read error: Connection reset by peer) |
14:23:49 | * | flynn joined #nim |
14:30:04 | * | flynn quit (Read error: Connection reset by peer) |
14:31:17 | * | flynn joined #nim |
14:37:38 | * | flynn quit (Read error: Connection reset by peer) |
14:38:50 | * | flynn joined #nim |
14:41:10 | FromDiscord | <Jakraes> Quick question, how do you guys reduce cpu usage in while loops? My while loop is using 20% of my cpu |
14:41:21 | FromDiscord | <Jakraes> Should I just sleep for a certain time? |
14:41:57 | FromDiscord | <Rika> Why do you want to reduce usage? Are you waiting by spinning? |
14:42:08 | FromDiscord | <Rika> You can do sleep yes |
14:43:18 | FromDiscord | <Jakraes> Because it's just a terminal game, it shouldn't be using that much cpu tbh |
14:43:18 | FromDiscord | <pmunch> Get a better server↵(@lantos) |
14:43:31 | FromDiscord | <Jakraes> Yeah I'll try sleep |
14:43:43 | FromDiscord | <Phil> In reply to @pmunch "Get a better server": Ah, is your stuff running on the equivalent of a Linode 5$/month plan? |
14:44:05 | FromDiscord | <Phil> Which is basically you get a potato that can serve webpages with 20 gigs of storage space |
14:45:38 | * | flynn quit (Read error: Connection reset by peer) |
14:46:24 | FromDiscord | <Jakraes> Yeah sleep worked, went from 20 to 10 |
14:46:50 | * | flynn joined #nim |
14:47:52 | FromDiscord | <Jakraes> Still, it's pretty weird how much cpu it uses |
14:53:18 | FromDiscord | <TricolorHen061> Is it feasible to write an operating system in Nim |
14:53:21 | FromDiscord | <TricolorHen061> (edit) "Nim" => "Nim?" |
14:54:08 | FromDiscord | <pmunch> Yes, there has even been written one↵(@TricolorHen061) |
14:54:18 | FromDiscord | <pmunch> Just a toy one though |
14:54:50 | FromDiscord | <pmunch> Why is it weird? You tell it to go as fast as it can, so that's exactly what it does↵(@Jakraes) |
14:55:09 | * | flynn quit (Read error: Connection reset by peer) |
14:55:11 | FromDiscord | <Jakraes> Yeah that is true |
14:55:26 | FromDiscord | <pmunch> No idea actually, it's Dom who set it up↵(@Phil) |
14:55:33 | FromDiscord | <Jakraes> I need to create some sort of fps lock |
14:55:42 | FromDiscord | <pmunch> But the machine is pretty potato |
14:56:15 | FromDiscord | <pmunch> @Jakraes\: is there stuff always happening on screen? |
14:56:21 | * | flynn joined #nim |
14:56:25 | FromDiscord | <pmunch> Or just when the user provides input? |
14:56:26 | FromDiscord | <Jakraes> Yup |
14:56:45 | FromDiscord | <Jakraes> There's something constantly being drawn on screen |
14:57:07 | FromDiscord | <pmunch> An FPS lock is trivial enough, just time how long this iteration of the loop took, figure out how long it should take given the FPS you want, and then sleep the remainder |
14:58:08 | FromDiscord | <TricolorHen061> Yeah, but it wouldn't be feasible to write a real one in it, would it? |
14:58:21 | FromDiscord | <huantian> Define feasible |
14:58:55 | FromDiscord | <TricolorHen061> If Linux was written in Nim would it be as popular as it today? |
14:59:10 | FromDiscord | <TricolorHen061> That's my "feasible" |
14:59:29 | FromDiscord | <TricolorHen061> (edit) "Nim" => "Nim," | "it" => "Linux" |
14:59:29 | FromDiscord | <pmunch> Sure, why not? |
14:59:31 | FromDiscord | <Rika> How would that have happened |
14:59:47 | FromDiscord | <TricolorHen061> It couldn't because t didn't exist |
14:59:53 | FromDiscord | <TricolorHen061> I'm just saying IF it was |
14:59:56 | FromDiscord | <Rika> Well I don’t see why you can’t |
15:00:01 | FromDiscord | <Rika> You would just need a lot of planning |
15:00:06 | FromDiscord | <TricolorHen061> Like will it be slow |
15:00:16 | FromDiscord | <Rika> Slow is dependent on implementation |
15:00:18 | FromDiscord | <Rika> Not language |
15:00:36 | FromDiscord | <pmunch> Nim can be as fast as C |
15:00:42 | FromDiscord | <pmunch> So that wouldn't be an issue |
15:00:56 | FromDiscord | <Rika> Lua the language is not slow, the Lua reference implementation “is”, compared to LuaJIT |
15:01:34 | FromDiscord | <Rika> Speed can evolve as time passes, even if the language does not ultimately |
15:02:06 | * | drewr quit (Remote host closed the connection) |
15:02:40 | FromDiscord | <pmunch> Nim could even end up being faster if there are slow patterns in the Linux codebase which could be replaced by faster patterns by templates or macros |
15:04:00 | FromDiscord | <Rika> There are situations where unrolled code is slower than rolled code, like when your constraint is memory and not the CPU |
15:04:56 | * | flynn quit (Read error: Connection reset by peer) |
15:06:07 | * | flynn joined #nim |
15:06:24 | * | slowButPresent joined #nim |
15:12:20 | * | flynn quit (Read error: Connection reset by peer) |
15:13:32 | * | flynn joined #nim |
15:20:39 | * | flynn quit (Read error: Connection reset by peer) |
15:21:51 | * | flynn joined #nim |
15:26:59 | * | flynn quit (Read error: Connection reset by peer) |
15:28:10 | * | flynn joined #nim |
15:29:03 | * | PMunch joined #nim |
15:34:53 | * | flynn quit (Read error: Connection reset by peer) |
15:36:05 | * | flynn joined #nim |
15:41:49 | * | flynn quit (Read error: Connection reset by peer) |
15:43:00 | * | flynn joined #nim |
15:43:51 | FromDiscord | <b4mbus> am I blind or does Nim stdlib really does not have any generic `.each`/`.eachIt` or `.forEach`/`.forEachIt`? |
15:44:30 | FromDiscord | <b4mbus> why cant I `collection.filterIt(it.sth == 0).eachIt(function_call(it))` or whatnot |
15:47:03 | FromDiscord | <Phil> There are Filter etc in sequtils, but regarding a foreach loop that looks the way map, filter and Co look I think you're out of luck |
15:47:37 | * | flynn quit (Read error: Connection reset by peer) |
15:48:29 | FromDiscord | <b4mbus> alright, `[1,2,3,4,5].filterIt(it mod 2 == 0).apply(echo)` |
15:48:43 | FromDiscord | <b4mbus> how come that doesn't work? There's `apply` for proc's that dont mutate |
15:48:49 | * | flynn joined #nim |
15:49:07 | FromDiscord | <b4mbus> bruh theres half the functional world but not `each` lol |
15:49:48 | FromDiscord | <Phil> I think that's because there's already for in loops that do that job |
15:50:30 | FromDiscord | <b4mbus> yeah but why should I use a for loop if I could use a fitting functional style algorithm that does that.. |
15:50:38 | FromDiscord | <b4mbus> aight whatever |
15:51:16 | FromDiscord | <Phil> I wonder if somebody made a package for that |
15:55:34 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=3VrU |
15:55:35 | * | flynn quit (Read error: Connection reset by peer) |
15:56:48 | * | flynn joined #nim |
15:57:49 | FromDiscord | <b4mbus> ... |
16:02:27 | FromDiscord | <Daniel> https://castillodel.github.io/compile-time-evaluation/ |
16:02:27 | FromDiscord | <Solitude> In reply to @b4mbus "am I blind or": map? |
16:02:50 | FromDiscord | <b4mbus> map is map |
16:02:55 | FromDiscord | <b4mbus> Im not talking about map |
16:02:59 | FromDiscord | <b4mbus> Im talking about for each :p |
16:03:10 | FromDiscord | <Solitude> yeah, in my brain map did somehting else |
16:03:19 | * | flynn quit (Read error: Connection reset by peer) |
16:04:30 | * | flynn joined #nim |
16:08:25 | FromDiscord | <Alea> In reply to @pmunch "An FPS lock is": I've just gone through this, it's not quite that easy because sleep alone isn't precise enough for frame pacing |
16:08:46 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3VrW |
16:08:47 | FromDiscord | <b4mbus> hmm |
16:09:09 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3VrX |
16:11:04 | * | flynn quit (Read error: Connection reset by peer) |
16:11:38 | FromDiscord | <Solitude> and? |
16:12:17 | * | flynn joined #nim |
16:12:20 | FromDiscord | <b4mbus> and Im wondering why cant I do that |
16:12:53 | FromDiscord | <b4mbus> sent a code paste, see https://play.nim-lang.org/#ix=3VrY |
16:13:01 | FromDiscord | <b4mbus> but it's sink, some kind of Nim's move semantics iirc |
16:13:12 | FromDiscord | <Solitude> why, your giggitycollector doesnt have add proc |
16:13:16 | FromDiscord | <Solitude> why would that fit |
16:13:49 | FromDiscord | <b4mbus> ah, sry |
16:14:20 | FromDiscord | <b4mbus> `seq` doesnt have too apparently ;d |
16:14:45 | FromDiscord | <Solitude> what |
16:15:35 | FromDiscord | <b4mbus> https://media.discordapp.net/attachments/371759389889003532/965646782702972928/unknown.png |
16:15:37 | FromDiscord | <b4mbus> idk u see the code.. |
16:15:56 | FromDiscord | <Solitude> your collector is let |
16:16:01 | FromDiscord | <Solitude> read a tutorial maybe? |
16:16:29 | FromDiscord | <Phil> Let variables are immutable, see the lowest set of errors |
16:16:30 | FromDiscord | <b4mbus> hmm I happened to forget that indeed |
16:17:53 | FromDiscord | <demotomohiro> @Jakraes If you are using OpenGL, I think wglSwapIntervalEXT/glXSwapIntervalEXT is easiest way to keep fps: https://www.khronos.org/opengl/wiki/Swap_Interval |
16:19:06 | * | flynn quit (Read error: Connection reset by peer) |
16:20:18 | * | flynn joined #nim |
16:21:09 | * | fredrikhr joined #nim |
16:25:19 | * | noeontheend quit (Ping timeout: 256 seconds) |
16:25:45 | * | flynn quit (Read error: Connection reset by peer) |
16:26:56 | * | flynn joined #nim |
16:30:34 | * | flynn quit (Read error: Connection reset by peer) |
16:31:30 | FromDiscord | <dom96> In reply to @pmunch "Get a better server": what are we being limited by with the current server? |
16:31:37 | FromDiscord | <dom96> is it not just the playground crashing? |
16:31:45 | * | flynn joined #nim |
16:32:30 | PMunch | Well it does keep running out of storage |
16:32:46 | PMunch | And if too many people use it at once it runs out of memory/cpu as well |
16:33:06 | PMunch | I've had to limit each process quite severely in order to not starve each user |
16:34:50 | FromDiscord | <dom96> good timing on this though, our Digital Ocean credits are running out |
16:35:48 | * | flynn quit (Read error: Connection reset by peer) |
16:36:59 | * | flynn joined #nim |
16:39:36 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3Vsa |
16:39:37 | FromDiscord | <codic> is there any workaround for tihs? |
16:39:39 | FromDiscord | <codic> sent a code paste, see https://paste.rs/NZs |
16:39:40 | FromDiscord | <codic> (edit) "tihs?" => "this?" |
16:43:27 | * | flynn quit (Read error: Connection reset by peer) |
16:44:38 | * | flynn joined #nim |
16:45:17 | FromDiscord | <demotomohiro> Add dpy parameter to that proc and pass it as third argument of createThread? |
16:46:02 | FromDiscord | <demotomohiro> By the way, XQueryPointer is thread safe? |
16:46:10 | FromDiscord | <Jakraes> In reply to @demotomohiro "<@291701542694944771> If you are": Ah nah nah, I'm just using the good ol' windows terminal |
16:47:39 | FromDiscord | <Jakraes> Also, I'm curious, can nim create windows all by itself? I was wondering if it was possible to create a terminal window to draw on with a defined size and font size |
16:48:01 | FromDiscord | <demotomohiro> @Jakraes Then you cannot use wglSwapIntervalExt. |
16:48:10 | FromDiscord | <Jakraes> Yup, that's unfortunate |
16:48:59 | FromDiscord | <ShalokShalom> First result when I type 'proc' in the search bar of the the manual: ↵jsffi: `.()`[K: cstring; V: proc](obj: JsAssoc[K, V]; field: untyped; args: varargs[untyped]): auto |
16:49:08 | FromDiscord | <ShalokShalom> Documentation 1A |
16:49:14 | FromDiscord | <ShalokShalom> 👍 😆 |
16:49:27 | FromDiscord | <ShalokShalom> (edit) "↵jsffi:" => "↵`jsffi:" | "auto" => "auto`" |
16:49:31 | FromDiscord | <codic> In reply to @demotomohiro "By the way, XQueryPointer": Xlib is thread-safe enough I think for getting things, certainly not for non-pure calls though (which send X events) |
16:49:34 | FromDiscord | <codic> thanks! |
16:49:44 | * | flynn quit (Read error: Connection reset by peer) |
16:50:56 | * | flynn joined #nim |
16:51:05 | * | fallback quit (Ping timeout: 248 seconds) |
16:51:59 | FromDiscord | <demotomohiro> @Jakraes Nim can use any windows API. So that should be possible if there is APIs to create such a terminal window. |
16:55:57 | FromDiscord | <codic> In reply to @codic "Xlib is thread-safe enough": lolno |
16:55:59 | FromDiscord | <codic> [xcb] Unknown sequence number while appending request↵[xcb] You called XInitThreads, this is not your fault↵[xcb] Aborting, sorry about that. |
16:56:31 | FromDiscord | <codic> i wish I used xcb now |
16:57:07 | * | flynn quit (Read error: Connection reset by peer) |
16:58:19 | * | flynn joined #nim |
17:01:38 | FromDiscord | <Solitude> In reply to @ShalokShalom "First result when I": manual doesnt have search bar. the only search bar there is searches stdlib. |
17:02:29 | FromDiscord | <m4ul3r> sent a code paste, see https://paste.rs/Suo |
17:03:27 | FromDiscord | <ShalokShalom> In reply to @Solitude "manual doesnt have search": Yeah, I figured so much. |
17:03:36 | FromDiscord | <ShalokShalom> Thanks |
17:04:12 | FromDiscord | <Solitude> In reply to @m4ul3r "I have an issue": you have two `thing`'s in same scope. also, what? |
17:04:29 | * | flynn quit (Remote host closed the connection) |
17:05:41 | * | flynn joined #nim |
17:08:48 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=3Vsk |
17:09:04 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#ix=3Vsk" => "https://play.nim-lang.org/#ix=3Vsl" |
17:10:20 | FromDiscord | <Solitude> sorry, i dont understand whats the problem is and why passing data you work on to a function as parameter is an issue. |
17:12:13 | * | flynn quit (Read error: Connection reset by peer) |
17:13:25 | * | flynn joined #nim |
17:14:25 | FromDiscord | <m4ul3r> I'm just wanting to do weird things with the variable, but I realized I should just move everything outside of `when isMainModule` to do what I want - sorry! |
17:19:26 | * | flynn quit (Read error: Connection reset by peer) |
17:20:37 | * | flynn joined #nim |
17:25:14 | * | flynn quit (Read error: Connection reset by peer) |
17:26:26 | * | flynn joined #nim |
17:27:54 | * | Gustavo6046 joined #nim |
17:33:02 | * | flynn quit (Read error: Connection reset by peer) |
17:34:15 | * | flynn joined #nim |
17:35:47 | FromDiscord | <Yardanico> New thread by LLN13: Optimize parsing large file line-by-line, see https://forum.nim-lang.org/t/9115 |
17:35:53 | FromDiscord | <Yardanico> (post was moderated so bot missed it :P) |
17:39:19 | FromDiscord | <codic> `` |
17:39:33 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3Vsy |
17:39:47 | FromDiscord | <codic> why can't I cast evMasks to ptr XIEventMask? the compiler spits out an error |
17:39:54 | FromDiscord | <codic> ("expression cannot be cast to ptr XIEventMask") |
17:39:58 | FromDiscord | <Yardanico> because that's not the correct way of taking an address of an array value |
17:40:02 | FromDiscord | <codic> oh |
17:40:03 | FromDiscord | <Yardanico> you should use` addr evMasks[0]` |
17:40:17 | FromDiscord | <codic> yeah never mind im just dumb |
17:40:29 | FromDiscord | <codic> thanks! |
17:40:35 | * | flynn quit (Read error: Connection reset by peer) |
17:40:38 | FromDiscord | <Yardanico> In reply to @m4ul3r "I'm just wanting to": if you misunderstood, Solitude first told you that your code doesn't work because `when` does NOT create a new scope |
17:40:51 | FromDiscord | <Yardanico> so instead of using `when` you can declare a main procedure: |
17:41:10 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Vsz |
17:41:27 | FromDiscord | <Yardanico> but shadowing global variables is still a bit wrong, although not that big of a deal |
17:41:48 | * | flynn joined #nim |
17:43:21 | FromDiscord | <m4ul3r> In reply to @Yardanico "if you misunderstood, Solitude": Thanks, this makes it more clear! |
17:43:55 | FromDiscord | <Yardanico> and generally usage of `when isMainModule` is kind of limited |
17:44:05 | FromDiscord | <Yardanico> the only intended usage if you want to have the same file as both a library and an application |
17:44:24 | FromDiscord | <Yardanico> and depending if you compile that file as the main module or not, it'll compile code inside `when isMainModule` |
17:44:42 | FromDiscord | <Yardanico> so if you only intend to it as your main application file, `when isMainModule` isn't needed |
17:45:00 | FromDiscord | <m4ul3r> I come from python, so i'm under the impression that is similar to `if name == "main":` |
17:45:18 | FromDiscord | <Yardanico> well, it is kind of, but it's compile-time only, so doesn't make much sense to use it |
17:45:23 | FromDiscord | <Yardanico> and generally it's not that big of an idiom in Nim |
17:45:29 | FromDiscord | <Yardanico> most apps/libs don't use it |
17:46:45 | * | flynn quit (Read error: Connection reset by peer) |
17:47:58 | * | flynn joined #nim |
17:49:51 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3VsA |
17:50:07 | FromDiscord | <Yardanico> `evMasks[0].mask = cast[ptr cuchar](maskBytes) # ptr uint8 won't work here :(` this is wrong as well |
17:50:12 | FromDiscord | <Yardanico> addr maskBytes[0] |
17:50:24 | FromDiscord | <codic> damnit lol |
17:50:30 | FromDiscord | <Yardanico> you're casting the array _itself_ to the pointer type, you're not getting an address |
17:50:44 | FromDiscord | <Yardanico> also you don't need `cast[ptr XIEventMask](addr evMasks[0]),` cast here |
17:50:48 | FromDiscord | <Yardanico> just `addr evMasks[0]` will work |
17:50:55 | FromDiscord | <codic> i get it, I just always forget to do it |
17:54:30 | * | flynn quit (Read error: Connection reset by peer) |
17:55:42 | * | flynn joined #nim |
17:58:42 | FromDiscord | <ShalokShalom> So far as I can tell, only the documentation overview page is part of the repo. Tutorials and a ton of other stuff is not open source? |
17:58:43 | FromDiscord | <ShalokShalom> https://github.com/nim-lang/website/tree/master/jekyll |
18:01:04 | FromDiscord | <Solitude> tutorials and all the other stuff is right in the nim repo |
18:01:14 | FromDiscord | <ShalokShalom> Like, of the compiler? |
18:01:19 | FromDiscord | <Solitude> yes |
18:02:37 | * | flynn quit (Read error: Connection reset by peer) |
18:03:50 | * | flynn joined #nim |
18:10:36 | * | flynn quit (Read error: Connection reset by peer) |
18:11:50 | * | flynn joined #nim |
18:17:51 | * | flynn quit (Read error: Connection reset by peer) |
18:19:03 | * | flynn joined #nim |
18:24:50 | * | flynn quit (Read error: Connection reset by peer) |
18:24:52 | * | audiophile_ joined #nim |
18:26:03 | * | flynn joined #nim |
18:29:29 | * | audiophile_ quit (Client Quit) |
18:29:46 | * | jmdaemon joined #nim |
18:30:30 | PMunch | @ShalokShalom, they should all be open source, any tutorial in particular you are looking for? |
18:31:14 | * | flynn quit (Read error: Connection reset by peer) |
18:32:07 | FromDiscord | <Yardanico> In reply to @ShalokShalom "Like, of the compiler?": it's not just the compiler, nim is more or less a "monorepo" |
18:32:17 | FromDiscord | <Yardanico> all docs (even the ones that are separate .rst files), stdlib, compiler, tests are in the same repo |
18:32:27 | * | flynn joined #nim |
18:34:06 | FromDiscord | <ShalokShalom> Thanks all, I already found it |
18:34:37 | FromDiscord | <ShalokShalom> Basicially, the website is in the website repo, unless that part that is not |
18:34:42 | FromDiscord | <ShalokShalom> That is in the monorepo. |
18:34:58 | FromDiscord | <Yardanico> the website is in the separate repo, yes (the blog and landing basically) |
18:35:02 | FromDiscord | <Yardanico> actual docs are in the monorepo |
18:35:42 | FromDiscord | <ShalokShalom> I guess it would make sense to mention on the website repo, that the docs are in the nim repo. |
18:35:49 | FromDiscord | <ShalokShalom> So people dont look for it where it isnt. |
18:37:18 | FromDiscord | <ShalokShalom> I really love that quote at the beginning of the second part of the tutorial: ↵"Repetition renders the ridiculous reasonable." -- Norman Wildberger" |
18:37:41 | FromDiscord | <ShalokShalom> It`s kinda self-ironic. 😆 |
18:37:42 | FromDiscord | <Solitude> which doc source you were looking for? |
18:37:47 | FromDiscord | <ShalokShalom> All them. |
18:37:54 | FromDiscord | <Solitude> most pages i look have source link at top |
18:37:59 | FromDiscord | <ShalokShalom> I download them and try to reorganize them |
18:38:01 | FromDiscord | <Solitude> https://media.discordapp.net/attachments/371759389889003532/965682631171796992/unknown.png |
18:38:09 | * | flynn quit (Read error: Connection reset by peer) |
18:38:11 | FromDiscord | <ShalokShalom> Yes, good call. |
18:38:19 | FromDiscord | <ShalokShalom> I started from the documentation landing page |
18:38:28 | FromDiscord | <ShalokShalom> Thats why I landed at the /website repo |
18:39:21 | * | flynn joined #nim |
18:40:14 | FromDiscord | <Yardanico> btw @ShalokShalom i know you've been around on this server for almost 2 years, have you made anything in nim yet? i'm just curious |
18:45:13 | * | flynn quit (Read error: Connection reset by peer) |
18:46:25 | FromDiscord | <Solitude> In reply to @Yardanico "btw <@208199869301522432> i know": thats codeshaming and its very insensitive, check chat rules number 23.2 |
18:46:26 | * | flynn joined #nim |
18:46:35 | FromDiscord | <Yardanico> i'm sowwy |
18:48:20 | FromDiscord | <ShalokShalom> Its fine. |
18:48:51 | FromDiscord | <ShalokShalom> I had been on this server for 2 years, while most of the time not following. |
18:49:08 | FromDiscord | <Yardanico> it's just kind of weird that you've talked about nim and docs multiple times, but then just disappeared :P |
18:49:15 | FromDiscord | <ShalokShalom> In those years, I ported a small part of a code, that I love to port, whenever I find a language that interests me. |
18:49:21 | FromDiscord | <ShalokShalom> Otherwise not, no. 🙂 |
18:49:41 | FromDiscord | <Yardanico> because IMO it's easier to follow docs and stuff if you're actually writing some project in the language |
18:49:47 | FromDiscord | <Yardanico> not just reading docs for the sake of docs |
18:49:50 | FromDiscord | <ShalokShalom> In reply to @Yardanico "it's just kind of": I dont want to invest too much time into projects, that I leave then anyway again. |
18:50:14 | FromDiscord | <ShalokShalom> In reply to @Yardanico "because IMO it's easier": Well, its a bit of a chicken and hen problem, here. |
18:50:34 | FromDiscord | <Yardanico> and generally it's much easier to learn the language if you already want to write something practical in it |
18:50:38 | FromDiscord | <Yardanico> be it some simple CLI tool or a bot |
18:50:40 | FromDiscord | <ShalokShalom> I read docs for the sake of understanding. |
18:51:02 | FromDiscord | <Yardanico> but the docs are meant to be used when you're writing Nim code as well, so you can understand the differences |
18:51:03 | FromDiscord | <ShalokShalom> In reply to @Yardanico "and generally it's much": I am a newbie to programming in general. |
18:51:04 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=3VsO |
18:51:09 | FromDiscord | <Yardanico> In reply to @sOkam! "Is there another way": just use 'u32 for the first element |
18:51:14 | FromDiscord | <Yardanico> other elements will then be 'u32 as well implicitly |
18:51:28 | FromDiscord | <Solitude> the hell you need understanding for if you're not writing anything. manual is not a bible (it is). |
18:51:43 | FromDiscord | <sOkam!> In reply to @Yardanico "just use 'u32 for": can i signal it in some other way out of the numbers? |
18:51:53 | FromDiscord | <ShalokShalom> I am writing something, once I understand. |
18:52:20 | FromDiscord | <Yardanico> In reply to @ShalokShalom "I am writing something,": IMO the bare basics of nim are easy to grasp, and then you can just "follow the flow" and learn the more advanced concepts as you need them |
18:52:23 | FromDiscord | <ShalokShalom> Issue is, some languages use certain terms in very different ways. Particularly Nim, if I may say so |
18:52:34 | FromDiscord | <ShalokShalom> In reply to @Yardanico "IMO the bare basics": Everybody says so. |
18:52:53 | FromDiscord | <Yardanico> have you seen https://narimiran.github.io/nim-basics/ ? |
18:52:58 | FromDiscord | <ShalokShalom> If it would be that easy, programing would be far more accessible to the public. |
18:53:01 | FromDiscord | <ShalokShalom> Yep |
18:53:03 | FromDiscord | <ShalokShalom> Its good. |
18:53:11 | FromDiscord | <Solitude> and programming isnt? |
18:53:11 | FromDiscord | <Yardanico> I'm speaking from my experience as I learned Nim by writing a simple social network bot |
18:53:17 | FromDiscord | <Yardanico> with previous python experience |
18:53:30 | * | flynn quit (Read error: Connection reset by peer) |
18:53:33 | FromDiscord | <Yardanico> yes docs don't cover everything, but that's why the forum and this server (irc/etc) exist |
18:53:36 | FromDiscord | <Solitude> programming is probably the most accessible craft there is |
18:53:56 | FromDiscord | <Yardanico> In reply to @sOkam! "can i signal it": don't think so, maybe with a macro or a template |
18:53:56 | FromDiscord | <ShalokShalom> For the sake of the topic: I can simply port these lines of fsharp with let bindings in Nim, yes? https://github.com/ShalokShalom/fsharp-nim/blob/master/dev-aspect.nim#L65= |
18:53:58 | FromDiscord | <sOkam!> In reply to @ShalokShalom "I am writing something,": the best way to start is to write exercises when following a tutorial. its boring, but its really useful↵and then, you will slowly start to see what you could do with what you have learned |
18:54:22 | FromDiscord | <ShalokShalom> I am on it. |
18:54:35 | FromDiscord | <ShalokShalom> In reply to @Solitude "programming is probably the": Physically. |
18:54:42 | * | flynn joined #nim |
18:54:47 | FromDiscord | <Solitude> anythinglly |
18:54:50 | FromDiscord | <sOkam!> but learning programming without writing (even if you are just writing the tutorial like a parrot) its very unlikely to happen |
18:54:51 | FromDiscord | <ShalokShalom> And for some people, who are of a specific studing type. |
18:55:03 | FromDiscord | <Yardanico> In reply to @sOkam! "but learning programming without": exactly |
18:55:04 | FromDiscord | <ShalokShalom> In reply to @sOkam! "but learning programming without": I am not doing that. |
18:55:08 | FromDiscord | <Solitude> In reply to @ShalokShalom "And for some people,": thats gigacope, everyone can learn, people just make excuses |
18:55:29 | FromDiscord | <ShalokShalom> Its about specific approaches |
18:55:32 | FromDiscord | <Yardanico> In reply to @ShalokShalom "For the sake of": yes https://nim-lang.org/docs/tut1.html#advanced-types-objects |
18:55:37 | FromDiscord | <ShalokShalom> Like, there are visual learners, etc |
18:55:42 | FromDiscord | <Solitude> In reply to @ShalokShalom "Like, there are visual": there are not |
18:55:56 | FromDiscord | <ShalokShalom> Well, thats well documented in social studies. |
18:56:00 | FromDiscord | <sOkam!> In reply to @Solitude "there are not": hey, i am 🙂 |
18:56:01 | FromDiscord | <Solitude> In reply to @ShalokShalom "Like, there are visual": no, its not |
18:56:38 | FromDiscord | <Solitude> not a single actual study has concerete conclusions about visual/pissual leaners. thats borderline astrology. |
18:56:54 | FromDiscord | <sOkam!> 🤷♂️ |
18:56:59 | FromDiscord | <ShalokShalom> I assume I could even use const |
18:59:59 | * | flynn quit (Read error: Connection reset by peer) |
19:01:12 | * | flynn joined #nim |
19:02:28 | FromDiscord | <0ffh> Any trick to quickly reset the values in a preallocated sequence (thinge memset), or do I have to stick with a loop? |
19:02:44 | FromDiscord | <0ffh> (edit) "(thinge" => "(think" |
19:03:59 | FromDiscord | <Solitude> i think if you setLen 0 then setLen previous length, sequence gets zeroed, but i would just loop |
19:04:16 | FromDiscord | <Yardanico> yeah sol is right there |
19:04:31 | FromDiscord | <Yardanico> for efficiency use setLen, for easy-to-readiness use a loop |
19:04:32 | FromDiscord | <Solitude> or apply(reset) from sequtils |
19:04:38 | FromDiscord | <Yardanico> a C compiler should probably optimize it well enough |
19:04:49 | FromDiscord | <Yardanico> Clueless |
19:06:00 | * | flynn quit (Read error: Connection reset by peer) |
19:06:37 | FromDiscord | <0ffh> Okay, I think I'll time it and see if there's a measurable difference. Thanks! |
19:06:54 | FromDiscord | <Solitude> In reply to @Yardanico "for efficiency use setLen,": i dont think it would be more efficient. unless compiler optimises zeroing of non-ref values. |
19:07:12 | * | flynn joined #nim |
19:07:53 | FromDiscord | <Ayy Lmao> Is there a way to do something like `import foo except ` ? |
19:08:25 | FromDiscord | <Yardanico> you mean import a module so you can only refer to symbols by the module name? |
19:08:33 | FromDiscord | <Ayy Lmao> In reply to @Yardanico "you mean import a": Yeah |
19:08:34 | FromDiscord | <Yardanico> that's `from foo import nil` |
19:08:41 | FromDiscord | <Yardanico> but don't forget that some nim features won't work with this |
19:08:50 | FromDiscord | <Yardanico> like operators, UFCS and similar |
19:08:57 | FromDiscord | <Yardanico> (edit) "but don't forget that some nim features won't work ... with" added "well" |
19:09:16 | FromDiscord | <Yardanico> In reply to @Solitude "i dont think it": yeah you're right, nimZeroMem is also a loop in the end |
19:09:27 | FromDiscord | <Yardanico> ah actually no |
19:09:34 | FromDiscord | <Yardanico> with useLibC which is the default nim just calls C's `memset` |
19:09:41 | FromDiscord | <Ayy Lmao> Cool, thanks! Yeah I didn't think about operators and such. Maybe it's best to stick with explicit excluding of symbols. |
19:14:46 | * | flynn quit (Read error: Connection reset by peer) |
19:15:41 | * | ehmry quit (Remote host closed the connection) |
19:15:58 | * | flynn joined #nim |
19:16:58 | * | ehmry joined #nim |
19:17:56 | * | fallback joined #nim |
19:20:50 | * | flynn quit (Read error: Connection reset by peer) |
19:21:28 | FromDiscord | <ShalokShalom> In reply to @Yardanico "yes https://nim-lang.org/docs/tut1.html#advanced-ty": But how would I do the nesting? Just indenting and another let? |
19:21:47 | FromDiscord | <Yardanico> MyObject(myfield: MyOtherObject(myotherfield: 1)) |
19:21:51 | FromDiscord | <Yardanico> and you can indent this |
19:22:02 | FromDiscord | <ShalokShalom> like, when describing the type of a type |
19:22:03 | * | flynn joined #nim |
19:22:27 | FromDiscord | <ShalokShalom> So all in one line (ugs) or indenting |
19:22:30 | FromDiscord | <ShalokShalom> Roger |
19:28:12 | * | flynn quit (Read error: Connection reset by peer) |
19:29:24 | * | flynn joined #nim |
19:34:10 | * | flynn quit (Read error: Connection reset by peer) |
19:35:22 | * | flynn joined #nim |
19:40:18 | * | flynn quit (Read error: Connection reset by peer) |
19:41:31 | * | flynn joined #nim |
19:47:02 | * | flynn quit (Read error: Connection reset by peer) |
19:48:15 | * | flynn joined #nim |
19:52:42 | * | flynn quit (Read error: Connection reset by peer) |
19:53:54 | * | flynn joined #nim |
20:00:42 | * | flynn quit (Read error: Connection reset by peer) |
20:01:55 | * | flynn joined #nim |
20:05:16 | * | flynn quit (Read error: Connection reset by peer) |
20:06:29 | * | flynn joined #nim |
20:07:41 | * | PMunch quit (Quit: leaving) |
20:08:08 | * | PMunch joined #nim |
20:10:13 | * | PMunch quit (Client Quit) |
20:12:12 | * | flynn quit (Read error: Connection reset by peer) |
20:13:26 | * | flynn joined #nim |
20:19:58 | * | flynn quit (Read error: Connection reset by peer) |
20:21:00 | FromDiscord | <creikey> is std/coro used anywhere? |
20:21:12 | * | flynn joined #nim |
20:23:12 | * | drewr joined #nim |
20:26:44 | * | flynn quit (Read error: Connection reset by peer) |
20:27:27 | * | vicecea quit (Remote host closed the connection) |
20:27:57 | * | flynn joined #nim |
20:27:58 | * | vicecea joined #nim |
20:32:59 | * | fredrikhr quit (Ping timeout: 240 seconds) |
20:34:17 | * | flynn quit (Read error: Connection reset by peer) |
20:35:31 | * | flynn joined #nim |
20:40:40 | * | flynn quit (Read error: Connection reset by peer) |
20:41:53 | * | flynn joined #nim |
20:48:14 | * | flynn quit (Read error: Connection reset by peer) |
20:49:26 | * | flynn joined #nim |
20:54:06 | * | flynn quit (Read error: Connection reset by peer) |
20:55:19 | * | flynn joined #nim |
21:00:44 | * | flynn quit (Read error: Connection reset by peer) |
21:01:57 | * | flynn joined #nim |
21:07:41 | * | flynn quit (Read error: Connection reset by peer) |
21:08:54 | * | flynn joined #nim |
21:14:17 | * | flynn quit (Read error: Connection reset by peer) |
21:15:30 | * | flynn joined #nim |
21:20:20 | * | flynn quit (Read error: Connection reset by peer) |
21:21:33 | * | flynn joined #nim |
21:25:40 | * | flynn quit (Read error: Connection reset by peer) |
21:26:52 | * | flynn joined #nim |
21:34:27 | * | flynn quit (Read error: Connection reset by peer) |
21:35:40 | * | flynn joined #nim |
21:41:46 | * | flynn quit (Read error: Connection reset by peer) |
21:42:10 | NimEventer | New thread by Krakengore: Binding a closure to a std::function to call it from C++... safe to do ?, see https://forum.nim-lang.org/t/9116 |
21:42:59 | * | flynn joined #nim |
21:49:10 | * | flynn quit (Read error: Connection reset by peer) |
21:50:23 | * | flynn joined #nim |
21:55:27 | * | flynn quit (Read error: Connection reset by peer) |
21:56:39 | * | flynn joined #nim |
22:05:46 | * | flynn quit (Read error: Connection reset by peer) |
22:07:00 | * | flynn joined #nim |
22:09:37 | FromDiscord | <!Patitotective> hey @Rika how are you doing with the callbacks cursed code? :) |
22:13:20 | * | flynn quit (Read error: Connection reset by peer) |
22:14:32 | * | flynn joined #nim |
22:19:58 | * | flynn quit (Read error: Connection reset by peer) |
22:21:11 | * | flynn joined #nim |
22:27:34 | * | flynn quit (Read error: Connection reset by peer) |
22:28:46 | * | flynn joined #nim |
22:34:44 | * | flynn quit (Read error: Connection reset by peer) |
22:35:57 | * | flynn joined #nim |
22:42:06 | * | flynn quit (Read error: Connection reset by peer) |
22:42:11 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
22:43:18 | * | flynn joined #nim |
22:48:37 | * | flynn quit (Read error: Connection reset by peer) |
22:49:50 | * | flynn joined #nim |
22:54:35 | FromDiscord | <Yardanico> Does anyone use Kate for Nim? I'm curious how usable it is, especially with nimlsp |
22:54:48 | FromDiscord | <Elegantbeef> It's pretty good |
22:55:58 | * | flynn quit (Read error: Connection reset by peer) |
22:57:11 | * | flynn joined #nim |
23:02:49 | * | neceve quit (Ping timeout: 246 seconds) |
23:05:17 | * | flynn quit (Read error: Connection reset by peer) |
23:06:31 | * | flynn joined #nim |
23:12:08 | * | flynn quit (Read error: Connection reset by peer) |
23:13:05 | * | xet7 quit (Remote host closed the connection) |
23:13:21 | * | flynn joined #nim |
23:13:27 | * | Zectbumo joined #nim |
23:18:36 | * | flynn quit (Read error: Connection reset by peer) |
23:19:48 | * | flynn joined #nim |
23:22:18 | FromDiscord | <Yardanico> In reply to @Elegantbeef "It's pretty good": what color theme? :) |
23:23:05 | FromDiscord | <Elegantbeef> arc ark for the window and ayu-mirage for editor |
23:23:12 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/965754402600267856/image.png |
23:23:19 | FromDiscord | <Yardanico> oh nice |
23:23:20 | FromDiscord | <Elegantbeef> arc-dark\ |
23:23:30 | FromDiscord | <Yardanico> i've been checking how style colors are made for nim in kate and it's kind of weird |
23:24:57 | FromDiscord | <Yardanico> for example, why is `result` stylized according to the "Other" style in Nim highlighting |
23:25:12 | * | flynn quit (Remote host closed the connection) |
23:25:13 | FromDiscord | <Yardanico> not "Normal text" like all other variables, but "Other" specifically |
23:25:18 | FromDiscord | <Yardanico> Others |
23:26:26 | * | flynn joined #nim |
23:26:29 | FromDiscord | <Elegantbeef> No clue i dont care that much for colouring as long as it's not a single colour |
23:26:33 | FromDiscord | <Yardanico> heh |
23:26:59 | FromDiscord | <Yardanico> the Nim highlighting in Kate takes colors from the global color them really weirdly |
23:27:41 | FromDiscord | <Yardanico> e.g. it takes color for String from the global config (sic!) and uses it for ProcDefs |
23:27:49 | FromDiscord | <Yardanico> ProcDefs being name of procedures/functions |
23:28:16 | FromDiscord | <exelotl> hmm, is it really not possible to have a proc or template that takes a static int as a generic parameter? https://play.nim-lang.org/#ix=3Vu7 |
23:28:50 | FromDiscord | <Yardanico> "T: SomeInteger" means the value itself, not the type |
23:29:01 | FromDiscord | <Yardanico> or the type itself, hmm |
23:32:29 | * | flynn quit (Read error: Connection reset by peer) |
23:32:30 | FromDiscord | <Elegantbeef> Yea i dont think it's possible to take it as a generic parameter |
23:33:11 | FromDiscord | <exelotl> hmm, simplified example: https://play.nim-lang.org/#ix=3Vu9 |
23:33:20 | FromDiscord | <exelotl> it does work if you change it to `proc` |
23:33:41 | * | flynn joined #nim |
23:36:56 | FromDiscord | <Elegantbeef> I think that makes sense |
23:36:57 | FromDiscord | <Elegantbeef> Templates cannot specialize on generic values, cause they dont run any code |
23:36:57 | FromDiscord | <Elegantbeef> If you want the template to have a static parameter you include it in the parameter list |
23:38:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vua |
23:39:58 | * | flynn quit (Read error: Connection reset by peer) |
23:41:10 | * | flynn joined #nim |
23:43:12 | FromDiscord | <exelotl> :( |
23:43:44 | FromDiscord | <Elegantbeef> Unless you want to fix static variable binding |
23:44:05 | FromDiscord | <exelotl> I don't 😅 |
23:44:33 | FromDiscord | <exelotl> but my API does kinda suck if the operations can't have the same generic signature as the type |
23:45:58 | * | noeontheend joined #nim |
23:46:32 | FromDiscord | <Elegantbeef> Seems when you mix `static` and non static generic parameters it only binds by type |
23:46:49 | * | flynn quit (Read error: Connection reset by peer) |
23:47:07 | FromDiscord | <Elegantbeef> Guess i'll take a look, as i'm presently sick it's more ideal than working on anything else 😛 |
23:48:01 | * | flynn joined #nim |
23:49:45 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3Vuc |
23:50:02 | FromDiscord | <exelotl> Error: cannot instantiate: 'Fixed[T: SomeInteger, N]'; Maybe generic arguments are missing? |
23:50:12 | FromDiscord | <Elegantbeef> replace end with `auto` |
23:50:21 | FromDiscord | <exelotl> ohh |
23:51:11 | FromDiscord | <exelotl> nope |
23:52:00 | FromDiscord | <huantian> maybe cus T isn't static? |
23:52:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vud |
23:53:16 | * | flynn quit (Read error: Connection reset by peer) |
23:54:29 | * | flynn joined #nim |
23:57:12 | FromDiscord | <exelotl> ugh |
23:57:13 | FromDiscord | <exelotl> https://play.nim-lang.org/#ix=3Vuf |
23:57:21 | FromDiscord | <exelotl> doc comment was fucking things up xD |
23:58:20 | FromDiscord | <exelotl> this is super jank |
23:58:30 | FromDiscord | <exelotl> if you delete line 37 it crashes the playground |
23:58:56 | FromDiscord | <Elegantbeef> nice |