<< 11-10-2021 >>

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:19FromDiscord<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:49FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3Bpj
02:44:39FromDiscord<Elegantbeef> You should be able to do `when defined(vcc) or defined(tcc)` afaik
02:53:02FromDiscord<geekrelief> In reply to @Elegantbeef "You should be able": thx I'll give it a shot
02:54:28FromDiscord<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:56FromDiscord<retkid> thanks to all of your for being nice and patient wth me
03:37:59FromDiscord<retkid> (edit) "wth" => "with"
03:38:27FromDiscord<retkid> last night i was anxious as hell and I guess that made it really hard to program
03:45:00FromDiscord<Elegantbeef> Unacceptable! 😛
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:36:09FromDiscord<levovix> is where a way to compile only part of code with -d:release?
04:37:50FromDiscord<impbox [ftsf]> @levovix you can do `{.push,checks:off.}` i think
04:38:02FromDiscord<impbox [ftsf]> not quite the same but can help
04:38:17FromDiscord<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:44FromDiscord<retkid> i have an await
06:41:55FromDiscord<retkid> but wanna execute something right after it comples
06:41:57FromDiscord<retkid> (edit) "comples" => "completes"
06:45:22PMunchSo put your code right after it?
06:45:27PMunchOr am I missing something?
06:45:57FromDiscord<Rika> what's the issue?
06:46:02FromDiscord<retkid> In reply to @PMunch "So put your code": YEA
06:46:06FromDiscord<retkid> (edit) "YEA" => "yea"
06:46:14FromDiscord<retkid> actually think i found a pasta solution
06:46:46FromDiscord<Rika> ??
06:46:53FromDiscord<Rika> we dont know what your issue
06:46:54FromDiscord<Rika> is
06:47:03PMunchCopy-paste, copy-pasta, pasta
06:47:10PMunchIf that is what confused you :P
06:47:19FromDiscord<retkid> not copy pasta, pasta code
06:47:49FromDiscord<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:53PMunchOh, I've always heard that referred to as spaghetti-code
06:47:59FromDiscord<Rika> Yes you put that after the await
06:48:12FromDiscord<Rika> Just like regular sync code
06:48:31PMunch`await myAsyncFunc; whateverElse(100, "Hello world)`
06:48:46PMunchThat whateverElse will be called after myAsyncFunc has completed
06:48:54FromDiscord<retkid> oh i forgot the sleep was on the client end
06:48:56FromDiscord<retkid> not the server end
06:49:02FromDiscord<retkid> 😓
06:49:08PMunchSleep?
06:49:34FromDiscord<retkid> i was testing async by spamming server connectons on a sleep
06:49:52FromDiscord<retkid> but, the sleep isn't on the server so the transaction happens really quickly
06:50:01FromDiscord<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:04FromDiscord<retkid> it just stays at 1
06:50:19FromDiscord<retkid> hopefully that makes sense
06:50:28PMunchsleep will interfere with async by the way
06:50:42PMunch"hopefully that makes sens" > not really :P
06:51:05PMunchThere 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:14FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3BpP
06:52:16PMunchNo part of that code is async though..
06:52:30PMunchIt's just multi-threaded
06:52:44FromDiscord<retkid> i was confused because i didn't see any change in the list of connected clients on the server side
06:52:51FromDiscord<retkid> because the sleep isn't on the server side
06:53:19PMunchNo, 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:38FromDiscord<Rika> You underestimate how bad servers can get
06:53:38FromDiscord<retkid> hm
06:54:00PMunch@Rika, haha fair enough.
06:54:00FromDiscord<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:03FromDiscord<Rika> I once made something that could only handle once a half minute requests
06:54:16PMunchUhm, then something is broken
06:54:30FromDiscord<Rika> ~~who me or ret~~
06:54:34FromDiscord<Rika> I kid
06:57:57FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3BpT
06:58:51FromDiscord<Rika> Your code doesn’t make logical sense, what do you want to do here exactly
06:59:09PMunchI mean if that code completes in less than a second there is something wrong
07:00:17FromDiscord<Rika> Perhaps but even then what’s this supposed to be actually doing?
07:05:51FromDiscord<retkid> as i've said a few times
07:05:54FromDiscord<retkid> thats not the async code
07:06:01FromDiscord<retkid> i was just showing that i got confused
07:06:08FromDiscord<retkid> thats kinda it
07:06:37PMunchBut now we're confused as well, because that code doesn't really make much sense :P
07:07:27FromDiscord<Rika> Even if that’s not the async code it makes no sense
07:07:30FromDiscord<retkid> i kinda thought async was a form of threading
07:07:34FromDiscord<retkid> which makes no sense
07:07:48FromDiscord<retkid> so i thought something in parallel was happening
07:08:12FromDiscord<retkid> so if i connected, then slept, i could get a list of all connected clients
07:08:18FromDiscord<retkid> but that, isn't how that works at all lol
07:08:46PMunchOh yeah, that's completely incorrect :P
07:09:49*max22- joined #nim
07:09:50PMunchHere 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:23PMunchHuh, 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:52FromDiscord<Rika> Perchance
09:52:25PMunchThe price I have to pay for not having analytics on my site :P
09:59:05FromDiscord<dom96> You could try analysing your access logs
10:14:13FromDiscord<impbox [ftsf]> Webalizer will do that for you and give you graphs
10:14:29FromDiscord<impbox [ftsf]> Haven't used it in a decade though, not sure if it still works
10:28:58PMunchLast stable release 8 years ago
10:29:58FromDiscord<Rika> Must be stable as hell then /s
10:37:47PMunchHaha, quite possible
10:50:50*Vladar joined #nim
10:58:02FromDiscord<hotdog> In reply to @dom96 "You could try analysing": goaccess is great for this
10:58:06FromDiscord<hotdog> Entirely server side
10:58:16FromDiscord<hotdog> https://goaccess.io/
10:59:54FromDiscord<Rika> New tool to use
11:00:06FromDiscord<Rika> In my ever expanding list of tools to use…
11:17:14FromDiscord<enthus1ast> lot of these go based cli tools lately, this should be clearly nim domain \:)
11:19:27FromDiscord<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:30PMunchgoaccess is pretty cool
11:35:54PMunchAnd it's always fun to see how much traffic comes from tools trying to scrape for open logic pages and such
11:40:19FromDiscord<hotdog> In reply to @PMunch "And it's always fun": Yeah, lots of the classic `GET /wp-admin.php` etc
11:40:29PMunchYup!
11:40:57FromDiscord<enthus1ast> honey pot fun \:)
11:41:02*xet7 quit (Remote host closed the connection)
11:41:57FromDiscord<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:34FromDiscord<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:08FromDiscord<hotdog> In reply to @dom96 "hehe, I made a": Neat
11:51:46PMunch@enthus1ast, you got a letter from your telecom for having a telnet port open? That's pretty cool
11:52:45PMunch@dom96, I was just using the terminal based version
11:58:21FromDiscord<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:11PMunchHaha, what kind of firewall has popups with sound when it blocks stuff? :P
12:00:00FromDiscord<RMT> This was 2001.. so some crappy 3rd party Windows software. ;-)
12:00:27FromDiscord<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:12FromDiscord<enthus1ast> they thought that i was a botnet target
12:03:16*neurocyte0132889 quit (Ping timeout: 252 seconds)
12:03:31FromDiscord<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:50FromDiscord<enthus1ast> leak/strain
12:05:10FromDiscord<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:28FromDiscord<enthus1ast> and also origin of attack IIRC 80% came from china and india
12:35:26FromDiscord<gogolxdong (liuxiaodong)> Is the author of stardust.dev here?
12:36:44FromDiscord<Rika> That would be Dom
12:37:47FromDiscord<gogolxdong (liuxiaodong)> not sure which is
12:39:02PMunchYou don't know who dom96 is?
12:39:44FromDiscord<gogolxdong (liuxiaodong)> I've seen many dom96s
12:40:06FromDiscord<Rika> How
12:40:11FromDiscord<Rika> There is only one here
12:40:24FromDiscord<gogolxdong (liuxiaodong)> with different names
12:42:22FromDiscord<haxscramper> dom dOm dom96
12:42:23FromDiscord<haxscramper> dom69
12:43:52FromDiscord<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:22FromDiscord<gogolxdong (liuxiaodong)> haven't talked with him for a long time, last time I know he went to Facebook.
12:49:57PMunchHe's still at Facebook afaik
12:50:06PMunchTalked to him just the other day
12:52:35FromDiscord<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:31FromDiscord<dom96> I’m always here. If someone was pretending to be me, I’d like to know who that was 😮
13:17:56FromDiscord<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:27FromDiscord<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:02FromDiscord<gogolxdong (liuxiaodong)> @\_discord\_132595483838251008\:t2bot.io
13:29:52*nrds joined #nim
13:35:11FromDiscord<dom96> yeah, I'm speaking from Discord right now
13:35:18FromDiscord<dom96> and have a Telegram account as well
13:41:04FromDiscord<gogolxdong (liuxiaodong)> share which you use more often \:)
13:46:25FromDiscord<dom96> Discord > Telegram >>>>>> Matrix (I very rarely use Matrix)
13:46:44FromDiscord<sheldon> In reply to @dom96 "yeah, I'm speaking from": sent a request, will this account find you in time?
13:47:29FromDiscord<dom96> no need for friend requests for me, I don't block non-friends from PMing me AFAIK
13:48:27FromDiscord<dom96> My telegram username is @d0m96 in case you want to contact me on that
13:48:35FromDiscord<dom96> [gogolxdong (liuxiaodong)](https://matrix.to/#/@gogolxdong-57dde26640f3a6eec065d1da:gitter.im)\: ^
13:48:47FromDiscord<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:50FromDiscord<Kiloneie> why is↵dumpTree:↵ 5 (5 + 10) ↵displaying nothing for me ?...
14:08:14FromDiscord<enthus1ast> try to compile with -f
14:08:39FromDiscord<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:17FromDiscord<xflywind> p doge_example_4
14:09:27*nrds quit (Remote host closed the connection)
14:11:48FromDiscord<juan_carlos> Shows `(NimStringDesc) $4 = { Sup = (len = 3, reserved = 7), data = {} }` , the `data` si still now displayed. 🤔
14:12:56FromDiscord<Rika> `p doge_example_4->data`?
14:13:36FromDiscord<xflywind> or consider using nim-gdb which should help
14:13:38FromDiscord<Rika> `p ((char )doge_example_4->data)`?
14:13:42FromDiscord<Rika> not sure what else is needed
14:14:34FromDiscord<juan_carlos> In reply to @Rika "`p doge_example_4->data`?": `(NIM_CHAR) $7 = 'f'`
14:15:32FromDiscord<juan_carlos> In reply to @flywind "or consider using nim-gdb": 👍
14:15:58FromDiscord<xflywind> https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb
14:16:11FromDiscord<Rika> In reply to @Rika "`p ((char *)doge_example_4->data)`?": what about this?
14:16:34FromDiscord<xflywind> In reply to @flywind "https://nim-lang.org/blog/2017/10/02/documenting-pr": > > print (char)doge_example_4->data
14:16:38FromDiscord<juan_carlos> `(char ) $8 = 0x000002a9c119f060 "foo"`
14:16:40FromDiscord<xflywind> (edit) removed ">"
14:16:46FromDiscord<juan_carlos> Flawless victory
14:16:57FromDiscord<juan_carlos> I will try nim-gdb
14:18:52FromDiscord<Kiloneie> OH, had to look at the output not terminal and switch from tasks to Nim
14:18:58FromDiscord<Kiloneie> VS code thing D:
14:19:55FromDiscord<juan_carlos> lldb says is has a terminal GUI, but `gui` command do nothing, weird.
14:19:56*PMunch quit (Quit: leaving)
14:20:34FromDiscord<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:26FromDiscord<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:16FromDiscord<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:57FromDiscord<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:52FromDiscord<xflywind> see `tools/nim-gdb.py`
14:45:20FromDiscord<xflywind> https://github.com/nim-lang/Nim/blob/devel/tools/nim-gdb.py
14:45:35FromDiscord<juan_carlos> In reply to @flywind "`nim-gdb.py` is shipped with": Theres no `gdb` in Python stdlib.
14:46:28FromDiscord<xflywind> Or they are in PyPI,
14:46:39FromDiscord<xflywind> I don't remember it.
14:46:52FromDiscord<xflywind> https://github.com/nim-lang/Nim/blob/83128f217f63045974a48e61b65386abbfc97352/tools/nim-gdb.py#L1
14:47:05FromDiscord<xflywind> it surely import gdb though
14:47:09FromDiscord<xflywind> (edit) "import" => "imports"
14:47:23FromDiscord<xflywind> see also https://github.com/nim-lang/Nim/tree/devel/bin
14:47:38FromDiscord<xflywind> relevant bash script which can be used
14:47:42FromDiscord<xflywind> (edit) "script" => "scripts"
14:47:53FromDiscord<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:53FromDiscord<xflywind> (edit) "don't" => "can't"
14:48:44FromDiscord<xflywind> wtf
14:51:30FromDiscord<juan_carlos> And bash nim-gdb just calls `nim-gdb.py` so wont work neither.
14:52:15FromDiscord<xflywind> we need to ship `gdb.py` if possible or remove them completely.
14:52:24FromDiscord<xflywind> (edit) "we" => "Nim"
14:52:55FromDiscord<juan_carlos> nim-gb.bat also same, no one works.
14:53:18FromDiscord<juan_carlos> Problem is gdb python package is based on has been deleted.
14:54:42FromDiscord<xflywind> Well there is a chance someone install them before.
14:54:51FromDiscord<xflywind> (edit) "install" => "installed"
14:56:01FromDiscord<xflywind> But I will remove it atm.
14:56:24FromDiscord<juan_carlos> If someone has the package then should commit it to repo.
14:56:57FromDiscord<xflywind> I agree.
14:58:16FromDiscord<xflywind> or rewrite it in pure Nim.
15:01:41FromDiscord<juan_carlos> PyPI you can delete any package at any time.
15:02:24FromDiscord<xflywind> so does nimble 😛 just delete the github repo
15:03:38FromDiscord<juan_carlos> But Pypi was missing 2FA until recently.
15:04:57FromDiscord<xflywind> https://github.com/rust-lang/rust/blob/master/src/etc/gdb_load_rust_pretty_printers.py
15:05:13FromDiscord<xflywind> ha, so does rust use gdb.py
15:05:19FromDiscord<kevin> Is there a nim proc that tells you what type an object is
15:05:21FromDiscord<xflywind> (edit) "use gdb.py" => "(use gdb.py)"
15:05:32FromDiscord<kevin> like `type()` from python
15:06:04FromDiscord<haxscramper> typeof ()
15:06:14FromDiscord<xflywind> In reply to @kevin "like `type()` from python": just like Pthon
15:06:18FromDiscord<xflywind> (edit) "Pthon" => "Python"
15:06:27FromDiscord<xflywind> `type` or `typeof`
15:06:52FromDiscord<xflywind> https://github.com/rust-lang/rust/blob/6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073/src/etc/gdb_lookup.py#L1
15:13:34FromDiscord<enthus1ast> also `is`
15:13:39FromDiscord<enthus1ast> Foo is object
15:14:32FromDiscord<enthus1ast> `Faa is Foo`
15:15:19FromDiscord<Rika> did you forget about "Bar"
15:15:19FromDiscord<Rika> lol
15:16:06FromDiscord<kevin> sent a code paste, see https://play.nim-lang.org/#ix=3Bsp
15:16:11FromDiscord<juan_carlos> @xflywind Recently @saem sent a fix for nim-gdb, maybe he still has the python module in the disk?.
15:16:29FromDiscord<Rika> you need to explicitly say which you want to iterate over
15:16:31FromDiscord<Rika> keys or values
15:16:39FromDiscord<enthus1ast> or pairs
15:16:42FromDiscord<Rika> if you want both theres pairs
15:16:52FromDiscord<Rika> gives a tuple (key, value)
15:17:22FromDiscord<Rika> can be implicitly called with `for key, value in headertable:`
15:17:25FromDiscord<xflywind> In reply to @juan_carlos "<@!658563905425244160> Recently <@!7114126933905900": yeah, and it seems to be a popular library used among Rust libraries
15:17:35FromDiscord<Rika> otherwise you need to say keys or values
15:18:44FromDiscord<kevin> sent a code paste, see https://play.nim-lang.org/#ix=3Bsr
15:19:03FromDiscord<Rika> how do you import table
15:19:16FromDiscord<Rika> `import tables` is recommended
15:20:04FromDiscord<kevin> yep, that was it...
15:20:07FromDiscord<kevin> 😢
15:20:12FromDiscord<kevin> thanks 😄
15:21:59FromDiscord<Clonkk> `import std/tables` technically↵(@Rika)
15:22:14FromDiscord<Rika> sure
15:22:22FromDiscord<xflywind> In reply to @juan_carlos "<@!658563905425244160> Recently <@!7114126933905900": https://github.com/python/cpython/blob/560a79f94e94de66a18f2a5e4194c2fe51e2adf1/Tools/gdb/libpython.py#L49
15:25:12FromDiscord<juan_carlos> In reply to @flywind "https://github.com/python/cpython/blob/560a79f94e94": So it comes with GDB itself ?.
15:25:37FromDiscord<juan_carlos> is not in Python stdlib.
15:26:13FromDiscord<xflywind> https://stackoverflow.com/questions/4792483/how-to-import-gdb-in-python/10240053
15:26:41FromDiscord<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:55FromDiscord<juan_carlos> In reply to @flywind "https://stackoverflow.com/questions/4792483/how-to-": 🙂👍
15:31:25FromDiscord<juan_carlos> That should go in docs, lol.
15:33:03FromDiscord<xflywind> I agree 🤣
15:33:58FromDiscord<xflywind> And `nim-gdb` should be documented somewhere. There is no documentation for it atm.
15:34:47FromDiscord<xflywind> maybe need a new chapter for introducing tools which are shipped with Nim.
15:36:57FromDiscord<xflywind> In reply to @flywind "And `nim-gdb` should be": https://nim-lang.github.io/Nim/tools.html
15:37:18FromDiscord<xflywind> there should have a line for mentioning `nim-gdb` I think
15:48:59FromDiscord<kevin> is there a way to get the remote address from a webclient that connects to the Nim asynchttpserver?
15:49:19FromDiscord<kevin> Python flask has `request.environ['REMOTE_ADDR']`
15:49:47FromDiscord<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:10FromDiscord<juan_carlos> Should be in the headers somewhere.
15:55:04FromDiscord<Rika> request.hostname?
15:56:59FromDiscord<kevin> wouldn't that depend on the web client sending their hostname/ip addr in the headers?
15:57:32FromDiscord<Rika> it always is isnt it
15:57:42FromDiscord<Rika> In reply to @Rika "request.hostname?": not header btw
15:58:07FromDiscord<Rika> ` hostname: string ## The hostname of the client that made the request.`
15:59:04FromDiscord<kevin> Think you're right... gotta test on another device lol 😂
15:59:25FromDiscord<kevin> I thought that was the hostname of the web server but i think it's not
16:00:20FromDiscord<Rika> why would
16:00:26FromDiscord<Rika> okay i guess
16:00:35FromDiscord<Rika> but its documented that it isnt at least
16:00:42FromDiscord<kevin> Yeah it is
16:01:23FromDiscord<kevin> just saw 127.0.0.1 and thought it was my server IP address
16:01:31FromDiscord<kevin> turns out it's actually the client IP address
16:02:31FromDiscord<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:28FromDiscord<kevin> In reply to @Rika "~~ > client connects": I'm learning okay 😭
16:03:34FromDiscord<kevin> lol
16:03:50FromDiscord<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:41nrds<Prestige99> I guess the bridge went down before I sent my message
16:16:45nrds<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:46nrds<R2D299> itHub: 7"List of packages for Nimble"
16:17:13nrds<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:08NimEventerNew thread by Jasonfi: Best serialization protocol for Nim?, see https://forum.nim-lang.org/t/8493
17:17:53FromDiscord<Gumber> has anyone gotten tcp sockets w/ ssl working on windows with Nim?
17:18:01FromDiscord<Gumber> I'm having some issues...
17:25:51Mister_Magisteranyone got example of handling input? input as in gamepad input. I wanna use gamepad to control something
17:26:35Mister_Magisteri probably need some gui library for that? seems kinda overkill
17:26:54Mister_Magistersdl will prably do
17:29:01nrds<Prestige99> I use sdl for that, it's nice
17:35:04Mister_Magisterye i just tried sdl but it doesn't react to controller
17:36:04Mister_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:28nrds<Prestige99> iirc you have to set some window flag to enable joystick support
17:37:35nrds<Prestige99> let me look into it for a min
17:37:56Mister_Magister<3 appreciated
17:38:44nrds<Prestige99> https://www.libsdl.org/release/SDL-1.2.15/docs/html/joystick.html this should have the info you need
17:39:09Mister_MagisterJoystick support is initialized by passed the SDL_INIT_JOYSTICK, and the example already does INIT_EVERYTHING
17:39:16nrds<Prestige99> since you're using INIT_EVERYTHING you should be good, probably just need to open the joystick now
17:39:22Mister_Magisterah
17:39:23Mister_Magisterye
17:45:58Mister_Magisteryep discard joystickOpen(0) did the trick
17:46:13nrds<Prestige99> nice :)
17:48:51Mister_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:18Mister_Magisterahh its in sdl2 docs
17:50:49Mister_Magisterhttps://github.com/nim-lang/sdl2/blob/ed842e0092ab1c45176e95ab35d6d244ef48a509/src/sdl2.nim#L130
17:50:51Mister_Magistereven better, its here
17:51:55Mister_Magisterbut for some reason axis field is missing? do i have to cast it somehow?
17:54:01Mister_Magisterahh cast[WindowEventPtr](addr(evt))
17:54:09Mister_Magisterwhy do i keep asking and answering to myself xd
17:54:12Mister_Magistershould 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:30nrds<Prestige99> Happens sometimes haha
18:56:00Mister_Magisterworks perfect
18:56:25FromDiscord<Elegantbeef> Formulating questions makes you think, so it's the best way to solve problems 😛
18:56:26nrds<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:55PMunchGood old rubber-ducking Mister_Magister :)
19:26:33Mister_MagisterPMunch: i know right? :P
19:26:59Mister_Magister@Prestige im using gamepad to control rc car that has raspberry on it
19:27:11Mister_Magisterlitreally made my own wrapper for gpio library just to be able to use nim on raspi
19:27:27*max22- joined #nim
19:32:08PMunchWasn't there one already?
19:32:59Mister_MagisterPMunch: nope
19:33:06PMunchHuh
19:34:20Mister_MagisterPMunch: there is outdated wrapper for deprecated pile of hot steaming shit called wiringPi but for obvious reasons i didn't use it
19:36:09Mister_Magisteri gotta figure out voltage divider
19:39:12PMunchAh right :P
19:39:24PMunchThose are pretty simple though aren't they?
19:39:33NimEventerNew 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:41Mister_Magistermhm
19:40:38Mister_Magistercurrently soldering pins to adc
19:40:47Mister_Magisterim getting better at soldering
19:44:29FromDiscord<Rika> ~~ngl raspi just for rc car controller is overkill as fuckkkkk~~
19:44:53Mister_Magister@Rika for now
19:45:01Mister_Magisterit will be fpv rc car
19:45:08FromDiscord<Rika> oh damn
19:45:21FromDiscord<Rika> now thats cool
19:45:22Mister_Magisterraspi, as it can have 1080p camera, seemed nice choice
19:45:42FromDiscord<Rika> i mean there are still other options but the raspi sounds easiest
19:46:22Mister_Magisteri wanted to have fun programming everything myself
19:46:27Mister_Magisterand also cost
19:46:33Mister_Magisterits lowest cost possible
19:50:17FromDiscord<Rika> i mean easy to find
19:50:18FromDiscord<Rika> but yeah
19:50:27FromDiscord<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:02PMunchNot that hard to find, I have a drawer full :P
20:10:59FromDiscord<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:38Mister_Magister@dom96 can u explain in 2 sentences?
20:13:13FromDiscord<dom96> Make 4 PRs and DigitalOcean/GitHub will give you a t-shirt
20:13:36FromDiscord<dom96> (oh, and get them merged + they have to be in repos that have the `hacktoberfest` tag)
20:13:53FromDiscord<dom96> (you can read https://hacktoberfest.digitalocean.com/ for specifics)
20:14:24nrds<Prestige99> @dom96 did you happen to see my earlier message about nimble?
20:15:15FromDiscord<dom96> Prestige: yes, please submit an issue in the repo
20:15:18Mister_Magister@dom96 meh, thought i could do something with my new lib i made for nim
20:15:31nrds<Prestige99> Sure thing, I can get to it after work
20:16:43FromDiscord<dom96> Mister_Magister: technically I think you can, just create PRs on your own repo 😄
20:18:40FromDiscord<Daniel> https://media.discordapp.net/attachments/371759389889003532/897216651081154620/johnSnowIT.mp4
20:31:00FromDiscord<Rika> #memes?
20:33:26PMunch@dom96, can confirm, PRs to your own repos work
20:36:26nrds<Prestige99> Interesting
20:40:31FromDiscord<Unaimend> sent a code paste, see https://paste.rs/uPr
20:40:49PMunchTo be fair the ones I've done to my own repo has been to get feedback
20:42:22FromDiscord<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:07FromDiscord<dom96> try https://play.nim-lang.org/#ix=3BtD
20:51:26FromDiscord<Unaimend> When I am iterating over the same `OrderedDict` at two different code locations I am guaranteed the "order of iteration", correct?
20:51:51FromDiscord<Elegantbeef> `OrderedTable`?
20:52:41FromDiscord<Unaimend> https://nim-lang.org/docs/tables.html#OrderedTable
20:52:53FromDiscord<Elegantbeef> If so yes ordered tables remember their insertion order which is what that iterator uses
20:53:10FromDiscord<Unaimend> Thanks
21:06:36FromDiscord<ynfle (ynfle)> Is it possible to get ascii coloring from execmdex and those family of procs?
21:06:47FromDiscord<ynfle (ynfle)> \ansi
21:08:12FromDiscord<ynfle (ynfle)> Is there a way to disable full paths for compilation errors?
21:09:10FromDiscord<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:43FromDiscord<Elegantbeef> full paths being which module a symbol comes from?
21:10:04FromDiscord<SivadNai> who has a repo full of errors?
21:10:17FromDiscord<Elegantbeef> You do?
21:12:21FromDiscord<ynfle (ynfle)> No, the full path to the file
21:12:53FromDiscord<ynfle (ynfle)> @beef so if it compiles with color, it should automatically give to me with those procs?
21:13:31FromDiscord<Elegantbeef> Well if the program thinks it should output with colour or is told it should it'll give ansi colours
21:13:42FromDiscord<ynfle (ynfle)> Ok
21:13:45FromDiscord<ynfle (ynfle)> Lets test...
21:13:50FromDiscord<Elegantbeef> Possibly `--filenames:abs|canonical|legacyRelProj` though i dont know the nim version you're on
21:14:52FromDiscord<zidsal> @dom96 out of interest how come the tables module doesn't use that pattern is there a draw back to this?
21:15:52FromDiscord<Elegantbeef> I'd probably say that it allows runnable examples that match the first parameter
21:16:31FromDiscord<Elegantbeef> Though they also do have different implementations
21:16:45FromDiscord<Elegantbeef> So it's just fewer when statements
21:16:58FromDiscord<SivadNai> I do, yes
21:17:09FromDiscord<zidsal> the []= impl looks the same, although the runnable examples is a good point
21:19:18FromDiscord<ynfle (ynfle)> @beef 1.4.8
21:19:47FromDiscord<ynfle (ynfle)> doesn't seem to have it
21:19:54FromDiscord<ynfle (ynfle)> Will 1.6?
21:20:01FromDiscord<Elegantbeef> Yea
21:20:14FromDiscord<ynfle (ynfle)> Noice
21:39:09FromDiscord<ynfle (ynfle)> @beef it get ansi color
21:50:52FromDiscord<ynfle (ynfle)> Any easy way to remove ansi color once gotten?
22:03:07FromDiscord<impbox [ftsf]> resetAttributes?
22:03:58FromDiscord<impbox [ftsf]> Or set to fgDefault
22:04:30*neurocyte0132889 quit (Ping timeout: 260 seconds)
22:04:32FromDiscord<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:40FromDiscord<impbox [ftsf]> Ooh
22:05:47FromDiscord<impbox [ftsf]> I'd probably write a function to skip them in the comparison
22:05:57FromDiscord<impbox [ftsf]> I don't think anything exists for it already
22:06:22*meowray quit (Ping timeout: 260 seconds)
22:13:53FromDiscord<ynfle (ynfle)> @impbox, any idea how to do that?
22:19:32FromDiscord<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:56FromDiscord<impbox [ftsf]> For non ignored characters you can return false if either of the characters don't match each other
22:27:34FromDiscord<ynfle (ynfle)> I got `.replace(re"\u001B\[(\d|;)+?m", "")`
22:27:38FromDiscord<ynfle (ynfle)> Seems to work
22:27:42FromDiscord<ynfle (ynfle)> Thanks though
22:31:09FromDiscord<impbox [ftsf]> Yeah you can strip the codes then compare as usual
22:32:24FromDiscord<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:18nrds<Prestige99> Seems github issues don't use real markdown.. dang
23:17:29nrds<sorcerer99> oO
23:18:25nrds<Prestige99> in markdown, a single newline doesn't actually create a visual new line. But in github it does..
23:18:29nrds<Prestige99> unfortunate
23:33:33*stkrdknmibalz joined #nim
23:38:10FromDiscord<Yardanico> markdown doesn't really have one standard
23:38:28FromDiscord<Yardanico> There are multiple, GitHub uses so-called GitHub-flavoured Markdown
23:38:32FromDiscord<Yardanico> GFM
23:52:20Mister_Magisterofficially, my nim wrapper for pigpio is better than using arduino libs
23:52:23Mister_Magisterits simpler