<< 23-04-2020 >>

00:01:55FromDiscord_<exelotl> The thing I don't get though
00:03:11FromDiscord_<exelotl> a friend added my library as a submodule and it apparently Just Worked https://github.com/IamRifki/CattoCookie
00:06:13*hax-scramper quit (Read error: Connection reset by peer)
00:06:28*hax-scramper joined #nim
00:10:25*CcxWrk joined #nim
00:11:25FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ea0dd2d2bf9ef12699a0fc2]
00:11:40FromGitter<gogolxdong> does this mean leak memory?
00:12:28*Trustable quit (Remote host closed the connection)
00:32:24FromGitter<gogolxdong> Regarding https://github.com/nim-lang/Nim/issues/12952 , is it possible that all c interface leaks memory ? I tried a minimal test with mysql , above is the result, source code as follows: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ea0e2181e3d5e20633a2110]
00:32:26disbotβž₯ Possible memory leak using re ; snippet at 12https://play.nim-lang.org/#ix=2j8A
00:34:03*ryan__ joined #nim
00:36:30*ryan_ quit (Ping timeout: 256 seconds)
00:45:05*hax-scramper quit (Read error: Connection reset by peer)
00:46:10*hax-scramper joined #nim
01:06:50leorize@gogolxdong: possibly lost are potentially leaked memory
01:07:07leorizebut if you're testing this with the default gc, you'll need Nim's suppression file to verify
01:07:17leorizebut not all C interface leak memory
01:07:39leorizeiirc re has to leak memory due to how poorly the pcre interface was designed
01:14:33FromGitter<bung87> what should I noticed when compare string from `TaintedString ` to string ?
01:14:54FromGitter<bung87> len(cleanHtml) was 6569 ⏎ len(cleanExpected) was 6583
01:15:09leorizetaintedstring is just a concept signifying that the string come from outside
01:15:29FromGitter<bung87> I use text diff that they are same.I confirmed times.
01:16:06leorizedid you compare the newlines?
01:16:41leorizeCRLF might have turned into LF for example
01:17:17leorizewhatever tool that processed the file might have done that
01:17:51FromGitter<bung87> oh yeah, that may cause problem, thanks
01:18:12leorizeyou're missing 14 chars, so 14 lines? :p
01:19:41FromGitter<gogolxdong> @leorize I'm using --gc:arc , and what's Nim's suppression file?
01:19:55FromGitter<bung87> I use stripLineEnd ,still same, I 'll look carefully the source invisible chars
01:20:04leorizegogolxdong: you're using --gc:arc? are you combining with -d:useMalloc?
01:20:17leorizeyou need -d:useMalloc to work with valgrind
01:20:42leorizehttps://github.com/nim-lang/Nim/blob/devel/tools/nimgrind.supp
01:20:59leorize^ also that's the suppression file for Nim default allocator and gc
01:22:34*oculux quit (Ping timeout: 240 seconds)
01:23:12*ryan__ is now known as temporary_monarc
01:23:18*temporary_monarc is now known as temporarymonarch
01:23:29FromGitter<gogolxdong> yes, the same result.
01:25:04FromGitter<gogolxdong> How to use it besides arc and useMalloc?
01:27:03leorizefigured out your problem
01:27:38leorizeit's just valgrind unable to scan libmysqlclient memory so it assume that part is lost :P
01:27:47leorizewe init() mysql but we never deinit() it
01:27:52leorizenot really a problem
01:31:03FromGitter<gogolxdong> How to confirm re issue is an issue rather than we init but never deinit so valgrind unable to scan the memory?
01:31:28leorizethe re issue isn't an issue
01:31:52leorize"still reachable" memory meaning that the pointer still exist on the stack
01:32:05leorizeso can still be reached by the program in question
01:33:36leorizepractically it just mean that we alloc-ed then never dealloc at program end, the pointer is still there if manual deallocation is desired, but typically it doesn't make sense since the OS can clean up after us
01:33:54leorizeusually to confirm these issue, just look at the source of those module
01:34:10shashlickleorize: what was the -d to check that the wrapped structs match the size of C structs?
01:34:22leorize-d:checkAbi iirc
01:34:36shashlickthere's nothing in the nim code like that
01:34:41*krux02_ quit (Remote host closed the connection)
01:35:37leorize[m]https://github.com/nim-lang/Nim/blob/269a458d74e9abbc126d96c506b730c37af0932a/compiler/ccgtypes.nim#L249-L251
01:36:26shashlickneat thanks
01:37:33FromDiscord_<Elegant Beef> So what's the chances someone here knows the dance and chant to add atoms to the root window with xlib?
01:51:08FromGitter<gogolxdong> Not everyone knows what you know, it requires some experience and even, more evidences and documents. And for my own further concern, what's the functionality of useMalloc with arc, what if without it ?
01:51:41disruptekuseMalloc uses malloc instead of nim's allocator.
01:51:43Yardanicowith -d:useMalloc nim will use C stdlib's memory allocation functions like malloc()
01:51:55Yardanicoand without it, as disruptek said, it'll use nim's own allocator
01:52:14Yardanicowith -d:useMalloc when nim frees an object its memory is given away to the OS instantly
01:53:59FromGitter<gogolxdong> both shouldn't leak memory right? Does this imply better useMalloc ?
01:54:09disrupteknah.
01:54:22Yardanicono, better use nim's allocator, it knows how to deal with memory in nim programs better than your OS does :)
01:54:31leorizevalgrind is not compatible with nim's allocator :P
01:54:42leorizeYardanico: to be fair, they are equally good
01:54:50leorizebut nim's allocator is constant time :)
01:55:36shashlickcompileOption() doesn't work for --noNimblePath or --clearNimblePath
01:57:52FromGitter<gogolxdong> I suspect my server is leaking memory , do you suggest try useMalloc or how to investigate?
01:58:05leorizedoes it use async?
01:58:21FromGitter<gogolxdong> yes, it does.
01:58:23Yardanico@gogolxdong gc:arc doesn't work with async yet (it leaks memory)
01:59:38FromGitter<gogolxdong> By async , do you mean async macro literally or whole async solution like waitFor, etc.
01:59:50Yardanicothe whole asyncdispatch
02:01:19*chemist69 quit (Ping timeout: 272 seconds)
02:01:26FromGitter<gogolxdong> Won't useMalloc make a difference?
02:01:30Yardanicoit won't really
02:01:34Yardanicogc:arc can't deal with cycles
02:02:40*chemist69 joined #nim
02:02:56*shodan45 quit (Quit: No Ping reply in 180 seconds.)
02:04:45*yumaikas quit (Ping timeout: 250 seconds)
02:04:45*Guest15539 quit (Ping timeout: 258 seconds)
02:06:34*dadada joined #nim
02:06:57*dadada is now known as Guest15289
02:07:09*yumaikas joined #nim
02:09:35*shodan45 joined #nim
02:15:07*muffindrake quit (Ping timeout: 252 seconds)
02:17:18*muffindrake joined #nim
02:17:18*martinium joined #nim
02:21:15*martinium quit (Changing host)
02:21:15*martinium joined #nim
02:26:09martiniumare there any major performance differences between the different Nim compiler backends
02:26:26*NimBot joined #nim
02:27:23Yardanicomartinium: as in time to run or time to compile?
02:27:52Yardanicoif time to run (the resulting binaries/code), then it's mostly the same for C/C++/Objective C I would say (although there are some backend specific options like use C++ exceptions for C++ backend)
02:28:01YardanicoJS backend will of course be slower since JS isn't a compiled language :P
02:32:02martiniumpretty wild it can compile to so many languages
02:32:11Yardanicowell C/C++/ObjC are "mostly" the same :P
02:32:23martiniumso the JS transpiling is basically mature now?
02:32:38martiniumit was still WIP last time I had checked on this language
02:32:39leorizeyea been mature for awhile
02:32:43Yardanicowell I mean nim forum runs on it, karax runs on it
02:32:50martiniumnice
02:32:55martiniumI need to check out karax
02:33:46martiniumThe script I was working on crashed yesterday due to too many open files
02:34:10martiniumI read in the docs that the http client opens a new connection and keeps it open for each request
02:34:17Yardanicomaybe you forgot to do "client.close()" ?
02:34:21martiniumso I have to manually close after each request?
02:34:29Yardanicoor you can just reuse the same http client
02:34:33Yardanicono need to create it for every request
02:34:40martiniumthat's what I was doing and it errored out
02:34:50martiniumwith the too many open files error
02:35:04martiniumpython took 7 hours but it didn't segfault
02:35:13martiniumso def have to adapt the code to be more Nim
02:35:22martiniumI also need to convert it to async
02:35:33martiniumbut I have no experience coding async or threads
02:36:00martiniumlove the syntax in this lang makes things a lot smoother
02:39:55martiniumcurrently reading Dom's book to get an idea of how to do it
02:40:43FromDiscord_<KingDarBoja> I just discovered that calling discard on some proc that raises an error will give you all the proc stacks on terminal
02:41:15leorizeuhmmm what?
02:43:37FromDiscord_<KingDarBoja> https://imgur.com/0SBSPmB
02:47:17*tml[m] quit (Ping timeout: 265 seconds)
02:47:51leorizeit's not discard-specific :P
02:48:11leorizeeverything do that when they raise and no one catch
02:49:58FromDiscord_<KingDarBoja> OHHHHHHH
02:50:04FromDiscord_<KingDarBoja> Didn't know
02:50:42Yardanicolol
02:50:46Yardanicothat's how exceptions work you know
02:51:22Yardanico"discard" basically has 2 uses: 1) you have to explicitly discard the value of the procedure when you call it but don't need the result 2) when you want to "do nothing" in some block (if statement, case statement, etc)
02:51:36Yardanicothe 2) is the same as "pass" in python
02:52:12FromDiscord_<KingDarBoja> Yeet
02:54:07FromDiscord_<KingDarBoja> Not sure why I said that lol, maybe I lost sight while listening to music, who knows
02:54:09FromDiscord_<KingDarBoja> πŸ™ˆ
02:58:58*tml[m] joined #nim
03:14:52FromGitter<bung87> can push gc flag in tests with different value?
03:15:10disruptekin a nim.cfg, sure.
03:16:01FromGitter<bung87> but should use different test file right?
03:16:20Yardanicoyou can use a .nims file just for one specific test file
03:16:36shashlickdisruptek: what did you think of static linking libgit2
03:17:20shashlickand a distribution model similar to choosenim - built on CI and just downloaded to users systems prebuilt
03:17:27FromGitter<bung87> thank you , I was thinking just one file, each test case
03:21:55leorizeor you can use testament :P
03:26:09FromGitter<bung87> the nims is configuring for dir?
03:26:20FromDiscord_<SolarOmni> So, I've been following Nim for about a year now, and I've messed with it a little but nothing big, and I quite like the language. Especially since I like to do web stuff too. But what I really like to focus on is game development, but I don't really like engines too much. So I was wondering if 1: You guys think Nim would be good for game development, and 2: What you would recommend for libs if so
03:26:36leorizesummoning lqdev[m]
03:26:49disruptekshashlick: sounds great; when can it work?
03:27:09disruptekor zacharycarter.
03:28:43shashlicki'm looking into getting nimblePath and paths forwarded to child nim processes, should fix the build issue
03:28:55shashlickbut i cannot detect clearNimblePath or noNimblePath
03:29:05shashlickcompileOption() doesn't work for those
03:29:36disruptekshouldn't it yield an empty array in that event?
03:31:10FromDiscord_<KingDarBoja> Welcome to Discord Nim, SolarOmni πŸ˜„
03:31:27FromDiscord_<KingDarBoja> Take a seat while our community members answer your question.
03:31:35disruptekthink about how you'd solve this if we impl your pm->builder->compiler workflow.
03:32:04*rockcavera quit (Remote host closed the connection)
03:32:12disrupteknim is good for game dev.
03:32:21skrylar[m]and now i have ported my handletree (well, based on a design stolen from stack overflow) to nim
03:32:30disruptekthere are many libs to choose from.
03:32:33disruptek!repo nimgl
03:32:35disbothttps://github.com/nimgl/nimgl -- 9nimgl: 11NimGL is a Nim library that offers bindings for popular libraries used in computer graphics 15 133⭐ 12🍴 7& 6 more...
03:32:43disruptek!repo sdl2
03:32:45disbothttps://github.com/nim-lang/sdl2 -- 9sdl2: 11Nim wrapper for SDL 2.x 15 108⭐ 53🍴 7& 29 more...
03:33:21shashlickit complains it isn't a supported flag
03:35:06zacharycarterC question - what does this macro evaluate to logic wise?
03:35:27skrylar[m]i guess i should look at this v lang since people here keep mentioning it
03:35:30shashlickneed to add it to the compiler in http://commands.ni:neutral_face:
03:35:42zacharycarter```#define foo(p) (cond ? a : 0, b)```
03:35:57zacharycarterternary followed by some expression
03:36:05zacharycarterwith the comma operator
03:36:13FromDiscord_<SolarOmni> I am familiar with SDL2, that would be nice.
03:36:25FromDiscord_<SolarOmni> @KingDarBoja Thanks πŸ˜„
03:36:41YardanicoI'd prefer to recommend you a different sdl2 wrapper though
03:36:48Yardanicohttps://github.com/Vladar4/sdl2_nim
03:36:58disruptekthey are talking to me in ##rust but i have no idea wtf they are talkin' about.
03:37:12FromDiscord_<SolarOmni> Haha, Rust is black magic
03:37:24skrylar[m]"Unlike most languages, variable shadowing is not allowed. Declaring a variable with a name that is already used in a parent scope will result in a compilation error." dumb
03:37:39Yardanicoskrylar[m]: don't
03:37:42Yardanicoyou'll only laugh :D
03:37:50skrylar[m]the official sdl wrapper works fine enough to start up an opengl context, which is what you use sdl for anyway
03:38:13skrylar[m]also once you do that, https://git.sr.ht/~skrylar/skgl you're welcome
03:38:13disruptek"< rtyler> disruptek: is that on report or record?" -- is this some rust-specific lingo?
03:38:18zacharycarterdon't use SDL - use sokol
03:38:20FromDiscord_<SolarOmni> NimGL looked interesting, but, that's way beyond my level
03:38:31disruptek!repo rapid
03:38:32disbothttps://github.com/liquid600pgm/rapid -- 9rapid: 11A game engine written in Nim, optimized for rapid game development and prototyping. 15 68⭐ 2🍴 7& 1 more...
03:38:55zacharycarterbut no one has any idea what that macro I posted evaluates to?
03:40:21Yardanicozacharycarter: (if cond: a else: 0; b)
03:40:22Yardanicoi think
03:40:23skrylar[m]why is an ORM even mentioned in the compiler docs
03:40:41disruptekit's (something, something-else)
03:40:58disruptekie. the b is a second clause.
03:41:08FromDiscord_<SolarOmni> zacharycarter: What is Sokol? I googled it but I can't find anything
03:41:15FromDiscord_<KingDarBoja> V stands for Vaporwaveeee(?)
03:41:21zacharycarterok thanks
03:41:29Yardanicoware*
03:41:34zacharycarterSolarOmni:https://github.com/floooh/sokol
03:41:50Yardanicoskrylar[m]: my favourite is https://github.com/vlang/v/blob/master/doc/docs.md#memory-management
03:42:07Yardanico"(Work in progress) There's no garbage collection or reference counting. V cleans everything up during compilation. If your V program compiles, it's guaranteed that it's going to be leak free." good luck implementing that without something like Rust's borrow checker
03:42:07FromDiscord_<Elegant Beef> Welcome solar, im primarly a game dev too, and sadly the current gamdev front is semi bleak for nim, since there isnt a fantastic easy to use framework or engine
03:42:22zacharycarterYou don't need an engine for gamedev really
03:42:43zacharycarterand if you want one - use the Godot stuff or the UE4 stuff
03:42:53skrylar[m]finished scrolling through it. i don't.. *hate* V. it looks like someone left Go out in the rain a little too long until it got rusty, and i guess type reflection is bearable in that you could do the old two step "build an app that reflects on itself and outputs a module you can include to get your static serialization stuff", but uhm.. eeh
03:43:18FromDiscord_<Elegant Beef> Well yea i dont disagree with the not needing an engine, a framework would be fine, but most nim game stuff is 2D, which is unexceptable! πŸ˜›
03:43:29FromDiscord_<Elegant Beef> unacceptable even
03:43:58skrylar[m]if it were not for nim i would be using haxe ^^;; although v's build chain is less french^W convoluted
03:44:08disrupteklol
03:44:15FromDiscord_<SolarOmni> I'm just dabbling in a few different discords getting peoples opinions and see if I can't find some libs I can't find myself. Right now I'm mostly interestedin Rust, Go, Nim, Haxe, and Crystal (though Crystal still can't compile for windows, which is a no go)
03:44:27skrylar[m](they make jokes about how many frenchmen are involved in their own compilers, thus the joke)
03:44:29Yardanicoahem
03:44:42Yardanicoim getting some dΓ©jΓ  vu here
03:44:43zacharycarterElegant Beef: so use C/C++ libraries to fill the gap
03:44:45Yardanicodisruptek will understand
03:44:58zacharycarterif you want Unity or UE4 written in Nim then just forget it it because it aint happening
03:45:13zacharycarterthose engines have hundreds of developers working on them full time
03:45:15skrylar[m]is that because you keep starting your engine over
03:45:21zacharycartermaybe
03:45:46skrylar[m]i'm up to my eyeballs in index buffers and old gles2 crap
03:45:51zacharycarteractually - this iteration of it is looking promising
03:45:56FromDiscord_<Elegant Beef> Well the thing is there isnt a plug and play solution imo, which i dont like and i dont know enough about C/C++ to actually go around making bindings/usable stuff
03:46:00disruptekshashlick: what's the deal with choosenim on osx?
03:46:03zacharycarterI have hot reloading working
03:46:07Yardanico@beef godot?
03:46:11Yardanicothere are nim bindings
03:46:15zacharycarterand a fiber based job system
03:46:15Yardanicofor GDNative
03:46:24disruptekit's failing my ci.
03:46:42zacharycarterThen why not just use Unity & C#?
03:46:43disruptekyou made your own fibers?
03:46:45skrylar[m]Yardanico: eh the borrow checker is actually good
03:46:57Yardanicoskrylar[m]: you didn't understand what I meant
03:47:00zacharycarterdisruptek: deboostified fibers
03:47:07disruptekwtf is that
03:47:08zacharycarterso no boost ocntext
03:47:11zacharycartercontext*
03:47:20Yardanico"good luck implementing that without something like Rust's borrow checker" means that it's really hard to do something like Rust's borrow checker with V's syntax really
03:47:27disruptekjust stack?
03:47:29zacharycarterhttps://www.boost.org/doc/libs/1_68_0/libs/fiber/doc/html/fiber/overview.html
03:47:30zacharycarteryes
03:47:35disruptekhmm.
03:47:52skrylar[m]if i were a stupid person i would just bind Urho3D's scripting interface to hashlink :p
03:47:53disruptekseems fine to me.
03:48:05skrylar[m]thats basically budget unity
03:48:05FromDiscord_<Elegant Beef> Zach im saying i'd like to use nim in a game environment and your solution is "use unity"?
03:48:08Yardanicoskrylar[m]: 4raq himself has made Urho3D bindings in the past :P
03:48:19Yardanicohttps://github.com/3dicc/Urhonimo
03:48:34skrylar[m]urho is okay. i used it a wee bit
03:48:41zacharycarterNo my solution was Godot haha
03:49:08zacharycarterbut if you don't understand C/C++ you might be better off with C#
03:49:13skrylar[m]hmm a saner person would use godot yeah
03:49:20zacharycarterand Unity
03:49:36FromDiscord_<Elegant Beef> I mean it's not like i cant learn it, i just have no interest in them, im already we aclimated with unity and godot
03:49:39zacharycarterYou're not going to get very far in game dev with Nim if you don't understand C/C++
03:49:42skrylar[m]"i just want to use janet to do my dialogue scripts" -> welcome to gdnative is almost entirely nudocumented ha ha ha ha
03:50:48zacharycarterI mean - if you want to do simple 2d stuff - fine you don't need to know C/C++ you can just use SDL2 / GLFW
03:51:08zacharycarterbut if you want to do 3d stuff - well chances are you're going to be relying on some C library down the road
03:51:08skrylar[m]i guess there is also the inkjs option of just emitting json bytecode and then having a very hastily clad interpreter in gdscript
03:51:21skrylar[m]those are all saner than "i will just do it myself .. fek now i have to spend weeks on basic 2d parts"
03:51:24FromDiscord_<Elegant Beef> Yea i dont do 2D games stuff often, if ever
03:52:12*Romanson joined #nim
03:52:17zacharycarterI mean it sounds to me like you want things to be easy and for things to be easy you should use a game engine that is well documented and widely adopted
03:52:29zacharycarterNim doesn't fit into that picture at the moment
03:52:35FromDiscord_<Elegant Beef> Which is what i said
03:53:00zacharycarterno you implied that game dev in Nim was bleak, it's not
03:53:03zacharycarterit's just not easy
03:53:07FromDiscord_<Elegant Beef> > Welcome solar, im primarly a game dev too, and sadly the current gamdev front is semi bleak for nim, since there isnt a fantastic easy to use framework or engine
03:53:08zacharycarteris game dev in C bleak?
03:53:13FromDiscord_<Elegant Beef> I literally gave reason why it's not bleak
03:53:21FromDiscord_<Elegant Beef> it's bleak*
03:53:27FromDiscord_<SolarOmni> If I wanted an engine, I'd use Defold or Godot
03:53:31FromDiscord_<SolarOmni> But I just prefer code
03:53:35zacharycarterit's not bleak it's just not easy button
03:53:57FromDiscord_<SolarOmni> I actually am moderately versed in C++ myself
03:54:10skrylar[m]defold?
03:54:18FromDiscord_<SolarOmni> It's a low level lua engine
03:54:29FromDiscord_<Elegant Beef> I've modified barony's source code to load characters through json, so im totally versed in C++
03:54:29leorizewe have a decent sdl2 wrapper :P
03:54:31Demos[m]c++ is cursed
03:54:31FromDiscord_<Elegant Beef> πŸ˜„
03:54:35Demos[m]it's a great leanguage
03:54:37Demos[m]but cursed
03:54:47skrylar[m]its not a great language
03:54:51zacharycarteryeah it's def not
03:54:57FromDiscord_<SolarOmni> I like C++, just, too much work xD I already tried writing an engine in it with SDL2, I got a ways, then burned out, cuz too much damn work
03:55:01skrylar[m]common lisp is a great language. c++ is an incurable illness
03:55:10zacharycarternothing cursed about it - just bad design by committee
03:55:30Demos[m]there's some good design by committee too
03:55:30FromDiscord_<SolarOmni> I also realized it was basicaly black magic to anyone but me
03:55:38FromDiscord_<SolarOmni> So I'd have to then plugin a scripting language
03:55:59Demos[m](I actually think for gamdev being well versed in something like Fortran 2008 is better than being well versed in c++)
03:56:03shashlickdisruptek: nimph?
03:56:35disruptekcutelog is failing, of all things.
03:56:58disruptekcannot fetch choosenim nightly on osx.
03:57:00disruptek403
03:58:36skrylar[m]well i just have no faith in c++ stuff. i mean can you defend templates with a straight face
03:58:38shashlickit runs into the api limit on github to pull nightlies
03:58:49shashlickyou could set a github token to make it work
03:59:00Demos[m]skrylar: you do know nim's generics are straight up a copy of C++ templates right?
03:59:05skrylar[m]when bjarne said "nobody will ever fully understand [all the template mechanics]" c++ should have been shot in the head
03:59:14skrylar[m]journe
03:59:31disruptek"nobody" sounds pretty damning, coming from him.
03:59:33FromDiscord_<SolarOmni> Lol
03:59:51skrylar[m]yeah the guy who made the language basically confesses his language is crap
04:00:31skrylar[m]macros are simpler than the horror that is the entire template spec
04:00:47shashlickdisruptek: oh you are still using the old travis.sh
04:00:54disruptekoh
04:01:02Demos[m]skrylar: nim macros or c++ ones
04:01:04disruptekthanks; that's an easy fix.
04:01:05*waleee-cl quit (Quit: Connection closed for inactivity)
04:01:13skrylar[m]Demos: common lisp
04:01:18Demos[m]ah
04:01:47Demos[m]templates (and nim's generics) make writing certain kinds of code much easier than macros
04:01:53Demos[m](clisp macros)
04:01:55shashlickchange to **`curlΒ https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522/raw/travis.shΒ -LsSfΒ -oΒ travis.sh`**
04:01:58Demos[m](not c macros, those are bad)
04:02:12shashlickmight need to clear cache
04:02:20disruptekalready pushed.
04:02:36Demos[m]anyway Bjarne would probably say "yeah it's complicated, but evidently it's useful"
04:02:59Demos[m]also TONS of other languages copied c++'s template semantics (almost nobody copide the syntax, cuz it is truely insane, or should I say typename insane)
04:03:00skrylar[m]CL macros are basically "so we look at the head of a list, and if its a macro then we run some code in an interpreter and whatever you return is what we try to compile as though you typed it in." and thenpretty much every language ever says macros bad, while people praise c++ templates, even though things like boost are extreme voodoo and they're just patting themselves on the back for making a convoluted hedge maze that they
04:03:00skrylar[m]then managed to waste years walking through and then say "THERES NO PROBLEM, WE MADE IT THROUGH THE HEDGE EVENTUALLY!!" thats basically the c++ deep coping.
04:03:43skrylar[m]meanwhile they keep deferring pascal units from the standard ...
04:03:46disruptekvoodoo really has no place.
04:03:47Demos[m]I don't really know any c++ people who think cl style macros are bad
04:03:58skrylar[m]guess compiling hundreds of megabytes of bad syntax every file isn't a problem we compiled it eventualy too
04:04:08leorizeI'm pretty sure Nim's generics are simpler than C++ templates :P
04:04:11Demos[m]I do know many implementers who don't want to standardize their AST
04:04:12skrylar[m]anyway that's enough of that rant, have modules instead. https://git.sr.ht/~skrylar/skhandletree
04:04:24Demos[m]c++20 has pascal units
04:04:27Demos[m]although tbh they work more like ada modules/units
04:04:50leorizehas != people will use it
04:04:57Demos[m]I'll point out that c++ also did a very fine job with concepts (requires requires aside.... )
04:04:58leorizeI do know people who dread that addition
04:05:16Demos[m]I know people who dread it too
04:05:35Demos[m]and it's really because the current place where the build system is seperated from the compiler doesn't make sense any more
04:05:45leorizenim have concepts before it's cool :P
04:05:52leorizewe never got to make it properly work though
04:06:01Demos[m]nim is copying c++'s concepts to make them work :D
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:04leorizemainly because of the lack of interest
04:06:44*supakeen joined #nim
04:06:52Demos[m]I actually still annoyed that in c++ I have to write like void foo(someconcept auto arg) {} instead of in nim where I can say
04:07:02Demos[m]proc foo(arg: someconcept)
04:07:04Demos[m]just like any other type
04:07:17leorizeproc foo(a, b: int)
04:07:17Demos[m]but at least we got the abbreviated syntax!
04:07:22leorize^ the ultimate form
04:07:24Demos[m]I hear that was an extremely spicy wg21 meeting
04:07:42martiniumI am about to embark on converting a synchronous function to async. Right now it works by making requests for paginated http json responses. Would I need to make each request await?
04:08:07Yardanicomartinium: to truly make use of async you'll have to do like 10-50 calls in batch and wait for all of them
04:08:21Yardanicoor if your logic allows that have async procs which call other async procs with (await)
04:08:21Demos[m]martinium: that's probably the easiest
04:08:28Yardanicoso you can start like 10 async procs which then will call 500 async procs
04:08:33Yardanicoand it all will be async and stuff
04:08:53Demos[m]Yardanico: it's all on a stackless event loop right? they don't get deligated to the thread pool
04:09:02Yardanico?
04:09:04leorizeyea
04:09:07Yardanicoyes it's single-threaded
04:09:13martiniumwould I need to create a separate http client for each or can they all use one client?
04:09:15Yardanicobut for IO stuff like http requests it's very good
04:09:24leorizemartinium: concurrency
04:09:26Yardanicomartinium: you'll need a separate one for each async proc
04:09:28Demos[m]cuz I know in cpprestsdk (which uses taks based async) we have a problem where people do like "a.get() + b.get()" and don't understand the issue with it
04:09:33leorizea client can only do one request at a time
04:09:39Demos[m]they also deadlock sometimes because the threadpool runs out of threads
04:09:39leorizea limitation of the HTTP/1.1 spec
04:09:52Demos[m]clients can have more than one connection open at once
04:10:02Demos[m]also didn't 1.1 add pipelineing?
04:10:12leorizeyou still can't request concurrently
04:10:20leorizealso pipelining is so broken no browser even enable it
04:10:27Demos[m]why the hell not?
04:10:36leorizeah wait I was wrong
04:10:38leorizeyou can :P
04:10:43leorizebut pipelining is still broken
04:10:50Demos[m]you probs need ratelimiting
04:10:54martiniumif I await one of the clients the other clients will be able to start their requests concurrently without waiting correct?
04:10:55Demos[m]but you need that anyway
04:11:12Demos[m]are you awaiting within an async proc?
04:11:20Yardanicomartinium: yes
04:11:21martiniumshould I even await at all
04:11:24Yardanicoyes
04:11:33Yardanicobut you need to use it carefully
04:11:50martiniumI was thinking of doing await for each http request
04:11:55Yardanicowell that's ofc
04:12:04Yardanicohttps://gist.github.com/martinium/c93119a6e4fb0bb4914fc5dfbc7c91af you have 3 for's here
04:12:33Yardanicoso you can call an async proc for each asset_id which then will call async procs for all pages which then will return stuff
04:12:46Yardanicoor you can just write to a global variable xd
04:13:22martiniumthis is going to be a bitch lol
04:13:39martiniumhate not knowing stuff haha
04:14:56martiniumso you recommend breaking down the loops into their own procs?
04:15:14Yardanicootherwise you won't really be able to take advantage of async
04:15:32martiniumyeah that was what I was thinking but was being lazy
04:15:37Yardanicoalso does this API have rate limiting?
04:15:42Yardanicoin seconds
04:15:49martiniumyes it does 1 sec
04:15:56Yardanicobecause that's quite an issue :P
04:18:29martiniumthink its 1 request per second
04:18:35martiniummay be much higher
04:18:40martiniumlooking at docs
04:18:44Yardanico1req/second is really low
04:18:55Yardanicohow much requests do you need to make in total?
04:19:17martiniumthink I had read either 10 or 500 per second
04:19:26martiniumit'll be more than 10000 requests total
04:19:32Yardanicouh-oh
04:19:46Yardanicorate limiting will be quite difficult in a nim async app because I don't have experience with that :P
04:20:07Yardanicoand yes you need to care because the way I was meaning to do it is by spamming as much requests as possible at the same time
04:20:11martiniumI'll try and get it as far as I can and deal with that as it becomes an issue I guess
04:21:32martiniumI actually don't see any rate-limiting info in their docs
04:21:37martiniumso it may not be rate limited
04:21:51martiniumwhich would make sense considering the amount of data that needs to get requests and grabbed
04:22:03martiniumthey limit to max 500 items per page per request
04:22:19Yardanicowell I can you implement this stuff if I know which APIs to call :P
04:22:21Yardanicoand what's get_asset_IDs()
04:25:27martiniumanother function that gets all asset IDs from another endpoint
04:25:39martiniumI save those IDs into a seq
04:25:51martiniumthat I plan to reuse for other procs
04:26:00Yardanicowell can you send the nim version you currently have? in private maybe
04:26:06skrylar[m]for rate limits wouldn't you just make an async actor that waits on a timer before it pitches a new job to the scheduler
04:26:11martiniumseq saves "id": "ip"
04:26:18Yardanicoskrylar[m]: how to do that with asyncdispatch? :P
04:26:40skrylar[m]i haven't used async because i'm constantly told its broken, so.
04:26:59skrylar[m]but with a rate limit of one second i don't think you gain anything with async
04:27:03martiniumI can share the code as it is nothing proprietary in the code 1 sec
04:29:17skrylar[m]ok. slapped a readme on handletrees
04:30:04martiniumyeah the rate-limit was in my brain it is nowhere in their docs
04:31:37*nsf joined #nim
04:34:08skrylar[m]https://git.sr.ht/~skrylar/skhandletree i hope thats readable enough (last time i'm going to plug it tonight lol)
04:35:27FromDiscord_<KingDarBoja> Arrrhg
04:35:35Yardanicooh so you're using insightvm api
04:35:44martiniumyeah
04:35:47martiniumrapid7
04:35:49martiniumhttps://gist.github.com/martinium/6530d5d335e29feda0ce3b885376a5ed
04:35:51FromDiscord_<KingDarBoja> That moment when you dealing again with unicodes lol
04:36:23martiniumlot of commented code that I am in process of converting
04:36:31Yardanicomartinium: well I already wrote a "template"
04:36:43YardanicoI mean some stuff without saving the results and these tables with asset/site maps
04:37:07martiniumwith proper examples to learn from I can build upon it
04:37:33martiniumI want a taste of the proper speed boost this lang can bring
04:37:46FromDiscord_<KingDarBoja> "Check failed: value.value == "Has a ਊ multi-byte character."
04:37:54FromDiscord_<KingDarBoja> "value.value was Has a 0000000000000A0A multi-byte character."
04:37:59FromDiscord_<KingDarBoja> Sooo close
04:38:01Yardanicowell as I said before you can speed it up a lot with async even in python
04:38:40martiniumyeah
04:38:58martiniumI'll prob an async python version when I complete the nim version
04:39:15Yardanicoalso one thing - "count" won't really be possible with an async version
04:39:16martiniumthe other good thing with nim is I can just give someone an executable
04:39:27martiniumcount is not really needed
04:39:32martiniumjust hadn't deleted
04:39:37Yardanicoyou'll need to also not forget to include openssl libs if you're compiling for windows :P
04:39:52skrylar[m]why would counts not be possible
04:40:09Yardanicoskrylar[m]: well I mean they will be possible
04:40:16Yardanicobut they won't be in sequential order like before
04:40:16martiniumsince the threads will prob right at different times
04:40:19martiniumyeah
04:40:24skrylar[m]true
04:40:25Yardanicomartinium: there's only 1 thread in async ;)
04:40:25martiniumwrite not right*
04:40:43Yardanicoconcurrency vs parallelism
04:40:49Yardanicoalthough you can use both at the same time
04:40:56martiniumI was about to ask that
04:41:04martiniumhow is parallelism in nim?
04:41:07martiniumis it stable?
04:41:14skrylar[m]hot potatos does v compile fast though
04:41:29Yardanicowell it is stable, but with the default GC you won't be able to use global GC'd memory
04:41:29*lritter joined #nim
04:41:38Yardanicothat's to be solved with --gc:arc but it's still in development
04:42:23martiniuma parallel async app would be amazing
04:42:36martiniumproper advantage of all modern cpu cores
04:42:58zedeusabout openssl and windows, I saw a bunch of forum threads about static linking but they were mostly old and nobody seemed to figure it out
04:43:36zedeusI really wanted to avoid shipping dlls though so I managed to do it on my own, maybe worth a forum post or something? i don't know if this is still something people haven't figured out
04:43:38zedeushttps://github.com/zedeus/kinoplex/commit/935138b2b7cac847a9093c8cdeb9b811531b360a
04:44:04Yardanicowell it's mostly the same for linux
04:44:10Yardanicocoz you're compiling with mingw :P
04:44:37Yardanicokaushalmodi made some static linking stuff for linux with libressl and pcre
04:44:47zedeusright but on linux people usually have openssl installed anyway so it's not an issue
04:44:51Yardanicohttps://github.com/kaushalmodi/hello_musl
04:44:59Yardanicozedeus: depends on what linux you're targeting though :P
04:45:07zedeusthe ones I care about targeting all have it :)
04:45:49martiniumwindows 10 comes with openssl nowadays
04:45:50*zacharycarter quit (Ping timeout: 256 seconds)
04:45:55martiniumopenssh nevermind
04:46:06martiniumopenssl is diff
04:46:16zedeusanyway, resources for static linking linux binaries with nim are aplenty, but there are basically none for mingw
04:46:20zedeusbesides dead ends on the forum
04:46:53leorizeyou get to be the first then :)
04:51:38FromDiscord_<KingDarBoja> https://github.com/nim-lang/Nim/issues/400
04:51:41disbotβž₯ Unicode-aware string handling ; snippet at 12https://play.nim-lang.org/#ix=2j9q
04:51:45FromDiscord_<KingDarBoja> @Varriount I see what you did there
04:51:48skrylar[m]depending on what you're doing you could also jank it with an ecs or something
04:52:02Yardanico@KingDarBoja there's https://github.com/nitely/nim-unicodeplus
04:52:12skrylar[m]store the task info in boxes and then have workers ask for the job across threads like you would be doing with beanstalk anyway
04:52:18Yardanicoalso https://github.com/nitely/nim-unicodedb
04:52:38Yardanicowell basically https://github.com/nitely/nim-unicodeplus combines 3 other unicode libs nitely wrote for Nim
04:52:57FromDiscord_<KingDarBoja> I will check the unicodeplus
04:53:03FromDiscord_<KingDarBoja> I love you Yardanico-sensei
04:53:37Yardanicoalso https://github.com/nitely/nim-strunicode
04:54:53FromDiscord_<KingDarBoja> Ok, unicodeplus doesn't seem what I am looking for, looking at strunicode
04:56:25Yardanicowhat do you want to do
04:56:29*zacharycarter joined #nim
05:00:06*dddddd quit (Ping timeout: 256 seconds)
05:00:41*zacharycarter quit (Ping timeout: 250 seconds)
05:00:52FromDiscord_<KingDarBoja> Handle unicodes on strings
05:01:04FromDiscord_<KingDarBoja> As different GraphQL APIs could return those
05:01:54skrylar[m]um
05:02:02skrylar[m]that doesn't mean very much
05:02:28skrylar[m]you can just do literally nothing and you 'handled' a unicode string
05:03:15skrylar[m]if you mean things like comparing two strings, then you start getting in to unicode normalization forms
05:06:08shashlickzedeus: see nimarchive and nimgit2 for static linking on windows with mingw
05:06:31skrylar[m]humm. should see how well this hot code reloading works in nim
05:07:11skrylar[m]the sheer compile speed and hcr are the spiciest meatballs in V.
05:09:10shashlickOf course that's cause the libs can be built on windows with their build tools
05:09:26shashlickOpenssl requires a laundry list of stuff to build
05:11:33FromDiscord_<KingDarBoja> I need unicode cuz my current lexer isn't able to catch properly unicode strings :/
05:12:37FromDiscord_<KingDarBoja> or maybe I am not correctly parsing them, lol
05:12:56FromDiscord_<KingDarBoja> Anyway, going to sleep, bye guys πŸ˜„
05:14:20Yardanicooh
05:14:26Yardanicoyou just need to use nim's unicode stdlib then
05:14:35Yardanicoand iterate over utf-8 runes instead of ascii characters
05:15:00Yardanicoalthough not neccessarily
05:15:10Yardaniconim itself supports utf-8 identifiers without actually using runes in the compiler AFAIK
05:17:13FromDiscord_<KingDarBoja> I had something like this -> elif character == 'u' and pos + 4 <= bodyLen
05:17:35FromDiscord_<KingDarBoja> And it is entering the condition but looks like I got the unicode wrong
05:17:55FromDiscord_<KingDarBoja> Because I am converting that string lice using fromHex
05:18:07FromDiscord_<KingDarBoja> Which I have no idea why I used it lol
05:18:22FromDiscord_<InventorMatt> is there a simple way to convert a string of an expression into a proc? like turning "x**2 + 3*x" into the appropriate proc
05:19:23Yardanico@KingDarBoja that's unicode escape character
05:19:28Yardanicowhere are you getting the values from? json?
05:19:34FromDiscord_<KingDarBoja> No, a string
05:19:35Yardanico@InventorMatt on compile-time? sure
05:19:46Yardanicothere's https://nim-lang.org/docs/macros.html#parseExpr%2Cstring
05:19:56FromDiscord_<KingDarBoja> But I think Variount mentioned something about perfomance with unicode module, not sure atm
05:20:05Yardanicojust create something like macro(a: static[string]): untyped = parseExpr(a)
05:20:10Yardanicodon't forget to import macros
05:20:13FromDiscord_<KingDarBoja> https://github.com/nitely/nim-strunicode looking at this one right now
05:21:10Yardanicoare you sure the string actually has \u1234 verbatim?
05:21:35Yardanicothat's usually a unicode escape
05:22:15*oculux joined #nim
05:22:27FromDiscord_<KingDarBoja> The input string is "{ field(arg: "Has a \u0A0A multi-byte character.") }"
05:22:47FromDiscord_<KingDarBoja> Doing repr(s) yields "0000000000996058" # This comment has a \\u0A0A multi-byte character.\10"
05:23:15Yardanicowhat if you do echo arg[8]
05:23:17Yardanicowhat does it print
05:25:05FromDiscord_<KingDarBoja> Char at Pos 8 ->{
05:25:15Yardanicouh
05:25:17YardanicoI mean
05:25:22Yardanicowhat if you do for x in str: echo x
05:25:34Yardanicodoes it actually print \ u 0 A 0 A each on their own line
05:25:38FromDiscord_<KingDarBoja> I just remember the thing with triple quote strings
05:25:46FromDiscord_<KingDarBoja> They do not escape sequences πŸ€”
05:26:34FromDiscord_<KingDarBoja> Yeah, it does
05:27:03Yardanicolol
05:27:19Yardanicoare you sure the graphql will actually return the answer like that?
05:27:23Yardanicoand not as utf-8 encoded strng
05:28:23FromDiscord_<KingDarBoja> I am looking at the source implementation (Javascript), the same test that I am trying to achieve
05:28:34FromDiscord_<KingDarBoja> Hold on
05:29:31FromDiscord_<KingDarBoja> https://github.com/graphql/graphql-js/blob/master/src/language/__tests__/parser-test.js#L137 this one mate
05:30:31Yardanicowell JS has unicode escapes
05:30:36FromDiscord_<KingDarBoja> The parser relies on the Lexer
05:30:39Yardanicoso you shouldn't test if there's an "u" character
05:30:43FromDiscord_<KingDarBoja> Which is hitting this proc
05:30:44FromDiscord_<KingDarBoja> https://github.com/graphql/graphql-js/blob/master/src/language/lexer.js#L445
05:30:58FromDiscord_<KingDarBoja> This function* lol
05:31:18Yardanicoyeah it iterates on unicode points as JS itself does
05:31:34Yardanicoalthough JS uses UTF-16 internally, I don't think it'll make a difference there though
05:31:42Yardanicoso you'll need to use "unicode" module or this strunicode
05:32:02FromDiscord_<KingDarBoja> Should I worry about perfomance ? Just curious
05:32:13*narimiran joined #nim
05:32:17Yardaniconot really I think
05:32:31Yardanicoalso I really think a lot of code in your port can be avoided, why not just write a simple iterative tokenizer lol
05:32:47Yardanicois your work open source?
05:32:53FromDiscord_<KingDarBoja> In the case of strunicode -> _Be aware, storing a sequence of grapheme clusters may take 10 times as much space as a utf-8 string. _
05:33:04Yardanicowell and JS does it like that by default
05:33:16FromDiscord_<KingDarBoja> By open source you mean on a repo without any stuff regarding companies? Yes
05:33:17FromDiscord_<KingDarBoja> xD
05:33:23Yardanicoyes I mean repo
05:33:27FromDiscord_<KingDarBoja> Yup
05:33:33Yardanicowell of course JS has logic for detecting if string contains unicode or not
05:33:35Yardanicofor optimization
05:33:41FromDiscord_<KingDarBoja> https://github.com/KingDarBoja/Phosphate
05:34:12FromDiscord_<KingDarBoja> I have few changes on local, need to push to the repo but lazy right now lol
05:44:21FromDiscord_<InventorMatt> @Yardanico I need something that can do it at run time not during compile time.
05:47:25Yardanico@InventorMatt then you need to look into embedding nimscript
05:47:25FromDiscord_<InventorMatt> if it helps to give context I am creating a wrapper for the sympy library and I want to be able to convert the symbolic equations into a proc that I can use within the code form there
05:47:30YardanicoNim compiles to native code
05:47:57Yardanicoyou'll either have to use a nim vm (which nimscript is) or think of some other way of doing that :P
05:48:16FromDiscord_<InventorMatt> okay, thanks.
05:48:47FromDiscord_<KingDarBoja> Yard, just updated the repo πŸ˜„
05:49:09FromDiscord_<Gary M> `dev->command_pools = malloc(queue_info_count * sizeof *dev->command_pools);` from C, what is the nim way of doing this?
05:49:42Yardanicoif it's a dynamically allocated "array" in c - use seq
05:50:41FromDiscord_<KingDarBoja> If you can take a look and help me with that unicode thing, thank you
05:50:44FromDiscord_<KingDarBoja> Now going to sleep
05:50:47FromDiscord_<KingDarBoja> πŸ˜„ Bye bye
05:53:16*silvernode joined #nim
06:11:06FromDiscord_<Varriount> Hm, someone here was talking about implementation async functions using state machines, but I can't recall who...
06:12:42leorizeit's rayman22201
06:13:09leorizebut he is busy with his day job rn, sadly
06:13:35leorizethough Araq did voice interest in working on a newer async implementation
06:14:21Araqthat doesn't mean much, Araq is always too busy
06:14:55Araqbut I'll write my 20 line arc async proof of concept
06:17:52FromDiscord_<Varriount> Araq: I was idly "sketching" an idea out today. It mostly hinges on async iterators and the fact that you can call an iterator instance with different parameters.
06:18:34FromDiscord_<Varriount> Rather than the nested closure concept currently used.
06:22:48*solitudesf joined #nim
06:23:27silvernodeGood morning
06:24:20silvernodeso I am trying to create a type and make one of the fields a bool but it won't let me.
06:25:43FromDiscord_<Rika> can i see code
06:25:48FromDiscord_<Rika> also good morning
06:26:50silvernodehttps://play.nim-lang.org/#ix=2j9P
06:27:24FromDiscord_<Rika> equals sign
06:27:27FromDiscord_<Rika> use colon
06:27:48silvernodeoh duh
06:27:51silvernodethanks
06:28:18silvernodeI knew better than that, what's wrong with me!
06:28:26FromDiscord_<Rika> you just woke up
06:28:56silvernodeIndeed I did, and in 30 minutes, I have to clock into work
06:31:15silvernodeWe deided to start over with Space Nim now that we have mostly figured out what we want to do
06:31:23FromDiscord_<Rika> we?
06:31:37silvernodeA childhood friend is helping me work on it
06:32:38silvernodeAlso, techinically disruptekis a project member but has not had a good reason to jump in yet. The project is still materializing.
06:33:09silvernodeThat's what happens when you don't know what direction to go in and how to code well
06:33:39silvernodestill flushing out the details but we know a lot more about Nim, and where we want to go with the game
06:35:13*filcuc joined #nim
06:35:21silvernodeWe decided that exploration will be something you cannot do without turns, and the player gets turns as a reward
06:37:00FromDiscord_<Rika> thats odd
06:37:12FromDiscord_<Rika> so its a turn based now instead of a real time
06:37:21silvernodeyeah
06:37:36silvernodeturn based should be easier on the brain for a new programmer
06:38:26silvernodeI have trouble breaking down problems and using logic even if I know all the language syntax
06:40:09silvernodeside note, as a young boy, it look me longer than most children to learn how to read. My brain tends to learn in a technical lway so explainations usually need to be disected more so than needed for most people.
06:40:33*PMunch joined #nim
06:41:17*temporarymonarch is now known as tangor
06:41:35silvernodeLike: Roads are smooth so motor vehicles can travel easier. I would ask: but how is the road made smooth?
06:42:05silvernodeTo which a teacher would reply: They just are.
06:43:36silvernodeI seem to be rambling a bit lol. oops
06:44:15FromDiscord_<Rika> that is fine
06:44:18FromDiscord_<Rika> no one is here
06:44:37silvernodeI guess I just want people to know me here because I like the crowd in this IRC.
06:45:04silvernodeIt's the first community that I feel like I can be myself.
06:46:56silvernodedisruptek: says I should start streaming when I start coding, just like he does.
06:47:47FromDiscord_<Rika> why not?
06:51:56*martinium_laptop joined #nim
06:53:19martinium_laptopanyone ever encounter this error?
06:53:22*filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
06:53:23martinium_laptop```Exception message: Too many open filesAdditional info: "nodename nor servname provided, or not known"Exception type: [OSError]```
06:54:05martinium_laptopYardanico failed with that same error again
06:54:13FromDiscord_<Rika> you probably opened too many files?
06:54:17martinium_laptopwondering if it is a macOS limitation
06:54:31FromDiscord_<Rika> macOS has a pretty low file handle limit from what i recall
06:54:33*oculux quit (K-Lined)
06:54:45martinium_laptopI am making a bunch of async web requests and processing some data
06:54:57FromDiscord_<Rika> are you closing your files
06:54:59*ryan_ joined #nim
06:55:11martinium_laptopthe only thing I have to close is the connections
06:55:23martinium_laptopand they are being closed after each request completes
06:56:15FromDiscord_<Rika> do you open any files
06:56:55martinium_laptoponly file I create is a CSV that is written to in a loop
06:57:14*tangor quit (Ping timeout: 240 seconds)
06:57:49FromDiscord_<Rika> huh
06:57:51FromDiscord_<Rika> hm
06:57:54*silvernode quit (Ping timeout: 256 seconds)
06:58:17martinium_laptopI assume by open files it is referring the http get requests potentially
06:58:36FromDiscord_<Rika> but you said you were closing them so
06:58:41martinium_laptopyeah
06:58:58martinium_laptopclient.close is called after each requests
06:59:06martinium_laptopso this error has me confused
06:59:16martinium_laptoperror type says OSError
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:51*gmpreussner joined #nim
07:13:43*hax-scramper quit (Ping timeout: 250 seconds)
07:14:15*hax-scramper joined #nim
07:19:31martinium_laptopsolved the issue
07:20:19*Vladar joined #nim
07:24:10FromGitter<codenoid> hi folks
07:24:43*liblq-dev joined #nim
07:24:55PMunchHi codeneid
07:41:13*martinium_laptop quit (Remote host closed the connection)
07:44:59*couven92 joined #nim
07:48:33*ryan__ joined #nim
07:48:51*Romanson quit (Quit: Connection closed for inactivity)
07:51:07*ryan_ quit (Ping timeout: 265 seconds)
08:01:35*Vladar quit (Quit: Leaving)
08:04:34*letto_ quit (Ping timeout: 240 seconds)
08:06:23FromDiscord_<Rika> anyone here knowledgeable on reactive programming? or got any guides for implementing it in a language? trying to do so for nim but i got nowhere to start
08:14:03AraqRika check out my experiments inside karax's repo
08:14:08Araqsummary: it sucks...
08:14:11Araq;-)
08:14:28FromGitter<jorjun_twitter> There’s a plethora of code-challenge type websites now. Who wants a code-wrestling place to go? The winning solution wins human votes for aesthetic, and the machine can assess each solution for memory, and performance.
08:15:06*filcuc joined #nim
08:15:20FromDiscord_<Rika> Araq: why does it suck? also, a guide for moving away from reactive would also help me
08:15:29FromGitter<jorjun_twitter> Difficult allowing different language entries..but something to think about . If there is any interest. A marketer guy told me: see if there is interest before you build speculatively.
08:15:31FromDiscord_<Rika> im just trying to port something to nim and it uses reactive, really
08:16:15*martinium quit (Ping timeout: 265 seconds)
08:18:24FromGitter<jorjun_twitter> Trick is to devise challenges where there is a mix of IO bound and CPU bound. Would have to get categories together.
08:22:48*filcuc quit (Ping timeout: 256 seconds)
08:26:16*natrys joined #nim
08:33:59*Ven`` joined #nim
08:44:13FromGitter<jorjun_twitter> Ideally would tune it so that script guys can sometimes win. There’s not enough objective evidence of benefits of compiling in context of IO-heavy tasks.
08:44:29FromGitter<jorjun_twitter> And now I will get my coat. :D
08:44:40FromDiscord_<Rika> thats a large gap in time
08:46:58*oculux joined #nim
08:49:03*dchem joined #nim
08:52:06*tane_ joined #nim
08:53:27*kenran joined #nim
08:58:41*dchem_ joined #nim
08:58:48*dchem_ quit (Client Quit)
08:59:14*dchem_ joined #nim
09:01:30Araqjorjun_twitter: Nim is not just about "make scripting faster", it's also "let's fix scripting and give a type system"
09:01:34*dchem_ quit (Client Quit)
09:02:01*dchem_ joined #nim
09:02:01*dchem_ quit (Client Quit)
09:02:31AraqRika: it's much more complex than DOM diffing and DOM diffing is already too complex
09:02:39*dchem quit (Ping timeout: 260 seconds)
09:02:48*dchem_ joined #nim
09:04:41PMunchIs there a better way to do this without "toStr"? https://play.nim-lang.org/#ix=2jan
09:05:00*dchem_ quit (Client Quit)
09:05:15*dchem joined #nim
09:05:27FromGitter<jorjun_twitter> @Araq Yes, I see that. Didn’t come on here to critique, but thinking about teaching some new coders best practice.
09:05:28*dchem quit (Client Quit)
09:06:10FromDiscord_<Elegant Beef> Everyone knows the best coding practice is to stop before you start πŸ˜„
09:06:22FromDiscord_<Elegant Beef> Cant write bad code if you dont write code
09:06:27supakeenThere isn't really a best practic when it comes to CPU vs I/O bound, it heavily depends on the workload even within those domains :)
09:06:32FromGitter<jorjun_twitter> When you solve these online code challenges, the only feedback you get right now, is votes from others and unit test passing.
09:06:35*dchem joined #nim
09:06:48FromGitter<Vindaar> @PMunch: `astToStr(name)`?
09:07:26FromGitter<jorjun_twitter> Would be good to get across a range of considerations...
09:07:55PMunchVindaar, ah perfect. I knew there was a way!
09:08:52FromDiscord_<Elegant Beef> Without multiple languages you could have a few solutions of good,great, and fantstic, which both use line count, memory usage, and time as indications of the solution method
09:09:23FromDiscord_<Elegant Beef> With multiple languages you have basically 0 benchmark, and users arent going to be that into reading over 9 million duplications of the same thing
09:09:42FromGitter<timotheecour> @araq is there anything else needed for https://github.com/nim-lang/Nim/pull/13926 beside the comment here https://github.com/nim-lang/Nim/pull/13926#discussion_r406714163 ?
09:10:09dchemHello! when a compiler gives an error like "Got <Future[type]> but got Future[type]" what does angled brackets "<" mean?
09:10:55FromGitter<jorjun_twitter> @Elegant Beef The "new thing" to bring to the table is objective assessment of the solution with benchmarking & instrumentation.
09:10:59PMunchRika, what kind of reactive programming do you need? It should be entirely possible to do it in Nim
09:11:00dchem"but expected Future[type]" sorry
09:11:31Araqtimotheecour: I don't understand it, what I'm saying is this:
09:11:56PMunchdchem, nothing. There is something else wrong
09:11:57FromDiscord_<Elegant Beef> Yea the benchmarking is interesting, and you could do use stdin/stdout for managing most languages, but bench marks would require a rosetta code like database
09:11:58Araq.importc'ed types have sizeof, but that sizeof must be mapped to C's sizeof mechanism
09:12:11FromDiscord_<Elegant Beef> I suppose you could possibly use rosetta code for challenges
09:12:31FromGitter<alehander92> hmm reactive programming
09:12:40FromDiscord_<Elegant Beef> Also would require having support for many languages as far as i can see
09:13:21FromGitter<jorjun_twitter> @Elegant Beef oo great idea to grab bootstrap with existing solutions. Then I wonder how hard it is to add "fair instrumentation" all the different runtimes.
09:13:22Araqtimotheecour: and then we have .incompleteStruct for when sizeof is not available
09:13:26FromGitter<timotheecour> right but I’m enabling CT sizeof for types that are explicitly whitelisted as being complete; and for these, a static_assert will check for that
09:14:02FromGitter<timotheecour> `incompleteStruct` doesn’t work at all, because it’s the wrong default (as i showed)
09:14:25Araqsure but it isn't the default, so there is no design flaw here
09:14:32dchemPMunch, thank you. That's weird
09:14:40FromDiscord_<Elegant Beef> Yea, i actually think any CS projects in schools should be done with the stdin/stdout methods, since forcing the usage of a single language when you might know many/dont like the language they use is weird
09:15:31FromGitter<timotheecour> the default should mean incompleteStruct, and incompleteStruct is or should be in fact a noop; the non-default is explicit `completeStruct`
09:15:42FromDiscord_<Rika> Slr, PMunch, the one like in RxJava, and I figured it would be possible in Nim, I just don't know where to start coding one
09:15:59Araqtimotheecour: so what's the original problem again?
09:16:12Araqyou want to check if we got an .importc'ed definition right?
09:16:21FromGitter<timotheecour> enabling CT sizeof, and checking for it
09:16:42FromGitter<jorjun_twitter> @EB My older bro’ trying to sell me Elixir to me, and I take a look at it and feel complete disgust at the syntax. I really think that people will go for the language they can tolerate the look of, and that’s fine.
09:17:01FromGitter<alehander92> @jorjun_twitter i liked elixir before, it's elegantly simple with its macro system
09:17:08FromGitter<timotheecour> and fixing the pre-existing bugs that we’ve silently had in the past where we claim a type has sizeof x but in fact has sizeof != x
09:17:22Araqbut CT sizeof for .importc is very dangerous
09:17:23FromGitter<alehander92> the syntax was very ruby-like + `|>`
09:17:24FromGitter<jorjun_twitter> But there has to be some engineering in there, too. And schools have to try not to oppress budding talent making it crawl around on the floor
09:17:45FromGitter<jorjun_twitter> Yes, he is a ruby geek. I just can BEGIN and END with that s**
09:18:08dchemPMunch, is there a flag to get more detailed compiler error? I'm really lost here. Thank you.
09:18:45PMunchRika, well I guess you would need some data structure to drop data into. And some wrapper that makes asynchronous methods able to put things into this data structure.
09:19:08PMunchAnd a way to save callbacks for things to be inserted into the structure
09:19:30FromDiscord_<Elegant Beef> Yea jorjun it's a silly thing to me to have any requirement on language, like who the fuck cares what int/int equals in language x
09:20:07FromDiscord_<exelotl> I do wish the .size pragma would work for importc'd objects, rather than just enums. There are cases where I know exactly how big a type is (due to hardware / library / toolchain guarantees), but still can't do sizeof at compile time
09:20:08PMunchdchem, not really. If you post the full error message and a code snippet there probably is enough information to figure out what has gone wrong
09:20:22FromDiscord_<Rika> Wait, so something similar to streams?
09:20:33FromDiscord_<Rika> Man reactive is hard to understand
09:20:42FromDiscord_<Elegant Beef> Anyway, yea rosetta code could be a good base, assuming it's not locked down due to licensing, since it's got a ton of challenge solutions, the big thing would be getting many language compilation support
09:21:00FromDiscord_<Elegant Beef> compilation/runtime*
09:21:07FromDiscord_<Elegant Beef> Anyway i sleep now, buh bye
09:21:37PMunchRika, kinda, but not really. And it's not that difficult. It's basically setting up callback for things that can update, and propagating the updates in a reasonable manner
09:22:02FromGitter<jorjun_twitter> @EB yep, I find it fascinating that there are so many distinct temperaments. Worth finding out which language appeals. I might make a facility. Last opus was a photographer competition site. But itching to make another community for coders.
09:22:28*couven92 quit (Ping timeout: 265 seconds)
09:22:41FromGitter<jorjun_twitter> Some people just need introducing to good taste of course...
09:22:41Araqtimotheecour: I'm merging it but the cost is you get to update the documentation and write some very precise docs
09:22:43FromGitter<timotheecour> @araq the danger is much mitigated by fact that C compiler checks for it at C compile time via static_assert , with this this PR. And it’s opt-in anyways. And we’re already relying on this feature with types that have `{.importc, size:8.}` (for eg ) or `type Foo {importc} = cint`; and I’ve shown that thanks to this PR, we can identify existing violations.
09:23:02FromGitter<timotheecour> sure, i can do that
09:23:15FromDiscord_<Rika> PMunch: reasonable? What is an unreasonable manner
09:24:06PMunchI dunno :P
09:24:10*couven92 joined #nim
09:24:13skrylar[m]well'p. gave v a short spin on windows. windows kept complaining about "security scans", had one instance of its cache files corrupt and need manual deleting, and hot code reloading didn't work. cest la vis.
09:24:23PMunchSetting up a socket for everything and sending all your data through the Tor network?
09:24:31PMunchThat would be pretty unreasonable
09:24:56FromGitter<timotheecour> @araq thanks
09:25:26dchemPMunch, https://paste.debian.net/1142393/
09:25:46Araqso ... it's PR week, not sure if #nim noticed
09:26:00Araqthe plan is to get below 100 open PRs
09:26:08PMunchOh neat
09:26:09FromDiscord_<Rika> There are articles everywhere on how to use reactive programming but none that I know of about how to implement them
09:26:26AraqRika: ask skrylar[m], he did it well iirc
09:26:36PMunchI feel like that's often the case Rika
09:26:52skrylar[m]cobweb never actually got finished because i was fighting the type system at the time, buuuut
09:27:04skrylar[m]Β―\_(ツ)_/Β― basically you just need toposort
09:27:29FromDiscord_<Rika> ????
09:27:54skrylar[m]well reactive programming is literally just reacting to events, and works kinda the same as how spreadsheets work
09:28:06FromDiscord_<Rika> Good analogy
09:28:10skrylar[m]you have a value node and add edges for things the value depends on to be updated
09:28:14Araqkarax has ReactiveSeq and stuff
09:28:28Araqand I wrote "todo" with Karax Reactive
09:28:38FromDiscord_<Rika> Oh no, graphs, I'm no good at that
09:28:49AraqI think the code is somewhere under /experiments
09:28:54skrylar[m]they're not complicated really
09:29:23skrylar[m]values have <-> relations with other values, and when you update one you iteratively trigger the other values watching that
09:29:39skrylar[m]and maybe throw in a little topological sorting to check for abberant geometry in the graph
09:30:16skrylar[m]if you promise not to make infinite loops you can do it with simple seqs and barely any code
09:30:16Araqyou need to watch out for infinite update events, A updates B which causes A to update which ...
09:30:45Araqin my experience with vue.js that problem quickly became intractable
09:30:51dchemPMunch, sorry, I should have included that I'm using nim 1.2.0
09:30:59skrylar[m]yea i dunno how spreadsheets deal with cycles like that. i think most of them just go "NO." and refuse to propagate
09:31:16FromDiscord_<Rika> google sheets limits propagations afaik?
09:31:21Araqbut I was also forced to write the code in the most convoluted way possible, so my experience is very biased
09:32:00Araqskrylar[m]: in most programming systems there is a 'onNextTick' thing for it
09:32:06skrylar[m]recursive data exists sometimes like meeks algorithm where you have to sit there and iteratively crunch the same things until they settle down but
09:32:28skrylar[m]delaying propagation by one yeah. vcv rack does this
09:32:31FromGitter<timotheecour> meh, i actually like karax, there are bugs that should be fixed but it’s useful and I don’t know of a better existing alternative
09:32:39skrylar[m]all values go in to "cables" so each conncetion creates a one frame propagation lag
09:32:57AraqI recently fixed the most pressing Karax bugs
09:33:04Araqbut Karax is DOM diffing, not reactive
09:33:25FromDiscord_<Rika> @_@
09:33:37FromDiscord_<Rika> am overwhelmed now
09:33:38*couven92 quit (Ping timeout: 256 seconds)
09:33:41skrylar[m]what i did was have a single cobweb object and the expectation is you use that to connect value objects, which are just generic boxes, because then the cobweb object is able to watch out for stupidity. but also, double effort you can use something like skyblue https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.8935
09:34:05AraqI'm a huge fan of immediate mode UIs, DOM Diffing emulates to a good extend
09:34:16PMunchdchem, probably need to mark that procedure as {.async.}
09:34:28skrylar[m]skyblue is capable of being told several possible dependencies of a constraint, and it will work out which ones need to be re-routed and which ones have to be disabled, so you can get a little further with the dataflow that way
09:34:34Araqand for me reactive tries to do the same as immediate mode and fails
09:34:48skrylar[m]its beautiful when it works
09:35:13Araqimmediate mode is more beautiful and works more often ;-)
09:35:37skrylar[m]bacon.js is also one to look at; its kinda basic but it gets the point across
09:36:17dchemPMunch, using {.async.} and then doing result = await newWeb3(uri) returns type mismatch: got <Future[web3.Web3]> but expected 'Web3 = ref Web3:ObjectType'
09:36:54PMunchHmm
09:36:59dchemPMunch, sorry the output was type mismatch: got <Future[web3.Web3]> but expected 'FutureBase = ref FutureBase:ObjectType'
09:37:18*couven92 joined #nim
09:37:42dchemIt's possible that it's web3 project issue, I'm not too familiar with future and asyncdispatch yet, so I dn
09:39:10dchemI don't know what is the prefered way to write {.async.} compatible functions - putting together toy examples without web3 works just fine, and using the await newWeb3(uri) in another context works just OK
09:39:52dchembut not if I'm trying to make a separate proc that just returns future
09:40:32*bra-ket quit (Ping timeout: 265 seconds)
09:41:08FromDiscord_<Rika> skrylar so what made you archive cobweb
09:41:21dchemI mean nesting an async function that returns future within a async function that returns future should just be returning either the yield val or doing it as await
09:42:11dchemPMunch, thank you in any regard.
09:43:57AraqClyybber: found the cycle collector problem
09:44:36skrylar[m]@Rika i went to rust for a while, but also dealing with variant objects was getting to be a pain. might be able to unarchive it and fiddle with it at some point
09:44:57Araqit's the old "freelist" problem, the paper uses a freelist and we don't. a freelist turns "accesses freed memory" into a valid operation
09:45:00skrylar[m]i also didn't really understand how stuff like skyblue worked and had no help at the time, so i had to grind through things like the cassowary paper for a month
09:46:48Araqfun fact: Facebook's Reactive framework isn't "reactive programming"
09:47:39skrylar[m]its funny that im the one who nudged the Red guys in to adding frp stuff and now they list it as a front page feature
09:48:53skrylar[m]i seem to remember having issues storing types in value objects
09:53:18*Vladar joined #nim
09:54:26*letto joined #nim
09:59:54*hax-scramper quit (Ping timeout: 240 seconds)
10:01:08FromDiscord_<mratsim> well types aren't concrete ...
10:01:21*hax-scramper joined #nim
10:01:21FromDiscord_<mratsim> but isn't "PhantomData" used for that?
10:02:21FromGitter<alehander92> hmm
10:13:54skrylar[m]i dunno but cobweb was like, nim 0.17 too
10:16:23*PMunch quit (Quit: leaving)
10:25:43*opal quit (Ping timeout: 240 seconds)
10:27:14*lritter quit (Ping timeout: 240 seconds)
10:34:40*abm joined #nim
10:36:07*krux02 joined #nim
10:42:34*PMunch joined #nim
10:56:03*natrys quit (Ping timeout: 260 seconds)
10:56:10*inv2004 joined #nim
11:00:17inv2004Hello, How to get second int byte from structure?
11:00:17inv2004cast[UncheckedArray[cint]](x.k)[1] does not compile
11:00:25inv2004I use kind variant, but I do not want to do big case just to extract the same number from different kinds
11:00:49PMunchSecond int byte?
11:00:58PMunchWhat's an "int byte"?
11:01:08inv2004ah, sorry
11:01:14inv2004second int position
11:01:28FromDiscord_<Rika> what structure
11:02:05inv2004a: char, b: char, kind: char, c: char, iNeedThisInt: int
11:02:32inv2004ptr object ...
11:03:20FromDiscord_<Recruit_main707> does openArray change anything?
11:03:25FromDiscord_<Rika> im still heavily confused
11:03:29dchemok, so it's status-im people with their own "chronos" library that is causing the problem I mentioned earlier
11:03:29FromDiscord_<Rika> @Recruit_main707 wdym?
11:03:48dchemcan't use asyncdispatch with nim-web3 library
11:03:59FromDiscord_<Recruit_main707> instead of uncheckedArray OpenArray
11:05:06FromGitter<alehander92> dchem they are relatively similar
11:05:09FromDiscord_<Rika> openarray isnt a real type isnt it?
11:05:10FromGitter<alehander92> chronos and asyncdispatch
11:05:25dchemYes, but it's causing issues with compilation on 1.2.0
11:05:34FromGitter<alehander92> hm, chronos should work on 1.2.0 iirc
11:05:43FromGitter<alehander92> i think status upgraded their code to 1.2.0
11:05:52FromDiscord_<Recruit_main707> Rika: oh right, he should use toOpenArray()
11:05:52dchemI mean you can use either chronos or asyncdispatch, but not both
11:06:24PMunchSomething like this? https://play.nim-lang.org/#ix=2jbt
11:06:37PMunchinv2004_ ^
11:06:44FromGitter<alehander92> dchem oh, i guess it would be hard to use both
11:06:49PMunchNote that I wouldn't recommend that..
11:07:03FromDiscord_<Recruit_main707> inv2004: can you show us the code?
11:07:45FromDiscord_<clyybber> Araq: Oh, nice. I was just about to start looking at it.
11:08:01Araqhowever, nothing I do works
11:09:30*natrys joined #nim
11:11:53inv2004PMunch, looks like (array[2, x])[1] works, Thank you
11:12:21PMunchYes, that would work to get the second int field
11:12:30PMunchStill, wouldn't recommend it though..
11:12:39inv2004why UncheckedArray does not work ?
11:12:51FromDiscord_<mratsim> you need to use ptr UncheckedArray
11:12:55FromDiscord_<Recruit_main707> ^
11:15:41PMunchHmm https://play.nim-lang.org/#ix=2jby
11:15:58PMunchWhat is up with the data in there..
11:16:08PMunchThe 0th field should be the kind no?
11:16:37PMunchAh, nvm..
11:16:56PMunchThe TestKind enum is sizeof 1 and the rest is just alignment
11:17:13PMunchSo uninitialised data
11:17:20PMunchMakes sense
11:22:30*arecaceae quit (Ping timeout: 258 seconds)
11:23:46*arecaceae joined #nim
11:34:11inv2004mratsim, it works, thanks, I forgot that my struct is a pointer
11:37:58FromDiscord_<Recruit_main707> i think that has nothing to to, its just that uncheckedArray should be used with ptr iirc
11:41:27*lritter joined #nim
11:42:36inv2004Another question: I reading this page: https://nim-lang.org/docs/destructors.html
11:43:02inv2004But do I need any hook to inc_refs during contructor of the object ?
11:43:28inv2004or `[]` works for constructor also? (Easy to check I suppose)
11:46:18inv2004Misprint I mean `=`
11:46:34inv2004Looks like it does not run for constructor
11:57:12Araqthere is no constructor you can hook into
11:57:56inv2004ok, not a big deal I think
11:58:34inv2004Another question why =destroy is not called for the line?: https://github.com/inv2004/k_nim/blob/38c559d1640b7ed2260d0d535f94aa65dc2b5215/src/k_nim.nim#L31
11:59:43inv2004a bit confused: it worked before :)
12:00:43*filcuc joined #nim
12:03:31*filcuc quit (Client Quit)
12:06:02*supakeen quit (Quit: WeeChat 1.9.1)
12:06:40*supakeen joined #nim
12:09:24inv2004=sink prevent destroy. hm
12:21:44Araqyour =sink needs to destroy
12:23:18inv2004why? I thought it is move
12:24:24inv2004it is really necessary to define =sink? Or I can make first implementation without it and it will work with =destroy only?
12:25:05Araqiirc =sink is inferred these days
12:26:24inv2004but cannot understand why should I copy destroy into sink, or maybe I misunderstood something
12:27:14*opal joined #nim
12:27:15Araqread our documentation please
12:28:07Araqin imperative programming languages the assignment is destructive, it destroys the old value, both = and =sink need to clean up what was previously in the memory cell
12:28:23Araqit's fundamental.
12:47:39*dddddd joined #nim
12:48:23*liblq-dev quit (Read error: No route to host)
12:49:49FromDiscord_<exelotl> Is there a tutorial for this stuff that explains the basics? I feel like I've only seen plans/proposals but they assume familiarity with the subject and I'm not sure how it compares to what actually got implemented
12:49:53*CcxWrk quit (Quit: ZNC 1.7.4 - https://znc.in)
12:53:58FromDiscord_<exelotl> Looking at that destructors doc it seems clearer than last time, but still not sure about the lent or owned stuff. Is that still relevant?
12:54:57*CcxCZ quit (Quit: WeeChat 2.4)
12:55:12*CcxWrk joined #nim
12:56:40*CcxCZ joined #nim
13:00:04Araq'owned' is currently not a thing, 'lent' is under-used
13:00:18*Hideki_ joined #nim
13:00:24Araqyou can ignore both
13:04:30Araqexelotl: we don't have a tutorial yet but the summary would be "use --gc:arc, everything else is details you can ignore"
13:05:04*Hideki_ quit (Ping timeout: 256 seconds)
13:14:01Faulanderhuch, ist github down?
13:15:05FromDiscord_<clyybber> not for me
13:15:33FromDiscord_<clyybber> oh, doch..
13:16:51PMunchYup, it's down: https://www.isitdownrightnow.com/github.com.html
13:17:22Faulanderok, good to know.
13:17:22*hax-scramper quit (Read error: Connection reset by peer)
13:17:25Araqclyybber: I am beginning to think the algorithm cannot be saved
13:17:33*hax-scramper joined #nim
13:17:44Araqeven if correct, it suffers from lots of other problems
13:18:37FromDiscord_<clyybber> what problems?
13:19:10Araqheavily shared nodes are 'yellow' all the time and incur the trial deletion overhead
13:19:57Araq(which is enormous for 'havlak')
13:20:23PMunchFaulander, sees to be back up now
13:20:55Araqboth 'incRef' and 'decRef' have even more instruction inside, so inlining them cause more code bloat
13:21:01Araq*instructions
13:21:47PMunchEh, maybe not..
13:21:57*rockcavera joined #nim
13:22:10AraqPMunch: it's down for me too
13:26:46FromDiscord_<clyybber> Araq: Maybe we will get some optimization ideas after getting it to work
13:28:33Araqbut we have these optimization ideas
13:28:52Araqthey amount to "copy Python's algorithm, it's better"
13:30:04Araqfor Nim's case this means we introduce (un)registerPotentialCycle() operations and let the user-land deal with the problem
13:30:45Araqwant a cycle collector? import std / cyclecollector
13:32:30FromDiscord_<clyybber> Araq: We could also make it opt in, via marking the objects as {.cyclic.}
13:32:56Araqwe can't really. the hard cycles are introduced by closures
13:32:58FromDiscord_<clyybber> Or we try to prove as "hard" as possible that its {.acyclic.}, possibly via drnim?
13:33:19*fredrik92 joined #nim
13:33:22FromDiscord_<clyybber> Araq: Hmm. Do you know how rust solves the closure problem?
13:33:30*zacharycarter joined #nim
13:33:42*Romanson joined #nim
13:33:55AraqI know how Swift does it but I don't think it's applicable for Nim
13:34:20*couven92 quit (Disconnected by services)
13:34:25*fredrik92 is now known as couven92
13:35:10companion_cubeclyyber: rust creates a new (anonymous) type for each closure
13:35:42companion_cubethat's why you can write `fn map<F:Fn(A)->B>(v: Vec<A>, f: F) -> Vec<B> {…}`
13:35:59companion_cubeoops, should be `<A, B, F:Fn(A)->B>`
13:36:07FromDiscord_<clyybber> companion_cube: Oh yeah, I mean how it handles capturing/cycles introduced by closures
13:36:08companion_cubebecause the type of `f` is itself a type variable
13:36:16companion_cubecycles are impossible
13:36:30companion_cubecapturing is done either by reference, in which case the borrow checker must agree
13:36:42companion_cubeor by move (a move closure), in which case it moves inside the closure whatever's captured
13:36:50companion_cubetypically needed for spawning a thread
13:37:07companion_cube`thread::spawn(move || { … })` as you can't borrow from another thread's stack
13:37:42FromGitter<alehander92> `move ||` is a syntax sugar, but is there a way to do it more granulary
13:37:53FromGitter<alehander92> e.g. `|a is moved, b is borrowed|`
13:38:24*Ven`` quit (Quit: Textual IRC Client: www.textualapp.com)
13:38:29Araqwell we had pretty much the same solution with 'owned ref', 'owned proc'
13:38:53Araqproblem is that our legacy code doesn't work with it
13:39:32FromDiscord_<Venator> Can someone point me to any documentation about how C types map on to Nim types? Seems like an import subject which is only touched on in the manual and backends document, unless I've missed it.
13:39:50companion_cubealehander92: really? :o
13:39:55companion_cubewhat's the syntax for that? I didn't know
13:40:08companion_cubedo you just annotate the types?
13:40:55*Hideki_ joined #nim
13:41:21PMunchVenator, what do you mean?
13:41:45PMunchLike what is a C int in Nim? Or more like "what is this struct" in Nim?
13:41:52PMunchOr the other way around?
13:42:28FromDiscord_<Venator> What is a C int and a C struct in Nim
13:42:41FromDiscord_<Venator> when calling out via FFI for example
13:43:00PMunchWell most C types simply have c placed in front of them in Nim
13:43:14PMunchSo an int is a cint, an unsigned int is a cuint, etc.
13:43:52PMunchObjects in Nim are pretty analogous to a structure in C. They don't contain anything extra so they map one to one for the simple case.
13:44:19PMunchWith variant objects and generics it gets a tad more complicated
13:44:52PMunchVariant objects can be thought of as a structure with a union in them. And generics just create a copy of the struct for each distinct type.
13:46:07PMunchchar * can be expressed as cstring as well, not just ptr char. With cstring Nim will treat it as a zero-terminated string, with ptr char it will treat it as a single character.
13:46:21PMunchIf you need void * you can use `pointer` in Nim
13:46:23FromDiscord_<Venator> That may be enough for me then, the API I want to use is fairly straightforward and uses ints, floats, strings (const char*) and simple structs
13:47:20PMunchYeah, then these should be pretty much what you need: https://nim-lang.org/docs/system.html#clong
13:47:34PMunchI guess this should be summed up in an article
13:48:31FromDiscord_<Venator> Yeah, the manual mentions cstring and cint but never defines them really, a more comprehensive C mapping doc would be nice I think
13:50:16*NimBot joined #nim
13:51:17companion_cubeor rather, you can make an explicit reference, and capture *that* by move if needed, I imagine
13:51:29companion_cubebut if you use a move closure it's probably because it's going to live longer than your stack frame
13:57:13*sz0 quit (Quit: Connection closed for inactivity)
13:57:40FromGitter<alehander92> but doesn't that happen very often
13:58:37FromGitter<alehander92> probably most of the time with callbacks/etc except for functional code like map/filter chains
13:58:37companion_cubedepends what you use the closure for, I guess
13:58:47companion_cubeah well, callbacks suck, I guess
13:58:51FromGitter<alehander92> that would be a good thing to coverage
13:59:00companion_cubebut then you allocate some place to put your closure, a Box or something like that
13:59:02FromGitter<alehander92> lifetime of closures in a run
13:59:04companion_cubeand use a move closure
14:00:32inv2004ah, just understood that is was about destroy destination of = and =sink
14:01:20FromGitter<alehander92> companion_cube interesting
14:01:25Araqinv2004: please write a short article about your findings, we need an arc tutorial
14:02:05inv2004:)))
14:03:30companion_cubealehander92: it's also interesting that the "default" is by borrow, which is enough for most iter/map/filter things
14:03:49*Hideki_ quit (Ping timeout: 264 seconds)
14:04:13disruptek#13926
14:04:14disrupteknice!
14:04:16disbothttps://github.com/nim-lang/Nim/pull/13926 -- 6CT sizeof(+friends) for {.importc, completeStruct.} types, enable ABI static checks ; snippet at 12https://play.nim-lang.org/#ix=2jcQ
14:08:01Araqcompanion_cube: if only this were true... the default is by "I take ownership" when you use the plain 'T' as a parameter. you have to use pointers everywhere else. ok, they are borrowed and safe but it's cumbersome
14:10:27shashlickheh dev is blocked with github down
14:11:21inv2004I started first part of the manual "how to set random ref_inc() and ref_dec() and run it until your program works"
14:12:41Araqer... ok.
14:17:34*nortti joined #nim
14:19:10FromDiscord_<UNIcodeX> GitHub seems to be working for me
14:20:34companion_cubeAraq: not in closures, afaik
14:33:33disruptekpro streamer tip no. 43: always lick your earbuds before insertion; makes for a solid 8hr seal.
14:33:42*nortti left #nim ("Anthropologa se non exstare reperit. Solum exstat pyramis ingens mechanica.")
14:35:10companion_cubesexy tip
14:37:05inv2004seconds part of my GC interop manual: "when you debug rc in =destroy - it works perfect, if you remove it - it starts to leak"
14:38:06disrupteklick first for a tighter seal.
14:38:15disruptekit's like i'm talking to a wall in here.
14:38:56shashlickthe seal's too tight so you cannot hear the ack
14:39:48inv2004but you can see it
14:40:11companion_cubehe also licked his eyelids
14:40:39FromDiscord_<Rika> the seal was so pleasurable their eyes rolled back
14:40:43shashlickunlike ears, you gotta look
14:41:24disruptekearballs be rollin' win i git on the mic
14:44:27disruptekshashlick: is there a 1.2 branch in choosenim?
14:44:49shashlickbranch?
14:45:01disruptekfor the purposes of ci
14:45:14shashlickprobably ot
14:45:18*lmariscal quit (Quit: I'm Out!)
14:45:24disruptekdoesn't matter.
14:45:44disruptektoday we're gonna try something new.
14:46:13disruptekcompiler code with minimal surface.
14:46:22disrupteka whole new world of challenge.
14:46:27*lmariscal joined #nim
14:47:07*lmariscal quit (Client Quit)
14:47:27*lmariscal joined #nim
14:49:29*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
14:50:41*kitech1 joined #nim
14:52:49*Vladar quit (Quit: Leaving)
14:55:09disruptek~stream
14:55:10disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek
14:56:59lmariscalhttps://reg.nim.moe/packages.json is a packages.json for nimble that acts as a mirror for all of nim packages
14:57:03lmariscalit is running on a low budget vps so it's mostly an idea that I have (would like to expand it in the future)
14:57:07lmariscalit also converts mercurial repos to git repos like linagl https://cgit.nim.moe/linagl
14:57:11lmariscalit updates the packages every 30 mins and the packages.json every 10 mins
14:57:17lmariscalyou can find the cron jobs in https://github.com/nim-moe/cron if you want to create your own
14:58:27dom96lmariscal, awesome!
14:58:28disruptekor, just run nimph.
15:01:16*martinium_laptop joined #nim
15:01:24martinium_laptopboom
15:01:30martinium_laptopMorning everyone
15:01:47FromDiscord_<Rika> gm o you
15:01:49FromDiscord_<Rika> to*
15:01:57martinium_laptopGood afternoon for those across the pond
15:02:01martinium_laptop:D
15:03:12FromDiscord_<Rika> no good evening for us?
15:03:25FromDiscord_<Rika> (tbf, its night here)
15:03:57martinium_laptopGood evening Rika
15:04:00martinium_laptop:)
15:04:06Prestigegood morning/evening :P
15:09:01*waleee-cl joined #nim
15:10:33FromDiscord_<UNIcodeX> Could just employ the generic "good day"
15:12:01FromDiscord_<Rika> what if i lived in a planet with no concept of days, hm?
15:18:55*xcm quit (Remote host closed the connection)
15:20:38Araqdisruptek: nimph doesn't mirror packages, does it?
15:20:47disruptekmirror?
15:21:11*xcm joined #nim
15:21:20Araqit's the proper term, I don't understand the question, I'm sure you know it
15:21:44disrupteknimph doesn't have a package file, though it knows to grok nimble's.
15:22:31FromDiscord_<UNIcodeX> > what if i lived in a planet with no concept of days, hm?
15:22:31FromDiscord_<UNIcodeX> @Rika Error: OutOfBounds
15:24:50FromGitter<zetashift> But https://reg.nim.moe/packages.json also has a 'copy'/mirror of the nimble packages, I didn't read that nimph does that too?
15:27:06Demos[m]someone needs to clone raku (perl6's) MAIN sub
15:28:04FromDiscord_<Rika> MAIN sub?
15:28:59FromGitter<zetashift> you mean this: https://docs.raku.org/routine/MAIN ? isn't this just a fancy isMainModule with docopt or something??
15:29:47*kitech1 quit (Quit: ZNC 1.7.5 - https://znc.in)
15:29:50leorize!repo cligen
15:29:51disbothttps://github.com/c-blake/cligen -- 9cligen: 11Nim library to infer/generate command-line-interfaces 15 171⭐ 12🍴 7& 1 more...
15:30:12leorizeit's literally this but look nicer by default
15:30:38*kitech1 joined #nim
15:33:04FromDiscord_<Venator> what does the method {.base.} pragma do? - apart from stop the compiler complaining that baseless methods are deprecated? The manual uses it but does not explain from what I can see
15:33:46FromGitter<bung87> @Araq I'v done the work , yesterday we disscussed.
15:34:00leorizeVenator: telling the compiler what to dispatch to dynamically when the type it's not overridden for the current type afaict
15:35:13disruptekAraq: nimph just searches github for packages.
15:35:34disrupteki will use this other one if people like it.
15:37:04Araqbung87: link to your PR?
15:37:26Araqdisruptek: there is an inherent danger of people deleting their repos from github
15:37:28FromGitter<bung87> https://github.com/bung87/htmlparser I upload it here.
15:37:39disruptekthat's a risk i'm willing to take.
15:37:51FromGitter<kaushalmodi> @bung87 I cannot see the exact commit fixing that issue
15:37:56Araqbung87: thanks but that's what 'fusion' is about to fix
15:38:11Araqyour package lacks CI and didn't get a review process
15:39:05FromGitter<bung87> so leave it just there is fine ?
15:39:53FromGitter<bung87> also need fix the `runnableExamples`
15:39:56Araqno... I mean, it's nice that you did it but it's not what I had in mind
15:40:39Araqping me about in the next two days please, I'm busy with something else
15:40:44Araqfor now it's good
15:41:48FromGitter<bung87> create pr that I'll rename the xmltree lib name as it specific to html now
15:42:35FromGitter<bung87> ok , just leave it for now utill you be free
15:42:45*kenran quit (Ping timeout: 256 seconds)
15:44:02FromGitter<bung87> @kaushalmodi It'll fix all the opened issues that contains `htmlparser`
15:44:18*hax-scramper quit (Ping timeout: 265 seconds)
15:47:49*Vladar joined #nim
15:50:13Araqnarimiran: close https://github.com/nim-lang/Nim/issues/14026 please
15:50:13disbotβž₯ CI broken for release branches (version-1-0, version-1-2)
15:50:45narimiranyep
15:52:05martinium_laptopdoes the order functions are declared in a nim program matter?
15:52:17FromDiscord_<mratsim> yes
15:52:23FromDiscord_<mratsim> you need to forward declare
15:52:41martinium_laptopmeaning to declare above before calling?
15:52:52FromGitter<bung87> unless you using reorder pragma
15:54:22*nsf quit (Quit: WeeChat 2.8)
15:54:23FromGitter<bung87> https://nim-lang.org/docs/manual.html#scope-rules-code-reordering
15:55:06leorizeit's beter to forward declare
15:55:13leorizeit works better for macros atm
15:56:44*fredrik92 joined #nim
15:57:45*couven92 quit (Disconnected by services)
15:57:53*fredrik92 is now known as couven92
15:58:09planetis[m]guys what do you think: https://gist.github.com/b3liever/d1571d25917e670e9882e48618d6a834
15:58:38planetis[m]its a template that unwraps an (bool, T) tuple
15:58:57*NimBot joined #nim
15:59:01zacharycarterusing Nim in our hackathon project at work today for an AWS lambda function
15:59:49leorizeplanetis[m]: you can use `bind` to bind `isNil` so you don't have to do the system.`!=` dance
16:00:30leorizezacharycarter: are you winning?
16:00:32planetis[m]though I read here that isNil is going to be booted
16:00:50leorizeyou can also bind `==` and `!=` if that's more of your thing :P
16:03:00planetis[m]no idea what bind does, will read about it
16:03:09FromGitter<alehander92> huh crafty
16:03:18Prestigezacharycarter: Nice! I should do that at our next hackathon
16:03:37FromGitter<alehander92> still i'd prefer to use a single Result/Option type if i can
16:04:07FromGitter<alehander92> and let it be represented by the value itself for pointers
16:04:41FromGitter<alehander92> and for range ints (where one can use start - 1 or end + 1 for invalid)
16:05:32FromGitter<alehander92> we almost never need the full int range anyway
16:05:45leorizeyea that's how Option[T] is declared
16:05:53FromGitter<alehander92> but i doubt it works for int
16:05:59FromGitter<alehander92> ranges like that
16:06:02planetis[m]btw i got the ?= operator idea from a test in Nim
16:06:03FromGitter<alehander92> / uint etc
16:06:13leorizeit works for Natural and Positive :P
16:06:39FromGitter<alehander92> hmm and Option still is a struct with val
16:06:42FromGitter<alehander92> even for pointers
16:06:55PrestigeLOL
16:07:01PrestigeWrong chat
16:07:08FromGitter<alehander92> what i thought people want is Option*[T: SomePointer] = T
16:07:17FromGitter<alehander92> distinct T * maybe
16:08:07leorizealexander92: https://github.com/nim-lang/Nim/blob/devel/lib/pure/options.nim#L71
16:08:16FromGitter<alehander92> no no no
16:09:27leorizea struct with only a val have zero overhead
16:09:44leorizecompared to the val alone
16:10:14FromGitter<alehander92> forgive me
16:10:18FromGitter<alehander92> yeah i understand you now!
16:10:19FromGitter<alehander92> thanks
16:10:26FromGitter<alehander92> but still i wonder about the `some` case
16:11:05FromGitter<alehander92> because it is `create a separate struct and copy the val there` vs `just use the val`
16:11:27FromGitter<dumjyl> it throws or something if given nil
16:12:01FromGitter<alehander92> that's fine
16:12:05leorizecreate a struct and copy the val there have zero overhead compared to just use the val for pointers :P
16:12:47leorizea struct with one element is the element itself, literally
16:13:00leorizesizeof() both of them and you'll find that they are equal
16:13:05FromGitter<alehander92> i know
16:13:08leorizeinspect machine code and yea, same story :p
16:13:24FromGitter<alehander92> i mean i realized it after your previous messages sorry :P
16:13:28FromGitter<alehander92> but i wonder if
16:13:33FromGitter<alehander92> it somehow introduces +1 copy
16:13:44FromGitter<alehander92> but probably not because its a return value
16:13:54FromGitter<alehander92> in both `some` and `get`
16:14:01leorizewith sink inference it will captures the input completely if allowed
16:15:40FromGitter<alehander92> and `if b1 ?= b`actually seems like something i'd use
16:22:28*hax-scramper joined #nim
16:29:27FromGitter<alehander92> thanks!
16:30:19*rockcavera quit (Ping timeout: 258 seconds)
16:40:22leorizenow I finally understand while libc have a buffer inside FILE*
16:40:43leorizethey have to implement getline() :P
16:44:34*ftsf quit (Ping timeout: 240 seconds)
16:46:31*rockcavera joined #nim
16:46:31*rockcavera quit (Changing host)
16:46:31*rockcavera joined #nim
17:05:34*xcm quit (Ping timeout: 240 seconds)
17:07:33*xcm joined #nim
17:23:57zacharycarterleorize: don't know yet
17:24:19zacharycarterPrestige: yeah the nim lambda github projects make it super easy to use serverless framework and get something up quick
17:26:22PrestigeIt would be awesome if my company would up and switch from C to nim, lol
17:30:09PrestigeWe mostly use JS for lambdas, and I just went through a whole ordeal convincing the CTO to let us use typescript, so nim is probably not going to happen soon :/
17:31:19*solitudesf quit (Remote host closed the connection)
17:31:46*solitudesf joined #nim
17:32:43*inv2004 quit (Ping timeout: 260 seconds)
17:32:45*martinium joined #nim
17:36:26*thegod joined #nim
17:36:40thegodinim is breaking CI for PRs
17:37:41FromDiscord_<Varriount> leorize: Disruptek mentioned that you might be using IO completion ports?
17:39:54thegodinim seems to have a new dependency "ansiparse" which nim CI doesnt have installed
17:42:34PMunchAdded four hours ago
17:43:06leorize[m]@Varriount: yes?
17:43:07narimirani'll fix it, thanks for the report
17:43:26PMunchOh, and I haven't added ansiparse to nimble..
17:44:14narimiranhmmm, nothing to fix there :/
17:44:48narimiraninim already had some dependencies, and any new one should be automatically picked up
17:45:03narimiranthegod: which PRs are broken?
17:49:51zacharycarterPrestige: I wouldn't mind coding in C
17:49:56zacharycarterfor a job
17:50:28thegodseems to be just #14084
17:50:30disbothttps://github.com/nim-lang/Nim/pull/14084 -- 3changed type() to typeof() in docs and error messages
17:51:01PMunchAdded the ansiparse and ansitohtml packages to nimble (or rather created a PR for it) https://github.com/nim-lang/packages/pull/1444
17:51:03disbotβž₯ Add ansiparse and ansitohtml packages
17:54:46*rockcavera quit (Remote host closed the connection)
17:56:20*sknebel quit (Ping timeout: 256 seconds)
17:57:04narimiranthegod: i'll restart tests for that one
17:57:19Prestigezacharycarter: our code base is huge messy and old
17:57:28Prestigethe people who wrote it are mostly gone, too
17:58:44*thegod quit (Remote host closed the connection)
18:01:49*sknebel joined #nim
18:02:15PMunchPrestige, that reminds me of a time at my first workplace. Went up to a guy and asked him about some code. He said he'd never seen it before. I told him that according to the git history and the author section in the files it was he who had written the whole thing. He took another look and went, oooh yeaah, now I remember this. Been a while since I've seen this old thing, no idea how it works
18:03:08FromDiscord_<arnetheduck> @alehander42 fwiw, we just added `Opt[T] = Result[T, void]` which works out nicely - https://github.com/status-im/nim-stew/blob/master/stew/results.nim - in fact , using `Result` in Nim is pretty nice overall, the code is clean and readable, yet stresses the right things on the calling side - ie which expressions fail etc
18:03:46FromDiscord_<arnetheduck> with `Opt[T]` being the same as `Option[T]` but with a slightly richer API
18:04:16*Trustable joined #nim
18:06:01PrestigePMunch: Lol yeah, pretty much how it goes
18:06:23Prestigeeven better when variable names are 1 to 3 letters long
18:06:41PMunchOf course, can't wear out that keyboard!
18:06:53PMunchEspecially the vowels, those are extra precious
18:07:21PMunchBut TBH I prefer that to the C# way of doing things
18:08:04PrestigeWhat's the C# way, super long names?
18:08:58PMunchYes, basically typing the procedure out in the name
18:10:00PMunchString StringReturnedFromCallingProcedureThatReturnsStringBasedOnWhatEnvironmentVariableHelloIs = ProcedureThatReturnsStringBasedOnWhatEnvironmentVariableHelloIs();
18:10:05FromGitter<alehander92> arnetheduck
18:10:23FromGitter<alehander92> thanks! i had some ideas how would i like to use ` result`-like dsl in nim
18:10:38PMunchInstead of just `var hello = getEnv("HELLO")`
18:11:12PMunchAnd of course brackets need their own line..
18:11:45FromGitter<alehander92> arnetheduck a thing i liked looking at zig is some kind of enum-ability / automatically making sets of call errors when you propagate them
18:12:01PrestigeYeah, the C code I work with does that too PMunch
18:12:07Prestigethe brackets, I mean
18:12:09*PMunch shudders
18:12:16FromGitter<alehander92> i tried to think of a good syntax for that with `Result[]` and i think its doable
18:13:03Prestigebtw thanks for that link about window managers, been really helpful
18:13:03FromGitter<alehander92> but it might be not such a big deal for most codebases where one mostly follows a strict set of errors anyway
18:15:36*abm quit (Ping timeout: 256 seconds)
18:20:38*silvernode joined #nim
18:25:00*inv2004 joined #nim
18:25:48*lritter quit (Ping timeout: 256 seconds)
18:28:51*Romanson quit (Quit: Connection closed for inactivity)
18:30:02narimiranofftopic question: how do i escape `'` in vim config?
18:30:23*NimBot joined #nim
18:30:24narimiran(and no, `\'` doesn't do the trick)
18:41:42*kenran joined #nim
18:54:52*qwertfisch joined #nim
18:57:54*nullwarp quit (Remote host closed the connection)
19:00:10FromDiscord_<arnetheduck> alehander42 - well, I don't know really if that's a feature or not - ie enum-as-error is moderately great - you only need it if you're going to differentiate errors in the callee, otherwise a `cstring` is fine (which you _never_ compare with, just print as a debug statement basically)
19:01:11FromDiscord_<arnetheduck> I feel that it repeats some of the issues with exceptions, namely that it creates a leaky abstraction where errors from lower levels propagate up the call hierarchy instead of being deliberatly considered at each layer
19:01:48FromDiscord_<arnetheduck> if abstraction is the goal, leaking errors from the depths of your application makes for a proper spaghetti sauce
19:02:25FromDiscord_<arnetheduck> but I don't have experience really with zig - maybe it's fine
19:04:01FromDiscord_<arnetheduck> what does happen with enum however is that you end up making "catch-all" or coarse enums that are difficult to debug: because there are multiple places in your code that return the same enum (because it's such a pita to make a new one, or keep the enum list "clean" and free from cruft), it's harder to find where the error originated from.. with `cstring`, programmers tend to type out a unique string for every error so you can grep for
19:05:15disruptekstrings are useless for typechecking.
19:05:28AraqI'm a fan of a single error enum that is used for everything fwiw
19:05:37disruptekenums are create for cases.
19:05:40disruptekgreat, too.
19:05:41Araqit works for Posix
19:05:53disruptekcopying bad design...
19:06:27companion_cubezig does that too, but it generates the whole enum automatically
19:06:37companion_cubeyou don't have to declare all variants in one place
19:06:44Yardanicoabout zig " However, each error name across the entire compilation gets assigned an unsigned integer greater than 0. You are allowed to declare the same error name more than once, and if you do, it gets assigned the same integer value."
19:07:00Yardanicohttps://ziglang.org/documentation/master/#toc-Errors
19:07:13FromDiscord_<arnetheduck> I'm merely relaying experience from working with Result - tendentially, the code gets organized into units which logically either fail or work - there's rarely any middle ground that calls for an enum that you later need to case over
19:07:17companion_cubeOCaml has "polymorphic variants" which are structural sum types and have similar properties
19:07:18FromGitter<bung87> Can declare multiple const with `when`?
19:07:30Yardanico@bung87 well yes, depends on what you actually mean by that
19:07:41disruptekarnetheduck: see gittyup
19:07:44disruptek!repo gittyup
19:07:45disbothttps://github.com/disruptek/gittyup -- 9gittyup: 11higher-level git bindings that build upon nimgit2 15 1⭐ 0🍴
19:07:54disruptekplenty of effective use of Result there.
19:07:59disruptekand casing.
19:08:05disruptekas enums.
19:08:10FromGitter<bung87> how to do that, I using when two times now
19:08:12FromDiscord_<arnetheduck> so programatically, enum's only make sense if later you have `case result.error of A, B, C`
19:08:37disrupteki cannot help it if you are too lazy to write explicit code.
19:08:49Yardanico@bung87 show the code please
19:09:08FromGitter<bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ea1e7d43ea9b172a4866ed7]
19:09:59FromGitter<bung87> here is what I intend to do, all case are same, so I wonder if I can assign just onece
19:10:37*xcm quit (Remote host closed the connection)
19:10:41*kenran quit (Ping timeout: 265 seconds)
19:10:51FromDiscord_<arnetheduck> disruptek - it's not so much laziness as the general strucuture of code that simply doesn't end up needing to deal with multiple failure cases in different ways - instead that function might be split up into two functions that each fail separately, and then you don't need the enum
19:10:56*abm joined #nim
19:11:07FromDiscord_<arnetheduck> the operations become more "atomic" and binary
19:11:09FromGitter<zetashift> can't you just do `const entryType = url` then?
19:11:11disruptekthen don't use Results?
19:11:32FromDiscord_<arnetheduck> well, it's not always like this - just tendentially πŸ™‚
19:11:37FromDiscord_<arnetheduck> 50% maybe
19:11:55FromDiscord_<arnetheduck> and then it's nice to have a descriptive string around which tells you what went wrong
19:12:03disruptekexceptions.
19:12:08Araqthe enum exists to make it future proof, currently it can fail with A, B, then you call baz() which can fail with C and the clients already had to swallow all possible failures :P
19:12:12FromDiscord_<arnetheduck> then there's maybe 20% that benefit from an enum
19:12:13FromGitter<bung87> entryType is enum type
19:12:27disruptekenums in case statements test for exhaustion. this is the point.
19:12:43*xcm joined #nim
19:12:57disrupteksomeone tell me what i'm doing wrong with import foo / [bar, bif] syntax.
19:13:40FromDiscord_<arnetheduck> and 20% that benefit from a complex type and finally 10% that benefit from exceptions (ie the truly exceptional cases)
19:14:03FromGitter<bung87> ok , I got it, assign entryType first then assign url
19:14:22Yardanico@bung87 when blocks don't open a new scope
19:14:40Yardanicoso you can declare consts inside of "when" statements
19:15:19FromDiscord_<arnetheduck> well, what if you don't have any cases to test for? I mean - an RSA key negotiation might be composed of 5 steps, but at the end of the day, if you don't get a secret key, you don't really care if it was the a or b key that didn't match expectations so there are really no cases to check for
19:15:59disrupteksounds like nice code.
19:18:06FromGitter<bung87> @Yardanico thank you ! so I can write `const url =` in each case
19:18:19Yardanicoyes
19:19:10FromDiscord_<arnetheduck> https://github.com/status-im/nim-eth/blob/master/eth/p2p/ecies.nim#L185 - lol this was ported from an enum status code, so it happens to use an enum return - but _nothing_ would change if it switched to cstring because there is no case where the underlying result error is checked specifically - so you can see that `mapErrTo` simply puts a single enum value in place for any error that might have happened when parsing the public key
19:22:40FromDiscord_<arnetheduck> basically, enum or some more involved type is good if you need to transport more data to the caller than "it worked" or "it didn't work" - a typical example is `send` from sockets which returns `eagain` if the write buffer is exhausted and you should call again - literally all other error codes from `send` mean "it didn't work, and won't work, stop trying" and you don't differentiate between them other than to show an error to the user
19:23:14Araqenums also have i18n benefits, it's rather easy to translate the frozen set of errors into different languages
19:24:13disrupteki can't seem to squirrel away ic code in the compiler because i cannot figure out how imports work with relative paths.
19:24:16FromDiscord_<arnetheduck> true - that is an advantage - though gettext works with strings and not enums - in part because the string might take parameters, and some languages need conjugations etc
19:24:27disruptek🀦
19:25:09Araqand I claim that if you enforce a single error enum throughout the programming language you get interop benefits
19:25:13FromDiscord_<arnetheduck> well `import a/[b, c]` works but `./[b, c]` doesn't - perfectly logical πŸ˜‰
19:25:45Araq`.` is not an identifier and the general expression parsing logic is used. logical indeed
19:26:10FromDiscord_<arnetheduck> well `import a/[b, c]` works but `import ./[b, c]` doesn't - perfectly logical πŸ˜‰
19:26:20disruptekidgaf, i want compiler/ic/spec to import compiler/ast
19:26:28Araqit simply works more consistently than users might anticipate. *shrug*
19:26:31FromDiscord_<arnetheduck> well I don't care about that distinction - I'm mostly upset that I can't group my imports consistent
19:26:33FromDiscord_<arnetheduck> well I don't care about that distinction - I'm mostly upset that I can't group my imports consistently
19:27:32Araqdisruptek: need my help on mumble?
19:27:45disruptekif it's not too annoying, please.
19:27:59Araqok, one sec
19:28:45FromDiscord_<arnetheduck> but I'm more upset about not being able to return a proc from a proc easily - ie `proc x(): SomeCallback = proc () = echo hello` doesn't parse - you have to `proc x(): SomeCallback = (proc () = echo hello)`
19:30:50FromDiscord_<arnetheduck> > single error enum throughout the programming language
19:30:50FromDiscord_<arnetheduck> you also need a global assignment oracle and someone to tell you which enums are no longer in use
19:31:14disruptek{.used.} {.deprecated.}
19:32:49*abm quit (Ping timeout: 256 seconds)
19:37:17*vesper joined #nim
19:37:56*rockcavera joined #nim
19:38:16*vesper11 quit (Ping timeout: 256 seconds)
19:40:05shashlick@PMunch - https://github.com/nimterop/nimterop/blob/master/tests/rsa.nim
19:40:36PMunchOooh, is the RSA wrapping done?
19:40:49shashlickyep, in master, part of the official nimterop test on linux
19:40:49*Vladar quit (Quit: Leaving)
19:41:35shashlickyou'd need to expand it to download headers on windows if you need that
19:41:57shashlicki'm thinking of building and wrapping libressl
19:42:14*silvernode quit (Ping timeout: 256 seconds)
19:42:24shashlickso you can statically link with nimble install nimressl
19:42:26shashlickif there's interest
19:45:42FromDiscord_<arnetheduck> @disruptek badresults is your way of doing versioning? πŸ™‚
19:46:00disruptekit's my way of using your code the way i want to.
19:46:11FromDiscord_<arnetheduck> what did you change?
19:46:31disrupteki explained my issues in your repo's issues.
19:46:52disrupteki don't want to fucking impl `func $` for every type i wrap in Result.
19:46:57shashlickdisruptek - by the way, i made a cmake package in nimble so you can requires "cmake" instead of telling people to use scoop
19:47:01disruptekside-effects. they are a part of life.
19:47:01shashlickworks on windows
19:48:03disruptekcool, thanks.
19:48:09disrupteki'll update nimph readme.
19:48:16shashlickbut ya, we should move to binary releases
19:48:36shashlicknimph isn't a library so we should make it easy to distribute
19:51:13*martinium quit (Changing host)
19:51:13*martinium joined #nim
19:51:18FromDiscord_<arnetheduck> @disruptek but.. I remember asking for a case where you actually had side-effects in `$` - ie you can call a proc from a `func` as long as it doesn't actually do side-effects
19:51:40disruptekwell, you know where to find my reply.
19:51:45FromDiscord_<arnetheduck> and having side-effects in `$` - well, I was just struggling to come up with a case where that was a good idea
19:54:42FromDiscord_<arnetheduck> well, I looked and posed a questoin in response - ie do you have a side effect in there or is it deduced wrong?
19:54:50FromDiscord_<arnetheduck> then you closed the issue
19:55:06disrupteki deduced the approach was wrong.
19:55:37FromDiscord_<Varriount> arnetheduck: There's also the plain reeason that disruptek felt that implementing `$` for every type used was too tedious, and so forked it for his own use.
19:56:01disrupteki'm a lazy anti-social prick.
19:56:03FromDiscord_<Varriount> There's nothing inherently wrong with that.
19:56:05FromDiscord_<arnetheduck> Varriount, you don't have to implement `$` for every type - only if you call `$` on Result
19:56:13disruptekbzzzt.
19:56:49FromDiscord_<Varriount> arnetheduck: Again, perhaps he felt it was too tedious.
19:57:50FromDiscord_<arnetheduck> well, I'm trying to find out what was too tedious - then I could judge whether the change makes sense to upstream, or if there exists another solution that will please us both
19:58:02FromDiscord_<Varriount> It's not an objective thing - what you might find acceptable in a set of requirements, someone else might find too much.
19:58:27disruptekthere's no interest in extra work that doesn't even establish that no effects exist.
19:58:31FromDiscord_<arnetheduck> again: I'm not objecting - I'm curious
19:58:52disruptekyou are welcome to play with gittyup.
20:01:03FromDiscord_<arnetheduck> I'm not _that_ curious πŸ˜‰ if you find it less work to fork, that's totally fine - we each have our use-cases - I got curious also because we've made some significant updates to work around a bunch of compiler bugs that you might be interested in
20:01:08PMunchHmm, are float no longer always 64 bits?
20:01:34PMunchIt says "Default floating point type" in the manual, but doesn't specify what that actually means..
20:01:52FromDiscord_<Rika> Whichever is native to the target you compile to I guess
20:02:12solitudesfhttps://nim-lang.github.io/Nim/manual.html#types-preminusdefined-floating-point-types
20:02:20PMunchAccording to the tutorial it's always 64 bit https://nim-lang.org/docs/tut1.html#basic-types-floats
20:02:27PMunch"In the current implementation"
20:02:43FromDiscord_<arnetheduck> or rather, I don't have bandwidth to be _that_ curious - we use Result as a tool to meet certain needs, so I'm curious as far as those needs go - your use case, I'm curious because maybe we'll come across it also, and then it's good to be prepared
20:03:28PMunchIs there a particular reason why int is the same size as a pointer? For speed? For compatibility with something? For fun?
20:04:10FromDiscord_<arnetheduck> we use `func` because it gives us guarantees about a whole class of bugs that we want to avoid in our codebase - so relaxing `Result` to not use `func` is a functionality loss from our point of view - hence we'd want something in return
20:05:10*Jesin quit (Quit: Leaving)
20:06:15*narimiran quit (Ping timeout: 256 seconds)
20:06:31martiniumhow can one debug a running nim program?
20:06:48martiniumone of my functions doesn't seem to execute and I have no idea why
20:07:25martiniumcurrently using vscode to write it
20:09:58FromDiscord_<arnetheduck> oh and those of you that needs SSL: https://github.com/status-im/nim-bearssl - no pesky openssl license and no need to muck around with dll:s - it builds the C code automagically when you import it
20:09:58Prestigemartinium: you could start the program with gdb, or if it's already running you can attach the pid w/gdb
20:10:30PMunchWhy is cint defined like this? cint* {.importc: "int", nodecl.} = int32
20:10:54PMunchint in C can be anything from a int16 and bigger.
20:11:26*Jesin joined #nim
20:12:00PMunchshashlick, that would be great! But what do you mean by "you'd need to expand it to download headers on windows"?
20:12:40disruptek/home/adavidoff/nims/1.3/lib/pure/ropes.nim(59, 3) Error: 'N' should be: 'n'
20:13:43dom96lol at that error
20:17:10shashlickPMunch - point it to the headers since mingw doesn't have openssl installed by default
20:17:21PMunchOh right
20:17:27martiniumscoop install openssl helps on windows
20:17:45martiniumif you went the scoop route
20:17:53FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/FE1v/image.png)
20:18:12FromGitter<Bennyelg> Is that a jester bug?
20:18:19FromGitter<Bennyelg> Im reading request.params
20:18:28FromGitter<Bennyelg> but after the 3rd element its start to mee up
20:18:31FromGitter<Bennyelg> mess up
20:18:35FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/iVG4/image.png)
20:18:46dom96what's your request path?
20:19:51FromGitter<Bennyelg> managed. I was missed the & :| thanks
20:21:01shashlickarnetheduck: can you use bearssl as a replacement for openssl in an existing project?
20:21:11shashlicklooking for static link for choosenim
20:23:00*inv2004 quit (Ping timeout: 258 seconds)
20:23:12dom96shashlick, really, if the machine's curl is broken then I don't think there is much we can do
20:23:21dom96we shouldn't add yet another dependency that's unproven just to fix this
20:25:01FromDiscord_<arnetheduck> shashlick: well, they don't implement the same API so you need to adapt your code
20:25:47Yardanicolibressl OTOH is compatible with openssl afaik
20:25:57Yardanicoi tried using it to statically link linux apps
20:26:05Yardanicothere's also https://github.com/kaushalmodi/hello_musl
20:27:50FromDiscord_<arnetheduck> what's nice about bearssl is how easy it is to build and embed - works on windows too
20:29:14dom96bearssl isn't ready for production yet though, is it?
20:29:39dom96last time I checked the author wasn't comfortable recommending it to be used in prod
20:30:20Yardanico"There is no such thing as bug-free code, and I won’t claim that there is none in BearSSL; only that I looked real hard. Use in production applications is, in any case, at your own risk."
20:30:59dom96"Current version is 0.6. It is now considered beta-quality software:"
20:31:08dom96beta implies to me that it's not ready for real-world usage
20:31:18FromDiscord_<Rika> I think that's what he said too
20:31:25dom96this is especially true when talking about crypto
20:31:49shashlickdom96: my concern with choosenim is that we want an older OSX build but don't want to then force users to install some specific openssl version in order to use it
20:32:06shashlicki'd rather pick the latest libressl and link it in so that end user doesn't care
20:32:33shashlicklikewise for windows where we need dlls today
20:32:42dom96shashlick, like I replied in the issue, I'm confused why it worked fine for me with curl.
20:32:55shashlickhonestly no idea cause i'm not much of an osx user
20:33:08shashlickbut my PR's travis jobs show you the failures
20:33:26dom96shashlick, can you add a check for `curl -v` on the travis job?
20:33:35dom96Maybe homebrew ended up replacing my system curl :(
20:33:58shashlicksure i can try
20:34:30shashlickthe thing that confuses me is brew installing stuff without adding to system path since it can conflict with OSX's version
20:34:51shashlickso you can hack your build to pick it up but end user might not do that and you end up with runtime failures
20:35:13dom96of course. I was under the impression that it was a system curl that I had in my PATH
20:35:24dom96If it isn't then yes, we need a different solution
20:35:47shashlickis curl == libcurl or are they different packages
20:35:53Yardanicowhat about libressl
20:35:56dom96no idea
20:35:59Yardanicoit's osed by OpenBSD
20:36:02Yardanicoused*
20:36:15shashlickyep that's what i'm proposing - static link to libressl
20:36:22shashlicksimilar to nimarchive
20:36:24*someunknownuser joined #nim
20:39:06dom96if you want to implement libressl support for the stdlib then that would be really nice
20:39:20shashlickdom96: i forget - why curl on osx? why not httpclient
20:39:32dom96shashlick, because openssl failed on OSX for me
20:39:42dom96with cert errors
20:39:46dom96curl worked fine
20:40:11shashlickso on osx, choosenim isn't linking to libcurl? it just calls the curl CLI?
20:40:20dom96yeah
20:40:32dom96or wait
20:40:50dom96no, it's libcurl
20:41:22Yardanico@dom96 libressl already works with stdlib
20:41:32Yardanicoit's compatible with openssl
20:41:41dom96Yardanico, yeah yeah, I mean static linking support
20:41:50Yardanicoit works too :P
20:42:29Yardanicohttps://github.com/kaushalmodi/hello_musl
20:42:50dom96shashlick, guess we really should check libcurl version then
20:42:51*inv2004 joined #nim
20:43:15shashlickso sounds like if we brew install curl, it might just work then
20:43:24shashlickeven on the old version
20:43:42dom96Yes... but you can do the same with openssl
20:43:49dom96We need to establish if it works out of the box with curl
20:43:56dom96I just checked `brew info curl` and I don't have it installed
20:44:29dom96so either I somehow managed to get libcurl that is newer without homebrew or it should work
20:45:51dom96shashlick, if you try `curl --version` on travis and maybe attempt to download a release from github as well we can gain some insights.
20:46:50*leorize quit (Remote host closed the connection)
20:48:23*leorize joined #nim
20:49:28FromDiscord_<arnetheduck> @araq https://github.com/nim-lang/Nim/pull/13908 - y/n? would be nice because we're having some trouble with this - ie somewhat unusually, we're actually trying to catch exceptions and not let things crash but people get confused
20:49:30disbotβž₯ Error -> Defect for defects
20:58:55*abm joined #nim
21:01:58*PMunch quit (Quit: leaving)
21:14:25*Intensity joined #nim
21:21:25*tane_ quit (Quit: Leaving)
21:21:38leorizeso a thing people usually do with pipes is to read lines from them
21:22:14leorizenow to implement this functionality, I'd need to be able to store an internal buffer
21:22:40leorizequestion is: should this turn into it's own type (ie. BufferedPipe) or should this just be a property of the same pipe type?
21:31:36*abm quit (Ping timeout: 256 seconds)
21:31:53*moerm joined #nim
21:32:01moermHello everyone
21:32:10disruptekleorize: its own type.
21:40:15*krux02 quit (Remote host closed the connection)
21:46:34moermHmm ... bye
21:46:40*moerm quit (Quit: Leaving)
21:50:31companion_cubedisruptek: you said the wrong thing
21:55:03*solitudesf quit (Ping timeout: 256 seconds)
21:55:55*someunknownuser quit (Quit: someunknownuser)
21:56:54*rockcavera quit (Read error: Connection reset by peer)
21:57:13*rockcavera joined #nim
21:57:13*rockcavera quit (Changing host)
21:57:13*rockcavera joined #nim
21:58:58*tiorock joined #nim
21:58:58*tiorock quit (Changing host)
21:58:58*tiorock joined #nim
21:58:58*rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
21:58:58*tiorock is now known as rockcavera
22:00:33*natrys quit (Quit: natrys)
22:10:16FromDiscord_<Elegant Beef> Disruptek never says anything wrong
22:14:00disruptekwrong wrong wrong
22:16:20FromDiscord_<Elegant Beef> see never said "anything wrong"
22:18:04disrupteki'm good but i'm not that good.
22:18:57disruptekits times like these i wish i got into ice road truckin'.
22:19:25FromDiscord_<Elegant Beef> That's just driving around banff isnt it?
22:19:34disruptekyou could do worse.
22:19:55FromDiscord_<Elegant Beef> Yea like driving across the permafrost up north
22:23:02disrupteknot for me.
22:23:08disruptekwinter is a difficult time.
22:23:19disruptekballs clinkin' together like cubes in a glass.
22:23:21disruptekno thanks.
22:25:17FromDiscord_<Elegant Beef> Lol, i live in an area that the average temperature in january is like -30C
22:26:09*martinium_laptop quit (Remote host closed the connection)
22:26:22*inv2004 quit (Read error: Connection reset by peer)
22:27:10disrupteki wouldn't call that `living`.
22:33:42dom96Wow, HashSet sure is slow in the JS target
22:34:32FromDiscord_<Gary M> so I'm trying to do a cpFile call from a nimble task, but I'm getting Access is denied
22:43:57FromDiscord_<Gary M> nvm looks like I just had bad syntax
23:04:25*couven92 quit (Ping timeout: 264 seconds)
23:05:53*couven92 joined #nim
23:08:59FromDiscord_<Technicae Circuit> Hello
23:10:12Yardanicohi
23:10:17FromDiscord_<Technicae Circuit> Sup?
23:10:35FromDiscord_<Technicae Circuit> Could i ask about Nim use cases?
23:11:27Yardanicowell you can, but what do you want to know exactly?
23:11:38FromDiscord_<Technicae Circuit> What cases is it useful in?
23:11:49FromDiscord_<Technicae Circuit> And is it meant as an alternative to something?
23:12:08Yardanicowell Nim is general-purpose and no, it doesn't position itself as a direct replacement for some other language
23:12:25Yardanicoyou can literally do anything in Nim since it compiles to C (and C++/ObjC/JS)
23:12:33FromDiscord_<Technicae Circuit> Okay, that's cool
23:12:36Yardanicobut how easy that would be depends on the task ;)
23:12:54FromDiscord_<Technicae Circuit> I think i have a way to use Python if you use C or C++ btw
23:13:02Yardanico?
23:13:04FromDiscord_<Technicae Circuit> I think i have a way to use Python modules in Nim if you use C or C++ btw
23:13:18FromDiscord_<Technicae Circuit> You know the language Python? The interpreted lang?
23:13:23Yardanicowdym? well there's a module to use python modules in nim and nim modules in python
23:13:26Yardanicoi know python
23:13:31FromDiscord_<Technicae Circuit> Oh
23:13:33FromDiscord_<Technicae Circuit> Well
23:13:49FromDiscord_<Technicae Circuit> I have another theoretical way to use Python modules in Nim
23:13:59Yardanicoalso don't edit your messages in discord, they'll just be sent as new ones in IRC instead you can corrent like *corretion)
23:14:09FromDiscord_<Technicae Circuit> oh okay, nice
23:14:27FromDiscord_<Technicae Circuit> oh okay
23:14:30Yardanico*correction :P
23:14:31FromDiscord_<Technicae Circuit> Oop-
23:14:42FromDiscord_<Technicae Circuit> I just realized i edited my message πŸ˜…
23:15:38FromDiscord_<Technicae Circuit> Well since I'm a Python programmer, myself my mind immediately thinks "can i use Python in ...", And since there is a tool called Cython, i can make a C function in Python which allows me to use import statements in Nim
23:15:53Yardanicoyes but that's more effort than just using nimpy
23:15:57FromDiscord_<Technicae Circuit> Cython can compile Python to C
23:16:00FromDiscord_<Technicae Circuit> Eh
23:16:00Yardanicohttps://github.com/yglukhov/nimpy
23:16:03FromDiscord_<Technicae Circuit> Oo
23:16:27FromDiscord_<Technicae Circuit> Doesn't that actually use Python
23:16:33Yardanicoit does
23:16:38Yardanicobut that's kinda the point
23:16:44FromDiscord_<Technicae Circuit> I mean does it use it as a bridge
23:17:04FromDiscord_<Technicae Circuit> Wait
23:17:09FromDiscord_<Technicae Circuit> I can't English ;-;
23:17:10Yardanicoit uses CPython's dynamic library
23:17:29FromDiscord_<Technicae Circuit> So it uses CPython itself, basically calling the Python function
23:17:50Yardanicoyes
23:17:54FromDiscord_<Technicae Circuit> Because i think my method won't actually even need Python installed
23:18:06FromDiscord_<Technicae Circuit> I'm not sure though
23:18:09FromDiscord_<Technicae Circuit> It might
23:18:30*Trustable quit (Remote host closed the connection)
23:18:45FromDiscord_<Technicae Circuit> I will try it as soon as i figure out how to use C or C++ functions in Nim
23:18:55YardanicoCython will use your local python installation as well
23:19:05Yardanicoit doesn't embed CPython in the binary
23:19:08FromDiscord_<Technicae Circuit> When the code is compiled?
23:19:13FromDiscord_<Technicae Circuit> There is an embed option
23:19:38Yardanicoyou can do the same with nimpy then
23:19:47Yardanicojust link statically with libpython
23:20:38FromDiscord_<Technicae Circuit> Okay then
23:29:22FromDiscord_<Technicae Circuit> Is there a C to Nim converter somewhere? If so, can i have a link to it?
23:29:44FromDiscord_<Technicae Circuit> Nvn
23:29:44FromDiscord_<Technicae Circuit> Found it
23:30:16Yardanicothere
23:30:25Yardanicothere's c2nim but it doesn't work for all C code
23:30:37Yardanicothere's also nimterop but it's mainly for wrapping C libraries by wrapping headers
23:30:41FromDiscord_<codic> yeah
23:32:16FromDiscord_<Technicae Circuit> Oh okay