00:21:29 | * | derpydoo quit (Quit: derpydoo) |
00:51:49 | * | Maksimilan joined #nim |
00:52:44 | * | Maksimilan_ joined #nim |
00:56:12 | * | Maksimilan quit (Ping timeout: 240 seconds) |
00:59:16 | * | Maksimilan__ joined #nim |
01:03:19 | * | Maksimilan_ quit (Ping timeout: 264 seconds) |
02:00:07 | * | lucerne quit (Read error: Connection reset by peer) |
02:00:26 | * | lucerne joined #nim |
02:02:49 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4KAV |
02:03:21 | FromDiscord | <ravinder387> sayHi' is not GC-safe as it accesses 'data' which is a global using GC'ed memory.. Error |
02:03:26 | FromDiscord | <ravinder387> what should i do |
02:08:44 | FromDiscord | <hugop707> iirc you should put the variable declaration and thread creation inside a main function and call that |
02:12:23 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4KAW |
02:12:43 | FromDiscord | <ravinder387> then how i get data as return |
02:14:27 | FromDiscord | <hugop707> you cant return from threads, you would need to pass a pointer to the data and write to that |
02:14:36 | FromDiscord | <hugop707> as an argument to the function |
02:15:12 | FromDiscord | <hugop707> and can only pass one argument to threads afaik, so youd need to pass both together in an object or a tuple |
02:15:51 | FromDiscord | <hugop707> but for this example it doesnt make sense because the threads would be trying to access the same memory at the same time, and that would create a race condition |
02:16:51 | FromDiscord | <ravinder387> so i need to use std/locks |
02:18:28 | FromDiscord | <hugop707> well, i guess but then why use threads to begin with, you wouldnt be saving time |
02:19:51 | * | xet7_ joined #nim |
02:20:17 | * | xet7_ quit (Remote host closed the connection) |
02:20:27 | * | xet7 quit (Quit: Leaving) |
02:21:24 | * | xet7 joined #nim |
02:22:10 | FromDiscord | <hugop707> that would create 8 threads, tell them to access `data` and each one would try to add 0, 0-1, 0-2, 0-3, 0-4, 0-5, 0-6, 0-7 and 0-8 to it |
02:27:51 | FromDiscord | <hugop707> sent a code paste, see https://play.nim-lang.org/#ix=4KAY |
02:28:32 | FromDiscord | <hugop707> threads can be hard to get a handle of at first |
02:31:44 | FromDiscord | <ravinder387> I have a data = 1..1000 f(x) = x + 9 I want to apply f(x) on each element of data |
02:32:17 | FromDiscord | <ravinder387> e.g [1,2.........] => 10, 11 ,....... |
02:33:08 | FromDiscord | <michaelb.eth> sent a long message, see http://ix.io/4KB0 |
02:34:13 | FromDiscord | <hugop707> then you could split the data into as many threads as you are gonna use, pass each thread different independent data, and make it store it somewhere independent aswell, then use some logic to join everything together |
02:34:54 | FromDiscord | <ravinder387> you could split the data into as many threads ? how can i split data between threads |
02:35:51 | FromDiscord | <michaelb.eth> also note you can’t use `ref` across threads because reference counting with ARC/ORC isn’t atomic so even if you force the compiler to allow it you’ll crash with SIGSEGV |
02:36:03 | FromDiscord | <hugop707> sent a code paste, see https://paste.rs/YXsoM |
02:36:45 | FromDiscord | <hugop707> sent a code paste, see https://play.nim-lang.org/#ix=4KB3 |
02:37:15 | FromDiscord | <hugop707> or directly write it back to the `dataforThread` sequence, it depends on how you want to do it |
02:37:16 | FromDiscord | <michaelb.eth> (edit) "SIGSEGV" => "SIGSEGV. Locks don’t alleviate that problem with `ref` but may be useful for non-ref data" |
02:56:32 | FromDiscord | <hugop707> sent a code paste, see https://play.nim-lang.org/#ix=4KB5 |
03:05:03 | * | fallback quit (Ping timeout: 240 seconds) |
03:05:34 | * | edr quit (Quit: Leaving) |
03:26:04 | FromDiscord | <ravinder387> thanks brother |
03:39:32 | FromDiscord | <ravinder387> data: ptr seq[int] ... it is ptr i think i also need to dealloc |
03:39:45 | FromDiscord | <ravinder387> i think ref is automatically handle by nim |
03:41:28 | FromDiscord | <ravinder387> do i need to write dealloc(data) |
03:42:25 | FromDiscord | <hugop707> no because its not heap allocated here |
03:42:46 | FromDiscord | <ravinder387> oh i see |
03:44:31 | FromDiscord | <hugop707> well im not sure tbh |
03:44:39 | FromDiscord | <hugop707> lemme see |
03:45:23 | NimEventer | New thread by elcritch: Cosmo3 multi-os fat binaries with threads , see https://forum.nim-lang.org/t/10589 |
03:45:38 | FromDiscord | <odexine> nice forum post |
03:45:51 | FromDiscord | <odexine> "The interesting part to me is:" forum bug? |
03:46:01 | FromDiscord | <odexine> oh there it is |
04:05:37 | * | fallback joined #nim |
05:45:03 | NimEventer | New thread by Charles: With what parameters does echo call fwrite? Trying to implement fwrite in Nim., see https://forum.nim-lang.org/t/10590 |
06:25:07 | FromDiscord | <nnsee> In reply to @sys64 "Seems it doesn't show": it depends on how you're compiling it, but to export a function from the wasm side, you'd probably have to mark it with the `exportc` pragma just so Nim doesn't mangle the name, and then pass `-s EXPORTED_FUNCTIONS='["whatever"]'` to the emcc backend |
06:26:53 | FromDiscord | <nnsee> In reply to @sys64 "I don't understand why": because at the end of the day it is simply a computation engine |
06:27:22 | FromDiscord | <nnsee> and is supposed to be host-agnostic (the host in this case being JS) |
07:00:09 | * | advesperacit joined #nim |
07:07:47 | FromDiscord | <Chronos [She/Her]> In reply to @michaelb.eth "also note you can’t": `GC_ref` + `GC_unref` 😎 |
07:08:03 | FromDiscord | <Chronos [She/Her]> Don't channels do copies for when passing across threads tho? |
07:11:00 | FromDiscord | <Elegantbeef> They used to deepcopy with refc, don't know about arc/orc |
07:11:13 | FromDiscord | <Elegantbeef> Really should use nim-lang/threading's channels with arc/orc |
07:44:05 | * | PMunch joined #nim |
07:56:25 | * | PMunch quit (Quit: leaving) |
07:56:46 | * | PMunch joined #nim |
07:59:00 | FromDiscord | <demotomohiro> In reply to @takemichihanagaki3129 "Are `--passL` passed to": Run Nim with `--listcmd` that shows how Nim calls backend C compiler.↵You will see Nim calls gcc (not ld) with options you specified with `--passL`.↵gcc calls ld when linking. If you need to pass options to ld through gcc, you would need to use `--passL:"-Wl,--option-to-ld"`. |
08:06:46 | * | redj quit (Remote host closed the connection) |
08:08:08 | * | redj joined #nim |
08:43:14 | Amun-Ra | nnsee: I prefer comma seprated syntax -s EXPORTED_FUNCTIONS=_func1,_func2 |
08:43:43 | Amun-Ra | also, don't forget leading underscores |
08:45:52 | FromDiscord | <nnsee> thanks for the tips |
08:46:16 | FromDiscord | <nnsee> my knowledge of wasm is pretty surface level, only dabbled in it a small bit |
08:46:59 | Amun-Ra | I wrote a small example yesterday, my memory is still fresh. :> |
08:48:02 | Amun-Ra | btw. you can call such exported function via Module._funcname(args) but from what I see result type defaults to number |
08:48:54 | Amun-Ra | it's better to do this way: let func = Module.cwrap('func', 'return_type', ['arg_types']); |
08:49:15 | Amun-Ra | that requires additional -s 'EXPORTED_RUNTIME_METHODS=cwrap |
08:58:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "it depends on how": I just try to call a JS function |
08:59:29 | FromDiscord | <nnsee> have a look at https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html |
08:59:39 | Amun-Ra | I wrote two test cases yesterday (calling wasm from js), C & Nim; I'll write wasm->js today |
09:01:16 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @nnsee "have a look at": I tried EM_ASM, I don't have access to Document |
09:02:15 | Amun-Ra | which is weird, I used EM_ASM yesterday with document.write and everything was hunky dory |
09:02:31 | FromDiscord | <Chronos [She/Her]> In reply to @sys64 "I tried EM_ASM, I": It's `document`, no? |
09:03:01 | Amun-Ra | yes |
09:05:39 | FromDiscord | <Chronos [She/Her]> I'm wondering if System64 used `Document` instead now |
09:06:07 | Amun-Ra | same |
09:08:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "I'm wondering if System64": No I used document |
09:08:33 | FromDiscord | <Chronos [She/Her]> Ah, then no idea |
09:08:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Amun-Ra "which is weird, I": and did you used document.createElement? |
09:09:31 | Amun-Ra | no, document.write |
09:09:46 | Amun-Ra | and it worked |
09:10:21 | FromDiscord | <System64 ~ Flandre Scarlet> Also, what is your setup?↵Can you provide a minimal exemple of a main loop that calls a proc that calls EM_ASM with document.createElement like me?↵Also, what is your Emscripten version? |
09:11:03 | Amun-Ra | I posted the complete sample yesterday, sec |
09:11:42 | FromDiscord | <System64 ~ Flandre Scarlet> Ah yeah I remember↵I just have this argument problem |
09:12:12 | Amun-Ra | play nim is 502 |
09:13:46 | Amun-Ra | I'll try to write more useful example today |
09:14:30 | FromDiscord | <System64 ~ Flandre Scarlet> Alright, thanks |
09:16:04 | Amun-Ra | I'll need that sooner or later in my browser, too ;> |
10:19:54 | FromDiscord | <gyatsoyt> Code:↵let value = pieceValue[piece_type] + evaluatePiece(piece, square, endGame)↵Error:↵In the image https://media.discordapp.net/attachments/371759389889003532/1169581641472167976/Screenshot_2023_1102_154859.png?ex=6555ecc9&is=654377c9&hm=4e1ff24634bad71e59e82ab47ea549d915d131c602692160d0339a5a0d025c7b& |
10:20:08 | FromDiscord | <gyatsoyt> (edit) "Code:↵let value = pieceValue[piece_type] + evaluatePiece(piece, square, endGame)↵Error:↵In the image https://media.discordapp.net/attachments/371759389889003532/1169581641472167976/Screenshot_2023_1102_154859.png?ex=6555ecc9&is=654377c9&hm=4e1ff24634bad71e59e82ab47ea549d915d131c602692160d0339a5a0d025c7b&" => "sent a code paste, see https://play.nim-lang.org/#ix=down for DDOS" |
10:35:57 | FromDiscord | <that_dude.> Wasn't this a case where you were mixing enums and ints? |
10:38:53 | FromDiscord | <Asbjørn> What do y'all do for error handling?↵↵Exceptions? Option types? Object variants? |
10:39:05 | PMunch | Exceptions mostly |
10:39:38 | PMunch | Had some fun with them yesterday as well in case you missed it: https://peterme.net/labelled-exceptions-for-smoother-error-handling.html |
10:43:12 | FromDiscord | <Chronos [She/Her]> I think jsony is having an issue with distincts :/ |
10:43:25 | FromDiscord | <Phil> In reply to @Asbjørn "What do y'all do": Option types only if you want to express that a field may exist or not.↵Use Result types (that's a status package) if you want the equivalent for "This may be a value or something might've gone wrong during its execution" |
10:43:40 | FromDiscord | <Chronos [She/Her]> Oh Playground is down |
10:43:40 | FromDiscord | <Phil> Myself I tend to use exceptions |
10:43:49 | FromDiscord | <michaelb.eth> In reply to @chronos.vitaqua "I think jsony is": it has built-in distinct -> base |
10:44:05 | FromDiscord | <Chronos [She/Her]> Ah? |
10:44:26 | FromDiscord | <Chronos [She/Her]> Oh this is odd |
10:44:39 | FromDiscord | <Chronos [She/Her]> Then my custom dumpHook just did something wrong ig |
10:45:08 | PMunch | @Phil, I'm fixing the playground, so don't reboot it :P |
10:45:30 | FromDiscord | <Phil> Caught red-handed! |
10:45:34 | FromDiscord | <Chronos [She/Her]> https://www.toptal.com/developers/hastebin `toJson(semVer(1, 2, 3))` returns nothing, removing the hook fixes it but still seems like a bug |
10:45:35 | FromDiscord | <Phil> (edit) "Caught ... red-handed!" added "me" |
10:46:17 | PMunch | Hmm, disk is full again |
10:46:36 | FromDiscord | <Phil> Wait, how |
10:46:45 | FromDiscord | <Phil> I literally rebuilt that thing 2 weeks ago |
10:46:50 | FromDiscord | <Phil> Or is it just temp stuff? |
10:47:04 | PMunch | That's what I'm trying to figure out |
10:47:11 | FromDiscord | <michaelb.eth> https://github.com/treeform/jsony/blob/master/src/jsony.nim#L631-L633↵↵https://github.com/treeform/jsony/blob/master/src/jsony.nim#L591-L594 |
10:47:28 | FromDiscord | <nnsee> In reply to @Asbjørn "What do y'all do": i used to mostly use explicit result types because i like that style of handling exceptions. but Peter's labelled exceptions might get me to move over to exceptions |
10:47:56 | FromDiscord | <Chronos [She/Her]> In reply to @michaelb.eth "https://github.com/treeform/jsony/blob/master/src/j": Yeah I know now, this stills seems like odd behaviour |
10:48:22 | PMunch | 6.1G in the overlay2 folder.. |
10:48:37 | FromDiscord | <Chronos [She/Her]> In reply to @Asbjørn "What do y'all do": Normally exceptions but I've been getting used to `Result` types from https://github.com/arnetheduck/nim-results |
10:50:01 | FromDiscord | <michaelb.eth> In reply to @Asbjørn "What do y'all do": https://github.com/arnetheduck/nim-results↵↵gives you `Result[T, E]`, and an `Opt[T]` that can be used in place of std/options |
10:54:26 | FromDiscord | <michaelb.eth> In reply to @PMunch "6.1G in the overlay2": i guess it’s not fast enough yet, but would be cool if the playground could be a wasm-ified container that runs in the user’s browser and the editor ui talked to that, so self-contained and never any server to fillbup |
10:54:33 | FromDiscord | <michaelb.eth> (edit) "fillbup" => "fill up" |
10:57:09 | FromDiscord | <michaelb.eth> > it’s not fast enough yet↵i mean the software stack that makes it possible, too slow and a bit fragile atmoresent |
10:57:11 | FromDiscord | <Yardanico> In reply to @michaelb.eth "i guess it’s not": that's VERY funny actually lol |
10:57:18 | FromDiscord | <michaelb.eth> (edit) "atmoresent" => "at present" |
10:57:18 | FromDiscord | <Yardanico> because a guy from the nim telegram has already done exactly that |
10:57:23 | FromDiscord | <Yardanico> nim vm running in the browser through wasm |
10:57:29 | FromDiscord | <Yardanico> https://nimplay.eu.org/ |
10:57:35 | FromDiscord | <Yardanico> it's nimscript so the same limitations apply |
10:57:44 | FromDiscord | <Yardanico> but it runs entirely in the browser |
10:57:46 | FromDiscord | <michaelb.eth> i meant the whole thing, Linus OS and all |
10:57:50 | FromDiscord | <Yardanico> oh |
10:57:54 | FromDiscord | <Yardanico> that'll be quite slow but possible |
10:57:55 | FromDiscord | <michaelb.eth> (edit) "Linus" => "Linux" |
10:58:13 | FromDiscord | <michaelb.eth> its not achingly slow, but still too slow |
10:58:55 | FromDiscord | <michaelb.eth> nice thing would be its the full deal, not just nimscripy |
10:59:00 | FromDiscord | <michaelb.eth> (edit) "nimscripy" => "nimscript" |
11:00:13 | FromDiscord | <michaelb.eth> https://github.com/ktock/container2wasm |
11:00:47 | PMunch | Next person who asks for a nice Nim project to start off with I know what to ask for.. |
11:01:11 | PMunch | A program which just takes a file piped from `du` and shows me something like the output from Baobab |
11:01:15 | FromDiscord | <Phil> In reply to @yardanico "it's nimscript so the": So it's basically just the nim vm?↵Or is it essentially "compiling" the code-snippet in your browser via the compiler? |
11:01:22 | FromDiscord | <Yardanico> In reply to @isofruit "So it's basically just": just the nim vm |
11:01:23 | FromDiscord | <Yardanico> via wasm |
11:01:43 | FromDiscord | <Yardanico> https://github.com/gabbhack/nimplay |
11:06:36 | PMunch | Hmm, df -h says the drive is filled to the brim. But du -ahx only lists 17/25Gb.. |
11:12:18 | PMunch | It's normal that they differ a bit, but 8Gb? |
11:14:35 | PMunch | Hmm, I think Docker just got hung up and had some lingering open files |
11:14:46 | PMunch | Also found a 4Gb swapfile which was a bit excessive |
11:14:55 | PMunch | Playground is back up now with 56% full disk |
11:16:10 | FromDiscord | <Phil> .... 4GB swapfile for all of the 1GB of RAM xD |
11:16:19 | FromDiscord | <Phil> That's a lot of swap! |
11:16:47 | FromDiscord | <Phil> In reply to @yardanico "via wasm": That is kinda sick |
11:17:24 | FromDiscord | <Yardanico> and if you check, the total file size is ~5mb for the wasm stuff |
11:17:35 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/1169596159443091477/image.png?ex=6555fa4e&is=6543854e&hm=805e594df6c68815a19bf1ebea3caaf9c5f3dd321c94bf24c0777a7f3a4f6fcb& |
11:17:44 | FromDiscord | <Phil> But the tech stack overall feels kinda fragil.↵Like nim code, generating c code, compiled to an intermediate representation in WASM that gets turned on-the-fly into machine instructions which turn instructions it receives at runtime into machine instructions |
11:17:44 | FromDiscord | <Yardanico> ofc it's even lower after transparent network compression |
11:18:13 | FromDiscord | <Yardanico> there's no C code involved here |
11:18:21 | FromDiscord | <Phil> We go nim --> Wasm directly? |
11:18:24 | FromDiscord | <Yardanico> again, it's the Nim VM (think nimscripter) compiled into wasm |
11:18:30 | FromDiscord | <Yardanico> (edit) "nimscripter)" => "nimscripter/nim secret)" |
11:18:37 | FromDiscord | <Yardanico> (edit) "nimscripter/nim secret)" => "nimscripter/`nim secret`/`nim e`)" |
11:19:06 | FromDiscord | <Phil> I assume the nim VM is written in nim (?), my total lack of knowledge in that area is shining I guess |
11:19:17 | FromDiscord | <Yardanico> it's part of the compiler, and the whole compiler is in nim, so yes |
11:19:25 | FromDiscord | <Yardanico> In reply to @yardanico "": the funny thing is that the 4.8 mb data file is the whole nim stdlib |
11:19:28 | FromDiscord | <Yardanico> the wasm is only 800kb |
11:19:39 | FromDiscord | <Yardanico> and ofc after compression it'll be much lower |
11:19:55 | FromDiscord | <Phil> So you can compile nim code to wasm directly, no going through C? |
11:20:15 | FromDiscord | <Yardanico> it is going through C, but only when compiling |
11:20:24 | FromDiscord | <Yardanico> after you compile the VM it'll directly execute nim code and give you the results |
11:20:27 | FromDiscord | <Yardanico> since the whole VM is already in wasm |
11:20:37 | FromDiscord | <Yardanico> the thing itself is compiled via emscripten |
11:20:38 | FromDiscord | <Phil> Check, that's the mental image I had |
11:20:52 | FromDiscord | <Phil> May have phrased it poorly |
11:21:15 | FromDiscord | <Phil> Was trying to type out the path from "nim-compiler-source-code" to "executed machine instructions from code provided at runtime" |
11:21:31 | FromDiscord | <Phil> (edit) "runtime"" => "runtime to a compiled compiler"" |
11:21:59 | FromDiscord | <Phil> I wonder if we have too many abstraction layers nowadays |
11:22:31 | FromDiscord | <Phil> Or if it's actually a valid amount of abstraction layers given how much stuff at once becomes possible through them |
11:24:10 | FromDiscord | <Yardanico> In reply to @isofruit "I wonder if we": certainly better than https://news.ycombinator.com/item?id=38043033 |
11:24:23 | FromDiscord | <Yardanico> https://shadow.goose.icu/ |
11:24:25 | FromDiscord | <Phil> JS executing JS |
11:24:30 | FromDiscord | <Phil> I am scared Yard |
11:25:24 | FromDiscord | <Phil> Insert "That thing, that frightens me" meme |
11:26:28 | FromDiscord | <Yardanico> In reply to @isofruit "I am scared Yard": we need serenityos compiled into wasm and rendered into the canvas |
11:26:34 | FromDiscord | <Yardanico> so we could open web pages through its built-in browser |
11:27:26 | FromDiscord | <Phil> ... the browser browser |
11:27:30 | FromDiscord | <_nenc> Ahhhhhhh |
11:28:00 | FromDiscord | <_nenc> Browser in browser, this is killing how browsers are being part of the open and freedom technology of web |
11:28:17 | FromDiscord | <Phil> I wonder if this goes against the disturbing content rule |
11:40:20 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @_gumbercules "yes but it's more": I tried multithreading and yeah, this is a mistake↵I should use async instead !! |
11:45:14 | * | hexeme quit (Ping timeout: 255 seconds) |
11:47:52 | * | hexeme joined #nim |
11:49:10 | FromDiscord | <jmgomez> In reply to @jviega "Anyone know if there": `--app:staticLib` |
11:52:12 | FromDiscord | <jviega> That I did figure out, I had tried, and it doesn't name it properly amusingly. Nor does it link in dependencies needed to be a stand-alone .a |
11:52:16 | FromDiscord | <jviega> But thank you |
11:54:42 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=down for DDOS |
11:55:25 | FromDiscord | <jviega> Oh interesting, thank you |
12:04:21 | * | edr joined #nim |
12:42:36 | NimEventer | New Nimble package! docchanger - Replaces substrings in .docx files with data, that is parsed from a json config file., see https://github.com/nirokay/docchanger |
12:43:50 | FromDiscord | <nnsee> In reply to @NimEventer "New Nimble package! docchanger": 🤨 https://media.discordapp.net/attachments/371759389889003532/1169617866002276432/image.png?ex=65560e85&is=65439985&hm=9f5ab999da2b9f8bf88fdd3d5c745a222efbc400a95117e8b095629afeb92114& |
12:44:08 | PMunch | @Phil, I think I created that swap for a particularly large update at some point :P Forgot to resize it afterwards |
12:57:38 | FromDiscord | <jviega> Wow. I've never been part of a tech community with this much ultra conservative vitriol actually. |
12:58:29 | PMunch | @jviega, is that in reference to anything in particular? |
12:59:05 | FromDiscord | <jviega> Yeah the image Ras posted, but it's not the first thing I've seen like that |
12:59:05 | PMunch | Oh right.. Images don't come through IRC |
12:59:14 | FromDiscord | <jviega> Ahh |
13:02:33 | PMunch | Looking at their GitHub profile I think this might just be a joke not landing very well |
13:03:00 | PMunch | But I do agree that in general the Nim community for some reason has a weird penchant for that kind of stuff |
13:03:53 | PMunch | But let's not get into that here |
13:05:08 | FromDiscord | <jviega> Agreed, I prefer to just focus on the tech |
13:05:34 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "But I do agree": Not weird considering everything :p |
13:07:33 | PMunch | Well, maybe not weird. Maybe we should throw in some questions in the next Nim community poll if we should get tougher on cracking down on such things |
13:08:04 | PMunch | That brings a whole political debate on what to ban and what not to ban though, which is kinda why we haven't done it thus far |
13:08:20 | FromDiscord | <Chronos [She/Her]> If the majority of the community is more right leaning then they'd obviously vote no aha |
13:08:51 | FromDiscord | <Chronos [She/Her]> I'd say just be respectful of others political views, and discrimination against anyone because of how they think or act, when they aren't harming anyone, isn't okay |
13:08:57 | FromDiscord | <Chronos [She/Her]> General catch-a |
13:09:01 | FromDiscord | <Chronos [She/Her]> Catch-all |
13:11:17 | PMunch | That's pretty much what we try to follow |
13:11:45 | PMunch | But there are all kinds of edge-cases in human communications unfortunately |
13:20:12 | FromDiscord | <Chronos [She/Her]> Fair |
13:24:45 | FromDiscord | <Chronos [She/Her]> Hm, rn I'm wondering of the best way to structure my code... Again lol |
13:25:32 | FromDiscord | <Chronos [She/Her]> Because I have some code that relies on the chat program's instance but not sure how I should keep it around? A ref object is probably better for this tbh |
13:40:07 | FromDiscord | <takemichihanagaki3129> In reply to @demotomohiro "Run Nim with `--listcmd`": Sure, thanks a lot! |
13:41:57 | PMunch | @jviega, did you find your linker commands by the way? |
13:49:46 | FromDiscord | <jviega> Well, I know what I need to do to figure out how to get a working .a I just backburnered it a bit because it was significantly more work than just finding that flag |
13:51:43 | PMunch | Ah, I see |
13:52:11 | FromDiscord | <jviega> Thank you 🙂 |
14:03:49 | NimEventer | New thread by lou15b: Which smartptrs to use?, see https://forum.nim-lang.org/t/10591 |
14:20:48 | FromDiscord | <Chronos [She/Her]> Oof I'm really struggling to figure out how to intelligently pass my `SupernovaeInstance` type to modules that need it |
14:20:59 | FromDiscord | <Chronos [She/Her]> Like, globals are the main issue here |
14:21:50 | FromDiscord | <Chronos [She/Her]> Want to avoid them, if possible |
14:26:11 | FromDiscord | <Chronos [She/Her]> Hm... Looking at it rn, seems Prologue is fine with closures |
14:26:36 | FromDiscord | <Chronos [She/Her]> So I could have an entrypoint and pass my instance object to them |
14:26:51 | FromDiscord | <Chronos [She/Her]> But I don't know if that'll fuck with memory management aha |
14:30:44 | * | derpydoo joined #nim |
14:32:31 | FromDiscord | <Chronos [She/Her]> Wonder if there's any point to using groups in Prologue hm |
14:34:19 | * | PMunch quit (Quit: leaving) |
14:36:46 | * | PMunch joined #nim |
14:40:17 | FromDiscord | <Phil> groups? |
14:45:28 | FromDiscord | <takemichihanagaki3129> How can I override a system's procedure, template? |
14:46:25 | FromDiscord | <takemichihanagaki3129> sent a code paste, see https://play.nim-lang.org/#ix=down for DDOS |
14:46:50 | FromDiscord | <takemichihanagaki3129> (edit) |
14:47:10 | FromDiscord | <takemichihanagaki3129> (edit) |
14:48:04 | FromDiscord | <takemichihanagaki3129> (edit) |
14:52:24 | FromDiscord | <takemichihanagaki3129> In reply to @takemichihanagaki3129 "I'm trying to override": I will try with `{.redefine.}` |
15:08:53 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "groups?": Yeah, groups for API routes and such |
15:16:56 | FromDiscord | <Phil> I don't get it, do you want something that generates CRUD controllers for a given object? |
15:17:19 | FromDiscord | <Phil> Because when you speak groups my mind goes to user group concepts and associated permissions |
15:17:36 | FromDiscord | <Phil> (edit) "Because when you speak groups my mind goes to user group concepts and associated permissions ... " added "management" |
15:19:43 | FromDiscord | <Phil> Ohhhhh you mean the prologue routing thing for stuff |
15:19:55 | FromDiscord | <Phil> Wow that didn't trigger |
15:21:14 | FromDiscord | <Phil> In reply to @chronos.vitaqua "Yeah, groups for API": It's for the most part really neat if you can get it to work for you |
15:22:16 | FromDiscord | <Phil> You can define middlewares, urls etc. that are specific to a set of endpoints really nicely |
15:22:57 | FromDiscord | <Phil> For example say you have a CRUD endpoint group for a given entity.↵Well they always must be under the same URL, so putting them into a group for that is really neat and makes it simpler to later change URLs if you need to |
15:23:38 | FromDiscord | <Phil> It allows you to cluster things together that should be clustered together, limiting ways how future changes can shoot you in the foot by restricting freedom |
15:24:13 | FromDiscord | <Phil> The main reason I didn't use it because back then I was not really knowledgeable, didn't understand it and couldn't get it to work for me in 3 minutes |
15:24:31 | FromDiscord | <Phil> (edit) "minutes" => "minutes, while normal routing worked." |
15:24:40 | FromDiscord | <Phil> So I just used normal routing |
15:25:05 | FromDiscord | <Phil> (edit) "So" => "And I didn't have scenarios where I wanted a specific piece of middleware for a particular set of endpoints but not for others. ↵So" |
15:26:13 | FromDiscord | <Phil> Note that it's not a big deal, just a small neat thing |
15:27:26 | FromDiscord | <Phil> Entity = an ORM model type |
15:27:36 | FromDiscord | <Phil> (edit) "type" => "type. E.g. in norm a norm model" |
15:33:18 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Wow that didn't trigger": It's fine aha |
15:33:49 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "And I didn't have": Fair enough |
15:39:52 | * | PMunch quit (Quit: leaving) |
15:45:29 | FromDiscord | <Phil> TBH I would've benefitted from it.↵I have like 5 controllers sitting on this url:↵` re fmt"/character/pk/{ID_PATTERN}/", ` |
15:45:44 | FromDiscord | <Phil> It would have been a hell of a lot smarter to only have to define that url once instead of 5 times |
15:46:26 | FromDiscord | <Phil> And that kind of thing I have across 20 different entities that have their own controllers |
15:50:47 | FromDiscord | <Chronos [She/Her]> Fair aha, I'm using it to model my API for the most part tbh |
15:58:20 | FromDiscord | <nnsee> if i have a bunch of different output binaries defined in my nimble project, is there any way to build them in parallel? |
15:59:54 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "if i have a": Spawn new processes maybe? Not too sure how else it could be done, since it's not like you have access to threading and stuff to make them build at the same time |
16:00:32 | FromDiscord | <Chronos [She/Her]> Maybe Confy would be of interest? It's basically a library for letting you create your own build scripts, and since it's Nim code (compiled to C), would probably be perfect for that stuff |
16:10:26 | FromDiscord | <nnsee> > since it's not like you have access to threading and stuff↵why not? Make has had the `--jobs` flag for literal decades |
16:10:38 | FromDiscord | <nnsee> i don't see why it needs to be some inherent limitation for nimble |
16:19:09 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "i don't see why": It uses Nimscript |
16:19:46 | FromDiscord | <Chronos [She/Her]> Nimscript in it's current state just doesn't support anything related to threading because you'd have to implement support for it in the VM :p |
16:23:17 | FromDiscord | <Phil> In reply to @nnsee "if i have a": Hmmm are they trivial to compile in parallel? |
16:23:34 | FromDiscord | <Phil> Because e.g. for my webdev project the C --> Binary step eats up around every CPU core I have |
16:23:45 | FromDiscord | <Phil> trivial being in terms of computation cost |
16:24:15 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "It uses Nimscript": er, what? the config file does, sure... but it's not like nimble itself is written in nimscript |
16:24:17 | FromDiscord | <Phil> Because if your CPU is being eaten up most of the time anyway then compiling them in order doesn't make much of a difference to in parallel |
16:25:07 | FromDiscord | <nnsee> In reply to @isofruit "Hmmm are they *trivial*": yes, most of my cores are sitting at idle when compiling |
16:25:23 | FromDiscord | <Phil> In that case my first guess would be to look at if nimscript can trigger jobs |
16:25:31 | FromDiscord | <Phil> because I know nim has procs for that |
16:25:59 | FromDiscord | <nnsee> if it's too much of a hassle then it's no problem, i just wondered whether there was a flag for it that i was missing or something |
16:26:49 | FromDiscord | <Phil> https://nim-lang.org/docs/osproc.html#execProcesses%2CopenArray%5Bstring%5D%2Cproc%28int%29%2Cproc%28int%2CProcess%29 |
16:27:12 | FromDiscord | <Phil> Now to see whether nimscript can run that.↵Alternatively you could build that as a tiny binary and trigger that binary from a nimble task |
16:29:09 | FromDiscord | <Phil> Yeah I don't see it for nimscript |
16:29:32 | FromDiscord | <nnsee> why are we talking about nimscript? |
16:29:45 | FromDiscord | <nnsee> the build command itself is invoked from nim-land |
16:29:46 | FromDiscord | <nnsee> https://github.com/nim-lang/nimble/blob/603e329442059947d63e4c1b2ef5294f1f544485/src/nimble.nim#L167C15-L167C15 |
16:29:51 | FromDiscord | <Phil> Because I see nimble I think nimble task which is nimscript |
16:30:40 | FromDiscord | <nnsee> anyways i can see from the code that there's no support for parallelization whatsoever so that answers my question :p |
16:31:29 | FromDiscord | <Phil> Oh you wanted to see if nimble itself can do it, not if you can write a nimscript task to do so |
16:31:36 | FromDiscord | <nnsee> yup |
16:31:45 | FromDiscord | <Phil> Okay, my bad, I went at it from the user perspective |
16:31:53 | FromDiscord | <nnsee> yeah my bad, maybe i wasn't too clear on it |
16:42:11 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "er, what? the config": The `.nimble` tasks are Nimscript, though |
16:43:02 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "the build command itself": I don't get it, do you mean `nimble build` then? If so, I defo misunderstood- |
16:43:10 | FromDiscord | <nnsee> yes |
16:43:17 | FromDiscord | <Phil> In reply to @chronos.vitaqua "The `.nimble` tasks are": He meant whether nimble from within nimble can do parallel building |
16:43:29 | FromDiscord | <Chronos [She/Her]> Aah okay sorry then aha |
16:43:42 | FromDiscord | <desi.> https://rumble.com/v3t85wy-baby-buffalo-vs-lion.html |
16:43:42 | FromDiscord | <Phil> No worries, I fell for the exact same misunderstanding 😄 |
16:43:47 | FromDiscord | <nnsee> for reference, this is the entirety of my nimble file https://media.discordapp.net/attachments/371759389889003532/1169678248402243654/image.png?ex=655646c1&is=6543d1c1&hm=acc9ce409d12bad15def29990d773c4b06cbe5d208f2f5af3ad6a3f3e4338c6a& |
16:43:52 | FromDiscord | <nnsee> to build those bins, i just do `nimble build` |
16:43:58 | FromDiscord | <nnsee> was hoping it could do those in parallel |
16:44:02 | FromDiscord | <Phil> In reply to @desi. "https://rumble.com/v3t85wy-baby-buffalo-vs-lion.htm": You have 15 seconds to explain how this is relevant to nim or I'll assume you're a spambot |
16:44:11 | FromDiscord | <Phil> And act accordingly |
16:44:47 | FromDiscord | <Phil> Time's up |
16:44:51 | FromDiscord | <Chronos [She/Her]> Lol |
16:45:01 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "was hoping it could": Don't think so rip |
16:45:50 | FromDiscord | <Chronos [She/Her]> But I did suggest Confy as an alternative as a buildscript :p |
16:45:58 | FromDiscord | <Chronos [She/Her]> Buildscript lib |
16:49:53 | FromDiscord | <Phil> Ain't nothing getting between me and just using raw nimble tasks! |
16:50:05 | FromDiscord | <Phil> No additional abstraction layers! |
16:59:38 | FromDiscord | <Chronos [She/Her]> Just have a tasks folder 😎 |
16:59:40 | NimEventer | New thread by Araq: NIR, see https://forum.nim-lang.org/t/10594 |
17:25:54 | FromDiscord | <Chronos [She/Her]> What would I name a proc that has the sole purpose of being used for running code in `asyncCheck`? Not sure how to name it oof |
17:26:38 | FromDiscord | <Chronos [She/Her]> Oh, `initialiseTasks`? |
17:30:05 | FromDiscord | <Chronos [She/Her]> Doing that yeet |
17:57:26 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
18:36:08 | * | Maksimilan__ quit (Read error: Connection reset by peer) |
18:44:58 | * | Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
18:46:18 | * | Batzy joined #nim |
18:49:57 | FromDiscord | <curome> sent a long message, see down for a while due to DDOS. thanks, buddy! |
18:56:08 | * | neceve joined #nim |
19:05:24 | FromDiscord | <griffith1deadly> In reply to @curome "Ok so i tried": just skill issue bro |
19:11:36 | FromDiscord | <curome> In reply to @griffith1deadly "just skill issue bro": But it's your skill issue if you can't help |
19:19:10 | * | krux02 joined #nim |
19:20:21 | * | krux02 quit (Remote host closed the connection) |
19:24:58 | FromDiscord | <griffith1deadly> In reply to @curome "But it's your skill": https://github.com/treeform/pixie/blob/master/src/pixie/common.nim#L56 |
19:32:04 | FromDiscord | <curome> In reply to @griffith1deadly "https://github.com/treeform/pixie/blob/master/src/p": Ty |
19:36:18 | FromDiscord | <Phil> In reply to @curome "Ok so i tried": for reference `export` typically means that whoever imports the module with said export statement also gets access to the exported symbol. |
19:38:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
19:38:34 | FromDiscord | <Phil> (edit) |
19:40:44 | FromDiscord | <Phil> Therefore the template `dataIndex` should still be available if you import images.nim, hmm |
19:42:11 | FromDiscord | <Phil> Therefore that change should not have broken anything on your end just because the dataIndex template was moved, hmm |
19:43:56 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
19:45:51 | FromDiscord | <curome> Why doesn't it compiles then:boom: ↵↵Im also searching for binaries, but idk, ig that all you can help |
19:47:50 | FromDiscord | <Phil> ...? Binaries? What binaries?↵↵Also I can't tell you why your code doesn't compile, I have not yet learned the magical arts of mindreading to see the code through your eyes 😛 |
19:49:46 | FromDiscord | <curome> In reply to @isofruit "...? Binaries? What binaries?": Binaries i mean compiled |
19:50:08 | FromDiscord | <curome> In reply to @isofruit "...? Binaries? What binaries?": Not my code↵Anuken/mindustry is what i want |
19:50:12 | FromDiscord | <Phil> No I get that, but compiled of what? |
19:50:39 | FromDiscord | <curome> (edit) "code↵Anuken/mindustry" => "code↵Anuken/animdustry" |
19:51:20 | FromDiscord | <Phil> Like, are you looking for the binary output of a project you're compiling?↵Or the binary of the nim compiler? |
19:51:37 | FromDiscord | <curome> I want to play animdustry |
19:51:42 | FromDiscord | <curome> That's the goal |
19:52:27 | FromDiscord | <Phil> https://anuke.itch.io/mindustry ? |
19:52:38 | FromDiscord | <curome> In reply to @isofruit "https://anuke.itch.io/mindustry ?": Animdustry |
19:54:32 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
19:54:39 | FromDiscord | <Phil> Going by the name of "main" |
19:54:53 | FromDiscord | <Phil> or main.exe if you're on windows I'd assume |
20:10:24 | FromDiscord | <curome> sent a long message, see down for a while due to DDOS. thanks, buddy! |
20:12:21 | FromDiscord | <Phil> I mean, warnings depends on the nim version |
21:18:44 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
21:21:25 | Amun-Ra | heh |
21:22:41 | FromDiscord | <Elegantbeef> `range['A'..'Z'](ord('A') + ind)` |
21:23:20 | FromDiscord | <user2m> Ahhh I fiured it'd eb easier than that |
21:23:46 | FromDiscord | <Elegantbeef> I mean you can use `toSeq('A'..'Z')[ind]` but that allocates a sequence |
21:25:11 | FromDiscord | <user2m> fair eneough I'll just write a shortand proc |
21:25:21 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
21:27:17 | FromDiscord | <user2m> beautiful |
21:30:12 | Amun-Ra | hmm |
21:30:38 | Amun-Ra | play.nim works for you? |
21:32:10 | Amun-Ra | all the links I see on irc look like: |
21:32:29 | Amun-Ra | Elegantbeef | sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
21:43:20 | * | advesperacit quit () |
21:54:35 | * | derpydoo quit (Read error: Connection reset by peer) |
21:57:43 | FromDiscord | <ElegantBeef> Playground works, ixio doesnt |
22:29:03 | * | neceve quit (Ping timeout: 240 seconds) |
23:13:23 | FromDiscord | <taperfade> guys |
23:13:38 | FromDiscord | <taperfade> why did some nim stuff break |
23:13:52 | FromDiscord | <jviega> Is that a setup for a joke? |
23:13:57 | FromDiscord | <taperfade> no.. |
23:14:03 | FromDiscord | <taperfade> my modules literally dont work |
23:14:05 | FromDiscord | <taperfade> or smth |
23:14:10 | FromDiscord | <jviega> Then get a bit more specific 🙂 |
23:14:23 | FromDiscord | <taperfade> i guess ill switch to scratch |
23:14:24 | FromDiscord | <taperfade> jk |
23:14:27 | FromDiscord | <taperfade> uhh |
23:14:27 | FromDiscord | <jviega> Or, really, a LOT more specific |
23:15:48 | FromDiscord | <taperfade> sent a code paste, see https://play.nim-lang.org/#ix=down for a while due to DDOS. thanks, buddy! |
23:17:04 | FromDiscord | <taperfade> (edit) |
23:17:58 | FromDiscord | <jviega> Did you just upgrade versions? I'd say downgrade and report a bug if so? |
23:19:40 | FromDiscord | <taperfade> ikd |
23:19:41 | FromDiscord | <taperfade> idk |
23:19:49 | FromDiscord | <taperfade> it just started happening |
23:20:51 | FromDiscord | <Elegantbeef> It no do the worky! |
23:22:38 | FromDiscord | <taperfade> yeah |
23:22:41 | FromDiscord | <taperfade> not malwareing |
23:22:43 | FromDiscord | <taperfade> jk |
23:22:54 | FromDiscord | <taperfade> |