<< 24-09-2019 >>

00:06:43FromGitter<ShieldHero> if stdlib and other libraries can work with it without breaking it will be great
00:09:10*PrimHelios quit (Quit: Leaving)
00:09:26FromGitter<ShieldHero> i was checking old issues and it seems that there are people going over them, does anybody check on libraries to update them?
00:10:07Araqdepends on the library
00:11:26*navin joined #nim
00:11:55*ephja quit (Remote host closed the connection)
00:14:02FromGitter<mratsim> wrap your pointer in an object and use destructors
00:14:08FromGitter<mratsim> this way they are owned
00:15:24FromGitter<awr1> "it's only fair that I count as 3 persons"
00:15:29FromGitter<awr1> sounds biblical
00:15:43*navin quit (Ping timeout: 245 seconds)
00:16:19FromGitter<mratsim> https://devblogs.microsoft.com/dotnet/announcing-net-core-3-0/ ---> High performance JSON APIs have been added, for reader/writer, object model and serialization scenarios. These APIs were built from scratch on top of Span<T> ⏎ ⏎ So like C++, .NET adopted Span<T> for openarray/slice/view/memrange/buffer
00:16:57FromGitter<awr1> nim needs a better notion of "views"
00:17:06FromGitter<awr1> i saw an RFC a while back for something like this though
00:17:31FromGitter<mratsim> only one? you're lucky
00:17:47FromGitter<awr1> for the longest time i was confused by what a "slice" meant in nim because i was thinking of slices in D
00:18:50FromGitter<mratsim> btw will you turn your PR into a library, the one on CPU info?
00:19:36FromGitter<awr1> uhh probably
00:20:43FromGitter<awr1> i still think it's stdlib worthy but i'll take the L
00:23:37*navin joined #nim
00:23:39FromGitter<mratsim> well I agree with you but well ¯\_(ツ)_/¯
00:23:55FromGitter<mratsim> if you publish it I'll switch laser to it
00:24:51FromGitter<mratsim> Facebook's cpuinfo works, but it's C99 based, and when I compile to C++ to compare with C++ code some compiler (on Mac for example) just give up
00:25:42FromGitter<mratsim> and for now I don't need cache info (as long as I don't find a way to avoid using hyperthreading, which completely messes up with CPU cache optimizations)
00:26:50FromGitter<awr1> there i guess is a general problem relating to branching on specific cpu features w/ GCC and Clang
00:27:04FromGitter<awr1> if you use intrinsics as opposed to
00:27:08FromGitter<awr1> hard-coded asm
00:27:48*navin quit (Ping timeout: 245 seconds)
00:28:11FromGitter<awr1> in that to be able to have the intrinsics you have to enable autovectorization on the whole thing for that instruction set
00:28:47FromGitter<awr1> defeating the whole point of runtime branching for certain ISA exts
00:29:26FromGitter<awr1> this problem does not exist on MSVC, you can use intrinsics guarded behind a branch and you should be fine
00:35:25*Hideki_ joined #nim
00:38:17*laaron joined #nim
00:38:19FromGitter<mratsim> I don't
00:38:38FromGitter<mratsim> I tried, I can tag function with the instruction set I require
00:38:52FromGitter<mratsim> or use per file compilation option
00:39:56FromGitter<mratsim> For my current "hardcoded" stuff like exponential or matrix multiplication I use per-file -mssse41 or -mavx or -mfma
00:40:21FromGitter<mratsim> see here: https://github.com/numforge/laser/blob/master/nim.cfg#L24-L35
00:41:18FromGitter<mratsim> for the compiler I'm writing, I will use function attributes: https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
00:41:25FromGitter<mratsim> I've already confirmed that they work
00:41:52FromGitter<mratsim> the only issue is that they interfere with N_NIMCALL, static N_INLINE and N_CLOSURE
00:44:16*navin joined #nim
00:47:51FromGitter<awr1> there is this but meh
00:47:53FromGitter<awr1> https://lwn.net/Articles/691932/
00:47:59FromGitter<awr1> it's not totally standardized
00:48:09FromGitter<awr1> i mean it won't be but
00:48:28FromGitter<awr1> iirc it doesn't exist on clang and likely won't exist on MSVCC
00:48:38*navin quit (Ping timeout: 245 seconds)
00:48:57FromGitter<mratsim> MSVC doesn't complain when I use AVX2 simd
00:48:59FromGitter<kayabaNerve> I just tried updating my program to 1.0. The unit tests passed just fine, but the Python integration tests caused it to segfault om half the tests :( I guess I'm doing something to piss off the GC.
00:49:59FromGitter<mratsim> and the target("avx") is supported in Clang: http://clang-developers.42468.n3.nabble.com/attribute-target-quot-XXX-quot-semantic-in-clang-and-gcc-td4048975.html
00:50:00FromGitter<awr1> yeah you can use intrisnics anywhere in MSVC
00:50:14FromGitter<awr1> if clang supports it then i am behind on the times
00:50:16FromGitter<mratsim> I don't need the multi-versioning part
00:50:34FromGitter<mratsim> I'll do multi-versioning manually
00:52:05FromGitter<mratsim> For example for exponential, there is no gather instruction below AVX2 so I have 2 different implementations
00:52:26FromGitter<mratsim> and multi-versioning requires those to have the same C name. Nim will refuse that
00:55:38*Hideki_ quit (Ping timeout: 246 seconds)
00:56:41*owl_000 joined #nim
01:00:21TangerConngrats on 1.0 all!
01:01:47*thomasross quit (Remote host closed the connection)
01:04:59*navin joined #nim
01:05:30FromGitter<awr1> the underlying impl behind the multiversioning is a little weird
01:09:03*navin quit (Ping timeout: 245 seconds)
01:25:42*navin joined #nim
01:29:03*krux02_ quit (Remote host closed the connection)
01:29:40*NimBot joined #nim
01:29:44FromDiscord<RaycatWhoDat> Huh. Am I bridged from here to Gitter?
01:29:53*navin quit (Ping timeout: 245 seconds)
01:30:38FromDiscord<RaycatWhoDat> Neat.
01:30:44nc-x[m]Congrats on the release!!
01:32:13FromDiscord<DeltaPHC> Technically you're being bridged from Discord to IRC to Gitter, but yes
01:32:28FromDiscord<RaycatWhoDat> Yee-haw.
01:38:13owl_000nim 1.0.0 :O https://i.ibb.co/4Yqv05z/image823.png
01:43:18FromGitter<dryajov> Congrats on v1!!
01:46:17*navin joined #nim
01:50:43*navin quit (Ping timeout: 245 seconds)
01:51:07rockcavera:D
01:51:10rockcaverav1
01:57:08*laaron quit (Remote host closed the connection)
01:58:53*shota joined #nim
01:59:34shota:exit
01:59:37*shota quit (Client Quit)
02:00:16*shota joined #nim
02:06:59*navin joined #nim
02:09:05*laaron joined #nim
02:09:06*owl_000 quit (Ping timeout: 265 seconds)
02:11:28*navin quit (Ping timeout: 264 seconds)
02:19:56*lritter quit (Ping timeout: 268 seconds)
02:21:39sealmovewas newException previously newEOS?
02:24:52*theelous3 quit (Ping timeout: 268 seconds)
02:24:59leorizeno
02:25:16leorizenewEOS is for OSError
02:34:01FromGitter<kayabaNerve> I thought the convention on those was newOSError
02:34:09FromGitter<kayabaNerve> (or newValueError, or new...)
02:39:27sealmoveI couldn't find newEOS in docs
02:40:57leorize@kayabaNerve: well the convention was different when Nim started
02:41:23leorizesealmove: you'll find it in the manual because no one updated that example :P
02:42:29sealmovethat's where I saw it :P
02:42:52sealmovebtw leorize
02:42:56sealmovea programming question
02:43:19sealmovedoes it make sense to create custom fatal exceptions (object of Defect)?
02:44:14leorizewell yes, but then your program would just quit() once you raise that exception
02:45:00leorizeiirc Araq said that Defects should not be raised at all
02:46:02sealmoveoh, hmm
02:46:13leorizesee https://github.com/nim-lang/Nim/issues/11776
02:46:59sealmovebut a message could be useful.. just echo it instead of raising an exception?
02:47:28leorizedepends on what you're doing
02:47:36leorizewhy would you need an exception based on Defect?
02:49:20sealmovewell, for that message
02:51:24leorizecan you further elaborate your use case?
02:54:09sealmovetruth is, I haven't used exceptions much (in any language), so in my use-case I don't even know if the exception should be catchable or not. Have to make the more generic version of parseInt, which takes the base as an extra argument. For example parseInt(str, 8). This time I want to make bases that are not 2, 8, 10 or 16 invalid.
02:54:54leorizeValueError is your friend
02:55:55leorizeso first rule of exceptions: don't make up your own unless you need more data to be passed down
02:55:56sealmovehttps://termbin.com/z1hh
02:56:16leorizeyep
02:56:25sealmove"need more data to be passed down"? can you elaborate please?
02:57:14leorizeie. you need an error code field in the exception so you can pass them back to the caller
02:57:46sealmoveoh
02:59:29sealmovei always thought that in big programs you should make your own exceptions just to group types of errors by names
03:00:28leorizethat's an use case also
03:01:41leorizeI tend to avoid using exceptions like that though
03:02:17sealmoveisn't discrimination in catch clauses more difficult if you don't?
03:03:45leorizesure, but you have to think of it like this: what's the point of making it more 'catchable' specifically?
03:04:04leorizeit's still the same base error, just with a different name
03:04:41leorizepersonally I never found a case where I actually need a custom type that's not based of `Errors`
03:05:11leorizethe default types are informative enough as is
03:05:21leorizealso it makes composing much easier
03:07:04sealmoveso you are saying, even if errors are coming from very specific source, still the way you can possibly handle them is generic enough so that the types in `system` module suffice?
03:08:54leorizeyea
03:09:14leorizeit's mainly up to your use case
03:09:27leorizebut you shouldn't add more exception types for the sake of it
03:09:36leorizeadd when you really need to have it
03:09:48sealmovei see, this advice helps a lot, thanks
03:14:02leorizenp
03:14:20leorizeI was as confused as you when I first started to use exceptions
03:15:24leorizetook me a lot of code reading and a few projects using them to have a better grip on how exceptions should be used
03:16:11sealmoveI was Rust-club so got catch up with option type (which is overly inflexible)
03:18:31leorizeyea, I got caught up in the whole "exceptions are evil" when I started programming also
03:19:40sealmoveThe only evil is in performance I think
03:19:48leorizeNim's {.raises.} system made me seriously considered the language
03:20:02leorizecompile to c++ and you won't see a thing unless you throw :P
03:20:04sealmoveoh yeah, that's very handy
03:20:21sealmovebtw, what happened to Araq's idea of quirky exceptions?
03:20:34leorizemore important stuff gets in the way
03:20:35sealmoveand was his motivation speed?
03:22:15leorizehis motivation was -fno-exception iirc
03:22:49sealmoveso ultimately speed?
03:23:09sealmoveor is there another benefic when using this switch?
03:23:23leorizenah, it was made to find a way around the problems of exceptions: https://nim-lang.org/araq/quirky_exceptions.html
03:25:26*laaron- joined #nim
03:25:39*laaron quit (Remote host closed the connection)
03:28:34leorizethe model of quirky exceptions is kinda like `errno` but better
03:29:45sealmoveyes, it seems very interesting
03:33:23sealmovehmm, so the most important advantage is eliminating hidden control flow I guess
03:34:32leorizeyea, and from what I can see, this will really eliminate hidden control flow
03:35:11leorizeunlike some Option-based language that decided that they still need exceptions and didn't solve anything
03:43:53sealmoveSometimes it's convenient to *not* seperate the Error from the actual type and then `option` and `either` is nice but in general they are useful for only a small subset of what exceptions can do.
03:47:18leorizeyea, I like them, but they are no where near an exception replacement
03:48:04FromGitter<zacharycarter> congrats on v1
03:53:03sealmoveHmmmm, "code continues to run" philosophy. Intuitively it feels wrong, can't lie.
03:55:53sealmovenobody will write code like this: https://termbin.com/cpsx
03:56:05FromDiscord<slymilano> Dudes!!! Saw the post in HN about 1.0 - holy shit congrats! Bought the Manning book tonight and plan on diving in now that the language has hit 1.0
03:56:20FromDiscord<slymilano> Very excited to learn a language that can spit out simple binaries and not be Go.
03:57:25*dashed quit (Quit: Connection closed for inactivity)
04:00:25leorizewelcome :)
04:01:05*chemist69 quit (Ping timeout: 276 seconds)
04:01:44FromGitter<zacharycarter> I'm stupid about licensing but question - if I use a third party lib that is BSD2 licensed
04:01:51FromGitter<zacharycarter> so I must include a copy of their license if I use their software
04:01:58FromGitter<zacharycarter> does that mean I pretty much also must use BSD2?
04:02:21*chemist69 joined #nim
04:02:26leorizeno
04:02:38leorizeyou only have to include the license text and the copyright
04:02:58leorizeit doesn't mean that you license your software torwards it
04:03:05FromGitter<zacharycarter> okay thanks
04:03:19FromGitter<YiyuanGH> Congratulations to the whole Nim team. Everything looks better.
04:11:13*dddddd quit (Remote host closed the connection)
04:23:44*rockcavera quit (Remote host closed the connection)
04:25:57*shota quit (Remote host closed the connection)
04:28:26*shota joined #nim
04:38:07*snooptek joined #nim
04:49:58FromDiscord<djazz> Yay, the discord bridge is back!
04:50:34*nsf joined #nim
04:53:00*Hideki_ joined #nim
04:53:46*mal`` quit (Quit: Leaving)
04:57:47*Hideki_ quit (Ping timeout: 265 seconds)
05:02:07*mal`` joined #nim
05:02:41*sealmove quit (Quit: WeeChat 2.5)
05:13:36FromDiscord<has1> hi
05:13:43FromDiscord<has1> i am having an issue with nim and vscode
05:14:19FromDiscord<has1> the vscode nim extension tells me that it could not find the nim binary in my path
05:15:06FromDiscord<has1> ```
05:15:06FromDiscord<has1> [user@pc nimtest]$ echo $PATH
05:15:06FromDiscord<has1> /home/user/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin:/usr/local/go/bin:/home/user/go/bin:/home/user/.nimble/bin
05:15:06FromDiscord<has1> ```
05:15:06FromDiscord<has1> but the path shows me that it is there at the end
05:15:48FromDiscord<has1> also,
05:15:48FromDiscord<has1> ```nim -version```
05:15:49FromDiscord<has1> gives me this output
05:15:49FromDiscord<has1> ```
05:15:49FromDiscord<has1> Nim Compiler Version 1.0.0 [Linux: amd64]
05:15:49FromDiscord<has1> Compiled at 2019-09-23
05:15:49FromDiscord<has1> Copyright (c) 2006-2019 by Andreas Rumpf
05:15:51FromDiscord<has1>
05:15:52FromDiscord<has1> git hash: f7a8fc46c0012033917582eb740dc0343c093e35
05:15:54FromDiscord<has1> active boot switches: -d:release
05:15:55FromDiscord<has1> ```
05:15:57FromDiscord<has1> So it is clearly there
05:16:40FromDiscord<has1> And finally,```
05:16:40FromDiscord<has1> [user@pc nimtest]$ which nim
05:16:41FromDiscord<has1> ```
05:16:41FromDiscord<has1>
05:16:41FromDiscord<has1> ```
05:16:41FromDiscord<has1> /home/user/.nimble/bin/nim
05:16:42FromDiscord<has1> ```
05:17:51YardanicoPlease don't send big outputs, it doesn't look good in IRC :)
05:18:22FromDiscord<has1> are you talking to me?
05:19:11YardanicoYeah :) The issue might be that VSCode read PATH variable not from the file you've set it in, but from a different one
05:19:31FromDiscord<has1> i did a restart already
05:19:37FromDiscord<has1> i also sourced my .bashrc file
05:19:45FromDiscord<has1> what can i do?
05:19:45YardanicoOne of the ways is to try to add Nim to path in /etc/profile or /etc/environment
05:21:31FromDiscord<has1> that sounds like a nim vscode extension bug, doesn't it?
05:22:29YardanicoNot really, it just uses whatever PATH variable is provided for vscode
05:24:51FromDiscord<has1> how is that not a bug? If the nim extension cant find the nim binary in its default install location
05:27:54FromGitter<xmonader> I went to bed early and I woke up to Nim 1.0 :D :D
05:27:56FromDiscord<DeltaPHC> What happens if you open VSCode from that shell?
05:28:12*narimiran joined #nim
05:30:09FromDiscord<has1> @DeltaPHC could you be more specific with what you mean
05:30:39FromDiscord<has1> nim is available everywhere, nim -version works, i can compile, i can run
05:30:46FromDiscord<has1> but vscode tells me its not in my path
05:30:51FromDiscord<DeltaPHC> As in, use that shell to launch vscode
05:31:36FromDiscord<has1> which shell? Do you mean open the terminal, run nim -version, and then run ```code .``` to open vscode?
05:31:52FromDiscord<DeltaPHC> Yes
05:32:00FromDiscord<has1> yes i am doing that
05:32:05FromDiscord<has1> still doesnt work
05:32:51FromDiscord<has1> like i said, nim is available, in both the os terminal and in the vscode terminal, i can also compile and run code
05:33:03FromDiscord<has1> but the extension tells me i dont have nim in my path
05:38:37FromDiscord<has1> you guys should probably figure this out, that seems kind of important for adoption.
05:38:42YardanicoWell, you can create an issue in Nim extension repo about it not trying default locations of Nim, but in your case for some reason PATH still doesn't get populated in Nim extension. That probably may be a VSCode issue
05:39:12YardanicoAnd VSCode with Nim always worked fine for me when I changed path in /etc/profile
05:39:27Yardanico(after a reboot that is)
05:39:36narimiran@has1 plenty of people use Nim in VSCode, using that extension. if there was a general problem, we would know about it
05:39:36FromDiscord<has1> i did this in
05:39:48FromDiscord<has1> ~/.profile and
05:39:48FromDiscord<has1> ~/.bashrc
05:39:55YardanicoAnd if Nim works in VSCode shell it doesn't mean that VSCode itself gets Nim in PATH
05:40:13FromDiscord<has1> This works with Go btw
05:40:17FromDiscord<has1> which i also added to my path
05:40:23FromDiscord<has1> and the tools work with vscode
05:40:31YardanicoNo, I've meant /etc/profile, VSCode didn't get path when can I changed in .profile
05:41:29FromDiscord<DeltaPHC> That's kinda why I suggested running from the terminal, because then it would inherit the terminal environment
05:41:45FromDiscord<has1> i did.
05:41:56FromDiscord<DeltaPHC> I'm not sure why it's not working though
05:42:29narimiran@has1 do what Yardanico suggest. now when he said it, i remember that solved my vscode problem back when i was using it
05:43:15narimiranand i think the recommended way is to make a small script in `/etc/profile.d`
05:45:12FromDiscord<has1> So it actually seems like doing this in
05:45:19FromDiscord<has1> /etc/profile seems to work
05:45:36FromDiscord<has1> but, /etc/profile requires sudo rights
05:45:52FromDiscord<has1> also, the nim installer tells me during the installation
05:45:52FromDiscord<has1> ```
05:45:53FromDiscord<has1> choosenim-init: ChooseNim installed in /home/user/.nimble/bin
05:45:53FromDiscord<has1> choosenim-init: You must now ensure that the Nimble bin dir is in your PATH.
05:45:53FromDiscord<has1> choosenim-init: Place the following line in the ~/.profile or ~/.bashrc file.
05:45:55FromDiscord<has1> choosenim-init: export PATH=/home/user/.nimble/bin:$PATH
05:45:56FromDiscord<has1> ```
05:46:02YardanicoWell I know, but I didn't find any other way so far
05:46:18FromDiscord<has1> this still seems like a pretty huge bug
05:46:23FromDiscord<has1> that it cant read your path
05:46:36narimiran@has1 and that is enough to do for other editors. it seems like vscode bug, doesn't it?
05:46:36YardanicoBut Nim extension doesn't do anything with PATH
05:47:00YardanicoIt just tries to launch nimsuggest command
05:47:03FromDiscord<has1> How can it be a vscode bug, when i can use Go just fine (for example)
05:47:09FromDiscord<has1> i also have to add that to my path
05:47:19narimiranhow can it be a nim bug, when i can use vim just fine (for example)
05:47:21FromDiscord<has1> and the extension can find the binaries in my path
05:47:40FromDiscord<has1> because vim probably searches inside the path
05:47:43FromDiscord<has1> for the nim binary
05:47:48FromDiscord<has1> and the nim extension doesnt
05:48:09FromDiscord<DeltaPHC> I have the extension working on Windows. Not helpful here, but it might narrow it down
05:48:24FromDiscord<has1> i am on manjaro linux if that helps
05:48:39YardanicoWell, on Windows you have only one place to set global PATH in :)
05:49:39narimiran@has1 please report it at https://github.com/pragmagic/vscode-nim/issues
05:49:53FromDiscord<has1> i am no expert on this but it seems silly, why would it read from /etc/profile directly?
05:50:03FromDiscord<has1> why not read the env variable $PATH
05:50:36leorize@has1: can you try running nimsuggest -v in vscode terminal and your normal terminal?
05:51:35FromDiscord<has1> sure, same output
05:51:39YardanicoVSCode terminal just launches your default shell
05:51:39FromDiscord<has1> ```
05:51:39FromDiscord<has1> Nim Compiler Version 1.0.0 [Linux: amd64]
05:51:39FromDiscord<has1> Compiled at 2019-09-24
05:51:40FromDiscord<has1> Copyright (c) 2006-2019 by Andreas Rumpf
05:51:40FromDiscord<has1>
05:51:40FromDiscord<has1> active boot switches: -d:release -d:danger --gc:markAndSweep
05:51:40FromDiscord<has1> ```
05:51:58YardanicoIt doesn't really use VSCode's own PATH
05:52:03leorizeso nimsuggest is in vscode PATH
05:52:20leorizewell that shell has to inherit the PATH from somewhere
05:52:22FromDiscord<has1> it works now though, because i added it to /etc/profile
05:52:34FromDiscord<has1> but it didnt work before
05:52:56FromDiscord<has1> running it in the vsocde terminal doesnt make sense
05:53:04FromDiscord<has1> because it clearly is there and running just fine
05:53:14FromDiscord<has1> to me it sounds like the nim extension is doing its own thing
05:53:21FromDiscord<has1> reading the path from /etc/profile or something
05:53:37FromDiscord<has1> and then trying to find nim from there or something
05:54:04leorizeI've looked at that extension
05:54:07leorizeit does no such thing
05:54:12nc-x[m]not sure but IIRC the nim vscode plugin allows to set the nim path in the settings. you can try doing that.
05:54:20leorize(since you need it to run on windows as well)
05:54:44FromDiscord<has1> maybe look at the go extension and how they are doing it?
05:54:48FromDiscord<has1> It works fine with go
05:54:51FromDiscord<has1> on both windows and linux
05:54:54FromDiscord<has1> out of the box
05:55:44nc-x[m]well it works fine for every other user here
05:55:52FromDiscord<has1> as it stands, it doesn't work out of the box on linux (manjaro), so maybe you should update the installation message and tell people to set the path in /etc/profile or try and fix this extension bug
05:55:56leorizeyou should open a bug for that extension
05:56:02nc-x[m]so it is something related to your set-up that is causing the issue
05:56:17YardanicoWell to be fair I had the same issue on Arch
05:56:19leorizehttps://github.com/pragmagic/vscode-nim/issues
05:56:28YardanicoBut not on Fedora/OpenMandriva
05:56:49YardanicoOn these distros setting. ~/.profile was enough
05:58:15nc-x[m]i didn't have the issue on pop, the last time i tried. but then i don't use choosenim and install from devel, and then googled how to add something to path on linux.
05:58:16leorizeis that plugin still being maintained though?
06:00:09leorize@has1, Yardanico: looks like the choosenim problem is recently fixed: https://github.com/pragmagic/vscode-nim/commit/b76f8774c3bd9e71b5598691e10b25e9f29320e2
06:00:33leorizenow they just need someone to release a newer version of vscode-nim with it
06:01:16*solitudesf joined #nim
06:01:38FromDiscord<has1> this sounds really nice, but it doesn't solve the core issue though, does it?
06:01:52FromDiscord<has1> it should already work with
06:01:52FromDiscord<has1> ```
06:01:52FromDiscord<has1> process.env['PATH']
06:01:52FromDiscord<has1> ```
06:02:18FromDiscord<has1> because i put the directory in my path
06:02:25leorizeidk how vscode works in general
06:02:47leorizethey might have some voodoo magic somewhere that breaks things
06:03:00*ng0 joined #nim
06:05:10FromDiscord<has1> nim sounds so cool
06:05:16FromDiscord<has1> but then also so weird
06:05:32FromDiscord<has1> it just has magic like
06:05:33FromDiscord<has1> ```
06:05:33FromDiscord<has1> let body = %*{
06:05:33FromDiscord<has1> "data": "some text"
06:05:33FromDiscord<has1> }
06:05:33FromDiscord<has1> let response = client.request("http://some.api", httpMethod = HttpPost, body = $body)
06:05:33FromDiscord<has1> ```
06:05:35FromDiscord<has1> how do i even learn all this magic
06:06:03leorize[m]see json module for that %* operator
06:06:12YardanicoIt's not magic, it's just metaprogramming
06:06:13FromDiscord<has1> what does the %* even do? and why do i suddenly pass my variable as $body instead of body???
06:06:25leorize[m]$ is an operator that convert things to string
06:06:43alexander92it's documented in the docs
06:06:49Yardanico@has I suggest you read Nim tutorials and the manual :)
06:06:50FromDiscord<has1> its pretty magical
06:06:53alexander92but overally, you should start with the manual
06:07:11leorize[m]it will stop being magical once you start reading :P
06:07:16narimiran@has1 https://nim-lang.org/learn.html
06:07:18FromDiscord<has1> ```
06:07:18alexander92it sounds strange at first
06:07:19FromDiscord<has1> let body = json.From{
06:07:19FromDiscord<has1> "data": "some text"
06:07:19FromDiscord<has1> }
06:07:19FromDiscord<has1> let response = client.request("http://some.api", httpMethod = HttpPost, body = string(body))
06:07:19FromDiscord<has1> ```
06:07:22FromDiscord<has1> what would be wrong with that?
06:07:24leorize[m]trust me, we have all that and people still ask for more magic
06:07:33narimiranand please stop pasting multiline stuff here
06:07:36alexander92but it's invoking operators similarly to how it invokes functions
06:07:50FromDiscord<has1> its a tiny snippet
06:08:00leorize[m]@has1 please refrain from posting code blocks on discord
06:08:14leorize[m]https://irclogs.nim-lang.org/24-09-2019.html#06:07:19
06:08:21leorize[m]^ this is what we see on a good day
06:08:30FromDiscord<has1> i mean this is a coding discord. if i cant even post a 2 line
06:08:32leorize[m]on a bad day the discord bridge lags behind
06:08:35FromDiscord<has1> then what is the point
06:08:39FromDiscord<has1> maybe you shouldnt use IRC then
06:08:40alexander92has1 : you are free to alias %* to something like genJson
06:08:55FromDiscord<has1> if it cant handle a simple 2 line text
06:09:13livcdso do we have an influx of hundreds of thousands of new users ?
06:09:33leorizeirc is a first class citizen ;)
06:09:38alexander92the reasons we do use an operator is that for very common operations, it makes sense to have a shortcut
06:09:48YardanicoWell IRC can handle everything, there's a reason Twitch uses IRC for their chat.
06:09:56YardanicoIt's just that it doesn't look good in irc
06:10:06alexander92but this doesnt happen very often ($ for strings, % for json.. mostly that, there are sometimes other exceptions)
06:10:33FromDiscord<has1> i mean its literally 2 lines that i was asking about
06:10:37FromDiscord<has1> so i was posting the snippet
06:10:40alexander92i'd argue 2-3 lines are fine
06:10:41livcdbtw Araq in his blod sounded kinda sad
06:10:41alexander92honestly
06:10:45livcdor maybe nostalgic
06:10:48livcdor is it just me ?
06:10:52FromDiscord<has1> I can understand that it is annoying if people post entire programs on here
06:10:56alexander92but any more than that just doesnt look well
06:11:27Yardanicolivcd: maybe he wanted Nim to always be 0.x :)
06:11:36YardanicoWe'll never know the truth
06:11:40leorizeit's just that discord has the tendency to lag behind irc at times
06:11:47alexander92probably he still wanted to have even more stuff inside
06:12:01leorizeso we end up with lines posted with significant gaps
06:12:05alexander92but you have to do the 1.0 one day
06:12:27leorizesomeone should fix that irc bridge though
06:12:27Yardanicoleorize: I hope I'll manage to write a good enough discord IRC bridge for Nim with auto pasting to ix.io
06:12:38alexander92another option is to autolink the code snippet
06:12:39YardanicoRight now it uses matterbridge
06:12:43alexander92similarly to the gitter bridge
06:12:44leorizegitter and matrix can shorten things into code snippets
06:12:50leorize*link to snippets
06:13:08FromDiscord<has1> again, you could look at go here
06:13:09alexander92but i agree that it's useful to write inline code
06:13:19FromDiscord<has1> what they do is take a multi line code block
06:13:25FromDiscord<has1> and paste it into the goplayground
06:13:31FromDiscord<has1> and then link that
06:13:40leorizeyea, we could improve on that
06:13:42alexander92yeah, that's a good option as well, but often
06:13:51alexander92snippets are not self-sufficient to run
06:13:57alexander92they can be pseudo-code or something else
06:14:00leorizethe bridge we are using for discord is kinda bad
06:14:06Yardanicoleorize: yes :)
06:14:06alexander92but i agree that it still makes sense to do it
06:14:27FromDiscord<has1> but honestly, you`ll just have to deal with people posting 3-4 lines of code.. this is a discord server about programming after all (just my opinion)
06:14:55alexander92a bigger problem imo is
06:14:56Yardanico@has1 it's mostly an issue of the Discord-IRC bridge and can be solved
06:15:03leorizeyea, it's just that discord has been banned from here for quite sometime :P
06:15:08alexander92that changing a message on discord usually resends it
06:15:11leorizeso people didn't look at it
06:15:18planetis[m]bravo for the new release! thanks devs!
06:15:21alexander92which is also not nice, but not sure how to fix that one
06:15:33leorizejust don't repost things
06:15:35alexander92maybe we can generate a diff from the bridge with `*`
06:15:38leorizethat's how the gitter bridge does
06:15:48alexander92but on the other hand the `edit` is useful info
06:16:05alexander92e.g. if they change a letter we can detect the part of the sentence and resend only it with *
06:16:33leorizetoo bad you can't easily link to a discord discussion without having to login
06:16:40alexander92ugh yeah
06:16:51leorizethat ability of gitter really simplify things for the bridge
06:20:47leorize@has1: I take it that you're from Go. Things are done in radically different ways here. I hope that you spend sometime using Nim to understand why we do things like this.
06:21:51leorize(regarding "strange" operators and not forced module qualification)
06:22:55FromDiscord<Shield> Nim isn't just a version
06:23:04FromDiscord<Shield> it's the commits we made along the way xD
06:23:29livcd has1: any non trivial Go with imports does not work well with the playground
06:23:35Zevvhangover anyone?
06:23:47livcdhas1: all the bridges serve one purpose and that is not to force people to a single ecosystem.
06:24:28livcdIf you prefer irc you connect via irc. If you like discord you go to discord. But it's impossible to supports all the features for all these different platforms
06:24:40leorizeI think the criticism are targeted torward our terrible discord bridge :P
06:27:00*PMunch joined #nim
06:32:39PMunchThe release yesterday seems to have gone well :)
06:33:11PMunchAnd the topic is still on the front-page of HN for me, so I guess it was well timed as well :P
06:33:11leorizenarimiran: when will we have the playground on the navbar of nim-lang.org? :P
06:38:28*ng0_ joined #nim
06:38:52*leorize quit (Ping timeout: 260 seconds)
06:38:59*leorize_ joined #nim
06:40:12narimiranleorize[m]: who knows, maybe today :)
06:40:27FromDiscord<Shield> is async not available for newruntime?
06:40:37FromDiscord<Shield> i'm getting "asyncmacro.nim(311, 33) Error: '=' is not available for type <owned Future[system.void]>; requires a copy because it's not the last read of ':envAlt.retFuture2'; routine: loop"
06:41:00leorize_yea, it's not available atm
06:41:40*ng0 quit (Ping timeout: 260 seconds)
06:41:48FromDiscord<Shield> well damn, i was running some old test about async and memory usage
06:41:50*ng0_ quit (Client Quit)
06:42:04*ng0 joined #nim
06:43:59lqdev[m]I didn't follow the news closely, is macros.quote not available in 1.0?
06:45:29leorize_it's still there
06:45:32PMunchlqdev[m], it should be
06:45:32*leorize_ is now known as leorize
06:45:56lqdev[m]right, but I heard it's gonna get deprecated?
06:46:05FromDiscord<Shield> my nim file server and discord bot will have to be delayed even more...
06:46:27PMunchlqdev[m], where did you hear that?
06:46:51leorizeit has its share of issues, but it's not going anywhere soon
06:47:07leorize@Shield: you'll be fine with the discord bot I think
06:47:38lqdev[m]I heard someone (can't recall who) was saying that quote do is broken in devel, then someone else (also can't recall who) said they made work to start removing quote do
06:47:52lqdev[m]I don't want to search the logs rn, I don't have much time on me
06:48:50leorize@Shield: also boehm gc should be able to free memory properly
06:49:03FromGitter<zacharycarter> clyybber: you around by any chance?
06:49:03leorizeand we can always wait for the AraqGC
06:49:34FromDiscord<Shield> I see, I never tested boehm
06:50:18FromDiscord<has1> @yardanico how is %*{do:"text"} not magical?
06:50:23FromDiscord<Shield> i kinda want the lowest memory usage possible since i'm running it on my only machine
06:50:30FromDiscord<has1> I mean wherecis it coming from?
06:50:49FromDiscord<has1> I mean where is it coming from?
06:51:16leorizeit's from the `json` module
06:51:23FromDiscord<has1> Is this like a build in function? But instead of a function is a macro?
06:51:37YardanicoIt's not a built in function
06:51:45leorizeand if you're using vscode-nim, hovering on the symbol will give you the source module
06:51:46YardanicoYou can create a similar macro in your own code
06:52:30YardanicoMacros are procedures which are run at compile time and operate on an AST of the code
06:52:40YardanicoThey're very powerful
06:52:56FromDiscord<has1> So importing something seems to import it into the current namespace?
06:53:08FromDiscord<has1> I don't need to prefix it with json.function
06:53:09leorizeyes
06:53:11YardanicoYes, by default the behaviour is like this
06:53:18FromDiscord<has1> I can use function directly
06:53:38FromDiscord<has1> Isn't that pretty unfortunate?
06:53:43leorizenarimiran has a blog post on this if you're interested on why this behavior is the default
06:54:00FromDiscord<has1> If you have a prefix, you'd know where things are coming from
06:54:13Yardanico@has1 O disagree that you should prefix everything
06:54:26Yardanico*I
06:54:26lqdev[m]usually you don't care about where stuff's coming from
06:54:56leorizewhen you do, it's easy to just look at the list of import and deduce it
06:55:30solitudesfor if you're using normal editor with nim extension you could just `go to definition`
06:55:42leorizehttps://narimiran.github.io/2019/07/01/nim-import.html
06:55:51*shota quit (Remote host closed the connection)
06:56:19*shota joined #nim
06:56:48FromDiscord<has1> I'll take a look
06:57:25FromDiscord<has1> What about the json thing, that's a macro? So you can define some special syntax?
06:57:38YardanicoBut if you really want to, you can explicitly prefix everything in your code. Although it would actually look more cluttered.
06:57:38YardanicoFor that behavior use "from module import nil"
06:57:39leorizeno, you're limited to what the compiler can parse
06:57:40FromDiscord<has1> And that is translated to some code?
06:58:04leorizethe compiler parse your code into an AST tree
06:58:20FromDiscord<has1> So what's a macro
06:58:23FromGitter<zacharycarter> @Clyybber - whoops I forgot you might use gitter :P
06:58:27leorizea macro then construct an another AST tree that is the desired code
06:58:51leorizehttps://nim-lang.org/learn.html
06:58:55leorizesee Macro tutorial
06:59:00leorizeit will expand more on this topic
06:59:47Yardanico@has1 https://nim-lang.org/docs/manual.html#macros
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:17YardanicoI really suggest you to read Nim tutorials and the manual
07:00:27*shota quit (Ping timeout: 240 seconds)
07:02:47*shota joined #nim
07:03:09FromDiscord<has1> It's pretty confusing, it talks about the AST
07:03:16FromDiscord<has1> But not really what it is
07:03:23FromDiscord<has1> Or what the difference is to templates
07:03:36*krux02 joined #nim
07:03:59FromDiscord<has1> But does this happen at compile time?
07:04:09leorizeyes, everything happens at compile time
07:04:20leorizetemplates let you take a block as-is
07:04:30FromDiscord<has1> Not everything does
07:04:36leorizemacros let you inspect that block and build code to whatever you'd like
07:04:47*gmpreussner joined #nim
07:05:03Araqfor others compile-time vs runtime is "confusing", you always have to draw the line somewhere
07:05:19FromDiscord<has1> For example, in go you would call a println function and the logic happens at runtime, right?
07:05:54solitudesfmacro and template stuff happens at compile time, that what he meant
07:06:01FromDiscord<has1> But rust with it's println! Macro happens at compile time right? So it generates different code based on the input type?
07:06:23leorizeyou can think of it like that...
07:06:45alexander92based on the input type and AST
07:07:15leorize@has1: well, try following that tutorial
07:07:16alexander92e.g. imagine you want to write an `unless` construct
07:07:30FromDiscord<has1> So let me understand this, I could write a Marco (template?) In nim that takes a type, and then generates optimized code to display this type
07:07:31leorizeyou'll figure it out real quick
07:07:56alexander92has1 yes, and much more
07:08:14FromDiscord<has1> But using go, if I write a function, all of this happens at runtime
07:08:26leorizeyes
07:08:37FromDiscord<has1> Well that's pretty cool actually
07:08:56*msmorgan quit (Ping timeout: 276 seconds)
07:10:25*msmorgan joined #nim
07:11:33Yardanico@has1 sorry for Russian, but this is a bit silly example of using macros - https://github.com/Yardanico/nickel/blob/master/src/modules/greeting.nim in this file I create a new module called Greeting for my chatbot and define commands (like "hello", "hi"), and if it sees one of this commands, it replies with a random greeting from a config file
07:12:20Yardanicoso "module", "startConfig", "command" are all done with metaprogramming either with macros or template
07:12:49*endragor joined #nim
07:17:29Zevvgit push
07:17:48Zevvoosp
07:17:54alexander92sorry git is not available
07:17:58alexander92i also do this from time to time
07:18:01ZevvETOOMANYWINDOWS
07:18:31narimiran!eval echo (NimMajor, NimMinor, NimPatch)
07:18:33NimBot(0, 20, 2)
07:18:55narimiranPMunch: ^ completely unusable!! ;P
07:21:13YardanicoI also type "clear" in IRC sometimes
07:23:55PMunchnarimiran, hmm so my auto-update script still doesn't work..
07:24:10ZevvYardanico: use Ctrl-L instead :)
07:25:11alexander92help
07:25:12YardanicoZevv: yeah Iearned that recently on Reddit
07:26:02*alexander92 quit (Quit: WeeChat 2.4)
07:26:02PMunchnarimiran, oh right, the docker images haven't updated yet. The script seems to work: https://hub.docker.com/r/nimlang/nim/tags
07:26:10*alexander92 joined #nim
07:26:16alexander92oh no why `/BYE` quits
07:26:56alexander922
07:27:00leorizePMunch: shouldn't we make those docker image uhmm, official now?
07:27:20leorizethey're unofficial and not maintained by the project I think
07:27:25narimiranleorize: i'll have another official task for you ;)
07:27:53alexander92he'll become the new prime minister right, i knew it
07:28:52ZevvAre all CI tests done with a -d:danger or -d:release compiler?
07:29:08leorize-d:release iirc
07:29:16Zevvhttps://github.com/nim-lang/Nim/issues/12244 seems pretty serious, but how can that slip through?
07:32:21Zevvoooh wait a minute
07:32:45PMunchleorize, yeah I have no idea who maintains these images. I just blindly trust them for the playground :P
07:33:18leorize@Shield: I dug the gc code and found that memory is actually being released :/
07:33:51leorizecan you give me a snippet of memory not being freed by the gc?
07:34:14*sealmove joined #nim
07:36:28alexander92https://github.com/nim-lang/Nim/issues/12245
07:36:41alexander92is it possible people can still update to the invalid 1.0
07:37:05narimiranmaybe he updated before the updated v1
07:42:17*rokups joined #nim
07:43:23*hhr joined #nim
07:43:44FromDiscord<Shield> @leorize https://pastebin.com/FEQ6RwVT
07:43:44FromDiscord<Shield> the issue was basically the gc neither freeing memory fast or reusing it, so the memory usage will keep raising if you have many requests or serving large files, or even just allocating strings in a fast loop, and once the program gets memory, it doesn't give it back to the system
07:44:09FromDiscord<Shield> so it takes one spike in memory usage to hold it forever
07:44:41FromDiscord<Shield> useMalloc does solve the issue, but i'll have to wait for async to catch up with newruntime
07:46:28FromDiscord<Shield> i wonder if it's the same on linux, i need to get a VM sometime in the future
07:47:01leorizeyou should test this on linux
07:47:20leorizeWSL should do
07:47:53leorizeI was hoping for a smaller snippet so I can easily pin point the problem :P
07:51:25*Vladar joined #nim
07:55:56leorize@Shield: so on linux it will stop growing at 277M
07:55:58FromDiscord<Kiloneie> Man do you people sleep ? 300+ messages since 00.30
07:56:07leorizetimezones :P
07:56:24narimiran100 of those are just multiline code pastes :P
07:56:25FromDiscord<Kiloneie> i guess D:
07:57:26FromDiscord<Kiloneie> Where are you guys from even ? i knowe araq is from Germany.
07:57:42PMunchI'm in Norway
07:57:46FromDiscord<Shield> keep refreshing fast enough and it'll keep growing, i had a better snippet and i can't seem to find it, also you have to comment the GC_fullCollect, because it helps the gc to catch up
07:57:48narimirancroatia
07:58:00FromDiscord<Kiloneie> hai naibghour, Slovenia here
07:58:22narimiranoooo, slovenac! koji grad?
07:58:40PMunchI think most of the community is in Europe, but there is apparently a pretty strong sub-community in China, and a couple of people various places in the Americas.
07:58:44FromDiscord<Kiloneie> Okoli Novega mesta
07:58:52FromDiscord<Kiloneie> interesting
07:59:09leorize@Shield: already did
07:59:28PMunchI saw you were using Game Maker in the logs by the way Kiloneie
07:59:28leorizefrom `strace`, the gc stops allocating after doing so twice
07:59:33leorizeno deallocation in site
07:59:39leorizesight*
07:59:42FromDiscord<Kiloneie> i didn't know araq was german, therefore german made language till yesterday, i read it somewhere, so it makes sense theres a "inspired by oberon" there
08:00:02FromDiscord<Kiloneie> I was heavily for like 2-3 years
08:00:18FromDiscord<Kiloneie> there is something to show for that, not much though
08:00:20narimiran@kiloneie pozdrav (i)z R(ij)eke
08:00:40PMunchThat's how I got into programming about 16 years ago (oh wow, didn't realise it was that long..)
08:00:59FromDiscord<Kiloneie> Game Maker 7.0 was a long time ago
08:01:07Yardanico@Kiloneie Russia :)
08:01:11PMunchYup, I think I started around 5 or 6
08:01:28PMunchI remember when 8 came out, there was a lot of drama. Don't remember why though :P
08:01:52FromDiscord<Shield> by deallocation do you mean decrease in memory usage or checking that the variable was deallocated?
08:01:54FromDiscord<Kiloneie> a lot of cold countries xD... im cold already here, im cold blooded or something, wake up coughing like a maniac.
08:02:06FromDiscord<Kiloneie> 1 part of drama was the logo lol
08:02:09leorize@Shield I was looking for munmap()
08:02:16FromDiscord<Kiloneie> huge smiley face with a mouth of red
08:02:21FromGitter<arnetheduck> congratulations on the release!
08:02:32FromDiscord<Shield> it's interesting to know that linux does that, on windows i can get it over 1gb
08:02:54FromDiscord<Kiloneie> 8.0 provided BIG speed boost, like almost doubling the speed, idk about any other kind of drama other than the logo
08:05:40*asymptotically joined #nim
08:05:49leorize@Shield: tested three GC: default, markAndSweep, boehm
08:05:57leorizeall show the same behavior
08:06:05FromGitter<arnetheduck> some pretty harsh compatibility guarantees in there (!) - ie looks like the macros ast can no longer be amended for example since adding an enum value is a breaking change
08:06:46FromDiscord<djazz> I got the Nim in Action ebook :3
08:06:46FromDiscord<djazz> https://cdn.discordapp.com/attachments/371759389889003532/625966336639631371/DSC_1307.JPG
08:06:52*shota quit (Remote host closed the connection)
08:07:08FromDiscord<Kiloneie> got that a month ago, pretty good, there are a few things to be updated though
08:07:14FromDiscord<Kiloneie> you will know when compiler whines
08:07:39FromDiscord<djazz> Yeah I know
08:07:42FromDiscord<Kiloneie> doesn't start till like chapter 6?, i found one in chapter 9 metaprogramming, the first example
08:08:01leorize@Shield: so the rest of the leaks are logical
08:08:08FromDiscord<djazz> Was only $25 for book and digital
08:08:13leorizenot a GC problem
08:08:21FromDiscord<Kiloneie> im glad im no longer 13 learning game maker whilst barely also knowing english, now i can figure all those things out easily
08:08:33FromDiscord<Kiloneie> yeah dom put a special discount for 1.0
08:08:49leorizeit's just manning doing their job
08:08:51leorizenot dom :P
08:08:55FromDiscord<Kiloneie> i could of gotten one myself trough a blog back then, didn't, so i payed like 30, 35 idk
08:09:10FromDiscord<Kiloneie> really ? they keep track of versioning lol ?
08:09:19FromDiscord<djazz> Sadly the epub is just converted from kindle with calibre it seems
08:09:29FromDiscord<djazz> No embedded fonts
08:10:24FromDiscord<Kiloneie> you get multiple versions don't you ?
08:10:32FromDiscord<Kiloneie> i got like pdf, website one... a lot
08:10:40FromDiscord<djazz> Yes
08:10:54FromDiscord<Kiloneie> i downloaded them but i use the website one because it's the most functional one
08:10:57FromDiscord<djazz> LiveBook, pdf, ebook formats and physical is on its way
08:11:03FromDiscord<Shield> I see
08:11:24FromDiscord<Kiloneie> i want a physical one, but not if it has things to update, so i didn't order
08:11:40FromDiscord<Kiloneie> like books i bought for game maker still work, 100%
08:11:47FromDiscord<djazz> I'm just being picky about ebooks since do some epub publishing myself :)
08:12:17FromDiscord<djazz> (fiction novels though)
08:12:29*nif quit (Quit: ...)
08:12:39*nif joined #nim
08:13:49FromDiscord<Kiloneie> okay, hope none are the other kind of fictional that most people write xD
08:14:07*shota joined #nim
08:16:16*alexander92 quit (Quit: WeeChat 2.4)
08:17:45FromDiscord<Kiloneie> I wonder how long it would take to make game maker 7.0 in Nim...
08:18:17FromDiscord<djazz> I am not a writer, but the stories arent your usual fic heh
08:19:12dom96Kiloneie: the book is 1.0 compatible, all examples are in the test suite
08:20:30FromDiscord<Kiloneie> and the symbol part in metaprogramming where symbol is deprecated ? i mean it all works, just a few minor things
08:20:40narimirandom96: check out the discussions on HN and r/programming, maybe you can answer some of the questions raised there....
08:21:28narimiranbtw, i'm quite surprised by the lack of the comments on lobste.rs
08:22:27FromGitter<timotheecour> feedback on https://forum.nim-lang.org/t/5214#32703 welcome (for an article on nim)
08:29:32leorizeI think Nim is in the unique position of being able to do... everything :P
08:29:39leorizeit's hard to market that
08:29:59FromDiscord<Kiloneie> Nah, it will market itself once people realize what they are missing on
08:30:36FromDiscord<Kiloneie> now that 1.0 is here, all it needs more is content, then it can grow like Python did(at a lesser degreee)
08:31:02FromGitter<alehander42> hey @timotheecour good to see you around
08:31:03leorizeI don't think "market itself" is a viable strategy nowadays
08:31:54FromDiscord<Kiloneie> yeah... i know, PureBasic did that + license and now it's dead
08:31:58FromDiscord<Kiloneie> it never took of
08:32:02leorizewe need to learn from vlang :P
08:32:08FromDiscord<Shield> gotta make more libs and bindings fast
08:32:14FromDiscord<Kiloneie> but Pure Basic is far beneath Nim
08:32:17FromGitter<timotheecour> hi @alehander42 :) mostly on GitHub rather than here
08:33:13leorizepeople keep looking for the "unique" in Nim
08:33:22leorizebut you can't just say Nim is suitable for everything :P
08:33:39FromDiscord<Shield> i think a gui library and opengl should be part of the stdlib to embrace the batteries included concept
08:33:59leorizeAraq is having a different plan for that iirc
08:34:08FromDiscord<Kiloneie> there isn't anything truly unique to just Nim, Nim has combined elements unique to many different languages and formed such a combination that i truly love
08:34:25FromDiscord<Kiloneie> like take the syntax for example
08:34:35*owl_000 joined #nim
08:35:22FromDiscord<Shield> nim is unique in a way that made it the only language i actually like and keep going back to
08:35:41FromDiscord<djazz> One lang to rule them all!
08:35:43FromDiscord<Kiloneie> BASIC syntax like Pure Basic is very humanly readable, but Python beat that, and Nim looks like Python but takes it a step further as well as being Stasticaly typed along with NimScript checking your code like Python does before compilation, there almost no language that does dynamic checking of code of a compiled static language
08:36:15FromDiscord<Kiloneie> i like how python looks, writes and reads, but i don't like it's slow speed and dynamic typing
08:36:25FromDiscord<Kiloneie> Nim fixes all of that, and more
08:36:59FromDiscord<Kiloneie> add metaprogramming and you got one sweet language, but it's not the end of the list yet
08:37:00FromDiscord<Shield> the metaprogramming is basically on point, is there anything that come close to it at all?
08:37:13narimiranguys, write all that as a reply to people asking those questions on HN and r/programming ;)
08:37:16FromDiscord<Kiloneie> maybe common lisp smthing... i don't know
08:37:27leorizelisp has better metaprogramming
08:37:32FromDiscord<Kiloneie> i have never encountered metaprogramming before, and it's so EASY in Nim
08:37:36leorizebut I hate those ()
08:37:44*leorize hides
08:37:48FromDiscord<Shield> templates are really easy it makes me happy
08:37:49FromDiscord<Kiloneie> i was sold just on the syntax of nim
08:38:12FromDiscord<Kiloneie> i haven't done any macros, and yes templates are so cool, nothing hard about them
08:38:23FromDiscord<Kiloneie> anyways( workout time)
08:38:29FromDiscord<Shield> macros are a bit advanced and aren't as simple
08:38:55FromDiscord<Shield> i also like that it doesn't rely on OOP
08:39:24dom96Kiloneie: that's just something being deprecated, it still works, it's not difficult to look into what the non-deprecated alternative is, in fact Nim should highlight it most of the time
08:40:04leorizenarimiran: I'll leave that to you :)
08:40:07FromDiscord<Shield> DSLs is another thing, it's easy to write them in Nim
08:40:33FromDiscord<Kiloneie> the only oop i've ever done was game maker xD barely oop
08:40:41narimiranleorize: nah, it is better if it comes from somebody who is not payed to work on nim ;)
08:40:51FromDiscord<Kiloneie> i mean oop has it's uses, probably very useful in games, but you don't need it for most things
08:41:46FromDiscord<Shield> to this day i still don't understand why they teach you about having to use public and private fields with getters and setters that don't do anything beside getting and setting a value
08:42:24FromDiscord<Kiloneie> ancient language design...
08:42:41FromDiscord<Kiloneie> and since so much is doded in it, it is hard to change things
08:42:53FromDiscord<Kiloneie> coded *
08:43:20FromDiscord<Kiloneie> like seriously, who needs ; semicolons nowadays, why do you need to write int main() bla bla
08:43:30FromDiscord<Shield> it's just extra noise, some languages are proud that everything is an object including literals
08:43:40FromDiscord<Kiloneie> there is a lot of things that you just don't need to do, shouldn't do
08:43:51FromDiscord<Kiloneie> being proud of ooping everything is...
08:43:53*sagax quit (Remote host closed the connection)
08:44:06FromDiscord<Kiloneie> how is performance like in such languages ? pretty terrible
08:44:47FromDiscord<Kiloneie> ruby treats everything as an object, makes it beautiful to use... but syntax is still not perfect, and it's slow as hell
08:44:50leorizethey were never designed to run on today's computer architecture
08:45:27*jxy quit (Ping timeout: 245 seconds)
08:45:27owl_000python's everything is object too, even class is object
08:45:35FromDiscord<Kiloneie> yeah, more like awesome learning languages, now people try to do more than that with them and they can't(also web work)
08:45:40narimiranPMunch: what a great, thorough answer on HN!
08:46:22*jxy joined #nim
08:47:22FromDiscord<Shield> i think if Nim fixed the const/let thing exelotl pointed out it'll be the perfect C
08:47:50FromDiscord<Shield> i was doodling with the idea of using templates and macro to write in assembly just for fun
08:48:09FromDiscord<Shield> it really saves time spent on coding
08:49:09FromDiscord<Kiloneie> i had that idea though, but i am not the person to actually do it, i like to think 😛
08:49:53FromDiscord<Kiloneie> i had the idea before i found nim, make a modern awesome assembler, from it a language, from it a scripting language, and you could view code of any of them from any position
08:50:29FromDiscord<Kiloneie> would be great for game engines, you write script code, voila lower level code and assembly generated as well, so you can tune, and it affects everything etc
08:51:41FromDiscord<Shield> yup, it's easy to write script languages or even translate json to Nim, but then again, why bother? Nim is already easy
08:51:59leorizeanyone wants to try making drivers in Nim?
08:52:09leorizethere's github.com/ixy-languages/ixy-languages
08:52:12FromDiscord<Shield> i think the only real equivalent to Nim is Terra
08:52:29FromDiscord<Shield> but that project is really young and doesn't have good support
08:54:34*Hideki_ joined #nim
08:54:48FromDiscord<Shield> people actually mentioned the lack of multi inheritence as a point against Nim....
08:55:03leorizethat fact alone is terrifying
08:55:48FromDiscord<Shield> what's funny is that they can't respond to "you can make your own OOP system with metaprogramming"
08:57:29sealmoveI don't think you can describe Nim in terms of other languages anymore. It has evolved into a unique system with a certain philosophy.
08:59:00sealmoveComparing to Terra won't do since it's very much backend-agnostic.
08:59:03*Hideki_ quit (Ping timeout: 245 seconds)
09:00:47FromDiscord<Delta231> @Cadey~ I can understand but V is developing rapidly.
09:01:30*couven92 joined #nim
09:03:55Zevvleorize: what do you mean by 'drivers'?
09:04:39leorizesee the link I linked below
09:05:44Zevvhm should not be too hard. I can try if I can clean up https://github.com/zevv/nim-kernel-module as a start
09:06:10ZevvI'm having a hard time finding time with an empty head lately though, my work projects are mentally demanding :/
09:06:58Zevvoh these are *userspace* drivers even, I now see. that's cheating
09:08:35FromDiscord<Shield> it would've been impressive if they had to also code the kernel
09:09:52Zevvpython
09:11:10FromDiscord<Kiloneie> i didn't mean to make a scripting language out of Nim, i meant i had an idea before i found Nim to do such a system
09:11:42FromDiscord<Kiloneie> also V is again 3 months young, nobody should care about a 3 months old language posing any threat to a 11 years old one
09:12:00FromDiscord<Kiloneie> and if V is open source, we can just nick that blazing fast compiler cod
09:12:06FromDiscord<Kiloneie> code *
09:13:16FromDiscord<Kiloneie> but anyways Nim does what i thought of long ago
09:13:36FromDiscord<Shield> does anybody knows why is it fast to begin with? maybe it's fast because it doesn't have fancy features and safety checks
09:13:59*alsdkjfclqllw joined #nim
09:14:35*mibr joined #nim
09:14:42*alsdkjfclqllw quit (Remote host closed the connection)
09:15:03ZevvPMunch: excellent answer post on HN!
09:15:11FromDiscord<Kiloneie> probably
09:16:09FromDiscord<Kiloneie> that is why 3 months old means nothing... Nim was meant to be small, and achieve everything else with metaprogramming, guess what it became now, because things usually take way longer and aren't as easy in reality
09:16:47FromDiscord<Shield> i think benchmarks should be included as an answer to why use Nim
09:17:35FromDiscord<Kiloneie> probably, but you need a bunch of them, with possible direct representations in python and C and maybe more
09:17:41FromDiscord<Shield> also that post about writing a python library in Nim to get great speed is pretty cool
09:17:47FromDiscord<Kiloneie> which we already have to an extendm but not enough different ones
09:18:08FromDiscord<Kiloneie> Yeh, Nim doesn't just compile to so many languages, but vice versa
09:18:18FromDiscord<Kiloneie> you can use it to help you with Python, or vice versa
09:21:50FromDiscord<Kiloneie> i haven't actually done any of that, i should try it out at some point soon
09:24:07Yardanico@Shield V compiler doesn't even have AST representation of the code in the compiler
09:24:49YardanicoAnd they plan to add this after 1.0
09:25:07FromGitter<mratsim> so it's a transpiler :p
09:25:09YardanicoAnd 1.0 *should be* released in December 2019
09:27:34*elrood joined #nim
09:28:25elroodcongrats on the release, guys. good luck with nim
09:33:05Araqelrood, thanks, I appreciate it
09:33:32*fredrik92 joined #nim
09:35:12PMunchnarimiran, Zevv, thanks :)
09:36:58*couven92 quit (Ping timeout: 245 seconds)
09:38:01FromDiscord<djazz> Nice reply PMunch!
09:40:19PMunchThanks djazz :)
09:40:27PMunchHi fredrik92, come to celebrate Nim v1.0?
09:40:38fredrik92WOHOOOO!
09:40:45*fredrik92 is now known as couven92
09:41:01FromDiscord<djazz> 🎉
09:41:02couven92PMunch, Yeah... Sorry I missed it yesterday...
09:43:10FromDiscord<Delta231> 1.0 Nim
09:43:14FromDiscord<Delta231> 🎉
09:43:38FromGitter<geotre> v1.0 is here?? Awesome!
09:44:26FromDiscord<niv> hello! gratulations to the team for 1.0. i've tried running our large-ish codebase on 1.0 and it seems to be Working Just Fine.
09:44:39*icyphox joined #nim
09:44:50*icyphox left #nim (#nim)
09:45:19couven92As I discussed with PMunch the other day, docker has the possibility of windows images... Should we have a docker image that uses Windows as OS base? :O
09:46:27*icyphox joined #nim
09:49:05Araqniv: yay!
09:51:05FromDiscord<niv> 20k-ish lines of nim code (excluding dependencies) making heavy use of database access, networking and async with a littering of native/C bindings. and it runs fine. won't upgrade for a while but it's very promising :)
09:53:10FromDiscord<Kiloneie> Is anyone planning a visual designer for Nim ?
09:53:38FromDiscord<Kiloneie> it would be great to have one, people could then use it for a game engine even if it's done right
09:56:21FromDiscord<niv> what thing do you want to design visually?
09:59:02FromDiscord<Kiloneie> It would be nice to have a tool to be able to design visual apps, for quick prototyping, that tool could then be used like Game Maker for games maybe drag and Drop coding that made Game Maker shine so much(now it's different, i don't like it as much they went a weird direction). One could make a fast Game Maker like software written in Nim that generates Nim code
09:59:17FromDiscord<Kiloneie> it's an idea, so don't think too much about it
10:00:21FromDiscord<Kiloneie> I don't want a clone of Game Maker, i want the best of Godot and Game Maker, something that would require much thought to design. Something easier than Godot like Game Maker, but more flexible and powerful than Game Maker with a better language GML is pretty weak once you learn GDscript of Godot
10:00:30FromDiscord<niv> im not seeing a great value prop here tbh. if you need quick UI writing it in code is usually faster (assuming familiarity with the widget toolkit at hand) and makes databinding much easier too
10:01:08FromDiscord<Kiloneie> i know, but it's an idea that might be useful and attractive to beginners, i find great teaching value there(learning)
10:01:10FromDiscord<niv> but i have a narrow perspective on this admittedly.
10:01:17FromDiscord<Kiloneie> it is hard to teach people to code
10:01:44FromDiscord<Kiloneie> i learned coding with Game Maker's drag and drop and soon after by a friend teacching me game maker's language, gml
10:02:10FromDiscord<Kiloneie> i was 13 and as much as i liked and was good at english, learning to program was a stretch, big one.
10:02:26FromDiscord<niv> yes, it takes a decade or two ;)
10:02:26FromDiscord<Kiloneie> people learn best when they can visualize things
10:03:08FromDiscord<Kiloneie> when i returned to game maker like 2 years ago, i was just better at it, regardless of the fact i coded barely anything since like the age of 17-18
10:03:22FromDiscord<Kiloneie> thats about 5-6 years ago
10:03:31FromDiscord<SodaScripter> I have absolutely no idea how to program
10:03:37FromDiscord<SodaScripter> 👍
10:03:46FromDiscord<Kiloneie> okay xD
10:03:56FromDiscord<SodaScripter> sorry it's like 3:04 am
10:03:59*icyphox is now known as Entropic
10:04:08*Entropic quit (Changing host)
10:04:09*Entropic joined #nim
10:04:17FromDiscord<SodaScripter> and I've just been loosing my mind cause I cant settle on a language
10:04:29FromDiscord<Kiloneie> In short, it is hard for people with the primary language not being english to program, Game Maker's D&D speeds that up well
10:04:35leorizethe solution is simple, settle on Nim :P
10:04:37FromDiscord<niv> sounds like a complex thing in any case. maybe it'd be more productive to try and improve one of the existing projects instead of starting yet another, just to have it in nim
10:04:46FromDiscord<Kiloneie> yeh Nim is amazing
10:05:12FromDiscord<Kiloneie> there is literally no language with more elegant syntax that Nim has, nor the features
10:05:18FromDiscord<SodaScripter> I wanna do like low level shit
10:05:22FromDiscord<SodaScripter> but
10:05:23FromDiscord<SodaScripter> ugh
10:05:45narimiran@SodaScripter i would advise getting some sleep before doing that ;)
10:05:55FromDiscord<Kiloneie> this is where i cannot help you, araq to the rescue i guess
10:05:59*Entropic is now known as icyphox
10:06:32FromDiscord<SodaScripter> I got too much sleep
10:06:39FromDiscord<SodaScripter> hence why I'm up at 3 am
10:06:41leorizenim can do everything :P
10:06:53FromDiscord<niv> well, except multithreaded async
10:06:55*icyphox is now known as Entropic
10:07:09FromDiscord<Kiloneie> yeh, if you were to learn Nim, there is almost nothing you could not do with it
10:07:12Araqniv: scheduled for 1.1
10:07:21FromDiscord<niv> yay!
10:07:49FromDiscord<niv> one of the biggest wins of nim, imo, is how quick you can iterate and Get Shit Done
10:08:26FromDiscord<Kiloneie> yeah, no ancient language design crap getting in your way
10:08:34FromDiscord<Kiloneie> or forced philosophies you don't need
10:08:55FromDiscord<niv> i took bit of a leap with adopting nim for some internal and public tooling and also for the big project i mentioned, and so far it's been an absolute joy to work on, and others seem to like it enough to adopt and learn it even though nim was an unknown
10:09:23FromDiscord<Kiloneie> Good stuff
10:10:22owl_000is there any roadmap to know what is upcoming in nim
10:10:43FromDiscord<SodaScripter> I've been trying to learn C++ for the past month
10:10:47FromDiscord<SodaScripter> it's not clicking for me
10:10:57FromDiscord<niv> you dont _learn c++_
10:11:22FromDiscord<Kiloneie> no don't do c++
10:11:25FromDiscord<Kiloneie> it's horrible
10:11:32FromDiscord<niv> you try to arrange yourself with the pain and futility, drift off into heavy drinking, and eventually you accept that smart pointers arent bad
10:11:37FromDiscord<Kiloneie> it's the definition of pain
10:11:41FromDiscord<djazz> I am movong from c++ to nim
10:11:54FromDiscord<niv> i dont think nim can replace c++
10:12:07FromDiscord<Kiloneie> nim forces on you so much stuff you don't need, ancient language design crap
10:12:22FromDiscord<niv> modern c++ is very pleasant tbh
10:12:35FromDiscord<Kiloneie> really ? got any examples ?
10:12:41FromDiscord<niv> examples for what?
10:12:43FromDiscord<Kiloneie> last i used it i wanted to shoot myself
10:12:55FromDiscord<Kiloneie> modern c++ code that is plesant
10:13:14*shota quit (Remote host closed the connection)
10:13:22Araqowl_000, working on it...
10:13:53FromDiscord<niv> well, that's bit of a question. c++ is incredibly complex but if you use it well, you can do really neat things with it
10:14:08FromDiscord<Kiloneie> that's right, but i hate it's syntax...
10:14:26owl_000great Araq :)
10:14:37FromDiscord<Kiloneie> does c++ have dynamic code checking like Nim and Python does ?
10:14:47FromDiscord<Kiloneie> i mean does it have it now ? it didn't used to
10:14:51FromDiscord<niv> what's dynamic code checking?
10:14:59FromDiscord<Kiloneie> probably wrong term for it
10:15:23FromDiscord<Kiloneie> but nim checks your code for syntax errors when you type it, before you compile it
10:15:35FromDiscord<Kiloneie> (also python)
10:15:40FromDiscord<djazz> Depends on your editor?
10:15:47leorizeit's an editor thing
10:15:49FromDiscord<niv> clang language-server works well these days
10:15:49leorizenot Nim's
10:16:08FromDiscord<niv> as seen in the recent CLion EAP
10:16:31FromDiscord<Kiloneie> i used dev-cpp back in the day, it had no such things... QQ
10:16:54FromDiscord<niv> if you're getting started have a look at visual studio on windows, or clion on mac/linux
10:17:00FromDiscord<Kiloneie> hi man, here have a compilation error from a missing semicolon that i will tell you nothing about 🙂
10:17:21FromDiscord<Kiloneie> that's how i was taught c++ at school
10:17:59FromDiscord<niv> if you want to get into game development at all, hobby or otherwise, you need to pick up on c++ though.
10:18:22FromDiscord<Kiloneie> no ...
10:18:46FromDiscord<Kiloneie> theres Game Maker, Godot, UNity(C# , which is pretty nice)
10:19:05FromDiscord<niv> at the very least you'll want to target nintendo switch
10:19:08FromDiscord<Kiloneie> Unreal is c++ and people shy away from Unreal for hobbying
10:19:25FromDiscord<Kiloneie> idk, when i was making games, Windows was the platform
10:19:33FromDiscord<niv> that ship has sailed :)
10:19:33FromDiscord<Kiloneie> Game Maker, Godot, both target switch
10:19:46FromDiscord<niv> fair enough
10:19:58FromDiscord<Kiloneie> although pay some $$$ in game maker for that
10:20:08FromDiscord<Kiloneie> it's like 100-200$ or something
10:20:15FromDiscord<niv> sounds cheap to me
10:20:25FromDiscord<Kiloneie> you wanna target EVERY platform, 1000$+ ?
10:20:48FromDiscord<niv> still sounds incredibly cheap
10:20:50FromDiscord<Kiloneie> for about 3-4 years till next upgrade, not that expensive but.... it's big money upfront
10:21:07FromDiscord<niv> well, you can prototype on windows and then once you have something you can sell, you can ship everywhere
10:21:40FromDiscord<Kiloneie> yeh, it's code works the same everywhere(except web and somewhere else you gotta make sure you don't use some functions, very rare though)
10:21:48FromDiscord<Kiloneie> some really specific stuff
10:21:53FromDiscord<niv> "code that works everywhere" is such a myth
10:22:26FromDiscord<niv> on the most basic level, yes, but you will still be spending weeks on "making code that works, work"
10:22:41FromDiscord<Kiloneie> well some small tweaks are requires with game maker
10:22:48FromDiscord<Kiloneie> nothing big
10:23:13FromDiscord<niv> i guess GM has a very narrow attack surface where you can step out of the sandbox in the first place
10:23:21FromDiscord<Kiloneie> you can have it run with YYC compiler for great speed or using it's VM so it does work everywhere easy
10:23:57FromDiscord<Kiloneie> you still gotta do resolution stuff etc though
10:24:09FromDiscord<Kiloneie> game maker does not make that one easy, nor is FPS changing easy
10:24:19FromDiscord<Kiloneie> that thing is ancient design that needs fixing
10:24:36FromDiscord<niv> dont be so quick in calling things "ancient design" :)
10:24:40FromDiscord<Kiloneie> every room you make has it's fixed fps speed, and you write code that moves by pixels
10:24:48FromDiscord<Kiloneie> GM does have those...
10:24:59FromDiscord<Kiloneie> you got an existing game at 30 fps ?
10:25:13FromDiscord<Kiloneie> good luck changing everything to be /2 then room speed * 2
10:25:18FromDiscord<Kiloneie> it will take a while...
10:25:40FromDiscord<Kiloneie> godot has that done welll
10:25:57FromDiscord<niv> the way i see it, GM and friends mostly are prototyping helpers. you can throw the first iteration of your idea over the wall quickly, but you will eventually be rewriting it down the line
10:25:59FromDiscord<Kiloneie> game engine doesn't run at any specific FPS
10:26:26FromDiscord<Kiloneie> well a lot of people said that about Game Maker, but some really great hgames have been made with it
10:26:37*shota joined #nim
10:26:39FromDiscord<Kiloneie> like Undertale, Hotline miami etc
10:27:09FromDiscord<niv> yes, sure. again, my POV is kinda narrow on this, sorry. i didnt mean to say you cant build great things with it.
10:27:41FromDiscord<Kiloneie> it's okay
10:28:01FromDiscord<Kiloneie> Game Maker does some things really well, and fails miserably in other departments
10:28:15FromDiscord<Kiloneie> it's language is very lackluster, gdscript eats it alive
10:28:50FromDiscord<Kiloneie> but for quick game making, man is it great, but once you learn godot engine, you can do the same faster.... just a different learning curve
10:29:09FromDiscord<Kiloneie> godot is getting way ahead of Game Maker
10:29:11FromDiscord<SodaScripter> ugh
10:29:16FromDiscord<SodaScripter> fucking
10:29:19FromDiscord<SodaScripter> I want to make games
10:29:21FromDiscord<SodaScripter> but C++ is pain
10:29:25FromDiscord<niv> no, you dont
10:29:33FromDiscord<SodaScripter> what
10:29:34FromDiscord<Kiloneie> then use Godot man ?
10:29:38FromDiscord<SodaScripter> fuck Godot
10:29:40FromDiscord<Kiloneie> you can use c++ with Godot too
10:29:43FromDiscord<Kiloneie> okay..
10:30:00FromDiscord<SodaScripter> I hate game engines, just me personally
10:30:06PMunchYou can use Nim with Godot as well
10:30:10FromDiscord<Delta231> make games on console?
10:30:14FromDiscord<Kiloneie> well they save time... A LOT OF IT
10:30:16FromDiscord<niv> may i suggest https://love2d.org
10:30:17FromDiscord<Delta231> reverse engineer?
10:30:31PMunchYou can use SDL directly
10:30:52FromDiscord<Kiloneie> game engines let you bypass a lot of coding bane so you can get to actually making games much much quicker
10:31:03FromDiscord<Kiloneie> that's why they exist, to save time, and enjoy the process a lot more
10:31:04FromGitter<mratsim> coding bane?
10:31:06*shota quit (Ping timeout: 252 seconds)
10:31:17FromDiscord<Kiloneie> making a game engine is not an easy task...
10:31:23PMunchUntil you get stuck with some random issue in the engine that's impossible to fix..
10:31:36FromDiscord<Kiloneie> those are so rare...
10:31:38*PMunch scowls at Unity for that memory leak
10:31:43FromDiscord<niv> as game projects grow the "engine" part of it interweaves with the game more and more. game engines get customised to suit the game at hand, heavily
10:32:01*rokups quit (Quit: Connection closed for inactivity)
10:32:17FromDiscord<niv> its control you dont want to miss if you have Big Plans
10:32:33FromDiscord<Shield> FPS independant games and delta is an acient design 😄
10:33:00FromDiscord<niv> ancient design does not matter if you never hit more than 35fps anyways :D
10:33:23FromDiscord<Kiloneie> game maker 7.0 had that problem
10:33:30federico3Shield: what's the modern design?
10:33:31FromDiscord<Kiloneie> it could reach very few fps... QQ
10:33:33FromDiscord<Shield> the human eye cannot see more than 25fps anyways xD
10:33:38FromDiscord<Kiloneie> no
10:33:45FromDiscord<niv> 12 actually, one each. combined 24
10:33:48FromDiscord<Kiloneie> 60 fps you can feel so hard vs 30 fps
10:33:52FromDiscord<Kiloneie> i mean see...
10:33:55FromDiscord<Kiloneie> but feel you can
10:33:57leorizeI think he's just trolling :P
10:34:02FromDiscord<Kiloneie> i guess
10:34:13FromDiscord<Kiloneie> no game should ever be made today at anything less than 60 fps
10:34:21FromDiscord<Kiloneie> it's just a fact
10:34:26FromDiscord<niv> im just venting because our current rendering target isnt being met
10:34:34FromDiscord<Shield> yeah i'm joking about the eye thing, but Delta is indeed troublesome, the moment you step into multiplayer and networking, locked frames is the way to go
10:34:45dom96niv: Nim can actually do multi-threaded async ;)
10:35:16FromDiscord<Shield> instead of the game dropping frames, make sure it has a steady performance, slowing down the game is a good behavior is most cases
10:35:17FromDiscord<niv> dom96: the current app design is just async. i toyed with threads but in the end it was massively more complex for little perf gain.
10:35:41FromDiscord<niv> dom96: its basically just a network listener that manages some state (multiplayer services for a game)
10:35:46dom96niv: of course, not all apps need it. For a web app you can quite easily enable multi-threading with httpbeast/jester
10:36:12dom96ahh, then you should be able to base your architecture in the same way as httpbeast's
10:36:17FromDiscord<niv> oh we're actually using jester but it runs embedded in async mode. havent looked at httpbeast yet, the jester release is quite old.
10:37:09FromDiscord<niv> in the end i decided for multi-process over multi-threaded. things that can easily separate out are instead attached over a message bus. more robust that wayt too
10:37:33FromDiscord<Shield> honestly it's kinda freeing once you don't have to multiply by delta everywhere, and if you need to slow down logic, just update the speeds, frame drops is how you get physics bugs and things that happen once in a full moon
10:38:10FromDiscord<Kiloneie> well game maker needs a better way of being able to do that globably
10:38:38PMunchHow do you do multi-threaded async in Nim dom96?
10:38:42FromDiscord<Kiloneie> if you make a game at 30 fps, changing to 60 fps, requires halving of pixel values , otherwise everything is at 2x speed
10:38:48*birdspider joined #nim
10:39:00FromDiscord<niv> dom96: so tldr is, i wont touch the thing unless i need to. it runs fine and does everything we need; adding new requirements/features is trivial thanks to nims ease of access. everyone is happy even though its not the newest and greatest
10:39:21dom96PMunch: using SO_REUSE_PORT + an event loop per thread
10:40:03FromDiscord<Shield> i don't think there is any need to use a premade engine unless you have trouble handling cross platform support, especially for 2d games
10:40:12PMunchAh right, yeah I was thinking that an event loop per thread shoud work
10:40:22FromDiscord<Shield> it's just that game maker has literally thousands of tutorials and covers anything under the sun
10:40:32planetis[m]Can a zip iterator be writen with a forLoopStmt macro?
10:40:37PMunchWould it theoretically be possible to move a task from one event loop/dispatcher to another?
10:41:00PMunchLike can Nim pass closure iterators between threads in any concievable way?
10:41:14FromDiscord<niv> @Shield we're currently porting a game to switch, ps4, xbone on an "ancient" codebase and if it were UE4 it would probably a process of weeks, not months. but the codebase we are on is 15+y old.
10:41:28ZevvPMunch: Given that closures live on the heap, I'd say: not trivally
10:42:13ZevvAnd I do not know of any way to transplant data in or out closures
10:42:30PMunchSo implementing a work stealer would be, difficult..
10:42:36FromDiscord<Shield> i heard people saying good things about switch ports, what engine/framework are you using if i may ask?
10:42:38FromDiscord<SodaScripter> I'm gonna learn nim ig
10:43:05FromDiscord<niv> it's all custom. back then "engines" wasn't really a thing.
10:43:11FromDiscord<SodaScripter> @niv I've worked with love2d since I was 8
10:43:21FromDiscord<SodaScripter> It's not as capable as I'd like it to be
10:43:28FromDiscord<niv> no, but its fun :)
10:43:38PMunchSodaScripter, if you haven't programmed much before I'd recommend https://narimiran.github.io/nim-basics/
10:43:42FromDiscord<SodaScripter> my game ideas are too retardedlike to be made in something like it
10:43:52FromDiscord<Shield> it's still all directx and opengl right? or did you jump to vulkan already?
10:44:25FromDiscord<niv> it used to be opengl3, but we had to make some changes there. neither xbone nor ps4 run on opengl.
10:45:00FromDiscord<Shield> interesting
10:45:27FromDiscord<niv> it was a very "ancient" immediate-style rendering interface on top of that
10:45:44FromDiscord<niv> most of it was written 1998-2003-ish
10:46:43FromDiscord<niv> at some point you have to just bite the bullet and commit to rewriting huge parts of it, even though rewriting is almost always the Wrong Choice
10:47:20FromDiscord<Shield> it seems that the sane approach for porting is to have some sort of virtual machine for rendering à la Destiny
10:47:37planetis[m]it looks obvious but I can't find any zip macro
10:47:45FromDiscord<niv> the sane approach to porting is to not do it. unfortunately buying food requires money
10:48:19FromDiscord<Shield> https://en.wikipedia.org/wiki/Another_World_(video_game)
10:48:19FromDiscord<Shield> did it too, and it's a pretty old game
10:48:23FromDiscord<niv> designing a modern rendering architecture that _performs well_ on all platforms is incredibly expensive
10:49:00FromDiscord<SodaScripter> I told my friend about nim and he just replied
10:49:02FromDiscord<SodaScripter> "meme"
10:49:06FromDiscord<SodaScripter> what did he mean by this
10:49:29FromDiscord<Shield> true, i took a good minute contemplating on why would Jonathan Blow would have to optimize images to minimize transparent parts on the xbox 360
10:49:33FromDiscord<Shield> for a 2d game....
10:50:24leorize@SodaScripter: I need more information, how does he reply if you told him 'bout rust instead?
10:50:28FromDiscord<Shield> the most thing i miss the most from the ancient time is easy palette switching, have fun doing that using shaders
10:50:42FromDiscord<niv> haha.
10:50:44FromDiscord<SodaScripter> I've never asked them about rust
10:50:56FromDiscord<niv> i adore how the S/NES rendering "pipeline" works
10:51:19FromDiscord<niv> but i wouldnt give up on shaders.
10:52:11Zevvhow does that work then?
10:52:54FromDiscord<niv> palette switching?
10:53:55FromDiscord<niv> this is a well done and imo approachable video series on the basics: https://www.youtube.com/watch?v=57ibhDU2SAI
10:54:31PMunchEssentially you had a limited number of colours you could enumerate. So you would create palettes of colours and then select a palette and then be able to enumerate that palette. Change the palette and every colour on the screen might change
10:54:50PMunchSome systems had hard-coded palettes
10:55:07Zevvye'olde color cycling
10:55:33PMunchhttp://www.effectgames.com/demos/canvascycle/?sound=0
10:56:01*Hideki_ joined #nim
10:56:01PMunchIf you hit the more options button you can see the palette and how it changes. The image itself it static
10:56:18FromDiscord<Shield> behold the beauty of palette switching
10:56:19FromDiscord<Shield> http://www.effectgames.com/demos/canvascycle/
10:56:34FromDiscord<Shield> lol i just noticed we posted the same link xD
10:56:50PMunchIt really is an amazing example though :)
10:58:05Araqfunny thing: I knew what it's about without clicking on the link
10:58:07dom96PMunch: yeah, you can't call async procs across threads. But there is no need in most applications.
11:00:07*Hideki_ quit (Ping timeout: 250 seconds)
11:00:40PMunchThat makes sense, but can you migrate a task from one thread to another? While I was writing and researching my async/threaded article series I wondered if it would be possible to spin up only a few threads, then have a dispatcher on each thread, and implement blocking on locks and channels as a co-operative yield to the dispatcher.
11:01:15PMunchBut you run the risk of having unbalanced threads, so a work stealer would be required to balance the tasks across the threads as they run.
11:01:27PMunchBut that means they need to be able to jump from one thread to another.
11:02:21PMunchI guess that would mean copying the entire heap space used by the task over to the new thread though in Nim..
11:03:36AraqPMunch, try it with --gc:boehm
11:03:39*hhr quit (Ping timeout: 240 seconds)
11:03:44Araqit gives you a shared heap
11:04:39PMunchReally? But how would that even look in Nim?
11:05:07federico3PMunch: having that as the default parallelism method for Nim would be a huge benefit for the language
11:05:19owl_000i make a post about nim in a python facebook group. and it received good appreciation.
11:05:43*hhr joined #nim
11:05:46zedeusPMunch: have you looked at mratsim's weave project?
11:05:48AraqPMunch, it just works, you tell Nim to shut up via {.gcsafe.}: blocks
11:06:19Araqand you can cast to 'ptr' in your threads and yet it's collected properly
11:06:32PMunchAraq, aha so you just do things that shouldn't be possible and tell Nim to not mind.
11:06:52PMunchzedeus, no I haven't heard of that
11:07:07zedeusit's the POC for his Picasso RFC, https://github.com/mratsim/weave
11:08:01PMunchOh right, yeah I started looking at the Picasso RFC
11:08:36PMunchBut it uses the newruntime and not the GC..
11:08:54FromDiscord<Shield> GC is old and busted
11:09:37livcdwho is the guy using Nim for HFT ?
11:10:58PMunchHFT
11:11:24livcdIs that you PMunch ?!
11:11:42PMunchWho am I? What is HFT?
11:11:50FromDiscord<Shield> btw araq, is the patreon page still not up? this is the perfect time for it
11:11:58FromDiscord<Shield> it's kinda late but still
11:12:35FromDiscord<Shield> High Frequency Trading?
11:13:02livcdyeah
11:13:15livcdsomeone mentioned on reddit that they are using Nim fulltime for High Frequency Trading
11:13:25FromDiscord<Shield> whoa
11:13:27Zevvwas that disruptek?
11:13:42livcdmaybea andrea!
11:13:47*whaletechno quit (Ping timeout: 245 seconds)
11:13:48PMunchWait, really?
11:13:50FromDiscord<Kiloneie> i saw binance api for nim
11:13:54FromDiscord<Kiloneie> binding *
11:14:13FromDiscord<Kiloneie> i wanted to do that, but i decided youtube is a bit more of a priority
11:14:18FromDiscord<Kiloneie> than taking chances trading
11:15:30livcdif you ever hear that someone runs Nim in a Kiosk at the airport then that's me
11:15:56FromDiscord<Kiloneie> xD, wehat do you do with it ?
11:16:27AraqShield: what's wrong with OpenCollective?
11:17:06livcdKilonie: i process your passport
11:17:56FromDiscord<Shield> patreon is more popular and preferable by normies
11:18:41FromDiscord<Shield> if V dev can get money from it already, then why are you chosing to miss out on it?
11:18:49FromDiscord<niv> how about creating a page that lists "company x is using nim for y"?
11:19:25zedeushttps://github.com/nim-lang/Nim/wiki/Companies-using-Nim
11:20:06FromDiscord<Shield> more options to get support never hurts
11:22:19FromDiscord<Shield> i actually never heard of OpenCollective until recently
11:23:00FromDiscord<Kiloneie> i am thinking of opening a patreon account one day idk
11:23:23FromDiscord<niv> zedeus: thanks. i'll see about getting us on that list
11:23:37zedeusanyone can edit it
11:23:45FromDiscord<Shield> too bad, they increased their cut months ago, anybody who had an old page was unaffected
11:24:06FromDiscord<Shield> the opportunities one misses due procrastination...
11:24:06FromDiscord<Kiloneie> i know
11:24:07FromDiscord<niv> well, i need to run it by PR first ;)
11:24:15FromDiscord<Kiloneie> i was notified and put a note to do it...
11:24:26FromDiscord<Kiloneie> then for some bloody reason i didn't make an account
11:24:43*elrood quit (Remote host closed the connection)
11:24:44FromDiscord<Kiloneie> which is stupid that old patreon users get a bigger cut
11:25:05FromDiscord<Shield> you need to have an account and a project page, well, better make one before they increase it some more
11:25:41FromDiscord<Kiloneie> i will after i make some videos, speaking on which, i gotta go work on it
11:27:31livcdKilonie: I am joking. I am using Nim for some devopsy tasks nothing fancy.
11:28:52PMunchAraq, using gc:boehm works like a charm for this: http://ix.io/1WHG/Nim
11:29:24PMunchCompile and run that with --threads:on and it will crash at the third run of the loop. But with --threads:on --gc:boehm works like a charm :)
11:29:58FromDiscord<hershbergien> Hello. I’m looking on some advice for where to post a job listing for a full time Nim / python developer. US - DC area. Does this forum take job listings? Any advice is appreciated.
11:34:56PMunchHmm, the --gc:go option, how do I use that?
11:35:09PMunchIt complains that libgo.so is missing, is that this thing: https://github.com/yyzybb537/libgo?
11:35:34narimiran@hershbergien i think it will be more visible on https://forum.nim-lang.org/
11:35:51*sagax joined #nim
11:36:34*jken joined #nim
11:36:40jkenCongrats nim team!
11:39:07*ronny joined #nim
11:39:16ronnyhi
11:39:19PMunchAraq, seems like --gc:regions also works, feature or coincidence?
11:39:22PMunchronny, hi
11:40:23FromDiscord<Shield> regions is tricky to use
11:40:33FromDiscord<Shield> and i couldn't find libgo at all
11:40:46FromDiscord<Shield> i think you need to compile it yourself or something
11:41:14ronnysince nim has gone 1.0 (congrats) i decided to take another look - is there anything about nim on bare metal/uefi?
11:42:03*dddddd joined #nim
11:42:07PMunchronny, like booting into Nim directly? https://github.com/dom96/nimkernel
11:42:14FromDiscord<Shield> sharedmemory in regions is nothing special, it uses the normal malloc
11:43:18PMunchnarimiran: !eval echo (NimMajor, NimMinor, NimPatch)
11:43:22PMunch!eval echo (NimMajor, NimMinor, NimPatch)
11:43:25NimBot(1, 0, 0)
11:43:33*narimiran party time!!
11:43:41narimirannice job, PMunch
11:43:53PMunch🥳
11:43:54FromGitter<zacharycarter> hershbergien: I'd be interested in hearing more about that role
11:44:01livcd:D
11:44:14livcdi dont know why but it made me smile
11:44:21PMunchnarimiran, lots of work, had to wait for the docker images to update the manually trigger the script so I didn't have to wait for the cronjob :P
11:44:48dom96did someone have trouble with v1 in choosenim?
11:44:56dom96or is Araq just making me panic for nothing?
11:45:12FromDiscord<niv> !echo 1
11:45:20FromDiscord<niv> !eval echo 1
11:45:22NimBot1
11:45:22FromDiscord<niv> aww
11:45:26FromDiscord<niv> yay
11:45:32ronnyPMunch: correct - thanks
11:45:51narimirandom96: https://github.com/nim-lang/Nim/issues/12245
11:45:54FromDiscord<niv> dom96: installed 1.0.0 in choosenim just fine
11:46:00ronnyanother thing im curious about, how strictly is nim bount to stuff like a posix/windows style filesystem?
11:46:12narimirandom96: but i have another report that choosenim uses correct hash
11:46:27narimiran@niv what does your `nim -v` say? which git hash do you see?
11:46:38FromDiscord<niv> f7a
11:46:40livcdronny: i was not able to enumerate a unc share but I did not make a bug report so it's all on me
11:46:42dom96did you guys remember to update the .tar.gz that choosenim uses?
11:47:06narimirandom96: now we have two guys with the correct hash, one with wrong one
11:47:28dom96okay, I guess he updated before the new tarball was generated
11:47:42PMunchdom96, worked like a charm for me :)
11:47:44dom96next time change the `stable` channel until the new tarball is in place
11:47:52ronnylivcd: i dont think thats what i meant - im looking into providing a filesystem thats not posix/windows - and i wonder how badly nim would take it
11:47:57FromDiscord<niv> the sample in the linked issue page runs fine for me
11:48:03narimirandom96: anything special he needs to do (delete some cache?) to update to the correct version? (please write it there)
11:48:23PMunchronny, depends on what you do. If you use the built in file stuff then it translates to those on those platforms
11:49:45*rockcavera joined #nim
11:50:13ronnyPMunch: im toyingwith the idea of providing a own content access/addressing api that adds certain limits to enable different behaviours
11:50:46ronnyi dont yet know what exactly i want out of it (experimentation needed) but i do know for sure that traditional file apis are absolutely unsuitable
11:51:13PMunchHmm, still not sure what you mean, but it might be possible..
11:51:31FromDiscord<niv> windows x64 fread64() sometimes seeks the wrong offset in nim after reading :(
11:51:38PMunchHmm, --gc:go seems to not be happy: /usr/lib/libgo.so: undefined symbol: main.main
11:51:38FromDiscord<niv> its not a nim bug though
11:52:24ronnypractically sparking current operating system filesystems have a outer facade that takes a physical concept (folders), adds nesting, and then slaps onto it some metaata for extra stuff in a painfull way
11:53:24ronnyi would like to figure how a content management system for user data could look like if it wasnt limited by replicating a concept only really required for physical filing of items
11:55:49FromGitter<alehander42> ronny you can override
11:55:53FromGitter<alehander42> a lot of the os stuff i guess
11:56:09FromGitter<alehander42> but usually you need to add support to the compiler for a new platform
11:56:18FromGitter<alehander42> e.g. stuf f like dir separator etc
11:56:24FromGitter<alehander42> i also planned on writing a db-like filesystem
11:56:30FromGitter<alehander42> for a toy os
11:56:42FromGitter<alehander42> but still havent researched how hard would it be to adapt
11:57:13ronnywhere is setups where path separators per se are a completely non-sensical concept
11:58:01ronnyfor example imagine if a album of songs was expressed in the filesystem as listing of items each having a album, a track name and a track number, but not actually a "filename"
11:58:17ronnya classical "path" cant sanely address elements in here
11:58:37ronnyyoud need a path composed of named, keyed or indexed elements
11:58:49ronnyand it would need to know if its relative or absolute
11:59:50*lritter joined #nim
12:00:06FromGitter<alehander42> exactly, that's similar to what i thought
12:00:21FromGitter<alehander42> i planned on having tags and something like more general "categories/tables"
12:00:36FromGitter<alehander42> so in this case .. you dont really need the existing file system support i guess?
12:00:54FromGitter<alehander42> as the best api to work with your "filesystem" would be different anyway
12:01:26FromGitter<alehander42> ah, maybe i misunderstood you
12:01:39ronnyquestion is if there would be a sensible wrapper to allow the num compiler to work on top of being deployed/used in top of that
12:01:41FromGitter<alehander42> in my idea, its' possible that no obvious corelation exists
12:01:51FromGitter<alehander42> ahh, yeah thats also a good question
12:02:03FromGitter<alehander42> i imagined one can model a classic filesystem on top of a db-like filesystem
12:02:25ronnyi like to call classical filesystems "lost cause file systems"
12:02:27FromGitter<alehander42> after all you'll just use a subset of the functionality, so the compiler itself can target only that maybe
12:02:50FromGitter<alehander42> well, i still think they have pro-s
12:02:57FromGitter<alehander42> but yeah, i am mostly interested in experimenting
12:03:23ronnyall they have as "pro" is that everything kind of works with them
12:06:21ronnyone thing thats a real pain for examole is tracking which data items is where and how many backups do exist (which is kind of critical for stuff like personal image galeries, famili videos and so on)
12:06:41ronnybut im getting way to ot, so i'll stop now
12:06:52FromGitter<alehander42> yes, i agree
12:07:11FromGitter<alehander42> sounds interesting, does your project exist somewhere, or is it just a plan
12:08:06ronnygit annex is a tool that implements it on top of git wiht symlink adventures and custom tracking branches
12:08:38ronnyi'd like something more flexible and less git bound eventually, but for now i can manage reasonably fine so im under no pressure to try and reinvent everything
12:09:26FromDiscord<has1> why would nim do this?
12:09:27FromDiscord<has1> https://nim-lang.org/docs/sets.html
12:09:50couven92Do we have gRPC for Nim?
12:09:52FromDiscord<has1> calling the method "incl" instead of "include"
12:10:47PMunchcouven92, we have protobuf..
12:10:57narimiran@has1 congrats, you win todays nitpicking crown!
12:11:18couven92narimiran, does it look like the Nim crown?
12:11:25PMunchcouven92, but I don't think anyone have implemented gRPC
12:12:09couven92PMunch, https://stackoverflow.com/questions/48330261/protobuf-vs-grpc
12:12:20couven92Protobuf != gRPC
12:12:41PMunchYeah I know..
12:12:51PMunchBut gRPC uses Protobuf as the message format
12:12:58dom96has1: Were you able to fix your VS Code problems?
12:13:02FromGitter<alehander42> has1, it's a valid question
12:13:18PMunchSo if you wanted to implement gRPC you probably don't have to implement Protobuf for Nim to do so :)
12:13:18dom96to answer your question: because `include` is too long to type
12:13:38FromGitter<alehander42> which is not a good reason @dom96
12:13:40FromDiscord<has1> @gitterirc why is it a nitpick? Now i need to remember the special function name that nim picks
12:13:42FromGitter<alehander42> as we have contains etc
12:13:46FromDiscord<has1> is it incl, is it inc?
12:13:46planetis[m]its done my nimmers: https://gist.github.com/b3liever/caf536f34b5791afbc61a5d75e0de405
12:14:04FromGitter<alehander42> but i'd agree that after all, other similar shortenings are popular
12:14:10FromGitter<alehander42> like `len` `env`
12:14:10*clyybber joined #nim
12:14:17FromGitter<alehander42> so it's not too bad
12:14:42dom96it's a pretty good reason
12:14:43dom96it's a common operation and deserves a shortened name
12:14:45ronnyhmm, anyone aware of toolings for content addressed databases in nim?
12:15:00FromGitter<alehander42> @dom96 it's a horrible reason
12:15:03narimiran@has1 inc = increase, incl = include
12:15:13FromGitter<alehander42> in this i agree a lot with the "full word" camp
12:15:42dom96Indeed, it's the same reason that `len` isn't `length`
12:15:47dom96and `mod` isn't `modulus`
12:15:54FromGitter<alehander42> we have `include` `import` and `template` : there is not any actual objective metric on which incl should be shorter
12:15:59PMunchplanetis[m], so it's a more efficient way of doing https://nim-lang.org/docs/sequtils.html#zip%2CopenArray[S]%2CopenArray[T] when you're looping?
12:16:06FromGitter<alehander42> `len` `mod` and others have decades of history behind them
12:16:10dom96Anyway *shrug* this is bike-shedding
12:16:15FromGitter<alehander42> but this doesn't give us a license to shorten random words
12:16:25FromGitter<alehander42> i agree that it's late to change that
12:16:29FromGitter<alehander42> just saying it's a valid question
12:16:31FromGitter<alehander42> for newcomers
12:16:41dom96You're too late to complain about this by now, Nim is v1 after all ;)
12:16:53FromGitter<alehander42> nim 2.0 issues here we come :P
12:17:32FromGitter<alehander42> i got strongly influenced by ruby linters when i was younger
12:17:51FromGitter<alehander42> i even implemented a "does the user use valid english words as identifiers" as a check
12:17:56FromGitter<alehander42> for our uni linter..
12:18:30ronnyis there a nim code formatter like there is gofmt or black or rustfmt?
12:18:39FromGitter<alehander42> we made the poor students install aspell
12:18:48PMunchThis works pretty great with --gc:boehm http://ix.io/1WHW/Nim
12:18:51FromGitter<alehander42> so maybe i am too radical in that opinion sorry
12:19:00solitudesfronny, nimpretty
12:19:00lqdev[m]ronnypfannschmidt nimpretty
12:19:14FromGitter<alehander42> ronny , there is styleCheck option
12:19:17FromGitter<alehander42> and nimpretty
12:19:47ronnylovely, anyone aware of github actions for it?
12:21:00FromDiscord<has1> ```
12:21:00FromDiscord<has1> jsonNode["key"].getFloat() == 3.14
12:21:00FromDiscord<has1> jsonNode{"nope"}.getFloat() == 0
12:21:00FromDiscord<has1> ```
12:21:00FromDiscord<has1> Why would nim use this weird syntax to change the behavior of the function getFloat in this example??
12:21:00FromDiscord<has1>
12:21:02FromDiscord<has1> ```jsonNode.findInt() //doesnt raise exception
12:21:02FromDiscord<has1> jsonNode.getInt() //raises exception
12:21:03planetis[m]PMunch: its an iterator, could be improved further and also supports unlimited arguments
12:21:04FromDiscord<has1> ```
12:21:06FromDiscord<has1> why doesn't it simply do something like this instead?
12:21:12*abm joined #nim
12:21:32planetis[m]like: for x, y, z in zip(a, b, c): discard
12:21:52FromDiscord<has1> ```
12:21:52FromDiscord<has1> jsonNode["key"].getFloat() == 3.14
12:21:54FromDiscord<has1> jsonNode{"nope"}.getFloat() == 0
12:21:54FromDiscord<has1> ```
12:21:56FromDiscord<has1> Why would nim use this weird syntax to change the behavior of the function getFloat in this example??
12:21:57FromDiscord<has1>
12:21:59FromDiscord<has1> ```jsonNode["key"].findInt() //doesnt raise exception
12:22:01FromDiscord<has1> jsonNode["key"].getInt() //raises exception
12:22:02FromDiscord<has1> ```
12:22:04FromDiscord<has1> why doesn't it simply do something like this instead?
12:22:16PMunchplanetis[m], right
12:22:36PMunchhas1, please use a paste service, your messages gets passed directly to IRC which isn't great..
12:22:40narimiranok, third warning about multiple-line code pastes in half a day.
12:22:41FromGitter<alehander42> somebody has to fix the discord bridge indeed
12:22:48solitudesfthat not how it works.
12:23:07abmcongratulations on 1.0 guys
12:23:18FromGitter<alehander42> narimiran, that's honestly a discord bridge problem, it's very annoying to not be able to just use discord normally
12:23:27FromGitter<alehander42> we cant expect all new users to know this
12:23:40FromGitter<alehander42> sorry @dom96 for the too strong opinion about length, i realized i use a lot of shortenings too
12:23:54narimiranwe can at least expect them to react to multiple warnings about it
12:24:41dom96also, when you edit your message on Discord it gets re-sent fully
12:24:42dom96with the changes
12:24:50FromGitter<alehander42> narimiran, you can't expect warnings to fix behavior coming from `default ux` of apps
12:25:01FromGitter<alehander42> exactly, this is also something totally not obvious for discord users
12:25:02dom96This Discord bridge is quite dumb, and I'm tempted to just kill it to be honest
12:25:36FromGitter<alehander42> can't we somehow reuse the gitter bridge logic
12:25:38planetis[m]first thing that comes to mind is see if "for i, (a, b) in enumerate(zip(x, y))" works
12:25:40FromGitter<alehander42> it seems to work fine
12:26:20FromDiscord<has1> its literally 2 lines
12:26:21FromDiscord<has1> each time
12:26:35FromDiscord<has1> I mean seriously, are you telling me i am not allowed to ask questions about nim here?
12:26:49FromDiscord<has1> Because how else am i going to ask questions if i cant even post a 2 line snippet?
12:27:04FromGitter<alehander42> calm down, it's a discord bridge issue, the problem is that it leads to horrible ux on gitter/irc
12:27:07FromGitter<alehander42> it's not your fault
12:27:07FromDiscord<has1> its not like i am pasting 30 lines of code in here, its 2 lines.
12:28:03FromGitter<alehander42> i am not sure whats findInt
12:28:06FromGitter<alehander42> in your example
12:28:28FromDiscord<has1> its a made up function by me, i thought this was a convention
12:28:51dom96has1: no, it's 4 lines, the three backticks get sent before and after too
12:28:52FromGitter<alehander42> i'd say `get<X>` is more idiomatic
12:29:00*birdspider quit (Read error: Connection reset by peer)
12:29:02FromDiscord<has1> for example FindById(id) might return null or User
12:29:20FromDiscord<has1> whereas GetById(id) would throw an exception or return a User
12:29:22FromGitter<alehander42> `findX` doesn't sound right to me
12:29:30FromGitter<alehander42> it sounds like something that wroks on a collection
12:29:43FromGitter<alehander42> it's not a good name for an extracting method
12:29:44FromDiscord<has1> why? it tries to find X in the json
12:30:03FromDiscord<has1> and get ether gets it or raises an exception
12:30:09FromGitter<alehander42> not really: you already have the "int" value, in json form, you just need to extract the actual int from it
12:30:11FromDiscord<has1> this is like the perfect example of a find and get method
12:30:15FromGitter<alehander42> find implies iteration
12:30:20FromGitter<alehander42> imho
12:30:34FromGitter<alehander42> and searching across multiple int-s
12:30:38FromGitter<alehander42> here you have just one int
12:30:41dom96find implies performing some action to find something
12:30:42dom96I also don't think it's a good name for this operation
12:31:10owl_000it is like a festival, lot of people talking today
12:31:19FromGitter<alehander42> usually `[]` throws an exception and `get` / `getOrDefault` returns a default value
12:31:20FromGitter<alehander42> iirc
12:31:39*lritter quit (Remote host closed the connection)
12:31:54FromDiscord<has1> I mean the docs literally say
12:31:54FromDiscord<has1> "By using the {} operator instead of [], it will return nil when the field is not found"
12:32:05FromDiscord<has1> it literally says it tries to FIND it
12:34:32FromGitter<alehander42> and you can notice that `{}` has no equivalent to getInt
12:34:44FromGitter<alehander42> `{}` is exactly the find operation
12:34:53FromGitter<alehander42> which searches in e.g. an object for this field
12:35:06FromGitter<alehander42> getInt works on the return value of `{}`
12:35:17FromGitter<alehander42> which is a single value
12:41:13FromGitter<alehander42> it would be better to say that `[]` is `[] ` and `{}` is `find` : so if you insist on using a single method, you can do stuff like `a.find().getInt()` or even `a.find[int]()`
12:41:31FromGitter<alehander42> `a.find[int]("value")` *
12:45:24FromDiscord<has1> this may sound like a silly question, but could someone explain to me why or when you would use ```[]``` ? why would you want to raise an exception?
12:45:31solitudesfwhy does that matter? i still have no clue which one does what without reading the docs
12:46:06FromDiscord<has1> lets say someone calls your function with some json, wouldn't you want ```[]``` to return an error so you can return an error to your caller saying "invalid json format" or something like that?
12:46:26lqdev[m]has1: sometimes you may wanna handle IOOB errors explicitly
12:46:28FromDiscord<has1> Maybe i am just too used to the "Go way" of doing things
12:47:09FromGitter<alehander42> solitudesf it's pretty important to know if your calls raise
12:47:42FromGitter<alehander42> has1 you're correct, it's important to keep track of your errors
12:47:46solitudesf@alehander42, yes, and the name of the procs dont tell me anything about raising
12:48:06FromGitter<alehander42> because usually the docs do, or there is a convention
12:48:18FromGitter<alehander42> usually `[]` raise : e.g. in seq-s, arrays, tables, json
12:48:56FromGitter<alehander42> usually `get` family can return a default / other arg value
12:49:01FromGitter<alehander42> e.g. `getOrDefault` from tables
12:49:27FromGitter<alehander42> or getOrDefault in json
12:52:09*Hideki_ joined #nim
12:53:28FromDiscord<Kiloneie> Oh man it took 42 screenshots with edits to make written version of my intro D:...
12:53:46FromDiscord<Shield> i never had a problem with nim's naming convention, besides, you can just add a template and call it anything you want
12:54:32FromDiscord<has1> that is not a good argument though (imo) you want to write consistent and readable code and use buy into the way the programming language does things
12:54:47FromDiscord<has1> fighting the programming language convention is not really a good idea
12:55:12FromDiscord<has1> that is not a good argument though (imo) you want to write consistent and readable code and buy into the way the programming language does things
12:55:50solitudesfso, other languages dont use abbreviations for common operations or custom operators?
12:55:56FromDiscord<has1> if everyone does their own thing, then using some third party dependency is going to be one hell of a mess, one person does it this way, the other person does it that way, etc
12:56:41FromDiscord<Shield> is it really fighting the language tho?
12:57:23FromGitter<alehander42> i agree with has1 , good conventions/default ways of doing things are very important
12:57:34FromGitter<alehander42> but as i said, i think nim does have an ok convention about that
12:58:09FromDiscord<has1> I would assume that nim does that in more places than just the json module
12:58:29FromGitter<alehander42> but as we said, raising is more normal in stdlib
12:59:07FromDiscord<Shield> here's how your "just 2 lines of code" snippet looks like in irc and gitter, that's why it's encouraged to use a pastebin or something
12:59:07FromDiscord<Shield> https://cdn.discordapp.com/attachments/371759389889003532/626039902391500810/0924135532.png
12:59:43FromGitter<alehander42> so you need to catch those errors: you can also use the effect system to enforce that(it makes you annotate what errors can your function have
13:00:41FromDiscord<Shield> https://nim-lang.org/docs/nep1.html
13:00:55FromDiscord<Shield> the language has a clean naming convention that is respected through the whole stdlib
13:01:29FromDiscord<Shield> most of the time an alias is provided too
13:08:44FromDiscord<has1> @Shield sure it might not look super nice on irc, but does that mean that everyone has to "suffer" even if they just want to ask a question about a 2 line snippet?
13:08:49*Hideki_ quit (Remote host closed the connection)
13:08:52*whaletechno joined #nim
13:09:19FromDiscord<has1> Also, this makes the conversation harder to follow if you have to constantly go visit a third party website to read the code to a question
13:09:42*Hideki_ joined #nim
13:10:02FromDiscord<has1> instead of skimming though the text, you have to go through 10 links just to look at 2 lines of code, that doesn't seem like a good solution either
13:10:45FromGitter<alehander42> thanks for the link Shield, we have to add the "use a func if possible, if not a proc"
13:10:48FromGitter<alehander42> to one of the sections
13:12:12narimiranany experienced lisper (and/or heavy user of nim macros) here? maybe you could answer this: https://news.ycombinator.com/item?id=21058846
13:13:10PMunchHeavy Nim macro user you say?
13:13:22narimiran:)
13:13:39PMunchAt this point I think I've got more lines of codes in macros than actual code
13:14:13*Hideki_ quit (Ping timeout: 268 seconds)
13:14:59federico3not good
13:17:00FromGitter<alehander42> not bad if you're a lib author
13:17:33clyybberPMunch Just goes to show that your macros are great
13:18:36*NimBot joined #nim
13:18:39FromGitter<alehander42> i'd say some of the elisp people
13:18:40FromGitter<alehander42> like @krux02
13:18:47FromGitter<alehander42> might be a good fit for answer as well
13:18:58FromGitter<alehander42> what happened with krux02 btw
13:20:28krux02well I don't post on hacker news, never did.
13:20:42FromGitter<alehander42> a matter of principle, i see
13:20:52FromGitter<alehander42> congrats on the 1.0 krux02
13:21:01krux02thanks
13:21:53narimiranPMunch: you're missing `http` in your first link
13:23:23*theelous3 joined #nim
13:24:03PMunchnarimiran, fixed, thanks :)
13:25:46FromGitter<alehander42> i'd say async/await is a good macro example as well
13:25:52FromGitter<alehander42> another thing to point out is
13:25:59FromGitter<alehander42> that we dont do reader macros
13:26:12FromGitter<alehander42> which i guess are more similar to token macros in rust
13:26:17planetis[m]I can't call an items iterator, right? like ```let x = items(a); x()```
13:26:49FromGitter<alehander42> but one can say that maybe our syntax is flexible enough, that we dont see a big need for thos
13:27:24planetis[m]No way to make zip macro work with tables, I think
13:27:42PMunchplanetis[m], just mark it as {.closure.} :)
13:27:49FromGitter<alehander42> PMunch but if you can , at least add the fact we can
13:28:00FromGitter<alehander42> input types, not only ast-s
13:28:08FromGitter<alehander42> this is a big difference compared to lisp maybe
13:29:29*couven92 quit (Read error: Connection reset by peer)
13:29:30PMunchHuh?
13:30:40FromGitter<alehander42> our macros can work on and analyze types
13:30:43FromGitter<alehander42> not only on ast
13:31:00FromGitter<alehander42> e.g. the getImpl thing etc
13:31:03clyybberPMunch Did you update the NimBot?
13:31:24PMunchplanetis[m], I misunderstood what you meant, if you declare it as {.closure.} then every call of the iterator takes an argument. But you can do this to do what you want: https://play.nim-lang.org/#ix=1WIx
13:31:25FromGitter<alehander42> e.g. how the json decode macros function
13:31:45narimiranclyybber: yep, it is updated
13:31:47PMunchclyybber, I don't maintain the Nimbot. But I did update the playground which is what the NimBot uses to run Nim code :)
13:32:08clyybberAh ok, cool :
13:32:10clyybber:)
13:32:27PMunchalehander42, hmm feel free to add a comment :)
13:32:39narimiranclyybber: you can try to run `echo (NimMajor, NimMinor, NimPatch)` in the playground, just to be sure :)
13:32:58planetis[m]thanks for the suggestion, but will leave it for types with `[]` only for now, because it seems inefficient
13:34:21FromDiscord<has1> wow nim is very interesting
13:34:38narimiran:)
13:35:13FromDiscord<has1> so if i have a proc like this
13:35:13FromDiscord<has1> ```proc name(a: var string)```
13:35:13FromDiscord<has1>
13:35:13FromDiscord<has1> I can only pass a var into this function
13:35:22FromDiscord<has1> so does that mean internally it is using a pointer here?
13:35:58clyybber!eval echo NimMajor, NimMinor, NimPatch
13:36:01NimBot100
13:36:08clyybbernice
13:36:21clyybberhas1: Exactly
13:36:56FromDiscord<has1> that is actually really interesting, so does nim not have pointers?
13:37:09PMunchWell it does
13:37:29PMunchBut they are mostly used for interfacing with C, or passing things between threads/other unsafe tasks
13:38:01narimiranclyybber: i put those parentheses there for a purpose ;) (nicer output of a tuple)
13:38:13PMunchAnd they have ref objects which follow reference semantics instead of value semantics
13:38:16narimiran!eval echo (NimMajor, NimMinor, NimPatch)
13:38:19NimBot(1, 0, 0)
13:38:23clyybberhas1: It does, but having var parameters allows you to do `name(someVar)` instead of `name(addr someVar)`
13:38:45clyybbernarimiran: Heh :p
13:39:24FromDiscord<has1> yeah i like the way nim does it, i just saw the pointers are in the advanced docs, ill have to read through that 🙂
13:40:44PMunch!eval if NimMajor == 1: echo "\u1F4AF"
13:40:46NimBotὊF
13:42:16FromGitter<alehander42> ref is garbage collected ptr
13:42:18PMunch!eval if NimMajor == 1: echo "\u{1F4AF}"
13:42:21NimBot💯
13:42:30PMunchAy, that's better :)
13:42:35clyybber!eval echo "\033]4;14;#333333\007"
13:42:37NimBot!]4;14;#333333
13:42:47FromGitter<alehander42> poor nimbot
13:42:50PMunchHaha
13:43:13clyybberWell, it would be kind of funny if NimBot could remotely change my terminal colorscheme
13:43:38clyybber!eval echo """\033]4;14;#333333\007"""
13:43:41NimBot\033]4;14;#333333\007
13:44:48FromDiscord<has1> How long does the nim compiler take compared to the Go one? I know that generics and macros and templates and all of that will make compiling harder
13:45:10FromDiscord<has1> what would it look like for a medium sized project?
13:46:43*navin joined #nim
13:46:50PMunchWell depends on your definition of medium size..
13:47:44PMunchThe playground builds in 3.3s through nimble (which checks package dependencies and such) and 1.1s with just Nim
13:47:47PMunchThe back-end that is
13:48:22FromDiscord<has1> i mean does it usually take more than 5 seconds?
13:48:35PMunchThe front end takes 0.3 seconds to build into JS
13:48:41FromDiscord<has1> not including dependency resolution
13:49:26PMunchWell it depends, but in general I'd say no
13:49:28FromDiscord<has1> my local one took
13:49:28FromDiscord<has1> ```operation successful (46223 lines compiled; 1.148 sec total; 70.57MiB peakmem; Debug Build)```
13:49:30*Hideki_ joined #nim
13:49:50FromDiscord<has1> a simple go one takes 200MS
13:50:07PMunchFor example building the controlgallery example from wxNim takes 1.7s on this machine
13:50:10FromGitter<alehander42> it's impossible to say without a cpu / other spec
13:50:39PMunchThat links in a bunch of C++ code from WxWidgets, and uses a macro to create the code used for the GUI
13:51:00FromGitter<alehander42> but generally i'd say a medium project should take max 1-2 seconds
13:51:06FromGitter<alehander42> or even less
13:51:22FromGitter<alehander42> but really depends on the machine, on the amount of compile time stuff as you say
13:51:28FromGitter<alehander42> on the project itself etc
13:51:35PMunchCompile-only (not running g++ on the output) takes 0.4s
13:51:48lqdev[m]side question: is it ok to use pointers when performance really matters?
13:51:56FromGitter<alehander42> incremental compilation is WIP has1
13:52:14FromGitter<alehander42> after it's done, even big project re-compilation on development should be fast
13:52:49PMunchOf course some time is spent writing stuff in the terminal, piping all output to /dev/null it fully builds in 0.6s and only to C++ sources in 0.4s
13:53:04FromGitter<alehander42> has1 what kind of apps are you working on
13:53:06PMunchlqdev[m], sure, why wouldn't it be?
13:53:14PMunchAs long as you make sure you don't mess up :P
13:53:17FromGitter<alehander42> e.g. i'd say for medium web services for which go is typical
13:53:23FromGitter<alehander42> nim should be pretty fast as well
13:53:51FromGitter<alehander42> (i hope faster for runtime, fast enough for compile time)
13:54:57PMunchYeah it's one of the things I really like with Nim, it compiles so fast that you can just write code, execute the program and see what happens, and go back to writing code really fast.
13:55:05FromDiscord<has1> it seems very impressive to me
13:55:17FromDiscord<has1> considering all the features that nim has
13:55:45Cadeyhas1: how do you define medium size?
13:58:50*Hideki_ quit (Remote host closed the connection)
13:58:52lqdev[m]PMunch: I thought it would go against idiomatic Nim code, but ok
13:59:09*Hideki_ joined #nim
14:00:08PMunchOh yeah, for sure, but when performance really matters, to hell with idiomatic code :P
14:00:12*Hideki_ quit (Remote host closed the connection)
14:01:55*couven92 joined #nim
14:02:31FromDiscord<has1> @Cadey~ oh you should know the difference
14:02:34FromDiscord<has1> you use go too 🙂
14:02:51Cadeywhat does medium size mean though?
14:02:53FromDiscord<has1> or wait, those are 2 different users
14:02:58Cadeysame person
14:03:13FromDiscord<has1> it doesnt matter, i am talking about the difference between go and nim
14:03:30FromDiscord<Cadey~>
14:03:30FromDiscord<Cadey~> https://cdn.discordapp.com/attachments/371759389889003532/626056112051060763/image0.png
14:03:31FromDiscord<has1> as long as both have the same size
14:03:39Cadeywhat does size mean?
14:03:41Cadeylike
14:03:52Cadeyyou keep saying "the same size" but you are not clarifiying what you mean
14:04:09narimiranCadey: what font is that?
14:04:46CadeyMonoid
14:05:23FromDiscord<has1> because i was trying to avoid the definition of size :p I was just curious how the nim compiler compares to the go compiler and how long it takes for code to compile medium for you could be the size of the kubernetes codebase
14:06:19Cadeyi don't know why you think the kubernetes codebase is "medium" sized, but okay
14:06:46FromGitter<alehander42> i'd say kubernetes is not minimal: it's the "example" of a big go codebase
14:07:05Cadeyon average my go projects take about as much time to compile as my nim projects do, but my nim projects tend to have fewer dependencies and a finer scope
14:07:22Cadeyhttps://github.com/Xe/since and https://github.com/Xe/bsnk are probably a good example of this?
14:07:33Cadeyit's basically the same thing in both go and nim
14:07:51Cadeybut the differences in compile time have been unnoticeable
14:08:02Cadeyhowever i haven't really looked that much into detail
14:08:15Cadeybecause it hasn't practically mattered yet
14:08:25*PMunch quit (Remote host closed the connection)
14:08:29FromDiscord<has1> i wasn't saying that i think that kubernetes is medium sized. I was saying that you might think that and it wouldn't matter (as long as you compare the same project from go to nim)
14:08:32FromDiscord<has1> 🙂
14:08:39FromDiscord<has1> but that sounds nice
14:08:58Cadeyi don't think measuring code "size" is a metric worth caring about personally
14:09:06Cadeythis stuff is _so subjective_
14:09:14FromDiscord<has1> true
14:09:23Cadeya more complicated Nim codebase (that I just cannot replicate in Go for expressiveness reasons) would be some of my computational linguistics code in https://github.com/Xe/mapatei
14:09:50Cadeybut this is complex in terms of the subject matter, not the size of it
14:13:31lqdev[m]Nim's way better than groovy (with gradle)
14:13:53lqdev[m]that thing is just sooo slooow
14:13:53lqdev[m]10 seconds to build a relatively uncomplicated app
14:14:05Cadey"better" is a subjective term anyways, sometimes the groovy solution is better because it's more maintainable by the buisiness' practices and existing talent
14:14:18*couven92 quit (Quit: Client disconnecting)
14:15:06lqdev[m]I'm saying better in terms of compile times. Time is not subjective.
14:15:19Cadeyagree to disagree
14:15:43Cadey(but that's probably the more buddhist side of me speaking)
14:16:48lqdev[m]it's hard to convince me because I'm really stubborn :P
14:17:03FromGitter<alehander42> i'd say incremental compilation should really fix the remaining issues for big projects
14:17:03FromDiscord<Shield> is compilation time really a good unit to measure the effectiveness of a language?
14:17:11FromGitter<alehander42> but i am not sure when is it supposed to come
14:17:12owl_000nim 1.0.0, first compile is successful, but compiling second time produces, raiseOSError, The Filename, directory is incorrect
14:17:15FromGitter<arnetheduck> if you need something to benchmark with, https://github.com/status-im/nimbus/ is maybe reaching medium-size by now - we have roughly 10 devs working on it so it's no longer a pet hobby toy - it's still not feature-complete compared to similar projects, but has enough code. we have issues that bother us a lot more than compile times.,
14:17:21FromGitter<alehander42> maybe 1.2 ? there was a roadmap somewhere
14:17:39CadeyNim hitting 1.0 makes me feel more confident about using it at work though
14:17:46FromGitter<alehander42> that's the goal
14:17:52Zevvthat was exactly the point
14:17:58Zevv^
14:18:09narimiranowl_000: submit a github issue with all the details, so we can try to reproduce
14:19:18owl_000https://i.ibb.co/cvh2dX6/Capture.png
14:19:49Cadeyowl_000: https://github.com/nim-lang/nim/issues/new
14:19:59narimiranthanks, Cadey :)
14:20:22Cadeyplease put the contents of `color.nim` in the bug report too
14:20:25lqdev[m]oh yes the errors are starting to come in
14:20:25narimiranbut, owl_000, please use this template: https://github.com/nim-lang/Nim/issues/new?template=bug_report.md
14:20:27lqdev[m]party's over
14:20:29Cadeythat'll help people find out the badness
14:20:36FromGitter<alehander42> btw can we get github activity similar to the so activity in https://gitter.im/JuliaLang/julia
14:20:42Cadeynarimiran: weird, i thought github did that by default
14:20:43FromGitter<alehander42> not many people use gitter tho
14:20:47FromGitter<alehander42> maybe not important
14:21:32lqdev[m]guess what: I got my first 1.0 sigsegv yesterday but I didn't wanna tell you to not ruin the party
14:21:34narimiranbtw, i'm surprised to see those `../../../../C:/etc.` in that screenshot. i was sure it has been fixed
14:21:37owl_000it works for simple program, but whenever i use library like `nigui` or `wnim` it compiles first time, but second time doesn't work. ok in github issue
14:21:42FromGitter<alehander42> i got a pancake sigsegv
14:21:51FromGitter<alehander42> but araq told me to shut up
14:22:00narimiranlqdev[m]: thanks for not ruining the party :)
14:22:16lqdev[m]alehander42: yeah I remember that haha
14:22:45lqdev[m]narimiran: np, I wanted to party a little as well :)
14:26:42*endragor quit (Remote host closed the connection)
14:28:15*navin quit (Remote host closed the connection)
14:30:39*navin joined #nim
14:36:57owl_000do i need to add the screenshot?
14:37:01owl_000in github issue
14:37:43narimiranit won't hurt
14:38:20narimiranthe key to easier reproducing and fixing is in the detailed and precise bug report
14:39:27*navin quit (Remote host closed the connection)
14:41:17*navin joined #nim
14:41:24owl_000https://github.com/nim-lang/Nim/issues/12249
14:41:43owl_000https://i.ibb.co/cvh2dX6/Capture.png it is too big
14:43:00owl_000how to force clear cache of nim while compiling
14:43:13FromGitter<alehander42> `-f` ?
14:43:50owl_000with f it compiles, but when i remove f, same oserror
14:46:23FromGitter<alehander42> hm, can you `ls -al` your nimcache foler
14:46:27FromGitter<alehander42> after the first build
14:47:23owl_000windows
14:47:28owl_000dir>
14:47:32*adeohluwa joined #nim
14:48:21*whaletechno quit (Quit: ha det bra)
14:49:00owl_000yes that is duplicate
14:49:33owl_000he used wnim, in this case i used nigui, different package
14:49:50narimiranyeah, but the result is the same
14:49:54*krux02 quit (Remote host closed the connection)
14:49:59owl_000the problem is with caching maybe
14:50:35narimiranif you're up to it, can you create a different file, where you *don't* import any nimble packages. (i want to see if it is nimble-related, as nimble packages have been used in both examples)
14:51:34clyybberBtw, what happened to krux02?
14:51:35owl_000yes, in the issue, i mentioned that, i can compile `echo "hello world"` as many time as i want
14:51:46owl_000without any issue
14:52:05narimiranowl_000: oh, i didn't read thoroughly enough. sorry
14:52:37narimirandom96, shashlick: i think we have a nimble problem on windows! see #12249 and #12242
14:52:48owl_000no problem. let me check about stdlib
14:54:00leorize[m]sounds like a possible problem with how c files are named
14:54:24leorize[m]we might have triggered some win32 special names maybe?
14:54:32owl_000no problems with stdlib, (import strformat)
14:55:33FromGitter<arnetheduck> fwiw, the bridge we use between gitter and discord handles edits just fine
14:55:36*lmariscal8 quit (Quit: I'm out!)
14:55:42FromGitter<arnetheduck> matterbridge, I think it's called
14:55:58*lmariscal joined #nim
14:56:45clyybberHow are the edits shown? Via s/../.. ?
14:56:59*adeohluwa quit (Remote host closed the connection)
14:57:48FromGitter<arnetheduck> on gitter, they don't, as in the message just changes. we don't bridge to irc however, not sure what happens there
15:04:02lqdev[m]@arnetheduck if your definition of 'just fine' is resending the same message but edited, then yes, it's fine
15:04:52dom96narimiran: nimble problem? How so?
15:05:15*navin quit (Remote host closed the connection)
15:05:30*navin joined #nim
15:06:59FromDiscord<Kiloneie> How do you uninstall Nim other than opening the folder in the start menu and deleting the folders ? is there a way to fully install it, cleanly ?
15:07:17FromDiscord<Kiloneie> Or is that just it ?
15:07:38FromGitter<zetashift> remove it from PATH and delete the folders that should be it
15:07:50FromGitter<zetashift> don't know if choosenim has an uninstall arg
15:11:21*navin quit (Remote host closed the connection)
15:15:04FromDiscord<Kiloneie> from System Information ?
15:15:23FromDiscord<Kiloneie> i removed folders and all and i don't see it anywhere in there
15:15:45lqdev[m]can anyone please help me debug a strange segmentation fault? http://ix.io/1WJa
15:16:20lqdev[m]this seems to be a soundio thread
15:16:27*PMunch joined #nim
15:16:44lqdev[m]lib/system/arithm.nim:349 is raiseOverflow, so it would seem like an integer overflow
15:16:54lqdev[m]but I haven't a single clue why it happens
15:17:01lqdev[m]the program just crashes silently
15:17:25FromDiscord<Kiloneie> i don't see any path targeting my desktop, or anything, i just see CYGWIN
15:18:13*navin joined #nim
15:18:14FromDiscord<Kiloneie> Maybe it deletes itself if you delete the folders from where Nim is along with the folders in the Start Menu ?
15:18:45clyybbernarimiran: Is krux02 no longer part of nim-lang? Or is he just on holidays?
15:19:03leorize[m]he works on big stuff
15:19:11clyybberOh, what stuff?
15:19:28narimiranclyybber: neither. he's just not active in this channel, if this is why you ask
15:19:37*navin quit (Remote host closed the connection)
15:19:39leorize[m]the new quoteAst intended as quote replacement
15:20:11leorize[m]you can look for PRs from him in the Nim repo
15:20:14clyybbernarimiran: Nah, I just noticed he isn't displayed in the nim-lang org on github anymore
15:20:38*navin_ joined #nim
15:20:46narimiranclyybber: here? https://github.com/orgs/nim-lang/people he's here
15:20:51*navin joined #nim
15:20:51*navin quit (Remote host closed the connection)
15:21:06clyybbernarimiran: Huh, wth. Not for me
15:21:40narimiranoh, now i see. his membership is set on private, so that's why you're not seeing it
15:22:11clyybberAh, that explains it
15:26:13*navin_ quit (Remote host closed the connection)
15:26:34lqdev[m]what are the most common causes of stack corruption when using Nim?
15:26:53*navin joined #nim
15:26:55*navin quit (Client Quit)
15:27:33*Vladar quit (Remote host closed the connection)
15:29:29clyybberlqdev[m]: Speaking from experience, stupid mistakes involving pointers
15:29:48clyybberlqdev[m]: Also valgrind is a godsend
15:30:31lqdev[m]clyybber: too bad I'm testing on windows
15:30:45lqdev[m]this seems to be a threading issue
15:30:59lqdev[m]the sigsegv happens on a separate, soundio-created thread
15:31:26clyybberHmm, in planet-overgamma?
15:31:36clyybberDo you have the crashing code on github?
15:31:39lqdev[m]nope, in rapid
15:31:40lqdev[m]tests/taudio
15:31:57lqdev[m]there https://github.com/liquid600pgm/rapid/blob/master/tests/taudio.nim
15:33:57clyybbernimterop is taking a while..
15:34:57lqdev[m]yeah, that's usually the case on a hard drive
15:35:07lqdev[m]the first time you compile it
15:35:32clyybberOk
15:35:33lqdev[m]it's quite faster if you use an SSD
15:35:47clyybberIt says Error: unhandled exception: Could not open file for playback [IOError] for me
15:36:00clyybberlqdev[m]: I don't have HDDs anymore :D
15:36:00lqdev[m]huh
15:36:05lqdev[m]where are you running this from?
15:36:20clyybbercd tests
15:36:25lqdev[m]you should run from the root directory so it can access the sampleData folder
15:36:30clyybberAh, ok
15:36:57lqdev[m]it's not good practice, I know, but this codebase is quite old and I'm too lazy to change things
15:37:00clyybberOk, it opens a new window and plays a sound
15:37:06lqdev[m]hmm
15:37:09clyybberNo sigsegv for me
15:37:16lqdev[m]that's on windows?
15:37:41clyybberNope, linux
15:37:47lqdev[m]that explains it
15:37:57lqdev[m]it works just fine on linux
15:37:57*matlock joined #nim
15:38:10lqdev[m]it's windows I'm having issues with
15:38:12clyybberYeah valgrind doesn't throw any errors either afaict
15:38:31lqdev[m]should've mentioned that earlier…
15:38:38clyybberlqdev[m]: I think zacharycarter mentioned Dr Memory or something like that
15:38:46clyybberWhich could help perhaps
15:39:15lqdev[m]looks promising
15:39:21lqdev[m]I'll try it out
15:39:39*narimiran quit (Ping timeout: 265 seconds)
15:39:46lqdev[m]and I sincerely hope my sister doesn't kill me for downloading so many dev tools onto her laptop lol
15:40:34clyybberlol
15:51:44lqdev[m]copying files on windows irl: "your admin requires me to scan this file, hold on a sec" every 10 seconds
15:52:21lqdev[m]I'm sick of this OS, it's annoyed me for so many years I was glad when I switched. but I guess this world isn't perfect and I still have to deal with crap like this
15:54:23sealmoveanyone knows scala here? I am really tilted :@
15:54:57Zevvaww, we're of the HN frontpage :(
15:56:21sealmovewhy is that bad?
15:57:26kungtotteIt's not bad as such, it's just that people on there have really strong opinions that they confuse with facts
15:58:09*jxy quit (Quit: leaving)
16:00:13clyybbersealmove: I know it a bit, from minecraft modding :D
16:01:53sealmoveclyybber: I think I might be using sbt the wrong way, please take a look https://github.com/kaitai-io/kaitai_struct/issues/626
16:02:48clyybbersealmove: Ah, can't help you there, I never messed with sbt.build files since I used gradle
16:02:56FromGitter<zetashift> @sealmove I got some scala knowledge, everything except implicits
16:02:58sealmoveoh I see, ok
16:04:04*djazz joined #nim
16:05:38lqdev[m]dang, the program ran really slow initially but with dr memory it's even slower
16:05:44lqdev[m]it's almost stuck
16:05:47lqdev[m]I guess it's because of the GC
16:06:07lqdev[m]it's doing some funky stuff that dr.m doesn't like
16:06:18FromGitter<zetashift> I'm not sure what's wrong with that sealmove, you might be better off in the scala gitter chat
16:06:28*jxy joined #nim
16:07:25clyybberldqev[m]: Ah yeah, for using valgrind and the like I recommend compiling with --newruntime
16:07:49clyybberAnd perhaps even -d:useMalloc (dunno if required on windows)
16:08:03clyybberlqdev[m]: Do you use ref extensively in rapid?
16:08:15lqdev[m]yeah
16:08:39*nif quit (Quit: ...)
16:08:46clyybberOk, try compiling with --newruntime anyways I'd say
16:08:48*djazz quit (Client Quit)
16:08:49*nif joined #nim
16:08:53clyybberand then run the result with dr memory
16:09:40lqdev[m]no thanks, I don't want to rewrite my entire codebase against newruntime
16:09:55lqdev[m]I just want to know what's up with that sigsegv
16:09:55clyybberlqdev[m]: Just try if it works
16:10:04clyybbermaybe it just works out of the box
16:11:17lqdev[m]oh wow I just tested on Linux and it seems like there's a segfault here too
16:11:59clyybberlqdev[m]: Well I can't reproduce
16:12:16lqdev[m]that's a different crash than the one on windows, tho
16:12:31lqdev[m]maybe I need to do setupForeignThreadGc or sth
16:13:07clyybberhmm, good luck on that :), bbl
16:13:08*clyybber quit (Quit: WeeChat 2.6)
16:13:28lqdev[m]dang, dr memory didn't help much
16:13:46lqdev[m]apparently there's an uninitialized pointer read
16:13:59lqdev[m]of addresses 0x18-0x20
16:14:05lqdev[m]which is very weird
16:15:38*shota joined #nim
16:19:02FromGitter<arnetheduck> that's usually reading an object member through a nil ref (0 + offset of member)
16:19:31FromGitter<arnetheduck> the nil checking in nim is broken / covers only a few situations
16:20:02*shota quit (Ping timeout: 245 seconds)
16:28:00lqdev[m]hmm
16:33:45lqdev[m]ah I think I know what it is
16:34:30lqdev[m]I need to preallocate any seqs ahead of time since syscalls are too slow to be used in the audio thread
16:35:04*adeohluwa joined #nim
16:37:03lqdev[m]did the semantics of setLen change?
16:37:15lqdev[m]does it shrink the seq in memory?
16:37:42FromGitter<mratsim> No
16:37:56FromGitter<mratsim> Reserved memory stays the same
16:40:01lqdev[m]that's weird, then
16:40:55lqdev[m]this is the backtrace when the segfault occurs https://termbin.com/upvf
16:41:22lqdev[m]afaict a garbage collection is triggered in the audio thread which should never happen
16:41:28lqdev[m]how can I avoid such "mishaps"
16:41:31lqdev[m]?
16:43:00Zevvlqdev[m]: I think I did similar things in SDL. Are your running Nim code in a non-nim thread?
16:43:10lqdev[m]yes
16:43:23lqdev[m]that's why I thought system.setupForeighThreadGc could solve things
16:43:37lqdev[m]but there mustn't be any syscalls done in that thread
16:43:44ZevvI tried that but it was a hassle. In the end I just do buffer passing C style
16:44:06lqdev[m]you mean constant size buffers?
16:44:08ZevvPlain old ringbuffer
16:44:39lqdev[m]hmm, that could work
16:44:39lqdev[m]guess I'll write an implementation of that
16:44:40ZevvAnd if your audio buffers are constant size you might just allocate a small number of buffers
16:44:52Zevvand round robin those - essentially also a ringbuffer of course
16:45:34lqdev[m]well I'm afraid they won't be constant size on some audio drivers and such, that's why I wanted to use a seq there
16:45:50ZevvThat'll blow up in your face.
16:46:08lqdev[m]using seqs? it already did
16:46:20ZevvI'd say: create a fair size static ringbuffer, read and write pointers.
16:46:46Zevvindices instead of pointers is probably easier.
16:46:49lqdev[m]it worked initially, but then something changed
16:47:09lqdev[m]but yeah I'll go with ring buffers
16:47:14ZevvExactly, that was my problem. That was one of my earlier nim projects and I didnt properly understand the GC and memory semantics
16:47:22Zevvringbuffer can work lock free, in principle
16:47:53Zevvproducer only updates the head, consumer only updates the tail. As long is it doesn't get full you never need to lock. And you don't want it to get full anyways, becasue then your audio overruns
16:49:06lqdev[m]thanks for that tip
16:49:31*laaron- quit (Remote host closed the connection)
16:49:34Zevvoooh just started up that project, I should work on that again
16:49:37lqdev[m]also quote do seems to be broken or something
16:49:38rayman22201ring buffers are the bedrock of so much high performance code lol.
16:49:53Zevvhttp://zevv.nl/div/corrie.png
16:49:57lqdev[m]my `gfx.loop` macro doesn't work anymore
16:50:01Zevvrayman22201: embedded 101
16:50:24lqdev[m]Zevv: oh wow, that looks cool. what's that?
16:50:34ZevvSignal analyzer
16:50:52ZevvIt even has a nim reactive GUI toolkit
16:51:04Zevv(is that the word, reactive? One of those ui's that totally redraw each frame without state?)
16:51:17federico3is the spectrum analyzer blurred?
16:51:47Zevvno, it's because of the windowing
16:51:48federico3the FFT need antialiasing ;)
16:51:58rayman22201@Zevv that is so cool :-D
16:52:05ZevvOh dan I remember, the hours I spent in rendering a waveform at all zoom levels
16:52:19ZevvAnd darn was I proud, let me see if I can capture an animation
16:52:23rayman22201I know it as immediate mode GUI
16:52:32Zevvah that was the word
16:52:48*PMunch quit (Remote host closed the connection)
16:52:57lqdev[m]aw crap it's not macros.quote, it's just me not calling my main() o.O
16:53:42lqdev[m]yeah I think I removed the last lines of twindow accidentally
16:54:14rayman22201@Dom96. You wanted a good use case for multithreaded async? This guy is one of the lead programmers on Adobe Lightroom. That entire application is multithreaded async with a work stealing task queue: https://www.youtube.com/watch?v=zULU6Hhp42w
16:54:19*Ven`` joined #nim
16:54:29*Ven`` quit (Read error: Connection reset by peer)
16:56:39rayman22201slighty ot, but I'm catching up on IRC and seemed relevant :-P
17:03:53*Perkol joined #nim
17:05:11FromDiscord<Skaruts> does nim have imports like python's `from foo import Bar`?
17:05:54lqdev[m]yes
17:06:15*natrys joined #nim
17:08:11FromDiscord<DeltaPHC> r/programming: "Nim version 1.0 released" 552 upvotes, "Announcing .NET Core 3.0" (blog post) 347 upvotes, ".NET Core 3.0.0 is released!" (github link) 108 upvotes
17:08:21FromDiscord<DeltaPHC> Apparently Nim is more popular than .NET :^)
17:09:04FromDiscord<DeltaPHC> (it's not, but I just thought that was interesting)
17:09:30FromDiscord<Skaruts> you need 300 versions of .net for all the things you use built on it... you only need one Nim 🙂
17:09:37Zevvrayman22201, lqdev[m] https://www.youtube.com/watch?v=fT6F13dX5OU
17:10:11Zevvnote the analogue-scope like waveform with intensity setting :)
17:10:13*lqdev[m] uploaded an image: image.png (9KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/RtbeJgKuhOZsiBUsqvFgtlwd >
17:10:18lqdev[m]set the video to unlisted
17:10:43Zevvoow
17:11:00FromGitter<mratsim> @lqdev, @zevv I have a lock-free wait-free queue/ringbuffer
17:11:00rayman22201lol. "This video is private". Thanks for teasing us Zevv :-P
17:11:17Zevvwell, I never do this kind of stuff :)
17:12:16FromGitter<mratsim> Ah shoot it's not merged yet, but the research is there: https://github.com/mratsim/weave/blob/master/picasso/channels/channels_shm_spsc_bounded.md
17:12:22rayman22201I understand. I'm just teasing you. I never streamed before, that day with Araq. That was a mess! lol
17:12:46FromGitter<mratsim> Anyway you probably don't need as much perf as my needs
17:12:51ZevvDang what a crap interface. I can't even find my own video back
17:13:08rayman22201@mratsim, you have done all the multithreaded stuff I wanted to but never found the time.
17:13:42Zevvhttps://youtu.be/fT6F13dX5OU
17:14:23FromGitter<mratsim> I don't have time either, didn't update the repo for almost a month
17:14:48*owl_000 quit (Ping timeout: 252 seconds)
17:14:50FromGitter<mratsim> I'm juggling between laser, Picasso and Arraymancer
17:15:08Zevvwow mratsim that's pure overkill :)
17:15:21FromGitter<mratsim> I would also like to do reinforcement learning on arcade games, finish my snes emulator and my go playing bot
17:15:46Zevvhe just needs a ringbuffer, not necisserily formally verified and we don't care for the extra element :)
17:16:31rayman22201we just need to clone you @mratsim
17:16:35lqdev[m]Zevv: that's a really nice project! does it use FFT?
17:16:59Zevvjust fftw3
17:17:27lqdev[m]rayman22201: `git clone [email protected]/mratsim.git`
17:17:42rayman22201lol yup
17:17:52*owl_000 joined #nim
17:25:19*tiorock joined #nim
17:25:19*rockcavera quit (Killed (weber.freenode.net (Nickname regained by services)))
17:25:19*tiorock is now known as rockcavera
17:25:19*rockcavera quit (Changing host)
17:25:19*rockcavera joined #nim
17:26:17*owl_000 quit (Ping timeout: 245 seconds)
17:34:00*owl_000 joined #nim
17:34:13*Mister_Magister quit (Quit: bye)
17:35:58*Trustable joined #nim
17:36:05owl_000How to become nimstar, i mean become good at nim(being able to write efficient and elegant code)
17:37:51FromGitter<arnetheduck> owl_000 that's a general skill that has nothing to do with nim ;)
17:39:08owl_000oh ok, i am now nimster (like youngster) lol
17:43:29FromDiscord<exelotl> Yeah it just comes with time and experience (having done a bunch of projects in a bunch of languages)
17:43:39FromDiscord<exelotl> Also read other people's code
17:47:14*owl_000 quit (Ping timeout: 240 seconds)
17:47:15*solitudesf- joined #nim
17:48:41*adeohluwa quit (Remote host closed the connection)
17:50:02*solitudesf quit (Ping timeout: 245 seconds)
17:50:11*adeohluwa joined #nim
17:59:32*tribly quit (Disconnected by services)
17:59:59*tribly joined #nim
18:08:42*adeohluwa quit (Remote host closed the connection)
18:09:12*adeohluwa joined #nim
18:13:31*tribly quit (Quit: WeeChat 2.6)
18:17:46FromGitter<awr1> @mratsim what kind of scope is your SNES emu going to be?
18:18:56FromGitter<awr1> just the base 65C816 system?
18:20:09rockcaveraHow to calculate the space a seq[seq[int8]] will occupy in memory with X elements?
18:21:20FromGitter<awr1> what do you mean by X elements
18:21:25FromDiscord<DeltaPHC> Iterate through the outer seq and sum together the byte sizes of each element?
18:21:26FromGitter<awr1> the total number of int8s?
18:21:34FromDiscord<DeltaPHC> Iterate through the outer seq and sum together the byte sizes of each seq element?
18:22:21FromGitter<awr1> you can do `import std / sequtils; var x: seq[seq[int8]]; let num = x.foldl(a.len() + b.len())`
18:24:12rockcaveraX elements would be the number of elements within the seq
18:24:26Cadeythat's a list of lists though
18:24:56rockcaveraexample: var x: seq[seq[int8]] = @[@[1,2,3],[1,2],[1]]
18:24:59Cadeyah i see never mind
18:25:12rockcaveraexample: var x: seq[seq[int8]] = @[@[1,2,3],@[1,2],@[1]]
18:25:35FromGitter<awr1> and X would be 6 right?
18:25:43Cadeyit would be 9
18:25:47Cadeyafaik
18:25:55Cadeybased on the description
18:26:10rockcaveraHowever, the size will be random and I need to know if there will be enough RAM.
18:26:48FromGitter<awr1> i'm confused to what you're specifically meaning. i assume X is the total number of int8s found recursively
18:27:00Cadeyrockcavera: http://xyproblem.info
18:27:04Cadeywhat are you actually doing?
18:27:10FromGitter<awr1> that would be (1, 2, 3, 1, 2, 1)
18:28:00*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/ROfSRByjFqFgQKopWJCmJdIO >
18:28:04lqdev[m]dang
18:28:12lqdev[m]I don't want to recompileeee
18:28:30rockcaveraI am storing int8 numbers within a seq of seq, but they are random and I need to know before I start storing what space it will take up in memory.
18:28:42Cadeyhow many billion int8's are you storing?
18:30:32rockcaveranot in the billions, but millions of seq by millions of int8
18:30:57rockcaverasizeof(seq) return 8
18:31:10rockcaverasizeof(int8) = 1
18:31:10Cadeyi think you need to rethink your problem statement
18:31:32*Perkol quit (Quit: Leaving)
18:32:30rockcaveraMy problem is knowing how to calculate how much space a randomly sized seq[seq[int8]] occupies before I start storing it.
18:32:48*adeohluwa quit (Remote host closed the connection)
18:33:06Cadeyokay, referring back to xyproblem.info
18:33:12Cadeywhat are you _DOING_ with that seq
18:33:14Cadeywhy does it exist
18:33:19Cadeywhat's the bigger purpose?
18:33:33Cadeywhere is the data coming from, where is it going to
18:33:35Cadeyetc
18:33:37*shota joined #nim
18:34:19rockcavera62/5000
18:34:19rockcaverano matter where it comes from and where it goes, that is not the point.
18:35:12Cadeyit kind of helps for understanding if keeping everything in memory like that is probably a bad idea to begin with :)
18:35:47Cadeybecause if it's just a seq of bytes
18:35:54Cadeythen you can put that in a mmapped file
18:36:17rockcaveraI need quick access
18:36:24Cadeywhy?
18:36:30Cadeywhen you're talking about getting O(crazy) like that, it helps to know the bigger picture so you can know if you are doing things sanely
18:37:32*tribly joined #nim
18:37:39*shota quit (Ping timeout: 240 seconds)
18:37:40rockcaveraThank you, Cadey. But our conversation and your help is not being productive right now.
18:37:55Cadeyi'm sorry my mind reading powers aren't working today
18:39:32Cadeymmaped files are pretty fast though, the kernel will efficiently page them in and out of ram for you as you reference them
18:39:35FromGitter<awr1> @rockcavera https://play.nim-lang.org/#ix=1WKN
18:39:39FromGitter<awr1> something like this maybe?
18:39:45FromGitter<awr1> a loose estimate
18:41:19FromGitter<awr1> if lengthSeq could be defined as a function or something, that could be even better, but `foldl()` won't work
18:43:03FromDiscord<Kiloneie> Guys is this title too long ? Nim for Beginners #1 Introduction to Nim Programming and Your First Program
18:43:22FromGitter<awr1> yeah
18:43:48FromDiscord<Kiloneie> got a better one ? Nim for Beginners is the series name that has to be #1 is video number has to be
18:43:57FromDiscord<Shield> you should've stopped at introduction,
18:44:06FromDiscord<Kiloneie> then the video is about introduction to programming, Nim and your first program
18:44:14FromDiscord<Kiloneie> so Introduction to Nim Programming ?
18:44:29FromDiscord<Cadey~> Remember the charmin ultra rule
18:44:33FromDiscord<Cadey~> Less is so much more
18:44:50FromDiscord<Kiloneie> Nim for Beginners #1 Intro to Nim Programming ?
18:44:53FromGitter<awr1> "Learning the Nim language #1: Baby's First Program"
18:45:05FromDiscord<Cadey~> How about a 5 word maximum
18:45:08FromDiscord<Shield> no, do include the name of the series and the number, then have "introduction" as the subtitle, so Nim for beginners #1: introduction
18:45:43FromDiscord<Shield> please add "nim lang" tag, trying to use "nim" for searching leads to a lot of random results
18:46:13*exelotl joined #nim
18:46:18FromDiscord<Kiloneie> but how does one searching youtube know it's a programming language when looking at results ? i know the tag will put it in the search but...
18:46:27FromDiscord<Kiloneie> no wait.
18:46:40FromGitter<awr1> call it nimrod for maximum anachronism /s
18:46:45FromDiscord<Kiloneie> Nim for Beginners #1 Intro to Nim and Programming....... something like that
18:47:32FromDiscord<Shield> what i meant is, your video better show up when you use "nim lang" for the search, when i use it, the latest video is like 2 months ago, the official channel doesn't even show up because they only use "nim"
18:47:51FromDiscord<Shield> if you search "nim", you'll get game of nim and some random asian related subjects
18:47:58FromDiscord<Kiloneie> i usually spam a bunch of tags, and tag combos
18:48:16Cadeynim programming nim lang learn programming introduction start programming first program
18:48:22FromDiscord<Kiloneie> like for Heartstone, i do Game, Card Game, Heartstone, Expansion Name, Name of Deck and a few more
18:48:23FromGitter<awr1> Learning the Nim Programming Language #1: Introduction
18:48:30FromDiscord<DeltaPHC> Not much worse than searching for "rust" and you get a game
18:48:37FromDiscord<Kiloneie> xD
18:48:46FromDiscord<Kiloneie> or Cristal programming language
18:48:56FromDiscord<Kiloneie> you type the name, and it's not even on the front page of google
18:48:58FromGitter<awr1> https://www.youtube.com/channel/UCr8knzz5ua7wvmW-QHyzoIQ lol
18:48:59FromDiscord<Kiloneie> lol epic fail
18:49:10Cadeyis for me
18:49:26FromDiscord<exelotl> Omg can we get them to do the language mascot
18:49:34FromDiscord<Shield> i remember some game engine that had the most generic name it's literally impossible to search for tutorials or even find the engine itself lol
18:49:34FromDiscord<Kiloneie> well that sucks
18:49:50FromGitter<awr1> next-level bikeshedding over a youtube video name
18:49:55FromDiscord<exelotl> I'm still mad that Minim got rejected
18:50:00FromDiscord<Kiloneie> 2.58 million subs channel with Nim being 3 out of 4 letters of name
18:50:01FromGitter<awr1> i could do a mascot. if i had time
18:50:07FromDiscord<exelotl> That design was godlike
18:50:36FromDiscord<Shield> what mascot? we have a beautiful crown
18:50:49FromDiscord<Kiloneie> that people say is arrogant xD
18:51:04FromDiscord<exelotl> this mascot https://github.com/nim-lang/RFCs/issues/104
18:51:10FromDiscord<Shield> it's a great logo
18:51:31FromDiscord<Shield> oh no
18:51:40FromDiscord<exelotl> I actually love the design but the maintainers didn't seem to like it :(
18:51:42FromGitter<awr1> it looks like that character from the new matt groening show on netflix
18:51:42FromDiscord<Shield> we don't need to go for Go tier mascots
18:51:48FromGitter<awr1> enchanted or w/e
18:51:49FromDiscord<Shield> we need anime mascots xD
18:51:52FromGitter<awr1> the little imp one
18:52:05FromGitter<awr1> disenchanted
18:52:35*narimiran joined #nim
18:52:41FromDiscord<DeltaPHC> I'm not against mascots, but that top proposed one looks a little too much on the silly side
18:53:03FromDiscord<exelotl> :(
18:53:33FromDiscord<Shield> yeah
18:54:05FromGitter<awr1> y'all don't value cuteness as much as you should
18:54:10FromDiscord<DeltaPHC> I mean, I don't think programming languages in general really need mascots, but maybe that's just me
18:54:12FromDiscord<Kiloneie> that one is ridicolous
18:54:23FromGitter<awr1> mascots are advertising
18:54:54FromDiscord<Kiloneie> yes
18:55:00FromDiscord<Kiloneie> i do kindal ike the crown
18:55:06FromDiscord<Kiloneie> we do it all baby, we DA KING !
18:55:42FromGitter<awr1> i could try my hand at drawing some mascots maybe sometime next week
18:57:06*dwdv joined #nim
18:57:41dwdvfancy! congrats on the 1.0 release, nim team!
18:58:08FromDiscord<exelotl> oh god I just remembered the tragedy that was the libreoffice mascot contest
18:58:11FromGitter<awr1> mascots are just silly things that make languages and technologies "more marketable"
18:58:22FromGitter<awr1> for the same reason: why does a language need a logo?
18:58:26FromGitter<awr1> etc. etc.
19:00:40FromDiscord<DeltaPHC> If Nim gets a mascot, I'd prefer something a little more reserved. For instance, I like the Rust crab. Simple and distinct, and not too over-the-top
19:01:58dom96hello all, how's everyone doing with the latest release? :)
19:02:10FromGitter<awr1> somehow i have neglected to choosenim update
19:02:22*asymptotically2 joined #nim
19:02:33Cadeydom96: so far near all of my code works without modification
19:02:34FromGitter<awr1> all this talk of 1.0 and i'm behind on the times
19:02:40FromDiscord<exelotl> oh yeah I should build goodboy on the latest nim and check everything still works
19:02:50Cadeyi don't know about the rest because i haven't updated some stuff yet \o/
19:02:55Cadeyand iPadOS just came out
19:03:34*asymptotically quit (Remote host closed the connection)
19:03:49FromGitter<awr1> syntax skins for 1.1 /s
19:04:26FromDiscord<demotomohiro> I cannot compile my project with 1.0 😦
19:04:26FromDiscord<DeltaPHC> If you were keeping up with 0.20 releases, things haven't changed much since then
19:04:47Cadeydemotomohiro: do you have a link to the git repo, what error do you get?
19:05:08FromGitter<awr1> were syntax skins ever implemented at any any point or were they just an idea that got binned
19:05:10FromDiscord<demotomohiro> https://github.com/demotomohiro/nim-4k-intro-sample.git
19:05:43FromDiscord<demotomohiro> I think it is related to this
19:05:44FromDiscord<demotomohiro> https://github.com/nim-lang/Nim/issues/12242
19:05:48*drewr joined #nim
19:07:23FromDiscord<demotomohiro> This project still dont have documents
19:08:03FromDiscord<demotomohiro> It seems Nim 1.0 put .c file in the path like "@m..@s..@s..@s..@sC:@sUsers@[email protected]@spkgs@swinim4k-@hhead@swinim4k@[email protected]"
19:08:17FromDiscord<demotomohiro> And cl.exe cannot found that path
19:11:07disruptekwell, if i squint, i can't see it, either.
19:11:18narimirani think this—https://lobste.rs/s/cgmwiz/nim_version_1_0_released#c_av7y4t—is a very good question, i.e. would be nice to hear your (plural) thoughts about 'not so good' parts of nim, so if somebody wants to write something....
19:11:48FromDiscord<demotomohiro> I guess ``fakePackageName`` proc in compiler/packagehandling.nim making invalid path because ``relativeTo`` proc doesnt work when input paths have different drive letter.
19:13:47disrupteknarimiran: `var thing {.pragma.} :SomeType = ...` is my nit.
19:13:59narimirandisruptek: then we're golden :)
19:14:07disruptekheh
19:17:51disruptekthere are a few things that cannot be recommended without reservations, such as concepts, the effects system, exceptions, and even major parts of the lib like channels, async, http, threads. i'd say that's the main thing that makes it hard to say that nim is right for a lot of people.
19:19:18FromDiscord<Shield> i need my atomics and SIMD in the stdlib
19:25:41FromDiscord<Shield> i'm kinda overwhelmed, Nim, SDL2 and CSFML offer threading and a lot of extra stuff, there are many ways to achieve the same thing
19:26:05*adeohluwa joined #nim
19:28:46ronnyalehander42: another topic that just came to mind is a sane replacement for small scale databases/spreadsheets (as those are typically just shitty underspeced databases anyway) - would alos use "files/tables" as nestable items, and have the entries of those tables + their relations in some way
19:28:54*daddoo joined #nim
19:29:00*mibr quit (Ping timeout: 252 seconds)
19:31:22disruptekronny: if you look at a posix api, you might find it's not too opinionated for your needs, in which case you can write your own fs pretty easily.
19:32:15ronnywell, if i do a fs, then posix will just be a addon layer to access aprts of it to support legacy software ^^
19:32:45ronnyfor now im looking to do personal information databases, which is about images, contacts, communication logs, and multi device sync
19:32:47disruptekof course; that's what i meant.
19:33:05ronnykk ^^
19:33:06ronnyand bbl
19:34:37*solitudesf- quit (Ping timeout: 240 seconds)
19:38:08lqdev[m]rockcavera: let me help maybe. what you need to do is roughly `sizeof(int8) * len`, where `len` is the amount of elements you want to put in that seq. this will calculate the amount of bytes your content will take.
19:39:29*matlock quit (Read error: Connection reset by peer)
19:44:27FromGitter<brentp> with nim v1.0.0, compiling with `--debuginfo`, I get an error about:
19:44:40FromGitter<brentp> ```Error: unhandled exception: /home/brentp/src/nim/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it [AssertionError] ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5d8a7228c7ec2e2208e5e892]
19:45:11FromGitter<brentp> I don't get that error without debuginfo and I did not get it on recent versions of nim (as recent as 3-5 days ago)
19:45:15FromGitter<brentp> anyone else seen this?
19:45:26FromDiscord<treeform> brentp, that was always an error?
19:45:47FromDiscord<treeform> I have seen it before. You can't .add or delete from a seq while inside its for loop.
19:46:03FromGitter<brentp> yes, but I'm not doing it. it's in nim, not in my code AFAICT
19:46:04FromDiscord<treeform> maybe if you compile with --release it removes the check?
19:46:33FromDiscord<treeform> brentp, do you have more of the stack trace?
19:46:48FromDiscord<Kiloneie> Just a bit more... man does editing take forever, especially if you lose words talking and make delays, gotta remove them all to make it smooth D:
19:46:56*Jesin quit (Quit: Leaving)
19:47:07*gangstacat quit (Quit: Ĝis!)
19:47:17FromDiscord<treeform> @Kiloneie if you do that, don't you sound jittery and robotic?
19:47:24FromDiscord<treeform> Just learn to talk better
19:47:44FromDiscord<treeform> also you notice yourself talking bad the most
19:48:06FromDiscord<treeform> you might be hyper critical of your own performance
19:48:18FromGitter<brentp> @treeform
19:48:22FromDiscord<treeform> yes?
19:48:24FromGitter<brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d8a7307be709e39d1878036]
19:48:59FromDiscord<treeform> looks like a bug in unittest.nim ?
19:49:14FromDiscord<treeform> vcftest?
19:49:27FromGitter<brentp> vcftest is mine
19:50:30FromDiscord<Kiloneie> well you can lower volume, or cut it out entierly
19:50:37FromDiscord<Kiloneie> i listen to every part i edit
19:50:40FromDiscord<Kiloneie> until it's smooth
19:50:45FromDiscord<Kiloneie> so, no, no robotic crap
19:51:05FromDiscord<Kiloneie> although there is a part where my mic caught a weird static sound, not my voice though
19:51:05setenforceI would just do multiple takes lol
19:51:14FromDiscord<Kiloneie> i did
19:51:17setenforceScrew trying to edit specific words in
19:51:28FromDiscord<Kiloneie> took me 20 min on the intro words just reading xD
19:52:17FromDiscord<Kiloneie> anyways you will see what i make... good i hope
19:59:18FromDiscord<treeform> brentp, the stack trace is telling me that sone thing in vcftest is modifying the seq while for looping it.
20:02:14FromDiscord<treeform> I do that when doing some thing like `for s in list: if s.dead: list.remove(s)`
20:02:22FromDiscord<treeform> thats an error
20:02:27*Jesin joined #nim
20:08:57dom96Calinou, do you have a problem with this? https://github.com/nim-lang/website/issues/169
20:09:11rayman22201@narimiran and @dom96 is this perhaps a good time to work on getting the yearly "Nim user survey" out? Or maybe after the 1.0 excitement dies down.
20:09:58Yardanicorayman22201: I think we need to let new users use the language for a few months, and then we can roll out Nim user survey :)
20:10:21dom96anyway, I'm going to censor BrainFuck. I think it's a fair request
20:10:47rayman22201Yeah. To both of you lol.
20:11:10disruptektreeform: have you seen this? https://github.com/disruptek/openapi
20:12:19*lqdev[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/mxGDcxRVetlQgrXyJWpjJuEB >
20:12:19lqdev[m]uh
20:12:20lqdev[m]another one
20:12:38lqdev[m]this is a weird compiler crash btw, any ideas?
20:12:46lqdev[m]I'm trying to use generics
20:13:06lqdev[m]I'll upload the source code, maybe someone has a better idea of what's wrong
20:13:37lqdev[m]here: https://termbin.com/32t2
20:13:57*daddoo left #nim ("Leaving")
20:15:04lqdev[m]I'm trying to instantiate the ring buffer like this: `RingBuffer[float, 4096]`
20:19:47Calinoudom96: meh, I think it's a branding thing so it shouldn't be censored
20:19:56Calinouif you really want to do it, do it anyway
20:20:19CalinouI can understand changing language in a documentation page when it's not appropriate, but Brainfuck happens to be a language name, not a random word
20:20:32Calinouit'd be like censoring "GIMP" :)
20:21:06CalinouI also despise the "think of the children" mentality brought by OP, but that's for another day…
20:21:49acidxdom96: how are you going to sensor it? like in comic books, substituting "nasty" words with symbols? might as well call it "brain+-.,@![]", then
20:22:15acidxer. <> instead of @!. been a while.
20:22:23disruptekbrain<<<>><<<><<<<><><><<<<><<<<><<<<<><<<<>><>>>>>><<><>>><>
20:23:58*sealmove quit (Quit: WeeChat 2.6)
20:24:59*nsf quit (Quit: WeeChat 2.5)
20:25:36YardanicoWow, even Phoronix posted about Nim http://www.phoronix.com/scan.php?page=news_item&px=Nim-1.0-Programming-Language
20:26:31lqdev[m]brain>++++++++++[>++++++++++>++++++++++++>++++++++++>+++++++++++><<<<<-]>++>--->->---><<<<<>.>.>.>.
20:26:40Yardanicothough there's a lot of users there who like to badmouth everything they don't know
20:26:56dom96Look guys, we all know 'fuck' doesn't hurt anybody, but if we want to grow our community we need to be engaging to new users, especially very young people.
20:28:30FromGitter<alehander42> i typically dont like this kind of censorship, but here i agree fully with OP
20:32:23Calinoudom96: the case is closed to me anyway :P
20:33:53*daddoo joined #nim
20:34:42*abm quit (Quit: Leaving)
20:40:05lqdev[m]can anyone please help me with my weird generic problem?
20:45:36FromDiscord<Kiloneie> ummm
20:45:58*asymptotically2 is now known as asymptotically
20:46:01FromDiscord<Kiloneie> what license do i pick ? YouTube standard license or Creative Commons... i have no clue, so far for gaming i have used Standard YouTube
20:50:16*Jesin quit (Quit: Leaving)
20:50:48FromDiscord<Kiloneie> nevermind figured it out
20:54:13FromDiscord<Kiloneie> Okay, here it is guys my first video on Nim: https://youtu.be/5tVIsDYPClA
20:55:25narimiranrayman22201: i already have thought about the survey, but i think we should wait a bit, to get better numbers about v1 adoption
20:56:23rayman22201You are right. I thought the same thing right after I posted that. I got too excited 😂
20:57:51*sunwukong joined #nim
20:58:24FromGitter<brentp> I am trying to track down the problem I mention above. When I run with ` -d:useSysAssert -d:useGcAssert`, I see: `[SYSASSERT] rawAlloc 21` without further information. any pointers on debugging this?
20:58:55Zevvlqdev[m]: what chrashes?
21:00:47dom96cool, so the 1.0 news were picked up by zdnet and theregister
21:02:40*djazz joined #nim
21:02:50narimiran...and phoronix: https://www.phoronix.com/scan.php?page=news_item&px=Nim-1.0-Programming-Language
21:04:34dom96now we need to get it submitted to slashdot :P
21:05:07Zevvslashdot is soooo 1997
21:05:09FromDiscord<Kiloneie> https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1128280-nim-programming-language-hits-stable-milestone-with-v1-0-release
21:05:09FromDiscord<Kiloneie>
21:05:09FromDiscord<Kiloneie> This second guy hates Nim or something, i don't see his point, because it's not an overcomplicated mess
21:05:36FromDiscord<Kiloneie> also third guy, lol...
21:06:49dom96Zevv, and yet it gets us sooo much traffic
21:07:00dom96the last time Nim was on slashdot is still visible in visitor/trend graphs
21:08:38*djazz quit (Quit: djazz)
21:09:39*narimiran quit (Ping timeout: 240 seconds)
21:10:34lqdev[m]Zevv: the compiler
21:10:50Zevvnot here; I can take your file and instantiate. But after that it doesn't work yet :)
21:11:18Zevv`if rb.head > size` does not make sense, `size` is not a variable
21:11:27Zevvdid you dump the compiler crash output somewherE?
21:11:56lqdev[m]yeah, you can see it in the logs
21:12:30lqdev[m]size is not a variable, but it's a generic param. how else am I supposed to check for the total size of the underlying array?
21:12:38Zevvhm yeah, it's not really a crash-crash, but its also not a nice error message
21:12:43Zevvadd a .size field to your ringbuffer
21:13:27lqdev[m]but how do I initialize it, then?
21:13:40Zevvlemmesee. I was on my way to bed, so not too long :)
21:13:57FromGitter<dumjyl> iqdev[m]: `size: Positive` -> `size: static Positive`
21:14:24Zevvright
21:14:58lqdev[m]that also errors out, don't remember the error now
21:14:58Zevvalmost :(
21:15:19Zevvsorry lqdev, I need my nap-nap
21:15:19lqdev[m]I tried with static int
21:15:32lqdev[m]right, goodnight
21:15:36Zevvif you're still stuck I'd gladly take a look tomorrow morning!
21:15:37*Jesin joined #nim
21:15:44lqdev[m]I'll solve this tomorrow, I'm going to sleep aswell
21:15:46FromGitter<dumjyl> `RingBuffer()` -> `RingBuffer[T, size]()`
21:16:05lqdev[m]oh gosh. I forgot about that
21:16:11lqdev[m]I'll try tomorrow
21:23:50*Trustable quit (Remote host closed the connection)
21:31:19FromDiscord<Skaruts> is there some pragma that can be used to stop recursive dependencies?
21:35:58FromDiscord<exelotl> lol that thread
21:36:31FromDiscord<Kiloneie> People be hating because hating is cool or something
21:36:39FromDiscord<exelotl> 4th guy evidently hasn't written any javascript in a while
21:36:48FromGitter<dawkot> Why do I get this in a .nims file: "undeclared identifier: 'setCommand'"?
21:36:58FromGitter<dawkot> It worked until I updated to 1.0
21:39:43disrupteki think it's because you updated to 1.0.
21:40:09FromGitter<dawkot> sure, but what am I supposed to use? the manual still mentions `setCommand` as if it was supposed to work
21:40:19disruptektry 0.20.
21:53:04*asymptotically quit (Quit: Leaving)
21:53:42disruptekdawkot: is it a regression?
21:57:08*adeohluwa quit (Ping timeout: 265 seconds)
21:57:18FromGitter<kayabaNerve> It sounds like a removed feature
22:10:29FromGitter<brentp> fwiw, the memory bug I found is in an external library (https://github.com/samtools/htslib/issues/936). only manifests with recent nim for some reason though.
22:12:36*natrys quit (Ping timeout: 265 seconds)
22:15:30*adeohluwa joined #nim
22:16:26*sunwukong quit (Remote host closed the connection)
22:24:07*sealmove joined #nim
22:25:32*natrys joined #nim
22:26:55*natrys quit (Client Quit)
22:35:42*daddoo quit (Quit: Leaving)
22:38:36FromDiscord<treeform> @Kiloneie thank you for making nim video, we need more!
22:38:42*nuxdie quit (Ping timeout: 246 seconds)
22:41:03*nuxdie joined #nim
22:52:56FromGitter<awr1> what was wrong with `setCommand`
22:53:02*adeohluwa quit (Remote host closed the connection)
22:53:21*adeohluwa joined #nim
22:53:53FromGitter<awr1> https://github.com/nim-lang/Nim/blob/version-1-0/lib/system/nimscript.nim#L104
22:53:58FromGitter<awr1> it's still here?
22:56:08FromGitter<awr1> this smells of regression
23:01:15*aEverr quit (Ping timeout: 240 seconds)
23:01:17*adeohluwa quit (Ping timeout: 245 seconds)
23:02:17*aEverr joined #nim
23:04:19FromGitter<awr1> @Skaruts if you're talking about recursive module imports
23:04:37FromGitter<awr1> nim will probably eventually get them, but right now it will just error in general
23:04:59*owl_000 joined #nim
23:07:38FromGitter<awr1> also lol at that phoronix thread
23:10:19FromGitter<awr1> to me aspects of nim seem heretical if viewed from the persepctive of not really trying it but instead reading about it elsewhere
23:12:46FromGitter<awr1> things like `result`, partial case insensitivity, the python syntax (lol), the encouragement of global-namespace importing
23:14:45disruptekthe only people who focus on stuff like case or whitespace are people that really don't understand the value proposition as compared to other players in the space.
23:15:06FromGitter<awr1> when you get to grips though with the language though it becomes more apparent that nim as a language is pretty reasonably designed
23:15:36FromDiscord<DeltaPHC> The only thing I would actually feel iffy about is the design of case objects :P
23:15:39FromGitter<awr1> comparisons to perl are lol
23:15:51FromGitter<awr1> the existence of `$` does not make a language "perl-like"
23:16:02FromGitter<awr1> also i love the way variants work
23:17:07FromGitter<awr1> it needs a few fixes but it has the right idea. i think a library could probably exist to provide a more "concise" simple ADT for those who just can't get enough of ML
23:17:18disruptekare you talking about the "gratuitous else" issue with case? or exhaustive case in general? or the must-use-constants thing?
23:17:19*adeohluwa joined #nim
23:17:36FromDiscord<DeltaPHC> I mostly haven't seen value in having direct access to the discriminator. Because if you change that, you have to redo the data as well
23:18:03FromGitter<awr1> i had an RFC about the way the discrim works
23:18:57FromGitter<awr1> is not impled yet though
23:19:03FromGitter<awr1> https://github.com/nim-lang/RFCs/issues/56
23:19:30FromGitter<awr1> you cannot "set" discrims currently after they have been set right now
23:19:33FromGitter<awr1> it will raise exception
23:20:15FromDiscord<DeltaPHC> Basically, I don't think setting the discriminator should be a separate step in the first place
23:20:25FromGitter<awr1> what do you mean
23:20:56*NimBot joined #nim
23:21:33*exelotl quit (Ping timeout: 245 seconds)
23:21:36FromDiscord<DeltaPHC> You would instead set an enum instance by supplying the discriminant and data at the same time
23:22:16FromDiscord<DeltaPHC> They are meant to be combined, after all
23:22:33FromGitter<awr1> you can already do that, unless you are referring to something else
23:24:16FromGitter<awr1> https://play.nim-lang.org/#ix=1WN2
23:24:52FromGitter<awr1> also there was this proposal in auxiliary https://github.com/nim-lang/RFCs/issues/56#issuecomment-412440745
23:25:12FromGitter<awr1> so you can do it without re-ctoring the whole obj
23:27:05FromDiscord<DeltaPHC> I suppose I mostly don't want the discriminator to be a field, but it's not really a big deal
23:31:15FromGitter<awr1> like i said before
23:31:24FromGitter<awr1> > it needs a few fixes but it has the right idea. i think a library could probably exist to provide a more "concise" simple ADT for those who just can't get enough of ML
23:33:50FromDiscord<DeltaPHC> Like in Rust, you'd construct an enum (same idea as object variants) like `let x = SomeThing::Variant(foo, bar);`, to give an example
23:34:55FromDiscord<DeltaPHC> The variant is a part of the construction rather than a field
23:36:16FromGitter<awr1> that is more or less what i'm getting at
23:36:43FromGitter<awr1> in ML langs you declare variant types like `type Character = Mario | Sonic | Crash`
23:37:03FromGitter<awr1> wait i screwed it up
23:37:51FromGitter<awr1> i mean like `type Character = Mario of <blah blah blah> | Sonic of <blah blah> | Crash of <blah>`