<< 17-06-2020 >>

00:04:30FromDiscord<treeform> @demotomohiro I address your comments and PR. Thanks!
00:06:47FromDiscord<demotomohiro> @treeform Thanks!
00:08:56FromDiscord<treeform> For annoying reason i was not watching the repo so I did not see your message or pr.
00:12:14*Jesin joined #nim
00:14:53FromGitter<ynfle> Is there any way to include a folder that is outside the `srcDir` in a nimble installation
00:15:18Yardanicowhy would you use nimble then?
00:15:23Yardanicocan't you make that folder another package?
00:15:35FromGitter<ynfle> For `public` dir in jeser
00:15:52Yardanicoah
00:15:54Yardanicoyou can just use ..
00:16:04Yardanicolike import ../public/file.nim
00:16:33FromGitter<ynfle> Not for import, for serving html, css, js etc...
00:18:23*opal quit (Ping timeout: 240 seconds)
00:18:57FromGitter<ynfle> Is it usual to have `public` dir in `src`? Nim in Action has it in the root
00:22:05FromDiscord<willyboar> Why to use src dir? Jester app is not a library. You don't need a nimble file at all
00:24:36*vicfred quit (Quit: Leaving)
00:25:01FromGitter<ynfle> What do you mean?
00:26:32*vicfred joined #nim
00:31:18leorizethere's the includeDirs seq
00:32:39shashlickNeed to figure out touch for windows
00:35:01*vikfret quit (Quit: Leaving)
00:36:12*arecaceae quit (Remote host closed the connection)
00:36:44*arecaceae joined #nim
00:37:15*opal joined #nim
00:50:39*NimBot joined #nim
00:58:34*oddp quit (Ping timeout: 240 seconds)
00:59:13disruptekleorize: why?
01:20:17FromGitter<ynfle> I know, but why shouldn't I use src?
01:21:57*krux02_ quit (Remote host closed the connection)
01:23:44FromGitter<ynfle> What is the recommended directory tree for jester app?
01:27:14leorizedisruptek: because it linked most of glibc into your lib
01:27:26leorizeapp*
01:27:43leorize@ynfle you can use whatever, really. we don't have an official guide on this
01:27:51disruptekwho cares?
01:27:58disruptekdoes it not run for you?
01:28:08leorizeand if you happen to use -march=native it probably won't run on others
01:28:21disruptekdo i?
01:28:52leorizeand also glibc have this thing of dynamically loading support libraries like it's nss resolvers
01:28:55disrupteklooks fine to me, but maybe i have a different build.
01:28:58leorizelet me see if this run on my musl system
01:30:09disrupteki think i'm going to use branches instead. feels like a more obvious approximation.
01:30:39disruptekif you want to make it better, fork it and do so.
01:30:48leorizebranches doesn't sound bad
01:31:06leorizethe only better thing I'd do is to strap something on that'd autobuild git-nim for you :P
01:31:23disruptekgo for it.
01:31:27leorize@ynfle if you're in doubt, look at nimforum
01:31:30leorize!repo nimforum
01:31:30disbothttps://github.com/nim-lang/nimforum -- 9nimforum: 11Lightweight alternative to Discourse written in Nim 15 477⭐ 43🍴 7& 2 more...
01:32:03leorizedisruptek: I have other things to do atm :P
01:32:49disruptekthis it's /not/ something you'd do. 😉
01:34:53AvatarfighterHello everyone :D
01:35:01disrupteksup fighter
01:35:07leorizeo/
01:35:36Avatarfighterdisruptek and leorize are you guys working on anything as interesting as usual?
01:35:49Avatarfighteras per usual*
01:37:11leorizeI was working on nightlies :P
01:37:34Avatarfighteroh my :P
01:38:27disruptek~gitnim is https://gitnim.com/ -- choosenim for choosey nimions
01:38:28disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions
01:42:45FromDiscord<Skaruts> if A imports B.foo
01:42:49FromDiscord<Skaruts> and C imports/exports A
01:42:52FromDiscord<Skaruts> when D imports C
01:42:54FromDiscord<Skaruts> will D have access to B.foo?
01:48:29shashlickno
01:49:16shashlickyou need to export B.foo in A for that
01:53:14*chemist69_ joined #nim
01:54:10shashlick@leorize onto your nightlies - where do i find them
01:54:25leorize[m]!repo alaviss/nightlies
01:54:25disruptekhttps://github.com/alaviss/nightlies/releases
01:54:26disbotno results 😢
01:54:31disruptekit's a fork.
01:54:55disruptekdo you have a 1.0 for us?
01:55:00shashlickshould I test 1.2.0 or devel
01:55:48disruptekboth; they both work and both need testing.
01:56:00*chemist69 quit (Ping timeout: 256 seconds)
01:56:53shashlickyou need to fix the filenames else choosenim won't work with nightlies anymore
01:58:42leorize[m]wait am I not using the same file names as normal nightlies?
02:00:09shashlicki think just windows
02:00:45shashlickeven linux
02:00:50leorize[m]ah so you also have this -windows part
02:01:29shashlickwe will have to fix choosenim for osx regardlesof
02:01:29leorizeyou gotta be kidding me with your naming scheme...
02:01:57shashlickwhat's so bad
02:01:59leorizecurrently I'm using `-hostOS_hostCPU` suffix
02:02:16FromDiscord<Elegant Beef> How many chat clients do you us leorize
02:02:20FromDiscord<Elegant Beef> use*
02:02:21leorizesimple and can be supported by everyone
02:03:12leorizeI can replace hostCPU with <arch> in a target triplet as well, again, easy to support
02:03:28leorizewell I'll make it work with the usual name
02:03:35leorizejust got to add some translation to map it
02:04:01leorize@Beef I only use two
02:04:03shashlickwell can't change the past
02:04:18FromDiscord<Elegant Beef> Why did you switch inbetween messages?
02:04:35leorizephone/computer
02:04:58FromDiscord<Elegant Beef> Ah
02:05:07leorizeshashlick: well I need a standardized naming scheme to stick to
02:05:19FromDiscord<Elegant Beef> I was imagining you having two open CLI clients and swapping between them for no real reason 😛
02:05:30leorizeso _x{32,64} for x86, and the <arch> in triplet for everything else?
02:06:07leorize[m]actually, I'm connected to my matrix on the same client as the one connected to freenode
02:06:08shashlicklooks like
02:06:21leorizeso I can use both at the same time without switching clients :P
02:06:29shashlickconsidering osx is just 1 build, can we leave the name as is?
02:06:49shashlickthen we won't need any choosenim changes
02:06:50disrupteknot without causing other software to special-case it.
02:07:09leorizeI'm already specializing for x86, I don't want to specialize for more
02:07:18shashlickokay then maybe stick to your scheme
02:07:43shashlickwe can update choosenim - existing users with older versions just won't get newer nightlies
02:07:57shashlickalthough i've almost completely lost interest in maintaining choosenim
02:08:01leorizeI thought osx builds have been broken for awhile?
02:08:43shashlicktrue that
02:08:54shashlickanyway, not sure who is using these features
02:09:16*endragor joined #nim
02:10:19shashlickdisruptek: the paramStr issue should be fixed now in nimterop
02:11:31*mal`` quit (Quit: Leaving)
02:14:24leorizeshashlick: you even special cased it for aarch64 to be arm64...
02:14:31leorizewell not too hard to deal with
02:15:03leorizewait why are your windows zips so giantic?
02:15:23*opal quit (Ping timeout: 240 seconds)
02:20:32*Tongir joined #nim
02:21:25shashlicki think i went with the dockcross naming
02:22:35shashlickhttps://github.com/dockcross/dockcross#cross-compilers
02:23:12*Tlanger quit (Ping timeout: 256 seconds)
02:24:28leorizelater on I think we should just generate all of our build deps ourselves
02:24:56*mal`` joined #nim
02:24:59disruptekshashlick: nice, thanks.
02:25:00leorizenot too hard to do, cross platform toolchain generators covered 99% of everything
02:25:38leorizegithub is now also a docker registry so we can upload our buildenv there as a better cache
02:26:33FromGitter<ynfle> @leorize nimforum has a different structure
02:26:54leorizewell we don't have a standard structure
02:27:00leorizeyou can do whatever, really
02:27:07leorizeas long as it makes sense
02:27:13FromGitter<ynfle> I'm using vanilla html, css & js, and I want to serve it from public
02:27:25disrupteknarrator: it didn't sound like it'd make sense.
02:27:43FromGitter<ynfle> I can put public in src, but then it wouldn't serve in develop
02:28:07FromGitter<ynfle> Doesn't seem right
02:28:38*vsantana joined #nim
02:29:12leorizeyou do realize that... the public folder has to be next to the binary, right?
02:29:25FromGitter<ynfle> Yes
02:29:54leorizethere's no way to package it that it would run standalone for every scenario unless you hardcode or allow tweaks to where the public folder it
02:30:11leorizeif nimble install your package, the binary will be in ~/.nimble/bin
02:30:34leorizeand I'm sure that the public folder won't follow there :P
02:31:34FromGitter<ynfle> Makes sense
02:33:49*opal joined #nim
02:35:15FromGitter<ynfle> Even if it's symlinked?
02:36:25leorize[m]disruptek, shashlick: nightlies with newer naming scheme will come after this run: https://github.com/alaviss/nightlies/actions/runs/137918994
02:38:06leorize15 builds running in parallel, this is why I love github actions :P
02:39:45*unknown quit (Quit: Leaving)
02:41:29disruptek!last gitnim
02:41:30disbotgitnim never seen.
02:41:33disruptekc'mon
02:42:18disruptekwhere's my version-1-0 release?
02:42:22leorizemacosx binaries are up
02:42:26leorizethey're building
02:42:36leorizethese vms are dual cores (except the macs)
02:43:00leorizewell linux version-1-0 is up
02:44:34leorizethese are faster than I thought, 8 mins for a linux build
02:45:31leorizewindows builds are slow as usual...
02:48:20leorizestill have to solve #14675 before I can get nightlies to make 32 bit linux builds
02:48:23disbothttps://github.com/nim-lang/Nim/issues/14675 -- 3Couldn't generate docs for 32bit Nim on Linux ; snippet at 12https://play.nim-lang.org/#ix=2pnA
02:48:39leorizeor I can switch back to glibc for them, but that's just dodging the issue
02:50:08disrupteki guess i didn't realize the naming scheme would vary with nim-1.0.
02:50:42leorizeI changed the naming scheme so that it'd match the official nightlies for all of them
02:51:30leorize[m]disruptek: https://github.com/alaviss/nightlies/blob/actions/build-release.sh#L138-L163 <- that's the suffix rule
02:51:52*muffindrake quit (Ping timeout: 260 seconds)
02:52:17*muffindrake1 joined #nim
02:53:10disruptekah, thanks.
02:53:14disruptek!last leorize
02:53:14disbotleorize spoke in 12#nim 2 minutes ago 12https://irclogs.nim-lang.org/17-06-2020.html#02:50:42
02:54:20disruptekwell, gitnim already has 1.0.7, 1.2.2, 1.2.1, 1.3.5 thanks to your stuff. with versions of `git nim` built against each.
02:54:56disruptektotal disk usage: 150mb
02:56:07disruptekthat's small enough that i can embed it in a single lambda layer with zig.
02:56:29leorizenice
02:57:32disruptekscratch "install" took me 3.7s
02:59:37disrupteki guess i need to update it for branches, though.
03:03:05shashlickHow do you link git nim to git-nim
03:03:19leorizegit extension feature
03:03:32shashlickI have a git alias called Nim which bootstraps Nim for me
03:03:46leorizeif a builtin git <command> can't be found, it will call git-<command> in your path
03:04:13shashlickI see
03:04:46shashlickSo if he wants to improve git-nim, he needs to do it in every single branch
03:05:03leorizethis is why automation trumps all :P
03:06:09leorizeyou can just put git-nim in a special branch, then make a github actions/azure/travis pipeline to copy it over to your other branches + generating the binaries
03:06:36disruptekyeah, but i want it to just track the branch.
03:07:11disruptekit's not a separate thing. this /is/ the thing.
03:13:55shashlickSo how do you do it
03:14:23disruptekdo what?
03:18:49shashlickEnsure git-nim is up to date on every branch
03:18:58shashlickIf you decide to add some features
03:19:31disruptekany branch where i want those features, i pull in the commit, build the program, commit it.
03:22:44shashlickokay
03:25:44*muffindrake1 is now known as muffindrake
03:42:13*muffindrake quit (Quit: muffindrake)
03:47:08*muffindrake joined #nim
04:00:57*Vladar joined #nim
04:06:02*supakeen quit (Quit: WeeChat 2.8)
04:06:39*supakeen joined #nim
04:12:53leorizeshashlick: all the buildable builds are up
04:13:09leorizewell except aarch64 because generating docs for those are slow
04:13:25leorizeI've merged a change to disable runnableExample when possible, should make those pop up soon
04:15:11shashlicksounds good
04:15:23shashlickstill fighting nimterop cross platform nonsense
04:15:43shashlickwindows file date doesn't have enough time resolution
04:26:14leorizemaybe just go for forced overwrite with a warning
04:30:48leorizeyou can do some powershell scripting stuff
04:30:56leorizebut it's just painful on windows
04:31:38leorizemaybe turn toast into a cross platform support toolkit for nimterop? (with a new name ofc)
04:37:54shashlickI am now just checking if dates are exactly same - if not i overwrite
04:37:58shashlickslightly better
04:39:26shashlickis there a way for a loaded dll to call a proc from the main executable
04:39:36leorizeyes
04:39:43leorizejust symAddr() it from NULL
04:40:06leorizenote that main must be compiled with --export-dynamic on linux
04:40:52shashlickmy goal is to eventually turn all wrappers into plugins that toast compiles into a lib and executes at runtime
04:41:01shashlickinstead of doing all this crazy stuff at compile time
04:41:31leorizeor just compile them into normal executable with a predictable cli layout
04:41:34leorizeeasy to handle
04:41:34shashlickbut for that i need to allow the plugin to run all these helper procs built into toast
04:41:40leorizecompatiable everywhere
04:41:48leorizecompatible*
04:42:00shashlickcompiling the entirety of toast including tree-sitter just to wrap a lib
04:42:22leorizewell you have them cached when you compile toast, no?
04:43:06leorizeyou can always export your helpers procs to the cli as well
04:43:10shashlicktoast is only compiled once - my idea is to pull all of build and cimport into toast
04:43:30shashlickand drive it with a plugin
04:43:56leorizethat's a bit too much
04:44:08leorizegiven the current terrible situation regarding Nim and plugins
04:44:30leorizeI'd say a command line tool with good interface works better
04:44:37leorizelet 3rd parties build on toast as well
04:44:44leorizehell, rename it to nimterop :P
04:45:23*dddddd quit (Ping timeout: 260 seconds)
04:45:25shashlicktoast already can do a lot of stuff by itself
04:46:28*nsf joined #nim
04:46:51shashlickeverything offered in the API per se is related to importing at compile time and building the library
04:47:26leorizeexport more? :P
04:47:38shashlickpure Nim gives a lot of power and expression instead of a command line
04:48:03shashlickor even nimgen which was a config file style
04:49:17FromDiscord<Rika> nim shell when
04:49:24*solitudesf- joined #nim
04:49:48shashlicki've had no issues with plugins with nimterop - i use markAndSweep to avoid mem issues
04:49:58shashlickand anyway it is a short running process
04:50:06shashlickarc will make things better too
04:50:36shashlickbut ya, i can keep rearchitecting this but C++ is higher priority
04:50:38leorizeI usually avoid dlls because they're sort of shaky grounds
04:51:10shashlicki felt that pain with feud - only boehm could handle it
04:51:29shashlickand that too broke for months when someone changed the gc code
04:52:41leorizehow does julia, crystal, python handle c bindings?
04:52:57shashlickany feedback on https://github.com/nimterop/nimterop/issues/154#issuecomment-645110953
04:52:58disbotgetHeader should install binaries outside nimcache which can go away
04:53:41shashlicki think they have an easier time cause they don't have style insensitivity, enums restrictions, identifier rules and other Nim headaches
04:54:25shashlickwe've worked around a lot of those things in nimterop but some things you cannot do anything about like duplicate identifiers due to style insensitivity
04:54:30leorizelol you miss an `s` in pinging me :P
04:55:00shashlickwhoops
04:55:02leorizeanyhow, the solution seems sensible
04:55:18FromDiscord<SeanOMik> Is there a way I could set default custom type variables?
04:55:23leorizeshashlick: well they have other problems to tackle too
04:55:49leorize@SeanOMik you mean setting default fields for objects
04:55:52FromDiscord<SeanOMik> Something like this: ```nim↵CustomType= ref object↵ abc: int = 500```
04:55:52leorize?
04:55:53FromDiscord<SeanOMik> Yeah
04:55:57leorizenope
04:56:01FromDiscord<SeanOMik> Oh
04:56:03FromDiscord<SeanOMik> Hm
04:56:15FromDiscord<SeanOMik> Thats weird that Nim doesn't support it
04:56:17leorizefor now tag the type with `{.requiresInit.}` and write an `init/new` for it
04:56:33leorizewe are planning to support it but it's kinda complicated
04:56:53FromDiscord<SeanOMik> Well I dont want it to requrieInit
04:57:00FromDiscord<SeanOMik> I'll just have to check if its nil
04:58:21FromDiscord<SeanOMik> Thanks
04:58:40leorizeshashlick: tbh I think it's easier if you just make it so that wrappers generate a binary based on toast
04:58:51leorizehow slow is it to compile toast?
05:01:13shashlickaround 30 seconds to a minute on travis depending on OS
05:01:30shashlicki pull in parts of the compiler
05:02:15leorizegiven that `nim c -r` now have super aggressive caching, you should be fine with building a framework for writing bindings generator from nimterop
05:03:06leorizethe best way to leverage Nim's power is to use Nim :P
05:03:23shashlickwhy aren't you on board with the plugin idea? even with arc coming
05:03:24leorizeif nimscript won't cut it then we just gotta use the real thing :P
05:03:36leorizebecause plugins are a pain
05:04:16leorizenimrtl is still a hit and miss
05:04:31leorizeand you can't share memory without using nimrtl, even with arc
05:04:47leorizethe allocator main state has to be stored somewhere
05:05:22shashlicklike i said, i haven't had any issues with mark and sweep
05:05:39shashlickbut will welcome your review of cPlugin within toast
05:06:18leorizeand also you'll never run out of hook points to add tbh
05:06:48shashlicktrue that
05:06:51shashlickhttps://github.com/nimterop/nimterop/blob/master/nimterop/getters.nim#L440
05:07:08shashlickthat's where i compile and load the cPlugin code passed into toast as a file
05:07:20shashlickyou can see the procs I load and find how they are used
05:07:49shashlickof course, toast is calling the dll procs, not the other way around like i was asking
05:09:35leorizewell you can see the complexity yourself
05:09:47leorizeyou have to do a ton of dance to get the config
05:10:30leorizethen more dance to build a plugin
05:10:42shashlicki thought i did some of this stuff in the plugin system i made out of feud
05:10:50shashlickbut don't remember now
05:11:35leorizeplugin systems are just inherently complicated
05:12:36leorizeeven more so with the current state of Nim
05:13:33shashlickI wish folks tried out plugins and had some feedback - I don't have a use for it right now
05:13:57shashlickGave up on feud - too big a project to build
05:14:30leorizeyou only have a few hooking points and not the ones that advanced people are interested into
05:14:56*narimiran joined #nim
05:15:12leorizefor example, if I wanted to wrap Qt I need access to the AST itself to turn Qt's signals into code via my custom generator
05:16:34leorizethis is not something that you can easily provide hooking points for
05:16:45shashlickBed time
05:16:50shashlickWill catch up tomorrow
05:16:56leorizesure, g'night o/
05:36:01*kenran joined #nim
05:37:27*vicfred quit (Quit: Leaving)
05:44:18*vikfret joined #nim
05:44:43*opal quit (Ping timeout: 240 seconds)
05:50:45*vicfred joined #nim
05:53:46FromDiscord<SeanOMik> I would convert an integer to a cushort like: ```nim↵var num: int = 9499↵var shrt = cushort(num)↵``` Correct?
05:54:53FromDiscord<Rika> think so yeah
05:54:57FromDiscord<SeanOMik> Hm
05:55:05FromDiscord<SeanOMik> Its getting `0`
05:55:15*gangstacat quit (Ping timeout: 272 seconds)
05:56:34FromDiscord<Rika> huh? how?
05:56:40FromDiscord<Rika> are you sure you're printing shrt
05:57:04FromDiscord<SeanOMik> Ah okay
05:57:09FromDiscord<SeanOMik> Its actually parsing it through json
05:57:17FromDiscord<SeanOMik> And for some reason the json is actually a string
05:57:22FromDiscord<SeanOMik> So I need to fix json
05:57:30FromDiscord<SeanOMik> But there is another issue
05:57:40FromDiscord<SeanOMik> I was trying to parse a `uint64` from a string
05:57:52FromDiscord<SeanOMik> This is what I tried: ```nim↵var num: uint64↵discard parseOct(str, num, 0)↵return num```
05:58:04FromDiscord<SeanOMik> But its not parsing the entire string as the number
05:58:08FromDiscord<SeanOMik> (edit) removed 'entire string as the'
05:58:24FromDiscord<SeanOMik> This: `648670408488255500` becomes `52`
06:00:07FromDiscord<Rika> thats not an octal number
06:00:09*opal joined #nim
06:00:28FromDiscord<SeanOMik> Oh
06:00:37FromDiscord<SeanOMik> I thought `parseOct` just parsed a large number
06:00:46FromDiscord<SeanOMik> I did actually just find `parseBiggestUInt`
06:00:51FromDiscord<SeanOMik> You think that would work?
06:00:56FromDiscord<Rika> yes
06:01:49FromDiscord<SeanOMik> Okay that worked
06:01:52FromDiscord<SeanOMik> Thanks for the help
06:16:01Zevvleorize: I kind of dropped the CPS, can't do it
06:19:23*nikita` joined #nim
06:22:44*gangstacat joined #nim
06:22:50*dom96 quit (Ping timeout: 256 seconds)
06:25:32*dom96 joined #nim
06:25:32*dom96 quit (Changing host)
06:25:32*dom96 joined #nim
06:31:21*tdc joined #nim
06:49:00*PMunch joined #nim
07:10:35*letto quit (Quit: Konversation terminated!)
07:13:29*letto joined #nim
07:26:28*narimiran quit (Quit: leaving)
07:29:43*ftsf joined #nim
07:31:31*narimiran joined #nim
07:43:46*endragor quit (Remote host closed the connection)
07:48:11PMunchHuh..
07:48:21PMunchSo appears that the standard library isn't all that big..
07:48:37PMunchI just had a bunch of compiled files in my lib folder for some reason.
07:48:43*fredrikhr quit (Ping timeout: 258 seconds)
07:48:56*muffindrake quit (Quit: muffindrake)
07:49:07AraqPMunch, hey, we are waiting for your talk
07:49:27PMunchSorry, I know
07:50:12PMunchHad some stuff come up yesterday so didn't get time to record it.. I'll get it to you ASAP
07:51:41Araqthanks!
07:52:02Araqso far we have 9 talks
07:52:14Araqyours and mratsim's are still missing
07:54:31PMunchI understood from narimiran that you were open for accepting more because of some cancellations? I could try to record one on how I used Nim on the Arduboy (Arduino game console).
07:55:20*muffindrake joined #nim
07:55:24Araqhmm well, 9 (or 11) talks is more than enough for a single day but we
07:55:34Araqcan make it a 2 day long conference
07:56:32PMunchOh well if you already have plenty then I'll save it for next year :)
07:57:10PMunchThere's a reason why I haven't published it yet, it's super cool, but I really want to polish it up a bit.
07:57:38*endragor joined #nim
07:59:26*fredrikhr joined #nim
07:59:42*fredrikhr quit (Read error: Connection reset by peer)
08:00:03*fredrikhr joined #nim
08:00:18*muffindrake quit (Quit: muffindrake)
08:06:18Araqalright
08:12:39zedeuswoo 1.2.2
08:12:59narimiranzedeus: how did you find out this quickly? :)
08:13:11zedeus#nitter has an rss feed for nim releases hah
08:14:33*couven92 joined #nim
08:14:45*couven92 quit (Read error: Connection reset by peer)
08:15:07*couven92 joined #nim
08:17:10narimiran:)
08:17:16*fredrikhr quit (Read error: Connection reset by peer)
08:18:43zedeuswe've been waiting for that openssl fix, nitter would occasionally crash from ssl double frees
08:20:19*fredrikhr joined #nim
08:20:50Araqis the fix in 1.2.2?
08:20:54zedeusyes
08:21:00Araqah great
08:27:52*muffindrake joined #nim
08:33:48*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
08:36:44*Lord_Nightmare joined #nim
08:56:53narimirannow it is official: Nim v1.2.2 is out! https://nim-lang.org/blog/2020/06/17/version-122-released.html
08:59:36*vikfret quit (Quit: Leaving)
09:01:42*Vladar quit (Remote host closed the connection)
09:06:04*Vladar joined #nim
09:09:03*opal quit (Ping timeout: 240 seconds)
09:09:23*Vladar quit (Client Quit)
09:09:43*Vladar joined #nim
09:10:22FromDiscord<Firefell> YES !!
09:10:37*solitudesf joined #nim
09:10:47Yardanicolol :D
09:13:25*solitudesf- quit (Ping timeout: 264 seconds)
09:14:41*Vladar quit (Quit: Leaving)
09:15:00FromDiscord<Firefell> I waited doc generation fix 🙂
09:15:47*krux02 joined #nim
09:16:14*Vladar joined #nim
09:23:47*opal joined #nim
09:29:00FromDiscord<KrispPurg> Eyyy, nice.
09:29:53FromDiscord<KrispPurg> Now I can carry on testing without Ssl nil err
09:36:15*Vladar quit (Quit: Leaving)
09:37:58*Vladar joined #nim
09:44:59*haxscramper joined #nim
09:46:23*Vladar quit (Quit: Leaving)
09:46:47*Vladar joined #nim
10:07:12federico3https://forum.nim-lang.org/t/6434#39715
10:07:24Yardanicofederico3: yeah seems a bit of a troll :P
10:07:28Yardanicoa go troll to be specific :D
10:10:46FromDiscord<Rika> 👀 how do you know theyre a go troll
10:10:50Yardaniconet/http
10:11:09Yardanicothat's a go stdlib package
10:11:42Yardanicothey basically say "i'm used to go so I don't understand async or nim's parallelism so they're bad"
10:12:02FromDiscord<Rika> well they never elaborated why theyre bad
10:12:15Yardanicothat's exactly what makes it seem like a troll post
10:13:13supakeenThe asynchttpserver/httpserver thing could be better I guess?
10:13:20supakeenBut who really understands async anyways :)
10:13:53FromDiscord<Rika> i'm still reading the backpressure blog post!
10:15:10*oddp joined #nim
10:15:22*abm joined #nim
10:16:52*letto quit (Ping timeout: 256 seconds)
10:17:17*vsantana quit (Quit: vsantana)
10:18:02*brainbomb joined #nim
10:19:08dom96supakeen, the asynchttpserver/httpserver thing?
10:20:07federico3Yardanico: he sounds quite correct
10:21:05supakeendom96: Sorry, the asynchttpserver module in stdlib and the httpclient module in stdlib.
10:21:12supakeenMixed up some words there :)
10:21:14Yardanicohttpclient is fine IMO
10:21:39dom96again, elaborate
10:22:00dom96That's like saying "The Nim thing could be better, I guess?" :)
10:22:35supakeenLet me type something out.
10:23:20*vsantana joined #nim
10:25:00*mchinen joined #nim
10:25:21*leorize quit (Remote host closed the connection)
10:25:29supakeenActually no, re-reading it all I feel like it mostly 'lacks' routing which is offered by net/http and the question is if you'd want that in stdlib.
10:25:48*leorize joined #nim
10:25:51zedeusjester and whip offers routing, it doesn't have to be in stdlib
10:26:22supakeenI can see a point for either side of that.
10:34:49*dddddd joined #nim
10:35:27PMunchCongratulations on 1.2.2 everyone!
10:37:08*skelett quit (Quit: WeeChat 2.5)
10:37:58*Trustable joined #nim
10:40:30*brainbomb1 joined #nim
10:41:31*brainbomb quit (Ping timeout: 272 seconds)
10:42:37*letto joined #nim
10:50:33*mchinen quit (Quit: Leaving)
10:54:01*bung joined #nim
10:55:17bungcan I write file permission in .nimble?
10:56:45bungI checked inclFilePermissions no available in nimscript
11:01:41PMunchYou can probably call chmod from a .nimble file
11:04:56livcdi hate invalid indentation errors.....
11:05:44bunghmm, I'll check how it would be in windows
11:06:34PMunchlivcd, indent your code correctly then! :P
11:06:58PMunchYou think the compiler likes nagging you about them?
11:07:55livcdhttps://forum.nim-lang.org/t/1641 this is awesome
11:10:32livcdi hate it when my monitoring is full of red alerts
11:12:48krux02livcd, are you talking about command and conquer?
11:12:59krux02:P
11:15:17livcdsadly no
11:18:33*solitudesf quit (Remote host closed the connection)
11:21:28*solitudesf joined #nim
11:46:37FromDiscord<willyboar> yuri's revenge
11:54:26PMunchTiberian Sun used to be my jam
11:56:33FromDiscord<willyboar> best games ever along with age of empires II w/ conquerors expansion
11:57:47PMunchHuh, never played with that expansion
11:57:54PMunchBut I played a lot of Age of Mythology
11:57:56*letto quit (Read error: Connection reset by peer)
12:02:28*Kaivo joined #nim
12:04:06FromDiscord<willyboar> I stuck with counter strike before age of mythology released
12:04:36FromDiscord<willyboar> then at 2004 i start playing football manager who was the last game i played
12:06:02*supakeen quit (Quit: WeeChat 2.8)
12:06:35*supakeen joined #nim
12:18:07FromDiscord<InventorMatt> is there a way to call an iterator one increment at a time?
12:19:54FromDiscord<Rika> what do you mean?
12:20:13FromDiscord<Rika> like an iterator object in python?
12:20:44FromDiscord<InventorMatt> yes, exactly like that
12:21:38krux02anybody interested to be irritating to EA?
12:21:45krux02https://github.com/electronicarts/CnC_Remastered_Collection/issues/78
12:21:46disbotGPL violation / Wrong License
12:21:51FromDiscord<Rika> sent a code paste, see http://ix.io/2poO
12:22:04krux02completely irrelevant to Nim though
12:22:24FromDiscord<Rika> lmao
12:22:27FromDiscord<InventorMatt> thanks, I'll try that out
12:23:23FromDiscord<Rika> sent a code paste, see http://ix.io/2poQ
12:23:50FromDiscord<Rika> of course, you can make a `next` proc that does this for you
12:24:06FromDiscord<Rika> which raises a "StopException" for you like in python when finished
12:26:28FromDiscord<InventorMatt> that seems to work. thank you for the help
12:35:01*fredrikhr quit (Ping timeout: 264 seconds)
12:36:46*bung quit (Ping timeout: 246 seconds)
12:37:28*fredrikhr joined #nim
12:38:04*couven92 quit (Read error: Connection reset by peer)
12:38:27*fredrikhr quit (Read error: Connection reset by peer)
12:38:47*fredrikhr joined #nim
12:42:30*couven92 joined #nim
12:45:55*fredrikhr quit (Ping timeout: 265 seconds)
12:48:46*NimBot joined #nim
12:51:33*letto joined #nim
13:01:36*waleee-cl joined #nim
13:01:52*bung joined #nim
13:04:38disruptekwillyboar: you haven't played a game since 2004?
13:06:14FromDiscord<willyboar> for long only Football Manager
13:06:29disruptekzedeus: the client understands the significance of a url but the server does not. i'd say that's a symetry that should exist in stdlib.
13:07:02disruptekonly football manager. yer blowin' my mind right now.
13:07:08disrupteki may also be high.
13:09:45*nekits quit (Quit: The Lounge - https://thelounge.chat)
13:11:08*nekits joined #nim
13:15:27*chemist69_ quit (Ping timeout: 260 seconds)
13:15:51*chemist69 joined #nim
13:23:45FromDiscord<willyboar> disruptek: I show you started new project
13:24:13FromDiscord<Rika> show? did you mean see 😛
13:24:28FromDiscord<willyboar> saw
13:24:38FromDiscord<willyboar> you are right
13:25:55FromDiscord<willyboar> but disruptek understands me 😛
13:30:56FromDiscord<Shucks> Meow Meow
13:31:06FromDiscord<Shucks> wops 😉
13:31:10disruptek!last leorize
13:31:11disbotleorize joined 12#nim-news 3 hours ago and last spoke 72 days ago
13:31:22*ftsf quit (Ping timeout: 246 seconds)
13:31:34disruptekhow could that possibly be correct?
13:31:51FromDiscord<willyboar> it's not
13:31:57disruptekwho fucking codes this stuff?
13:32:54FromDiscord<Rika> someone
13:33:49disruptekwillyboar: dude, i need your help on web stuff all the time.
13:33:52disruptekare you available?
13:34:22FromDiscord<willyboar> For you yes
13:34:32disruptekawesome, man. it's gonna be great.
13:34:55disruptekwhat do you think of gitnim?
13:35:01disruptek~gitnim
13:35:01disbotgitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek
13:35:30*bolti[m] joined #nim
13:35:53FromDiscord<willyboar> First thing i thought when i see it, it was : Why disruptek don't concetrate to create github tools?
13:37:02disruptekyeah, well, it works.
13:37:08disruptekit works really well.
13:37:35disruptekit puts people near code and it puts code near people.
13:37:50disruptekit puts communication near code.
13:37:59disruptekoral history.
13:38:29disruptekyou can find out the whys and whatfors with respect to this piece of nim that you're interested in.
13:38:46disruptekat any time, you can see if there have been issues with this section of code.
13:39:01disruptekyou can read its origin story.
13:39:15disruptekget a chonology of what changed, who changed it, why.
13:39:44disruptekthese are nice qualities to have in an ecosystem.
13:40:03disruptekgit is just the mechanics of how we provide it.
13:40:09disruptekit works really well.
13:40:38zedeusdoes gitnim provide an easy way to compile latest devel?
13:41:00disruptekof course.
13:41:16FromDiscord<dponyatov> What environment I must provide in case of using Nim for bare metal programming for i386 or some microcotroller?
13:41:40FromDiscord<dponyatov> (edit) 'microcotroller?' => 'microcontroller?'
13:41:47FromDiscord<Rika> pass in --os:standalone and --gc:arc?
13:41:48FromDiscord<Rika> dunno
13:41:54zedeus--os:any
13:42:42shashlickdisruptek: just ran git-nim - illegal instruction (core dumped)
13:43:00FromDiscord<dponyatov> Is `newlib` is a minimum must be built, or even less (only malloc part w/o io) ?
13:43:01disruptekwhat kinda system are you on?
13:43:12shashlickubuntu bionic i thhink
13:43:20disruptekbut arch
13:43:24FromDiscord<dponyatov> arm-none-eabi and i486-none-elf
13:43:34shashlickx86_64
13:43:44disruptekneat.
13:43:54disrupteki love carrying on two conversations at once.
13:44:03disruptekit's awesome, right?
13:44:24disruptekyou link two people up and just talk at both of them.
13:50:31disruptekshashlick: which branch?
13:50:56disrupteki recently changed the default branch to 1.0.7.
13:53:56shashlickmaster
13:55:10shashlicki tried all other branches too
13:55:15shashlicksome don't have git-nim
13:59:17*adnan338 joined #nim
13:59:22disruptekwut
14:02:08disruptekit seems to work best on 1.0.7, but i can switch around in all of them.
14:03:27disruptekthe point is, there are as many heads as there are branches.
14:03:37zedeuswhy 1.0.7?
14:03:54disruptekbecause that's stable.
14:04:07zedeuswhat is 1.2.2 then?
14:04:10narimirandisruptek: 1.2.2 was released today, don't know if you missed it
14:04:23narimiranzedeus: stable-improved :)
14:04:26disruptekit's already in. i didn't know when it was released.
14:04:30disrupteklol
14:04:43zedeuswhy not make it default?
14:04:52disruptekwe'll tag 1.0.7 as stable. 1.0.7 /is/ the default.
14:05:24narimiran1.0.6 is stable and tested, 1.0.7 is a backport-devel
14:05:52narimiran(yes, we're planning to have 1.0.8 at some point)
14:05:57disruptekif leorize gives me a 1.0.6, we'll make 1.0.6 the default.
14:06:54*notandinus quit (Ping timeout: 240 seconds)
14:07:15*notandin` joined #nim
14:08:59disruptekso i just type `git nim 1.0.7`
14:09:09disruptek`git tag -a stable`
14:09:16disruptek`git push --tags`
14:09:51disruptekdone. that's our new process for adding an arbitrary release to the entire world.
14:10:14*notandin` quit (Client Quit)
14:10:19*endragor quit (Remote host closed the connection)
14:11:49*team\andinus joined #nim
14:14:11FromDiscord<Rika> huh.
14:14:28FromDiscord<Rika> why can we `from xx import xx` but not `from xx export xx`
14:14:37*bung quit (Ping timeout: 264 seconds)
14:14:39FromDiscord<lqdev> export xx.xx
14:14:46FromDiscord<Rika> ok
14:14:52FromDiscord<Rika> thats odd
14:14:58disruptekit's a fair question.
14:15:17FromDiscord<lqdev> well, export works on any symbol so you can qualify them like normal
14:15:29disrupteki personally think it's because araq hates asians.
14:15:55disrupteki'm kidding, of course. i don't know if he hates them.
14:28:31FromGitter<Vindaar> uhm, risking to be mistaken here, but... happy birthday, Araq!
14:29:49narimiran@Vindaar you're correct :)
14:29:55*couven92 quit (Read error: Connection reset by peer)
14:29:58FromGitter<Vindaar> woohooo :)
14:30:21disruptek~araq
14:30:21disbotAraq: 11👑Andreas "What Else?" Rumpf👑 -- disruptek
14:30:44*fredrikhr joined #nim
14:30:58*fredrikhr quit (Read error: Connection reset by peer)
14:31:20*fredrikhr joined #nim
14:32:01FromDiscord<willyboar> Happy Birthday BDFL 🎂
14:33:03PMunchOoh, happy birthday!
14:33:34FromDiscord<willyboar> how old he is now?
14:33:57disruptekhe looks like he's about 22.
14:34:11FromDiscord<willyboar> lol
14:35:15stefantalpalaruIt seems I cannot `import times` in NimScript. What's the alternative for generating a timestamp there?
14:36:27disruptekshashlick: ah, i just need to figure out how to remove tags from github.
14:36:37FromDiscord<treeform> Where the tests for VC++ ran for 1.2.2?
14:37:24FromDiscord<treeform> was this blocking bug fixed? https://github.com/nim-lang/Nim/issues/14259
14:37:27disbotVC++ winnt.h fatal error "No Target Architecture" in stdlib_io. ; snippet at 12https://play.nim-lang.org/#ix=2ppc
14:38:06narimirani know how old is he, but don't know if i'm allowed to tell :P :D
14:38:41narimiranlets just say more than 30, less then 40 :)
14:38:43shashlickdisruptek: maintaining tools that change along with nim across branches might become a big pain
14:39:04shashlickwhy not a use submodule for the tools
14:39:12shashlickguess that will end up with another subdir to add to path
14:39:28disrupteknarimiran: i maintain criterion now.
14:40:14disrupteki'm not against a submodule system for tools and stuff, i just haven't tested it across branches.
14:40:25narimirandisruptek: oh, i had no idea. will you send a PR with the changed repo for important_packages (and fix all the deprecated stuff), or would you rather if i do it? :)
14:40:53disruptekis there a way for me to test it locally?
14:41:15FromDiscord<Rika> hbd
14:42:35narimirandisruptek: my editor highlights all deprecated warnings (e.g. with some older devel which still have those functions), or you run `nimble test` until the latest devel works
14:43:14narimirani don't remember exactly what the problems were, but most probably `random` -> `rand` and/or `initSet` -> `initHashSet`
14:43:19disruptekokay, so you just want it to be quiet?
14:43:32*couven92 joined #nim
14:43:32disrupteki wonder if i already did this.
14:43:34*solitudesf quit (Remote host closed the connection)
14:43:56*solitudesf joined #nim
14:44:00disruptekit just has some "unused" warnings.
14:44:24disruptekthis is my 0.2.0 release, fwiw.
14:45:19narimirandisruptek: now that my PR is merged it is not anymore about being quiet - it won't work with the latest devel
14:47:47disrupteki'm not sure i follow; i'm able to run criterion tests on 1.3.5 from <24hrs ago.
14:48:03disruptekor are you saying that since your pr, warnings are errors?
14:50:07narimiranmy PR was merged <2hrs ago
14:50:26narimiranthe deprecated functions are gone
14:51:15narimiranhttps://github.com/nim-lang/Nim/pull/14699
14:51:16disbotRemove deprecated stuff from stdlib
14:52:26disruptekhow deprecated could they be? they aren't emitting any deprecation warnings in criterion tests.
14:52:38*bung joined #nim
14:54:35narimiran(if my internet wasn't as spotty as currently, i would look into it; maybe later when it comes back for good)
14:59:11disrupteknarimiran: looks like i fixed some deprecations, so i think we're good if you just change the url to my fork.
14:59:19disruptek!repo disruptek/criterion
14:59:19disbotno results 😢
14:59:27disrupteker, it's that.
14:59:38disruptekit's just.. i told disbot that forks don't count.
14:59:54disrupteki guess i should make !fork a thing.
14:59:57narimiranbtw, is it just on my end or github is spotty currently?
15:00:18narimiranah, it is not just github. it is me. yay
15:00:31disruptekit's been fine for me. i am constantly blowing away my entire nim tree and restoring it with git.
15:01:51FromDiscord<Shucks> sent a code paste, see http://ix.io/2ppj
15:02:03FromDiscord<Shucks> If I define the gcc path in my project nim.cfg it will work
15:03:14disruptekbecause $nim is a path substitution.
15:03:23disruptekit's performed in the compiler's configuration context.
15:04:13FromDiscord<Shucks> It doesn't works if I use the full path aswell. $nim also works fine if I use it in the project config file
15:04:51disruptekoh, i thought you were trying to use it from the command-line.
15:05:16disruptekwhat does `nim dump` say?
15:05:58*haxscramper quit (Remote host closed the connection)
15:06:13FromDiscord<Shucks> https://paste.sh/2aN3u878#fbsTG-TvaetzhUc9L-KsnHuX
15:07:18bolti[m]Hi, I'm learning Nim and I have a question. What does {} means before an assignment in procs? for example {.async.}
15:07:48disruptekit's the syntax for a pragma.
15:07:48narimirandisruptek: we should probably also change that nimble points to your fork
15:08:01*Senny joined #nim
15:08:16disrupteknarimiran: yeah.
15:08:20narimiranon it
15:08:37disruptekShucks: they should both work from any config.
15:09:02bolti[m]disruptek: thanks
15:09:10*fredrikhr quit (Ping timeout: 260 seconds)
15:09:38disruptekShucks: it might be that they configs are getting evaluated in unexpected order?
15:10:11FromDiscord<Shucks> ```Hint: used config file 'E:\Program Files\nim-1.2.0\config\nim.cfg' [Conf]↵Hint: used config file 'G:\Coding\Nim\Tests\dlltest\nim.cfg' [Conf]```
15:10:13*fredrikhr joined #nim
15:10:17FromDiscord<Shucks> should use the main one first right
15:10:31FromDiscord<Shucks> oh wait
15:10:38FromDiscord<Shucks> im defining i386 in my project config
15:11:13disruptekit's kinda weird how it works; it parses and reparses like 3x.
15:12:08*lritter joined #nim
15:13:13FromDiscord<Shucks> Well I guess if I use `--cpu:i386` in the second one the nim main one doesn't defines the gcc path
15:18:13*narimiran quit (Ping timeout: 264 seconds)
15:19:40*narimiran joined #nim
15:19:59*fredrikhr quit (Read error: Connection reset by peer)
15:20:58*fredrikhr joined #nim
15:23:26*fredrikhr quit (Read error: Connection reset by peer)
15:23:37*fredrikhr joined #nim
15:27:09Araqguys, we could use a helping hand here: https://github.com/nim-lang/Nim/pull/14690
15:27:10disbotAdd an ARC test with threads in a loop
15:27:26Araqideally on some OS 'valgrind' can pinpoint the real problem
15:27:44Araqit's a pretty simple program after all
15:28:04Araqfwiw I did check the produced code and nothing looked suspicious
15:30:24disrupteki feel like someone had this in the playground and it ran there.
15:30:53disrupteki think i remember fixing a single off-by-one range buglet in it.
15:31:02disrupteks/single/simple/
15:34:05disruptekneat bug.
15:35:24*kenran quit (Ping timeout: 256 seconds)
15:35:33disruptekso it's a race to dealloc a pointer that isn't owned by the thread.
15:41:26disruptekis it because the main thread destroys the thread object, too?
15:44:51*couven92 quit (Read error: Connection reset by peer)
15:45:18*couven92 joined #nim
15:46:37FromGitter<alehander92> oh happy birthday guy!
15:46:51*couven92 quit (Read error: Connection reset by peer)
15:47:15*couven92 joined #nim
15:54:02*adnan338 quit (Ping timeout: 256 seconds)
15:56:31*drdee joined #nim
16:06:34*vikfret joined #nim
16:13:37YardanicoAraq: I tried finding alternatives to valgrind, found some tool called DrMemory, but it seems to output the same stuff
16:13:37Yardanicohttps://gist.github.com/Yardanico/9e35ff74f7bdc8b4c0a9885f178bafe7
16:18:40*aenesidemus joined #nim
16:19:39FromDiscord<Technisha Circuit> If i get the generated C code from Nim and compile it on another machine using a different cpu architecture, will it compile? Because apparently the C code is platform and Arch specifc
16:19:45Yardanicono
16:19:50Yardanicoyou can prepare the C code on your machine though
16:19:54Yardanicofor that other architecture
16:19:55FromDiscord<Technisha Circuit> Oh?
16:20:05Yardanicowhy can't you run the compiler on that platform directly btw?
16:20:43Yardanicobut basically you need --genScript:on
16:21:13Yardanicoof course also your platform specific CPU and os flags
16:21:22Yardanicolike --os:linux --cpu:i386 or something like that
16:27:29FromDiscord<KrispPurg> Hey guys, is there a way to update an object automatically like say the old object is `Obj(name: "r", stuff: None[int])` and the new one is `Obj(name: "lol", stuff: Some(666))`?
16:27:37Yardanicowdym "update"?
16:27:59Yardanicowell in async you can set callbacks and stuff
16:28:40narimiranif you're looking for ocaml/F# kind of stuff for updating, that's not possible AFAIK
16:28:48narimiranbut you can do it in two steps
16:28:53FromDiscord<KrispPurg> well, for changing objects from old to new
16:28:59Yardanicojust change it?
16:29:02Yardanicoi don't understand sorry :P
16:29:19disruptekwe use assignment for wholesale updates.
16:29:35disruptekit's like a destructuring without the expense of destructuring.
16:32:24FromDiscord<KrispPurg> so just `obj.name = "e.g."`
16:32:29Yardanicoye of course
16:32:41FromDiscord<KrispPurg> oof
16:32:45Yardanicoif it's "object" with var or "object" or "ref object" with let
16:32:50Yardanicoif it's "object" with let, you can't ofc
16:32:54Yardanicootherwise it's just simple assignment lol
16:32:56FromDiscord<KrispPurg> ik
16:33:01disruptekvar obj = Obj(name: "r", stuff: Some(666))
16:33:11Yardanicowell yes you can also do that
16:33:20Yardanicobut it might be better to just update a few fields if you have a lot of them
16:33:20FromDiscord<KrispPurg> but what if it's a long object
16:33:23FromDiscord<Rika> i dont see whats the issue
16:33:26disrupteki think you're going to love creating objects.
16:33:31Yardanico@Rika neither do i :D
16:33:31disruptekit's really a great experience.
16:33:48*vsantana quit (Quit: leaving)
16:33:53FromDiscord<KrispPurg> like UpdatedObj?
16:33:56FromDiscord<Rika> dont make long objects :PPPP
16:34:03Yardanico@KrispPurg so that's your issue?
16:34:06FromDiscord<Rika> compose your objects!
16:34:07Yardanicojust update the fields and done
16:35:30disruptekwe could write a macro to do partial updates.
16:35:45Yardanicowe already have "with"
16:37:39FromDiscord<KrispPurg> So, when I update my guild like name for example, basically it's just the updated guild, but the members field isn't included which means that before you update the guild and you send the file with the guild object which is stringified and the file is like 7 KB, after updating it it's like 1 KB.
16:37:50FromDiscord<KrispPurg> hold on brb
16:38:19shashlickdisruptek - what version of libgit2 do you use?
16:38:20Yardanicowell I still don't understand, why field updating doesn't work for you? :P
16:38:55zedeusdon't learn fp first, kids.
16:39:43FromDiscord<Rika> i dont think krisppurg comes from an fp language
16:39:47Yardanicoyeah
16:39:58zedeushm
16:41:09FromDiscord<KrispPurg> It does work for me but, I don't want to be that much of a hassle
16:41:17Yardanico??
16:42:28FromDiscord<KrispPurg> I hate having to explain this, because I am terrible at explaining tbh, but I think there's a lot to assign the fields.
16:42:38FromDiscord<KrispPurg> which would be a hassle
16:42:41Yardanicoshow thec ode
16:42:46Yardanicowe can all read code
16:43:06Yardanicowell, how you want it to look like
16:44:07FromDiscord<KrispPurg> sent a code paste, see http://ix.io/2ppJ
16:44:40Yardanicoehm
16:44:53Yardanicowhat object do you want to assign fields for?
16:47:02FromDiscord<KrispPurg> Guild
16:47:11Yardanicojust declare it with "var" then?
16:47:15Yardanicoif it's not a ref object
16:47:33Yardanicoah wait I think I might understand
16:47:44Yardanicowell no, guild is a ref object
16:47:47Yardanicoso it should be fine
16:48:38Yardanicoyou can assign to guild in this code just fine
16:48:48YardanicoI mean assign fields, not a new object
16:48:58Yardanicoif you want to fully reassign it you need to declare it as "var"
16:51:52*natrys joined #nim
16:56:03FromDiscord<Skaruts> can I do `from X export Y`?
16:56:11Yardanicoyou can do
16:56:15Yardanico"from X import Y"
16:56:16Yardanicoexport Y
16:56:21zedeusdeja vu
16:56:32FromDiscord<Skaruts> hmm, yea, thanks
16:56:39FromDiscord<Skaruts> didn't think of that
16:56:42zedeushttps://irclogs.nim-lang.org/17-06-2020.html#14:14:28
16:56:57Yardanicoxd
16:57:02FromDiscord<Rika> lmao
16:57:03FromDiscord<Rika> hey!
16:57:11FromDiscord<Rika> dont call me out
16:57:52Yardanicoah right
16:58:01Yardanicomaybe i should try to complete my unpack macro today
16:58:16Yardanicoit mimics python'ss tuple unpacking (including the * specifier) and is relatively simple
16:58:37Yardaniconot exactly safe though, since it's supposed to be used for seqs with runtime length
16:58:48supakeenYardanico: Does it do my favorite `x, = T` where it unpacks a single thing and errors if there's not a single thing in the seq?
16:59:17Yardanicowell you can of course do
16:59:27Yardanicomyseq.unpack(x)
16:59:32Yardanicoif there's less than 1 elem it'll fail of course
16:59:54Yardanicothe macro allows for simple stuff like let (a, b, c) = data.unpack(3)
17:00:07supakeenAh nice!
17:00:08Yardanicoor python-like with myseq.unpack(a, b, *c, d)
17:00:43Yardanicoi need to figure out the proper indexing for star expressions because right now it's a bit borked :P
17:04:39FromDiscord<Shucks> hopefully disruptek doesnt see that
17:04:58FromDiscord<Shucks> he almost killed me yesterday for being like `hey thats what I do in python` ;D
17:05:08Yardanicowell i do it just for fun
17:05:11YardanicoI won't use it myself anyway :P
17:05:17disrupteki haven't decided if i'm going to kill you yet.
17:05:21disruptekthe day is young.
17:05:26FromDiscord<Shucks> hehe
17:10:01FromGitter<alehander92> guys do you like menus
17:10:10FromGitter<alehander92> i am really not great at UX
17:10:33FromGitter<alehander92> and want to go back to TUI
17:22:33Prestigetui always
17:25:01disruptekshashlick: i use 1.0.1 iirc.
17:25:08PMunch@alehander92, define menus?
17:25:27disruptekshashlick: your bug was one of documentation, i think. we'll just make people build gitnim. if they can't we have real problems.
17:25:36*krux02 quit (Remote host closed the connection)
17:25:59disrupteki mean, if your compiler doesn't work, you won't be doing much nim work.
17:32:36bolti[m]Hi, why some procs don't need parentheses? like echo?
17:32:47bolti[m] * Hi, why some procs doesn't need parentheses? like echo?
17:32:52PrestigeIf you have no params or return type you don't need them
17:33:04Yardaniconot exactly
17:33:14Yardanicobolti[m]: see https://nim-lang.org/docs/manual.html#procedures-command-invocation-syntax
17:33:16zedeushttps://nim-lang.github.io/Nim/manual.html#procedures-command-invocation-syntax
17:33:17PrestigeOh i thought he meant just the declaration of the proc
17:33:18zedeusdammit
17:33:20Yardanico:D
17:33:55Yardanicobolti[m]: basically any procedure can be called without parens if it's not ambiguous
17:34:27Yardanicobtw I figured why my * unpacking didn't work correctly
17:34:34Yardanicobecause I can't know how much values left at compile-time :P
17:34:39Yardanicoso I'll use ^
17:35:56bolti[m]Why this doesn't work?
17:35:57bolti[m]proc main =
17:35:58bolti[m] echo "Hello"
17:35:58bolti[m]main
17:36:10Yardanicobecause it's ambiguous
17:36:18Yardanicoare you referring to proc itself or do you want to call it?
17:36:19Yardanicowe don't know
17:36:26Yardanico"Function calls with no arguments still needs () to distinguish between a call and the function itself as a first class value."
17:36:33bolti[m]thanks
17:39:04FromDiscord<Technisha Circuit> In Nim can i have an empty pragma like ```nim↵proc myProcedure() {..} =↵ # Code```?
17:39:10zedeushy
17:39:12zedeuswhy
17:39:20FromDiscord<Rika> why? idts
17:39:48FromDiscord<Technisha Circuit> Curiosity and oof
17:39:51zedeuswtf
17:39:58Yardanicojesus it works
17:40:03FromDiscord<Rika> what
17:40:04Yardanicobless the roof operator
17:40:05FromDiscord<Rika> holy fuck what
17:40:06leorize!eval proc foo() {.} = discard
17:40:09NimBot<no output>
17:40:09FromDiscord<Rika> ah i thought
17:40:14leorizeyep it works
17:40:15FromDiscord<Rika> bruh
17:40:22FromDiscord<Rika> bruh
17:40:23zedeuswell it doesn't do anything, why does it matter
17:40:32YardanicoI'm doing this https://gist.github.com/Yardanico/464c259d38d513fd9ac56a27e48e5c9d
17:40:35Yardanicoand this works now :P
17:41:38Yardanicomacro is not the cleanest though, but hey it works :P
17:41:51zedeusmaybe you could do `unpack: (a, *c, d, f) = data`
17:42:09Yardanicowell it's supposed to be used in a single line anyway, so I don't think there's a lot of difference
17:42:13FromDiscord<Technisha Circuit> Oh damn
17:42:24zedeusthe syntax is much closer to regular unpacking, if you're going for that
17:42:26Yardaniconow I need to make it somehow not to make copies where it's not needed
17:42:44zedeusit's also a bit more clear that you're assigning new variables
17:43:16Yardanicowell maybe I'll change it, idk, it's pretty small anyway
17:43:19Yardanico@[1, 2, 3, 5, 6].unpack(g, x, _, _, z) this works too
17:43:30Yardanicomaybe I should also do *_ xD
17:43:51Yardanicosince python allows that
17:43:53livcdi am excited to see nim & qt
17:44:45*vsantana joined #nim
17:45:07zedeusthe major blocker for me was having to ship DOtherside
17:45:29leorizeoh you're using QML?
17:45:35leorizehow is it in nim?
17:45:35zedeusstatus is
17:45:46leorizeI see
17:45:56zedeushttps://www.youtube.com/watch?v=AAr2lHZLNyU
17:45:58zedeusoops
17:46:00zedeushttps://github.com/status-im/nim-status-client
17:46:25FromDiscord<Recruit_main707> bruh XD
17:46:31FromDiscord<Rika> someone's in vtuber hell
17:46:32zedeusyou didn't see that.
17:46:38Yardaniconice song anyway
17:46:38FromDiscord<Rika> pekopekopekopekopekopeko
17:46:39zedeusmy friend is, i swear
17:46:43Yardanicozedeus: its okay
17:46:45Yardanicothere are weebs here too
17:46:48FromDiscord<Rika> embrace it
17:47:15Yardanicowhen you use nim for the first time https://www.youtube.com/watch?v=V6bTbqk_gj4
17:47:34disruptekOHIO
17:48:08FromDiscord<Recruit_main707> this video reminds me of this girl og the body rolls song
17:48:12FromDiscord<Recruit_main707> of*
17:50:01FromDiscord<Rika> oh wow til theres a discord user in this server named `zzzig` and has a rust profile picture
17:50:12Yardanico!getdiscid zzzig
17:50:14FromDiscordzzzig#0857 has Discord UID: 707410275695067228
17:50:15Yardanicoi am ban
17:50:24Yardanico /s
17:50:35Yardanicohis UID is 707410275695067228 btw
17:51:10FromDiscord<Recruit_main707> did you scroll down to the bottom of the users Rika?
17:51:34FromDiscord<Rika> yes im checking every user's pfp
17:51:43FromDiscord<Rika> if theres another user with a virtual youtuber avatar
17:52:24*couven92 quit (Read error: Connection reset by peer)
17:52:32Yardanicolol
17:52:52*couven92 joined #nim
17:54:00FromDiscord<Rika> so far so good
17:55:21*couven92 quit (Read error: Connection reset by peer)
17:55:47*couven92 joined #nim
17:55:55bolti[m]Hi, do you know good nim live coding streams?
17:56:27zedeus~stream
17:56:28disbotstream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat)
17:56:54disruptekeh that guy's an asshole.
17:56:59zedeusyeah.
17:57:43bolti[m]mm why?
17:57:51YardanicoXDD
17:57:58zedeushe groans a lot
17:58:29*vikfret quit (Quit: Leaving)
17:59:26bolti[m]xd
17:59:49zedeusif only you knew.
18:04:10*bung quit (Quit: Lost terminal)
18:04:34PMunchHaha :P
18:04:47zedeusno really, you weren't there
18:05:15Araqdisruptek, huh but with --threads:on --gc:arc we use a shared heap
18:05:41*drdee quit (Remote host closed the connection)
18:05:50*drdee joined #nim
18:08:30disruptekAraq: go eat cake; it'll keep. 😉
18:10:46leorizeshashlick: have you tested my nightlies?
18:10:56disruptekAraq: there's no destroy for it anyway, i think.
18:11:46FromDiscord<willyboar> @alehander92 I was searching you yesterday
18:11:51*opal quit (Remote host closed the connection)
18:12:25FromDiscord<willyboar> Disruptek: I will join stream later
18:12:50disrupteki'm not streaming. also, they are repaving outside my window.
18:12:52Yardanicoit's not live anyway
18:14:25FromDiscord<willyboar> Zedeus tricked me
18:15:37*opal joined #nim
18:18:25Yardanicoso i did it I think, the code isn't the prettiest but it kinda works :P
18:18:26Yardanicohttps://github.com/Yardanico/nim-snippets/blob/master/unpack_macro.nim
18:19:42leorizeis this based on the unpack macro on nimble sometime ago??
18:20:17FromDiscord<Recruit_main707> bolti: https://www.twitch.tv/codemaniacs↵this guy is coding a PSX emulator in nim and streams it
18:20:31FromDiscord<Recruit_main707> not super active though
18:20:33zedeusneat
18:20:39*dddddd quit (Ping timeout: 260 seconds)
18:28:57disrupteki would watch that.
18:34:09*kenran joined #nim
18:36:02bolti[m]Thanks
18:36:35FromDiscord<Shucks> heh? https://play.nim-lang.org/#ix=2pqi
18:39:37FromDiscord<Shucks> didn't saved my last changes: https://play.nim-lang.org/#ix=2pqk
18:39:49FromDiscord<Shucks> (edit) removed 'https://play.nim-lang.org/#ix=2pqi'
18:39:56Yardanicowell, it's not hard to get compiler crashes with some invalid nim code
18:40:01Yardanicobut yeah, report it on github
18:42:14FromDiscord<Shucks> What would be the valid nim code then? I need to use a optional typedesc parameter there
18:42:58Yardanicouse options module then?
18:43:17Yardanicohttps://nim-lang.org/docs/options.html
18:51:49*Senny quit (Ping timeout: 264 seconds)
18:56:05*moerm joined #nim
18:56:12moermHello everyone ;)
18:56:30FromDiscord<Technisha Circuit> How do i edit json data that I've loaded? Let's say i want to change a number in the json data, how would i do that?
18:57:13zedeushttps://nim-lang.github.io/Nim/json.html#%5B%5D%3D%2CJsonNode%2Cstring%2CJsonNode
19:04:33FromDiscord<Shucks> Thank you. But how would I define a none typedesc? https://play.nim-lang.org/#ix=2pqq
19:04:39FromDiscord<Technisha Circuit> Thanks :p
19:05:01Yardanico@Shucks hrm
19:05:08Yardanicowell you can always make two overloaded procs instead
19:05:13Yardanicoone with the typedesc argument, one without them
19:05:28Yardanicoand maybe even share the implementation between them if it's similar
19:05:55*tane joined #nim
19:06:37FromDiscord<Shucks> So the compiler knows which one it has to call then? Thats fancy
19:07:47Yardanicoyes of course
19:07:56Yardanicoyou can overload by different types, by number of arguments, etc
19:07:59FromDiscord<Rika> Typedesc is a generic tho
19:08:04Yardanicosoo?
19:08:14Yardanicoyou can make one proc without the typedesc argument, and one with it
19:08:27*chemist69 quit (Ping timeout: 240 seconds)
19:08:31FromDiscord<Technisha Circuit> So how do i turn an int to it a jsonInt?
19:08:35moermCU later
19:08:38YardaniconewJInt(myint)
19:08:45*moerm quit (Quit: Leaving)
19:08:46FromDiscord<Technisha Circuit> Thanks :P
19:08:46*kenran quit (Ping timeout: 246 seconds)
19:08:49Yardanicohttps://nim-lang.org/docs/json.html#newJInt%2CBiggestInt
19:08:49FromDiscord<Rika> Or %
19:08:51Yardanicoit's literally at the top
19:08:52Yardanicoyeah, or %
19:08:53FromDiscord<Rika> Right?
19:09:21*couven92 quit (Read error: Connection reset by peer)
19:09:33*chemist69 joined #nim
19:09:42FromDiscord<Technisha Circuit> So i can use `%` on any json serialisable object to get it's json representation?
19:09:49*couven92 joined #nim
19:10:16Yardanicoyes
19:10:17FromDiscord<Rika> Yes
19:10:21FromDiscord<Technisha Circuit> Nice
19:10:41FromDiscord<Rika> %* for one that does objects itself
19:10:44FromDiscord<Technisha Circuit> So I'm assuming `%5` should work
19:10:47FromDiscord<Technisha Circuit> O
19:10:49FromDiscord<Rika> Yes
19:10:55FromDiscord<Technisha Circuit> Cool, thanks!
19:11:23FromDiscord<Technisha Circuit> Is this also compatible with packedjson?
19:11:32zedeusyes
19:11:39FromDiscord<Technisha Circuit> That's nice then
19:14:59FromDiscord<Recruit_main707> packedjson does not have a to() function iirc
19:15:05FromDiscord<Technisha Circuit> Oh?
19:15:14FromDiscord<Technisha Circuit> What does it use then?
19:16:01FromDiscord<lqdev> nothing
19:16:07zedeusit has %
19:16:08FromDiscord<lqdev> there's no alternative, unfortunately.
19:16:24FromDiscord<Technisha Circuit> Then how do i modify the data?
19:16:32FromDiscord<Technisha Circuit> Wait
19:16:43zedeusread carefully
19:16:45FromDiscord<Technisha Circuit> So `%` just converts them back and forth?
19:16:57zedeus% converts values to json nodes
19:17:16zedeus`to` is a macro that converts a jsonnode to some type, but you don't need that
19:22:56FromDiscord<Technisha Circuit> Oh okay
19:24:24*couven92 quit (Read error: Connection reset by peer)
19:24:52*couven92 joined #nim
19:24:56FromDiscord<Technisha Circuit> How do i remove values from a table?
19:25:31zedeusplease read the manual
19:26:03FromDiscord<Technisha Circuit> Oh yeah, that's a thing :p
19:26:34FromGitter<alehander92> oii
19:26:47zedeuswe need a gpt-3 bot that can answer such questions
19:27:01zedeusthey showed a cool demo with wikipedia
19:27:13zedeushttps://openai-assets.s3-us-west-2.amazonaws.com/API/FINAL_bread.mp4
19:27:23FromGitter<alehander92> disruptek ah
19:27:29FromGitter<alehander92> i thought i can mumble with ya guys
19:27:29disruptekAIIIEEE
19:27:40leorize@lqdev so how are you planning your async thingy?
19:27:55FromGitter<alehander92> willyboar yeah sorry
19:27:58FromGitter<alehander92> i was a bit buys
19:28:00FromGitter<alehander92> busy
19:29:14FromDiscord<lqdev> leorize: decided to go with a lightweight dispatcher that calls all active async procs on `window.pollEvents`.
19:29:22FromDiscord<lqdev> it's that simple.
19:29:45FromDiscord<lqdev> so unfortunately code *will* result in callback hell but it's really not my fucking problem
19:29:54FromDiscord<lqdev> you shouldn't be downloading a lot of data from the GPU anyways
19:30:55FromDiscord<Technisha Circuit> I'm getting ```/data/data/com.termux/files/home/test.nim(6, 41) Error: expected type, but got: initTable(64)```with this code```nim↵import tables, asyncdispatch↵↵var x:initTable[string, proc(){.async.}]()```, why is this?
19:31:23zedeusinitTable is not a type
19:31:42disruptekuse =
19:31:43FromDiscord<Technisha Circuit> Oh
19:31:48disruptek~manual
19:31:48disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
19:31:48FromDiscord<Technisha Circuit> I'm really stupid-
19:31:52zedeusyou don't need to init tables anyway.
19:32:00zedeusvar x: Table[string, ...]
19:32:06FromDiscord<willyboar> Nevermind alehander92
19:32:33FromDiscord<Technisha Circuit> Eh
19:33:50FromDiscord<Technisha Circuit> I think it'd look neater :p
19:34:17zedeuswut
19:34:40zedeuslonger unnecessary code certainly isn't neater
19:35:15disruptekit is when i write it.
19:35:25FromDiscord<Technisha Circuit> Doing var x:Table[...] Is basically the same as using var x = initTable[...]
19:35:36FromDiscord<Technisha Circuit> Also, is it ```nim↵if n in myTable:↵ # Code``` to check if a value is in my code
19:35:41zedeusthe former is shorter
19:36:04FromDiscord<Technisha Circuit> Eh ¯\\_(ツ)\_/¯
19:36:06zedeusas the manual tells you, yes that's how you do it
19:36:50FromDiscord<Rika> ~~what's up with you and not reading the manual~~
19:36:55disruptekzedeus, meet technisha. technisha, zedeus.
19:37:05disruptekmmmm'kay?
19:37:16zedeusoh this isn't the first time, buddy
19:37:22FromDiscord<Rika> (笑)
19:37:26federico3what happened to https://github.com/nim-lang/Nim/blob/devel/doc/filters.rst ? It
19:37:36federico3it's not listed in the manual and stdlib doc anymore
19:37:47FromDiscord<Rika> It what
19:37:50FromDiscord<Rika> Ah
19:37:53FromDiscord<Rika> Really?
19:38:05federico3you can only find it from https://nim-lang.org/documentation.html
19:38:05*fredrikhr quit (Read error: Connection reset by peer)
19:38:17*fredrikhr joined #nim
19:38:30*fredrikhr quit (Read error: Connection reset by peer)
19:38:52*fredrikhr joined #nim
19:39:09*fredrikhr quit (Disconnected by services)
19:39:14*couven92 is now known as fredrikhr
19:39:28*couven92 joined #nim
19:39:59FromDiscord<Yardanico> A bit late, but I posted 1.2.2 announcement in #announcements
19:40:10FromDiscord<Yardanico> idk if people really check it though
19:40:52federico3we need some better HTML DSL in stdlib tho
19:41:13FromDiscord<Yardanico> Just add karax to fusion
19:42:22zedeus+1
19:42:29*tdc quit (Ping timeout: 258 seconds)
19:42:44FromGitter<alehander92> hmm
19:42:51FromGitter<alehander92> karax works as html generator
19:42:53FromGitter<alehander92> but is it fast
19:42:59federico3no way
19:43:06FromGitter<alehander92> because you have VNode construction => $ convertion
19:43:11FromGitter<alehander92> instead of direct text generation
19:43:12zedeusit's quite fast, yeah
19:43:23FromGitter<alehander92> i mean, no, there are two cases
19:43:46FromGitter<alehander92> its fast for vdom, but here its about generating string html iirc
19:43:52zedeusyes.
19:44:03zedeusi use it for nitter, the time to generate full pages is less than 1 ms
19:44:04FromGitter<alehander92> and less intermediate objects should be somehow faster i guess
19:44:21FromGitter<alehander92> yeah, but i imagine it can be *faster*
19:44:44FromGitter<alehander92> probably needs profiling as everything, might be negligible for most cases
19:44:47*solitudesf quit (Ping timeout: 258 seconds)
19:45:04zedeusit is, and the flexibility it gives you is very worth it imo
19:45:33leorize[m]vnodes have advantages of being modifiable before you render them into html though
19:45:40FromGitter<alehander92> i agree, but you can have it all + no intermediate vnodes
19:45:47FromGitter<alehander92> hm, i think i rarely modify them
19:45:51FromGitter<alehander92> in my vdom code
19:46:07FromGitter<alehander92> they can be generated with if-s so i am not sure if this is important
19:46:07zedeusit's more about composability
19:46:36zedeushttps://github.com/zedeus/nitter/blob/master/src/views/tweet.nim
19:46:38FromGitter<alehander92> it is possible, after all html generation
19:46:45FromGitter<alehander92> is probably much faster than dom rendering
19:46:50FromGitter<alehander92> what can you do
19:47:26FromGitter<alehander92> ok, but i dont see why does one need actual VNode here if it's on the server side
19:47:33FromGitter<alehander92> you can use the same dsl
19:47:48FromGitter<alehander92> and `VNode = string` + some internal defines if its using c backend
19:48:46zedeustype safety? i dunno
19:48:49zedeusit's plenty fast either way
19:49:17FromGitter<alehander92> sorry, its good enough surely!
19:49:24FromGitter<alehander92> i just was trying to think of cool tricks
19:49:31FromGitter<alehander92> good work on nitter
19:49:46*dddddd joined #nim
19:52:58alehander92_hey disruptek
19:53:38alehander92_i want to make something people didnt expect
19:53:49zedeusdon't spoil it, then
19:54:11alehander92_you're right!
19:54:25alehander92_so then i want to do something zedeus is ok with
19:54:34disruptekgood luck.
19:54:59FromDiscord<Technisha Circuit> Could i pass a module to a function?
19:55:11zedeuswhy?
19:55:21alehander92_no
19:55:30alehander92_modules dont really exist as *values*
19:55:42alehander92_but probably you can do what you want in a different way
19:56:19FromDiscord<Technisha Circuit> Hm, okay
19:56:25*krux02 joined #nim
19:56:32*xet7 quit (Quit: Leaving)
19:56:39FromDiscord<Technisha Circuit> ~~Alot of the things which i ask if i can do will make you say why-~~
19:57:07FromDiscord<Technisha Circuit> Is it possible to get the name of a type in Nim?
19:57:19FromDiscord<Technisha Circuit> A user-defined type specifically
19:57:31zedeusyeah because they're often rather questionable things that don't make much sense if you know the language properly
19:57:39*brainbomb1 quit (Quit: Leaving.)
19:57:47FromDiscord<Technisha Circuit> Exactly :)
19:58:12zedeusand since you refuse to read the manual.. it's gonna be a long day
19:58:20zedeusyou can get type names yes, stringify the typedesc
20:01:17FromDiscord<Technisha Circuit> Oh okay, thanks :P
20:08:21*fredrikhr quit (Read error: Connection reset by peer)
20:08:46*fredrikhr joined #nim
20:09:36*fredrikhr quit (Read error: Connection reset by peer)
20:10:01*fredrikhr joined #nim
20:11:06*rayman22201_ joined #nim
20:12:50*kungtotte_ joined #nim
20:13:30*lj00nal joined #nim
20:13:35*livcd_ joined #nim
20:13:45*brainbomb joined #nim
20:13:48*Ekho- joined #nim
20:14:13*literal_ joined #nim
20:14:16*xace_ joined #nim
20:14:36*brainbomb quit (Client Quit)
20:14:55*federico3_ joined #nim
20:15:05*MightyJoe joined #nim
20:15:08*couven92 quit (Read error: Connection reset by peer)
20:15:26*couven92 joined #nim
20:15:38*couven92 quit (Read error: Connection reset by peer)
20:16:02*couven92 joined #nim
20:17:57*kenran joined #nim
20:18:54*cyraxjoe quit (*.net *.split)
20:18:54*xace quit (*.net *.split)
20:18:54*kungtotte quit (*.net *.split)
20:18:54*rayman22201 quit (*.net *.split)
20:18:54*ljoonal quit (*.net *.split)
20:18:54*wgetch quit (*.net *.split)
20:18:54*livcd quit (*.net *.split)
20:18:54*Ekho quit (*.net *.split)
20:18:54*literal quit (*.net *.split)
20:18:54*federico3 quit (*.net *.split)
20:18:59*rayman22201_ is now known as rayman22201
20:19:25*lj00nal is now known as ljoonal
20:19:41alehander92_this is a good way to learn too
20:19:50alehander92_but usually
20:19:55*Ekho- is now known as Ekho
20:20:04alehander92_you need to run some compile time code and maybe to make it produce the runtime code you actually need
20:20:10alehander92_when you do stuff like that
20:20:26alehander92_but it might be different in your case
20:21:25*ljoonal left #nim ("https://ljoonal.xyz?irc")
20:24:36*kenran quit (Ping timeout: 265 seconds)
20:24:36*wgetch joined #nim
20:26:06*narimiran quit (Ping timeout: 256 seconds)
20:27:10*PMunch quit (Quit: leaving)
20:33:31*nsf quit (Quit: WeeChat 2.8)
20:35:47*msmorgan quit (Ping timeout: 240 seconds)
20:37:16bolti[m]can you write your own pragmas?
20:37:28FromDiscord<Recruit_main707> yes :)
20:37:45FromDiscord<Recruit_main707> you can do really cool stuff
20:40:34*sacredfrog quit (Quit: ZNC 1.8.1 - https://znc.in)
20:41:26*xet7 joined #nim
20:42:08*sacredfrog joined #nim
21:01:43bolti[m]async pragma in what code it transforms?
21:02:38leorizethe async macro can be found in the asyncmacros module if that's what you're asking
21:04:34*vsantana quit (Quit: bye)
21:06:07FromDiscord<ikrima> is there a nim trick I can employ to make it "more homoiconic"?
21:06:49FromDiscord<ikrima> sent a code paste, see http://ix.io/2prg
21:07:11FromDiscord<ikrima> and i have a macro/func/whatev, that is `cppTypes`
21:07:25FromDiscord<ikrima> i want to read the data file and have it execute said functions
21:08:05FromDiscord<ikrima> (edit) 'and i have a macro/func/whatev, that is `cppTypes` ... ' => 'and i have a macro/func/whatev, that is `cppTypes`and takes `uid/fields` as params'
21:09:07leorizewhat does this macro does?
21:09:20leorizeyou might be able to make use of type section macros
21:09:36FromDiscord<ikrima> right now i just have dispatch tables of function pointers, but it doesn't allow it to be recursive (i.e. if i want to define fields to be a macro that expands)
21:09:49*aenesidemus quit (Ping timeout: 264 seconds)
21:10:03FromDiscord<ikrima> @leorize this macro expands out to different things depending on the context
21:10:26leorizewell an example of what it does would be nice
21:10:27FromDiscord<ikrima> - it expands out (using sourcecode filters) to generating a C++ struct
21:10:48FromDiscord<ikrima> - another is it generates a c++ UI::Render() function that outputs UI bindings/code
21:11:14leorizewhy do you have to use SCF?
21:11:40FromDiscord<ikrima> no reason other than the first thing i found
21:12:09FromDiscord<ikrima> (this is day 4 using nim, so you can assume "why did you use this?" => ans: "no good reason/what should i have done")
21:12:27*pietroppeter quit (Read error: Connection reset by peer)
21:12:57leorizeso what do you mean by generating a C++ struct? generating C++ code or generating Nim code that maps to a C++ struct?
21:13:22FromDiscord<ikrima> ah, larger context is i'm using nim to write codegen/parsing
21:13:44leorizesome example of input and output would be nice :P
21:14:05FromDiscord<ikrima> sure
21:14:06FromDiscord<ikrima> https://gist.github.com/ikrima/87f2bd1599c66bfc4aeed181a1981fc4
21:14:49FromGitter<iffy> Sometimes I want to not forget to do something before I release so I use this: `template TODO(msg:untyped) = when defined(release): {.fatal: msg.}`Does anything like that already exist in stdlib?
21:15:16leorize@iffy nope :P
21:15:21FromGitter<iffy> (I use it like: `TODO "Don't forget to remove the backdoor"`)
21:15:27leorizelol
21:15:56FromDiscord<ikrima> basically, i have a custom dsl that defines kernel operators and a task graph↵- i need to generate UI for said things↵- i need to generate glue code/and execution schedules depending on the dsl + data dependencies↵- end output is C/C++ code
21:16:14leorize@ikrima I think this can be done using Nim's `type` blocks
21:16:26FromDiscord<ikrima> - this was all in C++ until last week when i got fed up with templates and now evaluating nim vs. clojure
21:17:04FromDiscord<ikrima> @leorize can you give me an example (or a link i can read)?
21:17:11FromDiscord<Recruit_main707> use `{.exportc.}` so that it keeps the same name and not a weird one
21:17:15leorizeso you want this DSL to be done in Nim?
21:17:37FromDiscord<ikrima> yeah
21:17:39leorizelike you want this to be written in Nim and not YAML?
21:18:19FromDiscord<ikrima> i'm not too attached to how the specific shape of the dsl (it looks very yaml like just bc i initially made everything as nim compile time macro expansions)
21:18:32FromDiscord<ikrima> i do want all the dsl processing/codegen to be in nim
21:18:53FromDiscord<ikrima> and call said functions from my C++ app
21:18:55*nikita` quit (Quit: leaving)
21:19:01leorizeand how do you want the codegen to be? like generating C code embedded into the program?
21:21:23FromDiscord<ikrima> sent a code paste, see http://ix.io/2prm
21:21:25leorizewell lets first make this look like Nim, give me a few moment and I'll structure this into proper Nim :P
21:22:08FromDiscord<ikrima> `datacompiler::compile` is now in C++, but that would be the thing that calls nim↵- also ofcourse we can skip it writing to the file and directly pass memory objects, but that's details
21:24:20*aenesidemus joined #nim
21:25:37FromDiscord<ikrima> sent a long message, see http://ix.io/2prq
21:26:46FromDiscord<ikrima> but ofc, i don't know what i'm doing w.r.t Nim so open to changing anything/everything (fwiw, i'm liking Nim more and more)
21:26:56leorizeyour idea is a bit too barebones tbh
21:27:07leorizeyou seem to be exposing too many implementation details in your DSL
21:28:36leorizethis feels kinda like a node-based editor dsl :P
21:28:50FromDiscord<ikrima> that's exactly what it is 😛
21:29:24leorize@lqdev ^ this should be your field of expertise
21:29:59FromDiscord<ikrima> should also clarify, the "dsl" is an internal only thing, meant to help me write the internals of the execution engine faster/easier
21:30:27leorizeyou'll probably have a better idea once you see a node editor written in Nim
21:30:32leorizelemme remember the name
21:30:35leorize!repo nadio
21:30:36disbothttps://github.com/liquid600pgm/nadio -- 9nadio: 11Experimental digital audio workstation with a keyboard-focused user interface 15 7⭐ 0🍴
21:30:48FromDiscord<lqdev> leorize: what is it?
21:31:06FromDiscord<lqdev> ah
21:31:31FromDiscord<lqdev> well, this isn't exactly my field of expertise
21:31:44FromDiscord<ikrima> 🙏 🙏 🙏
21:31:54FromDiscord<ikrima> that is super helpful
21:31:55FromDiscord<lqdev> I still haven't implemented actual plugins or DSP or anything :P
21:32:17FromDiscord<lqdev> but the node editor works
21:32:28FromDiscord<lqdev> I don't use macros for it though
21:32:33FromDiscord<ikrima> haha, oh god, it's GPL'd 😛
21:32:49FromDiscord<ikrima> i can't look at that code :/
21:32:53FromDiscord<lqdev> don't want any corporate entity stealin' my software, you know
21:33:05FromDiscord<lqdev> is it ok if I give you explicit permission?
21:33:07leorizeyou certainly know more than I do to translate this weird mapping into sensible high-level stuff
21:33:31FromDiscord<ikrima> for sure (and obvi i care about it otherwise i'd just read it and not say anything)
21:33:39*natrys quit (Quit: natrys)
21:34:03FromDiscord<lqdev> idk about the details of the GPL but afaik it just doesn't permit literal copying of code
21:34:08FromDiscord<lqdev> but I'm not a lawyer
21:34:09FromDiscord<ikrima> @lqdev mmm, not sure if that works (i am working on a possibly commercial product)
21:34:17FromDiscord<lqdev> right.
21:34:33FromDiscord<ikrima> or rather, it might be productized later. i haven't decided yet (jusst being upfront)
21:34:57FromDiscord<lqdev> but just looking at code for inspiration wouldn't be a violation, no?
21:35:17FromDiscord<ikrima> ianal?
21:35:41FromDiscord<lqdev> same
21:35:42FromDiscord<ikrima> the guidance i always got was to stay away from it to be safe
21:36:00leorizeit'd work if you give people actual written consent with a ton of lawyer speak
21:36:26FromDiscord<lqdev> pretty sure that GPL viral thing only really matters if you use the code *literally*, as in a library or something
21:36:33leorizeand I'm sure that you can't do that so... maybe you can look at @ikrima problem and try to make sense of this?
21:36:51leorizeGPL apply to "derivatives" and the idea of "derivatives" is vague as hell
21:36:58*msmorgan joined #nim
21:37:23FromDiscord<lqdev> it's probably described somewhere within the license itself, but I don't really have time to read the whole thing now
21:37:29FromDiscord<lqdev> anyways, to the point.
21:38:01FromDiscord<lqdev> I get the idea of your app, what are you trying to make into a DSL?
21:38:11leorizea lot of this code reminds me of Qt's macro mess
21:38:40leorizeit appears to me that they are trying to design an interface to easily fabricate nodes
21:39:32FromDiscord<ikrima> @lqdev the "dsl" is for codegen/data transformation
21:39:39FromDiscord<lqdev> right
21:39:54FromDiscord<lqdev> so the DSL's job is to define the nodes and how they get transformed into C/C++ code?
21:40:05FromDiscord<ikrima> right
21:40:27FromDiscord<ikrima> and teh "trick" i use so i don't have to write a full blown parser is turn the "dsl keywords" into function bindings
21:40:43FromDiscord<ikrima> i bind different functions for different codegen
21:41:00FromDiscord<ikrima> ie, there's the `datatype` object
21:41:06FromDiscord<ikrima> (edit) 'object' => 'object/dsl keyword'
21:41:24FromDiscord<ikrima> i have a binding for UI generation, a binding for meta reflection generation, etc
21:41:58FromDiscord<ikrima> similarly, there's the `operatorNode` data type/keyword
21:42:16FromDiscord<ikrima> that has different functions that do different codegen, reflection, etc
21:42:21leorize[m]this is what I meant by saying that you're focusing too much on the implementation :P
21:42:45FromDiscord<ikrima> not sure what you mean by that still?
21:43:11FromDiscord<ikrima> the dsl's purpose is to help me implement?
21:43:17FromDiscord<lqdev> and you're basically trying to parse this entire DSL of yours with macros?
21:43:18FromDiscord<ikrima> none of this is for the user
21:43:26FromDiscord<ikrima> (edit) 'none' => '(none' | 'user' => 'user)'
21:43:55FromDiscord<ikrima> @lqdev yeah. and tbf, this came out of my clojure implementation and i really liked this idea
21:44:13leorizewell your DSL appears to be designed to cater to your implementation, not to describe an "idea" if that make sense
21:44:29leorizebut whatever works I guess :P
21:44:31FromDiscord<ikrima> but i acknowledge there's probably a better Nim way to achieve the same thing but i dont know
21:44:53*pietroppeter joined #nim
21:45:24FromDiscord<lqdev> alright, I *kind of* get the idea
21:45:25leorizewell I'll try to do a barebones translation to the type construct first
21:46:14FromDiscord<ikrima> (also appreciate the patience, not pushing back against suggestions btw)
21:46:46leorizewe were all in your shoe, don't worry :P
21:47:00leorizemaybe after seeing some more flexible construct you'll have some more idea
21:47:09FromDiscord<ikrima> 👍 definitely
21:47:30FromDiscord<lqdev> well I wouldn't exactly try to represent this with a DSL like this, it's too rigid imo
21:48:01*NimBot joined #nim
21:48:14FromDiscord<lqdev> I'd probably implement an abstract `NodeDesc` which contains some procs like `init` etc which are supposed to process the node for you
21:48:26FromDiscord<lqdev> maybe a `genCode` proc which actually generates the appropriate code
21:48:44FromDiscord<lqdev> and give each node kind its own module
21:49:15FromDiscord<lqdev> but maybe that's just my interpretation, I'm generally against using too many DSLs for things that are meant to be done programatically (like codegen)
21:49:42FromDiscord<lqdev> you can always define some helper procs that do common repetitive tasks
21:50:03FromDiscord<lqdev> and that would probably be more idiomatic
21:50:28FromDiscord<lqdev> but sticking with your idea of the DSL, I'd start by getting a grasp of the AST Nim produces
21:50:33FromDiscord<lqdev> using `macros.dumpTree`
21:51:32FromDiscord<lqdev> then work my way from here, deferring individual nodes to procs that are meant to process individual structures in my DSL
21:51:57FromDiscord<ikrima> so over the weekend, i implemented a version of that using the nim ast nodes/macro expansion/templates
21:52:30FromDiscord<ikrima> but at the end of it, i realized that was all compile time, so not helpful for parsing different data files at runtime
21:53:12FromDiscord<ikrima> is there a way to access the Nim parsing/ast nodes at runtime? i.e. i have a function that at runtime, takes a file, and generates the nim ast?
21:53:34leorizeif you import the compiler
21:54:20leorizehere's my rough translation of it: https://play.nim-lang.org/#ix=2prw
21:54:22FromDiscord<ikrima> and would this be considered going deep into crazytown territory? or is this infrequently done but doesn't raise yellow flags?
21:55:41leorize[m]yea this is kinda in crazy territory
21:56:52FromDiscord<ikrima> 👍 k, i think i have enough to research more and try different approaches
21:57:36FromDiscord<ikrima> thx again for the help @lqdev & @leorize
21:57:46leorizenp :)
21:59:03leorizein a way I think you're mixing too much runtime metadata into data structures, so maybe you'll want to define a clear boundary for them
21:59:20*abm quit (Quit: Leaving)
21:59:55leorizeas powerful as Nim is, we generally prefer solutions built using simple components rather than macros
22:00:43FromDiscord<lqdev> exactly
22:00:50FromDiscord<lqdev> that's where my idea with procs came from
22:02:03FromDiscord<ikrima> yeah, in hindsight, my clojure approach subconsciously biased my initial nim solution approach strategy
22:03:06FromDiscord<ikrima> and nim's metaprogramming being as powerful as it is didn't put up any immediate red flags
22:09:16*tane quit (Quit: Leaving)
22:17:33*chemist69 quit (Ping timeout: 272 seconds)
22:18:14*chemist69 joined #nim
22:18:42FromDiscord<SeanOMik> Its weird that nim has cyclic includes
22:19:52leorizewe do?
22:20:41FromDiscord<SeanOMik> Yeah
22:21:20FromDiscord<SeanOMik> If I have a.nim which imports b.nim which also imports a.nim
22:21:22FromDiscord<SeanOMik> I get an error
22:21:25FromDiscord<SeanOMik> Let me show it
22:21:51leorizeah we don't have them :P
22:21:56leorizeatm
22:21:57FromDiscord<SeanOMik> Wdym?
22:22:07leorizewe don't support cyclic imports atm
22:22:08FromDiscord<SeanOMik> Nim doesn't have cyclic includes atm?
22:22:14FromDiscord<SeanOMik> Oh okay
22:22:16*Vladar quit (Quit: Leaving)
22:22:31leorizethere's a "limited" version of it but it's not really good
22:22:48leorizein general you should avoid cyclic imports in Nim
22:23:11FromDiscord<SeanOMik> Wdym by limited?
22:23:19FromDiscord<SeanOMik> I just need to import a certain type from a `nim` file
22:23:38FromDiscord<SeanOMik> So if its limited in what you can import it should be fine for my use case
22:23:39leorizehttps://nim-lang.org/docs/manual.html#modules
22:23:44leorizelook at the example
22:24:21leorizenote that this only work one way
22:24:28shashlickhas anyone written nim code to compare two version strings and return the greater version
22:24:38leorizewdym greater?
22:25:08shashlick1.2.11 > 1.2.9
22:25:21shashlickbut also able to handle 1.2.1a
22:25:36leorizeI don't think anyone has written something like that
22:26:01leorize!eval echo "1.2.11" > "1.2.9"
22:26:04NimBotfalse
22:26:55FromDiscord<SeanOMik> Is there a way I could do something like forward declarations in C++ but for Nim?
22:27:23leorizehttps://nim-lang.org/docs/manual_experimental.html#package-level-objects
22:45:43FromDiscord<ikrima> another newb question, any pointers on how to "debug" compile times?↵I did something over the past week and now compiling "hello world" is 2 seconds everytime
22:45:46FromDiscord<SeanOMik> Leorize, does the object have to be in a seperate package?
22:46:15FromDiscord<SeanOMik> Because I'm doing this: ```↵type User = object```
22:46:31FromDiscord<SeanOMik> And in another `nim` file I try to use that `User` object which has field `id`
22:46:42FromDiscord<SeanOMik> But it says that its undeclared
22:47:13FromDiscord<SeanOMik> Even though the file thats trying to use the `User` class with field of `id` has that type defined inside of it
22:47:38*Tongir quit (Remote host closed the connection)
22:47:46FromDiscord<ikrima> (edit) 'another' => '~~another' | 'times?↵I' => 'times?~~↵~~I' | 'everytime' => 'everytime~~↵n/m, vscode plugin was passing "-f"'
22:47:59*Tongir joined #nim
22:56:04*bung joined #nim
22:58:43leorize@SeanOMik can you create a small example?
22:59:06FromDiscord<SeanOMik> Yeah, I could try
23:02:00FromDiscord<SeanOMik> Okay
23:02:08FromDiscord<SeanOMik> sent a code paste, see http://ix.io/2prR
23:02:28FromDiscord<SeanOMik> I didn't write that in an ide so it may have typos or something
23:02:55FromDiscord<SeanOMik> But where it says `user.id` is where it says something like `undeclared field: 'id'`
23:03:35leorizeshouldn't this getUser proc be in b.nim instead? :P
23:03:49leorizeanyhow, the problem here is that these two must be in the same nimble package
23:04:08FromDiscord<SeanOMik> The same `.nim` file?
23:04:24leorizethe "forward" declaration should become: PackageName.User
23:04:55FromDiscord<SeanOMik> Okay
23:05:00FromDiscord<SeanOMik> I'll keep that in mind for future
23:05:09FromDiscord<SeanOMik> But yeah, I'll just move the proc into b.nim instead
23:05:13FromDiscord<SeanOMik> That does make more since
23:05:17leorizenot the same .nim file, but the same nimble package :P
23:05:19FromDiscord<SeanOMik> sense*
23:05:39FromDiscord<SeanOMik> Yeah
23:05:41leorizeif you don't want to export the `id` field, just make a `proc id*(u: User): int`
23:06:16FromDiscord<SeanOMik> Well I actually do want to export the `id` field so I shouldn't have to
23:06:20FromDiscord<SeanOMik> Thanks for the help
23:13:53*Trustable quit (Remote host closed the connection)
23:26:57disruptekshashlick: plenty of code like that exists in nimph.
23:42:03FromDiscord<SeanOMik> How would I loop through a json array?
23:42:16Yardanicofor x in myjson["data"].elems:
23:42:31FromDiscord<SeanOMik> And `x` is `JsonBody`?
23:42:32Yardanicoactually want nvm
23:42:37Yardanicojust for x in myjson["data"]:
23:42:41Yardanicox will be JsonNode of course
23:42:45Yardanicomyjson is a JsonNode too
23:42:59FromDiscord<SeanOMik> Yeah I meant `JsonNode`
23:43:01FromDiscord<SeanOMik> Thanks
23:44:53*ftsf joined #nim
23:50:27*drdee quit (Quit: Leaving)
23:51:36FromDiscord<Technisha Circuit> Hey, i have a question for everyone. If i have a module and contains some functions (let's say `foo()` and `bar(this)`, in Nim i could do `foo().bar()` to pass `foo()` to `bar`, but how would i do this in Python after i use Nimpy?
23:51:56Yardanicoif you mean export from nimpy to python - you can't
23:52:01Yardanicoyou'll have to create Python classes and stuff
23:52:03YardanicoPython doesn't have UFCS
23:52:08*couven92 quit (Read error: Connection reset by peer)
23:52:25*couven92 joined #nim
23:52:37*couven92 quit (Read error: Connection reset by peer)
23:52:59*couven92 joined #nim
23:56:42skrylar[m]hoi
23:56:54FromDiscord<Technisha Circuit> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/722963007725895745
23:56:55FromDiscord<Technisha Circuit> Heya
23:57:13Yardanico@Technisha idk honestly, this is a nim channel :)
23:57:17Yardanicobut yeah something like that I guess
23:57:28*couven92 quit (Ping timeout: 256 seconds)
23:57:34Yardanicobut anyway I still wonder why are you trying to either use a JS Discord lib in nim, or nimpy, or something else, is pure nim that bad for you? :P
23:58:10*couven92 joined #nim
23:58:41FromDiscord<Technisha Circuit> Nah, just was thinking if i made a discord lib, i might aswell make it available for other languages