<< 29-03-2021 >>

00:01:51*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:02:11*njoseph joined #nim
00:11:18*krux02 quit (Ping timeout: 240 seconds)
00:18:15*a_chou joined #nim
00:26:37PMunchJust got done editing down the second episode of the keyboard firmware stuff. Probably going to stream again tomorrow :)
00:32:42*a_chou quit (Remote host closed the connection)
00:33:21*a_chou joined #nim
00:45:34*abm quit (Quit: Leaving)
00:53:41*oz joined #nim
01:05:12*arecaceae quit (Remote host closed the connection)
01:05:30*arecaceae joined #nim
01:10:51*a_chou quit (Quit: a_chou)
01:28:39*rockcavera joined #nim
01:44:34*Tanger joined #nim
02:04:51FromDiscord<Zachary Carter> In reply to @dom96 "`when defined(js): import jshttpclient": I think the entire point is so that you don't have to make this distinction in userspace
02:04:54FromDiscord<Zachary Carter> (edit) "userspace" => "user space"
02:05:14FromDiscord<Zachary Carter> you just import httpclient and it works regardless of the backend
02:28:30*D_ quit (Quit: 💨)
02:28:38*D__ joined #nim
02:31:23*PMunch quit (Quit: leaving)
02:57:30ForumUpdaterBotNew thread by Masiarek2: Quit() - inconsistent behavior - osx terminal vs visual studio, see https://forum.nim-lang.org/t/7715
03:44:06*spiderstew joined #nim
03:45:21*spiderstew_ quit (Ping timeout: 250 seconds)
04:12:11*greaser|q quit (Changing host)
04:12:11*greaser|q joined #nim
04:12:15*greaser|q is now known as GreaseMonkey
04:17:36*vicfred quit (Quit: Leaving)
04:19:53*vicfred joined #nim
04:26:14*rockcavera quit (Remote host closed the connection)
05:15:20*NimBot joined #nim
05:34:42*vegai joined #nim
05:51:01*narimiran joined #nim
05:51:38*shmorgle quit (Ping timeout: 240 seconds)
05:57:28saemLooking at the nim-gdb.py wrapper again and all I can think of is Yardanico and I saying not much more than "NTI" to each other over and over again. 😆
06:09:37*xet7 quit (Remote host closed the connection)
06:10:40*xet7 joined #nim
06:12:31*GreaseMonkey quit (Remote host closed the connection)
06:13:30*vicfred quit (Quit: Leaving)
06:26:14*waleee-cl quit (Quit: Connection closed for inactivity)
06:43:04Clonkk[m]NTI?
06:47:09*Kumool joined #nim
06:57:01*greaser|q joined #nim
07:01:47*letto_ quit (Read error: Connection reset by peer)
07:02:19*letto joined #nim
07:13:51FromDiscord<Yardanico> Nim Type Information
07:14:07FromDiscord<Yardanico> Runtime type information generated by Nim
07:18:31saemah yes, colonObjectType my old friend.
07:22:25ForumUpdaterBotNew thread by Halloleo: Emacs fans tell me: What autocomplete and symbol look-up package are you using?, see https://forum.nim-lang.org/t/7716
07:41:25*lritter joined #nim
08:13:45Oddmongeris {.global.} going to die ?
08:16:02saem@Yardanico: if you're curious, I updated the gdb branch, tests are passing, things work a fair bit better. But the AST still doesn't quite render correctly with the variants. Getting closer.
08:16:41FromDiscord<Yardanico> Oh, nice
08:18:09*leorize quit (Remote host closed the connection)
08:18:53*leorize joined #nim
08:20:53FromDiscord<Yardanico> In reply to @Oddmonger "is {.global.} going to": Global pragma actually works with ARC as I found out, just not when initializing in the declaration
08:31:00Oddmongeryou mean : « var x {.global.} :int » is ok , but not « var x {.global.} = 42 » ?
08:31:51FromDiscord<Yardanico> with non value types it's always ok
08:32:03FromDiscord<Yardanico> I mean with value types
08:34:34Oddmongeri don't understand, can i have a sample of what's working and what's not , please ?
08:35:50FromDiscord<Yardanico> Check the issue
08:35:52FromDiscord<Yardanico> I updated it
08:36:06Oddmongerok thank you
08:38:08FromDiscord<Yardanico> lo and behold
08:38:18FromDiscord<Yardanico> the workaround to make global work with ARC like it does with refc:
08:38:25FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2UrI
08:38:37FromDiscord<Yardanico> (compile with refc and arc - second example works in both cases, first one only works correctly with refc)
08:38:48FromDiscord<Yardanico> system.once uses the global pragma too btw
08:40:35FromDiscord<flywind> `system.once` can be deprecated if needed.
08:40:39FromDiscord<Yardanico> why?
08:40:42FromDiscord<flywind> It is not thread-safe
08:41:06FromDiscord<Yardanico> we can just add a warning/hint that it's not thread safe :)
08:41:37FromDiscord<flywind> https://github.com/nim-lang/Nim/pull/16192/files
08:41:58FromDiscord<flywind> a possible implementation without `{.global.}`.
08:44:38FromDiscord<Yardanico> true, but that'll incur more overhead, right?
08:44:55FromDiscord<Yardanico> since each time the "once" is reached we'll need to check an atomic bool
08:45:20FromDiscord<flywind> So I have a good reason to object to timotheecour's PR 😛
08:45:52FromDiscord<flywind> yeah
08:49:27FromDiscord<mratsim> threadsafe once is useful as well
08:49:35FromDiscord<mratsim> so 2 variants?
08:49:44FromDiscord<mratsim> {.threadonce.}
08:50:47FromDiscord<flywind> sounds good
09:01:04Oddmongerthank you for the sample, Yardanico
09:02:25*Vladar joined #nim
09:08:24*Tanger quit (Quit: Leaving)
09:18:28*krux02 joined #nim
09:33:13federico3https://nitter.cattube.org/ryancdotorg/status/1375484757916672000
09:43:06FromDiscord<exelotl> god, {.compileTime.} access at runtime is so jank
09:46:30FromDiscord<exelotl> if the initial state of the variable at runtime is not guaranteed to be the same as the final state of the variable at compile time, what's even the point?
09:48:00FromDiscord<Yardanico> have you tried converting compileTime into const?
09:48:14FromDiscord<Yardanico> and AFAIK compileTime was initially meant for variables that _only_ exist at compile time
09:50:01FromDiscord<Yardanico> @flywind sorry if I might be annoying, but as I've seen you were fixing some mistakes in docs
09:50:24FromDiscord<Yardanico> in https://nim-lang.org/docs/net.html#recv%2CSocket%2Cstring%2Cint it should be "from socket into data" data instead of buf
09:50:38FromDiscord<Yardanico> and https://nim-lang.org/docs/net.html#recv%2CSocket%2Cint says "Reads up to size bytes from socket into buf." but that proc actually returns stuff
09:51:47FromDiscord<flywind> do you want me to make a PR? Or yourself?
09:52:21FromDiscord<exelotl> In reply to @Yardanico "have you tried converting": yep, I did that yesterday and it solved my issue :)
09:52:34FromDiscord<Yardanico> In reply to @flywind "do you want me": can you do it? :P i thought you had a similar PR, so it's easier to fix it there
09:53:34FromDiscord<flywind> It should be a separate PR IMO because I'm closing a issue not doing docs cleaning up.
09:55:09FromDiscord<flywind> anyway you can file an issue.
09:56:52FromDiscord<flywind> (edit) "issue." => "issue(if you don't want to make a PR 🙂"
09:57:53FromDiscord<flywind> In reply to @Yardanico "can you do it?": Small PR is easier to be accepted.
09:58:05FromDiscord<Yardanico> ok sure
10:00:52FromDiscord<Yardanico> @flywind do you think we can remove " Note: data must be initialized"?
10:01:00FromDiscord<Yardanico> since data is a string and strings are always initialized in Nim by default
10:01:32FromDiscord<Yardanico> that hint was there since 7 years ago
10:04:30FromDiscord<flywind> I am not sure. It should be allocated enough space I guess?
10:05:01FromDiscord<Yardanico> no, the proc allocates by itself
10:05:17FromDiscord<Yardanico> `data.setLen(size)`
10:05:33FromDiscord<flywind> didn't notice it, safe to remove I think
10:08:02FromDiscord<Yardanico> https://github.com/nim-lang/Nim/pull/17566
10:09:09FromDiscord<Yardanico> also, on a related note, I think we should document the difference between a buffered and an unbuffered socket
10:09:27FromDiscord<Yardanico> with a buffered socket (which is the default) in net you must be sure that the server will send the amount of data you requested
10:09:35FromDiscord<Yardanico> otherwise it'll loop forever
10:09:55FromDiscord<Yardanico> i'm not sure if this is a bug 🤔
10:23:30FromDiscord<Yardanico> oh its not a bug - https://github.com/nim-lang/Nim/issues/11425
11:15:29FromDiscord<Mr Axilus> In nim, is there any performance difference between using `return` vs `result =`?
11:16:13FromDiscord<Mr Axilus> If no, what's the general preference in a situation where both would accomplish the same thing?
11:16:38FromDiscord<Yardanico> result is preferred
11:17:12FromDiscord<Yardanico> and about "return vs result" performance - compiler might be able to do more analysis if you use "result" instead of "return", but I don't think that it's a big difference
11:17:20FromDiscord<Yardanico> but anyway, "result" is idiomatic and preferred unless you need return for control flow :)
11:59:27*fredrikhr joined #nim
12:03:20*couven92 joined #nim
12:03:29*fredrikhr quit (Disconnected by services)
12:03:36*couven92 is now known as fredrikhr
12:13:54*PMunch joined #nim
12:15:54*fredrikhr quit (Read error: Connection reset by peer)
12:18:37*fredrikhr joined #nim
12:24:45FromDiscord<Zachary Carter> Why does the github update channel have a bunch of him forum updates in it? Seems broke
12:31:43*couven92 joined #nim
12:32:19*fredrikhr quit (Disconnected by services)
12:32:24*couven92 is now known as fredrikhr
12:36:14ForumUpdaterBotNew question by Suraj Bhattathiri: Implicit return value from a proc, see https://stackoverflow.com/questions/66854296/implicit-return-value-from-a-proc
12:45:19*rockcavera joined #nim
12:50:07FromDiscord<arnetheduck> In reply to @Yardanico "but anyway, "result" is": fwiw, we've completely stopped using `result` almost completely due to the high bug incidence in code using it (https://status-im.github.io/nim-style-guide/03_language.html#result-return) - using expressions instead guarantees that all code paths actually have a value - there's no performance difference
12:50:40FromDiscord<arnetheduck> (edit) "completely" => "\"
12:50:46FromDiscord<arnetheduck> (edit) removed "\"
12:51:19FromDiscord<arnetheduck> In reply to @Yardanico "and about "return vs": it does less analysis actually, as it stands - it's very easy to _not_ set it in some code paths
12:51:27FromDiscord<arnetheduck> (edit) "paths" => "paths, or set it twice"
13:11:01FromDiscord<Yardanico> In reply to @Zachary Carter "Why does the github": Because it's bridged to #nim-news
13:11:15FromDiscord<Yardanico> We had GitHub events from disbot there, but we don't have them now...
13:26:26FromDiscord<clyybber> In reply to @arnetheduck "it does less analysis": From "most structured" to "least structured" the order would go: expression/single return expression/single result assignment > result assignments > multiple returns
13:26:45FromDiscord<clyybber> So result is still somewhat preferable over multiple returns
13:26:55FromDiscord<clyybber> but of course it depends
13:27:33FromDiscord<arnetheduck> in our code `return` is generally used to avoid nesting - ie you check for a bunch of preconditions which you return early from - everything else, expressions
13:28:26FromDiscord<Rika> sometimes expressions are too limiting though?
13:29:08FromDiscord<arnetheduck> so `return` tends to lead to quite clear code - specially because indent is significant, auditing that lots of branches that all touch `result` do so correctly is nigh impossible - with expressions, the compiler does it for you
13:29:42FromDiscord<clyybber> yeah agreed; if possible expressions are the clearest IMO
13:30:05FromDiscord<arnetheduck> In reply to @Rika "sometimes expressions are too": this is a matter of style mostly - once you get used to it, you simply factor your code in a slightly different way
13:30:20FromDiscord<Rika> then the same argument can be applied for result
13:30:22FromDiscord<clyybber> you can also return in expressions; but that's somewhat cursed
13:30:36FromDiscord<clyybber> In reply to @Rika "then the same argument": yeah, it really depends on the context/situation
13:30:49FromDiscord<clyybber> just use whatever represents the intend/ thought process most clearly
13:30:55FromDiscord<clyybber> (edit) "intend/" => "intent/"
13:30:59FromDiscord<arnetheduck> In reply to @Rika "then the same argument": it has been our experience, that no, pragmatically, humans can't 🙂
13:30:59FromDiscord<Rika> which is why im not saying "expressions are bad" but "results are not as bad as shown"
13:31:14*astronavt quit (Remote host closed the connection)
13:31:34*astronavt joined #nim
13:33:17FromDiscord<arnetheduck> it's a bit like using a typed vs an untyped language - you can write correct and clear code with both, but expressions, just like type, allow you to structurally eliminate a particular class of bugs
13:33:54*astronavt quit (Remote host closed the connection)
13:34:02FromDiscord<konsumlamm> In reply to @Zachary Carter "you just import httpclient": except `jshttpclient` is it's own module that provides a synchronous and asynchronous version that afaik is not planned to be used in `httpclient` and `asynchttpclient` respectively
13:34:15FromDiscord<arnetheduck> In reply to @Clyybber "you can also return": funny enough, `nim-result` relies on this quite heavily behind the scenes 🙂
13:34:16*astronavt joined #nim
13:34:23FromDiscord<clyybber> yeah I know :D
13:34:48FromDiscord<arnetheduck> I would even go as far as saying that it was key to getting acceptable ergonomics
13:34:58FromDiscord<clyybber> one thing that's been on my todo list is to ensure that non-linear control flow breaks to a safe point
13:36:15FromDiscord<clyybber> sent a code paste, see https://play.nim-lang.org/#ix=2UsH
13:36:39FromDiscord<clyybber> and the break/return/noreturn inside the expression is only allowed when it also exits the declaration scope of `a`
13:37:33FromDiscord<arnetheduck> oh, that's nasty.. what happens now, default init?
13:37:50*astronavt quit (Remote host closed the connection)
13:37:54FromDiscord<clyybber> yeah I think so
13:38:03krux02@clyybber: what is the issue with the code you pasted?
13:38:16FromDiscord<clyybber> In reply to @krux02 "<@107882072974065664>: what is the": it breaks the semantics of let
13:38:18FromDiscord<Rika> krux: what does a get set to?
13:38:28krux02I see
13:38:34*astronavt joined #nim
13:39:26FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2UsI
13:40:49FromDiscord<Zachary Carter> In reply to @konsumlamm "except `jshttpclient` is it's": ah, thanks for the explanation 🙂
13:41:20FromDiscord<konsumlamm> In reply to @Zachary Carter "ah, thanks for the": (note the "afaik", i'm not 100% sure)
13:44:04krux02@clüübber: Any progress on my tuple expression PR?
13:44:47krux02@clyybber: sorry for mistyping your name
13:45:08FromDiscord<clyybber> haha np
13:45:51FromDiscord<clyybber> I think it's basically ready, I'll take a look today
13:50:13krux02thank you
14:02:31ForumUpdaterBotNew question by Joshua Cohen: My code is producing an error when run asynchronously but it works synchronously, see https://stackoverflow.com/questions/66855551/my-code-is-producing-an-error-when-run-asynchronously-but-it-works-synchronously
14:12:39*waleee-cl joined #nim
14:39:19*shmorgle joined #nim
14:42:48FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=2UsZ
14:43:22FromDiscord<Rika> `proc func(c: ptr char, s: size_t)` i think?
14:43:56FromDiscord<Rika> depends on what the char pointer represents
14:44:04FromDiscord<Rika> array? var param? etc
14:45:15FromDiscord<jtiai> it's a pointer to a single character.
14:45:37FromDiscord<Rika> and nothing else? then as i wrote
14:46:10FromDiscord<Rika> if you want to call from c, dont forget to use {.exportc: "exported_name".}
14:46:33FromDiscord<Rika> In reply to @Rika "`proc func(c: ptr char,": `size_t` -> `csize_t`
14:46:34FromDiscord<Rika> sorry
14:46:56FromDiscord<Rika> also `char` -> `cchar`, sorry x2
14:47:10FromDiscord<jtiai> and then how to convert that to nim char? since getting type mismatch for `proc foo(c: char)`....
14:47:39FromDiscord<Rika> use ptr char, then dereference with `[]`; `let c: char = c[]`
14:47:45FromDiscord<konsumlamm> a pointer to a char is not a char
14:50:52FromDiscord<Yardanico> Use cstring
14:51:44FromDiscord<Rika> In reply to @jtiai "it's a pointer to": @ Yardanico
14:52:05FromDiscord<Rika> its not an array
14:52:26FromDiscord<Yardanico> that's rare :) then yeah either cstring or ptr chat
14:52:29FromDiscord<Yardanico> chat
14:52:31FromDiscord<Yardanico> Aaaa
14:52:54FromDiscord<Yardanico> cstring with a single element is the same as pointer to a single character so you could use any of those
14:53:14FromDiscord<Yardanico> well, almost, there's also a null terminator
14:54:00FromDiscord<Rika> in this case there probably is no terminator
14:54:02FromDiscord<Solitude> In reply to @Yardanico "cstring with a single": why use precise types when cstring kinda fits :)))))))))
14:54:06FromDiscord<Rika> therefore dont use cstring
14:54:12FromDiscord<Yardanico> In reply to @Solitude "why use precise types": :)))
14:54:25FromDiscord<Yardanico> but now I wonder what that C function does
15:14:48*fredrikhr quit (Quit: Disconnecting)
15:55:46*D__ is now known as D_
15:59:40*vicfred joined #nim
16:00:09*nxnl[m] quit (Quit: Idle for 30+ days)
16:04:07*a_chou joined #nim
16:19:59*a_chou quit (Quit: a_chou)
16:35:09FromDiscord<lantos> hmmm, cant import sdl2 when I installed it on a fresh computer↵anyone else found this?
16:36:03ForumUpdaterBotNew Nimble package! batchsend - Nim / Python library to feed HTTP server quickly with custom messages, see https://github.com/marcomq/batchsend
16:48:35FromDiscord<zetashift> In reply to @lantos "hmmm, cant import sdl2": Did you install it? What is the exact error you get when you try to compile?
16:49:16FromDiscord<lantos> nimble install sdl2_nim↵^ works ↵but ``cannot open file: sdl2``
16:49:39FromDiscord<Goel> You need to install the dependencies of sdl2, not just the sdl2 bindings
16:49:59FromDiscord<lantos> yep apt install libsdl2-dev
16:51:52FromDiscord<Goel> Probably they are not set correctly in your PATH then
16:54:29FromDiscord<zetashift> did you import it using `import sdl2/sdl` ?
16:55:19FromDiscord<lantos> In reply to @zetashift "did you import it": works but sdl2/audio fails |:
16:57:14FromDiscord<Yardanico> @Goel if that was the case the error would've been different
16:57:48FromDiscord<Yardanico> In reply to @lantos "nimble install sdl2_nim ^": There's no such thing as sdl2 audio
16:57:55FromDiscord<Yardanico> You probably want sdl2/mixer
16:58:03FromDiscord<Yardanico> sdl2/sdl_mixer
16:58:10FromDiscord<Yardanico> https://github.com/Vladar4/sdl2_nim/blob/master/examples/ex401_mixer.nim
16:58:23FromDiscord<zetashift> it might be
16:58:27FromDiscord<lantos> 👁️ 👄 👁️
16:58:28FromDiscord<lantos> https://github.com/Vladar4/sdl2_nim/tree/master/sdl2/private
16:58:30FromDiscord<zetashift> sdl2/sdl/audio
16:58:40FromDiscord<zetashift> import sdl2/sdl
16:58:43FromDiscord<Yardanico> @lantos "private"
16:58:49FromDiscord<Yardanico> why would you want to import private modules
16:58:51FromDiscord<zetashift> https://github.com/Vladar4/sdl2_nim/blob/master/sdl2/sdl.nim#L7
16:58:57FromDiscord<Yardanico> exactly
16:59:11FromDiscord<lantos> 👁️ 👄 👁️ < me dumb emoji
16:59:11FromDiscord<zetashift> it exports it, the docs mention it audio too, I'm not sure why it can't find it
16:59:52FromDiscord<zetashift> Is it working?
17:01:17FromDiscord<lantos> Hmmm, I think It's the sdl2 module I'm importing
17:01:52FromDiscord<lantos> if I nimble install sdl2 sdl2_nim↵^ could be causing conflicts?
17:02:08*clyybber joined #nim
17:02:34FromDiscord<Yardanico> yes exactly
17:04:22FromDiscord<lantos> yeah wiping the pkg dir and ran nimble install↵I just assumed the .nimble files would let you specify the exact package
17:05:17FromDiscord<Yardanico> yes
17:05:28FromDiscord<Yardanico> but then you also need to build/run your app with `nimble` instead of `nim`
17:10:51FromGitter<Clyybber> @HJarausch Hey, can you please test https://github.com/nim-lang/Nim/pull/17574 ?
17:11:53*Trustable joined #nim
17:13:17*Trustable quit (Client Quit)
17:22:15*haxscramper joined #nim
17:22:19*astronavt quit (Remote host closed the connection)
17:22:43*astronavt joined #nim
17:25:39*Jesin quit (Quit: Leaving)
17:28:19FromDiscord<jtiai> Is there way to generate just header file from nim?
17:30:18FromDiscord<jtiai> Like now I do `nim c -d:release --header:stuff.h stuff.nim` but it also compiles it I would like to avoid that if possible.
17:31:15FromDiscord<Solitude> `-c` maybe
17:31:37leorizenote that --header: is completely unsupported afaik
17:36:53FromDiscord<jtiai> If it's unsupported how calling nim from C is supposed to work then? Because that's how it is done in backend integration docs...
17:37:30leorizeusually you'd write your own prototype
17:38:00leorizewe generally avoid using nim's header because they contains a ton of nim's C macros
17:38:57leorizebut if it's in the docs then I guess it's fine to use now
17:39:11FromDiscord<mratsim> it has always been in the doc
17:39:18leorizethough I'm slightly wary since `nim --fullhelp` doesn't list it
17:39:21FromDiscord<mratsim> but I don't think there is a flag to generate just the header
17:39:36FromDiscord<mratsim> I've seen it in the doc since I started with Nim
17:40:25FromDiscord<jtiai> sent a code paste, see https://play.nim-lang.org/#ix=2Uu2
17:41:23leorizeit means your C compiler disagrees with Nim about int size
17:41:53FromDiscord<Yardanico> @jtiai that error will occur if you're telling nim that you're compiling for 64-bits but the C compiler compiles for 32-bits
17:41:55FromDiscord<Yardanico> and vice-versa
17:42:39FromDiscord<jtiai> That is true. Wrong gcc...
17:45:23FromDiscord<jtiai> WOO! I have my own operating system kernel with libc!
17:47:51FromDiscord<jtiai> Hmm, apparently few functions before `echo` works...
17:51:15FromDiscord<zetashift> Very nice @jtiai !!
17:52:18*tane joined #nim
17:52:23*vicfred quit (Quit: Leaving)
17:55:57*clyybber quit (Remote host closed the connection)
17:57:35FromDiscord<fwsgonzo> so, let's say I wanted to be able to support Nim backtraces
17:57:40FromDiscord<fwsgonzo> is it enough to support sigaction?
17:59:03*lritter quit (Quit: Leaving)
18:01:46PMunchStreaming some more keyboard firmware development in about 5 minutes :)
18:02:40*vicfred joined #nim
18:03:44FromDiscord<fwsgonzo> blink those lights!
18:05:57leorize@fwsgonzo you need to implement the `signal()` API for now...
18:07:33FromDiscord<fwsgonzo> alright, thanks
18:08:24leorizesystem/excpt.nim has the code used for backtrace on signal
18:08:37leorizeyou can modify that to hook into your own signaling system if needed
18:09:05PMunchStream is live: https://www.twitch.tv/pmunche
18:20:23*tiorock joined #nim
18:20:23*tiorock quit (Changing host)
18:20:23*tiorock joined #nim
18:20:23*rockcavera quit (Killed (barjavel.freenode.net (Nickname regained by services)))
18:20:23*tiorock is now known as rockcavera
18:35:36*rockcavera is now known as Guest48727
18:35:36*tiorock joined #nim
18:35:37*Guest48727 quit (Killed (rothfuss.freenode.net (Nickname regained by services)))
18:35:37*tiorock is now known as rockcavera
18:56:55FromDiscord<will> how can I find if a file exists?
18:57:03FromDiscord<Yardanico> fileExists
18:57:10FromDiscord<Yardanico> https://nim-lang.org/docs/os.html#fileExists%2Cstring
18:57:11FromDiscord<Yardanico> quite literally
18:57:39FromDiscord<will> hmm that wasnt showing up before, thanks for the help
19:12:22*rockcavera quit (Remote host closed the connection)
19:13:37*rockcavera joined #nim
19:16:01ForumUpdaterBotNew thread by Matthesoundman: Inline print a sequence or strip '"', see https://forum.nim-lang.org/t/7719
19:23:55*rockcavera quit (Remote host closed the connection)
19:30:21*rockcavera joined #nim
19:36:28*cornfeedhobo joined #nim
19:39:59FromDiscord<fwsgonzo> whats the simplest way to crash nim?
19:40:05FromDiscord<fwsgonzo> (edit) "whats the simplest way to crash ... nim?" added "in"
19:40:13FromDiscord<fwsgonzo> something like idiv 0
19:40:20FromDiscord<fwsgonzo> (edit) "something like idiv 0 ... " added "or asm ud2"
19:41:59*cornfeedhobo left #nim ("when i leave, come together like butt cheeks")
19:45:03*clyybber joined #nim
19:45:26FromDiscord<Hi02Hi> https://nim-lang.org/docs/system.html#quit%2Cint is one option
19:56:57FromDiscord<dom96> doAssert false
19:57:33FromDiscord<fwsgonzo> thanks
19:57:56stefantalpalaruIs there any tool to generate Nim call graphs?
20:07:53FromDiscord<haxscramper> No, there is no such tool, though I started working on graphviz callgraph dump and dropped midway because naive implementation generated very large graphs and I didn't have time to properly cut out unnecessary parts
20:08:06FromDiscord<haxscramper> You might try using sourcetrail integration to get something close though https://media.discordapp.net/attachments/371759389889003532/826185969740546068/unknown.png
20:08:24FromDiscord<haxscramper> https://github.com/haxscramper/haxdoc
20:09:26FromDiscord<haxscramper> Not really stable, but it works for nim compiler codebase at least.
20:24:06*narimiran quit (Ping timeout: 240 seconds)
20:31:33*evilkhaoskat joined #nim
20:31:53*evilkhaoskat quit (Client Quit)
20:41:32*kenran joined #nim
21:05:25PMunchMan, this really caused trouble for me during the stream.. https://github.com/nim-lang/Nim/issues/17497
21:05:47PMunchHad to patch the compiler with a small revert to the 1.4.0 behaviour in order to make progress
21:10:49*haxscramper quit (Remote host closed the connection)
21:23:46*kenran quit (Quit: leaving)
21:38:28FromDiscord<fwsgonzo> you cant do that, many architectures rely on execute-only memory to protect against certain types of attacks
21:39:02FromDiscord<fwsgonzo> on architectures where XO is supported .text will not be readable
21:39:58FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=2Uve
21:42:38PMunchfwsgonzo, wait was that comment for me?
21:43:08FromDiscord<fwsgonzo> just commenting on putting data in .text
21:43:23PMunchIt's pretty common on AVR
21:44:01PMunchI've done it for my Arduboy stuff
21:44:06PMunchAnd now for this keyboard stuff
21:44:12PMunchBut this bug absolutely wrecks it
21:44:21*tane quit (Quit: Leaving)
21:44:34PMunchAnd it would cause a lot of extra copying on normal code as well
21:50:35FromDiscord<fwsgonzo> ah ok
21:51:45FromDiscord<fwsgonzo> alright, so for my backtrace question: I got better results when `--debugger:native` was enabled
22:18:47*Vladar quit (Quit: Leaving)
22:20:26*vicfred quit (Quit: Leaving)
22:22:58*Q-Master quit (Ping timeout: 252 seconds)
22:23:05*Q-Master joined #nim
22:25:51FromDiscord<fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=2Uvn
22:58:55PMunchHmm, the built in set type needs exceptions to work. That is a slight bummer for AVR code
23:01:28FromDiscord<clyybber> why does it need exceptions?
23:16:35PMunchSeems to mostly be memory setting/clearing
23:32:41*vicfred joined #nim
23:59:48*krux02 quit (Remote host closed the connection)