<< 31-10-2020 >>

00:00:23FromDiscord<Clyybber> Check out https://nim-lang.github.io/Nim/manual#threads
00:00:35FromDiscord<Clyybber> Especially the gcsafe section if you encounter more issues like taht
00:01:49FromDiscord<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:28FromDiscord<ElegantBeef> So clyybber i realized due to disruptek, probably should get a similar implementation to what i mean inside the nim compiler πŸ˜„
00:25:45FromDiscord<ElegantBeef> (edit) "mean" => "made"
00:26:03FromDiscord<ElegantBeef> Need that NimVM to be capable of relying on the compiler to save binary streams πŸ˜„
00:26:40FromDiscord<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:29FromDiscord<ElegantBeef> He suggested fusion but due to the implementation i figured it cant be inside fusion
00:35:37FromDiscord<Avatarfighter> honestly open a pr with your edits and defend them with your life
00:35:46FromDiscord<ElegantBeef> But i didnt touch the compiler
00:35:59FromDiscord<ElegantBeef> Which is my point
00:36:09FromDiscord<Avatarfighter> ah i didn't see the context
00:36:17FromDiscord<Avatarfighter> Why couldn't it be fusion?
00:36:39FromDiscord<ElegantBeef> Cause it relies on implementing procs
00:37:13FromDiscord<ElegantBeef> Since it relies on the compiler having the procs i'm calling, so i have no clue the feasibillity
00:37:50FromDiscord<ElegantBeef> I dont really know how you'd expose them only if the module streams or what have you
00:38:06FromDiscord<Avatarfighter> yeah i see the issue now
00:38:15FromDiscord<Avatarfighter> hm
00:38:42FromDiscord<ElegantBeef> It's also not a perfect binary stream since i only use biggest ints as that's what the PNodes expect
00:38:53FromDiscord<ElegantBeef> IE all ordinals write a 64bit int
00:42:24FromDiscord<ElegantBeef> Not really an issue but the bridge for interop uses biggest ints regardless what you use
00:42:53FromDiscord<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:24JsonScaresMeWhy is it that when I try to use "for i in items(myJArray): echo i" I get the entire JArray?
00:46:49JsonScaresMeLike I just stuffed you into a JArray, why can't I unstuff you...
00:47:15JsonScaresMe... Nevermind lol I made an oopsie.
00:47:18*JsonScaresMe quit (Remote host closed the connection)
00:49:32mipriwhat did you do?
00:51:54FromDiscord<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:55FromDiscord<ElegantBeef> (edit) "md" => "me"
00:52:52FromDiscord<ElegantBeef> Not that the 8/16/32 bit support is even remotely difficult to implement just a little tedious πŸ˜„
00:53:05FromDiscord<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:23FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2Cxw
00:57:00*abm quit (Quit: Leaving)
00:57:19*abm joined #nim
00:57:35FromDiscord<ElegantBeef> I'm uncertain how you'd get more informational parsing errors
00:57:41FromDiscord<ElegantBeef> I assume it'd be using the parsejson module
00:59:08FromDiscord<fl> scintillating, thank you. what's the best way to find out which procs actually raise exceptions?
00:59:27FromDiscord<ElegantBeef> The the manual for the modules typically state
01:00:55FromDiscord<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:22FromDiscord<ElegantBeef> Ah scowering the tutorial shows how to do get more information https://play.nim-lang.org/#ix=2CxA
01:07:47FromDiscord<Clyybber> @ElegantBeef I mean you are using a VM callback, right? So you are already using the compiler
01:07:55FromDiscord<Clyybber> writing compiler code that is;
01:09:01FromDiscord<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:31FromDiscord<Avatarfighter> tbh i feel like what you've made is worth PRing into the main code
01:09:39FromDiscord<Avatarfighter> its just I know someone else will disagree
01:09:48FromDiscord<ElegantBeef> Except what i made doesnt exactly just slide into the compiler
01:09:55FromDiscord<Avatarfighter> yeah i understand
01:10:23FromDiscord<ElegantBeef> Like nimscripter cant really even get added to the stdlib since it relies on the compiler
01:10:39FromDiscord<ElegantBeef> (edit) "compiler" => "compiler(Source code)"
01:11:02FromDiscord<Avatarfighter> Is there a way for you to refactor the code to make it more pluggable ?
01:11:03FromDiscord<ElegantBeef> So the closest i can think of would be to drop it in the compiler
01:11:14FromDiscord<ElegantBeef> Nope
01:12:14FromDiscord<Clyybber> not sure which parts should go into the compiler
01:12:17FromDiscord<Clyybber> or if any parts at all
01:12:37FromDiscord<Clyybber> or VM callbacks
01:12:49FromDiscord<Clyybber> my mind is kinda full of collisions and syms rn
01:13:06FromDiscord<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:26FromDiscord<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:45disruptekmaybe 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:39disruptekclyybber: awake?
03:10:58FromDiscord<windowsboy111> do u guys know any libs for HTML webpage rendering
03:11:18disruptekcan you be more specific?
03:11:29FromDiscord<windowsboy111> oh wait there's a #webdev channel
03:12:33FromDiscord<windowsboy111> uhh that can be coorperated into other GUI libs
03:12:47disruptek!repo webview
03:12:48disbothttps://github.com/daniel-j/nim-webview -- 9nim-webview: 11 15 3⭐ 1🍴 & 1 more...
03:12:56FromDiscord<windowsboy111> oh thx so muxh
03:13:00FromDiscord<windowsboy111> much
03:13:24disrupteki think there are a few webview libs.
03:13:45FromDiscord<windowsboy111> so it's a gtk one, hmm
03:14:12leorize[m]1the wxwidgets wrapper has webview support too
03:14:18leorize[m]1!repo pmunch/wxnim
03:14:20disbotno results 😒
03:14:35FromDiscord<windowsboy111> I knew that one already
03:15:07FromDiscord<windowsboy111> currently I need to decide what GUI lib I should use
03:16:04*muffindrake quit (Ping timeout: 240 seconds)
03:16:24FromDiscord<flywind> !repo Neel
03:16:24disbothttps://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:38FromDiscord<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:47ForumUpdaterBotNew 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:21FromDiscord<flywind> https://github.com/nim-lang/Nim/blob/bc9a52127092680c662e0456797cbd1278203360/lib/pure/unittest.nim#L626
07:03:33FromDiscord<flywind> What's the use of `inspectArgs`?
07:08:13FromDiscord<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:07ForumUpdaterBotNew 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:15FromDiscord<iWonderAboutTuatara> Hey is there an image library that isn't overly complicated?
09:31:04FromDiscord<iWonderAboutTuatara> I want to be able to take an image format and get a representation of the pixel grid of the image
09:31:18FromDiscord<iWonderAboutTuatara> Be able to do whatever I want to that grid, then export a completely seperate image
09:31:36FromDiscord<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:05leorize[m]1!repo flippy
09:38:06disbothttps://github.com/treeform/flippy -- 9flippy: 11Flippy is a simple 2d image and drawing library. 15 49⭐ 6🍴
09:38:27leorize[m]1iWonderAboutTuatara: hopefully that will do
09:39:11FromDiscord<iWonderAboutTuatara> I tried this one, couldn't get it to work
09:39:28FromDiscord<iWonderAboutTuatara> I wasn't able to make images params for procs
09:39:55FromDiscord<lqdev> nimPNG too
09:40:08FromDiscord<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:18FromDiscord<iWonderAboutTuatara> Iirc nimpng doesn't have jpeg support
09:40:45FromDiscord<iWonderAboutTuatara> Seemed solid though besides that
09:48:39*qwertfisch is now known as zombiefisch
09:52:17FromDiscord<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:58PrestigeI'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:18PrestigeI basically want to truncate the non-significant digits of a float
10:40:46Prestigeor "meaningful digits"
10:41:21FromDiscord<lqdev> there isn't
10:41:35PrestigeD: Ok I'll write a function then
10:41:44FromDiscord<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:44Prestigeapparently this is deprecated actually, says to use strformat
10:52:35*Q-Master joined #nim
10:53:14YardanicoPrestige: it's not deprecated
10:53:26Yardanicoit 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:31Yardanico!status
11:29:34FromDiscordUptime - 1 week, 3 days, 15 hours, and 52 minutes
11:29:34*tane_ quit (Quit: Leaving)
11:46:50sealmoveIt's so awesome that we have comments in AST
11:59:41FromDiscord<Rika> Docs, not comments
11:59:42*superbia joined #nim
12:05:02ZevvnnkCommentStmt(), 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:47sealmovewell, the variant is called `nnkCommentStmt` :P
12:24:39*lritter joined #nim
12:26:47ForumUpdaterBotNew thread by Jiyinyiyong: How to handle a blocking task(fswatch)?, see https://forum.nim-lang.org/t/7019
12:31:24FromDiscord<flywind> Why Nim parser gives different result in windows and linux?
12:31:47Zevvflywind: elaborate. Examples?
12:32:04FromDiscord<flywind> `0.99.99` -> tkAccent + tkStrLit(`0.99.99`) in windows
12:33:27FromDiscord<flywind> tkAccent + tkFloatLit(99.98999999999999) in linux
12:33:52FromDiscord<flywind> https://github.com/nim-lang/Nim/issues/14407
12:33:53disbotβž₯ Float-like part of a variable identifier is changed in [XDeclaredButNotUsed] Hint ; snippet at 12https://play.nim-lang.org/#ix=2soE
12:34:41FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2CzT
12:36:54FromDiscord<flywind> The parser is the same, but the value is differnet.
12:36:59FromDiscord<flywind> (edit) "differnet." => "different."
12:37:34FromDiscord<flywind> In windows `99.99` tkFloatLit
12:38:00FromDiscord<flywind> in linux `99.98999999999999` tkFloatLit
12:43:23FromDiscord<flywind> I see, it is OS specific.
12:44:39FromDiscord<flywind> with `nim secret`, `0.99` is displayed as `0.99` in windows and `0.98999999999999` in linux.
12:48:03FromDiscord<flywind> (edit) with `nim secret`, `99.99` is displayed as `99.99` in windows and `99.98999999999999` in linux.
12:51:41FromDiscord<flywind> So float in Nim is OS specific?
12:53:35sealmoveProbably only the representation
12:54:00sealmoveI mean printf could work differently
12:54:01Zevvformatfloat.nim
12:54:08Zevvuses c_sprintf under the hood
12:54:11Zevvwith %.16g
12:55:03*PMunch joined #nim
12:55:10ZevvThere 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:17Zevvall of those were abaonded, afaik
12:55:41FromDiscord<flywind> what about float in VM?
12:56:21sealmovefly, it's only when you print them that they seem different
12:56:36sealmovethey have to get to your screen somehow
12:57:13FromDiscord<flywind> It causes issue https://github.com/nim-lang/Nim/issues/14407
12:57:14disbotβž₯ Float-like part of a variable identifier is changed in [XDeclaredButNotUsed] Hint ; snippet at 12https://play.nim-lang.org/#ix=2soE
12:57:50Zevvno way haha
12:58:14sealmoveoh this is... lol
12:58:45sealmovethis seems bad
12:59:16sealmovec_sprintf is probably used internally (for other uses than printing to screen)
12:59:36sealmoveyeah it shouldn't be
13:00:50ForumUpdaterBotNew thread by KnorrFG: Passing iterators as arguments, see https://forum.nim-lang.org/t/7020
13:01:45FromDiscord<flywind> Is it possible Nim parser parses everything between tkAccent as string?
13:02:06FromDiscord<Clyybber> it doesn't seem like it does
13:02:11FromDiscord<Clyybber> otherwise why would it change?
13:02:43sealmovegood question
13:05:14sealmoveanother question. how is this possible? https://play.nim-lang.org/#ix=2CA1
13:06:12FromDiscord<Clyybber> ? seems expected
13:06:54sealmoveyeah, tkAccent is to escape identifier rules
13:08:47FromDiscord<flywind> https://play.nim-lang.org/#ix=2CA4
13:09:18FromDiscord<flywind> https://play.nim-lang.org/#ix=2CA5
13:09:50FromDiscord<Clyybber> this is kinda funny ngl
13:10:07FromDiscord<flywind> https://play.nim-lang.org/#ix=2CA6
13:10:28FromDiscord<Clyybber> ah, no Its not related to floats in this case
13:10:52FromDiscord<Clyybber> eh, nevermind, this makes perfect sense
13:11:29FromDiscord<Clyybber> https://play.nim-lang.org/#ix=2CA7
13:12:10FromDiscord<flywind> What's the difference?
13:12:19FromDiscord<Clyybber> Yours doesn't compile
13:12:25FromDiscord<Clyybber> because `99.99` is undefined
13:12:35FromDiscord<Clyybber> either define it or change the param to untyped
13:12:53*superbia quit (Quit: WeeChat 2.9)
13:13:04FromDiscord<Clyybber> but yeah, if you change that it prints as 99.9899999999
13:13:07sealmoveyeah sure, it doesn't cause any important issues like this, but still `99.99` is changed to something else
13:13:08FromDiscord<flywind> I have posted the compile version at third link
13:13:24sealmovehmm, maybe it's just toStrLit()
13:13:46FromDiscord<Clyybber> @flywind does it get parsed as tkFloat?
13:13:47sealmoveyeah, it should be
13:13:58FromDiscord<flywind> yes it is
13:14:01FromDiscord<Clyybber> it probably shouldn't
13:14:08FromDiscord<Clyybber> because its inside accents
13:14:43FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2CAa
13:15:00FromDiscord<Clyybber> but this is a design question; maybe its better to parse it as tkFloat
13:15:01FromDiscord<flywind> `v0.99.99` is parsed like this
13:15:08FromDiscord<Clyybber> huh
13:15:11FromDiscord<Clyybber> Interesting
13:15:41FromDiscord<flywind> This is in windows
13:16:00FromDiscord<Clyybber> I think this may be by design; delegating actually turning the insides of `` into literals until the very end
13:16:14FromDiscord<Clyybber> so that `` can be used more freely in for example quote
13:16:38sealmoveguys it still might be related to printing only
13:16:44FromDiscord<Clyybber> yeah
13:17:04FromDiscord<Clyybber> its a combination; but the printing is the obvious part that should get fixed
13:17:10FromDiscord<Clyybber> the other is more of a design thing
13:17:16FromDiscord<Clyybber> and its probably this way for good reason
13:18:00FromDiscord<flywind> I agree. `Python` keeps the same printing results for `99.99` in windows and linux,
13:20:01*neceve joined #nim
13:20:15sealmovehmm dumpTree: `99.99` returns AccQuoted(Ident"99.55") while `99.99.99` errors with "invalid number: '99.99.99
13:21:15sealmovehttps://play.nim-lang.org/#ix=2CAe
13:21:39sealmove`v99.99.99` has no issue
13:22:08FromDiscord<Clyybber> ok this is a bug then
13:22:18FromDiscord<Clyybber> it should be parsed as Ident too
13:22:28sealmoveyeah
13:24:17sealmovedumpTree: `v99.99.99` returns AccQuoted(ident"v99", ident".", ident"99.98999999999999")
13:24:28sealmoveeven more weird
13:24:46FromDiscord<flywind> this is the issue I mentioned.
13:25:05sealmoveyes sorry flywind, now I understand
13:25:50sealmoveit 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:58sealmovefor example should `a.b` be AccQuoted(ident"a.b") or AccQuoted(ident"a", ident".", ident"b") as it is?
13:28:47FromDiscord<Clyybber> thats the question
13:29:38FromDiscord<flywind> if it is by design, at least we should have documentation.
13:40:25FromDiscord<flywind> Another question? If this issue is really easy? https://github.com/nim-lang/Nim/issues/15628
13:40:26disbotβž₯ coro lib doesn't work with orc/arc
13:41:01FromDiscord<flywind> I don't found `GcHeap` for `arc/orc`?
13:41:05FromDiscord<flywind> (edit) "found" => "find"
13:41:28FromDiscord<Clyybber> I think you can just put all of these _setStackBottom and so on in a when not defined(arc)
13:41:40FromDiscord<Clyybber> but I'm not completely sure
13:41:49FromDiscord<Clyybber> just try it I guess
13:42:09FromDiscord<flywind> I have tried that, but it doesn't work.
13:43:35FromDiscord<flywind> It needs global `GcHeap` to work.
13:45:25FromDiscord<flywind> I see I will try that.
13:48:48*tane joined #nim
14:01:56federico3https://sourcehut.org/
14:02:14federico3the CI in sourcehut is quite nice
14:03:48FromDiscord<Clyybber> we are using it for bsd tests
14:08:13FromDiscord<Yardanico> yeah, for openbsd + freebsd
14:08:20FromDiscord<Yardanico> and maybe we'll get netbsd if sourcehut adds that
14:11:53FromGitter<jrfondren> is there a shorthand for `import foo; import foo / [a, b, c]` ?
14:12:11disrupteknope.
14:13:35FromGitter<jrfondren> huh, alright
14:13:55FromDiscord<Clyybber> why would there?
14:15:28*rusua quit (Quit: Connection closed for inactivity)
14:15:36FromGitter<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:52FromGitter<jrfondren> also Rust has it :p
14:15:59FromDiscord<Clyybber> I never encountered this pattern :D
14:16:18disrupteki had a nightmare about it a couple weeks ago.
14:16:35FromDiscord<Clyybber> most pkgs are structured in a way so that foo/[a, b, c] are parts of foo
14:16:46FromDiscord<Clyybber> so importing foo makes import foo/[a, b, c] unneccessary
14:16:50FromDiscord<Clyybber> but YMMV
14:17:12FromGitter<jrfondren> aren't they organized that way *because* there's no alternative?
14:17:42*solitudesf quit (Ping timeout: 256 seconds)
14:18:20disruptekthere's no alternative that adds precision.
14:18:25disruptekso, yes.
14:19:11disrupteksome people simply make a foo.nim that includes foo/* to produce the effect you want. we call those people `fools`.
14:21:09FromGitter<jrfondren> anyway this works: `import foo, foo/[a, b, c]`
14:21:42disruptekweird.
14:21:55FromDiscord<Clyybber> whats weird
14:22:09disruptekspecifying what you want to import causes those things to be imported.
14:22:24FromDiscord<Clyybber> truly a mystery
14:22:45disruptekmy mind is blown and the edibles haven't even kicked in.
14:22:57FromGitter<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:12disruptekwhat problem?
14:23:35FromDiscord<Clyybber> that there is no shortcut
14:23:41Zevvbut there was
14:23:42Zevv:)
14:24:02disruptekZevv: you get his arms and i'll get his legs.
14:24:09FromDiscord<Clyybber> nooo
14:24:20FromDiscord<Clyybber> I'm close to the early sym solution
14:24:25Zevvno way
14:24:27disrupteki don't believe it.
14:24:29FromDiscord<Clyybber> just leave me be for a while
14:24:41Zevvhe's just saying that so you don't beat him up disruptek
14:25:00disruptekmy fucking water is frozen. i hate this shithole country.
14:25:02FromDiscord<Clyybber> no no no, wait I'm pushing
14:26:18disruptekif i want to make coffee, i'm going to have to use bentley's water dish.
14:27:24FromDiscord<Clyybber> I don't get how you can have this many problems with cyclic imports
14:27:39FromDiscord<Clyybber> as in I never have them
14:28:31disrupteki have them in the compiler sometimes, but it's rarely a problem.
14:28:33*PMunch quit (Remote host closed the connection)
14:28:42disruptekand it will be fixed in 1.8, so whatever.
14:28:51FromDiscord<Clyybber> I think many people don't know about the current semantics
14:29:02*PMunch joined #nim
14:29:07disruptekfor packages, you mean?
14:29:11FromDiscord<Clyybber> no
14:29:16FromDiscord<Clyybber> for cyclic imports
14:29:23disruptekpackages are very poorly documented.
14:29:27FromDiscord<Clyybber> no
14:29:31disruptekyes
14:29:32FromDiscord<Clyybber> I'm not talking packages
14:29:36disrupteki know.
14:29:48FromDiscord<Clyybber> is it the case that you don't know about it
14:29:50FromDiscord<Clyybber> ?
14:30:02disruptekcyclic imports?
14:30:10FromDiscord<Clyybber> yeah
14:30:22disrupteki dunno, what are you talking about?
14:30:24FromDiscord<Clyybber> or are you working in the postal office/
14:30:56disrupteki poisoned two IT workers at the local health center, so i might be able to get a job there.
14:31:03disruptekthe irony...
14:31:08FromDiscord<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:11disruptekyes, well i've only really encountered this in the compiler.
14:32:30disruptekand obviously, i've worked around it.
14:32:51FromDiscord<Clyybber> IMO your project structure is fucked if that doesn't work
14:33:14disruptekit's the only large and incestuous project i've worked on that was too backwards to consider eating its own dogfood.
14:37:20FromDiscord<Clyybber> lets see if this works
14:37:43*PMunch quit (Remote host closed the connection)
14:37:58FromDiscord<Clyybber> one thing I don't like is when your n argument and the result alias in mysterious ways
14:38:24FromDiscord<Clyybber> and you are not sure if the callee is going to continue processing with the n or the result
14:38:35FromDiscord<Clyybber> (edit) "callee" => "caller"
14:38:46disruptekhey man, are you high right now?
14:39:03disruptekdude, it's okay if you are.
14:39:25FromDiscord<Clyybber> ok
14:39:32FromDiscord<Clyybber> ay
14:51:56*mathsaey left #nim (#nim)
14:54:19FromDiscord<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:39FromDiscord<windowsboy111> (I asked this question this morning already lol)
14:56:22FromDiscord<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:26ZevvClyybber: 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:37FromDiscord<Clyybber> ah yeah
15:13:43Zevvand 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:13FromDiscord<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:12FromDiscord<zetashift> Depending on what you need Fidget might also be an alternative
16:13:43FromGitter<jrfondren> https://nim-lang.moe/on-nim.html#importself
16:18:40FromDiscord<Clyybber> jrfonden: You can do import foo/["../foo", a, b, c] but its just cursed :D
16:18:49FromDiscord<Clyybber> and is not really shorter
16:19:31FromGitter<jrfondren> wow that's horrifying. thanks :)
16:20:21disrupteki wonder if procs-follow-types could conceivably go into 1.8.
16:21:20disruptekit's basically a documentation change.
16:22:43disruptekyou know what i love?
16:23:31disruptekchrome 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:44disruptekdoesn't anyone test this shit?
16:26:22PMunchHmm, can I deal with cookies in httpClient?
16:26:28disruptekyes.
16:26:58disruptekit's the one field that has a relaxed spec on headers.
16:27:09PMunchHuh?
16:27:15disruptekwhich, come to think of it, means it's a total crap-shoot as to whether it works in nim's httpclient lib.
16:27:33disruptekyou can have multiple Cookie: headers in http-1.1.
16:27:50disruptekthis is not the case for any other headers.
16:28:33supakeendisruptek: I'm working on a PR for that.
16:28:58supakeenwhich i'm updating tomorrow :)
16:28:59disrupteki 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:10disruptekthat's how fucking lazy i am.
16:29:12supakeenwell this specifically is a httpcore thing
16:29:16disrupteki know.
16:29:21disrupteki've solved it twice now.
16:30:21supakeenwe'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:35disruptekyeah; that's why i didn't comment on your pr.
16:31:00disruptek2020 is the year of, "i don't care."
16:31:13supakeensounds like a good year
16:31:29disruptekit sucks. but, the good news is that my water melted.
16:31:41disruptekprobably for the last fucking time before may of 2021.
16:31:49supakeenwhere do you even live
16:31:54supakeennorth pole?
16:31:57supakeenare you santa?
16:32:18disrupteki'm in the state with the fewest covid cases in the US.
16:32:24supakeenalaska then
16:32:25disruptekbecause fuck 'em.
16:36:21disruptekand why would you say alaska, anyway?
16:36:45disruptekpeople have strange ideas about alaska.
16:43:32supakeendunno because i know as much about the US as the average American knows about the EU :)
16:44:24disruptekbut you're from brazil.
16:45:53supakeenclose enough
16:46:12FromDiscord<Idefau> argentina
16:46:25disrupteki know, but brazil sounds better.
16:46:55disruptekmaybe i just have brazilians on the brain.
16:47:16disruptekwhen the water freezes, it's time to grow out the brazilian, ya feel?
16:47:21supakeenI've lived in the EU since I was a wee kid though; currently the Netherlands :)
17:03:20FromDiscord<windowsboy111> @zetashift I see...
17:04:05FromDiscord<windowsboy111> Since I just tried out wxnim, it works, but not that practical...
17:04:14FromDiscord<windowsboy111> but I have to admit it is 999 times faster
17:09:07FromDiscord<zetashift> you could try fidget, nimx or nigui: https://github.com/trustable-code/NiGui
17:09:27FromDiscord<zetashift> oh supakeen another dutch person! that makes 3!
17:18:12Zevvwho lives where? I'm in Amersfoort
17:18:28ZevvOne in Den Haag, and the third?
17:29:51*sealmove quit (Quit: WeeChat 2.9)
17:30:25FromDiscord<zetashift> I'm in Rotterdam
17:46:13Zevvwell, you guys can wave and shout to each other then!
17:47:29disruptekspeed of light communication ftw.
17:51:45FromDiscord<Daniel> https://tenor.com/view/europe-european-union-europe-failed-failed-gif-13963686
17:52:43*NimBot joined #nim
17:58:20PMunchHaha, that is a great loading gif :P
18:10:35ZevvPMunch: did you figure out your fd polling yet?
18:10:54PMunchOh yeah, did it just after the stream yesterday
18:11:31Zevvright
18:12:02*astronavt joined #nim
18:13:54PMunchPretty simple actually
18:14:12PMunchUsed the selectors module in stdlib and a code snippet of someone who did it in C
18:14:29PMunchBasically just select on the X connection with a timeout
18:27:05*PMunch quit (Quit: leaving)
18:27:32*PMunch joined #nim
18:27:54PMunchRealised 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:17disruptekwhat are you afraid of?
18:33:09PrestigeHe's going trick or treating, of course
18:33:58disrupteki had a dream i abducted a six year old girl last night.
18:35:01disrupteki want you to think about that while you're trying to sleep tonight.
18:38:19Prestigefor why?
18:40:03FromDiscord<lqdev> how would i go about creating a graph for `div` on desmos?
18:40:12disruptekwho is desmos?
18:40:14FromDiscord<lqdev> cause this is a graph for floorMod https://www.desmos.com/calculator/kqdv6lvj8w
18:40:23FromDiscord<lqdev> but i need a graph for `mod` and `div`
18:40:29FromDiscord<lqdev> but `mod` needs `div`
18:40:46FromDiscord<lqdev> oh right, `trunc(x / y)`
18:41:56disruptekneat 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:06keisterfish~disruptek is the rapscallion stallion.
18:59:07disbotdisruptek: 11unsafe at any speed.
18:59:07disbotdisruptek: 11:disruptek:
18:59:07disbotdisruptek: 11an unsafe nil deref
19:13:52*hnOsmium0001 joined #nim
19:16:48*astronavt joined #nim
19:23:36FromDiscord<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:46FromGitter<jrfondren> just a little bit wrecked on performance: https://github.com/jrfondren/chrestomathy/tree/master/geobench
20:43:38FromGitter<jrfondren> though that's a library written to use viewtypes where I hit a bug and said "welp, s/openArray/string/g"
20:49:34FromDiscord<MiniApple> how to check type in nim?
20:50:06mipri!eval echo "hi".type
20:50:09NimBotstring
20:54:32*Axiomatic joined #nim
20:54:52FromDiscord<MiniApple> thank
21:00:45FromDiscord<notchris> happy halloween all
21:07:47FromDiscord<Pepe> hi all, object types are always copied on assignment and when passed as a parameter ?
21:10:29mipriobjects 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:41mipritake 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:23miprifor example a simple: `var a = "hello"`, `var b = a` compiles with an inserted `wasMoved(a)` rather than a copy
21:12:44keisterfishdepending on who you ask, any object smaller than float.sizeof*3 is passed by value.
21:14:56FromDiscord<Pepe> and why not just using ref objects to avoid possible copies ?
21:15:26keisterfishsometimes what you want is a value.
21:15:41FromDiscord<Pepe> I mean, what is the point of using value objects vs refs?
21:15:52keisterfishthey can be contiguous in memory.
21:16:13miprihttps://isocpp.org/wiki/faq/value-vs-ref-semantics
21:16:14keisterfishthey can follow mutability semantics.
21:17:19keisterfishthey can break your inheritance code in subtle ways that are fun to try to reason about.
21:20:55FromDiscord<Pepe> not very easy to understand from a Python guy πŸ˜†
21:21:49keisterfishi guess pointers are a bit of a mind-fuck when you are first exposed to them.
21:23:59keisterfishpointers were so young that, when we met, i had no reason to be afraid of them.
21:24:12miprieasy rule, if you want nil, go with ref object, otherwise go with object
21:25:46FromDiscord<Pepe> so you should prioritize objects
21:25:56keisterfishyes.
21:26:44miprithe 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:48FromDiscord<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:53keisterfishunless you need inheritance, of course.
21:27:06FromDiscord<Pepe> (edit) "use" => "used"
21:28:36FromDiscord<MiniApple> what is macros
21:28:47keisterfish~manual
21:28:48disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html
21:28:48disbotmanual: 11just good to Ctrl+F in cases like this
21:29:13keisterfishthat's a funny footnote.
21:29:22FromDiscord<MiniApple> hmm
21:29:30FromDiscord<MiniApple> i didn't understand very well
21:30:08FromDiscord<Pepe> thanks guys
21:30:33miprithere's a macro tutorial as well: https://nim-lang.org/docs/tut3.html
21:31:38FromDiscord<MiniApple> i already read the tutorial
21:33:16miprithe second sentence of the tutorial tells what they are.
21:33:23mipriand the examples in the tutorial show you what they can do.
21:33:44mipriso what are you asking, really?
21:33:55FromDiscord<MiniApple> ok
21:33:55keisterfishthey want you to read to them.
21:35:13miprino, I completely believe that macros will seem mysterious or confusing to someone who's not used them a bunch
21:35:49miprithey don't pass out copies of Let Over Lambda in public school, you know.
21:36:04keisterfishLOL?
21:37:09mipriyeah. 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:52mipri'let' over 'lambda' is also visually resembles macros in Lisp.
21:39:37miprithe best part of that tutorial is after "With Power Comes Responsibility"
21:42:54FromDiscord<scott> is there no way to call `mapIt` (or similar) on an iterator like you can on a `seq`?
21:45:21FromDiscord<Yardanico> there is
21:45:27FromDiscord<Yardanico> toSeq(youriter()).mapIt(...)
21:45:47FromDiscord<Yardanico> toSeq basically gets all values from the iterator
21:46:02FromDiscord<Yardanico> btw, have you seen collect?
21:46:09FromDiscord<Yardanico> I think it would be more performant and better to use it if you can
21:46:19FromDiscord<Yardanico> https://nim-lang.org/docs/sugar.html#collect.m%2Cuntyped%2Cuntyped
21:49:25*natrys quit (Quit: natrys)
21:49:48mipriNim 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:30miprihttps://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators <- closure iterators are different
21:50:48Zevvright
21:57:56*blueberrypie joined #nim
21:58:41blueberrypiehey 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:07keisterfish!repo bytes2human
21:59:07disbothttps://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:18blueberrypiethx
22:05:20Zevvblueberrypie: https://play.nim-lang.org/#ix=2CDn
22:06:04Zevvit's a tad more generic, it's not bytes-specific.
22:06:11Zevvnote it's 1000 based, not 1024
22:06:45keisterfishwho can spare that many bytes?
22:09:04FromDiscord<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:39FromDiscord<scott> (edit) "y.mapIt(someProc(it)`" => "y.mapIt(someProc(it))`"
22:34:43FromDiscord<martinium> anyone here have in-depth knowledge of how web browsers volunteer information and allow for fingerprinting?
22:35:29FromDiscord<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:40FromDiscord<martinium> (edit) "and" => "an"
22:35:48FromDiscord<martinium> (edit) "i" => "is"
22:36:09FromDiscord<martinium> really annoying the amount of sites tracking you everywhere on the interney
22:36:16FromDiscord<martinium> (edit) "interney" => "internet."
22:36:51FromDiscord<ache of head> Doesn't Brave do that?
22:36:58FromDiscord<ache of head> https://brave.com/
22:43:01FromDiscord<Phytolizer> anyone here experienced with nimterop? i'm getting a linker error that i don't know how to fix
22:44:08FromDiscord<nikki> @scott this is totally a taste / case thing for sure, but i feel like i find the former more readable
22:48:44FromDiscord<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:29keisterfishphytolizer: tell me what the problem is.
22:54:07FromDiscord<martinium> @ache of head no idea if it blocks full-fledged fingerprinting. I'll look into that.
22:59:53FromDiscord<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:55miprithe kernel hands out file descriptors, bare integers that map to files for specific processes
23:01:10mipriyou can read through the syscalls in manpage 2. man 2 open, man 2 close, etc.
23:01:42FromDiscord<Phytolizer> sent a code paste, see https://play.nim-lang.org/#ix=2CDz
23:02:05miprithe 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:27FromDiscord<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:47FromDiscord<courtier> is there a way to change the process name, the one seen on task manager or activity monitor on mac
23:07:05FromDiscord<courtier> other than renaming the file
23:08:34*vicfred quit (Ping timeout: 246 seconds)
23:10:16FromDiscord<martinium> @mipri thanks
23:10:44FromDiscord<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:55FromDiscord<martinium> kernel dev is way beyond my current knowledge level
23:11:12mipriI 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:42mipriyou probably don't actually need kernel dev then. what are you wanting to do, precisely?
23:12:46FromDiscord<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:00FromDiscord<martinium> maybe if possible without having to go through C Libs native to the OS
23:13:12FromDiscord<martinium> but that seems like a far stretch without a direct hook into the kernel
23:13:22*tane quit (Quit: Leaving)
23:13:24mipriwhat? that's really doubtful
23:13:30mipriwhat kind of metadata are you talking about?
23:14:05FromDiscord<courtier> @mipri i guess its not worth it to try and find a way for windows and mac
23:14:36mipriman 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:21miprireimplementing man 3 file might be interesting in Nim, but you'll probably want to start with an existing database
23:15:22FromDiscord<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:26blueberrypiei'm quite confused.... I'm doing the following
23:33:26blueberrypie(await httpClient.request(url, HttpGet)).headers["content-type"].contains("text/html")
23:33:26blueberrypieand nim fails whenever the content type isn't exactly "text/html" so "text/html; charset=utf-8" fails
23:33:51blueberrypiei'm i missing something obvious?
23:36:04FromDiscord<William_CTO> sent a code paste, see https://play.nim-lang.org/#ix=2CDL
23:37:22FromDiscord<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:49FromDiscord<martinium> when working with sockets, how can I echo/print a received SYN ACK automatically after sending a connect?