<< 26-12-2024 >>

01:45:15*xutaxkamay_ joined #nim
01:46:51*xutaxkamay quit (Ping timeout: 272 seconds)
01:47:35*xutaxkamay_ quit (Read error: Connection reset by peer)
01:47:41*xutaxkamay joined #nim
02:06:06*xet7 quit (Remote host closed the connection)
02:07:39*xet7 joined #nim
02:14:10*xet7 quit (Remote host closed the connection)
02:15:34*xet7 joined #nim
02:21:15*xet7 quit (Remote host closed the connection)
02:22:47*xet7 joined #nim
04:04:22*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
04:26:42*SchweinDeBurg joined #nim
07:03:51FromDiscord<albassort> is there a function in the stdlib to round a float to the nth place
07:05:25FromDiscord<intellij_gamer> In reply to @albassort "is there a function": https://nim-lang.org/docs/math.html#round%2CT%2Cint↵This? Or more for string formatting?
07:05:53FromDiscord<intellij_gamer> (edit) "Or more" => "↵Or if you want it" | "formatting?" => "formatting https://nim-lang.org/docs/strutils.html#formatFloat%2Cfloat%2CFloatFormatMode%2Crange%5B%5D%2Cchar"
07:06:07FromDiscord<albassort> no i mean like
07:06:14FromDiscord<albassort> 0.0000140490584985↵round to ↵0.00001
07:15:41FromDiscord<Elegantbeef> That's what format float does
07:17:04FromDiscord<Elegantbeef> Otherwise you want `round(a / nearest) nearest`
07:17:40FromDiscord<Elegantbeef> If you want logical rounding
07:37:48*coldfeet joined #nim
07:56:52*beholders_eye joined #nim
08:07:12*acidsys quit (Ping timeout: 246 seconds)
08:30:47*acidsys joined #nim
08:47:17*beholders_eye quit (Ping timeout: 248 seconds)
11:18:40FromDiscord<nocturn9x> Anyone know why hottie would crash like this? `Failed to parse objdump line: 220c3b0: f3 0f 1e fa endbr64`
11:20:43FromDiscord<nocturn9x> I'm trying to profile my program. Also, I can't seem to be able to get line numbers to be shown in `perf`, which I managed to do before. Passing `--debugger:native` and `-fno-omit-frame-pointer -g3`
11:20:49FromDiscord<nocturn9x> (edit) "I'm trying to profile my program. Also, I can't seem to be able to get line numbers to be shown in `perf`, which I managed to do before. Passing `--debugger:native` and `-fno-omit-frame-pointer -g3` ... " added "to clang"
11:20:55FromDiscord<nocturn9x> (edit) "I'm trying to profile my program. Also, I can't seem to be able to get line numbers to be shown in `perf`, which I managed to do before. Passing `--debugger:native` ... and" added "to nim "
11:21:03FromDiscord<nocturn9x> using `-d:danger`
11:23:50FromDiscord<nocturn9x> I've tried `--linetrace:on` as well, but I think that only affects exception handling (which I don't do, since I have `--panics:on`)
12:17:25FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=hjvvlazn
12:17:50*coldfeet quit (Quit: Lost terminal)
12:19:52*beholders_eye joined #nim
12:57:24FromDiscord<k0ts> : instead of =?
14:20:58FromDiscord<thepotatochronicler> walkDirRec is broken at compile-time when cross-compiling from Linux to Windows, because it converts paths to windows paths 🥴
14:21:17FromDiscord<thepotatochronicler> (edit) "walkDirRec is broken at compile-time when cross-compiling from Linux to Windows, because it ... converts" added "linux"
14:21:29FromDiscord<thepotatochronicler> (edit) "walkDirRec is broken at compile-time when cross-compiling from Linux to Windows, because it ... linux" added "converts" | removed "converts"
15:57:42*ntat joined #nim
16:05:29*rockcavera quit (Read error: Connection reset by peer)
16:06:14*rockcavera joined #nim
16:06:14*rockcavera quit (Changing host)
16:06:14*rockcavera joined #nim
19:46:47*beholders_eye quit (Read error: Connection reset by peer)
19:52:23*beholders_eye joined #nim
20:13:37*ntat quit (Read error: Connection reset by peer)
20:13:52*ntat joined #nim
20:26:14*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
20:26:24*SchweinDeBurg joined #nim
20:38:41*beholders_eye quit (Ping timeout: 248 seconds)
20:43:01*beholders_eye joined #nim
21:02:17*coldfeet joined #nim
21:35:28*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
21:43:15*ntat quit (Quit: Leaving)
21:49:01*SchweinDeBurg joined #nim
22:09:23*coldfeet quit (Quit: Lost terminal)
22:14:19FromDiscord<albassort> is there a less intesnive try catch method
22:14:39FromDiscord<albassort> i would like to catch exceptions without the overhead
22:15:57FromDiscord<leorize> it's already the least intensive method
22:16:19FromDiscord<leorize> current exceptions are similar to result types internally
22:16:35FromDiscord<leorize> similar to errno, I suppose
22:17:05FromDiscord<albassort> lol so wrapping try except with a result is actually pretty slow
22:17:28FromDiscord<aintea> What is the definition of overhead and how can languages achieve 0 overhead ?
22:17:39FromDiscord<albassort> complicated
22:18:05FromDiscord<aintea> In terms of writing or compiling/executing
22:18:21FromDiscord<aintea> And compared to what
22:19:10FromDiscord<albassort> the code you write in a non-isa language has a certain amount of overhead, in the output. In this case, try: catcH: at one point, internally is considered to be high overhead because of the constructs required to implement it
22:19:34FromDiscord<albassort> if leorize is to be believed, which, he is the most experienced person with the nim compiler online atm, this is not the case anymore /never was the case
22:19:54FromDiscord<albassort> the only way to be have less overhead to is to write in assembly / c or, know the compiler well.
22:21:51FromDiscord<aintea> Thanks for this explanation
22:22:45FromDiscord<aintea> From what I understand, 0 overhead means no more overhead than if I wrote it in pure C/assembly
22:24:53FromDiscord<System64 ~ Flandre Scarlet> My app starts to look like something! https://media.discordapp.net/attachments/371759389889003532/1321966995893387344/image.png?ex=676f2934&is=676dd7b4&hm=c2d1cb3a55b4b559303bce42b228d04d687083c883006005e9883c1d7a98e4f5&
22:25:28FromDiscord<albassort> In reply to @aintea "From what I understand,": Yes, 0 overhead is impossible
22:25:39FromDiscord<albassort> you want less overhead
22:26:18FromDiscord<angelsdust> In reply to @albassort "lol so wrapping try": how slow?
22:27:00FromDiscord<albassort> hes saying they are comparable, so it would be having 2 try catches
22:27:06FromDiscord<albassort> probably not meaningfully slower
22:30:05FromDiscord<ElegantBeef> Assuming the bridge does not catch up https://media.discordapp.net/attachments/371759389889003532/1321968304818229279/image.png?ex=676f2a6c&is=676dd8ec&hm=123f4217ed28a100dbe640018a8c0a8333a36d65f6f861c08121d91b0fe280c7&
22:30:34FromDiscord<Elegantbeef> Oh damn leo the bridge dropped about 30 messages
22:30:48FromDiscord<Elegantbeef> Ping
22:31:47FromDiscord<albassort> does getCurrentException get the exception with its message?
22:32:02FromDiscord<Elegantbeef> Try except in Nim is just an if check with a goto (using arc/orc) so it's actually really cheap for the happy path. So wrapping a result with an exception adds another if check
22:32:11FromDiscord<Elegantbeef> It gets the exception so of course it doess
22:32:20FromDiscord<albassort> neato
22:32:54FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=CfpOgidB
22:33:32FromDiscord<Elegantbeef> why
22:33:41FromDiscord<Elegantbeef> `except DbEffect as e`
22:33:52FromDiscord<albassort> i forgot that syntax existed
22:33:54FromDiscord<albassort> hard
22:34:06FromDiscord<Elegantbeef> Pretend `getCurrentException` and it's message counterpart exist
22:34:16FromDiscord<Elegantbeef> It's ugly code and only should be used in some cases
22:34:33FromDiscord<albassort> isn't this whole code b lock ugly
22:34:48FromDiscord<Elegantbeef> Well yea it's converting an exception to a result
22:35:33FromDiscord<albassort> i like the result
22:35:47FromDiscord<albassort> makes the error handling easier
22:35:56FromDiscord<Elegantbeef> I don't see how, but you do you