<< 28-02-2024 >>

00:16:51*xet7 quit (Ping timeout: 272 seconds)
00:52:33*arkanoid joined #nim
00:56:07arkanoidmh, I'm using "chronos" lib in my project. It compiles and works correctly, but nimsuggest/nimlangserver keeps complaining that "cannot evaluate at compile time: result" in "error "Error", host = server.host, error = result.error". How can I convince nimsuggest that that line is ok?
00:56:25arkanoidsorry, not chronos, but chronicles
00:56:33arkanoid(the logging one)
00:56:58FromDiscord<Robyn [She/Her]> In reply to @arkanoid "mh, I'm using "chronos"": Restart VSC and kill any Nimsuggest processed
00:57:39FromDiscord<Robyn [She/Her]> Unfortunately it's a known bug, should probably report it in case though
00:58:11arkanoidno, it is repeatable. I keep receiving it even after nimlangserver/nimsuggest/vscode restart
01:03:28FromDiscord<Robyn [She/Her]> Hm... Odd then
01:06:57*SchweinD1 quit (Quit: WeeChat 4.3.0-dev)
01:07:23*SchweinDeBurg joined #nim
01:23:25FromDiscord<awesome3434> sent a code paste, see https://play.nim-lang.org/#pasty=ABOCaPrNkvPJ
01:24:16FromDiscord<awesome3434> In reply to @Elegantbeef "Probably best to do": I'm not sure about this, but I think it will lead to the same issue?
01:24:49FromDiscord<Elegantbeef> I don't even know what you're trying to solve
01:25:03FromDiscord<Elegantbeef> I don't use C++ so don't know why it requires an attribute for interop
01:26:14FromDiscord<Elegantbeef> Though with the closure macro you could use `emit` or `codegendecl` to emit your own type
01:28:31FromDiscord<awesome3434> In reply to @Elegantbeef "I don't use C++": Basically I can't put any object that doesn't have the attribute within the function that requires it (which is required for any object that isn't primitive)
01:29:24FromDiscord<Elegantbeef> And you cannot just wrap a Nim object with a C++ object?
01:29:30FromDiscord<awesome3434> Also it's not really much of a library but a custom compiler with own attributes
01:30:05FromDiscord<awesome3434> In reply to @Elegantbeef "And you cannot just": But Nim will still put it's own object within the C++ code, right?
01:30:09FromDiscord<Elegantbeef> Sounds like a CGPU compiler ๐Ÿ˜„
01:30:12FromDiscord<Elegantbeef> Right
01:30:33FromDiscord<awesome3434> In reply to @Elegantbeef "Sounds like a CGPU": To be more precise Cheerp
01:30:38FromDiscord<Elegantbeef> You cannot control the Nim code generation for everything that requires forking the compiler
01:31:20FromDiscord<Elegantbeef> Why do you even need to send closures across a bridge
01:31:34FromDiscord<Elegantbeef> Atleast I assume these attributes generate interop code
01:33:05FromDiscord<Elegantbeef> If this is for JS interop you should just send all your ref objects as `ptr object` and not send closures to the JS side
01:34:49arkanoidis switch("stackTrace", "on") compatible with release mode?
01:35:15arkanoidI'm trying to use https://nim-lang.org/docs/estp.html but all I get is "Entry: 1/1 Calls: 3544/3544 = 100.00% [sum: 3544; 3544/3544 = 100.00%]"
01:36:04FromDiscord<Elegantbeef> Using nimprof is sorta meme as a lot of software ๐Ÿ˜„
01:36:30arkanoidmh, ok, I'll switch to something else then
01:36:39FromDiscord<Elegantbeef> I suggest using hotspot
01:36:53FromDiscord<Elegantbeef> It's a nice gui program built ontop of linux's perf
01:37:27FromDiscord<Elegantbeef> But to use the nim profiler I believe you need `stackTrace` `lineTrace` and `profiler`
01:38:22arkanoidI'm compiling with switch("profiler", "on") and switch("stackTrace", "on")
01:38:47arkanoidthis page https://nim-lang.org/docs/estp.html does not reference lineTrace
01:39:24FromDiscord<Elegantbeef> Yea I played with the profiler briefly to generate a flamegraph
01:39:28FromDiscord<Elegantbeef> So I think you need all three
01:40:44FromDiscord<awesome3434> sent a code paste, see https://play.nim-lang.org/#pasty=FvAHfvPrYbMx
01:40:56arkanoidwell, I'm installing hotspot, now I need to recap how to run perf
01:41:09FromDiscord<Elegantbeef> hotspot runs perf ๐Ÿ˜›
01:41:43FromDiscord<.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=PuhbmdveJoti
01:42:47arkanoidcan't run perf as ubuntu makes a mess with kernels
01:43:25FromDiscord<awesome3434> In reply to @Elegantbeef "If this is for": I'm not really sure what you meant by that
01:44:14arkanoidok, recording
01:44:45FromDiscord<Elegantbeef> Why do you need to have the attribute if you don't generate JS code?
01:44:47arkanoidbut I guess I sould compile release but with debug symbols
01:46:36FromDiscord<awesome3434> In reply to @Elegantbeef "Why do you need": Though I have to use DOM API later which makes it inevitable to have it
01:48:17FromDiscord<Elegantbeef> Don't call the dom API ๐Ÿ˜„
01:49:28FromDiscord<awesome3434> In reply to @Elegantbeef "Don't call the dom": Nice tip, thanks
01:49:39FromDiscord<Elegantbeef> Jokes aside we have nim -\> js
01:50:17FromDiscord<awesome3434> Although It doesn't seem to provide any WASM support
01:51:38FromDiscord<awesome3434> (which in my case both are needed)
01:52:09FromDiscord<Elegantbeef> So write frontend in Nim then call that from wasm
01:52:26FromDiscord<Elegantbeef> Maybe speak to @jmgomez though given his UE work he might help
02:02:04FromDiscord<awesome3434> In reply to @Elegantbeef "So write frontend in": Uhh, Cheerp handles everything on it's own, including bridging, so now it'd be quite a nonsense having set-up everything from the bottom in JS, I really thought it could be easily solved with a few lines of code considering Nim is quite a powerful language with lots of comp-time reflections
02:02:25FromDiscord<awesome3434> to set-up
02:06:34arkanoiddo you know how can I compile release but with debug symbols?
02:07:02FromDiscord<Elegantbeef> `--debugger:native`
02:07:27arkanoidthanks
02:12:53arkanoidmh, perf.data generated with --debugger:native is "not readable" according to hotspot
02:15:40arkanoidmy fault, it was a permission problem
02:23:57NimEventerNew thread by sls1005: What will happen if allocation fails?, see https://forum.nim-lang.org/t/11106
02:37:57*Jjp137 quit (Ping timeout: 255 seconds)
02:42:31NimEventerNew Nimble package! rmq_statsd - Pure nim rabbitmq to statsd metrics pusher, see https://github.com/Q-Master/rmq-statsd.nim
02:48:13*Jjp137 joined #nim
02:57:12*jmdaemon joined #nim
04:14:09FromDiscord<dysrakescence> sent a code paste, see https://play.nim-lang.org/#pasty=bMUtswDhCRxt
04:14:31FromDiscord<dysrakescence> right now the content that gets scraped looks like this https://media.discordapp.net/attachments/371759389889003532/1212251461954576384/image.png?ex=65f12827&is=65deb327&hm=fcf6e9c93362953336caaf59421a28950c6d97ef7acc9e0a45b3f8b9010ca827&
04:14:54FromDiscord<leorize> looks like that site requires JS to render
04:15:03FromDiscord<leorize> which means you can't scrape using a simple http client
04:15:55FromDiscord<dysrakescence> I'm new to web scraping but I heard that I would probably need something like a browser header or something?
04:16:10FromDiscord<leorize> for this you don't need headers
04:16:13FromDiscord<leorize> you need a browser
04:17:38FromDiscord<dysrakescence> is there a std library that I can use to scrape the site?
04:17:44FromDiscord<leorize> no
04:18:30FromDiscord<leorize> this is not really a website, it's an application
04:18:58FromDiscord<leorize> there are two paths to this\: either you figure out their API endpoints and use it to obtain the raw data that they use to render their pages
04:21:21FromDiscord<leorize> or just use a headless browser to render the page then download the result
04:31:47FromDiscord<saint._._.> In reply to @dysrakescence "is there a std": use playwright
04:32:13FromDiscord<saint._._.> Oh also you could try readability.js
04:32:31FromDiscord<saint._._.> https://github.com/mozilla/readability
04:32:33FromDiscord<saint._._.> With node
05:02:52NimEventerNew thread by enaaab460: Sending to a channel before opening it doesn't create an error, see https://forum.nim-lang.org/t/11107
05:16:14*azimut quit (Ping timeout: 260 seconds)
05:27:12FromDiscord<dysrakescence> In reply to @leorize "there are two paths": I ended up finding all the information that I needed through browsing the files that the website was hosting and got the json content :)
05:36:45*ntat joined #nim
05:47:35*rockcavera quit (Remote host closed the connection)
06:01:33FromDiscord<Phil (he/him)> Imagine going to sleep and thus doing an avatar - when the world needed him he was nowhere to be found
06:19:22*advesperacit joined #nim
07:09:03*disso-peach joined #nim
07:09:23*m5zs7k quit (Ping timeout: 256 seconds)
07:22:17*m5zs7k joined #nim
07:24:43NimEventerNew thread by dwhall256: ANN: minisvd2nim generates a Nim lib to access ARM CortexM device and registers, see https://forum.nim-lang.org/t/11113
07:27:50*disso-peach quit (Quit: Leaving)
08:08:36*ntat quit (Quit: Leaving)
08:30:56FromDiscord<fosster> folks, is there someone familiar with bittorrent protocol?
08:33:02FromDiscord<fosster> is it the only way btw? because I've seen a kind of tutorial online about it, but nothing elseโ†ต(@Robyn [She/Her])
08:33:34FromDiscord<fosster> I know that there is someone working with wasm backend, something called nimwasm or something
08:33:48FromDiscord<fosster> I know that there is someone building a wasm backend, something called nimwasm or something
08:36:48FromDiscord<fosster> I remember a few years ago when wasm was the new hot thing, people were like "finally JS is dead, get ready for the revolution"...
08:45:57FromDiscord<whisperecean> Is Prologue dead?
10:03:49*ntat joined #nim
10:39:20FromDiscord<nnsee> "dead"?
10:40:31*jmdaemon quit (Ping timeout: 268 seconds)
11:15:31*ntat quit (Quit: Leaving)
11:35:27FromDiscord<whisperecean> I dont see any more commits and there were some issues with it crashing pre nim 2.0
11:59:05*krux02 quit (Quit: Leaving)
12:29:48FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=ZhABOUJlWsMc
12:34:28FromDiscord<odexine> yes
12:37:00*ntat joined #nim
12:42:04FromDiscord<im__cynical> Any way I can make the executable smaller than with this? I dont care about preformance loss.โ†ตnim c -d:danger -d:release -d:strip -d:mingw --opt:size --passc=-flto --passl:-s main.nim
12:42:35FromDiscord<ezquerra> sent a code paste, see https://play.nim-lang.org/#pasty=YRSeYZLUXvYW
12:44:10FromDiscord<ezquerra> In reply to @im__cynical "Any way I can": Not an answer to your question, but I believe that when you use `-d:danger` you don't need `-d:release`
12:45:23FromDiscord<im__cynical> In reply to @ezquerra "Not an answer to": Yes, it doenst nag about needing release for better preformance when I use danger
12:55:43FromDiscord<odexine> In reply to @ezquerra "Umm, when I do": seems like in your case specifically it isnt allowed, i was thinking about another case
12:55:57*azimut joined #nim
12:57:21FromDiscord<odexine> well in this case id say use overloading instead...
12:59:00FromDiscord<ezquerra> OK, thank you
13:51:13*rockcavera joined #nim
14:11:45FromDiscord<niggergooner69> hello
14:11:46FromDiscord<niggergooner69> does anyone want to try my library
14:11:49FromDiscord<niggergooner69> its called fuckNiggers
14:11:57FromDiscord<niggergooner69> does anyone want to try my fuckNiggers library for nim
14:12:44*FromDiscord quit (Remote host closed the connection)
14:13:22*FromDiscord joined #nim
14:39:28NimEventerNew thread by MauroG: Using NiGUI, open a second window from main window, see https://forum.nim-lang.org/t/11118
15:15:51*ntat quit (Remote host closed the connection)
15:19:01*ntat joined #nim
17:01:03*advesperacit quit (Ping timeout: 255 seconds)