00:00:07 | FromDiscord | <retkid> ooh thats annoying |
00:00:30 | * | rockcavera quit (Ping timeout: 240 seconds) |
00:01:06 | FromDiscord | <retkid> In reply to @Elegantbeef "For finished to be": is this in your lib or stdlib |
00:01:14 | FromDiscord | <Elegantbeef> Finished is stdlib |
00:11:42 | FromDiscord | <retkid> gonna write a template which combines finished and () |
00:12:04 | FromDiscord | <jonhj> Now is your Bitcoin wallet or coinbase 0.00000 I promise 0.80500 in less than 24 hours without sending money to anyone. Earn 0.764 in 7hours, No referrals, No Ads, No scams. Ask how(me)Or join https://t.me/+JdEg2rIn7E0wZDFk |
00:12:07 | FromDiscord | <jonhj> Join and ask how |
00:12:15 | FromDiscord | <retkid> <@&371760044473319454> |
00:49:36 | * | rockcavera joined #nim |
00:49:36 | * | rockcavera quit (Changing host) |
00:49:36 | * | rockcavera joined #nim |
01:01:47 | FromDiscord | <geekrelief> Hi, @ElegantBeef with nimscripter or the vm have you come across `Error: cannont evaluate at compile time` before? |
01:02:14 | FromDiscord | <Elegantbeef> Of course |
01:02:31 | FromDiscord | <Elegantbeef> It's the most common error either caused by badly written code or attempting to use imported C code |
01:03:27 | FromDiscord | <geekrelief> hmm I'm not importing C code, and I'm not sure why my code is bad.. cause it works unless I comment out one line |
01:03:50 | FromDiscord | <Elegantbeef> @Prestige\: No clue if curious but damn is this wayland example compositor much nicer than any reference X WM 😄 https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/tinywl/tinywl.c |
01:03:56 | FromDiscord | <Elegantbeef> Well code or didnt happen |
01:04:03 | FromDiscord | <Elegantbeef> What's the line and context |
01:04:29 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Db |
01:05:10 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=41Dc |
01:05:33 | FromDiscord | <geekrelief> if I comment out the `var a {.test.}` line I get the Error: cannot value at compile time: v |
01:07:10 | FromDiscord | <geekrelief> https://media.discordapp.net/attachments/371759389889003532/993684429308428399/y1qzdGCcjn.mp4 |
01:07:47 | FromDiscord | <Elegantbeef> I know what a compile error is, but thanks for the video 😄 |
01:08:07 | FromDiscord | <geekrelief> sure, more info is better right? anyway, just wanted to give context |
01:08:14 | FromDiscord | <geekrelief> any clue why that's happening? |
01:09:28 | FromDiscord | <Elegantbeef> The error doesnt appear with the normal Nim VM does it? |
01:10:04 | FromDiscord | <geekrelief> sent a code paste, see https://paste.rs/NY8 |
01:10:19 | FromDiscord | <geekrelief> that's the normal nim vm right? |
01:10:20 | FromDiscord | <Elegantbeef> Sure but we can just do `nim e` and run the main file |
01:10:25 | FromDiscord | <Elegantbeef> To reduce the stupidity |
01:10:36 | FromDiscord | <Elegantbeef> The same error appears of course |
01:11:00 | FromDiscord | <geekrelief> you mean `nim e main.nims`? |
01:11:01 | FromDiscord | <geekrelief> that works |
01:11:34 | FromDiscord | <Elegantbeef> So it seems like it's a vm issue with `{.compileTime.}` |
01:12:11 | FromDiscord | <Elegantbeef> changing it to `var code: NimNode` removes the issue |
01:12:42 | NimEventer | New Nimble package! fushin - Fetch fushinsha serif data and save as csv files, see https://github.com/eggplants/fushin |
01:13:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41Dd |
01:14:21 | FromDiscord | <Elegantbeef> I assume it's something along the lines of 'NimVm doesnt care about compileTime as it's runtime but plays with the compile time pragma' |
01:14:33 | FromDiscord | <Elegantbeef> Evaluate the code using a debug compiler if you want to fix it |
01:14:39 | FromDiscord | <Elegantbeef> Otherwise make an issue if one doesnt exist of corse |
01:14:50 | FromDiscord | <Prestige> In reply to @Elegantbeef "<@778498877464117248>\: No clue if": sweet |
01:14:51 | FromDiscord | <geekrelief> thanks, yeah I'll make an issue |
01:15:29 | FromDiscord | <Elegantbeef> Using `: string` and `.repr` is just dumb imo anyway but ymmv |
01:17:13 | FromDiscord | <Elegantbeef> Given this is on the VM it's probably just compileTime being useless |
01:17:25 | FromDiscord | <Elegantbeef> There is no difference between compile time and runtime in the VM iirc it runs code as it gets told to |
01:17:49 | FromDiscord | <Elegantbeef> Actually that's wrong |
01:20:41 | FromDiscord | <Rika> In reply to @NimEventer "New Nimble package! fushin": Strangely specific package haha |
01:21:13 | FromDiscord | <Elegantbeef> The install instructions are are funny |
01:21:30 | FromDiscord | <Elegantbeef> Literally the exact same thing just with more steps 😄 |
01:23:51 | FromDiscord | <geekrelief> to constrain the issue further, code is an uninitialized var, if you give it a value it'll compile |
01:24:20 | FromDiscord | <Elegantbeef> Yea i think on the VM something with compileTime makes it go "Hey the next statement is my r value" |
01:24:43 | FromDiscord | <geekrelief> thx for the help! |
01:24:52 | FromDiscord | <Elegantbeef> Which is why it complains about the next variable but not macro |
01:25:02 | FromDiscord | <Elegantbeef> I'd be curious to know if it complains about a procedure declaration |
01:26:24 | FromDiscord | <geekrelief> with just a declaration the compiler says it expects an implementation |
01:27:04 | FromDiscord | <Elegantbeef> I mean you do need a declaration 😄 |
01:27:11 | FromDiscord | <Elegantbeef> A full declaration not a forward one |
01:28:05 | FromDiscord | <geekrelief> ok, yeah a full one gives no error |
02:22:29 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/993703379907911700/unknown.png |
02:22:35 | FromDiscord | <retkid> this is some of the nim im more proud of |
02:23:22 | FromDiscord | <retkid> its not very complex, but it feels good to my brain |
02:23:26 | FromDiscord | <Elegantbeef> you can jusut do `for x in it()` |
02:23:40 | FromDiscord | <retkid> i could |
02:24:10 | FromDiscord | <retkid> certainly |
02:24:15 | FromDiscord | <retkid> do i want to tho |
02:24:18 | FromDiscord | <Elegantbeef> Instead of the while loop |
02:25:01 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/993704017756688569/unknown.png |
02:25:02 | FromDiscord | <retkid> yea thats better |
02:25:25 | FromDiscord | <retkid> this iterator is also a lot faster than my old method for some reason |
02:25:31 | FromDiscord | <retkid> like 2x faster per image |
02:25:34 | FromDiscord | <Elegantbeef> cause it doesnt reallocate |
02:25:34 | FromDiscord | <retkid> ¯\_(ツ)_/¯ |
02:26:03 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/993704280336912404/unknown.png |
02:26:09 | FromDiscord | <retkid> this is what it looks like but a bit more stuff |
02:26:20 | FromDiscord | <retkid> so idk why it would be faster |
02:47:32 | FromDiscord | <zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dk |
02:47:43 | FromDiscord | <zhmtzhmt> how to replace / with "." |
02:48:35 | FromDiscord | <zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dl |
02:48:52 | FromDiscord | <Rika> That isn’t the issue |
02:49:00 | FromDiscord | <Rika> What other import paths do you have |
02:49:56 | FromDiscord | <zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dm |
02:50:10 | FromDiscord | <Rika> That’s your issue |
02:50:12 | FromDiscord | <Elegantbeef> well there's your problem |
02:50:26 | FromDiscord | <zhmtzhmt> line 3 |
02:50:26 | FromDiscord | <zhmtzhmt> sent a code paste, see https://play.nim-lang.org/#ix=41Dn |
02:50:40 | FromDiscord | <Elegantbeef> Yes it should be `util/Util` |
02:50:41 | FromDiscord | <Rika> It says that using periods is deprecated |
02:51:14 | FromDiscord | <xflywind> No, it is scheduled to be removed. |
02:51:49 | FromDiscord | <zhmtzhmt> Thanks , problem fixed. |
02:53:33 | FromDiscord | <Rika> In reply to @flywind "No, it is scheduled": That is essentially the same as deprecated? Rather, they’re not mutually exclusive |
02:54:38 | FromDiscord | <xflywind> Yeah, I mean I would propose to remove it before Nim v2. |
02:54:55 | FromDiscord | <xflywind> I didn't mean to reply to you though. |
02:55:08 | FromDiscord | <Rika> Oh ok |
03:00:01 | FromDiscord | <zhmtzhmt> I am glad to see nim working very well with c++, I have embeded several c++ classes in nim successfully. I will be free from memory management. 😄 |
03:00:27 | FromDiscord | <zhmtzhmt> Nim is great! |
03:03:13 | FromDiscord | <Rika> “I will be free from memory management” from a C++ programmer is the funniest thing I’ve read today lmao |
03:03:15 | FromDiscord | <Rika> Congrats |
03:04:10 | FromDiscord | <xflywind> Do you use it in work? |
03:08:52 | FromDiscord | <xflywind> !eval echo compileOption("gc") |
03:08:53 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <bool> |
03:09:19 | FromDiscord | <xflywind> 😕 |
03:12:10 | * | toluene quit (Ping timeout: 240 seconds) |
03:12:25 | FromDiscord | <xflywind> The error message is not friendly for misused program. |
03:21:05 | FromDiscord | <xflywind> Nim v2 is a bit rush with little manpower we have. |
03:23:21 | * | toluene joined #nim |
04:11:56 | * | arkurious quit (Quit: Leaving) |
04:14:25 | FromDiscord | <j-james> how can i check if an Option is some() or none() in an if statement? |
04:14:41 | FromDiscord | <Elegantbeef> `isNone` or `isSome` |
04:15:33 | * | rockcavera quit (Remote host closed the connection) |
04:15:41 | FromDiscord | <j-james> ah ty |
04:15:59 | FromDiscord | <Phil> Option also has neat functionality such as "map" where you transform the value inside |
04:16:13 | FromDiscord | <Phil> On an unrelated sidenote, I am up way too early |
04:17:08 | FromDiscord | <j-james> options have been very nice so far |
04:17:20 | FromDiscord | <Rika> Pattern matching where |
04:17:21 | FromDiscord | <j-james> except, nimlsp appears to break on them |
04:18:13 | FromDiscord | <j-james> aah red squigglies https://media.discordapp.net/attachments/371759389889003532/993732510313881670/2022-07-04-211734.png |
04:19:07 | FromDiscord | <Phil> And stuff like that is why I try to use the most mainstream tooling possible |
04:19:19 | FromDiscord | <Elegantbeef> Eh that's a nimsuggest issue not a lsp issue |
04:19:29 | FromDiscord | <Elegantbeef> Restart the lsp and if it's still broken try to make a min repro |
04:22:15 | FromDiscord | <j-james> In reply to @Elegantbeef "Restart the lsp and": restarting fixed it 🤦 |
04:22:38 | FromDiscord | <j-james> how have i still not learned the golden rule of computers |
04:23:48 | FromDiscord | <Phil> In reply to @j-james "how have i still": Nobody ever does, it catches you after 5 years when you least expect it at the place you least expect it |
04:24:13 | FromDiscord | <Phil> Like when stuff randomly stops working on arch and you realize "Oh wait, I just updated 50 packages, maybe need to do a reboot" |
05:33:45 | FromDiscord | <frobnicate> In reply to @Isofruit "And stuff like that": What do you use? |
06:02:04 | madprops | what's the best way to measure in ms the execution of a function. to display to the user? |
06:03:53 | FromDiscord | <Elegantbeef> `std/monotimes` is pretty good store time before and after then just use Nim's `times.$` |
06:07:42 | madprops | don't need nanosecond precision hmm |
06:09:11 | FromDiscord | <Elegantbeef> well then if you dont need precision you can just use times |
06:09:41 | madprops | echo (time_end - time_start) * 1000 |
06:09:47 | madprops | that would give me ms right? |
06:11:42 | madprops | now just to format it to 2 decimal places |
06:11:50 | madprops | that's always a fun ride |
06:12:26 | FromDiscord | <Elegantbeef> I mean you can access the time you want but yea |
06:12:49 | madprops | how do you access it? |
06:13:29 | madprops | im using cpuTime |
06:19:31 | FromDiscord | <Rika> Times has overhead |
06:19:37 | FromDiscord | <Rika> More overhead than mono times |
06:19:40 | madprops | hmm |
06:19:52 | FromDiscord | <Rika> Just remove the nanoseconds part or manual formatting |
06:19:59 | madprops | it's monkeytime i guess then |
06:26:50 | madprops | let ms = duration.inNanoSeconds.float / 1_000_000 |
06:33:24 | FromDiscord | <jmgomez> https://media.discordapp.net/attachments/371759389889003532/993766530913411072/message.txt |
06:33:34 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=41Eb |
06:37:05 | FromDiscord | <Elegantbeef> Odd error |
06:38:21 | FromDiscord | <Elegantbeef> Given this isnt in a weird def https://github.com/nim-lang/Nim/blob/8bfc396a4dfa722239818f399a119452a53fe07f/lib/system/arc.nim#L169 |
06:41:01 | FromDiscord | <jmgomez> So is it a bug? Maybe worth mentioning that's happening on config.nims file |
06:41:10 | FromDiscord | <jmgomez> (edit) "So is it a bug? Maybe worth mentioning that's happening on ... config.nims" added "a" |
06:42:10 | FromDiscord | <Elegantbeef> Uhh it's happening with nimscript that's odd |
06:43:14 | madprops | https://github.com/nim-lang/RFCs/issues/218 |
06:43:22 | madprops | if i continue inside an except what happens? |
06:43:41 | FromDiscord | <Elegantbeef> It goes to the next iteration |
06:44:22 | FromDiscord | <jmgomez> In reply to @Elegantbeef "Uhh it's happening with": yes.. maybe a workaround could be to deactivate it for nimscript but use it on the final code? Is that even an option? |
06:44:36 | FromDiscord | <Elegantbeef> I mean just define it after the code |
06:44:39 | FromDiscord | <xflywind> Not so related, nimscript doesn't work with orc defines. |
06:45:26 | FromDiscord | <Elegantbeef> Wait the Nim compiler's VM doesnt work if you define orc? |
06:46:11 | FromDiscord | <jmgomez> In reply to @Elegantbeef "I mean just define": hw that worked :/ |
06:46:50 | FromDiscord | <xflywind> I mean it cannot build with orc symbols |
06:46:54 | FromDiscord | <xflywind> https://github.com/nim-lang/Nim/pull/19972/commits/becf63183c41d3ee541d054a8ad05e77fed3f8b9 |
06:47:02 | FromDiscord | <Elegantbeef> I know that |
06:47:08 | FromDiscord | <Elegantbeef> But we're talking about nimscript running on the stock Nim VM |
06:47:50 | FromDiscord | <xflywind> Yeah, so I said "not so related" 😂 |
06:48:32 | FromDiscord | <Elegantbeef> `--gc:orc` or `--gc:arc` in your config and then run some code after that causes the NimVM to not work cause "GC is defined" is odd behaviour |
06:48:34 | FromDiscord | <jmgomez> should I fill an issue or is it something known already? |
06:49:18 | FromDiscord | <Elegantbeef> Shouldnt the NimVM used for configuration ignore `gc` options all together |
06:49:31 | FromDiscord | <xflywind> did you use devel compiler? |
06:49:44 | FromDiscord | <jmgomez> yes, but it doesn happen in 1.6.6 too |
06:49:50 | FromDiscord | <jmgomez> (edit) "doesn" => "does" |
06:49:58 | FromDiscord | <xflywind> I see |
06:50:25 | FromDiscord | <Elegantbeef> The issue is that they have `--gc:orc` specified before the config is loaded which causes a gcorc bug with the NimVM used for configuration |
06:51:03 | FromDiscord | <Elegantbeef> I dont see that the configuration needs to worry about GC options |
06:51:21 | FromDiscord | <jmgomez> the odd thing is that it started to happen after a refactor, here is defined before and it works just fine https://github.com/jmgomez/NimForUE/blob/master/config.nims |
06:51:48 | FromDiscord | <Elegantbeef> writting nimconfig files like the stone age overhere |
06:51:59 | FromDiscord | <Elegantbeef> you know Nim has a `--` macro for nimscript configurations? |
06:52:11 | FromDiscord | <Elegantbeef> `--mm:orc` is valid nimscript config 😄 |
06:52:48 | FromDiscord | <jmgomez> ohh didnt know that I thought it was just for cfg files. Im planning to moving them into an array anyways, but thanks! |
06:53:43 | FromDiscord | <xflywind> In reply to @jmgomez "should I fill an": Yeah. I didn't see one. |
06:54:01 | FromDiscord | <Elegantbeef> You still need to make a min repro though 😄 |
06:54:23 | FromDiscord | <jmgomez> Okay, will try to isolated it to the min not sure if I will be able to though |
06:54:37 | FromDiscord | <Elegantbeef> I believe in you |
06:54:48 | FromDiscord | <jmgomez> 😂 |
06:57:00 | * | gsalazar joined #nim |
06:57:20 | FromDiscord | <Elegantbeef> Eh i got close |
06:58:48 | * | toluene quit (Ping timeout: 276 seconds) |
06:58:54 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/W4C |
06:59:19 | FromDiscord | <luteva> what does arc/orc stand for? I know it is the (now default) GC, but just what exactly do the terms stand for and why are they (always) mentioned both at the same time? RC stands for reference counting, right? So, what do the A and the O stand for? |
06:59:36 | FromDiscord | <Rika> Araq’s and “because it looks like a cycle” |
07:00:07 | * | toluene joined #nim |
07:02:15 | FromDiscord | <ezquerra> I believe the A means Automatic |
07:03:43 | FromDiscord | <demotomohiro> probably this? https://en.wikipedia.org/wiki/Automatic_Reference_Counting |
07:03:57 | FromDiscord | <Rika> I believe Araq specifically said it didn’t mean that |
07:06:47 | FromDiscord | <jmgomez> How it compares with the one in Swift/Obj-C? Is it more performant? |
07:07:14 | FromDiscord | <Elegantbeef> https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html |
07:08:02 | FromDiscord | <xflywind> Yeah, it should be performant in single thread. |
07:08:37 | FromDiscord | <xflywind> (edit) "Yeah, it should be ... performant" added "more" |
07:08:48 | FromDiscord | <jmgomez> 👍 |
08:05:59 | FromDiscord | <retkid> how can i take stdin better in nim |
08:06:08 | FromDiscord | <retkid> i would like to run a proc every time a character is typed |
08:06:11 | FromDiscord | <retkid> or have a timeout |
08:10:11 | madprops | i've done that in rust |
08:10:21 | madprops | with some terminal lib |
08:14:23 | FromDiscord | <retkid> I've done it in JS |
08:14:45 | FromDiscord | <retkid> JS's design makes it kinda trivial |
08:14:51 | FromDiscord | <Elegantbeef> It's a shame Nim doesnt have an async readline/readchar |
08:15:02 | FromDiscord | <retkid> i would put it in an iterator |
08:15:43 | FromDiscord | <retkid> In reply to @Elegantbeef "It's a shame Nim": i think you can do STDIN with a stream but |
08:15:44 | FromDiscord | <retkid> uygh |
08:15:46 | FromDiscord | <retkid> (edit) "uygh" => "ugh" |
08:17:16 | FromDiscord | <Prestige> Don't know your exact use case but thought I'd mention https://github.com/johnnovak/illwill |
08:21:57 | FromDiscord | <retkid> kinda like using a high precision laser to open a fedex package |
08:21:58 | FromDiscord | <retkid> but |
08:22:00 | FromDiscord | <retkid> It'll do |
08:22:05 | madprops | loks nice |
08:22:16 | madprops | looks ill even |
08:22:35 | FromDiscord | <Prestige> In reply to @retkid "kinda like using a": Sounds like a good time |
08:23:00 | FromDiscord | <retkid> well you could just use a boxcutter |
08:23:09 | FromDiscord | <retkid> but i dont have one\ |
08:23:13 | FromDiscord | <Prestige> But LASERS |
08:23:13 | FromDiscord | <retkid> so the laser will do |
08:23:39 | FromDiscord | <Prestige> Can't you just do like https://nim-lang.org/docs/io.html#readChar%2CFile readChar(stdin) or am I crazy? |
08:23:56 | madprops | on the shoulders of giga ants |
08:25:28 | FromDiscord | <retkid> . |
08:25:30 | FromDiscord | <retkid> (edit) "." => "> Should not be used in performance sensitive code." |
08:25:39 | FromDiscord | <retkid> Im using this function in preformance sensitive code |
08:25:42 | FromDiscord | <retkid> (edit) "preformance" => "performance" |
08:25:44 | FromDiscord | <retkid> :| |
08:26:04 | madprops | listening to input very fast? |
08:26:27 | FromDiscord | <xflywind> https://nim-lang.org/docs/rdstdin.html#readLineFromStdin%2Cstring |
08:26:34 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/993795010392756284/unknown.png |
08:26:40 | FromDiscord | <retkid> oh no wrong function |
08:32:09 | FromDiscord | <demotomohiro> Last time I searched for how to read stdin asynchronously, it seems there is no way to do that on windows. You probably need to get keyboard input using other API. |
08:42:52 | * | pch quit (Quit: Leaving) |
09:00:27 | FromDiscord | <Entikan> how do I dereference a pointer? |
09:02:01 | FromDiscord | <Rika> [] |
09:02:10 | FromDiscord | <Rika> On the end |
09:02:15 | FromDiscord | <Rika> Like an array but without a number |
09:02:30 | FromDiscord | <Rika> In reply to @demotomohiro "Last time I searched": There indeed isn’t |
09:02:30 | FromDiscord | <Prestige> `myPointer[]` |
09:02:54 | FromDiscord | <demotomohiro> !eval var a = 123;var p = a.addr; echo p[] |
09:02:57 | NimBot | 123 |
09:03:02 | FromDiscord | <Entikan> gotcha |
09:03:44 | madprops | what happened to Araq? |
09:04:11 | FromDiscord | <Prestige> What do you mean? |
09:04:19 | madprops | i never see him here |
09:04:54 | FromDiscord | <Prestige> I think he's mostly using discord |
09:05:17 | madprops | well this is a discord channel |
09:05:23 | madprops | slash irc |
09:05:27 | madprops | alsh matrix |
09:06:21 | FromDiscord | <Rika> He frequents #internals more |
09:08:05 | * | pch joined #nim |
09:09:19 | madprops | i published some aur packages that depend on the nim compiler |
09:09:28 | madprops | feels ok to make it a dependence |
09:09:35 | madprops | but for a rust program i just made a bin package |
09:09:41 | madprops | something about the rust compiler feels bloated |
09:10:04 | madprops | also lots of dependencies |
09:10:30 | madprops | and github started triggering the warnings of deprecated packages |
09:11:27 | madprops | if you wanna check a simple program on aur install goldie-git |
09:12:12 | madprops | with my clipboard manager i got into a weird situation where i had to make a c program aur package |
09:12:21 | madprops | because "clipnotify" is terribly outdated |
09:12:28 | madprops | some guy made a merge request in 2019 |
09:12:31 | madprops | nothing happened |
09:12:38 | madprops | so i used the merge and made a package |
09:13:20 | madprops | but i kinda have to tell users to also install that themselves |
09:19:47 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/993808400200769547/unknown.png |
09:19:48 | FromDiscord | <retkid> now |
09:19:55 | FromDiscord | <retkid> i dont know how it'lll handle japanese |
09:20:00 | FromDiscord | <retkid> but we'll go onto that bring when we come ot it |
09:20:44 | FromDiscord | <retkid> (edit) "bring" => "bridge" |
09:21:06 | FromDiscord | <sealmove> Hey basic question: How does Nim compile to C? Is it done with gcc only or you can do it with clang for example? |
09:21:24 | FromDiscord | <retkid> you can change the gcc options with the gcc flag |
09:21:31 | FromDiscord | <retkid> you can turn it off but its not a good idea |
09:21:46 | FromDiscord | <retkid> as most libraries are deved with it in mind and you'll memory leak out the ass |
09:22:11 | FromDiscord | <Elegantbeef> gcc not gc |
09:22:16 | FromDiscord | <retkid> ..................... |
09:22:32 | FromDiscord | <retkid> oh you can also change it from gcc to clang or musl if you want |
09:22:33 | FromDiscord | <Elegantbeef> You can use multiple C compilers with Nim clang, gcc, vcc, tcc all are supported iirc |
09:22:40 | FromDiscord | <retkid> wait is musl supported |
09:22:57 | FromDiscord | <Elegantbeef> It works dont think it has a `--cc` flag |
09:22:58 | FromDiscord | <retkid> wait does musl have a compiler |
09:25:32 | FromDiscord | <sealmove> I wonder if something like this could be used https://github.com/WebAssembly/wasi-sdk 🥺 |
09:26:14 | FromDiscord | <retkid> well |
09:26:14 | FromDiscord | <sealmove> It's supposed to be a drop-in replacement of clang |
09:26:20 | FromDiscord | <retkid> we have wasm |
09:26:24 | FromDiscord | <Elegantbeef> Probably |
09:26:26 | FromDiscord | <retkid> and if its drop in then it wouldn't be much effort |
09:26:28 | FromDiscord | <Elegantbeef> Though you can use emcc |
09:26:41 | FromDiscord | <Elegantbeef> Or try nlvm |
09:26:43 | FromDiscord | <sealmove> no I don't want wasm for browser, I want wasi support |
09:26:58 | FromDiscord | <sealmove> In reply to @Elegantbeef "Or try nlvm": yeah I am trying to understand its approach |
09:27:02 | FromDiscord | <Elegantbeef> emcc can make WASI modules |
09:27:09 | FromDiscord | <retkid> well, if it has the same args as clang, then, im pretty sure its a matter of modifying a few lines of code? |
09:27:23 | FromDiscord | <sealmove> emcc == emcscripten right? |
09:27:43 | FromDiscord | <Elegantbeef> Yea it's just `--cc:clang --clang.exe="pretendWereclang"` |
09:27:46 | FromDiscord | <Elegantbeef> Yes |
09:28:10 | FromDiscord | <Elegantbeef> I've used emscripten with a simple Nim config and got WASI modules that run in a native WASM runtime |
09:28:39 | FromDiscord | <sealmove> wow! can you share? |
09:28:48 | FromDiscord | <Elegantbeef> Didnt i share this before? |
09:29:17 | FromDiscord | <Elegantbeef> https://github.com/beef331/wasmedge_playground/tree/master/wasmsources |
09:30:04 | FromDiscord | <retkid> i wish i could wrap my head around the nim opengl stuff so i can do really weird browser shenanigans |
09:30:31 | FromDiscord | <Elegantbeef> "nim opengl stuff" |
09:30:51 | FromDiscord | <Elegantbeef> Use a version that is opengl gles compatible and then follow treeforms emscripten guide |
09:30:58 | FromDiscord | <Elegantbeef> You're now doing browser shenanigans |
09:31:09 | madprops | i wonder what elegant's main project is |
09:31:15 | FromDiscord | <retkid> i mean nimgl |
09:31:37 | FromDiscord | <retkid> i dont wanna know |
09:31:47 | FromDiscord | <Elegantbeef> https://streamable.com/6fkxma |
09:31:51 | FromDiscord | <Elegantbeef> It's nothing much really |
09:32:08 | FromDiscord | <Elegantbeef> The wasm toying around is for my next project |
09:32:35 | FromDiscord | <sealmove> In reply to @Elegantbeef "Didnt i share this": right, sorry I am only now starting to understand the technologies |
09:33:21 | madprops | beef i like the wavy effect on the ocean tiles |
09:33:28 | FromDiscord | <retkid> i got distracted form my main project and am now building a small tool to practice japanese |
09:33:42 | FromDiscord | <Elegantbeef> madprops i'm very very bad at working on a singular thing so it's a long long project that is relatively simple |
09:33:56 | FromDiscord | <Elegantbeef> Yea my water shader is fantastic |
09:33:58 | FromDiscord | <retkid> main project is mighty stupid though |
09:34:08 | FromDiscord | <retkid> that certainly is a water shader |
09:34:11 | FromDiscord | <retkid> sometimes it gets me sad |
09:34:18 | FromDiscord | <retkid> whenever i work on games |
09:34:20 | FromDiscord | <retkid> and i realize |
09:34:26 | FromDiscord | <Elegantbeef> Do you see mine i've yet see a person even know what the mechanic is supposed to be |
09:34:36 | FromDiscord | <retkid> "Woah this cool thing i do would have been mildly impressive in 1994" |
09:34:39 | madprops | best game i've made is this https://tetris.merkoba.com/ |
09:34:45 | madprops | but my main project is a chat system |
09:35:57 | FromDiscord | <Elegantbeef> My next game idea will use wasm for modding and a plugin system which is why i've toyed it |
09:36:14 | FromDiscord | <Elegantbeef> I really really like the idea of being able to script from any language |
09:36:23 | FromDiscord | <retkid> I was working on a website |
09:36:24 | FromDiscord | <retkid> then i got sad |
09:36:38 | FromDiscord | <Elegantbeef> Sounds like someone needs som anti depressants |
09:36:43 | FromDiscord | <retkid> so then i stopped because i cannot stand frontend design |
09:36:53 | FromDiscord | <retkid> In reply to @Elegantbeef "Sounds like someone needs": what about me gives you that impression |
09:37:09 | FromDiscord | <Elegantbeef> "I work on game it makes me sad, i make site it makes me sad" |
09:37:17 | FromDiscord | <Elegantbeef> A lot of sad and not a lot of glad |
09:37:27 | FromDiscord | <retkid> this is true |
09:37:35 | FromDiscord | <retkid> i am glad my brain is barely functioning enough to do this stuff |
09:38:43 | madprops | also made this minesweeper https://mines.merkoba.com/ |
09:38:47 | madprops | simple but nice |
09:38:52 | FromDiscord | <retkid> i spent 10 minutes looking for a way to do \r in nim |
09:38:59 | FromDiscord | <retkid> then i realized you do \r in nim |
09:39:03 | FromDiscord | <retkid> by typing \r |
09:39:34 | FromDiscord | <Elegantbeef> Anyway i'm outta here |
09:39:34 | madprops | also invented some new shitty game and paid a youtuber to make videos about it |
09:39:54 | FromDiscord | <retkid> In reply to @madprops "also invented some new": sounds like someone has too much money |
09:40:11 | madprops | naj |
09:40:12 | madprops | nah |
09:40:38 | madprops | i did pay for a narrated movie though |
09:40:44 | madprops | based on a real diaspora discussion |
09:45:30 | madprops | im beating ag now |
09:45:36 | madprops | my program is 10x as fast roughly |
09:46:18 | FromDiscord | <Rika> Does it do as much |
09:46:40 | madprops | it has a tendency of ignoring files so maybe it does less |
09:47:03 | madprops | but it's still an inspiration |
09:47:45 | madprops | actually it does more in this caase |
09:47:51 | madprops | my program has a 100 results limit |
09:47:54 | madprops | ag just goes on |
09:48:09 | FromDiscord | <Rika> Sounds like it does less to me |
09:48:11 | madprops | i figured tha nobody would care to see more than 100 results at once |
09:48:33 | FromDiscord | <Rika> Use a pager for many results maybe? |
09:48:59 | madprops | like more? |
09:50:20 | madprops | the way i use this |
09:50:26 | madprops | is to see if any results exist |
09:50:28 | madprops | then i inspect them |
09:55:41 | madprops | https://i.imgur.com/VYn8wMs.jpg |
10:13:23 | FromDiscord | <luteva> sent a code paste, see https://play.nim-lang.org/#ix=41EQ |
10:14:31 | FromDiscord | <luteva> (edit) "https://play.nim-lang.org/#ix=41EQ" => "https://play.nim-lang.org/#ix=41ER" |
10:15:20 | FromDiscord | <luteva> (edit) "https://play.nim-lang.org/#ix=41ER" => "https://play.nim-lang.org/#ix=41ES" |
10:18:45 | FromDiscord | <untoreh> @luteva |
10:20:04 | FromDiscord | <untoreh> sent a code paste, see https://play.nim-lang.org/#ix=41EV |
10:22:40 | FromDiscord | <luteva> oh thank you! one more reason to learn the ropes of macros 😄 |
10:28:46 | * | rockcavera joined #nim |
10:28:46 | * | rockcavera quit (Changing host) |
10:28:46 | * | rockcavera joined #nim |
10:31:10 | * | jmdaemon quit (Ping timeout: 240 seconds) |
11:13:10 | * | pch quit (Read error: Connection reset by peer) |
11:18:42 | FromDiscord | <Phil> In reply to @frobnicate "What do you use?": The most mainstream editor of them all, vscode, or rather its Foss base whose name I keep forgetting |
11:19:53 | madprops | i used codium until it created some conflicts with something that expected vscode |
11:20:08 | FromDiscord | <Generic> it's not based on anything, it's a Firefox like situation |
11:20:08 | madprops | so i figured the hassle wasn't worth it |
11:20:38 | FromDiscord | <Generic> where the main thing is open source and the distributed builds come with branding and telemetry |
12:04:59 | * | xet7 joined #nim |
12:08:34 | FromDiscord | <TryAngle> why does this only compile when I add a ( ) around the "T" https://media.discordapp.net/attachments/371759389889003532/993850878362652682/unknown.png |
12:08:37 | FromDiscord | <Entikan> sent a code paste, see https://play.nim-lang.org/#ix=41Fr |
12:09:45 | FromDiscord | <TryAngle> funny enough at other places it works |
12:09:56 | FromDiscord | <TryAngle> I think this only erros when I wanna do x = r"" |
12:10:11 | FromDiscord | <TryAngle> so only assigns error |
12:10:18 | FromDiscord | <TryAngle> (edit) "assigns" => "assignments" |
12:10:46 | FromDiscord | <Entikan> oh snap nvm |
12:12:29 | FromDiscord | <Entikan> I'm a dumbdumb |
12:13:24 | FromDiscord | <TryAngle> In reply to @Entikan "I'm a dumbdumb": same 😔 ↵I always ask questions here and realize the solution 1-10s after I pressed enter |
12:13:32 | FromDiscord | <TryAngle> (not the case for this one) |
12:14:00 | FromDiscord | <Entikan> yeah I need a rubber ducky |
12:25:57 | FromDiscord | <Phil> Rubber quack then, I guess 😄 |
12:46:06 | FromDiscord | <Hamid_Bluri> why i can't do that 😕 https://media.discordapp.net/attachments/371759389889003532/993860320655327362/unknown.png |
12:46:23 | FromDiscord | <dom96> In reply to @TryAngle "why does this only": my guess is it clashes with the language-level raw-string literals |
12:46:35 | FromDiscord | <dom96> https://nim-lang.org/docs/manual.html#lexical-analysis-raw-string-literals |
12:46:45 | FromDiscord | <dom96> try renaming the `r` template to a different letter |
12:47:49 | FromDiscord | <Hamid_Bluri> In reply to @hamidb80 "why i can't do": also I can't import both `std/math` and `my_module/math` |
12:49:42 | FromDiscord | <dom96> In reply to @hamidb80 "also I can't import": `import my_module/math as my_math` should work |
12:56:31 | FromDiscord | <fbpyr> there was a way to store results from a loop directly into a let variable right? something like this (but with correct syntax 🤔 )\:↵`let nums: seq[int] = for i in 0..5: nums.add(i)` |
13:01:21 | FromDiscord | <enthus1ast> sent a code paste, see https://paste.rs/Y7Q |
13:02:08 | FromDiscord | <fbpyr> ah via collect! thank you so much [enthus1ast](https://matrix.to/#/@sn0re:matrix.code0.xyz) ! |
13:02:30 | FromDiscord | <enthus1ast> would have worked |
13:02:31 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41FF |
13:12:16 | oz | back |
14:14:29 | FromDiscord | <enthus1ast> can i test in a macro if the expression is static? |
14:15:39 | FromDiscord | <enthus1ast> i want to further optimize the nimja codegen, to not create string.add statements when a expression (variable, or proc) returns a static/const |
14:16:13 | * | arkurious joined #nim |
14:21:39 | FromDiscord | <sOkam!> Would it be possible to compile a `.dll` file, written in Nim, so that its fully compatible with loading the file from a C project's binaries? |
14:21:40 | FromDiscord | <Yardanico> you can probably use `compiles` for this |
14:21:46 | FromDiscord | <Yardanico> In reply to @sOkam! "Would it be possible": not sure what you exactly mean |
14:21:53 | FromDiscord | <Yardanico> if you want a C application to load a Nim dll, then yes, it's possible |
14:22:05 | FromDiscord | <Yardanico> Nim dlls are fully self-contained including the GC, you just have to properly do FFI |
14:22:19 | FromDiscord | <Yardanico> for example https://github.com/jangko/nppnim |
14:22:21 | FromDiscord | <Yardanico> notepad++ plugin |
14:23:13 | FromDiscord | <sOkam!> i see, thx |
14:23:20 | FromDiscord | <sOkam!> where can i read about the ffi part?? |
14:23:48 | FromDiscord | <Yardanico> there's no separate resource, it's just how you do the usual C FFI |
14:24:12 | FromDiscord | <Yardanico> `{.exportc, dynlib.}`, your exposed procs should have C types as their arguments and have a C type as a return type |
14:24:12 | FromDiscord | <sOkam!> I just found this on google. Is this it?↵https://nim-lang.org/docs/backends.html |
14:24:30 | FromDiscord | <Yardanico> yes, but these are only the basics |
14:30:31 | * | gsalazar quit (Read error: Connection reset by peer) |
14:30:33 | * | gsalazar_ joined #nim |
14:35:41 | * | gsalazar joined #nim |
14:35:44 | * | gsalazar_ quit (Ping timeout: 244 seconds) |
14:40:22 | FromDiscord | <sOkam!> super helpful read. thx yard |
14:43:32 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=41G8 |
14:47:51 | * | derpydoo joined #nim |
14:58:18 | * | fallback quit (Ping timeout: 240 seconds) |
15:06:34 | FromDiscord | <enthus1ast> nope does not work inside macros (or i dont know how),↵@Yardanico you mentioned compiles |
15:06:54 | FromDiscord | <Yardanico> you can make your way work in macros by using double-macros |
15:06:58 | FromDiscord | <Yardanico> or a template + macro |
15:07:15 | FromDiscord | <Yardanico> emit code in first macro that'll call the second macro with the result (if the expression is static or not) |
15:07:18 | FromDiscord | <Yardanico> or make a template that does the same |
15:10:49 | FromDiscord | <enthus1ast> sent a code paste, see https://paste.rs/qFq |
15:12:30 | FromDiscord | <enthus1ast> here instead of the (poor) parseStmt try, i would call the second macro? |
15:12:51 | FromDiscord | <Yardanico> you would emit the code calling the second macro |
15:14:04 | FromDiscord | <enthus1ast> mh i'm not sure if i can do this in this step, because i need this information before i even emit code |
15:15:15 | FromDiscord | <enthus1ast> emit NimNodes i mean |
15:19:07 | FromDiscord | <TryAngle> In reply to @dom96 "try renaming the `r`": I see, thanks |
15:19:29 | FromDiscord | <TryAngle> is there a good templating language for html similar to jinja2 that works well with jester? |
15:19:38 | FromDiscord | <TryAngle> (edit) "jester?" => "jester and tailwind css?" |
15:20:05 | FromDiscord | <enthus1ast> nimja (shameless self plug) |
15:20:24 | FromDiscord | <ajusa> Nimja is good |
15:20:29 | FromDiscord | <enthus1ast> if its "good" you must decide for yourself |
15:20:54 | FromDiscord | <TryAngle> looks gucci |
15:20:55 | FromDiscord | <TryAngle> thx |
15:20:59 | FromDiscord | <TryAngle> for creating this |
15:21:01 | FromDiscord | <ajusa> https://github.com/ajusa/simple-twitter/blob/master/server.nim |
15:21:19 | FromDiscord | <ajusa> Example with Nimja and Jester |
15:21:33 | FromDiscord | <TryAngle> thanks 🥺 |
15:21:56 | FromDiscord | <TryAngle> is there also a good session plugin for jester? |
15:22:18 | FromDiscord | <dom96> In reply to @ajusa "https://github.com/ajusa/simple-twitter/blob/master": That's cool. You wanna add it to Jester's readme? :D |
15:23:33 | FromDiscord | <TryAngle> or idk if this is required at all but I would like store some temporary data per user |
15:23:38 | FromDiscord | <TryAngle> how would htis be done in jester? |
15:24:18 | FromDiscord | <enthus1ast> you must do session handling yourself |
15:24:19 | FromDiscord | <enthus1ast> setting a cookie on a route, then look the cookie value up in some kind of datastore |
15:24:25 | FromDiscord | <enthus1ast> on every other route |
15:24:49 | FromDiscord | <enthus1ast> prologue has a session middleware btw |
15:24:58 | FromDiscord | <TryAngle> what is prologue? |
15:25:19 | FromDiscord | <TryAngle> In reply to @enthus1ast "setting a cookie on": this would work for me, but how would u do that? |
15:25:20 | FromDiscord | <enthus1ast> its another web framework |
15:25:35 | FromDiscord | <enthus1ast> a simple table would work already↵(@TryAngle) |
15:25:53 | FromDiscord | <enthus1ast> the cookie is actually just a part in the http header |
15:26:00 | FromDiscord | <TryAngle> I mean the cookie part lol |
15:26:14 | FromDiscord | <enthus1ast> which is set on every request by the browser |
15:26:40 | FromDiscord | <enthus1ast> so eg have a login route, that checks login, and if good you responst with a response that have the set cookie headers set |
15:27:34 | FromDiscord | <enthus1ast> and the cookie contains a random id |
15:27:42 | FromDiscord | <enthus1ast> this one you store in a table on the server |
15:28:24 | FromDiscord | <enthus1ast> then every following request from this browser session will have the cookie set in the http header, |
15:28:50 | FromDiscord | <enthus1ast> so in every route, you look into the table and retreive the values you have stored in the table |
15:29:02 | FromDiscord | <TryAngle> hm ok I think I understand, thanks |
15:29:12 | FromDiscord | <enthus1ast> BUT do not forget the annoying eu popups when you set cookies \:D |
15:29:44 | FromDiscord | <TryAngle> In reply to @enthus1ast "BUT do not forget": I don't htink they are required as long as Idon't store actual user data |
15:30:11 | FromDiscord | <TryAngle> I just want to write a text cursefier where u can modify the probabilities |
15:34:53 | FromDiscord | <TryAngle> sent a long message, see http://ix.io/41Gu |
15:36:40 | FromDiscord | <enthus1ast> so you write "500 days no shower" and it generates "500 ÐÀYS NÒ $HÒWĖR"? |
15:37:04 | FromDiscord | <TryAngle> In reply to @enthus1ast "so you write "500": ye and I want to be able to set how likely for example an S gets replaced with $ |
15:37:19 | FromDiscord | <Yardanico> and what is the issue? |
15:37:36 | FromDiscord | <enthus1ast> for the likelyhood you can generate an int eg rand(100) |
15:37:37 | FromDiscord | <Yardanico> you can just have a mapping from char to a mapping with possibilities |
15:37:42 | FromDiscord | <Yardanico> that it gets replaced with |
15:37:47 | FromDiscord | <TryAngle> that is not the issue I have that code already |
15:38:00 | FromDiscord | <TryAngle> I was just wondering how to make jester being able to "store" those values |
15:38:10 | FromDiscord | <TryAngle> (edit) "values" => "probabilities per site call" |
15:38:20 | FromDiscord | <enthus1ast> you can store it in the browser |
15:38:38 | FromDiscord | <TryAngle> @enthus1ast already said how to do it with cookies, I think this is good for this case idk, but it should work |
15:38:40 | FromDiscord | <Yardanico> In reply to @TryAngle "I was just wondering": you mean per session? |
15:38:46 | FromDiscord | <TryAngle> In reply to @Yardanico "you mean per session?": yes |
15:38:50 | FromDiscord | <Yardanico> on the server-side or in the browser? |
15:38:57 | FromDiscord | <enthus1ast> https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Client-side_storage |
15:38:59 | FromDiscord | <Yardanico> but yeah, you can just do it with cookies, that's how most session stuff works |
15:39:15 | FromDiscord | <TryAngle> server side, I wanna write nim not javascript(🤮) |
15:39:22 | FromDiscord | <Yardanico> you generate some ID for the cookie on the client-side, and set that cookie as the key to possibilities table (whatever) on your server |
15:39:26 | FromDiscord | <Yardanico> and retrieve when needed |
15:39:51 | FromDiscord | <enthus1ast> nim can also compile to js ;) |
15:40:01 | FromDiscord | <TryAngle> oh actually true I totally forgot about this 🤔 |
15:40:41 | FromDiscord | <TryAngle> In reply to @enthus1ast "https://developer.mozilla.org/en-US/docs/Learn/Java": isn't this for JS? |
15:40:47 | FromDiscord | <TryAngle> https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies this should work for cookies no? |
15:40:56 | FromDiscord | <TryAngle> (edit) "JS?" => "JS only?" |
15:51:56 | FromDiscord | <Yardanico> In reply to @TryAngle "isn't this for JS": he's talking about client-side |
15:52:01 | FromDiscord | <Yardanico> storing possibilities on client-side |
15:52:37 | FromDiscord | <enthus1ast> I think this is less hassle for these kind of stuff |
15:53:05 | * | gsalazar quit (Remote host closed the connection) |
15:53:21 | * | gsalazar joined #nim |
15:53:22 | FromDiscord | <enthus1ast> Or directly store this value in the cookie |
15:56:46 | * | gsalazar quit (Read error: Connection reset by peer) |
15:57:06 | * | gsalazar joined #nim |
16:00:33 | * | wallabra_ joined #nim |
16:01:35 | * | wallabra quit (Ping timeout: 260 seconds) |
16:01:53 | * | wallabra_ is now known as wallabra |
16:04:06 | * | gsalazar quit (Ping timeout: 244 seconds) |
16:05:28 | * | gsalazar joined #nim |
16:19:48 | * | Kiori joined #nim |
16:22:02 | * | kenran joined #nim |
16:22:27 | * | fallback joined #nim |
16:22:48 | * | vicecea quit (Remote host closed the connection) |
16:22:57 | * | CyberTailor joined #nim |
16:23:18 | * | vicecea joined #nim |
16:29:20 | CyberTailor | hmm, i wonder how it turns out https://github.com/nim-lang/Nim/pull/19960 |
16:34:46 | * | Lord_Nightmare quit (Excess Flood) |
16:35:42 | FromDiscord | <Yardanico> In reply to @flywind "You can also send": what email? there's one persona asking for a email to send some typos too |
16:35:56 | * | Lord_Nightmare joined #nim |
16:36:19 | FromDiscord | <Yardanico> (edit) "persona" => "person" |
16:36:24 | FromDiscord | <Yardanico> in the Nim Telegram chat |
16:41:38 | * | Lord_Nightmare quit (Excess Flood) |
16:42:09 | * | Lord_Nightmare joined #nim |
16:43:45 | FromDiscord | <pietroppeter> I used the mail listed here: https://github.com/Araq |
16:53:12 | * | Kiori left #nim (Leaving) |
17:10:27 | * | better_sleeping[ joined #nim |
17:19:40 | * | better_sleeping[ left #nim (#nim) |
17:27:21 | * | derpydoo quit (Ping timeout: 276 seconds) |
17:28:55 | NimEventer | New thread by Cosisert: Updatnig Nim version / looking for teacher, see https://forum.nim-lang.org/t/9281 |
17:32:38 | FromDiscord | <dom96> In reply to @dain "": that looks to me like you need to clear the window's pixel buffer |
17:46:40 | * | noeontheend joined #nim |
18:07:18 | * | xet7 quit (Ping timeout: 264 seconds) |
18:13:50 | * | kenran quit (Quit: WeeChat info:version) |
18:16:28 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
18:19:46 | * | Lord_Nightmare joined #nim |
18:28:59 | * | xet7 joined #nim |
18:29:47 | * | noeontheend quit (Ping timeout: 244 seconds) |
18:32:24 | FromDiscord | <retkid> https://media.discordapp.net/attachments/371759389889003532/993947471980003398/unknown.png |
18:32:27 | FromDiscord | <retkid> i would like to move this |
18:32:35 | FromDiscord | <retkid> and the only code i can find it is in "cputs" |
18:32:43 | FromDiscord | <retkid> but i dont wanna write low level code to do this |
18:32:54 | FromDiscord | <retkid> the white square |
18:32:59 | FromDiscord | <retkid> (edit) "square" => "square, is the header" |
18:33:07 | FromDiscord | <retkid> (edit) "header" => "topic of that sentence" |
18:44:11 | FromDiscord | <Yardanico> https://nim-lang.org/docs/terminal.html has cursor procs |
19:02:52 | FromDiscord | <retkid> In reply to @Yardanico "https://nim-lang.org/docs/terminal.html has cursor ": i tried those ebois |
19:02:56 | FromDiscord | <retkid> (edit) "ebois" => "boits" |
19:02:57 | FromDiscord | <retkid> (edit) "boits" => "bois" |
19:03:05 | FromDiscord | <retkid> they seem to change where the text is entered |
19:03:15 | FromDiscord | <retkid> but not the actual cursor |
19:03:40 | * | lumo_e joined #nim |
19:21:12 | FromDiscord | <untoreh> asyncfile doesn't work with chronos? |
19:27:50 | * | lumo_e quit (Ping timeout: 240 seconds) |
19:57:23 | FromDiscord | <gjyljljjl> sent a long message, see http://ix.io/41I3 |
19:58:12 | FromDiscord | <Yardanico> In reply to @gjyljljjl "Hi all. So,": Magic means that it's actually a built-in and is implemented in the compiler itself, in a lot of cases in backends directly |
19:58:19 | FromDiscord | <Yardanico> You can search for mInc in the compiler source |
19:59:22 | FromDiscord | <gjyljljjl> Cheers, I will do that |
20:08:38 | * | lumo_e joined #nim |
20:22:07 | * | jmdaemon joined #nim |
20:32:09 | FromDiscord | <ezquerra> sent a long message, see http://ix.io/41Ig |
21:10:34 | FromDiscord | <Phil> So the first book is "Mastering Nim"↵The second book is "Mastering things around Nim"! |
21:18:13 | * | lumo_e quit (Ping timeout: 244 seconds) |
21:51:17 | reversem3[m] | There is a second book after Mastering Nim? |
21:58:13 | FromDiscord | <Yardanico> It's Phil's joke :) |
22:16:56 | FromDiscord | <Phil> Not even a good one, I'm too damn tired to think of a second book name that could over-dramatize the things around nim-coding |
22:17:11 | FromDiscord | <Elegantbeef> The secret of nim is the easy one |
22:17:28 | FromDiscord | <Phil> But that's not a joke though, that's an earnest book title |
22:18:02 | FromDiscord | <Elegantbeef> It's a parody title of a film |
22:20:39 | * | hc0re joined #nim |
22:21:08 | FromDiscord | <!Patitotective> beef is a man of culture |
22:21:52 | * | hc0re quit (Client Quit) |
22:22:58 | FromDiscord | <TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=41Iy |
22:23:23 | FromDiscord | <Elegantbeef> Nim doesnt have pointer arithmetic |
22:23:35 | FromDiscord | <Elegantbeef> should be `cast[ptr UncheckedArray[uint32]]` |
22:23:37 | * | hc0re joined #nim |
22:24:07 | FromDiscord | <TurtleP> .. I thought of using UncheckedArray lmao |
22:24:49 | * | hc0re quit (Client Quit) |
22:24:57 | FromDiscord | <TurtleP> thank you again |
22:25:01 | * | hc0re joined #nim |
22:25:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41Iz |
22:25:47 | FromDiscord | <Elegantbeef> Though ideally `relocationHeaders` is just a `ptr UncheckedArray` |
22:26:21 | * | estiquelapice quit () |
22:26:49 | FromDiscord | <Elegantbeef> And the question of "why are you using C arrays instead of seqs" does exist |
22:27:56 | FromDiscord | <TurtleP> because I need a fixed size |
22:28:05 | FromDiscord | <TurtleP> .. and this is giving me bigger numbers than it should |
22:28:06 | FromDiscord | <Elegantbeef> Nim has static arrays |
22:28:29 | FromDiscord | <Elegantbeef> `ref array[32, uint32]` works |
22:28:31 | * | estiquelapice joined #nim |
22:29:12 | FromDiscord | <TurtleP> ugh, getting numbers like `4129039962`, but it should be `353` |
22:29:26 | FromDiscord | <Elegantbeef> Full code? |
22:30:09 | FromDiscord | <TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=41IA |
22:30:25 | FromDiscord | <TurtleP> `toCtrRelocationHeader` is from binarylang |
22:31:02 | FromDiscord | <Elegantbeef> The type of `CtrRelocation` is? |
22:31:55 | FromDiscord | <TurtleP> sent a code paste, see https://play.nim-lang.org/#ix=41IB |
22:31:57 | FromDiscord | <TurtleP> like I said, it's binarylang stuff |
22:34:25 | FromDiscord | <TurtleP> in the C++ code, it's supposed to be a normal struct |
22:34:26 | FromDiscord | <Elegantbeef> Bridge cut out i'm not dumb |
22:34:30 | FromDiscord | <TurtleP> well, array of structs |
22:34:50 | * | hc0re quit (Quit: Leaving) |
22:35:02 | FromDiscord | <Elegantbeef> So then what's the point of the pointer indirection |
22:35:04 | * | hc0re joined #nim |
22:35:23 | * | hc0re quit (Client Quit) |
22:35:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=41IC |
22:35:52 | * | hc0re joined #nim |
22:37:13 | FromDiscord | <TurtleP> it pretty much is, iirc, though that doesn't compile |
22:37:18 | * | hc0re quit (Client Quit) |
22:37:33 | FromDiscord | <TurtleP> and I just wanna clarify I wasn't trying to call or insinuate you were dumb before |
22:38:13 | FromDiscord | <Rika> He aimed it at himself |
22:38:47 | FromDiscord | <TurtleP> oh |
22:45:53 | CyberTailor | what to use instead of "spawn" (will be removed in nim 2.0)? no external packages |
22:46:19 | CyberTailor | maybe using system/threads directly? |
22:47:13 | CyberTailor | but how to get return value from Thread[]? |
22:50:31 | FromDiscord | <Generic> @TurtleP hey neat, you're doing 3ds stuff in Nim |
22:50:43 | FromDiscord | <Generic> I still have a 3dsx parser in Nim from my failed 3DS emulator attempt |
22:52:12 | FromDiscord | <Generic> https://gist.github.com/RSDuck/7e2f88e401e0ec88ca591bc6435ddb54 |
22:52:43 | FromDiscord | <TurtleP> heh, though this one I made originally in C++ recently |
22:53:02 | FromDiscord | <TurtleP> I do a 3DS/Switch homebrew stuff, typically |
22:53:06 | FromDiscord | <TurtleP> @Generic |
22:53:35 | FromDiscord | <Generic> me too, I did the Switch port of melonDS |
22:53:45 | FromDiscord | <Generic> currently I'm working on a GameCube emulator in Nim |
22:53:52 | FromDiscord | <Generic> it already runs on Switch, though only very poorly |
22:54:45 | FromDiscord | <TurtleP> though is sealmove in this Discord? |
22:55:02 | FromDiscord | <Generic> no idea, who's this? |
22:55:08 | FromDiscord | <TurtleP> the author of binarylang |
22:55:16 | FromDiscord | <TurtleP> wasn't really a question for you 😛 |
22:55:19 | FromDiscord | <Generic> ah |
22:55:20 | FromDiscord | <TurtleP> no offense |
22:55:27 | FromDiscord | <Generic> some people are also on matrix or irc |
22:55:59 | FromDiscord | <TurtleP> but if you didn't know, generic, I'm the main author of LÖVE Potion |
22:56:16 | FromDiscord | <Generic> ah yeah I remember now |
22:56:46 | FromDiscord | <Generic> do you have a deko3d renderer? |
22:57:16 | FromDiscord | <TurtleP> yep |
22:57:21 | FromDiscord | <TurtleP> it's been there for quite a while |
22:57:30 | FromDiscord | <Generic> cool |
22:58:59 | FromDiscord | <Elegantbeef> Yea sealmove is here but they have the worlds most unpingable name |
22:59:25 | FromDiscord | <TurtleP> lmao |
23:00:04 | FromDiscord | <TurtleP> well, if someone can get their attention for me, that'd be awesome |
23:00:17 | FromDiscord | <TurtleP> I'd raise a GitHub issue, but dunno if it's worth it |
23:00:39 | FromDiscord | <Elegantbeef> They asked about WASI last so if you search that you'd probably find them 😄 |
23:02:17 | FromDiscord | <tangonov> sent a code paste, see https://play.nim-lang.org/#ix=41IH |
23:02:37 | FromDiscord | <tangonov> What's the best way to get around that? Are we using an env var to derive the shell and falling back to /bin/sh? |
23:04:31 | * | dextop joined #nim |
23:06:07 | FromDiscord | <Elegantbeef> Does it not just use a shebang? |
23:06:33 | FromDiscord | <Elegantbeef> Actually we're probably looking at `execCmd` or similar i guess |
23:08:43 | NimEventer | New thread by Severak: Advanced integration with lua, see https://forum.nim-lang.org/t/9282 |
23:10:00 | FromDiscord | <tangonov> In reply to @Elegantbeef "Actually we're probably looking": Is it fair to say it might be called inside of koch.nim, or am I going to have dig the dependency tree until I find the offending statement? |
23:10:43 | FromDiscord | <Elegantbeef> you can probably build it with `-d:debug` to see |
23:11:03 | FromDiscord | <Elegantbeef> Dont know how koch is build |
23:11:13 | FromDiscord | <Elegantbeef> might be release, might be debug |
23:11:37 | FromDiscord | <tangonov> That I can do in 2 seconds, let's see what we can find |
23:14:51 | FromDiscord | <tangonov> No such luck. Error is as ambiguous as ever |
23:15:42 | FromDiscord | <Elegantbeef> It's odd that something is looking for `/bin/sh` you could search the entire repo for files with that string |
23:16:10 | FromDiscord | <NotFlawffles> should i learn Nim because I'm bored and always only use C |
23:16:44 | FromDiscord | <Elegantbeef> Do you want a higher level language with a better type system and fancier features? |
23:17:30 | FromDiscord | <NotFlawffles> yeah, you can say that |
23:17:38 | FromDiscord | <Elegantbeef> Well then yes |
23:17:41 | FromDiscord | <NotFlawffles> even though i prefer medium and low level |
23:17:44 | FromDiscord | <NotFlawffles> but still yes |
23:18:05 | FromDiscord | <NotFlawffles> Nim sounds really interesting to mw |
23:18:11 | FromDiscord | <NotFlawffles> (edit) "mw" => "me" |
23:18:12 | FromDiscord | <Elegantbeef> It's all scales |
23:18:13 | FromDiscord | <Elegantbeef> Nim can do everything C can |
23:18:14 | FromDiscord | <Elegantbeef> So you can use Nim just like you do C if you really wanted to |
23:18:35 | FromDiscord | <NotFlawffles> In reply to @Elegantbeef "Nim can do *everything*": don't every programming languages, lol |
23:18:41 | FromDiscord | <Elegantbeef> If you wanted a modern C i'd suggest Zig/Odin/Hare, but if you're interested in moving to the 21st century Nim is here |
23:18:44 | FromDiscord | <Elegantbeef> No they cannot |
23:18:46 | FromDiscord | <NotFlawffles> (edit) "languages," => "languages does," |
23:19:01 | FromDiscord | <Elegantbeef> Open up python and allocate 200 bytes then dont free it |
23:19:06 | FromDiscord | <Elegantbeef> Leak that memory |
23:19:29 | FromDiscord | <NotFlawffles> i don't use python anyway, it's sucks |
23:19:35 | FromDiscord | <Elegantbeef> Not the point |
23:19:36 | FromDiscord | <NotFlawffles> i used to, before |
23:19:39 | FromDiscord | <NotFlawffles> i know |
23:19:40 | FromDiscord | <NotFlawffles> got you |
23:19:44 | FromDiscord | <Elegantbeef> System languages give control, Nim is a system language |
23:19:55 | FromDiscord | <NotFlawffles> and that's why I'm interested |
23:20:03 | FromDiscord | <NotFlawffles> i love systems programming |
23:20:17 | FromDiscord | <Elegantbeef> @tangonov\: the issue is probably this line https://github.com/nim-lang/Nim/blob/01b40dc1d7c7c5331361341bdf305084c799c05b/lib/pure/osproc.nim#L984 |
23:20:48 | FromDiscord | <Elegantbeef> Is there really a different shell path for a posix system? |
23:21:06 | FromDiscord | <tangonov> Yeap |
23:21:10 | FromDiscord | <NotFlawffles> wow cool |
23:21:27 | FromDiscord | <tangonov> In a guix build environment, everything is symlinked from the container storage. |
23:21:38 | FromDiscord | <Elegantbeef> That means absolutely nothing to me 😄 |
23:21:44 | FromDiscord | <tangonov> So /bin/sh is actually /gnu/store/8gruij3yreu8fiobkj4h3uy8ewi9odkjt5u4i93oeif/bin/sh |
23:21:53 | FromDiscord | <Elegantbeef> Ah |
23:21:54 | FromDiscord | <huantian> beef doesn't understand the beauty of immutable systems 😛 |
23:21:57 | FromDiscord | <tangonov> The build flow can help me patch that line. I will try it later! |
23:22:09 | FromDiscord | <Elegantbeef> I dont understand most things↵(@huantian) |
23:22:22 | FromDiscord | <Elegantbeef> I dont want a immutable system cause i want to use my system |
23:22:25 | FromDiscord | <tangonov> Thanks for the help @ElegantBeef |
23:23:51 | FromDiscord | <NotFlawffles> the problem tho that i always confuse when i try to type nim because i use nvim and only one letter matter soooo eh |
23:24:36 | * | CyberTailor quit (Excess Flood) |
23:24:41 | FromDiscord | <NotFlawffles> i always type nvim instead of nim lol |
23:25:38 | * | CyberTailor joined #nim |
23:36:04 | FromDiscord | <tangonov> In reply to @Elegantbeef "I dont want a": The beauty if Guix is the immutable system is your system. You build it with Scheme |
23:36:37 | FromDiscord | <Elegantbeef> The joke is that the only system i use is my desktop and if it was immutable it would not be fun |
23:37:08 | FromDiscord | <tangonov> Well...it is technically not immutable. Just less mutable. I mutate my state all the time, transactionally. |
23:38:17 | FromDiscord | <Elegantbeef> My computer isnt a vending machine there are no transactions! 😄 |
23:38:38 | FromDiscord | <tangonov> Hue hue hue |
23:38:47 | FromDiscord | <tangonov> rat, osproc is already patched. |
23:39:00 | FromDiscord | <tangonov> (edit) "rat," => "Drat," |
23:39:57 | FromDiscord | <tangonov> `when not defined(android): "/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/sh"` |
23:41:28 | FromDiscord | <tangonov> A few more candidates, I guess https://media.discordapp.net/attachments/371759389889003532/994025251413430282/unknown.png |
23:41:44 | FromDiscord | <Rika> Can’t you just take a look at how Nix does it since they’re sisters anyway |
23:42:55 | FromDiscord | <tangonov> In reply to @Rika "Can’t you just take": I suppose I could, but I don't want to make the Twin I'm partnered with jealous |
23:44:08 | FromDiscord | <tangonov> I just thought perhaps the reasons for the compiler looking for /bin/sh directly could have been a simpler answer. I appreciate the help |
23:48:34 | * | noeontheend joined #nim |
23:52:47 | * | CyberTailor quit (Remote host closed the connection) |
23:53:37 | * | CyberTailor joined #nim |