00:52:54 | * | meowray quit (Remote host closed the connection) |
00:55:04 | * | meowray joined #nim |
00:58:46 | * | vicfred quit (Quit: Leaving) |
01:23:04 | * | LyndsySimon quit (Ping timeout: 252 seconds) |
01:23:39 | * | LyndsySimon joined #nim |
01:40:19 | FromDiscord | <juan_carlos> `strictFuncs` is nice. |
01:49:16 | * | Figworm quit (Remote host closed the connection) |
01:50:24 | * | Figworm joined #nim |
02:11:49 | * | arkurious quit (Quit: Leaving) |
02:38:49 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3Bpj |
02:44:39 | FromDiscord | <Elegantbeef> You should be able to do `when defined(vcc) or defined(tcc)` afaik |
02:53:02 | FromDiscord | <geekrelief> In reply to @Elegantbeef "You should be able": thx I'll give it a shot |
02:54:28 | FromDiscord | <geekrelief> nice it worked! |
03:19:43 | * | rockcavera joined #nim |
03:19:43 | * | rockcavera quit (Changing host) |
03:19:43 | * | rockcavera joined #nim |
03:24:12 | * | Onionhammer quit (Quit: The Lounge - https://thelounge.chat) |
03:28:35 | * | Onionhammer joined #nim |
03:37:56 | FromDiscord | <retkid> thanks to all of your for being nice and patient wth me |
03:37:59 | FromDiscord | <retkid> (edit) "wth" => "with" |
03:38:27 | FromDiscord | <retkid> last night i was anxious as hell and I guess that made it really hard to program |
03:45:00 | FromDiscord | <Elegantbeef> Unacceptable! 😛 |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
04:06:31 | * | supakeen joined #nim |
04:36:09 | FromDiscord | <levovix> is where a way to compile only part of code with -d:release? |
04:37:50 | FromDiscord | <impbox [ftsf]> @levovix you can do `{.push,checks:off.}` i think |
04:38:02 | FromDiscord | <impbox [ftsf]> not quite the same but can help |
04:38:17 | FromDiscord | <levovix> thanks |
04:43:23 | * | rockcavera quit (Remote host closed the connection) |
05:43:10 | * | stkrdknmibalz quit (Ping timeout: 252 seconds) |
06:02:23 | * | max22- joined #nim |
06:15:24 | * | nrds quit (Remote host closed the connection) |
06:29:53 | * | PMunch joined #nim |
06:41:44 | FromDiscord | <retkid> i have an await |
06:41:55 | FromDiscord | <retkid> but wanna execute something right after it comples |
06:41:57 | FromDiscord | <retkid> (edit) "comples" => "completes" |
06:45:22 | PMunch | So put your code right after it? |
06:45:27 | PMunch | Or am I missing something? |
06:45:57 | FromDiscord | <Rika> what's the issue? |
06:46:02 | FromDiscord | <retkid> In reply to @PMunch "So put your code": YEA |
06:46:06 | FromDiscord | <retkid> (edit) "YEA" => "yea" |
06:46:14 | FromDiscord | <retkid> actually think i found a pasta solution |
06:46:46 | FromDiscord | <Rika> ?? |
06:46:53 | FromDiscord | <Rika> we dont know what your issue |
06:46:54 | FromDiscord | <Rika> is |
06:47:03 | PMunch | Copy-paste, copy-pasta, pasta |
06:47:10 | PMunch | If that is what confused you :P |
06:47:19 | FromDiscord | <retkid> not copy pasta, pasta code |
06:47:49 | FromDiscord | <retkid> In reply to @Rika "we dont know what": I just have a line of code to be ran after an async function is complete |
06:47:53 | PMunch | Oh, I've always heard that referred to as spaghetti-code |
06:47:59 | FromDiscord | <Rika> Yes you put that after the await |
06:48:12 | FromDiscord | <Rika> Just like regular sync code |
06:48:31 | PMunch | `await myAsyncFunc; whateverElse(100, "Hello world)` |
06:48:46 | PMunch | That whateverElse will be called after myAsyncFunc has completed |
06:48:54 | FromDiscord | <retkid> oh i forgot the sleep was on the client end |
06:48:56 | FromDiscord | <retkid> not the server end |
06:49:02 | FromDiscord | <retkid> 😓 |
06:49:08 | PMunch | Sleep? |
06:49:34 | FromDiscord | <retkid> i was testing async by spamming server connectons on a sleep |
06:49:52 | FromDiscord | <retkid> but, the sleep isn't on the server so the transaction happens really quickly |
06:50:01 | FromDiscord | <retkid> (edit) "but, the sleep isn't on the server so the transaction happens really quickly ... " added "and you wont see the list of clients change" |
06:50:04 | FromDiscord | <retkid> it just stays at 1 |
06:50:19 | FromDiscord | <retkid> hopefully that makes sense |
06:50:28 | PMunch | sleep will interfere with async by the way |
06:50:42 | PMunch | "hopefully that makes sens" > not really :P |
06:51:05 | PMunch | There is sleepAsync that will allow you to sleep but still perform your async work |
06:51:07 | * | max22- quit (Remote host closed the connection) |
06:51:14 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3BpP |
06:52:16 | PMunch | No part of that code is async though.. |
06:52:30 | PMunch | It's just multi-threaded |
06:52:44 | FromDiscord | <retkid> i was confused because i didn't see any change in the list of connected clients on the server side |
06:52:51 | FromDiscord | <retkid> because the sleep isn't on the server side |
06:53:19 | PMunch | No, it's because you're sending 1 request a second, which even the most horrible servers should be perfectly able to cope with |
06:53:38 | FromDiscord | <Rika> You underestimate how bad servers can get |
06:53:38 | FromDiscord | <retkid> hm |
06:54:00 | PMunch | @Rika, haha fair enough. |
06:54:00 | FromDiscord | <retkid> In reply to @PMunch "No, it's because you're": well it just completes all the code too fast so it just pops in 0.003 seconds |
06:54:03 | FromDiscord | <Rika> I once made something that could only handle once a half minute requests |
06:54:16 | PMunch | Uhm, then something is broken |
06:54:30 | FromDiscord | <Rika> ~~who me or ret~~ |
06:54:34 | FromDiscord | <Rika> I kid |
06:57:57 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=3BpT |
06:58:51 | FromDiscord | <Rika> Your code doesn’t make logical sense, what do you want to do here exactly |
06:59:09 | PMunch | I mean if that code completes in less than a second there is something wrong |
07:00:17 | FromDiscord | <Rika> Perhaps but even then what’s this supposed to be actually doing? |
07:05:51 | FromDiscord | <retkid> as i've said a few times |
07:05:54 | FromDiscord | <retkid> thats not the async code |
07:06:01 | FromDiscord | <retkid> i was just showing that i got confused |
07:06:08 | FromDiscord | <retkid> thats kinda it |
07:06:37 | PMunch | But now we're confused as well, because that code doesn't really make much sense :P |
07:07:27 | FromDiscord | <Rika> Even if that’s not the async code it makes no sense |
07:07:30 | FromDiscord | <retkid> i kinda thought async was a form of threading |
07:07:34 | FromDiscord | <retkid> which makes no sense |
07:07:48 | FromDiscord | <retkid> so i thought something in parallel was happening |
07:08:12 | FromDiscord | <retkid> so if i connected, then slept, i could get a list of all connected clients |
07:08:18 | FromDiscord | <retkid> but that, isn't how that works at all lol |
07:08:46 | PMunch | Oh yeah, that's completely incorrect :P |
07:09:49 | * | max22- joined #nim |
07:09:50 | PMunch | Here is two articles that might help explain threading vs. async for you: https://peterme.net/multitasking-in-nim.html |
07:19:08 | * | nisstyre quit (*.net *.split) |
07:19:08 | * | systemdsucks quit (*.net *.split) |
07:19:08 | * | FromDiscord quit (*.net *.split) |
07:19:08 | * | Freneticks quit (*.net *.split) |
07:19:08 | * | mst quit (*.net *.split) |
07:27:27 | * | max22- quit (Remote host closed the connection) |
07:30:52 | * | nisstyre joined #nim |
07:30:52 | * | systemdsucks joined #nim |
07:30:52 | * | FromDiscord joined #nim |
07:30:52 | * | Freneticks joined #nim |
07:30:52 | * | mst joined #nim |
07:36:08 | * | max22- joined #nim |
07:41:31 | * | max22- quit (Remote host closed the connection) |
08:00:39 | * | max22- joined #nim |
08:01:42 | * | max22- quit (Remote host closed the connection) |
08:08:01 | * | max22- joined #nim |
08:10:15 | * | max22- quit (Remote host closed the connection) |
08:37:41 | * | Vladar joined #nim |
08:42:15 | * | Vladar quit (Quit: Leaving) |
08:56:25 | * | neurocyte0132889 joined #nim |
08:56:25 | * | neurocyte0132889 quit (Changing host) |
08:56:25 | * | neurocyte0132889 joined #nim |
09:27:45 | * | max22- joined #nim |
09:36:23 | PMunch | Huh, did my article on "Optional value handling in Nim" get shared somewhere I didn't know? It has a lot more hits than most of my other articles |
09:48:52 | FromDiscord | <Rika> Perchance |
09:52:25 | PMunch | The price I have to pay for not having analytics on my site :P |
09:59:05 | FromDiscord | <dom96> You could try analysing your access logs |
10:14:13 | FromDiscord | <impbox [ftsf]> Webalizer will do that for you and give you graphs |
10:14:29 | FromDiscord | <impbox [ftsf]> Haven't used it in a decade though, not sure if it still works |
10:28:58 | PMunch | Last stable release 8 years ago |
10:29:58 | FromDiscord | <Rika> Must be stable as hell then /s |
10:37:47 | PMunch | Haha, quite possible |
10:50:50 | * | Vladar joined #nim |
10:58:02 | FromDiscord | <hotdog> In reply to @dom96 "You could try analysing": goaccess is great for this |
10:58:06 | FromDiscord | <hotdog> Entirely server side |
10:58:16 | FromDiscord | <hotdog> https://goaccess.io/ |
10:59:54 | FromDiscord | <Rika> New tool to use |
11:00:06 | FromDiscord | <Rika> In my ever expanding list of tools to use… |
11:17:14 | FromDiscord | <enthus1ast> lot of these go based cli tools lately, this should be clearly nim domain \:) |
11:19:27 | FromDiscord | <enthus1ast> it would be nice to know if go has something that makes it favourable for cli tools (besides more people know go), is it maybe tui libraries? or bundeling or better tutorials |
11:35:30 | PMunch | goaccess is pretty cool |
11:35:54 | PMunch | And it's always fun to see how much traffic comes from tools trying to scrape for open logic pages and such |
11:40:19 | FromDiscord | <hotdog> In reply to @PMunch "And it's always fun": Yeah, lots of the classic `GET /wp-admin.php` etc |
11:40:29 | PMunch | Yup! |
11:40:57 | FromDiscord | <enthus1ast> honey pot fun \:) |
11:41:02 | * | xet7 quit (Remote host closed the connection) |
11:41:57 | FromDiscord | <enthus1ast> i once even got post (a piece of paper lol) from german isp telekom, because i had an open telnet port (a botnet honeypot written in nim), very interesting to see how botnets operate |
11:42:14 | * | xet7 joined #nim |
11:43:34 | FromDiscord | <dom96> In reply to @hotdog "goaccess is great for": hehe, I made a tool like this too a long time ago: https://github.com/dom96/log2html |
11:46:08 | FromDiscord | <hotdog> In reply to @dom96 "hehe, I made a": Neat |
11:51:46 | PMunch | @enthus1ast, you got a letter from your telecom for having a telnet port open? That's pretty cool |
11:52:45 | PMunch | @dom96, I was just using the terminal based version |
11:58:21 | FromDiscord | <RMT> When I worked at an ISP, we once received a letter from one of our customers asking us to stop "pinging" her computer on port 53, because the sound was very annoying. Her PC's firewall had blacklisted our DNS servers and every response from them triggered a popup alert with a noise for her.↵↵Needless to say we framed the letter, and asked the support team to help her out. ;-) |
11:59:11 | PMunch | Haha, what kind of firewall has popups with sound when it blocks stuff? :P |
12:00:00 | FromDiscord | <RMT> This was 2001.. so some crappy 3rd party Windows software. ;-) |
12:00:27 | FromDiscord | <enthus1ast> yes, the funny thing was that i even had a telnet banner with "Biblis power plant" (a nuclear reactor nearby) so it was easily noticable as a honeypot↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
12:01:12 | FromDiscord | <enthus1ast> they thought that i was a botnet target |
12:03:16 | * | neurocyte0132889 quit (Ping timeout: 252 seconds) |
12:03:31 | FromDiscord | <enthus1ast> it was also interesting to see, how botnet operators probed for honeypots (most of them do), and which "leak" of mirai they choosed ;) |
12:03:50 | FromDiscord | <enthus1ast> leak/strain |
12:05:10 | FromDiscord | <enthus1ast> and also how fast you get visited by these, just open a telnet port to the internet and see yourself. mean is \~15 minutes imho |
12:06:01 | * | supakeen quit (Quit: WeeChat 3.3) |
12:06:31 | * | supakeen joined #nim |
12:07:28 | FromDiscord | <enthus1ast> and also origin of attack IIRC 80% came from china and india |
12:35:26 | FromDiscord | <gogolxdong (liuxiaodong)> Is the author of stardust.dev here? |
12:36:44 | FromDiscord | <Rika> That would be Dom |
12:37:47 | FromDiscord | <gogolxdong (liuxiaodong)> not sure which is |
12:39:02 | PMunch | You don't know who dom96 is? |
12:39:44 | FromDiscord | <gogolxdong (liuxiaodong)> I've seen many dom96s |
12:40:06 | FromDiscord | <Rika> How |
12:40:11 | FromDiscord | <Rika> There is only one here |
12:40:24 | FromDiscord | <gogolxdong (liuxiaodong)> with different names |
12:42:22 | FromDiscord | <haxscramper> dom dOm dom96 |
12:42:23 | FromDiscord | <haxscramper> dom69 |
12:43:52 | FromDiscord | <gogolxdong (liuxiaodong)> There must be someone who wants to pretend to be dom96 |
12:47:14 | * | rockcavera joined #nim |
12:47:14 | * | rockcavera quit (Changing host) |
12:47:14 | * | rockcavera joined #nim |
12:48:22 | FromDiscord | <gogolxdong (liuxiaodong)> haven't talked with him for a long time, last time I know he went to Facebook. |
12:49:57 | PMunch | He's still at Facebook afaik |
12:50:06 | PMunch | Talked to him just the other day |
12:52:35 | FromDiscord | <gogolxdong (liuxiaodong)> I have showed stardust.dev to some friends, they got interested in investing or doing something with stardust.dev. |
12:56:58 | * | arkurious joined #nim |
13:02:06 | * | kayabaNerve quit (Read error: Connection reset by peer) |
13:02:14 | * | kayabaNerve_ joined #nim |
13:14:31 | FromDiscord | <dom96> I’m always here. If someone was pretending to be me, I’d like to know who that was 😮 |
13:17:56 | FromDiscord | <dom96> Btw my contact details are here: https://picheta.me. Or you can pm me on Matrix (I’ve got an account there too) |
13:22:27 | FromDiscord | <gogolxdong (liuxiaodong)> Thanks for replying, do you have discord or telegram for any convinience, I've left a message for your gitter account I found in ACTIVITY of banning as well. |
13:25:02 | FromDiscord | <gogolxdong (liuxiaodong)> @\_discord\_132595483838251008\:t2bot.io |
13:29:52 | * | nrds joined #nim |
13:35:11 | FromDiscord | <dom96> yeah, I'm speaking from Discord right now |
13:35:18 | FromDiscord | <dom96> and have a Telegram account as well |
13:41:04 | FromDiscord | <gogolxdong (liuxiaodong)> share which you use more often \:) |
13:46:25 | FromDiscord | <dom96> Discord > Telegram >>>>>> Matrix (I very rarely use Matrix) |
13:46:44 | FromDiscord | <sheldon> In reply to @dom96 "yeah, I'm speaking from": sent a request, will this account find you in time? |
13:47:29 | FromDiscord | <dom96> no need for friend requests for me, I don't block non-friends from PMing me AFAIK |
13:48:27 | FromDiscord | <dom96> My telegram username is @d0m96 in case you want to contact me on that |
13:48:35 | FromDiscord | <dom96> [gogolxdong (liuxiaodong)](https://matrix.to/#/@gogolxdong-57dde26640f3a6eec065d1da:gitter.im)\: ^ |
13:48:47 | FromDiscord | <dom96> and this is my Matrix account, but I really rarely look at it |
14:02:59 | * | max22- quit (Ping timeout: 250 seconds) |
14:07:50 | FromDiscord | <Kiloneie> why is↵dumpTree:↵ 5 (5 + 10) ↵displaying nothing for me ?... |
14:08:14 | FromDiscord | <enthus1ast> try to compile with -f |
14:08:39 | FromDiscord | <juan_carlos> LLDB, I have breakpoint in `let doge = "foo"` but in debugger it only shows `(NimStringDesc ) doge_example_4 = 0x000002a9c119f050`, is there a way to see the content of variables?, or something more useful?. |
14:09:17 | FromDiscord | <xflywind> p doge_example_4 |
14:09:27 | * | nrds quit (Remote host closed the connection) |
14:11:48 | FromDiscord | <juan_carlos> Shows `(NimStringDesc) $4 = { Sup = (len = 3, reserved = 7), data = {} }` , the `data` si still now displayed. 🤔 |
14:12:56 | FromDiscord | <Rika> `p doge_example_4->data`? |
14:13:36 | FromDiscord | <xflywind> or consider using nim-gdb which should help |
14:13:38 | FromDiscord | <Rika> `p ((char )doge_example_4->data)`? |
14:13:42 | FromDiscord | <Rika> not sure what else is needed |
14:14:34 | FromDiscord | <juan_carlos> In reply to @Rika "`p doge_example_4->data`?": `(NIM_CHAR) $7 = 'f'` |
14:15:32 | FromDiscord | <juan_carlos> In reply to @flywind "or consider using nim-gdb": 👍 |
14:15:58 | FromDiscord | <xflywind> https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb |
14:16:11 | FromDiscord | <Rika> In reply to @Rika "`p ((char *)doge_example_4->data)`?": what about this? |
14:16:34 | FromDiscord | <xflywind> In reply to @flywind "https://nim-lang.org/blog/2017/10/02/documenting-pr": > > print (char)doge_example_4->data |
14:16:38 | FromDiscord | <juan_carlos> `(char ) $8 = 0x000002a9c119f060 "foo"` |
14:16:40 | FromDiscord | <xflywind> (edit) removed ">" |
14:16:46 | FromDiscord | <juan_carlos> Flawless victory |
14:16:57 | FromDiscord | <juan_carlos> I will try nim-gdb |
14:18:52 | FromDiscord | <Kiloneie> OH, had to look at the output not terminal and switch from tasks to Nim |
14:18:58 | FromDiscord | <Kiloneie> VS code thing D: |
14:19:55 | FromDiscord | <juan_carlos> lldb says is has a terminal GUI, but `gui` command do nothing, weird. |
14:19:56 | * | PMunch quit (Quit: leaving) |
14:20:34 | FromDiscord | <juan_carlos> Nice https://developer.apple.com/library/archive/documentation/IDEs/Conceptual/gdb_to_lldb_transition_guide/document/lldb-command-examples.html |
14:35:33 | * | max22- joined #nim |
14:41:26 | FromDiscord | <juan_carlos> In reply to @flywind "or consider using nim-gdb": Any idea which Python package nim-gdb uses?, because is not in Python stdlib, nor in PyPI (by that name). |
14:42:16 | FromDiscord | <IsaacPaul> @juan_carlos Seems to work for lldb that's bundled with xcode. You may have to get a different distribution or build it yourself to include the feature. https://media.discordapp.net/attachments/371759389889003532/897131994696253550/Screen_Shot_2021-10-11_at_10.41.41_AM.png |
14:43:57 | FromDiscord | <xflywind> In reply to @juan_carlos "Any idea which Python": `nim-gdb.py` is shipped with Nim, and imports `gdb` library from Python std, |
14:44:52 | FromDiscord | <xflywind> see `tools/nim-gdb.py` |
14:45:20 | FromDiscord | <xflywind> https://github.com/nim-lang/Nim/blob/devel/tools/nim-gdb.py |
14:45:35 | FromDiscord | <juan_carlos> In reply to @flywind "`nim-gdb.py` is shipped with": Theres no `gdb` in Python stdlib. |
14:46:28 | FromDiscord | <xflywind> Or they are in PyPI, |
14:46:39 | FromDiscord | <xflywind> I don't remember it. |
14:46:52 | FromDiscord | <xflywind> https://github.com/nim-lang/Nim/blob/83128f217f63045974a48e61b65386abbfc97352/tools/nim-gdb.py#L1 |
14:47:05 | FromDiscord | <xflywind> it surely import gdb though |
14:47:09 | FromDiscord | <xflywind> (edit) "import" => "imports" |
14:47:23 | FromDiscord | <xflywind> see also https://github.com/nim-lang/Nim/tree/devel/bin |
14:47:38 | FromDiscord | <xflywind> relevant bash script which can be used |
14:47:42 | FromDiscord | <xflywind> (edit) "script" => "scripts" |
14:47:53 | FromDiscord | <juan_carlos> It looks like there was a `gdb` in PyPI, but has been deleted, therefore nim-gdb wont work https://github.com/007gzs/gdb / https://pypi.org/project/gdb/0.0.1/ |
14:47:53 | FromDiscord | <xflywind> (edit) "don't" => "can't" |
14:48:44 | FromDiscord | <xflywind> wtf |
14:51:30 | FromDiscord | <juan_carlos> And bash nim-gdb just calls `nim-gdb.py` so wont work neither. |
14:52:15 | FromDiscord | <xflywind> we need to ship `gdb.py` if possible or remove them completely. |
14:52:24 | FromDiscord | <xflywind> (edit) "we" => "Nim" |
14:52:55 | FromDiscord | <juan_carlos> nim-gb.bat also same, no one works. |
14:53:18 | FromDiscord | <juan_carlos> Problem is gdb python package is based on has been deleted. |
14:54:42 | FromDiscord | <xflywind> Well there is a chance someone install them before. |
14:54:51 | FromDiscord | <xflywind> (edit) "install" => "installed" |
14:56:01 | FromDiscord | <xflywind> But I will remove it atm. |
14:56:24 | FromDiscord | <juan_carlos> If someone has the package then should commit it to repo. |
14:56:57 | FromDiscord | <xflywind> I agree. |
14:58:16 | FromDiscord | <xflywind> or rewrite it in pure Nim. |
15:01:41 | FromDiscord | <juan_carlos> PyPI you can delete any package at any time. |
15:02:24 | FromDiscord | <xflywind> so does nimble 😛 just delete the github repo |
15:03:38 | FromDiscord | <juan_carlos> But Pypi was missing 2FA until recently. |
15:04:57 | FromDiscord | <xflywind> https://github.com/rust-lang/rust/blob/master/src/etc/gdb_load_rust_pretty_printers.py |
15:05:13 | FromDiscord | <xflywind> ha, so does rust use gdb.py |
15:05:19 | FromDiscord | <kevin> Is there a nim proc that tells you what type an object is |
15:05:21 | FromDiscord | <xflywind> (edit) "use gdb.py" => "(use gdb.py)" |
15:05:32 | FromDiscord | <kevin> like `type()` from python |
15:06:04 | FromDiscord | <haxscramper> typeof () |
15:06:14 | FromDiscord | <xflywind> In reply to @kevin "like `type()` from python": just like Pthon |
15:06:18 | FromDiscord | <xflywind> (edit) "Pthon" => "Python" |
15:06:27 | FromDiscord | <xflywind> `type` or `typeof` |
15:06:52 | FromDiscord | <xflywind> https://github.com/rust-lang/rust/blob/6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073/src/etc/gdb_lookup.py#L1 |
15:13:34 | FromDiscord | <enthus1ast> also `is` |
15:13:39 | FromDiscord | <enthus1ast> Foo is object |
15:14:32 | FromDiscord | <enthus1ast> `Faa is Foo` |
15:15:19 | FromDiscord | <Rika> did you forget about "Bar" |
15:15:19 | FromDiscord | <Rika> lol |
15:16:06 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3Bsp |
15:16:11 | FromDiscord | <juan_carlos> @xflywind Recently @saem sent a fix for nim-gdb, maybe he still has the python module in the disk?. |
15:16:29 | FromDiscord | <Rika> you need to explicitly say which you want to iterate over |
15:16:31 | FromDiscord | <Rika> keys or values |
15:16:39 | FromDiscord | <enthus1ast> or pairs |
15:16:42 | FromDiscord | <Rika> if you want both theres pairs |
15:16:52 | FromDiscord | <Rika> gives a tuple (key, value) |
15:17:22 | FromDiscord | <Rika> can be implicitly called with `for key, value in headertable:` |
15:17:25 | FromDiscord | <xflywind> In reply to @juan_carlos "<@!658563905425244160> Recently <@!7114126933905900": yeah, and it seems to be a popular library used among Rust libraries |
15:17:35 | FromDiscord | <Rika> otherwise you need to say keys or values |
15:18:44 | FromDiscord | <kevin> sent a code paste, see https://play.nim-lang.org/#ix=3Bsr |
15:19:03 | FromDiscord | <Rika> how do you import table |
15:19:16 | FromDiscord | <Rika> `import tables` is recommended |
15:20:04 | FromDiscord | <kevin> yep, that was it... |
15:20:07 | FromDiscord | <kevin> 😢 |
15:20:12 | FromDiscord | <kevin> thanks 😄 |
15:21:59 | FromDiscord | <Clonkk> `import std/tables` technically↵(@Rika) |
15:22:14 | FromDiscord | <Rika> sure |
15:22:22 | FromDiscord | <xflywind> In reply to @juan_carlos "<@!658563905425244160> Recently <@!7114126933905900": https://github.com/python/cpython/blob/560a79f94e94de66a18f2a5e4194c2fe51e2adf1/Tools/gdb/libpython.py#L49 |
15:25:12 | FromDiscord | <juan_carlos> In reply to @flywind "https://github.com/python/cpython/blob/560a79f94e94": So it comes with GDB itself ?. |
15:25:37 | FromDiscord | <juan_carlos> is not in Python stdlib. |
15:26:13 | FromDiscord | <xflywind> https://stackoverflow.com/questions/4792483/how-to-import-gdb-in-python/10240053 |
15:26:41 | FromDiscord | <xflywind> > import gdb only works when your Python code is running within the GDB process. It's not supposed to work from the regular system Python interpreter. |
15:27:55 | FromDiscord | <juan_carlos> In reply to @flywind "https://stackoverflow.com/questions/4792483/how-to-": 🙂👍 |
15:31:25 | FromDiscord | <juan_carlos> That should go in docs, lol. |
15:33:03 | FromDiscord | <xflywind> I agree 🤣 |
15:33:58 | FromDiscord | <xflywind> And `nim-gdb` should be documented somewhere. There is no documentation for it atm. |
15:34:47 | FromDiscord | <xflywind> maybe need a new chapter for introducing tools which are shipped with Nim. |
15:36:57 | FromDiscord | <xflywind> In reply to @flywind "And `nim-gdb` should be": https://nim-lang.github.io/Nim/tools.html |
15:37:18 | FromDiscord | <xflywind> there should have a line for mentioning `nim-gdb` I think |
15:48:59 | FromDiscord | <kevin> is there a way to get the remote address from a webclient that connects to the Nim asynchttpserver? |
15:49:19 | FromDiscord | <kevin> Python flask has `request.environ['REMOTE_ADDR']` |
15:49:47 | FromDiscord | <kevin> something like that? |
15:50:57 | * | neurocyte0132889 joined #nim |
15:50:57 | * | neurocyte0132889 quit (Changing host) |
15:50:57 | * | neurocyte0132889 joined #nim |
15:54:10 | FromDiscord | <juan_carlos> Should be in the headers somewhere. |
15:55:04 | FromDiscord | <Rika> request.hostname? |
15:56:59 | FromDiscord | <kevin> wouldn't that depend on the web client sending their hostname/ip addr in the headers? |
15:57:32 | FromDiscord | <Rika> it always is isnt it |
15:57:42 | FromDiscord | <Rika> In reply to @Rika "request.hostname?": not header btw |
15:58:07 | FromDiscord | <Rika> ` hostname: string ## The hostname of the client that made the request.` |
15:59:04 | FromDiscord | <kevin> Think you're right... gotta test on another device lol 😂 |
15:59:25 | FromDiscord | <kevin> I thought that was the hostname of the web server but i think it's not |
16:00:20 | FromDiscord | <Rika> why would |
16:00:26 | FromDiscord | <Rika> okay i guess |
16:00:35 | FromDiscord | <Rika> but its documented that it isnt at least |
16:00:42 | FromDiscord | <kevin> Yeah it is |
16:01:23 | FromDiscord | <kevin> just saw 127.0.0.1 and thought it was my server IP address |
16:01:31 | FromDiscord | <kevin> turns out it's actually the client IP address |
16:02:31 | FromDiscord | <Rika> ~~ > client connects from localhost > surprised hostname is localhost~~ im joking pls no kill |
16:03:15 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:03:28 | FromDiscord | <kevin> In reply to @Rika "~~ > client connects": I'm learning okay 😭 |
16:03:34 | FromDiscord | <kevin> lol |
16:03:50 | FromDiscord | <Rika> lol its ok i bet id make the same mistake |
16:04:40 | * | Gustavo6046 joined #nim |
16:15:48 | * | nrds joined #nim |
16:16:41 | nrds | <Prestige99> I guess the bridge went down before I sent my message |
16:16:45 | nrds | <Prestige99> @dom96 I added the chipmunk7 package recently to https://github.com/nim-lang/packages - On my first attempt to `nimble install chipmunk7`, it downloaded the new packages list but said it couldn't find it. I ran it again and it installed. nimble v0.13.1 |
16:16:46 | nrds | <R2D299> itHub: 7"List of packages for Nimble" |
16:17:13 | nrds | <Prestige99> Seems like it didn't check the newly downloaded packages list |
16:17:55 | * | neurocyte0132889 quit (Ping timeout: 252 seconds) |
16:24:11 | * | max22- quit (Remote host closed the connection) |
16:32:14 | * | max22- joined #nim |
16:41:08 | NimEventer | New thread by Jasonfi: Best serialization protocol for Nim?, see https://forum.nim-lang.org/t/8493 |
17:17:53 | FromDiscord | <Gumber> has anyone gotten tcp sockets w/ ssl working on windows with Nim? |
17:18:01 | FromDiscord | <Gumber> I'm having some issues... |
17:25:51 | Mister_Magister | anyone got example of handling input? input as in gamepad input. I wanna use gamepad to control something |
17:26:35 | Mister_Magister | i probably need some gui library for that? seems kinda overkill |
17:26:54 | Mister_Magister | sdl will prably do |
17:29:01 | nrds | <Prestige99> I use sdl for that, it's nice |
17:35:04 | Mister_Magister | ye i just tried sdl but it doesn't react to controller |
17:36:04 | Mister_Magister | @Prestige i used this example https://github.com/nim-lang/sdl2/blob/master/examples/sdl_skeleton.nim and did echo evt to see events and there is nothing when i interact with controller and window is focused |
17:37:28 | nrds | <Prestige99> iirc you have to set some window flag to enable joystick support |
17:37:35 | nrds | <Prestige99> let me look into it for a min |
17:37:56 | Mister_Magister | <3 appreciated |
17:38:44 | nrds | <Prestige99> https://www.libsdl.org/release/SDL-1.2.15/docs/html/joystick.html this should have the info you need |
17:39:09 | Mister_Magister | Joystick support is initialized by passed the SDL_INIT_JOYSTICK, and the example already does INIT_EVERYTHING |
17:39:16 | nrds | <Prestige99> since you're using INIT_EVERYTHING you should be good, probably just need to open the joystick now |
17:39:22 | Mister_Magister | ah |
17:39:23 | Mister_Magister | ye |
17:45:58 | Mister_Magister | yep discard joystickOpen(0) did the trick |
17:46:13 | nrds | <Prestige99> nice :) |
17:48:51 | Mister_Magister | @Prestige do you know perhaps how can i check what is inside event to know how to handle it? i'm having difficulty figuring it out from code |
17:50:18 | Mister_Magister | ahh its in sdl2 docs |
17:50:49 | Mister_Magister | https://github.com/nim-lang/sdl2/blob/ed842e0092ab1c45176e95ab35d6d244ef48a509/src/sdl2.nim#L130 |
17:50:51 | Mister_Magister | even better, its here |
17:51:55 | Mister_Magister | but for some reason axis field is missing? do i have to cast it somehow? |
17:54:01 | Mister_Magister | ahh cast[WindowEventPtr](addr(evt)) |
17:54:09 | Mister_Magister | why do i keep asking and answering to myself xd |
17:54:12 | Mister_Magister | should stop doing that |
18:07:10 | * | Gustavo6046_ joined #nim |
18:07:11 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
18:09:56 | * | Gustavo6046_ is now known as Gustavo6046 |
18:13:58 | * | max22- quit (Ping timeout: 265 seconds) |
18:14:39 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
18:16:42 | * | Gustavo6046 joined #nim |
18:22:02 | * | neurocyte0132889 joined #nim |
18:22:02 | * | neurocyte0132889 quit (Changing host) |
18:22:02 | * | neurocyte0132889 joined #nim |
18:36:46 | * | PMunch joined #nim |
18:55:30 | nrds | <Prestige99> Happens sometimes haha |
18:56:00 | Mister_Magister | works perfect |
18:56:25 | FromDiscord | <Elegantbeef> Formulating questions makes you think, so it's the best way to solve problems 😛 |
18:56:26 | nrds | <Prestige99> What are you working on btw, a game? |
19:12:48 | * | Gustavo6046_ joined #nim |
19:14:16 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
19:15:31 | * | Gustavo6046_ is now known as Gustavo6046 |
19:17:55 | PMunch | Good old rubber-ducking Mister_Magister :) |
19:26:33 | Mister_Magister | PMunch: i know right? :P |
19:26:59 | Mister_Magister | @Prestige im using gamepad to control rc car that has raspberry on it |
19:27:11 | Mister_Magister | litreally made my own wrapper for gpio library just to be able to use nim on raspi |
19:27:27 | * | max22- joined #nim |
19:32:08 | PMunch | Wasn't there one already? |
19:32:59 | Mister_Magister | PMunch: nope |
19:33:06 | PMunch | Huh |
19:34:20 | Mister_Magister | PMunch: there is outdated wrapper for deprecated pile of hot steaming shit called wiringPi but for obvious reasons i didn't use it |
19:36:09 | Mister_Magister | i gotta figure out voltage divider |
19:39:12 | PMunch | Ah right :P |
19:39:24 | PMunch | Those are pretty simple though aren't they? |
19:39:33 | NimEventer | New question by Netsu: Encode and Decode rfc2396 URLs in Nim, see https://stackoverflow.com/questions/69531596/encode-and-decode-rfc2396-urls-in-nim |
19:39:41 | Mister_Magister | mhm |
19:40:38 | Mister_Magister | currently soldering pins to adc |
19:40:47 | Mister_Magister | im getting better at soldering |
19:44:29 | FromDiscord | <Rika> ~~ngl raspi just for rc car controller is overkill as fuckkkkk~~ |
19:44:53 | Mister_Magister | @Rika for now |
19:45:01 | Mister_Magister | it will be fpv rc car |
19:45:08 | FromDiscord | <Rika> oh damn |
19:45:21 | FromDiscord | <Rika> now thats cool |
19:45:22 | Mister_Magister | raspi, as it can have 1080p camera, seemed nice choice |
19:45:42 | FromDiscord | <Rika> i mean there are still other options but the raspi sounds easiest |
19:46:22 | Mister_Magister | i wanted to have fun programming everything myself |
19:46:27 | Mister_Magister | and also cost |
19:46:33 | Mister_Magister | its lowest cost possible |
19:50:17 | FromDiscord | <Rika> i mean easy to find |
19:50:18 | FromDiscord | <Rika> but yeah |
19:50:27 | FromDiscord | <Rika> finding mcus are a fucking pain right now (ehem) |
19:52:56 | * | Gustavo6046_ joined #nim |
19:53:01 | * | Gustavo6046 quit (Ping timeout: 245 seconds) |
19:55:50 | * | Gustavo6046_ is now known as Gustavo6046 |
19:58:02 | PMunch | Not that hard to find, I have a drawer full :P |
20:10:59 | FromDiscord | <dom96> Hope you're all getting your t-shirts: https://forum.nim-lang.org/t/8478. Great way to help our community libraries improve 🙂 |
20:12:38 | Mister_Magister | @dom96 can u explain in 2 sentences? |
20:13:13 | FromDiscord | <dom96> Make 4 PRs and DigitalOcean/GitHub will give you a t-shirt |
20:13:36 | FromDiscord | <dom96> (oh, and get them merged + they have to be in repos that have the `hacktoberfest` tag) |
20:13:53 | FromDiscord | <dom96> (you can read https://hacktoberfest.digitalocean.com/ for specifics) |
20:14:24 | nrds | <Prestige99> @dom96 did you happen to see my earlier message about nimble? |
20:15:15 | FromDiscord | <dom96> Prestige: yes, please submit an issue in the repo |
20:15:18 | Mister_Magister | @dom96 meh, thought i could do something with my new lib i made for nim |
20:15:31 | nrds | <Prestige99> Sure thing, I can get to it after work |
20:16:43 | FromDiscord | <dom96> Mister_Magister: technically I think you can, just create PRs on your own repo 😄 |
20:18:40 | FromDiscord | <Daniel> https://media.discordapp.net/attachments/371759389889003532/897216651081154620/johnSnowIT.mp4 |
20:31:00 | FromDiscord | <Rika> #memes? |
20:33:26 | PMunch | @dom96, can confirm, PRs to your own repos work |
20:36:26 | nrds | <Prestige99> Interesting |
20:40:31 | FromDiscord | <Unaimend> sent a code paste, see https://paste.rs/uPr |
20:40:49 | PMunch | To be fair the ones I've done to my own repo has been to get feedback |
20:42:22 | FromDiscord | <zidsal> I'm writing a data structure that has both a ref & object implementation. When it comes to writing the procs for the objects is this really the best way to do it? https://play.nim-lang.org/#ix=3Bty (I grabbed this way by looking at how tables was written) if that's the case it feels like the ref methods should really be able to do something like `{.borrow.}` to save on boilerplate |
20:51:07 | FromDiscord | <dom96> try https://play.nim-lang.org/#ix=3BtD |
20:51:26 | FromDiscord | <Unaimend> When I am iterating over the same `OrderedDict` at two different code locations I am guaranteed the "order of iteration", correct? |
20:51:51 | FromDiscord | <Elegantbeef> `OrderedTable`? |
20:52:41 | FromDiscord | <Unaimend> https://nim-lang.org/docs/tables.html#OrderedTable |
20:52:53 | FromDiscord | <Elegantbeef> If so yes ordered tables remember their insertion order which is what that iterator uses |
20:53:10 | FromDiscord | <Unaimend> Thanks |
21:06:36 | FromDiscord | <ynfle (ynfle)> Is it possible to get ascii coloring from execmdex and those family of procs? |
21:06:47 | FromDiscord | <ynfle (ynfle)> \ansi |
21:08:12 | FromDiscord | <ynfle (ynfle)> Is there a way to disable full paths for compilation errors? |
21:09:10 | FromDiscord | <Elegantbeef> Depending on the program you can tell it you want color, otherwise i dont know |
21:09:17 | * | PMunch quit (Quit: leaving) |
21:09:43 | FromDiscord | <Elegantbeef> full paths being which module a symbol comes from? |
21:10:04 | FromDiscord | <SivadNai> who has a repo full of errors? |
21:10:17 | FromDiscord | <Elegantbeef> You do? |
21:12:21 | FromDiscord | <ynfle (ynfle)> No, the full path to the file |
21:12:53 | FromDiscord | <ynfle (ynfle)> @beef so if it compiles with color, it should automatically give to me with those procs? |
21:13:31 | FromDiscord | <Elegantbeef> Well if the program thinks it should output with colour or is told it should it'll give ansi colours |
21:13:42 | FromDiscord | <ynfle (ynfle)> Ok |
21:13:45 | FromDiscord | <ynfle (ynfle)> Lets test... |
21:13:50 | FromDiscord | <Elegantbeef> Possibly `--filenames:abs|canonical|legacyRelProj` though i dont know the nim version you're on |
21:14:52 | FromDiscord | <zidsal> @dom96 out of interest how come the tables module doesn't use that pattern is there a draw back to this? |
21:15:52 | FromDiscord | <Elegantbeef> I'd probably say that it allows runnable examples that match the first parameter |
21:16:31 | FromDiscord | <Elegantbeef> Though they also do have different implementations |
21:16:45 | FromDiscord | <Elegantbeef> So it's just fewer when statements |
21:16:58 | FromDiscord | <SivadNai> I do, yes |
21:17:09 | FromDiscord | <zidsal> the []= impl looks the same, although the runnable examples is a good point |
21:19:18 | FromDiscord | <ynfle (ynfle)> @beef 1.4.8 |
21:19:47 | FromDiscord | <ynfle (ynfle)> doesn't seem to have it |
21:19:54 | FromDiscord | <ynfle (ynfle)> Will 1.6? |
21:20:01 | FromDiscord | <Elegantbeef> Yea |
21:20:14 | FromDiscord | <ynfle (ynfle)> Noice |
21:39:09 | FromDiscord | <ynfle (ynfle)> @beef it get ansi color |
21:50:52 | FromDiscord | <ynfle (ynfle)> Any easy way to remove ansi color once gotten? |
22:03:07 | FromDiscord | <impbox [ftsf]> resetAttributes? |
22:03:58 | FromDiscord | <impbox [ftsf]> Or set to fgDefault |
22:04:30 | * | neurocyte0132889 quit (Ping timeout: 260 seconds) |
22:04:32 | FromDiscord | <ynfle (ynfle)> I mean, I want to compare a string with ansi coloring and without and see if they have the same text |
22:04:40 | FromDiscord | <impbox [ftsf]> Ooh |
22:05:47 | FromDiscord | <impbox [ftsf]> I'd probably write a function to skip them in the comparison |
22:05:57 | FromDiscord | <impbox [ftsf]> I don't think anything exists for it already |
22:06:22 | * | meowray quit (Ping timeout: 260 seconds) |
22:13:53 | FromDiscord | <ynfle (ynfle)> @impbox, any idea how to do that? |
22:19:32 | FromDiscord | <impbox [ftsf]> Basically you can step though both strings one character at a time, when you hit an escape code you ignore any characters until the end of it |
22:19:56 | FromDiscord | <impbox [ftsf]> For non ignored characters you can return false if either of the characters don't match each other |
22:27:34 | FromDiscord | <ynfle (ynfle)> I got `.replace(re"\u001B\[(\d|;)+?m", "")` |
22:27:38 | FromDiscord | <ynfle (ynfle)> Seems to work |
22:27:42 | FromDiscord | <ynfle (ynfle)> Thanks though |
22:31:09 | FromDiscord | <impbox [ftsf]> Yeah you can strip the codes then compare as usual |
22:32:24 | FromDiscord | <ynfle (ynfle)> Thanks |
22:35:06 | * | Vladar quit (Quit: Leaving) |
22:37:50 | * | max22- quit (Remote host closed the connection) |
22:47:50 | * | meowray joined #nim |
23:17:18 | nrds | <Prestige99> Seems github issues don't use real markdown.. dang |
23:17:29 | nrds | <sorcerer99> oO |
23:18:25 | nrds | <Prestige99> in markdown, a single newline doesn't actually create a visual new line. But in github it does.. |
23:18:29 | nrds | <Prestige99> unfortunate |
23:33:33 | * | stkrdknmibalz joined #nim |
23:38:10 | FromDiscord | <Yardanico> markdown doesn't really have one standard |
23:38:28 | FromDiscord | <Yardanico> There are multiple, GitHub uses so-called GitHub-flavoured Markdown |
23:38:32 | FromDiscord | <Yardanico> GFM |
23:52:20 | Mister_Magister | officially, my nim wrapper for pigpio is better than using arduino libs |
23:52:23 | Mister_Magister | its simpler |