00:03:35 | * | pbsds quit (Quit: Ping timeout (120 seconds)) |
00:04:07 | * | pbsds joined #nim |
00:07:43 | FromDiscord | <pri.ivy> is there some way to give an equal amount of whitespace in between strings |
00:34:15 | FromDiscord | <albassort> Hewo |
00:34:25 | FromDiscord | <albassort> does this work on your machiens? re.match("Escape", re"U[0-9]+") |
00:34:30 | FromDiscord | <albassort> (edit) "machiens?" => "machines?" |
00:34:42 | FromDiscord | <albassort> I was talking about this last week, im now investigating |
00:34:47 | FromDiscord | <albassort> no reason this should default |
00:35:11 | FromDiscord | <albassort> Nim version: Version 2.1.1 |
00:36:33 | FromDiscord | <albassort> (edit) "default" => "segfault" |
00:36:54 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=SSYTkTGMVmoW |
00:37:04 | FromDiscord | <albassort> (edit) "https://play.nim-lang.org/#pasty=JnVyTUKxeZRw" => "https://play.nim-lang.org/#pasty=dbRYrFDkBlxA" |
00:50:06 | FromDiscord | <ta_efimova_19> I need new friends |
00:51:05 | * | arkurious joined #nim |
00:57:12 | FromDiscord | <albassort> In reply to @albassort "does this work on": I ran it in a debian docker |
00:57:18 | FromDiscord | <albassort> seems to work fine |
00:57:24 | FromDiscord | <albassort> help |
01:03:48 | FromDiscord | <albassort> https://media.discordapp.net/attachments/371759389889003532/1222350323637682186/image.png?ex=6615e573&is=66037073&hm=e08bd0f3cf4fd26cb9907513917390972fcbbecb763b22828c19da64176012bc& |
01:04:03 | FromDiscord | <albassort> help me after im doing updating my system š |
01:05:59 | FromDiscord | <patitotective> sent a code paste, see https://play.nim-lang.org/#pasty=hUECllAcTGSn |
01:06:23 | FromDiscord | <patitotective> (edit) "https://play.nim-lang.org/#pasty=WOjqNasnSAwF" => "https://play.nim-lang.org/#pasty=JOdiAkTEDxXP" |
01:06:57 | FromDiscord | <Elegantbeef> Nope a C++ map has more information |
01:07:36 | FromDiscord | <Elegantbeef> You will need to use `importcpp` |
01:07:50 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-objects |
01:09:11 | FromDiscord | <patitotective> In reply to @Elegantbeef "https://nim-lang.org/docs/manual.html#importcpp-pra": Oops, missed it. Perfect example |
01:09:16 | FromDiscord | <patitotective> (edit) "example" => "example, thanks" |
01:18:33 | * | jmdaemon quit (Ping timeout: 268 seconds) |
01:28:15 | FromDiscord | <patitotective> sent a code paste, see https://play.nim-lang.org/#pasty=pzWGuePufEZr |
01:28:54 | FromDiscord | <Elegantbeef> You could submodule the c++ then just use that path always |
01:46:05 | * | jmdaemon joined #nim |
01:52:47 | * | jmdaemon quit (Ping timeout: 264 seconds) |
02:04:33 | * | Mister_Magister quit (Ping timeout: 256 seconds) |
02:04:54 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#pasty=LzzGRRYYMZHz |
02:05:07 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#pasty=rbTunbEZKdid" => "https://play.nim-lang.org/#pasty=HKyBARuyPcEO" |
02:08:31 | * | Mister_Magister joined #nim |
02:26:35 | FromDiscord | <patitotective> In reply to @Elegantbeef "Nope a C++ map": Likewise, can a `std::string` be represented as a `cstring` or do I have to do the same (`{.importcpp: "std::string".}`)? |
02:26:55 | FromDiscord | <Elegantbeef> You need to import |
02:40:46 | FromDiscord | <patitotective> sent a code paste, see https://play.nim-lang.org/#pasty=WuMJJBuGbKvn |
02:40:52 | FromDiscord | <patitotective> Let me upload it to github |
02:43:07 | FromDiscord | <patitotective> Here it is https://github.com/Patitotective/boletin_abast/blob/main/src/trial.nim |
02:44:15 | FromDiscord | <patitotective> Maybe it has something to do with `Paragraph` being an `object of Box`, not sure if c++ inheritance can be translated just like that |
02:45:14 | * | krux02_ quit (Remote host closed the connection) |
03:15:45 | * | xutaxkamay quit (Ping timeout: 255 seconds) |
03:16:17 | * | xutaxkamay joined #nim |
03:18:25 | FromDiscord | <demotomohiro> You can learn about C++ here: https://en.cppreference.com/w/cpp |
03:19:05 | FromDiscord | <eebahn> whats the equivalent of `gorge` for runtime? |
03:21:57 | FromDiscord | <eebahn> nvm, found it! `osproc.execProcess( "cmd" )` |
03:22:48 | FromDiscord | <patitotective> In reply to @demotomohiro "You can learn about": Thanks :] |
03:28:13 | * | dtomato7 joined #nim |
03:29:36 | * | dtomato quit (Ping timeout: 268 seconds) |
03:29:36 | * | dtomato7 is now known as dtomato |
03:44:44 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
03:45:06 | * | SchweinDeBurg joined #nim |
03:50:46 | * | arkurious quit (Quit: Leaving) |
04:19:26 | NimEventer | New thread by ITwrx: Glaucus Linux, see https://forum.nim-lang.org/t/11301 |
04:24:31 | FromDiscord | <albassort> sent a code paste, see https://play.nim-lang.org/#pasty=KugmvYDnugAO |
05:36:48 | * | advesperacit joined #nim |
07:45:57 | FromDiscord | <ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=unuNinOeHngC |
07:46:31 | FromDiscord | <ezquerra> Then I could have another version of the procedure for other combinations or as a fallback |
07:50:43 | * | ntat joined #nim |
08:00:09 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#pasty=zBDvXKNZhTDX |
08:05:43 | FromDiscord | <ezquerra> Thank you @demotomohiro. In this particular example, that is the way I would do it, but for more complex conditions regular overloads result in a combinatorial explosion of functions |
08:06:18 | FromDiscord | <ezquerra> Functions which in many cases have the exact same body |
08:07:10 | FromDiscord | <ezquerra> I hoped there was some way to constrain the types on the function definition itself, i.e. to specify a relationships between type T and type K |
08:23:54 | NimEventer | New Nimble package! jsonpak - Packed ASTs for compact and efficient JSON representation, with JSON Pointer, JSON Patch support., see https://github.com/planetis-m/jsonpak |
08:42:30 | FromDiscord | <whisperecean> Hello does anybody know how I can fix this https://play.nim-lang.org/#pasty=dtlecoAWYkRH. I get a segmentation fault when the config file does not exist |
08:44:47 | FromDiscord | <Elegantbeef> Check if the file exists first and have a toctou race condition |
08:49:02 | FromDiscord | <whisperecean> The thing is I thought that one of the points of that library was to check this for me based on the fact that it's InputFile https://github.com/status-im/nim-confutils/blob/master/confutils.nim#L501 |
08:49:05 | FromDiscord | <whisperecean> but it just segfaults |
08:56:13 | * | ntat quit (Quit: Leaving) |
09:05:20 | FromDiscord | <arnetheduck> In reply to @whisperecean "Hello does anybody know": looks like a bug in faststreams, a repro/bug report would be in order |
09:11:05 | FromDiscord | <whisperecean> Ok I'll do it. Anything i can do to circumvent the problem in the meantime? Here's my build flags "-d:nimOldCaseObjects", "--mm:refc", on M1 mac |
09:12:20 | NimEventer | New thread by scippie: Cross compilation to Windows, linker error (unrecognized option '-z', see https://forum.nim-lang.org/t/11302 |
09:18:28 | FromDiscord | <arnetheduck> In reply to @whisperecean "Ok I'll do it.": I guess you can use `addConfigFileContent(readFile(yourfile))` instead of `addConfigFile` which skips the buggy part |
09:18:38 | FromDiscord | <arnetheduck> (edit) "In reply to @whisperecean "Ok I'll do it.": I guess you can use `addConfigFileContent(readFile(yourfile))` instead of `addConfigFile` which ... skips" added "(probably)" |
09:20:18 | * | modev joined #nim |
09:20:20 | * | modev left #nim (#nim) |
10:02:20 | FromDiscord | <whisperecean> I created an issue on github |
10:02:49 | * | xet7 quit (Remote host closed the connection) |
10:11:21 | * | Jjp137 quit (Ping timeout: 268 seconds) |
11:32:06 | * | Lord_Nightmare quit (Ping timeout: 255 seconds) |
11:44:15 | * | fallback quit (Ping timeout: 255 seconds) |
11:45:10 | * | modev joined #nim |
11:45:37 | * | modev quit (Client Quit) |
11:53:03 | * | fallback joined #nim |
11:56:42 | NimEventer | New thread by lollinux: Access operator on distinct type of array, see https://forum.nim-lang.org/t/11304 |
12:23:50 | * | Jjp137 joined #nim |
12:32:30 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
12:46:55 | FromDiscord | <sOkam! š«> is there a way to get the field names of an object into a seq, using a function and not a for loop? š¤ |
12:49:13 | FromDiscord | <odexine> Youāll have to make the function |
12:50:37 | * | modev joined #nim |
12:51:01 | * | modev quit (Client Quit) |
12:51:06 | FromDiscord | <sOkam! š«> sent a code paste, see https://play.nim-lang.org/#pasty=iudVhhBCisyt |
12:56:17 | * | ntat joined #nim |
13:50:35 | NimEventer | New thread by chaemon: Strange behavior of global variable in 2.0, see https://forum.nim-lang.org/t/11307 |
13:50:40 | * | SchweinDeBurg joined #nim |
14:04:29 | * | xutaxkamay quit (Ping timeout: 240 seconds) |
14:08:40 | * | modev joined #nim |
14:08:47 | * | modev quit (Client Quit) |
14:08:59 | * | modev joined #nim |
14:09:00 | * | modev quit (Client Quit) |
14:09:15 | * | modev joined #nim |
14:09:28 | * | modev quit (Client Quit) |
14:09:43 | * | modev joined #nim |
14:09:46 | * | modev left #nim (#nim) |
14:12:47 | * | xutaxkamay joined #nim |
15:04:36 | * | Lord_Nightmare joined #nim |
16:07:14 | FromDiscord | <patitotective> Finally got the minidocx binding working! I ended up doing it by hand, so I have only wrapped 4 functions but it actually generates a docx file! Still, I have to make the compiler find the source/header files without using the full path, maybe using `getCurrentDir`... And while I'm just going to use this for my project, I plan to wrap all of minidocx and publish it as a library https://github.com/Patitotective/boletin_abast/blob/mai |
16:38:24 | FromDiscord | <fosster> does anyone know what even `IOSelectorsException` is? |
16:40:33 | * | xet7 joined #nim |
16:42:46 | * | krux02 joined #nim |
16:50:11 | FromDiscord | <demotomohiro> https://github.com/search?q=repo%3Anim-lang%2FNim%20IOSelectorsException&type=codeāµIt seems related to this proc:āµhttps://github.com/nim-lang/Nim/blob/devel/lib/pure/selectors.nim#L276 |
16:55:07 | FromDiscord | <fosster> mh thanks |
17:27:36 | * | def- quit (Quit: -) |
17:28:51 | * | def- joined #nim |
17:36:35 | * | advesperacit quit (Ping timeout: 268 seconds) |
17:50:21 | * | advesperacit joined #nim |
17:52:35 | NimEventer | New thread by Nlits: Logarithm Implementation Tutorial, see https://forum.nim-lang.org/t/11308 |
18:40:07 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#pasty=BDCYyaRydyog |
18:41:06 | FromDiscord | <morgan> tldr of the lldb screenshot, which doesn't show all of the relevant steps, it gets to the function, does some internal nim stuff, gets to the lock, does lock stuff, and exits |
18:55:47 | * | ntat_ joined #nim |
18:56:08 | * | ntat quit (Ping timeout: 268 seconds) |
18:56:09 | * | ntat_ quit (Read error: Connection reset by peer) |
18:57:27 | * | ntat_ joined #nim |
19:00:35 | * | ntat_ quit (Client Quit) |
19:00:54 | * | ntat joined #nim |
19:44:53 | FromDiscord | <michalkap> sent a code paste, see https://play.nim-lang.org/#pasty=dRMolWHmfPpS |
19:51:06 | FromDiscord | <intellij_gamer> Have a feeling it's to do with you accessing the global. `onRequest` needs the be GC safe iircāµYou can just indent the access to it under a `{.gcsafe.}` |
19:53:24 | FromDiscord | <michalkap> In reply to @intellij_gamer "Have a feeling it's": how? |
19:53:34 | FromDiscord | <michalkap> i don't really understand |
19:54:55 | FromDiscord | <intellij_gamer> sent a code paste, see https://play.nim-lang.org/#pasty=uJRUTBLpgmMX |
19:58:16 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/CPRqfNhyThvh |
19:58:28 | FromDiscord | <michalkap> In reply to @isofruit "> type mismatch >": it's the full thing |
20:00:16 | FromDiscord | <Phil> Ah, I see, yeah your proc "onRequest" does not match what it's expecting.āµIt's expecting sth with the type `OnRequest`. Your proc takes something the type of `Request` |
20:00:29 | FromDiscord | <michalkap> sent a code paste, see https://play.nim-lang.org/#pasty=CSCMsQjLdhVL |
20:00:57 | FromDiscord | <Phil> sent a long message, see https://pasty.ee/owAhwgUSVomd |
20:01:21 | FromDiscord | <Phil> So the expression it expects does neither return anything, nor does it take a parameter of type `Request` |
20:02:16 | FromDiscord | <michalkap> Error: undeclared field: 'httpMethod' for type httpx.OnRequest [type declared in httpx-0.3.7-6e0fc3133fbd20530d53ab2792e93d3151387b10/httpx.nim(79, 3)] |
20:02:17 | FromDiscord | <Phil> @ringabout Might know more on this, I never used httpx directly |
20:02:26 | FromDiscord | <michalkap> (edit) "https://play.nim-lang.org/#pasty=dahMXGLJQxjs" => "https://play.nim-lang.org/#pasty=HprwiTIJoaxt" |
20:07:14 | FromDiscord | <Phil> I'd try to compile, but I can't evne install that god damn markdown dependency without nimble blowing up on me |
20:07:16 | FromDiscord | <Phil> Holy shit |
20:07:25 | FromDiscord | <Phil> (edit) "evne" => "even" |
20:07:43 | FromDiscord | <Phil> (edit) "that god damn" => "the" |
20:08:45 | FromDiscord | <Phil> Okay, I stand corrected, it compiles if you just don't access the global variables |
20:08:46 | FromDiscord | <Phil> (edit) "variables" => "variable" |
20:10:11 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=iiTPGXcPTbUX |
20:10:50 | FromDiscord | <Phil> But that's kind of a given with jester given the amount of macro magic it does and thus it may be generating code that is entirely unexpected for you |
20:11:10 | FromDiscord | <Phil> (edit) "But that's kind of a given with jester ... given" added "and friends" |
20:11:31 | FromDiscord | <Phil> Though maybe I'm just talking out my ass here, my brain is toast from work daily nowadays |
20:24:54 | FromDiscord | <michalkap> sent a code paste, see https://play.nim-lang.org/#pasty=KYLqNeylwYYM |
20:25:03 | FromDiscord | <michalkap> thanks to all of you |
20:25:08 | FromDiscord | <michalkap> sent a code paste, see https://play.nim-lang.org/#pasty=gCbQXaHshKFE |
20:27:41 | * | rockcavera quit (Read error: Connection reset by peer) |
20:35:18 | * | rockcavera joined #nim |
20:44:58 | * | ntat quit (Quit: Leaving) |
21:38:29 | * | advesperacit quit () |
22:09:27 | * | zgasma quit (Quit: Lost terminal) |
22:56:30 | FromDiscord | <patitotective> sent a code paste, see https://play.nim-lang.org/#pasty=DwlBwEiUgIMq |
22:58:28 | FromDiscord | <Robyn [She/Her]> Wish the better comments extensions worked with Nim multiline comments |
22:59:06 | FromDiscord | <Robyn [She/Her]> It sort of does but not nicely? |
22:59:18 | FromDiscord | <Robyn [She/Her]> You need a `TODO:` for every line, which imo is a bit ugly |
23:01:29 | FromDiscord | <patitotective> In reply to @patitotective "Hi, I'm a bit": If anyone wants to help me, here's are the files you can use to reproduce it https://github.com/Patitotective/minidocx-nim |
23:02:22 | FromDiscord | <patitotective> (edit) "here's" => "here" |
23:03:53 | FromDiscord | <Robyn [She/Her]> Does it matter if I use a `TableRef` or `Table` in a ref object? Assuming yes, but not in a way that'll matter much |
23:04:59 | FromDiscord | <Robyn [She/Her]> Heap vs stack, I'm assuming |
23:05:16 | FromDiscord | <Robyn [She/Her]> Well, obviously |
23:05:43 | FromDiscord | <Robyn [She/Her]> But in a ref object, would be a pointer to the heap or stack depending on which one I use |
23:08:11 | FromDiscord | <patitotective> sent a code paste, see https://play.nim-lang.org/#pasty=cEOOqkNxsWQD |
23:10:24 | FromDiscord | <Robyn [She/Her]> Hm... Should I use a `Session` object to store a user's last login with a certain session ID, or should I store it as JSON data? |
23:11:12 | FromDiscord | <Robyn [She/Her]> A session object seems better purely because it lifts the load off of my chat application and onto the database |
23:14:27 | FromDiscord | <jviega> Most of the contents of a table are going to be in the heap no matter what. |
23:18:35 | FromDiscord | <Robyn [She/Her]> 'Most'? But thanks! |
23:19:28 | FromDiscord | <jviega> Yes, since tables resize depending on additions and subtractions, that requires dynamic allocation, and you wouldn't be able to free up stack space (which is somewhat limited) |
23:19:43 | FromDiscord | <jviega> Nim's tables are pretty terrible thop |
23:21:22 | FromDiscord | <Robyn [She/Her]> Oh? Why are they terrible? Idk much about them |
23:21:38 | FromDiscord | <Robyn [She/Her]> In reply to @chronos.vitaqua "A session object seems": But yeah I decided to just use a `Session` object instead |
23:23:06 | FromDiscord | <jviega> Well, the fact that you have separate constructs for stack vs heap isn't awesome, but: 1) It also requires seprate data structures for ordered vs not, and 2) does not handle concurrent access. |
23:24:45 | FromDiscord | <Robyn [She/Her]> That makes sense, thanks! |
23:26:20 | FromDiscord | <jviega> If you really need something there, we've got a project that has a decent hash table (called `Dict[]`, but it wouldn't be straightforward to use it w/o some effort |
23:27:53 | FromDiscord | <Robyn [She/Her]> That's fine, thanks though! I'm going to use a `Session` object instead, though I'll still need to figure out how to protect against multithreading, probably a global lock manager? š¤·āāļø |
23:28:15 | FromDiscord | <Robyn [She/Her]> I still need to learn more about multithreading honestly, I'm way too used to asyncdispatch aha |
23:29:05 | FromDiscord | <bosinski2023> In reply to @jviega "If you really need": i'd like to take a look at `Dict[]`. |
23:29:11 | FromDiscord | <jviega> Yeah ours is lock free so will avoid memory corruption, etc. but that doesnāt solve lots of state problems |
23:29:40 | FromDiscord | <Robyn [She/Her]> Makes sense |
23:29:47 | FromDiscord | <Robyn [She/Her]> (edit) "multithreading," => "concurrent access," |
23:30:28 | FromDiscord | <jviega> Well the biggest problem is thereās a C dependency that isnāt published in a way thatās easy to build yet (I wrote it in C a few years ago but wrapped it in Nim) |
23:30:49 | FromDiscord | <Robyn [She/Her]> Oh I think I might of seen that a while ago actually |
23:31:04 | FromDiscord | <grumblygibson> How to remove `-lpthread` in nim's call to gcc? I'm cross compiling to windows zig and supplying my own mingw libpthread. Nim spits out the huge gcc call that fails, and I can run that call without the trailing `-lpthread` and it succeeds. Is there a way I can automate this The Right Way instead of grabbing the string output and removing the `-lpthread` etc. as I am doing? |
23:31:36 | FromDiscord | <jviega> I donāt know why you would have cause itās buried in our bigger projects š |
23:32:01 | FromDiscord | <jviega> Thereās a flag to turn off threads, should be in the docs under flags |
23:32:18 | FromDiscord | <grumblygibson> `--threads:off` disables threading through the entire nim app, but I need threading. |
23:33:12 | FromDiscord | <grumblygibson> Fails to compile with `...requires --threads:on for this to build` |
23:33:15 | FromDiscord | <jviega> Oh you just need to not have pthreads linked |
23:33:49 | FromDiscord | <jviega> Hmm what platform? |
23:33:56 | FromDiscord | <grumblygibson> on linux |
23:34:48 | FromDiscord | <jviega> I feel like I remember doing that once |
23:35:30 | FromDiscord | <grumblygibson> That's the sage advice I'm here for :p I'm waiting with baited keyboard. š |
23:36:58 | FromDiscord | <grumblygibson> Maybe there's a better way to do this. I'm using `--os:windows` and calling zig to produce a windows binary. So it's actually kinda weird that nim still tacks on `-lpthread` since I'm saying "dude, I want windows c code..." |
23:37:26 | FromDiscord | <jviega> Generally if you pass -os it should get it right |
23:37:46 | FromDiscord | <grumblygibson> but I guess that's controlled by `--cc:` which I have set to `gcc` and then overridden it with zig so thar be dragons. |
23:38:13 | FromDiscord | <Robyn [She/Her]> In reply to @grumblygibson "but I guess that's": If you're using Zig, make sure to use `--cc:clang` |
23:38:30 | FromDiscord | <Robyn [She/Her]> Not related to your issue probably, but yeah |
23:39:48 | FromDiscord | <grumblygibson> sent a code paste, see https://play.nim-lang.org/#pasty=zRBuYJfXNuHi |
23:40:42 | FromDiscord | <grumblygibson> No, I'm just guess. I'm out of my confort zone here. |
23:40:48 | FromDiscord | <grumblygibson> (edit) "guess." => "guessing." |
23:41:36 | FromDiscord | <jviega> I guess Iād add my own wrapper that strips off the flag then :/ |