<< 20-02-2025 >>

00:08:12FromDiscord<odexine> What the heck you’re still at it
00:08:22FromDiscord<odexine> I went to sleep and all
00:29:18FromDiscord<krissh.wtf> sent a code paste, see https://play.nim-lang.org/#pasty=ySIFJQBW
01:01:39*tiorock joined #nim
01:01:39*rockcavera is now known as Guest1493
01:01:39*Guest1493 quit (Killed (copper.libera.chat (Nickname regained by services)))
01:01:39*tiorock is now known as rockcavera
01:03:45*tiorock joined #nim
01:03:45*rockcavera is now known as Guest6839
01:03:45*Guest6839 quit (Killed (lithium.libera.chat (Nickname regained by services)))
01:03:45*tiorock is now known as rockcavera
01:04:44*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
01:05:09*SchweinDeBurg joined #nim
01:15:46*alexdaguy joined #nim
01:42:39*beholders_eye quit (Ping timeout: 260 seconds)
01:45:07*rockcavera quit (Remote host closed the connection)
04:44:30FromDiscord<explosiveend> sent a code paste, see https://play.nim-lang.org/#pasty=llYDHSvh
04:44:51FromDiscord<explosiveend> anybody know why this doesn't work? specifically `except parseInt`
04:45:07FromDiscord<explosiveend> i want to use the `parseInt` from `std/parseutils`, not `strutils`
04:45:24FromDiscord<explosiveend> https://media.discordapp.net/attachments/371759389889003532/1341994090543190100/image.png?ex=67b804e4&is=67b6b364&hm=cf60b1359aca685d202bc2c9d00d390b571c314e83cfa561a25bf75ffc739927&
05:01:09FromDiscord<lainlaylie> parseutils.parseInt needs a var int parameter
06:35:30FromDiscord<threefour> In reply to @glisteringlime "every other editor I've": Emacs works pretty good with nimlangserver in my experience, minus the fact that completions are like 7x slower than with any other LSP I use (Go, Python, Deno, Rust), which is a bummer. But it's still usable. I wouldn't say broken. I'm also on Nim 2.2.2 and whatever the latest nimlangserver is.
06:35:54FromDiscord<threefour> (edit) "7x" => "4x"
06:36:29FromDiscord<threefour> (edit) "Rust)," => "Rust, Zig, clangd),"
07:10:18FromDiscord<amadaluzia> Are there other Nim LSPs I could look at? The one i am using randomly stops giving hints
07:10:46FromDiscord<amadaluzia> Using Neovim with this config: https://codeberg.org/amadaluzia/painless-neovim
07:27:57FromDiscord<pmunch> In reply to @glisteringlime "yeah, but when you": Which editors is "most editors" I never have this issue
07:28:02FromDiscord<pmunch> (edit) "issue" => "issue?"
07:28:10FromDiscord<pmunch> (edit) "editors"" => "editors"?" | "issue?" => "issue"
07:29:28FromDiscord<pmunch> In reply to @amadaluzia "Using Neovim with this": There are two, NimLSP and nimlangserver. But they're both built on top of Nimsuggest, so not sure if switching would make a difference.
07:29:56FromDiscord<pmunch> Although if it randomly stops giving hints then that might be an issue with the LSP <-> nimsuggest bridge so switching might help
08:41:43FromDiscord<TӨMΛ ☠> Out of curiosity, is there any .xcf parser in Nim ecosystem? (.xcf is GIMP format)
08:43:18FromDiscord<pmunch> Don't think so
08:43:29FromDiscord<albassort> is there a cheaper way to "hydrate a webpage" when webscraping, without ressorting to selenium?
08:43:39FromDiscord<pmunch> Did a search in the directory but it turned up no matches
08:43:56FromDiscord<albassort> also hello pmuch 😊 ❤️
08:44:01FromDiscord<pmunch> @albassort, like run JS and stuff?
08:44:04FromDiscord<pmunch> Hello 🙂
08:44:05FromDiscord<albassort> yea
08:44:24FromDiscord<pmunch> Well to do it properly you basically need a browser
08:44:25FromDiscord<albassort> i suppose i could call their api but that would make me more vulnerable to being locked out
08:44:32FromDiscord<TӨMΛ ☠> Thank you PMunch. I checked through GitHub and it also yielded no results↵Looks like it ain't impossible I may make a parser then along with Krita one I wanted
08:44:42FromDiscord<pmunch> Not sure whether it'd be faster, but you could probably use Chrome Embedded Framework
08:44:44FromDiscord<TӨMΛ ☠> (edit) removed "a" | "parser ... then" added "for it"
08:44:54FromDiscord<albassort> thats just a huge dependency
08:44:57FromDiscord<albassort> and a ton of memory
08:45:17FromDiscord<pmunch> Selenium or CEF?
08:45:22FromDiscord<albassort> Selenium
08:45:25FromDiscord<albassort> idk bout CEF
08:45:29FromDiscord<albassort> i assume same
08:46:15FromDiscord<pmunch> You might be able to get away with a WebView in e.g. Gtk
08:46:31FromDiscord<pmunch> But it's still pulling in a bunch of web-tech stuff for obvious reasons
08:46:52FromDiscord<pmunch> Did static parameters in type definitions change in 2.2.2?
08:51:08FromDiscord<albassort> im going to try the api path but otherwise im embedding a selenium webscraper in my server
08:51:10FromDiscord<pmunch> Ah nvm, I was doing something silly
08:51:21FromDiscord<pmunch> In your server?
08:51:29FromDiscord<albassort> well, i could make it a seperate process
08:51:30FromDiscord<albassort> but yes
08:51:40FromDiscord<pmunch> Why would you need a webscraper in a server?
08:51:53FromDiscord<albassort> ...trust me, i need multiple
09:00:17FromDiscord<pmunch> But _in_ the server?
09:01:05FromDiscord<pmunch> Sounds a bit like driving around with a gas station in your car
10:07:38*beholders_eye joined #nim
12:01:00FromDiscord<krissh.wtf> In reply to @krissh.wtf "hello, does anyone know": can someone help me with this?
12:03:17FromDiscord<nnsee> In reply to @krissh.wtf "can someone help me": what is your issue exactly?
12:06:10FromDiscord<krissh.wtf> In reply to @nnsee "what is your issue": when parsing json, if the value is a url instead of https:// its https:\/\/
12:06:26FromDiscord<krissh.wtf> (edit) "https:\/\/" => "`https:\/\/`"
12:07:00FromDiscord<nnsee> can you post the raw json?
12:07:08FromDiscord<nnsee> ie before parsing it
12:13:02FromDiscord<krissh.wtf> sent a code paste, see https://play.nim-lang.org/#pasty=aHOSIeep
12:13:09FromDiscord<krissh.wtf> here is a part of it
12:15:33FromDiscord<nnsee> is this the raw json? as returned by the server?
12:17:42FromDiscord<zumi.dxy> <https://stackoverflow.com/a/1580682>↵↵I love Hyrum's Law https://media.discordapp.net/attachments/371759389889003532/1342107910267863040/Screenshot_20250220_191720_Opera.jpg?ex=67b86ee4&is=67b71d64&hm=d5f089c4fc3a8098d69a96766afffe1a6b069e3fdaa50f34e7ea9ebb652f16ab&
12:19:48FromDiscord<krissh.wtf> In reply to @nnsee "is this the raw": yep
12:20:18FromDiscord<krissh.wtf> same thing on curl https://media.discordapp.net/attachments/371759389889003532/1342108568824057994/image.png?ex=67b86f81&is=67b71e01&hm=29dbbfa1625a6687a67336adeb290a3d5b3f0d8816846ae1785efc0d4dd0c2cc&
12:21:57FromDiscord<krissh.wtf> In reply to @zumi.dxy "<https://stackoverflow.com/a/1580682> I love": oh god
12:25:02FromDiscord<nnsee> In reply to @krissh.wtf "same thing on curl": ok, but I just tested, and parseJson correctly removes the backslashes
12:26:17FromDiscord<nnsee> https://media.discordapp.net/attachments/371759389889003532/1342110073916489728/image.png?ex=67b870e8&is=67b71f68&hm=d67b37c08094db4ff67b59cc8fdce29bce4d3cd7fd28b1c63abc3801fafacee5&
12:33:48*ntat joined #nim
12:33:52strogon14Test, test, IRC-matrix bridging down again? Last msg I see there is from 01:38 CET.
12:34:36FromDiscord<spotlightkid> Test, test... will this be relayed to IRC?
12:34:59strogon14Seems to be working onyl one way.
12:37:47FromDiscord<Robyn [She/Her]> In reply to @spotlightkid "Test, test... will this": i can see this
12:38:07FromDiscord<Robyn [She/Her]> currently 12:38, your msg sent at 12:45
12:38:46FromDiscord<Robyn [She/Her]> 34
12:38:48FromDiscord<Robyn [She/Her]> not 45
12:42:31FromDiscord<krissh.wtf> sent a long message, see https://pasty.ee/CBlpxDvF
12:44:43strogon14Robyn, and before that? Are you on Matrix or Discord?
13:03:36*computerquip quit (Ping timeout: 244 seconds)
13:07:34*computerquip joined #nim
13:15:39FromDiscord<glisteringlime> In reply to @pmunch "Which editors is "most": VSCode, Zed, Pulsar, Sublime Text, etc.
13:21:45FromDiscord<pmunch> Sounds like a config issue then. VSCode is one of the most popular editors for Nim and I've never heard this critique before
13:22:12FromDiscord<pmunch> And pretty sure I didn't have issues like that in Sublime. However it's quite a while ago I used it.
13:24:50*ntat quit (Quit: Leaving)
14:34:50*alexdaguy quit (Quit: ded)
14:36:09*ntat joined #nim
15:18:10FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=yhaPistU
15:18:17FromDiscord<Robyn [She/Her]> Is `var` a no-op here?
15:20:06FromDiscord<Robyn [She/Her]> And is `GC_ref`/`GC_unref` discouraged when using Nim types with pointers even if the logic is completely for internal purposes? I don't want to make `A` a ref object or `parent` a `ref A` because it'd require copying the data, but the data needs to mutable and have access to the parent
15:22:38FromDiscord<Robyn [She/Her]> Wait `GC_ref` and `GC_unref` is specific to ref objects, ignore that
15:42:14FromDiscord<Robyn [She/Her]> https://hst.sh/upazetocuy.pl brrr
16:34:34*om3ga quit (Ping timeout: 260 seconds)
16:41:01*om3ga joined #nim
16:46:06FromDiscord<maxpicklez> Hello everyone, I have a question regarding ctypes.nim. Is this the right place for such a question?
16:47:39FromDiscord<maxpicklez> I recently downloaded nico a game framework and ran into trouble using emscripten. It turned out to be something related to a missing ctype in system/ctypes.nim for bool. I was able to address the issue https://github.com/ftsf/nico/issues/128 but it required a one line addtion to ctypes.nim
16:50:11FromDiscord<maxpicklez> https://github.com/nim-lang/Nim/compare/devel...maxpicklez:Nim_with_cbool:devel
16:54:07FromDiscord<mratsim> In reply to @maxpicklez "I recently downloaded nico": Nim uses _Bool for c99: https://github.com/nim-lang/Nim/blob/devel/lib/nimbase.h#L318-L326
16:56:51FromDiscord<maxpicklez> https://github.com/emscripten-core/emscripten/commit/3dfabe6ded598cd23c64968ae213ea98a0ad180f
16:58:46FromDiscord<maxpicklez> ^ that change breaks emscripten for me, by adding the cbool to system/ctypes.nim it compiles. I am looking at the link you send currently. And can clearly see the def and its checking for C99 i think? so im not sure why the addition I used works.
16:59:52FromDiscord<maxpicklez> or if it actually work for that matter. which is why im here, I orignially "fixed" the issue by reverting the emscripten change but it didnt feel right.
17:00:13FromDiscord<maxpicklez> sent a long message, see https://pasty.ee/DbGAqBgf
17:00:18FromDiscord<maxpicklez> ^ thats the relevant error
17:00:45FromDiscord<maxpicklez> sent a long message, see https://pasty.ee/RgqYXDNX
17:00:46FromDiscord<maxpicklez> sorry that one ^
17:05:54FromDiscord<maxpicklez> ● I didnt test with devel. My bad going to check now
17:09:01FromDiscord<maxpicklez> Same issue, going to dig deeper thought I dont have a clue what Im doing lol
17:31:41FromDiscord<mratsim> In reply to @maxpicklez "^ that change breaks": I don't know the pico lib unfortunately, especially how it wraps emscripten (via header or dynlib?)
18:39:40*beholders_eye quit (Quit: WeeChat 4.1.2)
18:39:55*beholders_eye joined #nim
19:10:19*beholders_eye quit (Ping timeout: 260 seconds)
19:11:17FromDiscord<albassort> maybe this is naive. But why cant i use strap lib SSL up to a C JS engine with and an implemented dom with no rendering engine
19:13:01FromDiscord<maxpicklez> @mratsim\: I thinik as its related to WASM/enscripten its statically link via the header definition, not sure dynamic linking works for WASM
19:15:24FromDiscord<maxpicklez> /status away
19:21:24FromDiscord<odexine> In reply to @albassort "maybe this is naive.": some js functions require positioning which requires css
19:22:43FromDiscord<albassort> In reply to @odexine "some js functions require": ;feed them nonsense
19:22:43FromDiscord<muddmaker> That doesn't require actual rendering, though
19:22:43FromDiscord<odexine> In reply to @albassort ";feed them nonsense": then your "browser" is fingerprintable
19:22:43FromDiscord<muddmaker> Just the layouting phase to be implemented in the DOM
19:22:43FromDiscord<albassort> hope people dont notice it exists
19:22:43FromDiscord<odexine> In reply to @muddmaker "That doesn't require actual": yeah but it requires a significant chunk of it
19:22:43FromDiscord<muddmaker> It's possible, but no one has implemented it as far as I'm aware because it's a lot
19:22:52FromDiscord<albassort> ok maybe i can make a renderer that is ridicously optimized that uses at little memory as possible
19:23:09FromDiscord<muddmaker> If chromium can be run headlessly, that would be the path of least resistance
19:23:18FromDiscord<muddmaker> What are you trying to accomplish?
19:23:33FromDiscord<albassort> website i need to continously crawl doesn't want me to
19:24:29FromDiscord<muddmaker> Yeah, trying to re-implement the DOM in a way that they wouldn't think is a bot would be HARD
19:24:38FromDiscord<albassort> it has some kind of fingerprinting that sends you useless html if you're calling it from an http scraper, but in my broiwser, the request is the proper html
19:26:04FromDiscord<muddmaker> Using chromium headlessly, maybe with playwright, would be the easiest course of action
19:26:04FromDiscord<albassort> i miss phantomjs
19:26:04FromDiscord<muddmaker> Following along with Ladybird development, they are running into issues where fingerprinting logic throws a fit because it uses every obscure part of the DOM where browsers diverge
19:26:04FromDiscord<muddmaker> And if they haven't implemented it, it starts thinking they are a bot
19:26:43FromDiscord<muddmaker> So unless you want to write an entire browser (sans actual drawing), they will figure you out. Headless chrome is the way to go
19:28:03FromDiscord<albassort> such a silly world we're in
19:28:14FromDiscord<albassort> these people are so anti-scraping, but they literally cnanot stop it
19:28:17FromDiscord<albassort> whats the point anyway
19:29:30FromDiscord<muddmaker> They can't stop it but they can make it slower
19:29:57FromDiscord<albassort> they can make it cost me an extra $2 a month in memory
19:31:14FromDiscord<muddmaker> Playwright looks very tested oriented, but Puppeteer directly supports web scraping as an official use case
19:32:31FromDiscord<muddmaker> <https://pptr.dev/examples#rendering-and-web-scraping>
19:32:31Amun-Rathey'll eventually figure headless installation out, (no 3rd party cookies, etc)
19:33:09FromDiscord<albassort> wait until i build up a 10000 weighted website data generation suite so you cant tell
19:34:09FromDiscord<albassort> In reply to @muddmaker "Playwright looks very tested": so puppeteer is what the cool kids use now instead of selenium--- selenium had an issue where it was veyr hard to just export the dom in the past.
19:34:50FromDiscord<muddmaker> Selenium has largely been replaced
19:46:28FromDiscord<albassort> the selenium mailing list is still incredibly active lol
19:46:44FromDiscord<albassort> i'm going to play with this now, thanks for pointing me in the right direction :)
20:01:01*beholders_eye joined #nim
20:19:50FromDiscord<maxpicklez> ty to everyone for your help. ! I think the change I need is relevant to the PICO8 game engine nico. and specifically how its linking to emscripten in regards to the implentation of cbool. FWIW the changes that worked for me are here\: ↵↵https://github.com/ftsf/nico/compare/main...maxpicklez:nico:main
20:54:21FromDiscord<albassort> nim doesn't have a functioning smtp client, right?
20:54:48FromDiscord<albassort> oh we do
21:09:21*ntat quit (Quit: Leaving)
21:48:20FromDiscord<muddmaker> In reply to @albassort "the selenium mailing list": I guess I should say "for new projects" lol. It's like how webpack has largely been replaced with vite. There's still a lot of code out there built using webpack unfortunately
22:08:57FromDiscord<michael.lenz.> Today I found that module names are not case sensitive
22:10:39FromDiscord<michael.lenz.> And spent a hour debugging the code on remote server, because I renamed module locally, and after scp-ed all sources to the same folder on the server
22:14:18FromDiscord<michael.lenz.> The words I used when found what actual problem was, may be the reason to call the police. It’s a serious issue that may make people loose mind
22:15:08FromDiscord<michael.lenz.> In my opinion, module imports hundred percent should be case sensitive
22:17:35FromDiscord<michael.lenz.> Idk what the reason was to have it work like it does now.
22:21:12FromDiscord<michael.lenz.> So, what I want to say. Be careful
22:22:07FromDiscord<muddmaker> Even in languages that try to have case sensitivity, Windows and macOS have case insensitive file systems, which causes all kinds of issues like this
22:22:45FromDiscord<muddmaker> There isn't really an easy solution
22:24:44FromDiscord<nnsee> In reply to @michael.lenz. "Idk what the reason": https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality
22:32:56FromDiscord<solitudesf> In reply to @nnsee "https://nim-lang.org/docs/manual.html#lexical-analy": modules are case sensitive depending on fs and some other bullshit.↵for example `import strUTILS` works, but `import std/strUTILS` doesnt.
22:42:34FromDiscord<michael.lenz.> In reply to @muddmaker "Even in languages that": I had this on linux
22:48:52FromDiscord<michael.lenz.> In reply to @solitudesf "modules are case sensitive": In my case it was similar to this: modULE and modUle
22:50:20FromDiscord<michael.lenz.> In reply to @nnsee "https://nim-lang.org/docs/manual.html#lexical-analy": Yes the link you provided explains the reason. But, it wasn’t fun
22:53:33FromDiscord<aintea> In reply to @michael.lenz. "Today I found that": Nothing is case sensitive in nim
22:54:24FromDiscord<aintea> sent a code paste, see https://play.nim-lang.org/#pasty=NwCSHATp
22:54:37FromDiscord<aintea> The first letter is case sensitive though
22:54:48FromDiscord<aintea> It is one of the only things I hate in Nim
23:58:23FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#pasty=qzoaTgsa
23:58:32FromDiscord<albassort> does connect unix not support SEQPACKET unixsockets?