<< 04-07-2019 >>

00:40:34*vlad1777d__ quit (Ping timeout: 246 seconds)
01:40:15*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:15:14*dddddd quit (Remote host closed the connection)
02:17:46*vlad1777d__ joined #nim
02:23:05*lritter quit (Ping timeout: 258 seconds)
02:42:02*jokul left #nim ("Leaving")
02:49:04*leorize quit (Ping timeout: 260 seconds)
02:50:21*leorize joined #nim
03:01:21*jokul joined #nim
03:29:57*jokul quit (Remote host closed the connection)
03:30:15*jokul joined #nim
03:57:19*NimBot joined #nim
03:57:22*zyklon joined #nim
03:57:35FromGitter<zacharycarter> IMO - Spring Framework was not fun at all to use and revolved heavily around IoC / DI - that was its primary focus
03:57:40*uvegbot quit (Quit: Konversation terminated!)
03:58:12FromGitter<zacharycarter> trying to track down where an implementation was configured and where it was used, etc... was annoying to say the least, especially in a new code base
03:58:46FromGitter<zacharycarter> I know about the purported benefits - but I rarely saw them pay off
04:26:27FromGitter<Varriount> @zacharycarter Interestingly, I've been working with an application that uses Spring.
04:28:07FromGitter<Varriount> *Theoretically* it has a bunch of extension points, but debugging those extension points ("why isn't this configuration file being picked up") is quite difficult to do.
04:34:35*stefanos82 joined #nim
04:39:53*nsf joined #nim
05:17:25*lf-araujo_ joined #nim
05:19:33*lf-araujo quit (Ping timeout: 252 seconds)
05:19:34*lf-araujo_ is now known as lf-araujo
05:21:54*brakmic joined #nim
05:29:55*brakmic quit (Ping timeout: 268 seconds)
05:30:30*brakmic joined #nim
05:32:07*shashlick_ quit (Ping timeout: 246 seconds)
05:34:13*ertp07 quit (Read error: Connection reset by peer)
05:35:55*ertp07 joined #nim
05:43:47*narimiran joined #nim
05:52:59*absolutejam3 joined #nim
05:59:39FromGitter<zacharycarter> @Varriount - yeah, it can be extremely annoying
05:59:57FromGitter<zacharycarter> but I have a feeling that has more to do with the implementation of the framework itself vs the concept of IoC
06:01:14*solitudesf joined #nim
06:01:17FromGitter<zacharycarter> still though - when you use a DI framework like Spring I feel like you spend more time configuring your project and implementing the various interfaces provided and then you rarely if ever actually change those implementations or re-use them in a lot of places
06:01:50FromGitter<zacharycarter> I suppose it depends entirely on how big / complex your project is - but we were always building services in our projects and I never say DI pay off dividends
06:02:07FromGitter<zacharycarter> and I did this for a number of years
06:04:30FromGitter<zacharycarter> @krux02 - do you have any resource recommendations for learning Scala?
06:18:35*lf-araujo quit (Ping timeout: 250 seconds)
06:22:35*couven92 joined #nim
06:33:26*absolutejam3 quit (Ping timeout: 268 seconds)
06:37:36*leorize_ joined #nim
06:38:12*leorize quit (Ping timeout: 260 seconds)
06:46:04*ertp07 quit (Ping timeout: 252 seconds)
06:46:40*ertp07 joined #nim
06:51:16*krux02 joined #nim
06:57:07*ertp07 quit (Ping timeout: 245 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:20*gmpreussner joined #nim
07:11:31*ertp07 joined #nim
07:11:52*purebadger joined #nim
07:35:02*traviss joined #nim
07:35:09*Travis__ joined #nim
07:35:31*Travis__ left #nim (#nim)
07:43:51travissanyone know if there is a way to deserialize js objects where the keys don't have quotes? I am hoping to be able to do `let foo = parseJson(""" {foo: 1} """)`
07:44:16disrupteksadly, that's not json.
07:46:14travissyeah, i have a large js object file i'm hoping to avoid using quotes all the time.
07:46:20*leorize_ quit (Ping timeout: 260 seconds)
07:47:35disruptekare you composing this file by hand?
07:47:46travissmaybe i'll look at converting to yaml. i think i can still use to() with yaml..
07:47:58travissyeah, i'm typing it by hand right now
07:50:20*leorize_ joined #nim
07:50:21disrupteksomething with support for comments would be my suggestion.
07:51:16FromGitter<rokups> i noticed that yaml is not that human-friendly once file grows very big
07:51:42FromGitter<mratsim> that's because big files are not human friendly ;)
07:52:31FromGitter<rokups> but for some reason json or even well-formed xml is easier to deal with than yaml. yaml is just too complex
07:53:26travissyeah i think i agree now that i'm looking at some yaml. i wish there was a format which resembled nim/python (no curly braces and respects indentation) without quoted keys.
07:53:41disruptekmaybe you should wrap dhall for us. ;-)
07:54:12travissi haven't heard of it. i'll have a look.
07:56:18FromGitter<rokups> there always is http://openddl.org/
07:56:38FromGitter<rokups> i have not used it but looks good on paper
07:58:00travissdisruptek: do you have a link to the dhall project you're referring to?
07:58:26disruptekdhall-lang.org
07:59:40FromGitter<rokups> functions in configuration file..? ill pass :]
07:59:59FromGitter<rokups> and i said yaml was too complex :D
08:01:45travissyeah, looks like a neat project, but more than what I need right now.
08:02:08ehmryits natural if you are comming from nix, but, maybe only if you are coming from nix
08:05:54*floppydh joined #nim
08:07:00*dwdv joined #nim
08:31:52Araqhttps://www.twitch.tv/araq4k it's streaming time
08:32:02Araqeventually I'll also figure out how to record it
08:32:32FromGitter<rokups> obs must be able to dump video to the file as well
08:32:56Araqmy obs doesn't support it anymore
08:33:06Araqit reports some error and then refuses
08:33:33FromGitter<rokups> odd. well dunno, only thing i use obs for is replay buffer in case anything fun happens on my gaming sessions ^_^
08:56:28leorize_twitch doesn't record streams automatically?
08:57:43TangerHmmm, when I wrap my AsyncSocket in an SL context with wrapSocket or wrapConnectedSocket, it seems to double up the connection
08:59:07TangerAre there still many issues with ssl and async?
08:59:12*Vladar joined #nim
08:59:41*absolutejam3 joined #nim
09:04:13*absolutejam3 quit (Ping timeout: 245 seconds)
09:04:40narimiranleorize_: i thought it does, but Araq doesn't seem to make it work
09:12:32*lf-araujo joined #nim
09:21:27*lf-araujo quit (Ping timeout: 250 seconds)
09:22:48*tjmac joined #nim
09:28:52FromGitter<alehander42> Idlework, sorrrry!
09:41:12AraqTanger, I think you are not supposed to do wrapConnectedSocket on your own
09:43:02*kuon joined #nim
09:44:55*lf-araujo joined #nim
09:46:23*absolutejam3 joined #nim
09:46:27livcdPMunch: i cant find your blog
09:46:50livcdgot it!
09:46:55kuonHello, I have an existing C app I'd like to extend with nim code. I use meson for building, and I am wondering what approach you recommend? Should I build nim code to .c and add this to my meson build, or should I write a main.nim and call C and nim code from there, having nim produce the final binary?
09:48:37Zevvkuon: I guess there is no single best way - I've used both approaches, whatever suits you best. Compiling the Nim code yourself is not trivial, but very doable.
09:49:14ZevvI think a lot depends on where you want your 'main' to live. If you are ok with Nim taking the lead, you could also see if you can compile your C code to a lib and link to that.
09:49:16FromDiscord_<djazz> Yes, Twitch can record your streams. They will be available for 2 weeks I think?
09:49:34FromDiscord_<djazz> You can keep/download them if you want too
09:52:39kuonI guess having nim take the lead and compile it all might be easier. I am just wondering how I can reproduce the meson build with nim. Bus as you said, I could build a lib with meson.
09:52:53*lf-araujo quit (Read error: Connection reset by peer)
09:53:04*lf-araujo joined #nim
09:53:45kuonI usually use lua for this kind of "extension", but I wanted to give nim a try.
09:54:12*solitudesf quit (Ping timeout: 245 seconds)
09:56:27ZevvNim has a very different 'feel' to it then Lua. I started from the same perspective, looking for something better to replace Lua, but then I ended up doing basically everything in Nim
09:57:33kuonThat is also what I am starting to think. But that's good, I've been writing C for 25 years, but the less I can write the better, sadly I haven't found a better combo than C+lua yet.
09:58:05kuonI love nim approach because it has really easy C interop while having a lot of thing I love from lua.
09:58:47*lf-araujo_ joined #nim
09:58:49*lf-araujo quit (Read error: Connection reset by peer)
09:58:59*lf-araujo_ is now known as lf-araujo
09:59:37*traviss quit (Quit: Leaving)
10:05:29ZevvI came from exactly your place. 25+ years of C, 15 years ago started to add Lua where appropriate. At the end I got sick and tired of the lack of typing and compile time analisys. Nim has been a very good replacement for the C+Lua combo. The only thing I miss is the flexibility of using Lua as configuration language, but no one is keeping you from doing Nim+Lua as well.
10:06:05ZevvThe things I wanted from Lua which C could not offer were mainly easier handling of text, async (coroutines) and low-effort C interfacing
10:06:08ZevvNim has all that
10:07:19kuonYeah, lua as configuration file is quite nice, but yeah, you can drop lua in a nim app, and I use exactly lua for the same reasons
10:07:52ZevvLua was all new and experimental and unknown when I started using it, and that ended up never to be a problem. It was probably lucky that it kind of took up and survived all these years. Araq is a bit like Ierusalimschy - he has strong opinions about how things should work, he cares for the users.
10:08:02*absolutejam3 quit (Ping timeout: 268 seconds)
10:08:30ZevvThe biggest difference is that Lua is really mean and lean, and Nim is quite extensive - the Nim book would end up somewhat thicker then PIL
10:09:34kuonWell, as long as it's not C++ :P
10:09:41FromGitter<rokups> > The only thing I miss is the flexibility of using Lua as configuration language ⏎ ⏎ but nimble uses nim as configuration language
10:10:01Zevvtrue, there is nimscript
10:12:12FromGitter<mohamedmoussa89> `type VectorConcept[N: static int,T] {.explain.} = concept v, type V ⏎ v[int] is T ⏎ type Type = stripGenericParams(V)[N,T]`
10:12:19FromGitter<mohamedmoussa89> ahh one sec
10:12:59FromGitter<mohamedmoussa89> https://pastebin.com/raw/X67wTU3m
10:14:00FromGitter<mohamedmoussa89> that `type Type = stripGenericParams(V)[N,T]` line .. is that the canonical way to grab the matched type? like a function that wants to return the type back: `proc foo(v: VectorConcept): v.Type = ...`
10:16:53*lf-araujo quit (Remote host closed the connection)
10:16:54*purebadger quit (Ping timeout: 244 seconds)
10:24:20kuonyeah it works :P I wrote a main.nim calling my older main.c main func, the tricky part was to get compilation working (I cross compile for an embedded CPU).
10:24:55kuonFrom here I can start to expose C bits to nim and assemble them there
10:25:18kuonbut before that, dinner:) thanks for the discussion, see you around.
10:28:49*absolutejam3 joined #nim
10:34:45*natrys joined #nim
10:39:17*dddddd joined #nim
10:40:59*purebadger joined #nim
10:43:46*absolutejam3 quit (Ping timeout: 244 seconds)
10:54:29Zevvs
11:00:43FromGitter<mratsim> @mohamedmoussa89 you can use genericHead from typetraits
11:03:51*lf-araujo joined #nim
11:06:36FromGitter<mohamedmoussa89> ah
11:06:39FromGitter<mohamedmoussa89> I see that in the manual now
11:11:02*nsf quit (Quit: WeeChat 2.4)
11:17:51*absolutejam3 joined #nim
11:19:36*sealmove joined #nim
11:22:02FromGitter<mratsim> btw, what kind of libraries are you writing?
11:22:41*absolutejam3 quit (Ping timeout: 248 seconds)
11:24:34*gearshift quit (Quit: Leaving)
11:26:26*PMunch joined #nim
11:30:02*couven92 quit (Quit: Client disconnecting)
11:31:13*clyybber joined #nim
11:31:38FromGitter<mohamedmoussa89> Nothing serious, just playing around with Nim after I get home from work. Started working on a ray tracer (following PBR book) and got side tracked :)
11:33:01*PMunch quit (Remote host closed the connection)
11:35:15FromGitter<mratsim> Sounds fun, there are already 2 raytracers in Nim from John Novak and def-pri-pub
11:35:36FromGitter<mratsim> also there was recently an implementation in Go, Rust and another language of the same raytracer
11:35:46FromGitter<mohamedmoussa89> Zig?
11:35:56federico3https://news.ycombinator.com/item?id=20325638 anyone wants to reply with a Nim example?
11:41:35FromGitter<mratsim> maybe yes
11:41:39federico3http://blog.johnnovak.net/tag/nim/
11:43:16FromGitter<zacharycarter> which book @mohamedmoussa89 ?
11:43:22FromGitter<mratsim> I would love to learn Ray Tracing but I don't have time
11:43:31FromGitter<mratsim> Peter SHirley, RayTracing in a weekend I guess
11:44:46FromGitter<mohamedmoussa89> http://www.pbr-book.org/
11:45:05FromGitter<mratsim> ah not the same one
11:48:24FromGitter<mratsim> Interesting, there is a Kd-tree implementation: https://github.com/mmp/pbrt-v3/blob/master/src/accelerators/kdtreeaccel.cpp
11:49:04*stefanos82 quit (Quit: Quitting for now...)
11:56:36xacelivcd: Did you ever start making that nim-based android launcher?
11:59:02*dwdv quit (Ping timeout: 268 seconds)
12:08:23*absolutejam3 joined #nim
12:17:20*Vladar quit (Remote host closed the connection)
12:17:58*absolutejam3 quit (Ping timeout: 272 seconds)
12:19:39*sealmove quit (Quit: WeeChat 2.5)
12:27:02*Vladar joined #nim
12:27:34*solitudesf joined #nim
12:37:24*absolutejam3 joined #nim
12:42:33*absolutejam3 quit (Ping timeout: 258 seconds)
12:46:58FromGitter<zacharycarter> @mohamedmoussa89 - ah that one! that's the one I figured you were referring to. thanks!
12:48:01FromGitter<zacharycarter> I'm itching to get out of work and go work on graphics code
12:48:08FromGitter<zacharycarter> I've had enough Scala for today
12:51:17*lf-araujo quit (Ping timeout: 252 seconds)
12:58:41*absolutejam3 joined #nim
13:03:16*absolutejam3 quit (Ping timeout: 246 seconds)
13:05:20livcdxace: nope
13:08:48*Snircle joined #nim
13:09:31FromGitter<zacharycarter> would that be like Nim interoping with Java?
13:09:37FromGitter<zacharycarter> or would you use the NDK?
13:09:51FromGitter<zacharycarter> the android NDK is terrible btw
13:18:16*lf-araujo joined #nim
13:24:52*hoijui joined #nim
13:42:34*stefanos82 joined #nim
13:51:34*lritter joined #nim
13:58:09*absolutejam3 joined #nim
14:02:06lqdev[m]seems like the Nim VS Code extension is dead, for some reason it doesn't work for me anymore
14:02:32FromGitter<rokups> define "doesnt work"
14:02:40*theju joined #nim
14:03:07*absolutejam3 quit (Ping timeout: 246 seconds)
14:04:18FromGitter<rokups> it works on my end
14:15:46thejuI am working on interfacing the tesseract ocr library with nim based on a small C++ snippet and am running into an error
14:16:01thejuwould appreciate if someone can help me figure out what may be causing the error
14:16:19thejuthe relevant c++ snippet, nim snippet and the error are at https://dpaste.de/tJ8o/raw
14:16:48thejuthe error is "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
14:25:05*rockcavera quit (Remote host closed the connection)
14:31:38FromDiscord_<demotomohiro> I guess api[].GetUTF8Text() returns nil.
14:32:14*purebadger quit (Ping timeout: 272 seconds)
14:32:56*dwdv joined #nim
14:33:24thejuthat's what I thought too but the cpp version correctly prints out the text
14:36:42thejuthe generated c++ code seems to be wrong, it is (*outText) = (*api).TessBaseAPI::GetUTF8Text();
14:37:27thejuinstead of outText = (*api).TessBaseAPI::GetUTF8Text()
14:37:52*nsf joined #nim
14:37:59*lf-araujo quit (Ping timeout: 252 seconds)
14:38:36*lf-araujo joined #nim
14:42:12FromGitter<gogolxdong> Where to check this error? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d1e104484cbda1764cd1196]
14:49:21*lf-araujo quit (Ping timeout: 252 seconds)
14:50:20*lf-araujo joined #nim
14:51:06*floppydh quit (Quit: WeeChat 2.5)
14:53:51*absolutejam3 joined #nim
14:54:40Araqtheju: freeShared(outText) is not compatible with delete outText[]
14:55:45thejuAraq: but the code doesn't even go till there, could that still be a problem?
14:56:08thejufor example even if I just have discard api[].GetUTF8Text(), i get the same error
14:56:52*absolutejam3 quit (Read error: Connection reset by peer)
14:57:32*absolutejam1 joined #nim
14:57:45*absolutejam1 quit (Read error: Connection reset by peer)
14:58:22*absolutejam1 joined #nim
15:03:02Araqtheju: new(TessBaseAPI) is also wrong, Nim's allocator is not C++'s
15:06:24thejuOk, interesting. What would be the correct way?
15:07:02thejubecause if I only leave the code on until the version number, it prints that correctly
15:07:33*absolutejam1 quit (Ping timeout: 245 seconds)
15:12:31FromDiscord_<demotomohiro> theju: https://nim-lang.org/docs/manual.html#importcpp-pragma-wrapping-constructors
15:22:48*lf-araujo quit (Quit: lf-araujo)
15:22:58*lf-araujo joined #nim
15:27:20*natrys quit (Ping timeout: 272 seconds)
15:30:18*leorize_ quit (Remote host closed the connection)
15:30:46*leorize_ joined #nim
15:36:13thejuFromDiscord_: <demotomohiro> Araq: thanks for the help, I got it working
15:38:52*lf-araujo quit (Remote host closed the connection)
15:39:06*lf-araujo joined #nim
15:40:34*clyybber quit (Quit: WeeChat 2.5)
15:44:50Araqping alehander
15:45:02FromGitter<matrixbot> `swedneck` woah, is this chat bridging everything via gitter?
15:57:41*kuon quit (Ping timeout: 268 seconds)
15:58:10*lf-araujo quit (Remote host closed the connection)
15:58:27*lf-araujo joined #nim
16:06:22*Vladar quit (Remote host closed the connection)
16:09:04*theju quit (Quit: ERC (IRC client for Emacs 26.1))
16:09:43*theju joined #nim
16:09:50FromGitter<zetashift> I'm actually following along Peter Shirley's Ray Tracing in a weekend with Nim right now. I don't really know C++ so I'm guessing I'm going along with that too
16:10:44*lf-araujo quit (Ping timeout: 252 seconds)
16:14:56*theju quit (Quit: ERC (IRC client for Emacs 26.1))
16:17:32*synshroud quit (Ping timeout: 245 seconds)
16:18:32FromGitter<genotrance> My slack bridge has been down for 12 hours, sucks to be disconnected
16:41:46*lf-araujo joined #nim
16:52:55*lf-araujo quit (Ping timeout: 252 seconds)
16:53:11*lf-araujo joined #nim
16:55:55*tjmac left #nim ("-bye")
17:06:25FromGitter<kayabaNerve> Discord and IRC have a bridge. Gitter and IRC have a bridge. Matrix and Gitter have a bridge.
17:06:28FromGitter<kayabaNerve> That's all that I know of
17:08:15narimiran@swedneck you don't need matrixbot to connect to irc. you can directly connect to #nim. leorize[m] should know the details about it
17:09:11FromGitter<matrixbot> `swedneck` > <@gitter_fromirc:matrix.org> *<narimiran>* @swedneck you don't need matrixbot to connect to irc. you can directly connect to #nim. leorize[m] should know the details about it ⏎ ⏎ that's not what i mean, i mean i find it weird to center bridging around gitter instead of matrix
17:09:34FromGitter<juancarlospaco> @Araq https://www.twitch.tv/araq4k/dashboard/settings --> "Store past broadcasts" Turn it ON.
17:09:57leorize_@swedneck join #freenode_#nim:matrix.org
17:10:16narimiran@swedneck: look at how your message looks currently: https://irclogs.nim-lang.org/04-07-2019.html#17:09:11
17:10:20*Swedneck2 joined #nim
17:10:43*leorize_ is now known as leorize
17:10:53Swedneck2this is why i find it weird to use gitter
17:11:26narimiranSwedneck2: now this is much better, but that's not coming from matrix, is it? (usually matrix users have `nick[m]`)
17:11:52leorizeyou can change it if desired
17:12:05*purebadger joined #nim
17:12:15leorizeI connect via both because the bridge can lag behind at times
17:12:20*lf-araujo quit (Ping timeout: 252 seconds)
17:12:38Swedneck2i'm using matrix, i've just set a nick on the irc side
17:12:55Swedneck2some channels require it
17:13:09FromGitter<kayabaNerve> Bridging is centered on IRC
17:13:44FromGitter<kayabaNerve> Or... IRC has Discord and Gitter. Gitter has IRC and matrix. :Thinking:
17:13:52FromGitter<kayabaNerve> I guess it ends up with which room is bigger.
17:13:59Swedneck2ah, in that case someone else set up a slack bridge from `#nim-lang:matrix.org` to slack
17:14:02Swedneck2s/slack/gitter
17:14:09rayman22201I hope Araq gets twitch recording to work for us poor Americans that are sleeping when he streams (all 4 of us 😝)
17:14:12*al_ joined #nim
17:14:24federico3when is the stream?
17:14:34leorizemeanwhile telegram is isolated :p
17:14:44Swedneck2might want to contact matrix.org to move the alias to the same room as `#freenode_#nim:matrix.org`
17:14:53rayman22201He streamed last night around 2am PST
17:15:09leorizewe can have #nim-lang:matrix.org bridged to freenode
17:15:44rayman22201Convert to your preferred time zone lol
17:17:01narimiranleorize: telegram should stay isolated
17:17:35narimiranfederico3: usually in the (european) morning, around 10-11 am
17:18:06federico3UTC? CEST?
17:18:17narimiran8-9 UTC
17:18:58rayman22201Thanks narimiran. My ability to translate timezones is bad.
17:19:04Swedneck2[email protected] is the email address in case you want to move the `#nim-lang:matrix.org` alias to the same room as `#freenode_#nim:matrix.org`, which is what i would recommend
17:19:11Swedneck2otherwise people end up sending messages via gitter
17:19:34*lf-araujo joined #nim
17:20:01*chun joined #nim
17:20:02narimiranrayman22201: it is easy when you're in europe and your one (winter) or two (summer) hours away from UTC
17:23:04rayman22201😁
17:23:30disruptekdom96: i always prefer semicolons in proc definitions because it helps the eye parse foo(bar: int, baz, boz: float) more easily.
17:24:21FromGitter<juancarlospaco> I wonder how our ZIP module does 🤔 https://www.bamsoftware.com/hacks/zipbomb
17:24:47FromGitter<juancarlospaco> (Comparison near end of post)
17:24:56disrupteknarimiran: i think your nimpretty pr is great. imo, the goal should be to have the whole project pass pretty 24/7.
17:25:06narimirandisruptek: thanks :)
17:25:07lqdev[m]rokups: I don't get any suggestions at all
17:25:21lqdev[m]nor are errors being shown
17:25:35narimirandisruptek: nimpretty still has some rough edges, but we're working on them
17:28:09FromGitter<zacharycarter> narimiran: do most European countries do the hour offset for Midsummer?
17:28:13FromGitter<zacharycarter> or is Finland just special?
17:28:35narimiranmost of them do
17:28:48*ch1 joined #nim
17:29:51FromGitter<zacharycarter> ooo I didn't even think of that - I can now catch Araq streaming live, without hating myself for not sleeping the next day!
17:29:59*ch1 left #nim (#nim)
17:31:48FromGitter<zacharycarter> I might even be able to attend a Nim meetup if there ever is another one, or maybe even a conference other Nimmers go to
17:35:31lqdev[m]now I get errors, but I still don't get suggestions. something's stuck at `Indexing: 70 of 70`
17:35:54*chun quit (Remote host closed the connection)
17:36:04FromGitter<rokups> Maybe nimsuggest is broken
17:36:24*chun joined #nim
17:36:49*Trustable joined #nim
17:45:04lqdev[m]it worked perfectly yesterday, tho
17:47:54*chun quit (Remote host closed the connection)
17:48:22*chun joined #nim
17:51:52*Vladar joined #nim
18:03:22*cornfeedhobo quit (Ping timeout: 245 seconds)
18:06:19Araqhuh?
18:06:28Araqdoes twitch keep my videos? where?
18:08:17*Vladar quit (Remote host closed the connection)
18:09:49Swedneck2Araq: hey, you might want to send an email to [email protected] asking them to move the `#nim-lang:matrix.org` alias to the same room as `#freenode_#nim:matrix.org`. currently `#nim-lang:matrix.org` bridges messages to IRC via gitter which causes very ugly messages, while `#freenode_#nim:matrix.org` bridges directly to IRC
18:11:44Araqok...
18:13:16FromGitter<matrixbot> `swedneck` here's an example message sent from `#nim-lang:matrix.org`, it doesn't look great
18:13:53*nsf quit (Quit: WeeChat 2.4)
18:18:04FromGitter<zacharycarter> Araq: twitch doesn't by default, you have to turn it on
18:18:16FromGitter<zacharycarter> > @Araq https://www.twitch.tv/araq4k/dashboard/settings --> "Store past broadcasts" Turn it ON.
18:18:54Araqah, thanks
18:19:17FromGitter<zacharycarter> thank @juancarlospaco :)
18:20:31*chun quit (Ping timeout: 250 seconds)
18:26:47*cornfeedhobo joined #nim
18:29:13*al_ quit (Quit: al_)
18:32:08*jjido joined #nim
18:34:28*purebadger quit (Quit: WeeChat 2.5)
18:40:29*rupansh joined #nim
18:40:40rupanshhelo
18:40:57*absolutejam1 joined #nim
18:41:04rupanshI have been working on an 8080 emulator for a while now.
18:41:32rupanshhttps://github.com/rupansh/nim-8080-emu/blob/master/emu.nim I am having trouble reading the space invaders rom into the memory pointer
18:41:51rupanshi took this as a reference https://github.com/kpmiller/emulator101/blob/master/8080emu-first50.c#L879-L894
19:05:46*absolutejam1 quit (Ping timeout: 268 seconds)
19:07:26*absolutejam1 joined #nim
19:08:19FromGitter<zacharycarter> question - if I have a pointer in C, I can do something like `ptr[0] = '\0';`
19:08:26FromGitter<zacharycarter> how would I do that with a `pointer` in Nim?
19:08:32*Trustable quit (Remote host closed the connection)
19:10:37FromGitter<zacharycarter> is that the same as `ptr = nil` ?
19:12:06rayman22201No. The C code sets the first byte the ptr points to to 0. The Nim code sets the pointer itself to 0
19:14:41FromGitter<zacharycarter> that's what I figured - is this possible to do in Nim?
19:14:58rayman22201I think the safe thing in Nim is to probably cast the ptr to a ref object?
19:15:51rayman22201Or you could set mem. I'm not at my PC atm and I don't remember the exact syntax 🤔
19:19:05FromGitter<zacharycarter> I think it's `zeroMem(ptr, 1)
19:20:36rayman22201Zero mem, set mem, same thing 😝
19:21:11*rupansh quit (Remote host closed the connection)
19:21:29FromGitter<zacharycarter> :P thank you for the help
19:22:18rayman22201Np. You could see what c2nim does. That's usually what I do when I need to figure out stuff like this.
19:23:08FromGitter<zacharycarter> I tried - but c2nim produced - `ptr`[0] = '\x00'
19:23:14FromGitter<zacharycarter> which was less than helpful
19:23:21rayman22201Interesting
19:23:37*hoijui quit (Ping timeout: 252 seconds)
19:23:56rayman22201I guess Nim let's you use array notation on ptr
19:24:17rayman22201Pretty dangerous but cool
19:25:26rayman22201Also @zacharycarter, happy American Independence day you expat 😜
19:26:30FromGitter<zacharycarter> it doesn't :/ `[]` on a pointer is dereference tmk
19:26:52FromGitter<zacharycarter> thanks! feels strange not being in the US on the 4th of July, but then again I don't really want to be anywhere near D.C. atm haha
19:26:59FromGitter<zacharycarter> too much craziness going on for me
19:27:47rayman22201Oh yeah. I don't blame you. I would rather go to a Nim Meetup like you said lol.
19:28:00FromGitter<zacharycarter> +1
19:29:12*ertp07 quit (Read error: Connection reset by peer)
19:29:46*ertp07 joined #nim
19:34:14*ertp07 quit (Ping timeout: 252 seconds)
19:34:28*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:34:53FromGitter<zacharycarter> yay - shader loading done for the most part
19:35:40FromGitter<juancarlospaco> :)
19:39:07rayman22201🎉
19:48:43*jjido joined #nim
19:56:19*brakmic quit (Read error: Connection reset by peer)
19:56:43*brakmic joined #nim
19:56:52*synshroud joined #nim
19:59:46*nsf joined #nim
20:08:03*lf-araujo quit (Quit: lf-araujo)
20:13:03*nsf quit (Quit: WeeChat 2.4)
20:16:46Araqzacharycarter: Nim's idea is to use 'ptr UncheckedArray[T]'
20:16:56Araqto get array indexing on a pointer
20:17:05FromGitter<zacharycarter> ah yeah, I forgot about that
20:17:24*SenasOzys joined #nim
20:18:34Araqok, I'm about to stream again
20:18:48Araqyou can choose between (a) fixing embarrassing bugs
20:19:01Araqand (b) some control flow voodoo
20:19:27disruptekvoodoo ftw
20:24:53*absolutejam1 quit (Read error: Connection reset by peer)
20:27:52Araqrayman22201, ?
20:29:33lqdev[m]to zero the value of the pointer you do `point[] = 0`, simple as that
20:29:41lqdev[m]equivalent to C `*point = 0`
20:29:46rayman22201No preference lol. Though twitch is having issues on my phone right now... Ugh
20:32:54disruptekhow do i make this stupid chat panel behave?
20:35:20disruptekman, the collapse button was invisible under dark reader.
20:38:56*narimiran quit (Ping timeout: 272 seconds)
20:42:04noonieni'm getting an Exception message: over- or underflow, in async code, however the stack traces only point to a "waitFor" in my code
20:43:16noonieni do get my function names in asyncmacro.nim
20:43:57lqdev[m]look at the line numbers, they're correct
20:44:11disruptekoff-by-one error positioning the label?
20:51:04*clyybber joined #nim
20:59:00noonienlqdev[m]: they don't appear to be correct
20:59:19noonienthe ones in asyncmacro, they don't point correctly into my file
20:59:51*synshroud quit (Quit: ZNC 1.7.4 - https://znc.in)
21:02:12lqdev[m]strange, that's how it was to me
21:05:19*synshroud joined #nim
21:24:54noonieni'm on the latest nightly
21:26:50dom96disruptek: sure, and in this case you can use a semicolon, but don't use it for every single proc def
21:27:01dom96that is the edge case I'm talking about where I'm cool with it
21:27:14noonienalso, are there any operators that allow under/overflows?
21:27:38*absolutejam1 joined #nim
21:29:39*absolutejam2 joined #nim
21:32:19*absolutejam1 quit (Ping timeout: 258 seconds)
21:50:02*solitudesf quit (Ping timeout: 245 seconds)
21:54:27FromGitter<Varriount> All integer operators?
21:55:25FromGitter<Varriount> I mean, an exception will be raised if checks are turned on, but otherwise they can over/under flow
22:03:22*SenasOzys quit (Ping timeout: 268 seconds)
22:15:45disruptekdom96: that means that i have to turn commas into semicolons sometimes during maintenance. :-(
22:17:58dom96so you use semicolons everywhere?
22:18:43Calinouis echo a keyword or a function in Nim? i.e. what's the most idiomatic syntax, echo("hello") or echo "hello"?
22:18:56clyybberboth are valid call syntaxes
22:18:59CalinouI know :)
22:19:08clyybberso they apply to every proc
22:19:16clyybbernot only keywords
22:19:22clyybberso no, echo isn't a keyword :)
22:19:26*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:20:39CalinouVS Code highlights it as a keyword, that's why I asked
22:31:22*brakmic quit ()
22:37:27disrupteki use semicolons in my proc definitions whenever multiple arguments exist.
22:37:49disruptek"hello".echo
22:41:57dom96so you'd write this? foo(bar: int; baz; boz: float)
22:43:43disrupteki'd write foo(bar: int; baz, bar: int) though i rarely overload names for a single type.
22:44:07disruptekeg. unless the sig is very long, i'll just spell each of them out with their types.
22:44:47*dwdv quit (Quit: quit)
22:44:50disruptekeasier to grok at a glance, and when you are looking for a certain sig, it helps if one with two highlighted types pops up versus one with just one (but type var names).
22:50:57dom96so you'd probably write: foo(bar: int; baz: float; boz: float)
22:54:26dom96the main reason I dislike it is because it's inconsistent with pretty much every other language (?), I also don't really consider it more readable (except maybe in the case where you're sharing the same type for multiple different arguments)
23:03:34jmivenPascal, Ada and Eiffel use semicolons, for example
23:05:57*krux02_ joined #nim
23:08:44*krux02 quit (Ping timeout: 252 seconds)
23:12:56*absolutejam2 quit (Ping timeout: 244 seconds)
23:18:13disruptekthat's the only bit we are talking about. if there wasn't biz, baz: int syntax then i wouldn't use semicolons at all.
23:18:44disrupteksince it's a possibility, i'd rather standardize on a syntax that can literally be standard among all my signatures.
23:18:46Araqso ... what are we gonna do? throw away the code?
23:18:57disruptekwhy?
23:19:00Araqthe DFA wasn't designed for this
23:19:37disruptekwe're talking about lint, not dfa...?
23:20:09disruptekor, you mean you think the dfa you were just working on is too stodgy?
23:20:37disruptekit doesn't have to be the last solution, merely the first. the prototype that informs a smarter version down the road.
23:21:14Araqwell, all the code I wrote is pretty much "meh"
23:21:34disruptekit's fine. copy+pasta is okay in a poc.
23:21:47AraqI can push it to a branch
23:22:11Araqbut it's neither complete nor elegant, as I said, this is not for "injectdestructors"
23:22:14disruptekyou really never ran klee?
23:22:39Araqwhat's klee?
23:22:51disruptekstatic analysis for llvm bytecode.
23:23:47Araqnah, now that you mention it, I think I heard the name before but that's it
23:24:23disrupteki mentioned it a few months ago. i think it's worth trying to run it against some small newruntime. you might get a kick outta it.
23:25:03disruptekbbl, thanks again araq, that was neat. :+1:
23:25:15Araqcannot imagine how, I would be left with errors pointing to LLVM code
23:25:32AraqI want a 'nimZ3' tool for correctness proofs
23:25:42Araqand I know how to do it.
23:25:51disruptekyou compile nim to llvm and then klee will tell you where the bugs are.
23:26:03disruptekit can even write tests.
23:26:09clyybberdisruptek: Problem is mapping those bugs back to nim errors
23:26:19Araqexactly
23:26:29disruptekit knows about C.
23:26:52Araqwell with --lineDir:on we'll probably come far
23:26:57disruptekyou can get all the debugging to follow through the whole pipeline. check it out. i could be wrong, but i doubt it.
23:27:00disruptekbbl
23:27:27clyybbergn8 all
23:27:33*clyybber quit (Quit: WeeChat 2.5)
23:43:37*stefanos82 quit (Quit: Quitting for now...)