00:00:23 | FromDiscord | <Clyybber> Check out https://nim-lang.github.io/Nim/manual#threads |
00:00:35 | FromDiscord | <Clyybber> Especially the gcsafe section if you encounter more issues like taht |
00:01:49 | FromDiscord | <reilly> I have one little bit of communication going on now. My GUI thread calls `bot.api.sendMessage()`, which reads from global memory... but it's probably fine. |
00:03:11 | * | manjaroi3_ joined #nim |
00:03:17 | * | manjaroi3_ quit (Remote host closed the connection) |
00:03:31 | * | manjaroi3_ joined #nim |
00:03:40 | * | manjaroi3_ quit (Remote host closed the connection) |
00:05:57 | * | PMunch quit (Quit: leaving) |
00:14:55 | * | tane quit (Quit: Leaving) |
00:20:11 | * | astronavt quit (Quit: Leaving) |
00:25:28 | FromDiscord | <ElegantBeef> So clyybber i realized due to disruptek, probably should get a similar implementation to what i mean inside the nim compiler π |
00:25:45 | FromDiscord | <ElegantBeef> (edit) "mean" => "made" |
00:26:03 | FromDiscord | <ElegantBeef> Need that NimVM to be capable of relying on the compiler to save binary streams π |
00:26:40 | FromDiscord | <ElegantBeef> How feasible is it to just throw a big ol' wedge of what i got in there for a nimVm stream impl? |
00:27:29 | FromDiscord | <ElegantBeef> He suggested fusion but due to the implementation i figured it cant be inside fusion |
00:35:37 | FromDiscord | <Avatarfighter> honestly open a pr with your edits and defend them with your life |
00:35:46 | FromDiscord | <ElegantBeef> But i didnt touch the compiler |
00:35:59 | FromDiscord | <ElegantBeef> Which is my point |
00:36:09 | FromDiscord | <Avatarfighter> ah i didn't see the context |
00:36:17 | FromDiscord | <Avatarfighter> Why couldn't it be fusion? |
00:36:39 | FromDiscord | <ElegantBeef> Cause it relies on implementing procs |
00:37:13 | FromDiscord | <ElegantBeef> Since it relies on the compiler having the procs i'm calling, so i have no clue the feasibillity |
00:37:50 | FromDiscord | <ElegantBeef> I dont really know how you'd expose them only if the module streams or what have you |
00:38:06 | FromDiscord | <Avatarfighter> yeah i see the issue now |
00:38:15 | FromDiscord | <Avatarfighter> hm |
00:38:42 | FromDiscord | <ElegantBeef> It's also not a perfect binary stream since i only use biggest ints as that's what the PNodes expect |
00:38:53 | FromDiscord | <ElegantBeef> IE all ordinals write a 64bit int |
00:42:24 | FromDiscord | <ElegantBeef> Not really an issue but the bridge for interop uses biggest ints regardless what you use |
00:42:53 | FromDiscord | <Avatarfighter> I have no idea how to help but I support you π π |
00:45:00 | * | xace quit (Ping timeout: 272 seconds) |
00:45:14 | * | abm joined #nim |
00:45:18 | * | JsonScaresMe joined #nim |
00:46:21 | * | xace joined #nim |
00:46:24 | JsonScaresMe | Why is it that when I try to use "for i in items(myJArray): echo i" I get the entire JArray? |
00:46:49 | JsonScaresMe | Like I just stuffed you into a JArray, why can't I unstuff you... |
00:47:15 | JsonScaresMe | ... Nevermind lol I made an oopsie. |
00:47:18 | * | JsonScaresMe quit (Remote host closed the connection) |
00:49:32 | mipri | what did you do? |
00:51:54 | FromDiscord | <ElegantBeef> Yea avatar i have no clue either, i know i need to get 8, 16, and 32 bit support for it even to be reasonable, but aside from that the actual implementation is beyond md |
00:51:55 | FromDiscord | <ElegantBeef> (edit) "md" => "me" |
00:52:52 | FromDiscord | <ElegantBeef> Not that the 8/16/32 bit support is even remotely difficult to implement just a little tedious π |
00:53:05 | FromDiscord | <fl> Heyo, I'm having a hard time finding infos about error handling in Nim. How would I verify that json is valid? |
00:55:23 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2Cxw |
00:57:00 | * | abm quit (Quit: Leaving) |
00:57:19 | * | abm joined #nim |
00:57:35 | FromDiscord | <ElegantBeef> I'm uncertain how you'd get more informational parsing errors |
00:57:41 | FromDiscord | <ElegantBeef> I assume it'd be using the parsejson module |
00:59:08 | FromDiscord | <fl> scintillating, thank you. what's the best way to find out which procs actually raise exceptions? |
00:59:27 | FromDiscord | <ElegantBeef> The the manual for the modules typically state |
01:00:55 | FromDiscord | <ElegantBeef> "The the" is why you look at where you're typing and make sure you delete the entire sentence before typing more |
01:03:22 | FromDiscord | <ElegantBeef> Ah scowering the tutorial shows how to do get more information https://play.nim-lang.org/#ix=2CxA |
01:07:47 | FromDiscord | <Clyybber> @ElegantBeef I mean you are using a VM callback, right? So you are already using the compiler |
01:07:55 | FromDiscord | <Clyybber> writing compiler code that is; |
01:09:01 | FromDiscord | <ElegantBeef> Oh i know i'm uncertain how/where to stub this in so it can be used for things like frosty or any other flat binary stream |
01:09:31 | FromDiscord | <Avatarfighter> tbh i feel like what you've made is worth PRing into the main code |
01:09:39 | FromDiscord | <Avatarfighter> its just I know someone else will disagree |
01:09:48 | FromDiscord | <ElegantBeef> Except what i made doesnt exactly just slide into the compiler |
01:09:55 | FromDiscord | <Avatarfighter> yeah i understand |
01:10:23 | FromDiscord | <ElegantBeef> Like nimscripter cant really even get added to the stdlib since it relies on the compiler |
01:10:39 | FromDiscord | <ElegantBeef> (edit) "compiler" => "compiler(Source code)" |
01:11:02 | FromDiscord | <Avatarfighter> Is there a way for you to refactor the code to make it more pluggable ? |
01:11:03 | FromDiscord | <ElegantBeef> So the closest i can think of would be to drop it in the compiler |
01:11:14 | FromDiscord | <ElegantBeef> Nope |
01:12:14 | FromDiscord | <Clyybber> not sure which parts should go into the compiler |
01:12:17 | FromDiscord | <Clyybber> or if any parts at all |
01:12:37 | FromDiscord | <Clyybber> or VM callbacks |
01:12:49 | FromDiscord | <Clyybber> my mind is kinda full of collisions and syms rn |
01:13:06 | FromDiscord | <ElegantBeef> Yea that's where i'm at, i think that it's atleast a holdover until something more proper comes in to replace the binary stream issue |
01:13:26 | FromDiscord | <ElegantBeef> But those callbacks need to be added somewhere somehow and i dont think it's clean |
02:01:26 | * | vicfred_ quit (Quit: Leaving) |
02:15:38 | * | apahl quit (Ping timeout: 264 seconds) |
02:17:16 | * | apahl joined #nim |
02:20:45 | disruptek | maybe you can exploit the new vm exceptions that were added recently. |
02:32:36 | * | oculuxe joined #nim |
02:33:19 | * | oculux quit (Ping timeout: 268 seconds) |
02:33:43 | * | abm quit (Quit: Leaving) |
02:37:45 | * | mbomba joined #nim |
02:49:44 | * | oculuxe quit (Ping timeout: 240 seconds) |
02:50:33 | * | oculux joined #nim |
02:51:14 | * | notchris quit (Read error: Connection reset by peer) |
02:52:11 | * | notchris joined #nim |
02:52:43 | * | opal quit (Ping timeout: 240 seconds) |
02:55:50 | * | opal joined #nim |
03:01:11 | * | oculuxe joined #nim |
03:02:18 | * | oculux quit (Ping timeout: 268 seconds) |
03:05:42 | * | mbomba quit (Quit: WeeChat 2.9) |
03:10:39 | disruptek | clyybber: awake? |
03:10:58 | FromDiscord | <windowsboy111> do u guys know any libs for HTML webpage rendering |
03:11:18 | disruptek | can you be more specific? |
03:11:29 | FromDiscord | <windowsboy111> oh wait there's a #webdev channel |
03:12:33 | FromDiscord | <windowsboy111> uhh that can be coorperated into other GUI libs |
03:12:47 | disruptek | !repo webview |
03:12:48 | disbot | https://github.com/daniel-j/nim-webview -- 9nim-webview: 11 15 3β 1π΄ & 1 more... |
03:12:56 | FromDiscord | <windowsboy111> oh thx so muxh |
03:13:00 | FromDiscord | <windowsboy111> much |
03:13:24 | disruptek | i think there are a few webview libs. |
03:13:45 | FromDiscord | <windowsboy111> so it's a gtk one, hmm |
03:14:12 | leorize[m]1 | the wxwidgets wrapper has webview support too |
03:14:18 | leorize[m]1 | !repo pmunch/wxnim |
03:14:20 | disbot | no results π’ |
03:14:35 | FromDiscord | <windowsboy111> I knew that one already |
03:15:07 | FromDiscord | <windowsboy111> currently I need to decide what GUI lib I should use |
03:16:04 | * | muffindrake quit (Ping timeout: 240 seconds) |
03:16:24 | FromDiscord | <flywind> !repo Neel |
03:16:24 | disbot | https://github.com/Niminem/Neel -- 9Neel: 11A Nim library for making Electron-like HTML/JS GUI apps, with full access to Nim capabilities. 15 38β 1π΄ |
03:17:44 | * | oculuxe quit (Ping timeout: 240 seconds) |
03:18:31 | * | oculux joined #nim |
03:18:41 | * | muffindrake joined #nim |
03:19:38 | FromDiscord | <windowsboy111> glimpsed, that's a good one |
03:21:46 | * | oculuxe joined #nim |
03:23:26 | * | oculux quit (Ping timeout: 264 seconds) |
03:52:47 | * | oculux joined #nim |
03:54:45 | * | oculuxe quit (Ping timeout: 240 seconds) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:44 | * | supakeen joined #nim |
04:39:25 | * | a_chou joined #nim |
04:40:39 | * | a_chou quit (Remote host closed the connection) |
04:40:45 | * | oculuxe joined #nim |
04:42:03 | * | oculux quit (Ping timeout: 258 seconds) |
05:07:44 | * | MyMind quit (Ping timeout: 240 seconds) |
05:37:35 | * | ldlework quit (Ping timeout: 265 seconds) |
05:50:50 | * | narimiran joined #nim |
05:59:06 | * | oculux joined #nim |
05:59:18 | * | oculuxe quit (Ping timeout: 260 seconds) |
06:02:47 | * | ldlework joined #nim |
06:11:47 | ForumUpdaterBot | New thread by ElAfalw: Handle missing library at runtime?, see https://forum.nim-lang.org/t/7016 |
06:13:31 | * | solitudesf joined #nim |
06:21:16 | * | narimiran quit (Quit: leaving) |
06:23:08 | * | vicfred joined #nim |
06:25:13 | * | wowi42_ joined #nim |
06:25:56 | * | wowi42 quit (Ping timeout: 272 seconds) |
06:25:56 | * | dddddd quit (Ping timeout: 272 seconds) |
06:26:05 | * | dddddd joined #nim |
06:26:14 | * | GaveUp quit (Ping timeout: 256 seconds) |
06:26:22 | * | GaveUp joined #nim |
06:34:03 | * | opal quit (Ping timeout: 240 seconds) |
06:36:14 | * | opal joined #nim |
07:00:25 | * | solitudesf quit (Ping timeout: 240 seconds) |
07:03:21 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/blob/bc9a52127092680c662e0456797cbd1278203360/lib/pure/unittest.nim#L626 |
07:03:33 | FromDiscord | <flywind> What's the use of `inspectArgs`? |
07:08:13 | FromDiscord | <flywind> I see, it is for checkpoint but introduces some inconsistencies. |
07:17:24 | * | solitudesf joined #nim |
07:37:00 | * | tane_ joined #nim |
07:40:50 | * | xace quit (Ping timeout: 264 seconds) |
08:07:18 | * | natrys joined #nim |
08:17:31 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
08:26:07 | ForumUpdaterBot | New thread by Drkameleon: SSL error using httpClient, see https://forum.nim-lang.org/t/7018 |
08:52:17 | * | xace joined #nim |
09:15:51 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:30:15 | FromDiscord | <iWonderAboutTuatara> Hey is there an image library that isn't overly complicated? |
09:31:04 | FromDiscord | <iWonderAboutTuatara> I want to be able to take an image format and get a representation of the pixel grid of the image |
09:31:18 | FromDiscord | <iWonderAboutTuatara> Be able to do whatever I want to that grid, then export a completely seperate image |
09:31:36 | FromDiscord | <iWonderAboutTuatara> If there isn't a reasonably simple way to do this, how would I go about making it myself? |
09:32:56 | * | bouzu_ joined #nim |
09:38:05 | leorize[m]1 | !repo flippy |
09:38:06 | disbot | https://github.com/treeform/flippy -- 9flippy: 11Flippy is a simple 2d image and drawing library. 15 49β 6π΄ |
09:38:27 | leorize[m]1 | iWonderAboutTuatara: hopefully that will do |
09:39:11 | FromDiscord | <iWonderAboutTuatara> I tried this one, couldn't get it to work |
09:39:28 | FromDiscord | <iWonderAboutTuatara> I wasn't able to make images params for procs |
09:39:55 | FromDiscord | <lqdev> nimPNG too |
09:40:08 | FromDiscord | <iWonderAboutTuatara> Idk if it supports weird resizing as well, my goal is to take 2 images and smack them on the end of each other |
09:40:18 | FromDiscord | <iWonderAboutTuatara> Iirc nimpng doesn't have jpeg support |
09:40:45 | FromDiscord | <iWonderAboutTuatara> Seemed solid though besides that |
09:48:39 | * | qwertfisch is now known as zombiefisch |
09:52:17 | FromDiscord | <Rika> I use nimpng to do exactly that but yeah I work with pngs |
10:04:03 | * | MarderIII joined #nim |
10:17:17 | * | rusua joined #nim |
10:36:31 | * | ^Q-Master^ joined #nim |
10:39:58 | Prestige | I'm curious if there's a reliable version of this function https://nim-lang.org/docs/math.html#round%2CT%2Cint |
10:40:10 | * | Q-Master quit (Ping timeout: 256 seconds) |
10:40:18 | Prestige | I basically want to truncate the non-significant digits of a float |
10:40:46 | Prestige | or "meaningful digits" |
10:41:21 | FromDiscord | <lqdev> there isn't |
10:41:35 | Prestige | D: Ok I'll write a function then |
10:41:44 | FromDiscord | <lqdev> it's impossible to do this reliably because of the very nature of floats |
10:42:07 | * | Q-Master joined #nim |
10:42:24 | * | bouzu_ quit (Ping timeout: 240 seconds) |
10:44:09 | * | _Q-Master_ joined #nim |
10:45:25 | * | ^Q-Master^ quit (Ping timeout: 268 seconds) |
10:46:46 | * | Q-Master quit (Ping timeout: 260 seconds) |
10:47:44 | Prestige | apparently this is deprecated actually, says to use strformat |
10:52:35 | * | Q-Master joined #nim |
10:53:14 | Yardanico | Prestige: it's not deprecated |
10:53:26 | Yardanico | it was deprecated but was un-deprecated in 1.4 |
10:55:38 | * | _Q-Master_ quit (Ping timeout: 260 seconds) |
11:13:01 | * | MarderIII quit (Quit: Leaving) |
11:29:31 | Yardanico | !status |
11:29:34 | FromDiscord | Uptime - 1 week, 3 days, 15 hours, and 52 minutes |
11:29:34 | * | tane_ quit (Quit: Leaving) |
11:46:50 | sealmove | It's so awesome that we have comments in AST |
11:59:41 | FromDiscord | <Rika> Docs, not comments |
11:59:42 | * | superbia joined #nim |
12:05:02 | Zevv | nnkCommentStmt(), not nnkDocStmt() |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:45 | * | supakeen joined #nim |
12:17:55 | * | apahl quit (Ping timeout: 268 seconds) |
12:18:33 | * | apahl joined #nim |
12:21:47 | sealmove | well, the variant is called `nnkCommentStmt` :P |
12:24:39 | * | lritter joined #nim |
12:26:47 | ForumUpdaterBot | New thread by Jiyinyiyong: How to handle a blocking task(fswatch)?, see https://forum.nim-lang.org/t/7019 |
12:31:24 | FromDiscord | <flywind> Why Nim parser gives different result in windows and linux? |
12:31:47 | Zevv | flywind: elaborate. Examples? |
12:32:04 | FromDiscord | <flywind> `0.99.99` -> tkAccent + tkStrLit(`0.99.99`) in windows |
12:33:27 | FromDiscord | <flywind> tkAccent + tkFloatLit(99.98999999999999) in linux |
12:33:52 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/issues/14407 |
12:33:53 | disbot | β₯ Float-like part of a variable identifier is changed in [XDeclaredButNotUsed] Hint ; snippet at 12https://play.nim-lang.org/#ix=2soE |
12:34:41 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2CzT |
12:36:54 | FromDiscord | <flywind> The parser is the same, but the value is differnet. |
12:36:59 | FromDiscord | <flywind> (edit) "differnet." => "different." |
12:37:34 | FromDiscord | <flywind> In windows `99.99` tkFloatLit |
12:38:00 | FromDiscord | <flywind> in linux `99.98999999999999` tkFloatLit |
12:43:23 | FromDiscord | <flywind> I see, it is OS specific. |
12:44:39 | FromDiscord | <flywind> with `nim secret`, `0.99` is displayed as `0.99` in windows and `0.98999999999999` in linux. |
12:48:03 | FromDiscord | <flywind> (edit) with `nim secret`, `99.99` is displayed as `99.99` in windows and `99.98999999999999` in linux. |
12:51:41 | FromDiscord | <flywind> So float in Nim is OS specific? |
12:53:35 | sealmove | Probably only the representation |
12:54:00 | sealmove | I mean printf could work differently |
12:54:01 | Zevv | formatfloat.nim |
12:54:08 | Zevv | uses c_sprintf under the hood |
12:54:11 | Zevv | with %.16g |
12:55:03 | * | PMunch joined #nim |
12:55:10 | Zevv | There was once this frantic project 4 people were working on at the same time to bring Super Extra Cool float formatting to Nim |
12:55:17 | Zevv | all of those were abaonded, afaik |
12:55:41 | FromDiscord | <flywind> what about float in VM? |
12:56:21 | sealmove | fly, it's only when you print them that they seem different |
12:56:36 | sealmove | they have to get to your screen somehow |
12:57:13 | FromDiscord | <flywind> It causes issue https://github.com/nim-lang/Nim/issues/14407 |
12:57:14 | disbot | β₯ Float-like part of a variable identifier is changed in [XDeclaredButNotUsed] Hint ; snippet at 12https://play.nim-lang.org/#ix=2soE |
12:57:50 | Zevv | no way haha |
12:58:14 | sealmove | oh this is... lol |
12:58:45 | sealmove | this seems bad |
12:59:16 | sealmove | c_sprintf is probably used internally (for other uses than printing to screen) |
12:59:36 | sealmove | yeah it shouldn't be |
13:00:50 | ForumUpdaterBot | New thread by KnorrFG: Passing iterators as arguments, see https://forum.nim-lang.org/t/7020 |
13:01:45 | FromDiscord | <flywind> Is it possible Nim parser parses everything between tkAccent as string? |
13:02:06 | FromDiscord | <Clyybber> it doesn't seem like it does |
13:02:11 | FromDiscord | <Clyybber> otherwise why would it change? |
13:02:43 | sealmove | good question |
13:05:14 | sealmove | another question. how is this possible? https://play.nim-lang.org/#ix=2CA1 |
13:06:12 | FromDiscord | <Clyybber> ? seems expected |
13:06:54 | sealmove | yeah, tkAccent is to escape identifier rules |
13:08:47 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2CA4 |
13:09:18 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2CA5 |
13:09:50 | FromDiscord | <Clyybber> this is kinda funny ngl |
13:10:07 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2CA6 |
13:10:28 | FromDiscord | <Clyybber> ah, no Its not related to floats in this case |
13:10:52 | FromDiscord | <Clyybber> eh, nevermind, this makes perfect sense |
13:11:29 | FromDiscord | <Clyybber> https://play.nim-lang.org/#ix=2CA7 |
13:12:10 | FromDiscord | <flywind> What's the difference? |
13:12:19 | FromDiscord | <Clyybber> Yours doesn't compile |
13:12:25 | FromDiscord | <Clyybber> because `99.99` is undefined |
13:12:35 | FromDiscord | <Clyybber> either define it or change the param to untyped |
13:12:53 | * | superbia quit (Quit: WeeChat 2.9) |
13:13:04 | FromDiscord | <Clyybber> but yeah, if you change that it prints as 99.9899999999 |
13:13:07 | sealmove | yeah sure, it doesn't cause any important issues like this, but still `99.99` is changed to something else |
13:13:08 | FromDiscord | <flywind> I have posted the compile version at third link |
13:13:24 | sealmove | hmm, maybe it's just toStrLit() |
13:13:46 | FromDiscord | <Clyybber> @flywind does it get parsed as tkFloat? |
13:13:47 | sealmove | yeah, it should be |
13:13:58 | FromDiscord | <flywind> yes it is |
13:14:01 | FromDiscord | <Clyybber> it probably shouldn't |
13:14:08 | FromDiscord | <Clyybber> because its inside accents |
13:14:43 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2CAa |
13:15:00 | FromDiscord | <Clyybber> but this is a design question; maybe its better to parse it as tkFloat |
13:15:01 | FromDiscord | <flywind> `v0.99.99` is parsed like this |
13:15:08 | FromDiscord | <Clyybber> huh |
13:15:11 | FromDiscord | <Clyybber> Interesting |
13:15:41 | FromDiscord | <flywind> This is in windows |
13:16:00 | FromDiscord | <Clyybber> I think this may be by design; delegating actually turning the insides of `` into literals until the very end |
13:16:14 | FromDiscord | <Clyybber> so that `` can be used more freely in for example quote |
13:16:38 | sealmove | guys it still might be related to printing only |
13:16:44 | FromDiscord | <Clyybber> yeah |
13:17:04 | FromDiscord | <Clyybber> its a combination; but the printing is the obvious part that should get fixed |
13:17:10 | FromDiscord | <Clyybber> the other is more of a design thing |
13:17:16 | FromDiscord | <Clyybber> and its probably this way for good reason |
13:18:00 | FromDiscord | <flywind> I agree. `Python` keeps the same printing results for `99.99` in windows and linux, |
13:20:01 | * | neceve joined #nim |
13:20:15 | sealmove | hmm dumpTree: `99.99` returns AccQuoted(Ident"99.55") while `99.99.99` errors with "invalid number: '99.99.99 |
13:21:15 | sealmove | https://play.nim-lang.org/#ix=2CAe |
13:21:39 | sealmove | `v99.99.99` has no issue |
13:22:08 | FromDiscord | <Clyybber> ok this is a bug then |
13:22:18 | FromDiscord | <Clyybber> it should be parsed as Ident too |
13:22:28 | sealmove | yeah |
13:24:17 | sealmove | dumpTree: `v99.99.99` returns AccQuoted(ident"v99", ident".", ident"99.98999999999999") |
13:24:28 | sealmove | even more weird |
13:24:46 | FromDiscord | <flywind> this is the issue I mentioned. |
13:25:05 | sealmove | yes sorry flywind, now I understand |
13:25:50 | sealmove | it clearly interprets floats internally while it shouldn't, but also I don't understand the splitting up, maybe that's normal? i don't know |
13:26:58 | sealmove | for example should `a.b` be AccQuoted(ident"a.b") or AccQuoted(ident"a", ident".", ident"b") as it is? |
13:28:47 | FromDiscord | <Clyybber> thats the question |
13:29:38 | FromDiscord | <flywind> if it is by design, at least we should have documentation. |
13:40:25 | FromDiscord | <flywind> Another question? If this issue is really easy? https://github.com/nim-lang/Nim/issues/15628 |
13:40:26 | disbot | β₯ coro lib doesn't work with orc/arc |
13:41:01 | FromDiscord | <flywind> I don't found `GcHeap` for `arc/orc`? |
13:41:05 | FromDiscord | <flywind> (edit) "found" => "find" |
13:41:28 | FromDiscord | <Clyybber> I think you can just put all of these _setStackBottom and so on in a when not defined(arc) |
13:41:40 | FromDiscord | <Clyybber> but I'm not completely sure |
13:41:49 | FromDiscord | <Clyybber> just try it I guess |
13:42:09 | FromDiscord | <flywind> I have tried that, but it doesn't work. |
13:43:35 | FromDiscord | <flywind> It needs global `GcHeap` to work. |
13:45:25 | FromDiscord | <flywind> I see I will try that. |
13:48:48 | * | tane joined #nim |
14:01:56 | federico3 | https://sourcehut.org/ |
14:02:14 | federico3 | the CI in sourcehut is quite nice |
14:03:48 | FromDiscord | <Clyybber> we are using it for bsd tests |
14:08:13 | FromDiscord | <Yardanico> yeah, for openbsd + freebsd |
14:08:20 | FromDiscord | <Yardanico> and maybe we'll get netbsd if sourcehut adds that |
14:11:53 | FromGitter | <jrfondren> is there a shorthand for `import foo; import foo / [a, b, c]` ? |
14:12:11 | disruptek | nope. |
14:13:35 | FromGitter | <jrfondren> huh, alright |
14:13:55 | FromDiscord | <Clyybber> why would there? |
14:15:28 | * | rusua quit (Quit: Connection closed for inactivity) |
14:15:36 | FromGitter | <jrfondren> for the same reason the [] syntax exists. in my case I have the main module, so you usually want 'import foo', but there are utilities under it that you might also want. it's just +1 to the syntax |
14:15:52 | FromGitter | <jrfondren> also Rust has it :p |
14:15:59 | FromDiscord | <Clyybber> I never encountered this pattern :D |
14:16:18 | disruptek | i had a nightmare about it a couple weeks ago. |
14:16:35 | FromDiscord | <Clyybber> most pkgs are structured in a way so that foo/[a, b, c] are parts of foo |
14:16:46 | FromDiscord | <Clyybber> so importing foo makes import foo/[a, b, c] unneccessary |
14:16:50 | FromDiscord | <Clyybber> but YMMV |
14:17:12 | FromGitter | <jrfondren> aren't they organized that way *because* there's no alternative? |
14:17:42 | * | solitudesf quit (Ping timeout: 256 seconds) |
14:18:20 | disruptek | there's no alternative that adds precision. |
14:18:25 | disruptek | so, yes. |
14:19:11 | disruptek | some people simply make a foo.nim that includes foo/* to produce the effect you want. we call those people `fools`. |
14:21:09 | FromGitter | <jrfondren> anyway this works: `import foo, foo/[a, b, c]` |
14:21:42 | disruptek | weird. |
14:21:55 | FromDiscord | <Clyybber> whats weird |
14:22:09 | disruptek | specifying what you want to import causes those things to be imported. |
14:22:24 | FromDiscord | <Clyybber> truly a mystery |
14:22:45 | disruptek | my mind is blown and the edibles haven't even kicked in. |
14:22:57 | FromGitter | <jrfondren> pretty high level of mockery from some people who didn't immediately offer that as a good enough solution to a problem they hadn't ever considered. |
14:23:12 | disruptek | what problem? |
14:23:35 | FromDiscord | <Clyybber> that there is no shortcut |
14:23:41 | Zevv | but there was |
14:23:42 | Zevv | :) |
14:24:02 | disruptek | Zevv: you get his arms and i'll get his legs. |
14:24:09 | FromDiscord | <Clyybber> nooo |
14:24:20 | FromDiscord | <Clyybber> I'm close to the early sym solution |
14:24:25 | Zevv | no way |
14:24:27 | disruptek | i don't believe it. |
14:24:29 | FromDiscord | <Clyybber> just leave me be for a while |
14:24:41 | Zevv | he's just saying that so you don't beat him up disruptek |
14:25:00 | disruptek | my fucking water is frozen. i hate this shithole country. |
14:25:02 | FromDiscord | <Clyybber> no no no, wait I'm pushing |
14:26:18 | disruptek | if i want to make coffee, i'm going to have to use bentley's water dish. |
14:27:24 | FromDiscord | <Clyybber> I don't get how you can have this many problems with cyclic imports |
14:27:39 | FromDiscord | <Clyybber> as in I never have them |
14:28:31 | disruptek | i have them in the compiler sometimes, but it's rarely a problem. |
14:28:33 | * | PMunch quit (Remote host closed the connection) |
14:28:42 | disruptek | and it will be fixed in 1.8, so whatever. |
14:28:51 | FromDiscord | <Clyybber> I think many people don't know about the current semantics |
14:29:02 | * | PMunch joined #nim |
14:29:07 | disruptek | for packages, you mean? |
14:29:11 | FromDiscord | <Clyybber> no |
14:29:16 | FromDiscord | <Clyybber> for cyclic imports |
14:29:23 | disruptek | packages are very poorly documented. |
14:29:27 | FromDiscord | <Clyybber> no |
14:29:31 | disruptek | yes |
14:29:32 | FromDiscord | <Clyybber> I'm not talking packages |
14:29:36 | disruptek | i know. |
14:29:48 | FromDiscord | <Clyybber> is it the case that you don't know about it |
14:29:50 | FromDiscord | <Clyybber> ? |
14:30:02 | disruptek | cyclic imports? |
14:30:10 | FromDiscord | <Clyybber> yeah |
14:30:22 | disruptek | i dunno, what are you talking about? |
14:30:24 | FromDiscord | <Clyybber> or are you working in the postal office/ |
14:30:56 | disruptek | i poisoned two IT workers at the local health center, so i might be able to get a job there. |
14:31:03 | disruptek | the irony... |
14:31:08 | FromDiscord | <Clyybber> disruptek: The fact that an import that creates a cycle simply imports the already processed parts of the pkg it points to |
14:32:11 | disruptek | yes, well i've only really encountered this in the compiler. |
14:32:30 | disruptek | and obviously, i've worked around it. |
14:32:51 | FromDiscord | <Clyybber> IMO your project structure is fucked if that doesn't work |
14:33:14 | disruptek | it's the only large and incestuous project i've worked on that was too backwards to consider eating its own dogfood. |
14:37:20 | FromDiscord | <Clyybber> lets see if this works |
14:37:43 | * | PMunch quit (Remote host closed the connection) |
14:37:58 | FromDiscord | <Clyybber> one thing I don't like is when your n argument and the result alias in mysterious ways |
14:38:24 | FromDiscord | <Clyybber> and you are not sure if the callee is going to continue processing with the n or the result |
14:38:35 | FromDiscord | <Clyybber> (edit) "callee" => "caller" |
14:38:46 | disruptek | hey man, are you high right now? |
14:39:03 | disruptek | dude, it's okay if you are. |
14:39:25 | FromDiscord | <Clyybber> ok |
14:39:32 | FromDiscord | <Clyybber> ay |
14:51:56 | * | mathsaey left #nim (#nim) |
14:54:19 | FromDiscord | <windowsboy111> hello, is there any libs that supports website rendering based on KHTML or stuff, but not electron (I think electron is too heavy) |
14:54:39 | FromDiscord | <windowsboy111> (I asked this question this morning already lol) |
14:56:22 | FromDiscord | <windowsboy111> I tried out this lib <https://github.com/Niminem/Neel/> already, I'm just looking for libs that are might be better |
15:01:26 | Zevv | Clyybber: I think the major thing people run into is that types from different modules can not be recursively dependent, even if one of them is opaque to the other |
15:08:44 | * | PMunch joined #nim |
15:09:37 | FromDiscord | <Clyybber> ah yeah |
15:13:43 | Zevv | and the usual answer "put all your types in one file" is usually not well received |
15:15:31 | * | solitudesf joined #nim |
15:19:05 | * | pbb quit (Remote host closed the connection) |
15:19:49 | * | waleee-cl joined #nim |
15:20:18 | * | pbb joined #nim |
15:45:14 | * | Axiomatic quit (Remote host closed the connection) |
15:46:25 | * | xet7 quit (Quit: Leaving) |
15:47:25 | * | Axiomatic joined #nim |
15:54:08 | * | cyraxjoe joined #nim |
15:55:57 | * | MightyJoe quit (Ping timeout: 258 seconds) |
16:06:16 | * | xet7 joined #nim |
16:08:13 | FromDiscord | <zetashift> @windowsboy111 I don't know of any and using nimble.directory doesn't show anything else, I think Neel might be your best bet |
16:10:12 | FromDiscord | <zetashift> Depending on what you need Fidget might also be an alternative |
16:13:43 | FromGitter | <jrfondren> https://nim-lang.moe/on-nim.html#importself |
16:18:40 | FromDiscord | <Clyybber> jrfonden: You can do import foo/["../foo", a, b, c] but its just cursed :D |
16:18:49 | FromDiscord | <Clyybber> and is not really shorter |
16:19:31 | FromGitter | <jrfondren> wow that's horrifying. thanks :) |
16:20:21 | disruptek | i wonder if procs-follow-types could conceivably go into 1.8. |
16:21:20 | disruptek | it's basically a documentation change. |
16:22:43 | disruptek | you know what i love? |
16:23:31 | disruptek | chrome 85. when i haven't visited the window in awhile, sometimes my scroll wheel thinks i'm holding a modifier. so instead of scrolling, it zooms out. |
16:23:44 | disruptek | doesn't anyone test this shit? |
16:26:22 | PMunch | Hmm, can I deal with cookies in httpClient? |
16:26:28 | disruptek | yes. |
16:26:58 | disruptek | it's the one field that has a relaxed spec on headers. |
16:27:09 | PMunch | Huh? |
16:27:15 | disruptek | which, come to think of it, means it's a total crap-shoot as to whether it works in nim's httpclient lib. |
16:27:33 | disruptek | you can have multiple Cookie: headers in http-1.1. |
16:27:50 | disruptek | this is not the case for any other headers. |
16:28:33 | supakeen | disruptek: I'm working on a PR for that. |
16:28:58 | supakeen | which i'm updating tomorrow :) |
16:28:59 | disruptek | i finally deleted my branches for fixing http this week. just decided i'd rather work around this stuff in the server than fixing it in the client. |
16:29:10 | disruptek | that's how fucking lazy i am. |
16:29:12 | supakeen | well this specifically is a httpcore thing |
16:29:16 | disruptek | i know. |
16:29:21 | disruptek | i've solved it twice now. |
16:30:21 | supakeen | we're deprecating `parseHeader` for a version that does no splitting so it can be left up to a higher level or at least that's plan |
16:30:35 | disruptek | yeah; that's why i didn't comment on your pr. |
16:31:00 | disruptek | 2020 is the year of, "i don't care." |
16:31:13 | supakeen | sounds like a good year |
16:31:29 | disruptek | it sucks. but, the good news is that my water melted. |
16:31:41 | disruptek | probably for the last fucking time before may of 2021. |
16:31:49 | supakeen | where do you even live |
16:31:54 | supakeen | north pole? |
16:31:57 | supakeen | are you santa? |
16:32:18 | disruptek | i'm in the state with the fewest covid cases in the US. |
16:32:24 | supakeen | alaska then |
16:32:25 | disruptek | because fuck 'em. |
16:36:21 | disruptek | and why would you say alaska, anyway? |
16:36:45 | disruptek | people have strange ideas about alaska. |
16:43:32 | supakeen | dunno because i know as much about the US as the average American knows about the EU :) |
16:44:24 | disruptek | but you're from brazil. |
16:45:53 | supakeen | close enough |
16:46:12 | FromDiscord | <Idefau> argentina |
16:46:25 | disruptek | i know, but brazil sounds better. |
16:46:55 | disruptek | maybe i just have brazilians on the brain. |
16:47:16 | disruptek | when the water freezes, it's time to grow out the brazilian, ya feel? |
16:47:21 | supakeen | I've lived in the EU since I was a wee kid though; currently the Netherlands :) |
17:03:20 | FromDiscord | <windowsboy111> @zetashift I see... |
17:04:05 | FromDiscord | <windowsboy111> Since I just tried out wxnim, it works, but not that practical... |
17:04:14 | FromDiscord | <windowsboy111> but I have to admit it is 999 times faster |
17:09:07 | FromDiscord | <zetashift> you could try fidget, nimx or nigui: https://github.com/trustable-code/NiGui |
17:09:27 | FromDiscord | <zetashift> oh supakeen another dutch person! that makes 3! |
17:18:12 | Zevv | who lives where? I'm in Amersfoort |
17:18:28 | Zevv | One in Den Haag, and the third? |
17:29:51 | * | sealmove quit (Quit: WeeChat 2.9) |
17:30:25 | FromDiscord | <zetashift> I'm in Rotterdam |
17:46:13 | Zevv | well, you guys can wave and shout to each other then! |
17:47:29 | disruptek | speed of light communication ftw. |
17:51:45 | FromDiscord | <Daniel> https://tenor.com/view/europe-european-union-europe-failed-failed-gif-13963686 |
17:52:43 | * | NimBot joined #nim |
17:58:20 | PMunch | Haha, that is a great loading gif :P |
18:10:35 | Zevv | PMunch: did you figure out your fd polling yet? |
18:10:54 | PMunch | Oh yeah, did it just after the stream yesterday |
18:11:31 | Zevv | right |
18:12:02 | * | astronavt joined #nim |
18:13:54 | PMunch | Pretty simple actually |
18:14:12 | PMunch | Used the selectors module in stdlib and a code snippet of someone who did it in C |
18:14:29 | PMunch | Basically just select on the X connection with a timeout |
18:27:05 | * | PMunch quit (Quit: leaving) |
18:27:32 | * | PMunch joined #nim |
18:27:54 | PMunch | Realised it's Halloween today, so no stream tonight. Hopefully will do one tomorrow |
18:27:55 | * | PMunch quit (Remote host closed the connection) |
18:32:17 | disruptek | what are you afraid of? |
18:33:09 | Prestige | He's going trick or treating, of course |
18:33:58 | disruptek | i had a dream i abducted a six year old girl last night. |
18:35:01 | disruptek | i want you to think about that while you're trying to sleep tonight. |
18:38:19 | Prestige | for why? |
18:40:03 | FromDiscord | <lqdev> how would i go about creating a graph for `div` on desmos? |
18:40:12 | disruptek | who is desmos? |
18:40:14 | FromDiscord | <lqdev> cause this is a graph for floorMod https://www.desmos.com/calculator/kqdv6lvj8w |
18:40:23 | FromDiscord | <lqdev> but i need a graph for `mod` and `div` |
18:40:29 | FromDiscord | <lqdev> but `mod` needs `div` |
18:40:46 | FromDiscord | <lqdev> oh right, `trunc(x / y)` |
18:41:56 | disruptek | neat site. |
18:43:37 | * | zombiefisch is now known as geisterfisch |
18:45:59 | * | geisterfisch is now known as qeisterfisch |
18:57:41 | * | astronavt quit (Quit: Leaving) |
18:57:57 | * | disruptek is now known as keisterfish |
18:59:06 | keisterfish | ~disruptek is the rapscallion stallion. |
18:59:07 | disbot | disruptek: 11unsafe at any speed. |
18:59:07 | disbot | disruptek: 11:disruptek: |
18:59:07 | disbot | disruptek: 11an unsafe nil deref |
19:13:52 | * | hnOsmium0001 joined #nim |
19:16:48 | * | astronavt joined #nim |
19:23:36 | FromDiscord | <Rika> lol |
19:51:39 | * | mfiano quit (Quit: WeeChat 2.9) |
19:53:03 | * | mfiano joined #nim |
19:56:06 | * | mmohammadi9812 quit (Ping timeout: 268 seconds) |
20:00:57 | * | Axiomatic quit (Remote host closed the connection) |
20:06:53 | * | TomDotTom quit (Ping timeout: 260 seconds) |
20:15:52 | * | axion quit (Quit: WeeChat 2.9) |
20:16:02 | * | neceve quit (Ping timeout: 272 seconds) |
20:33:58 | * | mmohammadi9812 joined #nim |
20:35:43 | * | opal quit (Ping timeout: 240 seconds) |
20:38:43 | * | opal joined #nim |
20:41:46 | FromGitter | <jrfondren> just a little bit wrecked on performance: https://github.com/jrfondren/chrestomathy/tree/master/geobench |
20:43:38 | FromGitter | <jrfondren> though that's a library written to use viewtypes where I hit a bug and said "welp, s/openArray/string/g" |
20:49:34 | FromDiscord | <MiniApple> how to check type in nim? |
20:50:06 | mipri | !eval echo "hi".type |
20:50:09 | NimBot | string |
20:54:32 | * | Axiomatic joined #nim |
20:54:52 | FromDiscord | <MiniApple> thank |
21:00:45 | FromDiscord | <notchris> happy halloween all |
21:07:47 | FromDiscord | <Pepe> hi all, object types are always copied on assignment and when passed as a parameter ? |
21:10:29 | mipri | objects have value semantics and ref objects have reference semantics, yeah. the actual copy might be elided. parameters are also immutable by default, so a lot of copies might not happen there. I haven't dug that much into it |
21:11:41 | mipri | take a look at some code with --gc:arc --expandArc:<name> , where name can be a proc or just the name of your module |
21:12:23 | mipri | for example a simple: `var a = "hello"`, `var b = a` compiles with an inserted `wasMoved(a)` rather than a copy |
21:12:44 | keisterfish | depending on who you ask, any object smaller than float.sizeof*3 is passed by value. |
21:14:56 | FromDiscord | <Pepe> and why not just using ref objects to avoid possible copies ? |
21:15:26 | keisterfish | sometimes what you want is a value. |
21:15:41 | FromDiscord | <Pepe> I mean, what is the point of using value objects vs refs? |
21:15:52 | keisterfish | they can be contiguous in memory. |
21:16:13 | mipri | https://isocpp.org/wiki/faq/value-vs-ref-semantics |
21:16:14 | keisterfish | they can follow mutability semantics. |
21:17:19 | keisterfish | they can break your inheritance code in subtle ways that are fun to try to reason about. |
21:20:55 | FromDiscord | <Pepe> not very easy to understand from a Python guy π |
21:21:49 | keisterfish | i guess pointers are a bit of a mind-fuck when you are first exposed to them. |
21:23:59 | keisterfish | pointers were so young that, when we met, i had no reason to be afraid of them. |
21:24:12 | mipri | easy rule, if you want nil, go with ref object, otherwise go with object |
21:25:46 | FromDiscord | <Pepe> so you should prioritize objects |
21:25:56 | keisterfish | yes. |
21:26:44 | mipri | the language makes you type an extra keyword to escape value semantics, and basic types like string, seq, arrays, all have value semantics. it's a good default. |
21:26:48 | FromDiscord | <Pepe> I have basic understanding of pointers, but as I have never use them in a real project, I do not know or understand its implications |
21:26:53 | keisterfish | unless you need inheritance, of course. |
21:27:06 | FromDiscord | <Pepe> (edit) "use" => "used" |
21:28:36 | FromDiscord | <MiniApple> what is macros |
21:28:47 | keisterfish | ~manual |
21:28:48 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html |
21:28:48 | disbot | manual: 11just good to Ctrl+F in cases like this |
21:29:13 | keisterfish | that's a funny footnote. |
21:29:22 | FromDiscord | <MiniApple> hmm |
21:29:30 | FromDiscord | <MiniApple> i didn't understand very well |
21:30:08 | FromDiscord | <Pepe> thanks guys |
21:30:33 | mipri | there's a macro tutorial as well: https://nim-lang.org/docs/tut3.html |
21:31:38 | FromDiscord | <MiniApple> i already read the tutorial |
21:33:16 | mipri | the second sentence of the tutorial tells what they are. |
21:33:23 | mipri | and the examples in the tutorial show you what they can do. |
21:33:44 | mipri | so what are you asking, really? |
21:33:55 | FromDiscord | <MiniApple> ok |
21:33:55 | keisterfish | they want you to read to them. |
21:35:13 | mipri | no, I completely believe that macros will seem mysterious or confusing to someone who's not used them a bunch |
21:35:49 | mipri | they don't pass out copies of Let Over Lambda in public school, you know. |
21:36:04 | keisterfish | LOL? |
21:37:09 | mipri | yeah. I tried for a while to think of what a Nim-oriented macro book would be named, and nothing so pithy came to mind |
21:37:52 | mipri | 'let' over 'lambda' is also visually resembles macros in Lisp. |
21:39:37 | mipri | the best part of that tutorial is after "With Power Comes Responsibility" |
21:42:54 | FromDiscord | <scott> is there no way to call `mapIt` (or similar) on an iterator like you can on a `seq`? |
21:45:21 | FromDiscord | <Yardanico> there is |
21:45:27 | FromDiscord | <Yardanico> toSeq(youriter()).mapIt(...) |
21:45:47 | FromDiscord | <Yardanico> toSeq basically gets all values from the iterator |
21:46:02 | FromDiscord | <Yardanico> btw, have you seen collect? |
21:46:09 | FromDiscord | <Yardanico> I think it would be more performant and better to use it if you can |
21:46:19 | FromDiscord | <Yardanico> https://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped%2Cuntyped |
21:49:25 | * | natrys quit (Quit: natrys) |
21:49:48 | mipri | Nim iterators don't compose as readily as C++/D/Rust iterators, but OTOH they don't need nearly as much optimization to be 'zero cost'. you might get more 'for x in ...' loops in your code but overall it's an improvement I think. |
21:50:30 | mipri | https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators <- closure iterators are different |
21:50:48 | Zevv | right |
21:57:56 | * | blueberrypie joined #nim |
21:58:41 | blueberrypie | hey quick question. does nim have a utility function somewhere that will convert an integer "N" bytes to some human readable format? like 1000 -> 1K ? |
21:59:07 | keisterfish | !repo bytes2human |
21:59:07 | disbot | https://github.com/juancarlospaco/nim-bytes2human -- 9nim-bytes2human: 11Calculate all Byte units from integer bytes positive int64 with precision from Bytes to Yottabytes and return a human friendly string representation. 15 10β 1π΄ |
21:59:18 | blueberrypie | thx |
22:05:20 | Zevv | blueberrypie: https://play.nim-lang.org/#ix=2CDn |
22:06:04 | Zevv | it's a tad more generic, it's not bytes-specific. |
22:06:11 | Zevv | note it's 1000 based, not 1024 |
22:06:45 | keisterfish | who can spare that many bytes? |
22:09:04 | FromDiscord | <scott> > you might get more 'for x in ...' loops in your codeβ΅Thanks, I think this answers my question best. I was trying to translate a `for x in y: let x = someProc(x)` into `for x in y.mapIt(someProc(it)` but if that's not supported it's not supported. Thanks. |
22:09:39 | FromDiscord | <scott> (edit) "y.mapIt(someProc(it)`" => "y.mapIt(someProc(it))`" |
22:34:43 | FromDiscord | <martinium> anyone here have in-depth knowledge of how web browsers volunteer information and allow for fingerprinting? |
22:35:29 | FromDiscord | <martinium> I for some reason want to build something that blocks most or all fingerprinting attempts outside of let's say and IP address. Hopefully, this i possible to create. |
22:35:40 | FromDiscord | <martinium> (edit) "and" => "an" |
22:35:48 | FromDiscord | <martinium> (edit) "i" => "is" |
22:36:09 | FromDiscord | <martinium> really annoying the amount of sites tracking you everywhere on the interney |
22:36:16 | FromDiscord | <martinium> (edit) "interney" => "internet." |
22:36:51 | FromDiscord | <ache of head> Doesn't Brave do that? |
22:36:58 | FromDiscord | <ache of head> https://brave.com/ |
22:43:01 | FromDiscord | <Phytolizer> anyone here experienced with nimterop? i'm getting a linker error that i don't know how to fix |
22:44:08 | FromDiscord | <nikki> @scott this is totally a taste / case thing for sure, but i feel like i find the former more readable |
22:48:44 | FromDiscord | <scott> π€· ok. that's fine. I prefer the latter but not so much that it overrides my opinions on things like UFCS or ARC |
22:51:29 | keisterfish | phytolizer: tell me what the problem is. |
22:54:07 | FromDiscord | <martinium> @ache of head no idea if it blocks full-fledged fingerprinting. I'll look into that. |
22:59:53 | FromDiscord | <martinium> does any one here have low-level linux knowledge? How does a procedure that identifies a "file" know what the file actually is? How is the "file" probed for this information? |
23:00:55 | mipri | the kernel hands out file descriptors, bare integers that map to files for specific processes |
23:01:10 | mipri | you can read through the syscalls in manpage 2. man 2 open, man 2 close, etc. |
23:01:42 | FromDiscord | <Phytolizer> sent a code paste, see https://play.nim-lang.org/#ix=2CDz |
23:02:05 | mipri | the kernel itself knows much more about files and has its own data structures, and works with filesystems to find things, but that's almost completely isolated to kernel development. syscalls are it |
23:03:27 | FromDiscord | <Phytolizer> i was able to "fix" it by compiling the file to a C static lib and linking it manually with passL, but there has got to be a better way |
23:06:19 | * | vicfred_ joined #nim |
23:06:47 | FromDiscord | <courtier> is there a way to change the process name, the one seen on task manager or activity monitor on mac |
23:07:05 | FromDiscord | <courtier> other than renaming the file |
23:08:34 | * | vicfred quit (Ping timeout: 246 seconds) |
23:10:16 | FromDiscord | <martinium> @mipri thanks |
23:10:44 | FromDiscord | <martinium> I found the man page for file utility and it seems to do a bunch of tests to get the type of info I am looking for. |
23:10:55 | FromDiscord | <martinium> kernel dev is way beyond my current knowledge level |
23:11:12 | mipri | I don't know if there's a way to do it on windows or mac. https://github.com/juancarlospaco/nim-osutil/blob/master/src/osutil.nim#L18 does it on linux. |
23:11:42 | mipri | you probably don't actually need kernel dev then. what are you wanting to do, precisely? |
23:12:46 | FromDiscord | <martinium> I was thinking of making a utility that can get useful metadata and identify any type of file on a system but written using nim |
23:13:00 | FromDiscord | <martinium> maybe if possible without having to go through C Libs native to the OS |
23:13:12 | FromDiscord | <martinium> but that seems like a far stretch without a direct hook into the kernel |
23:13:22 | * | tane quit (Quit: Leaving) |
23:13:24 | mipri | what? that's really doubtful |
23:13:30 | mipri | what kind of metadata are you talking about? |
23:14:05 | FromDiscord | <courtier> @mipri i guess its not worth it to try and find a way for windows and mac |
23:14:36 | mipri | man 2 stat has a bit. for file types, there's the extension and then there's 'magic', just reading a bit of the file and using a database to determine what it is by binary markers that files begin with |
23:15:21 | mipri | reimplementing man 3 file might be interesting in Nim, but you'll probably want to start with an existing database |
23:15:22 | FromDiscord | <martinium> that seems to be along the lines of what I am trying to do. More so after the knowledge and who knows what it can turn into later. |
23:18:09 | * | oprypin quit (Quit: Bye) |
23:18:17 | * | oprypin joined #nim |
23:33:26 | blueberrypie | i'm quite confused.... I'm doing the following |
23:33:26 | blueberrypie | (await httpClient.request(url, HttpGet)).headers["content-type"].contains("text/html") |
23:33:26 | blueberrypie | and nim fails whenever the content type isn't exactly "text/html" so "text/html; charset=utf-8" fails |
23:33:51 | blueberrypie | i'm i missing something obvious? |
23:36:04 | FromDiscord | <William_CTO> sent a code paste, see https://play.nim-lang.org/#ix=2CDL |
23:37:22 | FromDiscord | <William_CTO> (edit) "https://play.nim-lang.org/#ix=2CDL" => "https://play.nim-lang.org/#ix=2CDN" |
23:37:45 | * | mbomba joined #nim |
23:43:25 | * | vicfred_ quit (Quit: Leaving) |
23:53:32 | * | mbomba quit (Quit: WeeChat 2.9) |
23:59:49 | FromDiscord | <martinium> when working with sockets, how can I echo/print a received SYN ACK automatically after sending a connect? |