00:06:43 | FromGitter | <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:26 | FromGitter | <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:07 | Araq | depends on the library |
00:11:26 | * | navin joined #nim |
00:11:55 | * | ephja quit (Remote host closed the connection) |
00:14:02 | FromGitter | <mratsim> wrap your pointer in an object and use destructors |
00:14:08 | FromGitter | <mratsim> this way they are owned |
00:15:24 | FromGitter | <awr1> "it's only fair that I count as 3 persons" |
00:15:29 | FromGitter | <awr1> sounds biblical |
00:15:43 | * | navin quit (Ping timeout: 245 seconds) |
00:16:19 | FromGitter | <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:57 | FromGitter | <awr1> nim needs a better notion of "views" |
00:17:06 | FromGitter | <awr1> i saw an RFC a while back for something like this though |
00:17:31 | FromGitter | <mratsim> only one? you're lucky |
00:17:47 | FromGitter | <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:50 | FromGitter | <mratsim> btw will you turn your PR into a library, the one on CPU info? |
00:19:36 | FromGitter | <awr1> uhh probably |
00:20:43 | FromGitter | <awr1> i still think it's stdlib worthy but i'll take the L |
00:23:37 | * | navin joined #nim |
00:23:39 | FromGitter | <mratsim> well I agree with you but well ¯\_(ツ)_/¯ |
00:23:55 | FromGitter | <mratsim> if you publish it I'll switch laser to it |
00:24:51 | FromGitter | <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:42 | FromGitter | <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:50 | FromGitter | <awr1> there i guess is a general problem relating to branching on specific cpu features w/ GCC and Clang |
00:27:04 | FromGitter | <awr1> if you use intrinsics as opposed to |
00:27:08 | FromGitter | <awr1> hard-coded asm |
00:27:48 | * | navin quit (Ping timeout: 245 seconds) |
00:28:11 | FromGitter | <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:47 | FromGitter | <awr1> defeating the whole point of runtime branching for certain ISA exts |
00:29:26 | FromGitter | <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:19 | FromGitter | <mratsim> I don't |
00:38:38 | FromGitter | <mratsim> I tried, I can tag function with the instruction set I require |
00:38:52 | FromGitter | <mratsim> or use per file compilation option |
00:39:56 | FromGitter | <mratsim> For my current "hardcoded" stuff like exponential or matrix multiplication I use per-file -mssse41 or -mavx or -mfma |
00:40:21 | FromGitter | <mratsim> see here: https://github.com/numforge/laser/blob/master/nim.cfg#L24-L35 |
00:41:18 | FromGitter | <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:25 | FromGitter | <mratsim> I've already confirmed that they work |
00:41:52 | FromGitter | <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:51 | FromGitter | <awr1> there is this but meh |
00:47:53 | FromGitter | <awr1> https://lwn.net/Articles/691932/ |
00:47:59 | FromGitter | <awr1> it's not totally standardized |
00:48:09 | FromGitter | <awr1> i mean it won't be but |
00:48:28 | FromGitter | <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:57 | FromGitter | <mratsim> MSVC doesn't complain when I use AVX2 simd |
00:48:59 | FromGitter | <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:59 | FromGitter | <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:00 | FromGitter | <awr1> yeah you can use intrisnics anywhere in MSVC |
00:50:14 | FromGitter | <awr1> if clang supports it then i am behind on the times |
00:50:16 | FromGitter | <mratsim> I don't need the multi-versioning part |
00:50:34 | FromGitter | <mratsim> I'll do multi-versioning manually |
00:52:05 | FromGitter | <mratsim> For example for exponential, there is no gather instruction below AVX2 so I have 2 different implementations |
00:52:26 | FromGitter | <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:21 | Tanger | Conngrats on 1.0 all! |
01:01:47 | * | thomasross quit (Remote host closed the connection) |
01:04:59 | * | navin joined #nim |
01:05:30 | FromGitter | <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:44 | FromDiscord | <RaycatWhoDat> Huh. Am I bridged from here to Gitter? |
01:29:53 | * | navin quit (Ping timeout: 245 seconds) |
01:30:38 | FromDiscord | <RaycatWhoDat> Neat. |
01:30:44 | nc-x[m] | Congrats on the release!! |
01:32:13 | FromDiscord | <DeltaPHC> Technically you're being bridged from Discord to IRC to Gitter, but yes |
01:32:28 | FromDiscord | <RaycatWhoDat> Yee-haw. |
01:38:13 | owl_000 | nim 1.0.0 :O https://i.ibb.co/4Yqv05z/image823.png |
01:43:18 | FromGitter | <dryajov> Congrats on v1!! |
01:46:17 | * | navin joined #nim |
01:50:43 | * | navin quit (Ping timeout: 245 seconds) |
01:51:07 | rockcavera | :D |
01:51:10 | rockcavera | v1 |
01:57:08 | * | laaron quit (Remote host closed the connection) |
01:58:53 | * | shota joined #nim |
01:59:34 | shota | :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:39 | sealmove | was newException previously newEOS? |
02:24:52 | * | theelous3 quit (Ping timeout: 268 seconds) |
02:24:59 | leorize | no |
02:25:16 | leorize | newEOS is for OSError |
02:34:01 | FromGitter | <kayabaNerve> I thought the convention on those was newOSError |
02:34:09 | FromGitter | <kayabaNerve> (or newValueError, or new...) |
02:39:27 | sealmove | I couldn't find newEOS in docs |
02:40:57 | leorize | @kayabaNerve: well the convention was different when Nim started |
02:41:23 | leorize | sealmove: you'll find it in the manual because no one updated that example :P |
02:42:29 | sealmove | that's where I saw it :P |
02:42:52 | sealmove | btw leorize |
02:42:56 | sealmove | a programming question |
02:43:19 | sealmove | does it make sense to create custom fatal exceptions (object of Defect)? |
02:44:14 | leorize | well yes, but then your program would just quit() once you raise that exception |
02:45:00 | leorize | iirc Araq said that Defects should not be raised at all |
02:46:02 | sealmove | oh, hmm |
02:46:13 | leorize | see https://github.com/nim-lang/Nim/issues/11776 |
02:46:59 | sealmove | but a message could be useful.. just echo it instead of raising an exception? |
02:47:28 | leorize | depends on what you're doing |
02:47:36 | leorize | why would you need an exception based on Defect? |
02:49:20 | sealmove | well, for that message |
02:51:24 | leorize | can you further elaborate your use case? |
02:54:09 | sealmove | truth 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:54 | leorize | ValueError is your friend |
02:55:55 | leorize | so first rule of exceptions: don't make up your own unless you need more data to be passed down |
02:55:56 | sealmove | https://termbin.com/z1hh |
02:56:16 | leorize | yep |
02:56:25 | sealmove | "need more data to be passed down"? can you elaborate please? |
02:57:14 | leorize | ie. you need an error code field in the exception so you can pass them back to the caller |
02:57:46 | sealmove | oh |
02:59:29 | sealmove | i always thought that in big programs you should make your own exceptions just to group types of errors by names |
03:00:28 | leorize | that's an use case also |
03:01:41 | leorize | I tend to avoid using exceptions like that though |
03:02:17 | sealmove | isn't discrimination in catch clauses more difficult if you don't? |
03:03:45 | leorize | sure, but you have to think of it like this: what's the point of making it more 'catchable' specifically? |
03:04:04 | leorize | it's still the same base error, just with a different name |
03:04:41 | leorize | personally I never found a case where I actually need a custom type that's not based of `Errors` |
03:05:11 | leorize | the default types are informative enough as is |
03:05:21 | leorize | also it makes composing much easier |
03:07:04 | sealmove | so 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:54 | leorize | yea |
03:09:14 | leorize | it's mainly up to your use case |
03:09:27 | leorize | but you shouldn't add more exception types for the sake of it |
03:09:36 | leorize | add when you really need to have it |
03:09:48 | sealmove | i see, this advice helps a lot, thanks |
03:14:02 | leorize | np |
03:14:20 | leorize | I was as confused as you when I first started to use exceptions |
03:15:24 | leorize | took 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:11 | sealmove | I was Rust-club so got catch up with option type (which is overly inflexible) |
03:18:31 | leorize | yea, I got caught up in the whole "exceptions are evil" when I started programming also |
03:19:40 | sealmove | The only evil is in performance I think |
03:19:48 | leorize | Nim's {.raises.} system made me seriously considered the language |
03:20:02 | leorize | compile to c++ and you won't see a thing unless you throw :P |
03:20:04 | sealmove | oh yeah, that's very handy |
03:20:21 | sealmove | btw, what happened to Araq's idea of quirky exceptions? |
03:20:34 | leorize | more important stuff gets in the way |
03:20:35 | sealmove | and was his motivation speed? |
03:22:15 | leorize | his motivation was -fno-exception iirc |
03:22:49 | sealmove | so ultimately speed? |
03:23:09 | sealmove | or is there another benefic when using this switch? |
03:23:23 | leorize | nah, 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:34 | leorize | the model of quirky exceptions is kinda like `errno` but better |
03:29:45 | sealmove | yes, it seems very interesting |
03:33:23 | sealmove | hmm, so the most important advantage is eliminating hidden control flow I guess |
03:34:32 | leorize | yea, and from what I can see, this will really eliminate hidden control flow |
03:35:11 | leorize | unlike some Option-based language that decided that they still need exceptions and didn't solve anything |
03:43:53 | sealmove | Sometimes 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:18 | leorize | yea, I like them, but they are no where near an exception replacement |
03:48:04 | FromGitter | <zacharycarter> congrats on v1 |
03:53:03 | sealmove | Hmmmm, "code continues to run" philosophy. Intuitively it feels wrong, can't lie. |
03:55:53 | sealmove | nobody will write code like this: https://termbin.com/cpsx |
03:56:05 | FromDiscord | <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:20 | FromDiscord | <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:25 | leorize | welcome :) |
04:01:05 | * | chemist69 quit (Ping timeout: 276 seconds) |
04:01:44 | FromGitter | <zacharycarter> I'm stupid about licensing but question - if I use a third party lib that is BSD2 licensed |
04:01:51 | FromGitter | <zacharycarter> so I must include a copy of their license if I use their software |
04:01:58 | FromGitter | <zacharycarter> does that mean I pretty much also must use BSD2? |
04:02:21 | * | chemist69 joined #nim |
04:02:26 | leorize | no |
04:02:38 | leorize | you only have to include the license text and the copyright |
04:02:58 | leorize | it doesn't mean that you license your software torwards it |
04:03:05 | FromGitter | <zacharycarter> okay thanks |
04:03:19 | FromGitter | <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:58 | FromDiscord | <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:36 | FromDiscord | <has1> hi |
05:13:43 | FromDiscord | <has1> i am having an issue with nim and vscode |
05:14:19 | FromDiscord | <has1> the vscode nim extension tells me that it could not find the nim binary in my path |
05:15:06 | FromDiscord | <has1> ``` |
05:15:06 | FromDiscord | <has1> [user@pc nimtest]$ echo $PATH |
05:15:06 | FromDiscord | <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:06 | FromDiscord | <has1> ``` |
05:15:06 | FromDiscord | <has1> but the path shows me that it is there at the end |
05:15:48 | FromDiscord | <has1> also, |
05:15:48 | FromDiscord | <has1> ```nim -version``` |
05:15:49 | FromDiscord | <has1> gives me this output |
05:15:49 | FromDiscord | <has1> ``` |
05:15:49 | FromDiscord | <has1> Nim Compiler Version 1.0.0 [Linux: amd64] |
05:15:49 | FromDiscord | <has1> Compiled at 2019-09-23 |
05:15:49 | FromDiscord | <has1> Copyright (c) 2006-2019 by Andreas Rumpf |
05:15:51 | FromDiscord | <has1> |
05:15:52 | FromDiscord | <has1> git hash: f7a8fc46c0012033917582eb740dc0343c093e35 |
05:15:54 | FromDiscord | <has1> active boot switches: -d:release |
05:15:55 | FromDiscord | <has1> ``` |
05:15:57 | FromDiscord | <has1> So it is clearly there |
05:16:40 | FromDiscord | <has1> And finally,``` |
05:16:40 | FromDiscord | <has1> [user@pc nimtest]$ which nim |
05:16:41 | FromDiscord | <has1> ``` |
05:16:41 | FromDiscord | <has1> |
05:16:41 | FromDiscord | <has1> ``` |
05:16:41 | FromDiscord | <has1> /home/user/.nimble/bin/nim |
05:16:42 | FromDiscord | <has1> ``` |
05:17:51 | Yardanico | Please don't send big outputs, it doesn't look good in IRC :) |
05:18:22 | FromDiscord | <has1> are you talking to me? |
05:19:11 | Yardanico | Yeah :) 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:31 | FromDiscord | <has1> i did a restart already |
05:19:37 | FromDiscord | <has1> i also sourced my .bashrc file |
05:19:45 | FromDiscord | <has1> what can i do? |
05:19:45 | Yardanico | One of the ways is to try to add Nim to path in /etc/profile or /etc/environment |
05:21:31 | FromDiscord | <has1> that sounds like a nim vscode extension bug, doesn't it? |
05:22:29 | Yardanico | Not really, it just uses whatever PATH variable is provided for vscode |
05:24:51 | FromDiscord | <has1> how is that not a bug? If the nim extension cant find the nim binary in its default install location |
05:27:54 | FromGitter | <xmonader> I went to bed early and I woke up to Nim 1.0 :D :D |
05:27:56 | FromDiscord | <DeltaPHC> What happens if you open VSCode from that shell? |
05:28:12 | * | narimiran joined #nim |
05:30:09 | FromDiscord | <has1> @DeltaPHC could you be more specific with what you mean |
05:30:39 | FromDiscord | <has1> nim is available everywhere, nim -version works, i can compile, i can run |
05:30:46 | FromDiscord | <has1> but vscode tells me its not in my path |
05:30:51 | FromDiscord | <DeltaPHC> As in, use that shell to launch vscode |
05:31:36 | FromDiscord | <has1> which shell? Do you mean open the terminal, run nim -version, and then run ```code .``` to open vscode? |
05:31:52 | FromDiscord | <DeltaPHC> Yes |
05:32:00 | FromDiscord | <has1> yes i am doing that |
05:32:05 | FromDiscord | <has1> still doesnt work |
05:32:51 | FromDiscord | <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:03 | FromDiscord | <has1> but the extension tells me i dont have nim in my path |
05:38:37 | FromDiscord | <has1> you guys should probably figure this out, that seems kind of important for adoption. |
05:38:42 | Yardanico | Well, 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:12 | Yardanico | And VSCode with Nim always worked fine for me when I changed path in /etc/profile |
05:39:27 | Yardanico | (after a reboot that is) |
05:39:36 | narimiran | @has1 plenty of people use Nim in VSCode, using that extension. if there was a general problem, we would know about it |
05:39:36 | FromDiscord | <has1> i did this in |
05:39:48 | FromDiscord | <has1> ~/.profile and |
05:39:48 | FromDiscord | <has1> ~/.bashrc |
05:39:55 | Yardanico | And if Nim works in VSCode shell it doesn't mean that VSCode itself gets Nim in PATH |
05:40:13 | FromDiscord | <has1> This works with Go btw |
05:40:17 | FromDiscord | <has1> which i also added to my path |
05:40:23 | FromDiscord | <has1> and the tools work with vscode |
05:40:31 | Yardanico | No, I've meant /etc/profile, VSCode didn't get path when can I changed in .profile |
05:41:29 | FromDiscord | <DeltaPHC> That's kinda why I suggested running from the terminal, because then it would inherit the terminal environment |
05:41:45 | FromDiscord | <has1> i did. |
05:41:56 | FromDiscord | <DeltaPHC> I'm not sure why it's not working though |
05:42:29 | narimiran | @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:15 | narimiran | and i think the recommended way is to make a small script in `/etc/profile.d` |
05:45:12 | FromDiscord | <has1> So it actually seems like doing this in |
05:45:19 | FromDiscord | <has1> /etc/profile seems to work |
05:45:36 | FromDiscord | <has1> but, /etc/profile requires sudo rights |
05:45:52 | FromDiscord | <has1> also, the nim installer tells me during the installation |
05:45:52 | FromDiscord | <has1> ``` |
05:45:53 | FromDiscord | <has1> choosenim-init: ChooseNim installed in /home/user/.nimble/bin |
05:45:53 | FromDiscord | <has1> choosenim-init: You must now ensure that the Nimble bin dir is in your PATH. |
05:45:53 | FromDiscord | <has1> choosenim-init: Place the following line in the ~/.profile or ~/.bashrc file. |
05:45:55 | FromDiscord | <has1> choosenim-init: export PATH=/home/user/.nimble/bin:$PATH |
05:45:56 | FromDiscord | <has1> ``` |
05:46:02 | Yardanico | Well I know, but I didn't find any other way so far |
05:46:18 | FromDiscord | <has1> this still seems like a pretty huge bug |
05:46:23 | FromDiscord | <has1> that it cant read your path |
05:46:36 | narimiran | @has1 and that is enough to do for other editors. it seems like vscode bug, doesn't it? |
05:46:36 | Yardanico | But Nim extension doesn't do anything with PATH |
05:47:00 | Yardanico | It just tries to launch nimsuggest command |
05:47:03 | FromDiscord | <has1> How can it be a vscode bug, when i can use Go just fine (for example) |
05:47:09 | FromDiscord | <has1> i also have to add that to my path |
05:47:19 | narimiran | how can it be a nim bug, when i can use vim just fine (for example) |
05:47:21 | FromDiscord | <has1> and the extension can find the binaries in my path |
05:47:40 | FromDiscord | <has1> because vim probably searches inside the path |
05:47:43 | FromDiscord | <has1> for the nim binary |
05:47:48 | FromDiscord | <has1> and the nim extension doesnt |
05:48:09 | FromDiscord | <DeltaPHC> I have the extension working on Windows. Not helpful here, but it might narrow it down |
05:48:24 | FromDiscord | <has1> i am on manjaro linux if that helps |
05:48:39 | Yardanico | Well, on Windows you have only one place to set global PATH in :) |
05:49:39 | narimiran | @has1 please report it at https://github.com/pragmagic/vscode-nim/issues |
05:49:53 | FromDiscord | <has1> i am no expert on this but it seems silly, why would it read from /etc/profile directly? |
05:50:03 | FromDiscord | <has1> why not read the env variable $PATH |
05:50:36 | leorize | @has1: can you try running nimsuggest -v in vscode terminal and your normal terminal? |
05:51:35 | FromDiscord | <has1> sure, same output |
05:51:39 | Yardanico | VSCode terminal just launches your default shell |
05:51:39 | FromDiscord | <has1> ``` |
05:51:39 | FromDiscord | <has1> Nim Compiler Version 1.0.0 [Linux: amd64] |
05:51:39 | FromDiscord | <has1> Compiled at 2019-09-24 |
05:51:40 | FromDiscord | <has1> Copyright (c) 2006-2019 by Andreas Rumpf |
05:51:40 | FromDiscord | <has1> |
05:51:40 | FromDiscord | <has1> active boot switches: -d:release -d:danger --gc:markAndSweep |
05:51:40 | FromDiscord | <has1> ``` |
05:51:58 | Yardanico | It doesn't really use VSCode's own PATH |
05:52:03 | leorize | so nimsuggest is in vscode PATH |
05:52:20 | leorize | well that shell has to inherit the PATH from somewhere |
05:52:22 | FromDiscord | <has1> it works now though, because i added it to /etc/profile |
05:52:34 | FromDiscord | <has1> but it didnt work before |
05:52:56 | FromDiscord | <has1> running it in the vsocde terminal doesnt make sense |
05:53:04 | FromDiscord | <has1> because it clearly is there and running just fine |
05:53:14 | FromDiscord | <has1> to me it sounds like the nim extension is doing its own thing |
05:53:21 | FromDiscord | <has1> reading the path from /etc/profile or something |
05:53:37 | FromDiscord | <has1> and then trying to find nim from there or something |
05:54:04 | leorize | I've looked at that extension |
05:54:07 | leorize | it does no such thing |
05:54:12 | nc-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:20 | leorize | (since you need it to run on windows as well) |
05:54:44 | FromDiscord | <has1> maybe look at the go extension and how they are doing it? |
05:54:48 | FromDiscord | <has1> It works fine with go |
05:54:51 | FromDiscord | <has1> on both windows and linux |
05:54:54 | FromDiscord | <has1> out of the box |
05:55:44 | nc-x[m] | well it works fine for every other user here |
05:55:52 | FromDiscord | <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:56 | leorize | you should open a bug for that extension |
05:56:02 | nc-x[m] | so it is something related to your set-up that is causing the issue |
05:56:17 | Yardanico | Well to be fair I had the same issue on Arch |
05:56:19 | leorize | https://github.com/pragmagic/vscode-nim/issues |
05:56:28 | Yardanico | But not on Fedora/OpenMandriva |
05:56:49 | Yardanico | On these distros setting. ~/.profile was enough |
05:58:15 | nc-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:16 | leorize | is that plugin still being maintained though? |
06:00:09 | leorize | @has1, Yardanico: looks like the choosenim problem is recently fixed: https://github.com/pragmagic/vscode-nim/commit/b76f8774c3bd9e71b5598691e10b25e9f29320e2 |
06:00:33 | leorize | now they just need someone to release a newer version of vscode-nim with it |
06:01:16 | * | solitudesf joined #nim |
06:01:38 | FromDiscord | <has1> this sounds really nice, but it doesn't solve the core issue though, does it? |
06:01:52 | FromDiscord | <has1> it should already work with |
06:01:52 | FromDiscord | <has1> ``` |
06:01:52 | FromDiscord | <has1> process.env['PATH'] |
06:01:52 | FromDiscord | <has1> ``` |
06:02:18 | FromDiscord | <has1> because i put the directory in my path |
06:02:25 | leorize | idk how vscode works in general |
06:02:47 | leorize | they might have some voodoo magic somewhere that breaks things |
06:03:00 | * | ng0 joined #nim |
06:05:10 | FromDiscord | <has1> nim sounds so cool |
06:05:16 | FromDiscord | <has1> but then also so weird |
06:05:32 | FromDiscord | <has1> it just has magic like |
06:05:33 | FromDiscord | <has1> ``` |
06:05:33 | FromDiscord | <has1> let body = %*{ |
06:05:33 | FromDiscord | <has1> "data": "some text" |
06:05:33 | FromDiscord | <has1> } |
06:05:33 | FromDiscord | <has1> let response = client.request("http://some.api", httpMethod = HttpPost, body = $body) |
06:05:33 | FromDiscord | <has1> ``` |
06:05:35 | FromDiscord | <has1> how do i even learn all this magic |
06:06:03 | leorize[m] | see json module for that %* operator |
06:06:12 | Yardanico | It's not magic, it's just metaprogramming |
06:06:13 | FromDiscord | <has1> what does the %* even do? and why do i suddenly pass my variable as $body instead of body??? |
06:06:25 | leorize[m] | $ is an operator that convert things to string |
06:06:43 | alexander92 | it's documented in the docs |
06:06:49 | Yardanico | @has I suggest you read Nim tutorials and the manual :) |
06:06:50 | FromDiscord | <has1> its pretty magical |
06:06:53 | alexander92 | but overally, you should start with the manual |
06:07:11 | leorize[m] | it will stop being magical once you start reading :P |
06:07:16 | narimiran | @has1 https://nim-lang.org/learn.html |
06:07:18 | FromDiscord | <has1> ``` |
06:07:18 | alexander92 | it sounds strange at first |
06:07:19 | FromDiscord | <has1> let body = json.From{ |
06:07:19 | FromDiscord | <has1> "data": "some text" |
06:07:19 | FromDiscord | <has1> } |
06:07:19 | FromDiscord | <has1> let response = client.request("http://some.api", httpMethod = HttpPost, body = string(body)) |
06:07:19 | FromDiscord | <has1> ``` |
06:07:22 | FromDiscord | <has1> what would be wrong with that? |
06:07:24 | leorize[m] | trust me, we have all that and people still ask for more magic |
06:07:33 | narimiran | and please stop pasting multiline stuff here |
06:07:36 | alexander92 | but it's invoking operators similarly to how it invokes functions |
06:07:50 | FromDiscord | <has1> its a tiny snippet |
06:08:00 | leorize[m] | @has1 please refrain from posting code blocks on discord |
06:08:14 | leorize[m] | https://irclogs.nim-lang.org/24-09-2019.html#06:07:19 |
06:08:21 | leorize[m] | ^ this is what we see on a good day |
06:08:30 | FromDiscord | <has1> i mean this is a coding discord. if i cant even post a 2 line |
06:08:32 | leorize[m] | on a bad day the discord bridge lags behind |
06:08:35 | FromDiscord | <has1> then what is the point |
06:08:39 | FromDiscord | <has1> maybe you shouldnt use IRC then |
06:08:40 | alexander92 | has1 : you are free to alias %* to something like genJson |
06:08:55 | FromDiscord | <has1> if it cant handle a simple 2 line text |
06:09:13 | livcd | so do we have an influx of hundreds of thousands of new users ? |
06:09:33 | leorize | irc is a first class citizen ;) |
06:09:38 | alexander92 | the reasons we do use an operator is that for very common operations, it makes sense to have a shortcut |
06:09:48 | Yardanico | Well IRC can handle everything, there's a reason Twitch uses IRC for their chat. |
06:09:56 | Yardanico | It's just that it doesn't look good in irc |
06:10:06 | alexander92 | but this doesnt happen very often ($ for strings, % for json.. mostly that, there are sometimes other exceptions) |
06:10:33 | FromDiscord | <has1> i mean its literally 2 lines that i was asking about |
06:10:37 | FromDiscord | <has1> so i was posting the snippet |
06:10:40 | alexander92 | i'd argue 2-3 lines are fine |
06:10:41 | livcd | btw Araq in his blod sounded kinda sad |
06:10:41 | alexander92 | honestly |
06:10:45 | livcd | or maybe nostalgic |
06:10:48 | livcd | or is it just me ? |
06:10:52 | FromDiscord | <has1> I can understand that it is annoying if people post entire programs on here |
06:10:56 | alexander92 | but any more than that just doesnt look well |
06:11:27 | Yardanico | livcd: maybe he wanted Nim to always be 0.x :) |
06:11:36 | Yardanico | We'll never know the truth |
06:11:40 | leorize | it's just that discord has the tendency to lag behind irc at times |
06:11:47 | alexander92 | probably he still wanted to have even more stuff inside |
06:12:01 | leorize | so we end up with lines posted with significant gaps |
06:12:05 | alexander92 | but you have to do the 1.0 one day |
06:12:27 | leorize | someone should fix that irc bridge though |
06:12:27 | Yardanico | leorize: I hope I'll manage to write a good enough discord IRC bridge for Nim with auto pasting to ix.io |
06:12:38 | alexander92 | another option is to autolink the code snippet |
06:12:39 | Yardanico | Right now it uses matterbridge |
06:12:43 | alexander92 | similarly to the gitter bridge |
06:12:44 | leorize | gitter and matrix can shorten things into code snippets |
06:12:50 | leorize | *link to snippets |
06:13:08 | FromDiscord | <has1> again, you could look at go here |
06:13:09 | alexander92 | but i agree that it's useful to write inline code |
06:13:19 | FromDiscord | <has1> what they do is take a multi line code block |
06:13:25 | FromDiscord | <has1> and paste it into the goplayground |
06:13:31 | FromDiscord | <has1> and then link that |
06:13:40 | leorize | yea, we could improve on that |
06:13:42 | alexander92 | yeah, that's a good option as well, but often |
06:13:51 | alexander92 | snippets are not self-sufficient to run |
06:13:57 | alexander92 | they can be pseudo-code or something else |
06:14:00 | leorize | the bridge we are using for discord is kinda bad |
06:14:06 | Yardanico | leorize: yes :) |
06:14:06 | alexander92 | but i agree that it still makes sense to do it |
06:14:27 | FromDiscord | <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:55 | alexander92 | a bigger problem imo is |
06:14:56 | Yardanico | @has1 it's mostly an issue of the Discord-IRC bridge and can be solved |
06:15:03 | leorize | yea, it's just that discord has been banned from here for quite sometime :P |
06:15:08 | alexander92 | that changing a message on discord usually resends it |
06:15:11 | leorize | so people didn't look at it |
06:15:18 | planetis[m] | bravo for the new release! thanks devs! |
06:15:21 | alexander92 | which is also not nice, but not sure how to fix that one |
06:15:33 | leorize | just don't repost things |
06:15:35 | alexander92 | maybe we can generate a diff from the bridge with `*` |
06:15:38 | leorize | that's how the gitter bridge does |
06:15:48 | alexander92 | but on the other hand the `edit` is useful info |
06:16:05 | alexander92 | e.g. if they change a letter we can detect the part of the sentence and resend only it with * |
06:16:33 | leorize | too bad you can't easily link to a discord discussion without having to login |
06:16:40 | alexander92 | ugh yeah |
06:16:51 | leorize | that ability of gitter really simplify things for the bridge |
06:20:47 | leorize | @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:51 | leorize | (regarding "strange" operators and not forced module qualification) |
06:22:55 | FromDiscord | <Shield> Nim isn't just a version |
06:23:04 | FromDiscord | <Shield> it's the commits we made along the way xD |
06:23:29 | livcd | has1: any non trivial Go with imports does not work well with the playground |
06:23:35 | Zevv | hangover anyone? |
06:23:47 | livcd | has1: all the bridges serve one purpose and that is not to force people to a single ecosystem. |
06:24:28 | livcd | If 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:40 | leorize | I think the criticism are targeted torward our terrible discord bridge :P |
06:27:00 | * | PMunch joined #nim |
06:32:39 | PMunch | The release yesterday seems to have gone well :) |
06:33:11 | PMunch | And the topic is still on the front-page of HN for me, so I guess it was well timed as well :P |
06:33:11 | leorize | narimiran: 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:12 | narimiran | leorize[m]: who knows, maybe today :) |
06:40:27 | FromDiscord | <Shield> is async not available for newruntime? |
06:40:37 | FromDiscord | <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:00 | leorize_ | yea, it's not available atm |
06:41:40 | * | ng0 quit (Ping timeout: 260 seconds) |
06:41:48 | FromDiscord | <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:59 | lqdev[m] | I didn't follow the news closely, is macros.quote not available in 1.0? |
06:45:29 | leorize_ | it's still there |
06:45:32 | PMunch | lqdev[m], it should be |
06:45:32 | * | leorize_ is now known as leorize |
06:45:56 | lqdev[m] | right, but I heard it's gonna get deprecated? |
06:46:05 | FromDiscord | <Shield> my nim file server and discord bot will have to be delayed even more... |
06:46:27 | PMunch | lqdev[m], where did you hear that? |
06:46:51 | leorize | it has its share of issues, but it's not going anywhere soon |
06:47:07 | leorize | @Shield: you'll be fine with the discord bot I think |
06:47:38 | lqdev[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:52 | lqdev[m] | I don't want to search the logs rn, I don't have much time on me |
06:48:50 | leorize | @Shield: also boehm gc should be able to free memory properly |
06:49:03 | FromGitter | <zacharycarter> clyybber: you around by any chance? |
06:49:03 | leorize | and we can always wait for the AraqGC |
06:49:34 | FromDiscord | <Shield> I see, I never tested boehm |
06:50:18 | FromDiscord | <has1> @yardanico how is %*{do:"text"} not magical? |
06:50:23 | FromDiscord | <Shield> i kinda want the lowest memory usage possible since i'm running it on my only machine |
06:50:30 | FromDiscord | <has1> I mean wherecis it coming from? |
06:50:49 | FromDiscord | <has1> I mean where is it coming from? |
06:51:16 | leorize | it's from the `json` module |
06:51:23 | FromDiscord | <has1> Is this like a build in function? But instead of a function is a macro? |
06:51:37 | Yardanico | It's not a built in function |
06:51:45 | leorize | and if you're using vscode-nim, hovering on the symbol will give you the source module |
06:51:46 | Yardanico | You can create a similar macro in your own code |
06:52:30 | Yardanico | Macros are procedures which are run at compile time and operate on an AST of the code |
06:52:40 | Yardanico | They're very powerful |
06:52:56 | FromDiscord | <has1> So importing something seems to import it into the current namespace? |
06:53:08 | FromDiscord | <has1> I don't need to prefix it with json.function |
06:53:09 | leorize | yes |
06:53:11 | Yardanico | Yes, by default the behaviour is like this |
06:53:18 | FromDiscord | <has1> I can use function directly |
06:53:38 | FromDiscord | <has1> Isn't that pretty unfortunate? |
06:53:43 | leorize | narimiran has a blog post on this if you're interested on why this behavior is the default |
06:54:00 | FromDiscord | <has1> If you have a prefix, you'd know where things are coming from |
06:54:13 | Yardanico | @has1 O disagree that you should prefix everything |
06:54:26 | Yardanico | *I |
06:54:26 | lqdev[m] | usually you don't care about where stuff's coming from |
06:54:56 | leorize | when you do, it's easy to just look at the list of import and deduce it |
06:55:30 | solitudesf | or if you're using normal editor with nim extension you could just `go to definition` |
06:55:42 | leorize | https://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:48 | FromDiscord | <has1> I'll take a look |
06:57:25 | FromDiscord | <has1> What about the json thing, that's a macro? So you can define some special syntax? |
06:57:38 | Yardanico | But if you really want to, you can explicitly prefix everything in your code. Although it would actually look more cluttered. |
06:57:38 | Yardanico | For that behavior use "from module import nil" |
06:57:39 | leorize | no, you're limited to what the compiler can parse |
06:57:40 | FromDiscord | <has1> And that is translated to some code? |
06:58:04 | leorize | the compiler parse your code into an AST tree |
06:58:20 | FromDiscord | <has1> So what's a macro |
06:58:23 | FromGitter | <zacharycarter> @Clyybber - whoops I forgot you might use gitter :P |
06:58:27 | leorize | a macro then construct an another AST tree that is the desired code |
06:58:51 | leorize | https://nim-lang.org/learn.html |
06:58:55 | leorize | see Macro tutorial |
06:59:00 | leorize | it will expand more on this topic |
06:59:47 | Yardanico | @has1 https://nim-lang.org/docs/manual.html#macros |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:17 | Yardanico | I 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:09 | FromDiscord | <has1> It's pretty confusing, it talks about the AST |
07:03:16 | FromDiscord | <has1> But not really what it is |
07:03:23 | FromDiscord | <has1> Or what the difference is to templates |
07:03:36 | * | krux02 joined #nim |
07:03:59 | FromDiscord | <has1> But does this happen at compile time? |
07:04:09 | leorize | yes, everything happens at compile time |
07:04:20 | leorize | templates let you take a block as-is |
07:04:30 | FromDiscord | <has1> Not everything does |
07:04:36 | leorize | macros let you inspect that block and build code to whatever you'd like |
07:04:47 | * | gmpreussner joined #nim |
07:05:03 | Araq | for others compile-time vs runtime is "confusing", you always have to draw the line somewhere |
07:05:19 | FromDiscord | <has1> For example, in go you would call a println function and the logic happens at runtime, right? |
07:05:54 | solitudesf | macro and template stuff happens at compile time, that what he meant |
07:06:01 | FromDiscord | <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:23 | leorize | you can think of it like that... |
07:06:45 | alexander92 | based on the input type and AST |
07:07:15 | leorize | @has1: well, try following that tutorial |
07:07:16 | alexander92 | e.g. imagine you want to write an `unless` construct |
07:07:30 | FromDiscord | <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:31 | leorize | you'll figure it out real quick |
07:07:56 | alexander92 | has1 yes, and much more |
07:08:14 | FromDiscord | <has1> But using go, if I write a function, all of this happens at runtime |
07:08:26 | leorize | yes |
07:08:37 | FromDiscord | <has1> Well that's pretty cool actually |
07:08:56 | * | msmorgan quit (Ping timeout: 276 seconds) |
07:10:25 | * | msmorgan joined #nim |
07:11:33 | Yardanico | @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:20 | Yardanico | so "module", "startConfig", "command" are all done with metaprogramming either with macros or template |
07:12:49 | * | endragor joined #nim |
07:17:29 | Zevv | git push |
07:17:48 | Zevv | oosp |
07:17:54 | alexander92 | sorry git is not available |
07:17:58 | alexander92 | i also do this from time to time |
07:18:01 | Zevv | ETOOMANYWINDOWS |
07:18:31 | narimiran | !eval echo (NimMajor, NimMinor, NimPatch) |
07:18:33 | NimBot | (0, 20, 2) |
07:18:55 | narimiran | PMunch: ^ completely unusable!! ;P |
07:21:13 | Yardanico | I also type "clear" in IRC sometimes |
07:23:55 | PMunch | narimiran, hmm so my auto-update script still doesn't work.. |
07:24:10 | Zevv | Yardanico: use Ctrl-L instead :) |
07:25:11 | alexander92 | help |
07:25:12 | Yardanico | Zevv: yeah Iearned that recently on Reddit |
07:26:02 | * | alexander92 quit (Quit: WeeChat 2.4) |
07:26:02 | PMunch | narimiran, 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:16 | alexander92 | oh no why `/BYE` quits |
07:26:56 | alexander92 | 2 |
07:27:00 | leorize | PMunch: shouldn't we make those docker image uhmm, official now? |
07:27:20 | leorize | they're unofficial and not maintained by the project I think |
07:27:25 | narimiran | leorize: i'll have another official task for you ;) |
07:27:53 | alexander92 | he'll become the new prime minister right, i knew it |
07:28:52 | Zevv | Are all CI tests done with a -d:danger or -d:release compiler? |
07:29:08 | leorize | -d:release iirc |
07:29:16 | Zevv | https://github.com/nim-lang/Nim/issues/12244 seems pretty serious, but how can that slip through? |
07:32:21 | Zevv | oooh wait a minute |
07:32:45 | PMunch | leorize, yeah I have no idea who maintains these images. I just blindly trust them for the playground :P |
07:33:18 | leorize | @Shield: I dug the gc code and found that memory is actually being released :/ |
07:33:51 | leorize | can you give me a snippet of memory not being freed by the gc? |
07:34:14 | * | sealmove joined #nim |
07:36:28 | alexander92 | https://github.com/nim-lang/Nim/issues/12245 |
07:36:41 | alexander92 | is it possible people can still update to the invalid 1.0 |
07:37:05 | narimiran | maybe he updated before the updated v1 |
07:42:17 | * | rokups joined #nim |
07:43:23 | * | hhr joined #nim |
07:43:44 | FromDiscord | <Shield> @leorize https://pastebin.com/FEQ6RwVT |
07:43:44 | FromDiscord | <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:09 | FromDiscord | <Shield> so it takes one spike in memory usage to hold it forever |
07:44:41 | FromDiscord | <Shield> useMalloc does solve the issue, but i'll have to wait for async to catch up with newruntime |
07:46:28 | FromDiscord | <Shield> i wonder if it's the same on linux, i need to get a VM sometime in the future |
07:47:01 | leorize | you should test this on linux |
07:47:20 | leorize | WSL should do |
07:47:53 | leorize | I was hoping for a smaller snippet so I can easily pin point the problem :P |
07:51:25 | * | Vladar joined #nim |
07:55:56 | leorize | @Shield: so on linux it will stop growing at 277M |
07:55:58 | FromDiscord | <Kiloneie> Man do you people sleep ? 300+ messages since 00.30 |
07:56:07 | leorize | timezones :P |
07:56:24 | narimiran | 100 of those are just multiline code pastes :P |
07:56:25 | FromDiscord | <Kiloneie> i guess D: |
07:57:26 | FromDiscord | <Kiloneie> Where are you guys from even ? i knowe araq is from Germany. |
07:57:42 | PMunch | I'm in Norway |
07:57:46 | FromDiscord | <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:48 | narimiran | croatia |
07:58:00 | FromDiscord | <Kiloneie> hai naibghour, Slovenia here |
07:58:22 | narimiran | oooo, slovenac! koji grad? |
07:58:40 | PMunch | I 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:44 | FromDiscord | <Kiloneie> Okoli Novega mesta |
07:58:52 | FromDiscord | <Kiloneie> interesting |
07:59:09 | leorize | @Shield: already did |
07:59:28 | PMunch | I saw you were using Game Maker in the logs by the way Kiloneie |
07:59:28 | leorize | from `strace`, the gc stops allocating after doing so twice |
07:59:33 | leorize | no deallocation in site |
07:59:39 | leorize | sight* |
07:59:42 | FromDiscord | <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:02 | FromDiscord | <Kiloneie> I was heavily for like 2-3 years |
08:00:18 | FromDiscord | <Kiloneie> there is something to show for that, not much though |
08:00:20 | narimiran | @kiloneie pozdrav (i)z R(ij)eke |
08:00:40 | PMunch | That's how I got into programming about 16 years ago (oh wow, didn't realise it was that long..) |
08:00:59 | FromDiscord | <Kiloneie> Game Maker 7.0 was a long time ago |
08:01:07 | Yardanico | @Kiloneie Russia :) |
08:01:11 | PMunch | Yup, I think I started around 5 or 6 |
08:01:28 | PMunch | I remember when 8 came out, there was a lot of drama. Don't remember why though :P |
08:01:52 | FromDiscord | <Shield> by deallocation do you mean decrease in memory usage or checking that the variable was deallocated? |
08:01:54 | FromDiscord | <Kiloneie> a lot of cold countries xD... im cold already here, im cold blooded or something, wake up coughing like a maniac. |
08:02:06 | FromDiscord | <Kiloneie> 1 part of drama was the logo lol |
08:02:09 | leorize | @Shield I was looking for munmap() |
08:02:16 | FromDiscord | <Kiloneie> huge smiley face with a mouth of red |
08:02:21 | FromGitter | <arnetheduck> congratulations on the release! |
08:02:32 | FromDiscord | <Shield> it's interesting to know that linux does that, on windows i can get it over 1gb |
08:02:54 | FromDiscord | <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:49 | leorize | @Shield: tested three GC: default, markAndSweep, boehm |
08:05:57 | leorize | all show the same behavior |
08:06:05 | FromGitter | <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:46 | FromDiscord | <djazz> I got the Nim in Action ebook :3 |
08:06:46 | FromDiscord | <djazz> https://cdn.discordapp.com/attachments/371759389889003532/625966336639631371/DSC_1307.JPG |
08:06:52 | * | shota quit (Remote host closed the connection) |
08:07:08 | FromDiscord | <Kiloneie> got that a month ago, pretty good, there are a few things to be updated though |
08:07:14 | FromDiscord | <Kiloneie> you will know when compiler whines |
08:07:39 | FromDiscord | <djazz> Yeah I know |
08:07:42 | FromDiscord | <Kiloneie> doesn't start till like chapter 6?, i found one in chapter 9 metaprogramming, the first example |
08:08:01 | leorize | @Shield: so the rest of the leaks are logical |
08:08:08 | FromDiscord | <djazz> Was only $25 for book and digital |
08:08:13 | leorize | not a GC problem |
08:08:21 | FromDiscord | <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:33 | FromDiscord | <Kiloneie> yeah dom put a special discount for 1.0 |
08:08:49 | leorize | it's just manning doing their job |
08:08:51 | leorize | not dom :P |
08:08:55 | FromDiscord | <Kiloneie> i could of gotten one myself trough a blog back then, didn't, so i payed like 30, 35 idk |
08:09:10 | FromDiscord | <Kiloneie> really ? they keep track of versioning lol ? |
08:09:19 | FromDiscord | <djazz> Sadly the epub is just converted from kindle with calibre it seems |
08:09:29 | FromDiscord | <djazz> No embedded fonts |
08:10:24 | FromDiscord | <Kiloneie> you get multiple versions don't you ? |
08:10:32 | FromDiscord | <Kiloneie> i got like pdf, website one... a lot |
08:10:40 | FromDiscord | <djazz> Yes |
08:10:54 | FromDiscord | <Kiloneie> i downloaded them but i use the website one because it's the most functional one |
08:10:57 | FromDiscord | <djazz> LiveBook, pdf, ebook formats and physical is on its way |
08:11:03 | FromDiscord | <Shield> I see |
08:11:24 | FromDiscord | <Kiloneie> i want a physical one, but not if it has things to update, so i didn't order |
08:11:40 | FromDiscord | <Kiloneie> like books i bought for game maker still work, 100% |
08:11:47 | FromDiscord | <djazz> I'm just being picky about ebooks since do some epub publishing myself :) |
08:12:17 | FromDiscord | <djazz> (fiction novels though) |
08:12:29 | * | nif quit (Quit: ...) |
08:12:39 | * | nif joined #nim |
08:13:49 | FromDiscord | <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:45 | FromDiscord | <Kiloneie> I wonder how long it would take to make game maker 7.0 in Nim... |
08:18:17 | FromDiscord | <djazz> I am not a writer, but the stories arent your usual fic heh |
08:19:12 | dom96 | Kiloneie: the book is 1.0 compatible, all examples are in the test suite |
08:20:30 | FromDiscord | <Kiloneie> and the symbol part in metaprogramming where symbol is deprecated ? i mean it all works, just a few minor things |
08:20:40 | narimiran | dom96: check out the discussions on HN and r/programming, maybe you can answer some of the questions raised there.... |
08:21:28 | narimiran | btw, i'm quite surprised by the lack of the comments on lobste.rs |
08:22:27 | FromGitter | <timotheecour> feedback on https://forum.nim-lang.org/t/5214#32703 welcome (for an article on nim) |
08:29:32 | leorize | I think Nim is in the unique position of being able to do... everything :P |
08:29:39 | leorize | it's hard to market that |
08:29:59 | FromDiscord | <Kiloneie> Nah, it will market itself once people realize what they are missing on |
08:30:36 | FromDiscord | <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:02 | FromGitter | <alehander42> hey @timotheecour good to see you around |
08:31:03 | leorize | I don't think "market itself" is a viable strategy nowadays |
08:31:54 | FromDiscord | <Kiloneie> yeah... i know, PureBasic did that + license and now it's dead |
08:31:58 | FromDiscord | <Kiloneie> it never took of |
08:32:02 | leorize | we need to learn from vlang :P |
08:32:08 | FromDiscord | <Shield> gotta make more libs and bindings fast |
08:32:14 | FromDiscord | <Kiloneie> but Pure Basic is far beneath Nim |
08:32:17 | FromGitter | <timotheecour> hi @alehander42 :) mostly on GitHub rather than here |
08:33:13 | leorize | people keep looking for the "unique" in Nim |
08:33:22 | leorize | but you can't just say Nim is suitable for everything :P |
08:33:39 | FromDiscord | <Shield> i think a gui library and opengl should be part of the stdlib to embrace the batteries included concept |
08:33:59 | leorize | Araq is having a different plan for that iirc |
08:34:08 | FromDiscord | <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:25 | FromDiscord | <Kiloneie> like take the syntax for example |
08:34:35 | * | owl_000 joined #nim |
08:35:22 | FromDiscord | <Shield> nim is unique in a way that made it the only language i actually like and keep going back to |
08:35:41 | FromDiscord | <djazz> One lang to rule them all! |
08:35:43 | FromDiscord | <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:15 | FromDiscord | <Kiloneie> i like how python looks, writes and reads, but i don't like it's slow speed and dynamic typing |
08:36:25 | FromDiscord | <Kiloneie> Nim fixes all of that, and more |
08:36:59 | FromDiscord | <Kiloneie> add metaprogramming and you got one sweet language, but it's not the end of the list yet |
08:37:00 | FromDiscord | <Shield> the metaprogramming is basically on point, is there anything that come close to it at all? |
08:37:13 | narimiran | guys, write all that as a reply to people asking those questions on HN and r/programming ;) |
08:37:16 | FromDiscord | <Kiloneie> maybe common lisp smthing... i don't know |
08:37:27 | leorize | lisp has better metaprogramming |
08:37:32 | FromDiscord | <Kiloneie> i have never encountered metaprogramming before, and it's so EASY in Nim |
08:37:36 | leorize | but I hate those () |
08:37:44 | * | leorize hides |
08:37:48 | FromDiscord | <Shield> templates are really easy it makes me happy |
08:37:49 | FromDiscord | <Kiloneie> i was sold just on the syntax of nim |
08:38:12 | FromDiscord | <Kiloneie> i haven't done any macros, and yes templates are so cool, nothing hard about them |
08:38:23 | FromDiscord | <Kiloneie> anyways( workout time) |
08:38:29 | FromDiscord | <Shield> macros are a bit advanced and aren't as simple |
08:38:55 | FromDiscord | <Shield> i also like that it doesn't rely on OOP |
08:39:24 | dom96 | Kiloneie: 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:04 | leorize | narimiran: I'll leave that to you :) |
08:40:07 | FromDiscord | <Shield> DSLs is another thing, it's easy to write them in Nim |
08:40:33 | FromDiscord | <Kiloneie> the only oop i've ever done was game maker xD barely oop |
08:40:41 | narimiran | leorize: nah, it is better if it comes from somebody who is not payed to work on nim ;) |
08:40:51 | FromDiscord | <Kiloneie> i mean oop has it's uses, probably very useful in games, but you don't need it for most things |
08:41:46 | FromDiscord | <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:24 | FromDiscord | <Kiloneie> ancient language design... |
08:42:41 | FromDiscord | <Kiloneie> and since so much is doded in it, it is hard to change things |
08:42:53 | FromDiscord | <Kiloneie> coded * |
08:43:20 | FromDiscord | <Kiloneie> like seriously, who needs ; semicolons nowadays, why do you need to write int main() bla bla |
08:43:30 | FromDiscord | <Shield> it's just extra noise, some languages are proud that everything is an object including literals |
08:43:40 | FromDiscord | <Kiloneie> there is a lot of things that you just don't need to do, shouldn't do |
08:43:51 | FromDiscord | <Kiloneie> being proud of ooping everything is... |
08:43:53 | * | sagax quit (Remote host closed the connection) |
08:44:06 | FromDiscord | <Kiloneie> how is performance like in such languages ? pretty terrible |
08:44:47 | FromDiscord | <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:50 | leorize | they were never designed to run on today's computer architecture |
08:45:27 | * | jxy quit (Ping timeout: 245 seconds) |
08:45:27 | owl_000 | python's everything is object too, even class is object |
08:45:35 | FromDiscord | <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:40 | narimiran | PMunch: what a great, thorough answer on HN! |
08:46:22 | * | jxy joined #nim |
08:47:22 | FromDiscord | <Shield> i think if Nim fixed the const/let thing exelotl pointed out it'll be the perfect C |
08:47:50 | FromDiscord | <Shield> i was doodling with the idea of using templates and macro to write in assembly just for fun |
08:48:09 | FromDiscord | <Shield> it really saves time spent on coding |
08:49:09 | FromDiscord | <Kiloneie> i had that idea though, but i am not the person to actually do it, i like to think 😛 |
08:49:53 | FromDiscord | <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:29 | FromDiscord | <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:41 | FromDiscord | <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:59 | leorize | anyone wants to try making drivers in Nim? |
08:52:09 | leorize | there's github.com/ixy-languages/ixy-languages |
08:52:12 | FromDiscord | <Shield> i think the only real equivalent to Nim is Terra |
08:52:29 | FromDiscord | <Shield> but that project is really young and doesn't have good support |
08:54:34 | * | Hideki_ joined #nim |
08:54:48 | FromDiscord | <Shield> people actually mentioned the lack of multi inheritence as a point against Nim.... |
08:55:03 | leorize | that fact alone is terrifying |
08:55:48 | FromDiscord | <Shield> what's funny is that they can't respond to "you can make your own OOP system with metaprogramming" |
08:57:29 | sealmove | I 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:00 | sealmove | Comparing to Terra won't do since it's very much backend-agnostic. |
08:59:03 | * | Hideki_ quit (Ping timeout: 245 seconds) |
09:00:47 | FromDiscord | <Delta231> @Cadey~ I can understand but V is developing rapidly. |
09:01:30 | * | couven92 joined #nim |
09:03:55 | Zevv | leorize: what do you mean by 'drivers'? |
09:04:39 | leorize | see the link I linked below |
09:05:44 | Zevv | hm 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:10 | Zevv | I'm having a hard time finding time with an empty head lately though, my work projects are mentally demanding :/ |
09:06:58 | Zevv | oh these are *userspace* drivers even, I now see. that's cheating |
09:08:35 | FromDiscord | <Shield> it would've been impressive if they had to also code the kernel |
09:09:52 | Zevv | python |
09:11:10 | FromDiscord | <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:42 | FromDiscord | <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:00 | FromDiscord | <Kiloneie> and if V is open source, we can just nick that blazing fast compiler cod |
09:12:06 | FromDiscord | <Kiloneie> code * |
09:13:16 | FromDiscord | <Kiloneie> but anyways Nim does what i thought of long ago |
09:13:36 | FromDiscord | <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:03 | Zevv | PMunch: excellent answer post on HN! |
09:15:11 | FromDiscord | <Kiloneie> probably |
09:16:09 | FromDiscord | <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:47 | FromDiscord | <Shield> i think benchmarks should be included as an answer to why use Nim |
09:17:35 | FromDiscord | <Kiloneie> probably, but you need a bunch of them, with possible direct representations in python and C and maybe more |
09:17:41 | FromDiscord | <Shield> also that post about writing a python library in Nim to get great speed is pretty cool |
09:17:47 | FromDiscord | <Kiloneie> which we already have to an extendm but not enough different ones |
09:18:08 | FromDiscord | <Kiloneie> Yeh, Nim doesn't just compile to so many languages, but vice versa |
09:18:18 | FromDiscord | <Kiloneie> you can use it to help you with Python, or vice versa |
09:21:50 | FromDiscord | <Kiloneie> i haven't actually done any of that, i should try it out at some point soon |
09:24:07 | Yardanico | @Shield V compiler doesn't even have AST representation of the code in the compiler |
09:24:49 | Yardanico | And they plan to add this after 1.0 |
09:25:07 | FromGitter | <mratsim> so it's a transpiler :p |
09:25:09 | Yardanico | And 1.0 *should be* released in December 2019 |
09:27:34 | * | elrood joined #nim |
09:28:25 | elrood | congrats on the release, guys. good luck with nim |
09:33:05 | Araq | elrood, thanks, I appreciate it |
09:33:32 | * | fredrik92 joined #nim |
09:35:12 | PMunch | narimiran, Zevv, thanks :) |
09:36:58 | * | couven92 quit (Ping timeout: 245 seconds) |
09:38:01 | FromDiscord | <djazz> Nice reply PMunch! |
09:40:19 | PMunch | Thanks djazz :) |
09:40:27 | PMunch | Hi fredrik92, come to celebrate Nim v1.0? |
09:40:38 | fredrik92 | WOHOOOO! |
09:40:45 | * | fredrik92 is now known as couven92 |
09:41:01 | FromDiscord | <djazz> 🎉 |
09:41:02 | couven92 | PMunch, Yeah... Sorry I missed it yesterday... |
09:43:10 | FromDiscord | <Delta231> 1.0 Nim |
09:43:14 | FromDiscord | <Delta231> 🎉 |
09:43:38 | FromGitter | <geotre> v1.0 is here?? Awesome! |
09:44:26 | FromDiscord | <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:19 | couven92 | As 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:05 | Araq | niv: yay! |
09:51:05 | FromDiscord | <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:10 | FromDiscord | <Kiloneie> Is anyone planning a visual designer for Nim ? |
09:53:38 | FromDiscord | <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:21 | FromDiscord | <niv> what thing do you want to design visually? |
09:59:02 | FromDiscord | <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:17 | FromDiscord | <Kiloneie> it's an idea, so don't think too much about it |
10:00:21 | FromDiscord | <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:30 | FromDiscord | <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:08 | FromDiscord | <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:10 | FromDiscord | <niv> but i have a narrow perspective on this admittedly. |
10:01:17 | FromDiscord | <Kiloneie> it is hard to teach people to code |
10:01:44 | FromDiscord | <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:10 | FromDiscord | <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:26 | FromDiscord | <niv> yes, it takes a decade or two ;) |
10:02:26 | FromDiscord | <Kiloneie> people learn best when they can visualize things |
10:03:08 | FromDiscord | <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:22 | FromDiscord | <Kiloneie> thats about 5-6 years ago |
10:03:31 | FromDiscord | <SodaScripter> I have absolutely no idea how to program |
10:03:37 | FromDiscord | <SodaScripter> 👍 |
10:03:46 | FromDiscord | <Kiloneie> okay xD |
10:03:56 | FromDiscord | <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:17 | FromDiscord | <SodaScripter> and I've just been loosing my mind cause I cant settle on a language |
10:04:29 | FromDiscord | <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:35 | leorize | the solution is simple, settle on Nim :P |
10:04:37 | FromDiscord | <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:46 | FromDiscord | <Kiloneie> yeh Nim is amazing |
10:05:12 | FromDiscord | <Kiloneie> there is literally no language with more elegant syntax that Nim has, nor the features |
10:05:18 | FromDiscord | <SodaScripter> I wanna do like low level shit |
10:05:22 | FromDiscord | <SodaScripter> but |
10:05:23 | FromDiscord | <SodaScripter> ugh |
10:05:45 | narimiran | @SodaScripter i would advise getting some sleep before doing that ;) |
10:05:55 | FromDiscord | <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:32 | FromDiscord | <SodaScripter> I got too much sleep |
10:06:39 | FromDiscord | <SodaScripter> hence why I'm up at 3 am |
10:06:41 | leorize | nim can do everything :P |
10:06:53 | FromDiscord | <niv> well, except multithreaded async |
10:06:55 | * | icyphox is now known as Entropic |
10:07:09 | FromDiscord | <Kiloneie> yeh, if you were to learn Nim, there is almost nothing you could not do with it |
10:07:12 | Araq | niv: scheduled for 1.1 |
10:07:21 | FromDiscord | <niv> yay! |
10:07:49 | FromDiscord | <niv> one of the biggest wins of nim, imo, is how quick you can iterate and Get Shit Done |
10:08:26 | FromDiscord | <Kiloneie> yeah, no ancient language design crap getting in your way |
10:08:34 | FromDiscord | <Kiloneie> or forced philosophies you don't need |
10:08:55 | FromDiscord | <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:23 | FromDiscord | <Kiloneie> Good stuff |
10:10:22 | owl_000 | is there any roadmap to know what is upcoming in nim |
10:10:43 | FromDiscord | <SodaScripter> I've been trying to learn C++ for the past month |
10:10:47 | FromDiscord | <SodaScripter> it's not clicking for me |
10:10:57 | FromDiscord | <niv> you dont _learn c++_ |
10:11:22 | FromDiscord | <Kiloneie> no don't do c++ |
10:11:25 | FromDiscord | <Kiloneie> it's horrible |
10:11:32 | FromDiscord | <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:37 | FromDiscord | <Kiloneie> it's the definition of pain |
10:11:41 | FromDiscord | <djazz> I am movong from c++ to nim |
10:11:54 | FromDiscord | <niv> i dont think nim can replace c++ |
10:12:07 | FromDiscord | <Kiloneie> nim forces on you so much stuff you don't need, ancient language design crap |
10:12:22 | FromDiscord | <niv> modern c++ is very pleasant tbh |
10:12:35 | FromDiscord | <Kiloneie> really ? got any examples ? |
10:12:41 | FromDiscord | <niv> examples for what? |
10:12:43 | FromDiscord | <Kiloneie> last i used it i wanted to shoot myself |
10:12:55 | FromDiscord | <Kiloneie> modern c++ code that is plesant |
10:13:14 | * | shota quit (Remote host closed the connection) |
10:13:22 | Araq | owl_000, working on it... |
10:13:53 | FromDiscord | <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:08 | FromDiscord | <Kiloneie> that's right, but i hate it's syntax... |
10:14:26 | owl_000 | great Araq :) |
10:14:37 | FromDiscord | <Kiloneie> does c++ have dynamic code checking like Nim and Python does ? |
10:14:47 | FromDiscord | <Kiloneie> i mean does it have it now ? it didn't used to |
10:14:51 | FromDiscord | <niv> what's dynamic code checking? |
10:14:59 | FromDiscord | <Kiloneie> probably wrong term for it |
10:15:23 | FromDiscord | <Kiloneie> but nim checks your code for syntax errors when you type it, before you compile it |
10:15:35 | FromDiscord | <Kiloneie> (also python) |
10:15:40 | FromDiscord | <djazz> Depends on your editor? |
10:15:47 | leorize | it's an editor thing |
10:15:49 | FromDiscord | <niv> clang language-server works well these days |
10:15:49 | leorize | not Nim's |
10:16:08 | FromDiscord | <niv> as seen in the recent CLion EAP |
10:16:31 | FromDiscord | <Kiloneie> i used dev-cpp back in the day, it had no such things... QQ |
10:16:54 | FromDiscord | <niv> if you're getting started have a look at visual studio on windows, or clion on mac/linux |
10:17:00 | FromDiscord | <Kiloneie> hi man, here have a compilation error from a missing semicolon that i will tell you nothing about 🙂 |
10:17:21 | FromDiscord | <Kiloneie> that's how i was taught c++ at school |
10:17:59 | FromDiscord | <niv> if you want to get into game development at all, hobby or otherwise, you need to pick up on c++ though. |
10:18:22 | FromDiscord | <Kiloneie> no ... |
10:18:46 | FromDiscord | <Kiloneie> theres Game Maker, Godot, UNity(C# , which is pretty nice) |
10:19:05 | FromDiscord | <niv> at the very least you'll want to target nintendo switch |
10:19:08 | FromDiscord | <Kiloneie> Unreal is c++ and people shy away from Unreal for hobbying |
10:19:25 | FromDiscord | <Kiloneie> idk, when i was making games, Windows was the platform |
10:19:33 | FromDiscord | <niv> that ship has sailed :) |
10:19:33 | FromDiscord | <Kiloneie> Game Maker, Godot, both target switch |
10:19:46 | FromDiscord | <niv> fair enough |
10:19:58 | FromDiscord | <Kiloneie> although pay some $$$ in game maker for that |
10:20:08 | FromDiscord | <Kiloneie> it's like 100-200$ or something |
10:20:15 | FromDiscord | <niv> sounds cheap to me |
10:20:25 | FromDiscord | <Kiloneie> you wanna target EVERY platform, 1000$+ ? |
10:20:48 | FromDiscord | <niv> still sounds incredibly cheap |
10:20:50 | FromDiscord | <Kiloneie> for about 3-4 years till next upgrade, not that expensive but.... it's big money upfront |
10:21:07 | FromDiscord | <niv> well, you can prototype on windows and then once you have something you can sell, you can ship everywhere |
10:21:40 | FromDiscord | <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:48 | FromDiscord | <Kiloneie> some really specific stuff |
10:21:53 | FromDiscord | <niv> "code that works everywhere" is such a myth |
10:22:26 | FromDiscord | <niv> on the most basic level, yes, but you will still be spending weeks on "making code that works, work" |
10:22:41 | FromDiscord | <Kiloneie> well some small tweaks are requires with game maker |
10:22:48 | FromDiscord | <Kiloneie> nothing big |
10:23:13 | FromDiscord | <niv> i guess GM has a very narrow attack surface where you can step out of the sandbox in the first place |
10:23:21 | FromDiscord | <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:57 | FromDiscord | <Kiloneie> you still gotta do resolution stuff etc though |
10:24:09 | FromDiscord | <Kiloneie> game maker does not make that one easy, nor is FPS changing easy |
10:24:19 | FromDiscord | <Kiloneie> that thing is ancient design that needs fixing |
10:24:36 | FromDiscord | <niv> dont be so quick in calling things "ancient design" :) |
10:24:40 | FromDiscord | <Kiloneie> every room you make has it's fixed fps speed, and you write code that moves by pixels |
10:24:48 | FromDiscord | <Kiloneie> GM does have those... |
10:24:59 | FromDiscord | <Kiloneie> you got an existing game at 30 fps ? |
10:25:13 | FromDiscord | <Kiloneie> good luck changing everything to be /2 then room speed * 2 |
10:25:18 | FromDiscord | <Kiloneie> it will take a while... |
10:25:40 | FromDiscord | <Kiloneie> godot has that done welll |
10:25:57 | FromDiscord | <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:59 | FromDiscord | <Kiloneie> game engine doesn't run at any specific FPS |
10:26:26 | FromDiscord | <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:39 | FromDiscord | <Kiloneie> like Undertale, Hotline miami etc |
10:27:09 | FromDiscord | <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:41 | FromDiscord | <Kiloneie> it's okay |
10:28:01 | FromDiscord | <Kiloneie> Game Maker does some things really well, and fails miserably in other departments |
10:28:15 | FromDiscord | <Kiloneie> it's language is very lackluster, gdscript eats it alive |
10:28:50 | FromDiscord | <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:09 | FromDiscord | <Kiloneie> godot is getting way ahead of Game Maker |
10:29:11 | FromDiscord | <SodaScripter> ugh |
10:29:16 | FromDiscord | <SodaScripter> fucking |
10:29:19 | FromDiscord | <SodaScripter> I want to make games |
10:29:21 | FromDiscord | <SodaScripter> but C++ is pain |
10:29:25 | FromDiscord | <niv> no, you dont |
10:29:33 | FromDiscord | <SodaScripter> what |
10:29:34 | FromDiscord | <Kiloneie> then use Godot man ? |
10:29:38 | FromDiscord | <SodaScripter> fuck Godot |
10:29:40 | FromDiscord | <Kiloneie> you can use c++ with Godot too |
10:29:43 | FromDiscord | <Kiloneie> okay.. |
10:30:00 | FromDiscord | <SodaScripter> I hate game engines, just me personally |
10:30:06 | PMunch | You can use Nim with Godot as well |
10:30:10 | FromDiscord | <Delta231> make games on console? |
10:30:14 | FromDiscord | <Kiloneie> well they save time... A LOT OF IT |
10:30:16 | FromDiscord | <niv> may i suggest https://love2d.org |
10:30:17 | FromDiscord | <Delta231> reverse engineer? |
10:30:31 | PMunch | You can use SDL directly |
10:30:52 | FromDiscord | <Kiloneie> game engines let you bypass a lot of coding bane so you can get to actually making games much much quicker |
10:31:03 | FromDiscord | <Kiloneie> that's why they exist, to save time, and enjoy the process a lot more |
10:31:04 | FromGitter | <mratsim> coding bane? |
10:31:06 | * | shota quit (Ping timeout: 252 seconds) |
10:31:17 | FromDiscord | <Kiloneie> making a game engine is not an easy task... |
10:31:23 | PMunch | Until you get stuck with some random issue in the engine that's impossible to fix.. |
10:31:36 | FromDiscord | <Kiloneie> those are so rare... |
10:31:38 | * | PMunch scowls at Unity for that memory leak |
10:31:43 | FromDiscord | <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:17 | FromDiscord | <niv> its control you dont want to miss if you have Big Plans |
10:32:33 | FromDiscord | <Shield> FPS independant games and delta is an acient design 😄 |
10:33:00 | FromDiscord | <niv> ancient design does not matter if you never hit more than 35fps anyways :D |
10:33:23 | FromDiscord | <Kiloneie> game maker 7.0 had that problem |
10:33:30 | federico3 | Shield: what's the modern design? |
10:33:31 | FromDiscord | <Kiloneie> it could reach very few fps... QQ |
10:33:33 | FromDiscord | <Shield> the human eye cannot see more than 25fps anyways xD |
10:33:38 | FromDiscord | <Kiloneie> no |
10:33:45 | FromDiscord | <niv> 12 actually, one each. combined 24 |
10:33:48 | FromDiscord | <Kiloneie> 60 fps you can feel so hard vs 30 fps |
10:33:52 | FromDiscord | <Kiloneie> i mean see... |
10:33:55 | FromDiscord | <Kiloneie> but feel you can |
10:33:57 | leorize | I think he's just trolling :P |
10:34:02 | FromDiscord | <Kiloneie> i guess |
10:34:13 | FromDiscord | <Kiloneie> no game should ever be made today at anything less than 60 fps |
10:34:21 | FromDiscord | <Kiloneie> it's just a fact |
10:34:26 | FromDiscord | <niv> im just venting because our current rendering target isnt being met |
10:34:34 | FromDiscord | <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:45 | dom96 | niv: Nim can actually do multi-threaded async ;) |
10:35:16 | FromDiscord | <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:17 | FromDiscord | <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:41 | FromDiscord | <niv> dom96: its basically just a network listener that manages some state (multiplayer services for a game) |
10:35:46 | dom96 | niv: of course, not all apps need it. For a web app you can quite easily enable multi-threading with httpbeast/jester |
10:36:12 | dom96 | ahh, then you should be able to base your architecture in the same way as httpbeast's |
10:36:17 | FromDiscord | <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:09 | FromDiscord | <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:33 | FromDiscord | <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:10 | FromDiscord | <Kiloneie> well game maker needs a better way of being able to do that globably |
10:38:38 | PMunch | How do you do multi-threaded async in Nim dom96? |
10:38:42 | FromDiscord | <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:00 | FromDiscord | <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:21 | dom96 | PMunch: using SO_REUSE_PORT + an event loop per thread |
10:40:03 | FromDiscord | <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:12 | PMunch | Ah right, yeah I was thinking that an event loop per thread shoud work |
10:40:22 | FromDiscord | <Shield> it's just that game maker has literally thousands of tutorials and covers anything under the sun |
10:40:32 | planetis[m] | Can a zip iterator be writen with a forLoopStmt macro? |
10:40:37 | PMunch | Would it theoretically be possible to move a task from one event loop/dispatcher to another? |
10:41:00 | PMunch | Like can Nim pass closure iterators between threads in any concievable way? |
10:41:14 | FromDiscord | <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:28 | Zevv | PMunch: Given that closures live on the heap, I'd say: not trivally |
10:42:13 | Zevv | And I do not know of any way to transplant data in or out closures |
10:42:30 | PMunch | So implementing a work stealer would be, difficult.. |
10:42:36 | FromDiscord | <Shield> i heard people saying good things about switch ports, what engine/framework are you using if i may ask? |
10:42:38 | FromDiscord | <SodaScripter> I'm gonna learn nim ig |
10:43:05 | FromDiscord | <niv> it's all custom. back then "engines" wasn't really a thing. |
10:43:11 | FromDiscord | <SodaScripter> @niv I've worked with love2d since I was 8 |
10:43:21 | FromDiscord | <SodaScripter> It's not as capable as I'd like it to be |
10:43:28 | FromDiscord | <niv> no, but its fun :) |
10:43:38 | PMunch | SodaScripter, if you haven't programmed much before I'd recommend https://narimiran.github.io/nim-basics/ |
10:43:42 | FromDiscord | <SodaScripter> my game ideas are too retardedlike to be made in something like it |
10:43:52 | FromDiscord | <Shield> it's still all directx and opengl right? or did you jump to vulkan already? |
10:44:25 | FromDiscord | <niv> it used to be opengl3, but we had to make some changes there. neither xbone nor ps4 run on opengl. |
10:45:00 | FromDiscord | <Shield> interesting |
10:45:27 | FromDiscord | <niv> it was a very "ancient" immediate-style rendering interface on top of that |
10:45:44 | FromDiscord | <niv> most of it was written 1998-2003-ish |
10:46:43 | FromDiscord | <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:20 | FromDiscord | <Shield> it seems that the sane approach for porting is to have some sort of virtual machine for rendering à la Destiny |
10:47:37 | planetis[m] | it looks obvious but I can't find any zip macro |
10:47:45 | FromDiscord | <niv> the sane approach to porting is to not do it. unfortunately buying food requires money |
10:48:19 | FromDiscord | <Shield> https://en.wikipedia.org/wiki/Another_World_(video_game) |
10:48:19 | FromDiscord | <Shield> did it too, and it's a pretty old game |
10:48:23 | FromDiscord | <niv> designing a modern rendering architecture that _performs well_ on all platforms is incredibly expensive |
10:49:00 | FromDiscord | <SodaScripter> I told my friend about nim and he just replied |
10:49:02 | FromDiscord | <SodaScripter> "meme" |
10:49:06 | FromDiscord | <SodaScripter> what did he mean by this |
10:49:29 | FromDiscord | <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:33 | FromDiscord | <Shield> for a 2d game.... |
10:50:24 | leorize | @SodaScripter: I need more information, how does he reply if you told him 'bout rust instead? |
10:50:28 | FromDiscord | <Shield> the most thing i miss the most from the ancient time is easy palette switching, have fun doing that using shaders |
10:50:42 | FromDiscord | <niv> haha. |
10:50:44 | FromDiscord | <SodaScripter> I've never asked them about rust |
10:50:56 | FromDiscord | <niv> i adore how the S/NES rendering "pipeline" works |
10:51:19 | FromDiscord | <niv> but i wouldnt give up on shaders. |
10:52:11 | Zevv | how does that work then? |
10:52:54 | FromDiscord | <niv> palette switching? |
10:53:55 | FromDiscord | <niv> this is a well done and imo approachable video series on the basics: https://www.youtube.com/watch?v=57ibhDU2SAI |
10:54:31 | PMunch | Essentially 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:50 | PMunch | Some systems had hard-coded palettes |
10:55:07 | Zevv | ye'olde color cycling |
10:55:33 | PMunch | http://www.effectgames.com/demos/canvascycle/?sound=0 |
10:56:01 | * | Hideki_ joined #nim |
10:56:01 | PMunch | If you hit the more options button you can see the palette and how it changes. The image itself it static |
10:56:18 | FromDiscord | <Shield> behold the beauty of palette switching |
10:56:19 | FromDiscord | <Shield> http://www.effectgames.com/demos/canvascycle/ |
10:56:34 | FromDiscord | <Shield> lol i just noticed we posted the same link xD |
10:56:50 | PMunch | It really is an amazing example though :) |
10:58:05 | Araq | funny thing: I knew what it's about without clicking on the link |
10:58:07 | dom96 | PMunch: 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:40 | PMunch | That 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:15 | PMunch | But 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:27 | PMunch | But that means they need to be able to jump from one thread to another. |
11:02:21 | PMunch | I guess that would mean copying the entire heap space used by the task over to the new thread though in Nim.. |
11:03:36 | Araq | PMunch, try it with --gc:boehm |
11:03:39 | * | hhr quit (Ping timeout: 240 seconds) |
11:03:44 | Araq | it gives you a shared heap |
11:04:39 | PMunch | Really? But how would that even look in Nim? |
11:05:07 | federico3 | PMunch: having that as the default parallelism method for Nim would be a huge benefit for the language |
11:05:19 | owl_000 | i make a post about nim in a python facebook group. and it received good appreciation. |
11:05:43 | * | hhr joined #nim |
11:05:46 | zedeus | PMunch: have you looked at mratsim's weave project? |
11:05:48 | Araq | PMunch, it just works, you tell Nim to shut up via {.gcsafe.}: blocks |
11:06:19 | Araq | and you can cast to 'ptr' in your threads and yet it's collected properly |
11:06:32 | PMunch | Araq, aha so you just do things that shouldn't be possible and tell Nim to not mind. |
11:06:52 | PMunch | zedeus, no I haven't heard of that |
11:07:07 | zedeus | it's the POC for his Picasso RFC, https://github.com/mratsim/weave |
11:08:01 | PMunch | Oh right, yeah I started looking at the Picasso RFC |
11:08:36 | PMunch | But it uses the newruntime and not the GC.. |
11:08:54 | FromDiscord | <Shield> GC is old and busted |
11:09:37 | livcd | who is the guy using Nim for HFT ? |
11:10:58 | PMunch | HFT |
11:11:24 | livcd | Is that you PMunch ?! |
11:11:42 | PMunch | Who am I? What is HFT? |
11:11:50 | FromDiscord | <Shield> btw araq, is the patreon page still not up? this is the perfect time for it |
11:11:58 | FromDiscord | <Shield> it's kinda late but still |
11:12:35 | FromDiscord | <Shield> High Frequency Trading? |
11:13:02 | livcd | yeah |
11:13:15 | livcd | someone mentioned on reddit that they are using Nim fulltime for High Frequency Trading |
11:13:25 | FromDiscord | <Shield> whoa |
11:13:27 | Zevv | was that disruptek? |
11:13:42 | livcd | maybea andrea! |
11:13:47 | * | whaletechno quit (Ping timeout: 245 seconds) |
11:13:48 | PMunch | Wait, really? |
11:13:50 | FromDiscord | <Kiloneie> i saw binance api for nim |
11:13:54 | FromDiscord | <Kiloneie> binding * |
11:14:13 | FromDiscord | <Kiloneie> i wanted to do that, but i decided youtube is a bit more of a priority |
11:14:18 | FromDiscord | <Kiloneie> than taking chances trading |
11:15:30 | livcd | if you ever hear that someone runs Nim in a Kiosk at the airport then that's me |
11:15:56 | FromDiscord | <Kiloneie> xD, wehat do you do with it ? |
11:16:27 | Araq | Shield: what's wrong with OpenCollective? |
11:17:06 | livcd | Kilonie: i process your passport |
11:17:56 | FromDiscord | <Shield> patreon is more popular and preferable by normies |
11:18:41 | FromDiscord | <Shield> if V dev can get money from it already, then why are you chosing to miss out on it? |
11:18:49 | FromDiscord | <niv> how about creating a page that lists "company x is using nim for y"? |
11:19:25 | zedeus | https://github.com/nim-lang/Nim/wiki/Companies-using-Nim |
11:20:06 | FromDiscord | <Shield> more options to get support never hurts |
11:22:19 | FromDiscord | <Shield> i actually never heard of OpenCollective until recently |
11:23:00 | FromDiscord | <Kiloneie> i am thinking of opening a patreon account one day idk |
11:23:23 | FromDiscord | <niv> zedeus: thanks. i'll see about getting us on that list |
11:23:37 | zedeus | anyone can edit it |
11:23:45 | FromDiscord | <Shield> too bad, they increased their cut months ago, anybody who had an old page was unaffected |
11:24:06 | FromDiscord | <Shield> the opportunities one misses due procrastination... |
11:24:06 | FromDiscord | <Kiloneie> i know |
11:24:07 | FromDiscord | <niv> well, i need to run it by PR first ;) |
11:24:15 | FromDiscord | <Kiloneie> i was notified and put a note to do it... |
11:24:26 | FromDiscord | <Kiloneie> then for some bloody reason i didn't make an account |
11:24:43 | * | elrood quit (Remote host closed the connection) |
11:24:44 | FromDiscord | <Kiloneie> which is stupid that old patreon users get a bigger cut |
11:25:05 | FromDiscord | <Shield> you need to have an account and a project page, well, better make one before they increase it some more |
11:25:41 | FromDiscord | <Kiloneie> i will after i make some videos, speaking on which, i gotta go work on it |
11:27:31 | livcd | Kilonie: I am joking. I am using Nim for some devopsy tasks nothing fancy. |
11:28:52 | PMunch | Araq, using gc:boehm works like a charm for this: http://ix.io/1WHG/Nim |
11:29:24 | PMunch | Compile 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:58 | FromDiscord | <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:56 | PMunch | Hmm, the --gc:go option, how do I use that? |
11:35:09 | PMunch | It complains that libgo.so is missing, is that this thing: https://github.com/yyzybb537/libgo? |
11:35:34 | narimiran | @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:40 | jken | Congrats nim team! |
11:39:07 | * | ronny joined #nim |
11:39:16 | ronny | hi |
11:39:19 | PMunch | Araq, seems like --gc:regions also works, feature or coincidence? |
11:39:22 | PMunch | ronny, hi |
11:40:23 | FromDiscord | <Shield> regions is tricky to use |
11:40:33 | FromDiscord | <Shield> and i couldn't find libgo at all |
11:40:46 | FromDiscord | <Shield> i think you need to compile it yourself or something |
11:41:14 | ronny | since 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:07 | PMunch | ronny, like booting into Nim directly? https://github.com/dom96/nimkernel |
11:42:14 | FromDiscord | <Shield> sharedmemory in regions is nothing special, it uses the normal malloc |
11:43:18 | PMunch | narimiran: !eval echo (NimMajor, NimMinor, NimPatch) |
11:43:22 | PMunch | !eval echo (NimMajor, NimMinor, NimPatch) |
11:43:25 | NimBot | (1, 0, 0) |
11:43:33 | * | narimiran party time!! |
11:43:41 | narimiran | nice job, PMunch |
11:43:53 | PMunch | 🥳 |
11:43:54 | FromGitter | <zacharycarter> hershbergien: I'd be interested in hearing more about that role |
11:44:01 | livcd | :D |
11:44:14 | livcd | i dont know why but it made me smile |
11:44:21 | PMunch | narimiran, 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:48 | dom96 | did someone have trouble with v1 in choosenim? |
11:44:56 | dom96 | or is Araq just making me panic for nothing? |
11:45:12 | FromDiscord | <niv> !echo 1 |
11:45:20 | FromDiscord | <niv> !eval echo 1 |
11:45:22 | NimBot | 1 |
11:45:22 | FromDiscord | <niv> aww |
11:45:26 | FromDiscord | <niv> yay |
11:45:32 | ronny | PMunch: correct - thanks |
11:45:51 | narimiran | dom96: https://github.com/nim-lang/Nim/issues/12245 |
11:45:54 | FromDiscord | <niv> dom96: installed 1.0.0 in choosenim just fine |
11:46:00 | ronny | another thing im curious about, how strictly is nim bount to stuff like a posix/windows style filesystem? |
11:46:12 | narimiran | dom96: but i have another report that choosenim uses correct hash |
11:46:27 | narimiran | @niv what does your `nim -v` say? which git hash do you see? |
11:46:38 | FromDiscord | <niv> f7a |
11:46:40 | livcd | ronny: 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:42 | dom96 | did you guys remember to update the .tar.gz that choosenim uses? |
11:47:06 | narimiran | dom96: now we have two guys with the correct hash, one with wrong one |
11:47:28 | dom96 | okay, I guess he updated before the new tarball was generated |
11:47:42 | PMunch | dom96, worked like a charm for me :) |
11:47:44 | dom96 | next time change the `stable` channel until the new tarball is in place |
11:47:52 | ronny | livcd: 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:57 | FromDiscord | <niv> the sample in the linked issue page runs fine for me |
11:48:03 | narimiran | dom96: anything special he needs to do (delete some cache?) to update to the correct version? (please write it there) |
11:48:23 | PMunch | ronny, 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:13 | ronny | PMunch: im toyingwith the idea of providing a own content access/addressing api that adds certain limits to enable different behaviours |
11:50:46 | ronny | i 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:13 | PMunch | Hmm, still not sure what you mean, but it might be possible.. |
11:51:31 | FromDiscord | <niv> windows x64 fread64() sometimes seeks the wrong offset in nim after reading :( |
11:51:38 | PMunch | Hmm, --gc:go seems to not be happy: /usr/lib/libgo.so: undefined symbol: main.main |
11:51:38 | FromDiscord | <niv> its not a nim bug though |
11:52:24 | ronny | practically 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:24 | ronny | i 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:49 | FromGitter | <alehander42> ronny you can override |
11:55:53 | FromGitter | <alehander42> a lot of the os stuff i guess |
11:56:09 | FromGitter | <alehander42> but usually you need to add support to the compiler for a new platform |
11:56:18 | FromGitter | <alehander42> e.g. stuf f like dir separator etc |
11:56:24 | FromGitter | <alehander42> i also planned on writing a db-like filesystem |
11:56:30 | FromGitter | <alehander42> for a toy os |
11:56:42 | FromGitter | <alehander42> but still havent researched how hard would it be to adapt |
11:57:13 | ronny | where is setups where path separators per se are a completely non-sensical concept |
11:58:01 | ronny | for 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:17 | ronny | a classical "path" cant sanely address elements in here |
11:58:37 | ronny | youd need a path composed of named, keyed or indexed elements |
11:58:49 | ronny | and it would need to know if its relative or absolute |
11:59:50 | * | lritter joined #nim |
12:00:06 | FromGitter | <alehander42> exactly, that's similar to what i thought |
12:00:21 | FromGitter | <alehander42> i planned on having tags and something like more general "categories/tables" |
12:00:36 | FromGitter | <alehander42> so in this case .. you dont really need the existing file system support i guess? |
12:00:54 | FromGitter | <alehander42> as the best api to work with your "filesystem" would be different anyway |
12:01:26 | FromGitter | <alehander42> ah, maybe i misunderstood you |
12:01:39 | ronny | question 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:41 | FromGitter | <alehander42> in my idea, its' possible that no obvious corelation exists |
12:01:51 | FromGitter | <alehander42> ahh, yeah thats also a good question |
12:02:03 | FromGitter | <alehander42> i imagined one can model a classic filesystem on top of a db-like filesystem |
12:02:25 | ronny | i like to call classical filesystems "lost cause file systems" |
12:02:27 | FromGitter | <alehander42> after all you'll just use a subset of the functionality, so the compiler itself can target only that maybe |
12:02:50 | FromGitter | <alehander42> well, i still think they have pro-s |
12:02:57 | FromGitter | <alehander42> but yeah, i am mostly interested in experimenting |
12:03:23 | ronny | all they have as "pro" is that everything kind of works with them |
12:06:21 | ronny | one 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:41 | ronny | but im getting way to ot, so i'll stop now |
12:06:52 | FromGitter | <alehander42> yes, i agree |
12:07:11 | FromGitter | <alehander42> sounds interesting, does your project exist somewhere, or is it just a plan |
12:08:06 | ronny | git annex is a tool that implements it on top of git wiht symlink adventures and custom tracking branches |
12:08:38 | ronny | i'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:26 | FromDiscord | <has1> why would nim do this? |
12:09:27 | FromDiscord | <has1> https://nim-lang.org/docs/sets.html |
12:09:50 | couven92 | Do we have gRPC for Nim? |
12:09:52 | FromDiscord | <has1> calling the method "incl" instead of "include" |
12:10:47 | PMunch | couven92, we have protobuf.. |
12:10:57 | narimiran | @has1 congrats, you win todays nitpicking crown! |
12:11:18 | couven92 | narimiran, does it look like the Nim crown? |
12:11:25 | PMunch | couven92, but I don't think anyone have implemented gRPC |
12:12:09 | couven92 | PMunch, https://stackoverflow.com/questions/48330261/protobuf-vs-grpc |
12:12:20 | couven92 | Protobuf != gRPC |
12:12:41 | PMunch | Yeah I know.. |
12:12:51 | PMunch | But gRPC uses Protobuf as the message format |
12:12:58 | dom96 | has1: Were you able to fix your VS Code problems? |
12:13:02 | FromGitter | <alehander42> has1, it's a valid question |
12:13:18 | PMunch | So if you wanted to implement gRPC you probably don't have to implement Protobuf for Nim to do so :) |
12:13:18 | dom96 | to answer your question: because `include` is too long to type |
12:13:38 | FromGitter | <alehander42> which is not a good reason @dom96 |
12:13:40 | FromDiscord | <has1> @gitterirc why is it a nitpick? Now i need to remember the special function name that nim picks |
12:13:42 | FromGitter | <alehander42> as we have contains etc |
12:13:46 | FromDiscord | <has1> is it incl, is it inc? |
12:13:46 | planetis[m] | its done my nimmers: https://gist.github.com/b3liever/caf536f34b5791afbc61a5d75e0de405 |
12:14:04 | FromGitter | <alehander42> but i'd agree that after all, other similar shortenings are popular |
12:14:10 | FromGitter | <alehander42> like `len` `env` |
12:14:10 | * | clyybber joined #nim |
12:14:17 | FromGitter | <alehander42> so it's not too bad |
12:14:42 | dom96 | it's a pretty good reason |
12:14:43 | dom96 | it's a common operation and deserves a shortened name |
12:14:45 | ronny | hmm, anyone aware of toolings for content addressed databases in nim? |
12:15:00 | FromGitter | <alehander42> @dom96 it's a horrible reason |
12:15:03 | narimiran | @has1 inc = increase, incl = include |
12:15:13 | FromGitter | <alehander42> in this i agree a lot with the "full word" camp |
12:15:42 | dom96 | Indeed, it's the same reason that `len` isn't `length` |
12:15:47 | dom96 | and `mod` isn't `modulus` |
12:15:54 | FromGitter | <alehander42> we have `include` `import` and `template` : there is not any actual objective metric on which incl should be shorter |
12:15:59 | PMunch | planetis[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:06 | FromGitter | <alehander42> `len` `mod` and others have decades of history behind them |
12:16:10 | dom96 | Anyway *shrug* this is bike-shedding |
12:16:15 | FromGitter | <alehander42> but this doesn't give us a license to shorten random words |
12:16:25 | FromGitter | <alehander42> i agree that it's late to change that |
12:16:29 | FromGitter | <alehander42> just saying it's a valid question |
12:16:31 | FromGitter | <alehander42> for newcomers |
12:16:41 | dom96 | You're too late to complain about this by now, Nim is v1 after all ;) |
12:16:53 | FromGitter | <alehander42> nim 2.0 issues here we come :P |
12:17:32 | FromGitter | <alehander42> i got strongly influenced by ruby linters when i was younger |
12:17:51 | FromGitter | <alehander42> i even implemented a "does the user use valid english words as identifiers" as a check |
12:17:56 | FromGitter | <alehander42> for our uni linter.. |
12:18:30 | ronny | is there a nim code formatter like there is gofmt or black or rustfmt? |
12:18:39 | FromGitter | <alehander42> we made the poor students install aspell |
12:18:48 | PMunch | This works pretty great with --gc:boehm http://ix.io/1WHW/Nim |
12:18:51 | FromGitter | <alehander42> so maybe i am too radical in that opinion sorry |
12:19:00 | solitudesf | ronny, nimpretty |
12:19:00 | lqdev[m] | ronnypfannschmidt nimpretty |
12:19:14 | FromGitter | <alehander42> ronny , there is styleCheck option |
12:19:17 | FromGitter | <alehander42> and nimpretty |
12:19:47 | ronny | lovely, anyone aware of github actions for it? |
12:21:00 | FromDiscord | <has1> ``` |
12:21:00 | FromDiscord | <has1> jsonNode["key"].getFloat() == 3.14 |
12:21:00 | FromDiscord | <has1> jsonNode{"nope"}.getFloat() == 0 |
12:21:00 | FromDiscord | <has1> ``` |
12:21:00 | FromDiscord | <has1> Why would nim use this weird syntax to change the behavior of the function getFloat in this example?? |
12:21:00 | FromDiscord | <has1> |
12:21:02 | FromDiscord | <has1> ```jsonNode.findInt() //doesnt raise exception |
12:21:02 | FromDiscord | <has1> jsonNode.getInt() //raises exception |
12:21:03 | planetis[m] | PMunch: its an iterator, could be improved further and also supports unlimited arguments |
12:21:04 | FromDiscord | <has1> ``` |
12:21:06 | FromDiscord | <has1> why doesn't it simply do something like this instead? |
12:21:12 | * | abm joined #nim |
12:21:32 | planetis[m] | like: for x, y, z in zip(a, b, c): discard |
12:21:52 | FromDiscord | <has1> ``` |
12:21:52 | FromDiscord | <has1> jsonNode["key"].getFloat() == 3.14 |
12:21:54 | FromDiscord | <has1> jsonNode{"nope"}.getFloat() == 0 |
12:21:54 | FromDiscord | <has1> ``` |
12:21:56 | FromDiscord | <has1> Why would nim use this weird syntax to change the behavior of the function getFloat in this example?? |
12:21:57 | FromDiscord | <has1> |
12:21:59 | FromDiscord | <has1> ```jsonNode["key"].findInt() //doesnt raise exception |
12:22:01 | FromDiscord | <has1> jsonNode["key"].getInt() //raises exception |
12:22:02 | FromDiscord | <has1> ``` |
12:22:04 | FromDiscord | <has1> why doesn't it simply do something like this instead? |
12:22:16 | PMunch | planetis[m], right |
12:22:36 | PMunch | has1, please use a paste service, your messages gets passed directly to IRC which isn't great.. |
12:22:40 | narimiran | ok, third warning about multiple-line code pastes in half a day. |
12:22:41 | FromGitter | <alehander42> somebody has to fix the discord bridge indeed |
12:22:48 | solitudesf | that not how it works. |
12:23:07 | abm | congratulations on 1.0 guys |
12:23:18 | FromGitter | <alehander42> narimiran, that's honestly a discord bridge problem, it's very annoying to not be able to just use discord normally |
12:23:27 | FromGitter | <alehander42> we cant expect all new users to know this |
12:23:40 | FromGitter | <alehander42> sorry @dom96 for the too strong opinion about length, i realized i use a lot of shortenings too |
12:23:54 | narimiran | we can at least expect them to react to multiple warnings about it |
12:24:41 | dom96 | also, when you edit your message on Discord it gets re-sent fully |
12:24:42 | dom96 | with the changes |
12:24:50 | FromGitter | <alehander42> narimiran, you can't expect warnings to fix behavior coming from `default ux` of apps |
12:25:01 | FromGitter | <alehander42> exactly, this is also something totally not obvious for discord users |
12:25:02 | dom96 | This Discord bridge is quite dumb, and I'm tempted to just kill it to be honest |
12:25:36 | FromGitter | <alehander42> can't we somehow reuse the gitter bridge logic |
12:25:38 | planetis[m] | first thing that comes to mind is see if "for i, (a, b) in enumerate(zip(x, y))" works |
12:25:40 | FromGitter | <alehander42> it seems to work fine |
12:26:20 | FromDiscord | <has1> its literally 2 lines |
12:26:21 | FromDiscord | <has1> each time |
12:26:35 | FromDiscord | <has1> I mean seriously, are you telling me i am not allowed to ask questions about nim here? |
12:26:49 | FromDiscord | <has1> Because how else am i going to ask questions if i cant even post a 2 line snippet? |
12:27:04 | FromGitter | <alehander42> calm down, it's a discord bridge issue, the problem is that it leads to horrible ux on gitter/irc |
12:27:07 | FromGitter | <alehander42> it's not your fault |
12:27:07 | FromDiscord | <has1> its not like i am pasting 30 lines of code in here, its 2 lines. |
12:28:03 | FromGitter | <alehander42> i am not sure whats findInt |
12:28:06 | FromGitter | <alehander42> in your example |
12:28:28 | FromDiscord | <has1> its a made up function by me, i thought this was a convention |
12:28:51 | dom96 | has1: no, it's 4 lines, the three backticks get sent before and after too |
12:28:52 | FromGitter | <alehander42> i'd say `get<X>` is more idiomatic |
12:29:00 | * | birdspider quit (Read error: Connection reset by peer) |
12:29:02 | FromDiscord | <has1> for example FindById(id) might return null or User |
12:29:20 | FromDiscord | <has1> whereas GetById(id) would throw an exception or return a User |
12:29:22 | FromGitter | <alehander42> `findX` doesn't sound right to me |
12:29:30 | FromGitter | <alehander42> it sounds like something that wroks on a collection |
12:29:43 | FromGitter | <alehander42> it's not a good name for an extracting method |
12:29:44 | FromDiscord | <has1> why? it tries to find X in the json |
12:30:03 | FromDiscord | <has1> and get ether gets it or raises an exception |
12:30:09 | FromGitter | <alehander42> not really: you already have the "int" value, in json form, you just need to extract the actual int from it |
12:30:11 | FromDiscord | <has1> this is like the perfect example of a find and get method |
12:30:15 | FromGitter | <alehander42> find implies iteration |
12:30:20 | FromGitter | <alehander42> imho |
12:30:34 | FromGitter | <alehander42> and searching across multiple int-s |
12:30:38 | FromGitter | <alehander42> here you have just one int |
12:30:41 | dom96 | find implies performing some action to find something |
12:30:42 | dom96 | I also don't think it's a good name for this operation |
12:31:10 | owl_000 | it is like a festival, lot of people talking today |
12:31:19 | FromGitter | <alehander42> usually `[]` throws an exception and `get` / `getOrDefault` returns a default value |
12:31:20 | FromGitter | <alehander42> iirc |
12:31:39 | * | lritter quit (Remote host closed the connection) |
12:31:54 | FromDiscord | <has1> I mean the docs literally say |
12:31:54 | FromDiscord | <has1> "By using the {} operator instead of [], it will return nil when the field is not found" |
12:32:05 | FromDiscord | <has1> it literally says it tries to FIND it |
12:34:32 | FromGitter | <alehander42> and you can notice that `{}` has no equivalent to getInt |
12:34:44 | FromGitter | <alehander42> `{}` is exactly the find operation |
12:34:53 | FromGitter | <alehander42> which searches in e.g. an object for this field |
12:35:06 | FromGitter | <alehander42> getInt works on the return value of `{}` |
12:35:17 | FromGitter | <alehander42> which is a single value |
12:41:13 | FromGitter | <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:31 | FromGitter | <alehander42> `a.find[int]("value")` * |
12:45:24 | FromDiscord | <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:31 | solitudesf | why does that matter? i still have no clue which one does what without reading the docs |
12:46:06 | FromDiscord | <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:26 | lqdev[m] | has1: sometimes you may wanna handle IOOB errors explicitly |
12:46:28 | FromDiscord | <has1> Maybe i am just too used to the "Go way" of doing things |
12:47:09 | FromGitter | <alehander42> solitudesf it's pretty important to know if your calls raise |
12:47:42 | FromGitter | <alehander42> has1 you're correct, it's important to keep track of your errors |
12:47:46 | solitudesf | @alehander42, yes, and the name of the procs dont tell me anything about raising |
12:48:06 | FromGitter | <alehander42> because usually the docs do, or there is a convention |
12:48:18 | FromGitter | <alehander42> usually `[]` raise : e.g. in seq-s, arrays, tables, json |
12:48:56 | FromGitter | <alehander42> usually `get` family can return a default / other arg value |
12:49:01 | FromGitter | <alehander42> e.g. `getOrDefault` from tables |
12:49:27 | FromGitter | <alehander42> or getOrDefault in json |
12:52:09 | * | Hideki_ joined #nim |
12:53:28 | FromDiscord | <Kiloneie> Oh man it took 42 screenshots with edits to make written version of my intro D:... |
12:53:46 | FromDiscord | <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:32 | FromDiscord | <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:47 | FromDiscord | <has1> fighting the programming language convention is not really a good idea |
12:55:12 | FromDiscord | <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:50 | solitudesf | so, other languages dont use abbreviations for common operations or custom operators? |
12:55:56 | FromDiscord | <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:41 | FromDiscord | <Shield> is it really fighting the language tho? |
12:57:23 | FromGitter | <alehander42> i agree with has1 , good conventions/default ways of doing things are very important |
12:57:34 | FromGitter | <alehander42> but as i said, i think nim does have an ok convention about that |
12:58:09 | FromDiscord | <has1> I would assume that nim does that in more places than just the json module |
12:58:29 | FromGitter | <alehander42> but as we said, raising is more normal in stdlib |
12:59:07 | FromDiscord | <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:07 | FromDiscord | <Shield> https://cdn.discordapp.com/attachments/371759389889003532/626039902391500810/0924135532.png |
12:59:43 | FromGitter | <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:41 | FromDiscord | <Shield> https://nim-lang.org/docs/nep1.html |
13:00:55 | FromDiscord | <Shield> the language has a clean naming convention that is respected through the whole stdlib |
13:01:29 | FromDiscord | <Shield> most of the time an alias is provided too |
13:08:44 | FromDiscord | <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:19 | FromDiscord | <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:02 | FromDiscord | <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:45 | FromGitter | <alehander42> thanks for the link Shield, we have to add the "use a func if possible, if not a proc" |
13:10:48 | FromGitter | <alehander42> to one of the sections |
13:12:12 | narimiran | any experienced lisper (and/or heavy user of nim macros) here? maybe you could answer this: https://news.ycombinator.com/item?id=21058846 |
13:13:10 | PMunch | Heavy Nim macro user you say? |
13:13:22 | narimiran | :) |
13:13:39 | PMunch | At 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:59 | federico3 | not good |
13:17:00 | FromGitter | <alehander42> not bad if you're a lib author |
13:17:33 | clyybber | PMunch Just goes to show that your macros are great |
13:18:36 | * | NimBot joined #nim |
13:18:39 | FromGitter | <alehander42> i'd say some of the elisp people |
13:18:40 | FromGitter | <alehander42> like @krux02 |
13:18:47 | FromGitter | <alehander42> might be a good fit for answer as well |
13:18:58 | FromGitter | <alehander42> what happened with krux02 btw |
13:20:28 | krux02 | well I don't post on hacker news, never did. |
13:20:42 | FromGitter | <alehander42> a matter of principle, i see |
13:20:52 | FromGitter | <alehander42> congrats on the 1.0 krux02 |
13:21:01 | krux02 | thanks |
13:21:53 | narimiran | PMunch: you're missing `http` in your first link |
13:23:23 | * | theelous3 joined #nim |
13:24:03 | PMunch | narimiran, fixed, thanks :) |
13:25:46 | FromGitter | <alehander42> i'd say async/await is a good macro example as well |
13:25:52 | FromGitter | <alehander42> another thing to point out is |
13:25:59 | FromGitter | <alehander42> that we dont do reader macros |
13:26:12 | FromGitter | <alehander42> which i guess are more similar to token macros in rust |
13:26:17 | planetis[m] | I can't call an items iterator, right? like ```let x = items(a); x()``` |
13:26:49 | FromGitter | <alehander42> but one can say that maybe our syntax is flexible enough, that we dont see a big need for thos |
13:27:24 | planetis[m] | No way to make zip macro work with tables, I think |
13:27:42 | PMunch | planetis[m], just mark it as {.closure.} :) |
13:27:49 | FromGitter | <alehander42> PMunch but if you can , at least add the fact we can |
13:28:00 | FromGitter | <alehander42> input types, not only ast-s |
13:28:08 | FromGitter | <alehander42> this is a big difference compared to lisp maybe |
13:29:29 | * | couven92 quit (Read error: Connection reset by peer) |
13:29:30 | PMunch | Huh? |
13:30:40 | FromGitter | <alehander42> our macros can work on and analyze types |
13:30:43 | FromGitter | <alehander42> not only on ast |
13:31:00 | FromGitter | <alehander42> e.g. the getImpl thing etc |
13:31:03 | clyybber | PMunch Did you update the NimBot? |
13:31:24 | PMunch | planetis[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:25 | FromGitter | <alehander42> e.g. how the json decode macros function |
13:31:45 | narimiran | clyybber: yep, it is updated |
13:31:47 | PMunch | clyybber, I don't maintain the Nimbot. But I did update the playground which is what the NimBot uses to run Nim code :) |
13:32:08 | clyybber | Ah ok, cool : |
13:32:10 | clyybber | :) |
13:32:27 | PMunch | alehander42, hmm feel free to add a comment :) |
13:32:39 | narimiran | clyybber: you can try to run `echo (NimMajor, NimMinor, NimPatch)` in the playground, just to be sure :) |
13:32:58 | planetis[m] | thanks for the suggestion, but will leave it for types with `[]` only for now, because it seems inefficient |
13:34:21 | FromDiscord | <has1> wow nim is very interesting |
13:34:38 | narimiran | :) |
13:35:13 | FromDiscord | <has1> so if i have a proc like this |
13:35:13 | FromDiscord | <has1> ```proc name(a: var string)``` |
13:35:13 | FromDiscord | <has1> |
13:35:13 | FromDiscord | <has1> I can only pass a var into this function |
13:35:22 | FromDiscord | <has1> so does that mean internally it is using a pointer here? |
13:35:58 | clyybber | !eval echo NimMajor, NimMinor, NimPatch |
13:36:01 | NimBot | 100 |
13:36:08 | clyybber | nice |
13:36:21 | clyybber | has1: Exactly |
13:36:56 | FromDiscord | <has1> that is actually really interesting, so does nim not have pointers? |
13:37:09 | PMunch | Well it does |
13:37:29 | PMunch | But they are mostly used for interfacing with C, or passing things between threads/other unsafe tasks |
13:38:01 | narimiran | clyybber: i put those parentheses there for a purpose ;) (nicer output of a tuple) |
13:38:13 | PMunch | And they have ref objects which follow reference semantics instead of value semantics |
13:38:16 | narimiran | !eval echo (NimMajor, NimMinor, NimPatch) |
13:38:19 | NimBot | (1, 0, 0) |
13:38:23 | clyybber | has1: It does, but having var parameters allows you to do `name(someVar)` instead of `name(addr someVar)` |
13:38:45 | clyybber | narimiran: Heh :p |
13:39:24 | FromDiscord | <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:44 | PMunch | !eval if NimMajor == 1: echo "\u1F4AF" |
13:40:46 | NimBot | ὊF |
13:42:16 | FromGitter | <alehander42> ref is garbage collected ptr |
13:42:18 | PMunch | !eval if NimMajor == 1: echo "\u{1F4AF}" |
13:42:21 | NimBot | 💯 |
13:42:30 | PMunch | Ay, that's better :) |
13:42:35 | clyybber | !eval echo "\033]4;14;#333333\007" |
13:42:37 | NimBot | !]4;14;#333333 |
13:42:47 | FromGitter | <alehander42> poor nimbot |
13:42:50 | PMunch | Haha |
13:43:13 | clyybber | Well, it would be kind of funny if NimBot could remotely change my terminal colorscheme |
13:43:38 | clyybber | !eval echo """\033]4;14;#333333\007""" |
13:43:41 | NimBot | \033]4;14;#333333\007 |
13:44:48 | FromDiscord | <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:10 | FromDiscord | <has1> what would it look like for a medium sized project? |
13:46:43 | * | navin joined #nim |
13:46:50 | PMunch | Well depends on your definition of medium size.. |
13:47:44 | PMunch | The playground builds in 3.3s through nimble (which checks package dependencies and such) and 1.1s with just Nim |
13:47:47 | PMunch | The back-end that is |
13:48:22 | FromDiscord | <has1> i mean does it usually take more than 5 seconds? |
13:48:35 | PMunch | The front end takes 0.3 seconds to build into JS |
13:48:41 | FromDiscord | <has1> not including dependency resolution |
13:49:26 | PMunch | Well it depends, but in general I'd say no |
13:49:28 | FromDiscord | <has1> my local one took |
13:49:28 | FromDiscord | <has1> ```operation successful (46223 lines compiled; 1.148 sec total; 70.57MiB peakmem; Debug Build)``` |
13:49:30 | * | Hideki_ joined #nim |
13:49:50 | FromDiscord | <has1> a simple go one takes 200MS |
13:50:07 | PMunch | For example building the controlgallery example from wxNim takes 1.7s on this machine |
13:50:10 | FromGitter | <alehander42> it's impossible to say without a cpu / other spec |
13:50:39 | PMunch | That links in a bunch of C++ code from WxWidgets, and uses a macro to create the code used for the GUI |
13:51:00 | FromGitter | <alehander42> but generally i'd say a medium project should take max 1-2 seconds |
13:51:06 | FromGitter | <alehander42> or even less |
13:51:22 | FromGitter | <alehander42> but really depends on the machine, on the amount of compile time stuff as you say |
13:51:28 | FromGitter | <alehander42> on the project itself etc |
13:51:35 | PMunch | Compile-only (not running g++ on the output) takes 0.4s |
13:51:48 | lqdev[m] | side question: is it ok to use pointers when performance really matters? |
13:51:56 | FromGitter | <alehander42> incremental compilation is WIP has1 |
13:52:14 | FromGitter | <alehander42> after it's done, even big project re-compilation on development should be fast |
13:52:49 | PMunch | Of 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:04 | FromGitter | <alehander42> has1 what kind of apps are you working on |
13:53:06 | PMunch | lqdev[m], sure, why wouldn't it be? |
13:53:14 | PMunch | As long as you make sure you don't mess up :P |
13:53:17 | FromGitter | <alehander42> e.g. i'd say for medium web services for which go is typical |
13:53:23 | FromGitter | <alehander42> nim should be pretty fast as well |
13:53:51 | FromGitter | <alehander42> (i hope faster for runtime, fast enough for compile time) |
13:54:57 | PMunch | Yeah 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:05 | FromDiscord | <has1> it seems very impressive to me |
13:55:17 | FromDiscord | <has1> considering all the features that nim has |
13:55:45 | Cadey | has1: how do you define medium size? |
13:58:50 | * | Hideki_ quit (Remote host closed the connection) |
13:58:52 | lqdev[m] | PMunch: I thought it would go against idiomatic Nim code, but ok |
13:59:09 | * | Hideki_ joined #nim |
14:00:08 | PMunch | Oh 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:31 | FromDiscord | <has1> @Cadey~ oh you should know the difference |
14:02:34 | FromDiscord | <has1> you use go too 🙂 |
14:02:51 | Cadey | what does medium size mean though? |
14:02:53 | FromDiscord | <has1> or wait, those are 2 different users |
14:02:58 | Cadey | same person |
14:03:13 | FromDiscord | <has1> it doesnt matter, i am talking about the difference between go and nim |
14:03:30 | FromDiscord | <Cadey~> |
14:03:30 | FromDiscord | <Cadey~> https://cdn.discordapp.com/attachments/371759389889003532/626056112051060763/image0.png |
14:03:31 | FromDiscord | <has1> as long as both have the same size |
14:03:39 | Cadey | what does size mean? |
14:03:41 | Cadey | like |
14:03:52 | Cadey | you keep saying "the same size" but you are not clarifiying what you mean |
14:04:09 | narimiran | Cadey: what font is that? |
14:04:46 | Cadey | Monoid |
14:05:23 | FromDiscord | <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:19 | Cadey | i don't know why you think the kubernetes codebase is "medium" sized, but okay |
14:06:46 | FromGitter | <alehander42> i'd say kubernetes is not minimal: it's the "example" of a big go codebase |
14:07:05 | Cadey | on 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:22 | Cadey | https://github.com/Xe/since and https://github.com/Xe/bsnk are probably a good example of this? |
14:07:33 | Cadey | it's basically the same thing in both go and nim |
14:07:51 | Cadey | but the differences in compile time have been unnoticeable |
14:08:02 | Cadey | however i haven't really looked that much into detail |
14:08:15 | Cadey | because it hasn't practically mattered yet |
14:08:25 | * | PMunch quit (Remote host closed the connection) |
14:08:29 | FromDiscord | <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:32 | FromDiscord | <has1> 🙂 |
14:08:39 | FromDiscord | <has1> but that sounds nice |
14:08:58 | Cadey | i don't think measuring code "size" is a metric worth caring about personally |
14:09:06 | Cadey | this stuff is _so subjective_ |
14:09:14 | FromDiscord | <has1> true |
14:09:23 | Cadey | a 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:50 | Cadey | but this is complex in terms of the subject matter, not the size of it |
14:13:31 | lqdev[m] | Nim's way better than groovy (with gradle) |
14:13:53 | lqdev[m] | that thing is just sooo slooow |
14:13:53 | lqdev[m] | 10 seconds to build a relatively uncomplicated app |
14:14:05 | Cadey | "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:06 | lqdev[m] | I'm saying better in terms of compile times. Time is not subjective. |
14:15:19 | Cadey | agree to disagree |
14:15:43 | Cadey | (but that's probably the more buddhist side of me speaking) |
14:16:48 | lqdev[m] | it's hard to convince me because I'm really stubborn :P |
14:17:03 | FromGitter | <alehander42> i'd say incremental compilation should really fix the remaining issues for big projects |
14:17:03 | FromDiscord | <Shield> is compilation time really a good unit to measure the effectiveness of a language? |
14:17:11 | FromGitter | <alehander42> but i am not sure when is it supposed to come |
14:17:12 | owl_000 | nim 1.0.0, first compile is successful, but compiling second time produces, raiseOSError, The Filename, directory is incorrect |
14:17:15 | FromGitter | <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:21 | FromGitter | <alehander42> maybe 1.2 ? there was a roadmap somewhere |
14:17:39 | Cadey | Nim hitting 1.0 makes me feel more confident about using it at work though |
14:17:46 | FromGitter | <alehander42> that's the goal |
14:17:52 | Zevv | that was exactly the point |
14:17:58 | Zevv | ^ |
14:18:09 | narimiran | owl_000: submit a github issue with all the details, so we can try to reproduce |
14:19:18 | owl_000 | https://i.ibb.co/cvh2dX6/Capture.png |
14:19:49 | Cadey | owl_000: https://github.com/nim-lang/nim/issues/new |
14:19:59 | narimiran | thanks, Cadey :) |
14:20:22 | Cadey | please put the contents of `color.nim` in the bug report too |
14:20:25 | lqdev[m] | oh yes the errors are starting to come in |
14:20:25 | narimiran | but, owl_000, please use this template: https://github.com/nim-lang/Nim/issues/new?template=bug_report.md |
14:20:27 | lqdev[m] | party's over |
14:20:29 | Cadey | that'll help people find out the badness |
14:20:36 | FromGitter | <alehander42> btw can we get github activity similar to the so activity in https://gitter.im/JuliaLang/julia |
14:20:42 | Cadey | narimiran: weird, i thought github did that by default |
14:20:43 | FromGitter | <alehander42> not many people use gitter tho |
14:20:47 | FromGitter | <alehander42> maybe not important |
14:21:32 | lqdev[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:34 | narimiran | btw, i'm surprised to see those `../../../../C:/etc.` in that screenshot. i was sure it has been fixed |
14:21:37 | owl_000 | it 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:42 | FromGitter | <alehander42> i got a pancake sigsegv |
14:21:51 | FromGitter | <alehander42> but araq told me to shut up |
14:22:00 | narimiran | lqdev[m]: thanks for not ruining the party :) |
14:22:16 | lqdev[m] | alehander42: yeah I remember that haha |
14:22:45 | lqdev[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:57 | owl_000 | do i need to add the screenshot? |
14:37:01 | owl_000 | in github issue |
14:37:43 | narimiran | it won't hurt |
14:38:20 | narimiran | the 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:24 | owl_000 | https://github.com/nim-lang/Nim/issues/12249 |
14:41:43 | owl_000 | https://i.ibb.co/cvh2dX6/Capture.png it is too big |
14:43:00 | owl_000 | how to force clear cache of nim while compiling |
14:43:13 | FromGitter | <alehander42> `-f` ? |
14:43:50 | owl_000 | with f it compiles, but when i remove f, same oserror |
14:46:23 | FromGitter | <alehander42> hm, can you `ls -al` your nimcache foler |
14:46:27 | FromGitter | <alehander42> after the first build |
14:47:23 | owl_000 | windows |
14:47:28 | owl_000 | dir> |
14:47:32 | * | adeohluwa joined #nim |
14:48:21 | * | whaletechno quit (Quit: ha det bra) |
14:49:00 | owl_000 | yes that is duplicate |
14:49:33 | owl_000 | he used wnim, in this case i used nigui, different package |
14:49:50 | narimiran | yeah, but the result is the same |
14:49:54 | * | krux02 quit (Remote host closed the connection) |
14:49:59 | owl_000 | the problem is with caching maybe |
14:50:35 | narimiran | if 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:34 | clyybber | Btw, what happened to krux02? |
14:51:35 | owl_000 | yes, in the issue, i mentioned that, i can compile `echo "hello world"` as many time as i want |
14:51:46 | owl_000 | without any issue |
14:52:05 | narimiran | owl_000: oh, i didn't read thoroughly enough. sorry |
14:52:37 | narimiran | dom96, shashlick: i think we have a nimble problem on windows! see #12249 and #12242 |
14:52:48 | owl_000 | no problem. let me check about stdlib |
14:54:00 | leorize[m] | sounds like a possible problem with how c files are named |
14:54:24 | leorize[m] | we might have triggered some win32 special names maybe? |
14:54:32 | owl_000 | no problems with stdlib, (import strformat) |
14:55:33 | FromGitter | <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:42 | FromGitter | <arnetheduck> matterbridge, I think it's called |
14:55:58 | * | lmariscal joined #nim |
14:56:45 | clyybber | How are the edits shown? Via s/../.. ? |
14:56:59 | * | adeohluwa quit (Remote host closed the connection) |
14:57:48 | FromGitter | <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:02 | lqdev[m] | @arnetheduck if your definition of 'just fine' is resending the same message but edited, then yes, it's fine |
15:04:52 | dom96 | narimiran: nimble problem? How so? |
15:05:15 | * | navin quit (Remote host closed the connection) |
15:05:30 | * | navin joined #nim |
15:06:59 | FromDiscord | <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:17 | FromDiscord | <Kiloneie> Or is that just it ? |
15:07:38 | FromGitter | <zetashift> remove it from PATH and delete the folders that should be it |
15:07:50 | FromGitter | <zetashift> don't know if choosenim has an uninstall arg |
15:11:21 | * | navin quit (Remote host closed the connection) |
15:15:04 | FromDiscord | <Kiloneie> from System Information ? |
15:15:23 | FromDiscord | <Kiloneie> i removed folders and all and i don't see it anywhere in there |
15:15:45 | lqdev[m] | can anyone please help me debug a strange segmentation fault? http://ix.io/1WJa |
15:16:20 | lqdev[m] | this seems to be a soundio thread |
15:16:27 | * | PMunch joined #nim |
15:16:44 | lqdev[m] | lib/system/arithm.nim:349 is raiseOverflow, so it would seem like an integer overflow |
15:16:54 | lqdev[m] | but I haven't a single clue why it happens |
15:17:01 | lqdev[m] | the program just crashes silently |
15:17:25 | FromDiscord | <Kiloneie> i don't see any path targeting my desktop, or anything, i just see CYGWIN |
15:18:13 | * | navin joined #nim |
15:18:14 | FromDiscord | <Kiloneie> Maybe it deletes itself if you delete the folders from where Nim is along with the folders in the Start Menu ? |
15:18:45 | clyybber | narimiran: Is krux02 no longer part of nim-lang? Or is he just on holidays? |
15:19:03 | leorize[m] | he works on big stuff |
15:19:11 | clyybber | Oh, what stuff? |
15:19:28 | narimiran | clyybber: 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:39 | leorize[m] | the new quoteAst intended as quote replacement |
15:20:11 | leorize[m] | you can look for PRs from him in the Nim repo |
15:20:14 | clyybber | narimiran: Nah, I just noticed he isn't displayed in the nim-lang org on github anymore |
15:20:38 | * | navin_ joined #nim |
15:20:46 | narimiran | clyybber: 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:06 | clyybber | narimiran: Huh, wth. Not for me |
15:21:40 | narimiran | oh, now i see. his membership is set on private, so that's why you're not seeing it |
15:22:11 | clyybber | Ah, that explains it |
15:26:13 | * | navin_ quit (Remote host closed the connection) |
15:26:34 | lqdev[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:29 | clyybber | lqdev[m]: Speaking from experience, stupid mistakes involving pointers |
15:29:48 | clyybber | lqdev[m]: Also valgrind is a godsend |
15:30:31 | lqdev[m] | clyybber: too bad I'm testing on windows |
15:30:45 | lqdev[m] | this seems to be a threading issue |
15:30:59 | lqdev[m] | the sigsegv happens on a separate, soundio-created thread |
15:31:26 | clyybber | Hmm, in planet-overgamma? |
15:31:36 | clyybber | Do you have the crashing code on github? |
15:31:39 | lqdev[m] | nope, in rapid |
15:31:40 | lqdev[m] | tests/taudio |
15:31:57 | lqdev[m] | there https://github.com/liquid600pgm/rapid/blob/master/tests/taudio.nim |
15:33:57 | clyybber | nimterop is taking a while.. |
15:34:57 | lqdev[m] | yeah, that's usually the case on a hard drive |
15:35:07 | lqdev[m] | the first time you compile it |
15:35:32 | clyybber | Ok |
15:35:33 | lqdev[m] | it's quite faster if you use an SSD |
15:35:47 | clyybber | It says Error: unhandled exception: Could not open file for playback [IOError] for me |
15:36:00 | clyybber | lqdev[m]: I don't have HDDs anymore :D |
15:36:00 | lqdev[m] | huh |
15:36:05 | lqdev[m] | where are you running this from? |
15:36:20 | clyybber | cd tests |
15:36:25 | lqdev[m] | you should run from the root directory so it can access the sampleData folder |
15:36:30 | clyybber | Ah, ok |
15:36:57 | lqdev[m] | it's not good practice, I know, but this codebase is quite old and I'm too lazy to change things |
15:37:00 | clyybber | Ok, it opens a new window and plays a sound |
15:37:06 | lqdev[m] | hmm |
15:37:09 | clyybber | No sigsegv for me |
15:37:16 | lqdev[m] | that's on windows? |
15:37:41 | clyybber | Nope, linux |
15:37:47 | lqdev[m] | that explains it |
15:37:57 | lqdev[m] | it works just fine on linux |
15:37:57 | * | matlock joined #nim |
15:38:10 | lqdev[m] | it's windows I'm having issues with |
15:38:12 | clyybber | Yeah valgrind doesn't throw any errors either afaict |
15:38:31 | lqdev[m] | should've mentioned that earlier… |
15:38:38 | clyybber | lqdev[m]: I think zacharycarter mentioned Dr Memory or something like that |
15:38:46 | clyybber | Which could help perhaps |
15:39:15 | lqdev[m] | looks promising |
15:39:21 | lqdev[m] | I'll try it out |
15:39:39 | * | narimiran quit (Ping timeout: 265 seconds) |
15:39:46 | lqdev[m] | and I sincerely hope my sister doesn't kill me for downloading so many dev tools onto her laptop lol |
15:40:34 | clyybber | lol |
15:51:44 | lqdev[m] | copying files on windows irl: "your admin requires me to scan this file, hold on a sec" every 10 seconds |
15:52:21 | lqdev[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:23 | sealmove | anyone knows scala here? I am really tilted :@ |
15:54:57 | Zevv | aww, we're of the HN frontpage :( |
15:56:21 | sealmove | why is that bad? |
15:57:26 | kungtotte | It'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:13 | clyybber | sealmove: I know it a bit, from minecraft modding :D |
16:01:53 | sealmove | clyybber: 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:48 | clyybber | sealmove: Ah, can't help you there, I never messed with sbt.build files since I used gradle |
16:02:56 | FromGitter | <zetashift> @sealmove I got some scala knowledge, everything except implicits |
16:02:58 | sealmove | oh I see, ok |
16:04:04 | * | djazz joined #nim |
16:05:38 | lqdev[m] | dang, the program ran really slow initially but with dr memory it's even slower |
16:05:44 | lqdev[m] | it's almost stuck |
16:05:47 | lqdev[m] | I guess it's because of the GC |
16:06:07 | lqdev[m] | it's doing some funky stuff that dr.m doesn't like |
16:06:18 | FromGitter | <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:25 | clyybber | ldqev[m]: Ah yeah, for using valgrind and the like I recommend compiling with --newruntime |
16:07:49 | clyybber | And perhaps even -d:useMalloc (dunno if required on windows) |
16:08:03 | clyybber | lqdev[m]: Do you use ref extensively in rapid? |
16:08:15 | lqdev[m] | yeah |
16:08:39 | * | nif quit (Quit: ...) |
16:08:46 | clyybber | Ok, try compiling with --newruntime anyways I'd say |
16:08:48 | * | djazz quit (Client Quit) |
16:08:49 | * | nif joined #nim |
16:08:53 | clyybber | and then run the result with dr memory |
16:09:40 | lqdev[m] | no thanks, I don't want to rewrite my entire codebase against newruntime |
16:09:55 | lqdev[m] | I just want to know what's up with that sigsegv |
16:09:55 | clyybber | lqdev[m]: Just try if it works |
16:10:04 | clyybber | maybe it just works out of the box |
16:11:17 | lqdev[m] | oh wow I just tested on Linux and it seems like there's a segfault here too |
16:11:59 | clyybber | lqdev[m]: Well I can't reproduce |
16:12:16 | lqdev[m] | that's a different crash than the one on windows, tho |
16:12:31 | lqdev[m] | maybe I need to do setupForeignThreadGc or sth |
16:13:07 | clyybber | hmm, good luck on that :), bbl |
16:13:08 | * | clyybber quit (Quit: WeeChat 2.6) |
16:13:28 | lqdev[m] | dang, dr memory didn't help much |
16:13:46 | lqdev[m] | apparently there's an uninitialized pointer read |
16:13:59 | lqdev[m] | of addresses 0x18-0x20 |
16:14:05 | lqdev[m] | which is very weird |
16:15:38 | * | shota joined #nim |
16:19:02 | FromGitter | <arnetheduck> that's usually reading an object member through a nil ref (0 + offset of member) |
16:19:31 | FromGitter | <arnetheduck> the nil checking in nim is broken / covers only a few situations |
16:20:02 | * | shota quit (Ping timeout: 245 seconds) |
16:28:00 | lqdev[m] | hmm |
16:33:45 | lqdev[m] | ah I think I know what it is |
16:34:30 | lqdev[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:03 | lqdev[m] | did the semantics of setLen change? |
16:37:15 | lqdev[m] | does it shrink the seq in memory? |
16:37:42 | FromGitter | <mratsim> No |
16:37:56 | FromGitter | <mratsim> Reserved memory stays the same |
16:40:01 | lqdev[m] | that's weird, then |
16:40:55 | lqdev[m] | this is the backtrace when the segfault occurs https://termbin.com/upvf |
16:41:22 | lqdev[m] | afaict a garbage collection is triggered in the audio thread which should never happen |
16:41:28 | lqdev[m] | how can I avoid such "mishaps" |
16:41:31 | lqdev[m] | ? |
16:43:00 | Zevv | lqdev[m]: I think I did similar things in SDL. Are your running Nim code in a non-nim thread? |
16:43:10 | lqdev[m] | yes |
16:43:23 | lqdev[m] | that's why I thought system.setupForeighThreadGc could solve things |
16:43:37 | lqdev[m] | but there mustn't be any syscalls done in that thread |
16:43:44 | Zevv | I tried that but it was a hassle. In the end I just do buffer passing C style |
16:44:06 | lqdev[m] | you mean constant size buffers? |
16:44:08 | Zevv | Plain old ringbuffer |
16:44:39 | lqdev[m] | hmm, that could work |
16:44:39 | lqdev[m] | guess I'll write an implementation of that |
16:44:40 | Zevv | And if your audio buffers are constant size you might just allocate a small number of buffers |
16:44:52 | Zevv | and round robin those - essentially also a ringbuffer of course |
16:45:34 | lqdev[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:50 | Zevv | That'll blow up in your face. |
16:46:08 | lqdev[m] | using seqs? it already did |
16:46:20 | Zevv | I'd say: create a fair size static ringbuffer, read and write pointers. |
16:46:46 | Zevv | indices instead of pointers is probably easier. |
16:46:49 | lqdev[m] | it worked initially, but then something changed |
16:47:09 | lqdev[m] | but yeah I'll go with ring buffers |
16:47:14 | Zevv | Exactly, that was my problem. That was one of my earlier nim projects and I didnt properly understand the GC and memory semantics |
16:47:22 | Zevv | ringbuffer can work lock free, in principle |
16:47:53 | Zevv | producer 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:06 | lqdev[m] | thanks for that tip |
16:49:31 | * | laaron- quit (Remote host closed the connection) |
16:49:34 | Zevv | oooh just started up that project, I should work on that again |
16:49:37 | lqdev[m] | also quote do seems to be broken or something |
16:49:38 | rayman22201 | ring buffers are the bedrock of so much high performance code lol. |
16:49:53 | Zevv | http://zevv.nl/div/corrie.png |
16:49:57 | lqdev[m] | my `gfx.loop` macro doesn't work anymore |
16:50:01 | Zevv | rayman22201: embedded 101 |
16:50:24 | lqdev[m] | Zevv: oh wow, that looks cool. what's that? |
16:50:34 | Zevv | Signal analyzer |
16:50:52 | Zevv | It even has a nim reactive GUI toolkit |
16:51:04 | Zevv | (is that the word, reactive? One of those ui's that totally redraw each frame without state?) |
16:51:17 | federico3 | is the spectrum analyzer blurred? |
16:51:47 | Zevv | no, it's because of the windowing |
16:51:48 | federico3 | the FFT need antialiasing ;) |
16:51:58 | rayman22201 | @Zevv that is so cool :-D |
16:52:05 | Zevv | Oh dan I remember, the hours I spent in rendering a waveform at all zoom levels |
16:52:19 | Zevv | And darn was I proud, let me see if I can capture an animation |
16:52:23 | rayman22201 | I know it as immediate mode GUI |
16:52:32 | Zevv | ah that was the word |
16:52:48 | * | PMunch quit (Remote host closed the connection) |
16:52:57 | lqdev[m] | aw crap it's not macros.quote, it's just me not calling my main() o.O |
16:53:42 | lqdev[m] | yeah I think I removed the last lines of twindow accidentally |
16:54:14 | rayman22201 | @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:39 | rayman22201 | slighty ot, but I'm catching up on IRC and seemed relevant :-P |
17:03:53 | * | Perkol joined #nim |
17:05:11 | FromDiscord | <Skaruts> does nim have imports like python's `from foo import Bar`? |
17:05:54 | lqdev[m] | yes |
17:06:15 | * | natrys joined #nim |
17:08:11 | FromDiscord | <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:21 | FromDiscord | <DeltaPHC> Apparently Nim is more popular than .NET :^) |
17:09:04 | FromDiscord | <DeltaPHC> (it's not, but I just thought that was interesting) |
17:09:30 | FromDiscord | <Skaruts> you need 300 versions of .net for all the things you use built on it... you only need one Nim 🙂 |
17:09:37 | Zevv | rayman22201, lqdev[m] https://www.youtube.com/watch?v=fT6F13dX5OU |
17:10:11 | Zevv | note 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:18 | lqdev[m] | set the video to unlisted |
17:10:43 | Zevv | oow |
17:11:00 | FromGitter | <mratsim> @lqdev, @zevv I have a lock-free wait-free queue/ringbuffer |
17:11:00 | rayman22201 | lol. "This video is private". Thanks for teasing us Zevv :-P |
17:11:17 | Zevv | well, I never do this kind of stuff :) |
17:12:16 | FromGitter | <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:22 | rayman22201 | I understand. I'm just teasing you. I never streamed before, that day with Araq. That was a mess! lol |
17:12:46 | FromGitter | <mratsim> Anyway you probably don't need as much perf as my needs |
17:12:51 | Zevv | Dang what a crap interface. I can't even find my own video back |
17:13:08 | rayman22201 | @mratsim, you have done all the multithreaded stuff I wanted to but never found the time. |
17:13:42 | Zevv | https://youtu.be/fT6F13dX5OU |
17:14:23 | FromGitter | <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:50 | FromGitter | <mratsim> I'm juggling between laser, Picasso and Arraymancer |
17:15:08 | Zevv | wow mratsim that's pure overkill :) |
17:15:21 | FromGitter | <mratsim> I would also like to do reinforcement learning on arcade games, finish my snes emulator and my go playing bot |
17:15:46 | Zevv | he just needs a ringbuffer, not necisserily formally verified and we don't care for the extra element :) |
17:16:31 | rayman22201 | we just need to clone you @mratsim |
17:16:35 | lqdev[m] | Zevv: that's a really nice project! does it use FFT? |
17:16:59 | Zevv | just fftw3 |
17:17:27 | lqdev[m] | rayman22201: `git clone [email protected]/mratsim.git` |
17:17:42 | rayman22201 | lol 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:05 | owl_000 | How to become nimstar, i mean become good at nim(being able to write efficient and elegant code) |
17:37:51 | FromGitter | <arnetheduck> owl_000 that's a general skill that has nothing to do with nim ;) |
17:39:08 | owl_000 | oh ok, i am now nimster (like youngster) lol |
17:43:29 | FromDiscord | <exelotl> Yeah it just comes with time and experience (having done a bunch of projects in a bunch of languages) |
17:43:39 | FromDiscord | <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:46 | FromGitter | <awr1> @mratsim what kind of scope is your SNES emu going to be? |
18:18:56 | FromGitter | <awr1> just the base 65C816 system? |
18:20:09 | rockcavera | How to calculate the space a seq[seq[int8]] will occupy in memory with X elements? |
18:21:20 | FromGitter | <awr1> what do you mean by X elements |
18:21:25 | FromDiscord | <DeltaPHC> Iterate through the outer seq and sum together the byte sizes of each element? |
18:21:26 | FromGitter | <awr1> the total number of int8s? |
18:21:34 | FromDiscord | <DeltaPHC> Iterate through the outer seq and sum together the byte sizes of each seq element? |
18:22:21 | FromGitter | <awr1> you can do `import std / sequtils; var x: seq[seq[int8]]; let num = x.foldl(a.len() + b.len())` |
18:24:12 | rockcavera | X elements would be the number of elements within the seq |
18:24:26 | Cadey | that's a list of lists though |
18:24:56 | rockcavera | example: var x: seq[seq[int8]] = @[@[1,2,3],[1,2],[1]] |
18:24:59 | Cadey | ah i see never mind |
18:25:12 | rockcavera | example: var x: seq[seq[int8]] = @[@[1,2,3],@[1,2],@[1]] |
18:25:35 | FromGitter | <awr1> and X would be 6 right? |
18:25:43 | Cadey | it would be 9 |
18:25:47 | Cadey | afaik |
18:25:55 | Cadey | based on the description |
18:26:10 | rockcavera | However, the size will be random and I need to know if there will be enough RAM. |
18:26:48 | FromGitter | <awr1> i'm confused to what you're specifically meaning. i assume X is the total number of int8s found recursively |
18:27:00 | Cadey | rockcavera: http://xyproblem.info |
18:27:04 | Cadey | what are you actually doing? |
18:27:10 | FromGitter | <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:04 | lqdev[m] | dang |
18:28:12 | lqdev[m] | I don't want to recompileeee |
18:28:30 | rockcavera | I 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:42 | Cadey | how many billion int8's are you storing? |
18:30:32 | rockcavera | not in the billions, but millions of seq by millions of int8 |
18:30:57 | rockcavera | sizeof(seq) return 8 |
18:31:10 | rockcavera | sizeof(int8) = 1 |
18:31:10 | Cadey | i think you need to rethink your problem statement |
18:31:32 | * | Perkol quit (Quit: Leaving) |
18:32:30 | rockcavera | My 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:06 | Cadey | okay, referring back to xyproblem.info |
18:33:12 | Cadey | what are you _DOING_ with that seq |
18:33:14 | Cadey | why does it exist |
18:33:19 | Cadey | what's the bigger purpose? |
18:33:33 | Cadey | where is the data coming from, where is it going to |
18:33:35 | Cadey | etc |
18:33:37 | * | shota joined #nim |
18:34:19 | rockcavera | 62/5000 |
18:34:19 | rockcavera | no matter where it comes from and where it goes, that is not the point. |
18:35:12 | Cadey | it kind of helps for understanding if keeping everything in memory like that is probably a bad idea to begin with :) |
18:35:47 | Cadey | because if it's just a seq of bytes |
18:35:54 | Cadey | then you can put that in a mmapped file |
18:36:17 | rockcavera | I need quick access |
18:36:24 | Cadey | why? |
18:36:30 | Cadey | when 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:40 | rockcavera | Thank you, Cadey. But our conversation and your help is not being productive right now. |
18:37:55 | Cadey | i'm sorry my mind reading powers aren't working today |
18:39:32 | Cadey | mmaped files are pretty fast though, the kernel will efficiently page them in and out of ram for you as you reference them |
18:39:35 | FromGitter | <awr1> @rockcavera https://play.nim-lang.org/#ix=1WKN |
18:39:39 | FromGitter | <awr1> something like this maybe? |
18:39:45 | FromGitter | <awr1> a loose estimate |
18:41:19 | FromGitter | <awr1> if lengthSeq could be defined as a function or something, that could be even better, but `foldl()` won't work |
18:43:03 | FromDiscord | <Kiloneie> Guys is this title too long ? Nim for Beginners #1 Introduction to Nim Programming and Your First Program |
18:43:22 | FromGitter | <awr1> yeah |
18:43:48 | FromDiscord | <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:57 | FromDiscord | <Shield> you should've stopped at introduction, |
18:44:06 | FromDiscord | <Kiloneie> then the video is about introduction to programming, Nim and your first program |
18:44:14 | FromDiscord | <Kiloneie> so Introduction to Nim Programming ? |
18:44:29 | FromDiscord | <Cadey~> Remember the charmin ultra rule |
18:44:33 | FromDiscord | <Cadey~> Less is so much more |
18:44:50 | FromDiscord | <Kiloneie> Nim for Beginners #1 Intro to Nim Programming ? |
18:44:53 | FromGitter | <awr1> "Learning the Nim language #1: Baby's First Program" |
18:45:05 | FromDiscord | <Cadey~> How about a 5 word maximum |
18:45:08 | FromDiscord | <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:43 | FromDiscord | <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:18 | FromDiscord | <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:27 | FromDiscord | <Kiloneie> no wait. |
18:46:40 | FromGitter | <awr1> call it nimrod for maximum anachronism /s |
18:46:45 | FromDiscord | <Kiloneie> Nim for Beginners #1 Intro to Nim and Programming....... something like that |
18:47:32 | FromDiscord | <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:51 | FromDiscord | <Shield> if you search "nim", you'll get game of nim and some random asian related subjects |
18:47:58 | FromDiscord | <Kiloneie> i usually spam a bunch of tags, and tag combos |
18:48:16 | Cadey | nim programming nim lang learn programming introduction start programming first program |
18:48:22 | FromDiscord | <Kiloneie> like for Heartstone, i do Game, Card Game, Heartstone, Expansion Name, Name of Deck and a few more |
18:48:23 | FromGitter | <awr1> Learning the Nim Programming Language #1: Introduction |
18:48:30 | FromDiscord | <DeltaPHC> Not much worse than searching for "rust" and you get a game |
18:48:37 | FromDiscord | <Kiloneie> xD |
18:48:46 | FromDiscord | <Kiloneie> or Cristal programming language |
18:48:56 | FromDiscord | <Kiloneie> you type the name, and it's not even on the front page of google |
18:48:58 | FromGitter | <awr1> https://www.youtube.com/channel/UCr8knzz5ua7wvmW-QHyzoIQ lol |
18:48:59 | FromDiscord | <Kiloneie> lol epic fail |
18:49:10 | Cadey | is for me |
18:49:26 | FromDiscord | <exelotl> Omg can we get them to do the language mascot |
18:49:34 | FromDiscord | <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:34 | FromDiscord | <Kiloneie> well that sucks |
18:49:50 | FromGitter | <awr1> next-level bikeshedding over a youtube video name |
18:49:55 | FromDiscord | <exelotl> I'm still mad that Minim got rejected |
18:50:00 | FromDiscord | <Kiloneie> 2.58 million subs channel with Nim being 3 out of 4 letters of name |
18:50:01 | FromGitter | <awr1> i could do a mascot. if i had time |
18:50:07 | FromDiscord | <exelotl> That design was godlike |
18:50:36 | FromDiscord | <Shield> what mascot? we have a beautiful crown |
18:50:49 | FromDiscord | <Kiloneie> that people say is arrogant xD |
18:51:04 | FromDiscord | <exelotl> this mascot https://github.com/nim-lang/RFCs/issues/104 |
18:51:10 | FromDiscord | <Shield> it's a great logo |
18:51:31 | FromDiscord | <Shield> oh no |
18:51:40 | FromDiscord | <exelotl> I actually love the design but the maintainers didn't seem to like it :( |
18:51:42 | FromGitter | <awr1> it looks like that character from the new matt groening show on netflix |
18:51:42 | FromDiscord | <Shield> we don't need to go for Go tier mascots |
18:51:48 | FromGitter | <awr1> enchanted or w/e |
18:51:49 | FromDiscord | <Shield> we need anime mascots xD |
18:51:52 | FromGitter | <awr1> the little imp one |
18:52:05 | FromGitter | <awr1> disenchanted |
18:52:35 | * | narimiran joined #nim |
18:52:41 | FromDiscord | <DeltaPHC> I'm not against mascots, but that top proposed one looks a little too much on the silly side |
18:53:03 | FromDiscord | <exelotl> :( |
18:53:33 | FromDiscord | <Shield> yeah |
18:54:05 | FromGitter | <awr1> y'all don't value cuteness as much as you should |
18:54:10 | FromDiscord | <DeltaPHC> I mean, I don't think programming languages in general really need mascots, but maybe that's just me |
18:54:12 | FromDiscord | <Kiloneie> that one is ridicolous |
18:54:23 | FromGitter | <awr1> mascots are advertising |
18:54:54 | FromDiscord | <Kiloneie> yes |
18:55:00 | FromDiscord | <Kiloneie> i do kindal ike the crown |
18:55:06 | FromDiscord | <Kiloneie> we do it all baby, we DA KING ! |
18:55:42 | FromGitter | <awr1> i could try my hand at drawing some mascots maybe sometime next week |
18:57:06 | * | dwdv joined #nim |
18:57:41 | dwdv | fancy! congrats on the 1.0 release, nim team! |
18:58:08 | FromDiscord | <exelotl> oh god I just remembered the tragedy that was the libreoffice mascot contest |
18:58:11 | FromGitter | <awr1> mascots are just silly things that make languages and technologies "more marketable" |
18:58:22 | FromGitter | <awr1> for the same reason: why does a language need a logo? |
18:58:26 | FromGitter | <awr1> etc. etc. |
19:00:40 | FromDiscord | <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:58 | dom96 | hello all, how's everyone doing with the latest release? :) |
19:02:10 | FromGitter | <awr1> somehow i have neglected to choosenim update |
19:02:22 | * | asymptotically2 joined #nim |
19:02:33 | Cadey | dom96: so far near all of my code works without modification |
19:02:34 | FromGitter | <awr1> all this talk of 1.0 and i'm behind on the times |
19:02:40 | FromDiscord | <exelotl> oh yeah I should build goodboy on the latest nim and check everything still works |
19:02:50 | Cadey | i don't know about the rest because i haven't updated some stuff yet \o/ |
19:02:55 | Cadey | and iPadOS just came out |
19:03:34 | * | asymptotically quit (Remote host closed the connection) |
19:03:49 | FromGitter | <awr1> syntax skins for 1.1 /s |
19:04:26 | FromDiscord | <demotomohiro> I cannot compile my project with 1.0 😦 |
19:04:26 | FromDiscord | <DeltaPHC> If you were keeping up with 0.20 releases, things haven't changed much since then |
19:04:47 | Cadey | demotomohiro: do you have a link to the git repo, what error do you get? |
19:05:08 | FromGitter | <awr1> were syntax skins ever implemented at any any point or were they just an idea that got binned |
19:05:10 | FromDiscord | <demotomohiro> https://github.com/demotomohiro/nim-4k-intro-sample.git |
19:05:43 | FromDiscord | <demotomohiro> I think it is related to this |
19:05:44 | FromDiscord | <demotomohiro> https://github.com/nim-lang/Nim/issues/12242 |
19:05:48 | * | drewr joined #nim |
19:07:23 | FromDiscord | <demotomohiro> This project still dont have documents |
19:08:03 | FromDiscord | <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:17 | FromDiscord | <demotomohiro> And cl.exe cannot found that path |
19:11:07 | disruptek | well, if i squint, i can't see it, either. |
19:11:18 | narimiran | i 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:48 | FromDiscord | <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:47 | disruptek | narimiran: `var thing {.pragma.} :SomeType = ...` is my nit. |
19:13:59 | narimiran | disruptek: then we're golden :) |
19:14:07 | disruptek | heh |
19:17:51 | disruptek | there 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:18 | FromDiscord | <Shield> i need my atomics and SIMD in the stdlib |
19:25:41 | FromDiscord | <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:46 | ronny | alehander42: 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:22 | disruptek | ronny: 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:15 | ronny | well, if i do a fs, then posix will just be a addon layer to access aprts of it to support legacy software ^^ |
19:32:45 | ronny | for now im looking to do personal information databases, which is about images, contacts, communication logs, and multi device sync |
19:32:47 | disruptek | of course; that's what i meant. |
19:33:05 | ronny | kk ^^ |
19:33:06 | ronny | and bbl |
19:34:37 | * | solitudesf- quit (Ping timeout: 240 seconds) |
19:38:08 | lqdev[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:27 | FromGitter | <brentp> with nim v1.0.0, compiling with `--debuginfo`, I get an error about: |
19:44:40 | FromGitter | <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:11 | FromGitter | <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:15 | FromGitter | <brentp> anyone else seen this? |
19:45:26 | FromDiscord | <treeform> brentp, that was always an error? |
19:45:47 | FromDiscord | <treeform> I have seen it before. You can't .add or delete from a seq while inside its for loop. |
19:46:03 | FromGitter | <brentp> yes, but I'm not doing it. it's in nim, not in my code AFAICT |
19:46:04 | FromDiscord | <treeform> maybe if you compile with --release it removes the check? |
19:46:33 | FromDiscord | <treeform> brentp, do you have more of the stack trace? |
19:46:48 | FromDiscord | <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:17 | FromDiscord | <treeform> @Kiloneie if you do that, don't you sound jittery and robotic? |
19:47:24 | FromDiscord | <treeform> Just learn to talk better |
19:47:44 | FromDiscord | <treeform> also you notice yourself talking bad the most |
19:48:06 | FromDiscord | <treeform> you might be hyper critical of your own performance |
19:48:18 | FromGitter | <brentp> @treeform |
19:48:22 | FromDiscord | <treeform> yes? |
19:48:24 | FromGitter | <brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d8a7307be709e39d1878036] |
19:48:59 | FromDiscord | <treeform> looks like a bug in unittest.nim ? |
19:49:14 | FromDiscord | <treeform> vcftest? |
19:49:27 | FromGitter | <brentp> vcftest is mine |
19:50:30 | FromDiscord | <Kiloneie> well you can lower volume, or cut it out entierly |
19:50:37 | FromDiscord | <Kiloneie> i listen to every part i edit |
19:50:40 | FromDiscord | <Kiloneie> until it's smooth |
19:50:45 | FromDiscord | <Kiloneie> so, no, no robotic crap |
19:51:05 | FromDiscord | <Kiloneie> although there is a part where my mic caught a weird static sound, not my voice though |
19:51:05 | setenforce | I would just do multiple takes lol |
19:51:14 | FromDiscord | <Kiloneie> i did |
19:51:17 | setenforce | Screw trying to edit specific words in |
19:51:28 | FromDiscord | <Kiloneie> took me 20 min on the intro words just reading xD |
19:52:17 | FromDiscord | <Kiloneie> anyways you will see what i make... good i hope |
19:59:18 | FromDiscord | <treeform> brentp, the stack trace is telling me that sone thing in vcftest is modifying the seq while for looping it. |
20:02:14 | FromDiscord | <treeform> I do that when doing some thing like `for s in list: if s.dead: list.remove(s)` |
20:02:22 | FromDiscord | <treeform> thats an error |
20:02:27 | * | Jesin joined #nim |
20:08:57 | dom96 | Calinou, do you have a problem with this? https://github.com/nim-lang/website/issues/169 |
20:09:11 | rayman22201 | @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:58 | Yardanico | rayman22201: 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:21 | dom96 | anyway, I'm going to censor BrainFuck. I think it's a fair request |
20:10:47 | rayman22201 | Yeah. To both of you lol. |
20:11:10 | disruptek | treeform: 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:19 | lqdev[m] | uh |
20:12:20 | lqdev[m] | another one |
20:12:38 | lqdev[m] | this is a weird compiler crash btw, any ideas? |
20:12:46 | lqdev[m] | I'm trying to use generics |
20:13:06 | lqdev[m] | I'll upload the source code, maybe someone has a better idea of what's wrong |
20:13:37 | lqdev[m] | here: https://termbin.com/32t2 |
20:13:57 | * | daddoo left #nim ("Leaving") |
20:15:04 | lqdev[m] | I'm trying to instantiate the ring buffer like this: `RingBuffer[float, 4096]` |
20:19:47 | Calinou | dom96: meh, I think it's a branding thing so it shouldn't be censored |
20:19:56 | Calinou | if you really want to do it, do it anyway |
20:20:19 | Calinou | I 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:32 | Calinou | it'd be like censoring "GIMP" :) |
20:21:06 | Calinou | I also despise the "think of the children" mentality brought by OP, but that's for another day… |
20:21:49 | acidx | dom96: 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:15 | acidx | er. <> instead of @!. been a while. |
20:22:23 | disruptek | brain<<<>><<<><<<<><><><<<<><<<<><<<<<><<<<>><>>>>>><<><>>><> |
20:23:58 | * | sealmove quit (Quit: WeeChat 2.6) |
20:24:59 | * | nsf quit (Quit: WeeChat 2.5) |
20:25:36 | Yardanico | Wow, even Phoronix posted about Nim http://www.phoronix.com/scan.php?page=news_item&px=Nim-1.0-Programming-Language |
20:26:31 | lqdev[m] | brain>++++++++++[>++++++++++>++++++++++++>++++++++++>+++++++++++><<<<<-]>++>--->->---><<<<<>.>.>.>. |
20:26:40 | Yardanico | though there's a lot of users there who like to badmouth everything they don't know |
20:26:56 | dom96 | Look 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:30 | FromGitter | <alehander42> i typically dont like this kind of censorship, but here i agree fully with OP |
20:32:23 | Calinou | dom96: the case is closed to me anyway :P |
20:33:53 | * | daddoo joined #nim |
20:34:42 | * | abm quit (Quit: Leaving) |
20:40:05 | lqdev[m] | can anyone please help me with my weird generic problem? |
20:45:36 | FromDiscord | <Kiloneie> ummm |
20:45:58 | * | asymptotically2 is now known as asymptotically |
20:46:01 | FromDiscord | <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:48 | FromDiscord | <Kiloneie> nevermind figured it out |
20:54:13 | FromDiscord | <Kiloneie> Okay, here it is guys my first video on Nim: https://youtu.be/5tVIsDYPClA |
20:55:25 | narimiran | rayman22201: i already have thought about the survey, but i think we should wait a bit, to get better numbers about v1 adoption |
20:56:23 | rayman22201 | You are right. I thought the same thing right after I posted that. I got too excited 😂 |
20:57:51 | * | sunwukong joined #nim |
20:58:24 | FromGitter | <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:55 | Zevv | lqdev[m]: what chrashes? |
21:00:47 | dom96 | cool, so the 1.0 news were picked up by zdnet and theregister |
21:02:40 | * | djazz joined #nim |
21:02:50 | narimiran | ...and phoronix: https://www.phoronix.com/scan.php?page=news_item&px=Nim-1.0-Programming-Language |
21:04:34 | dom96 | now we need to get it submitted to slashdot :P |
21:05:07 | Zevv | slashdot is soooo 1997 |
21:05:09 | FromDiscord | <Kiloneie> https://www.phoronix.com/forums/forum/phoronix/latest-phoronix-articles/1128280-nim-programming-language-hits-stable-milestone-with-v1-0-release |
21:05:09 | FromDiscord | <Kiloneie> |
21:05:09 | FromDiscord | <Kiloneie> This second guy hates Nim or something, i don't see his point, because it's not an overcomplicated mess |
21:05:36 | FromDiscord | <Kiloneie> also third guy, lol... |
21:06:49 | dom96 | Zevv, and yet it gets us sooo much traffic |
21:07:00 | dom96 | the 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:34 | lqdev[m] | Zevv: the compiler |
21:10:50 | Zevv | not here; I can take your file and instantiate. But after that it doesn't work yet :) |
21:11:18 | Zevv | `if rb.head > size` does not make sense, `size` is not a variable |
21:11:27 | Zevv | did you dump the compiler crash output somewherE? |
21:11:56 | lqdev[m] | yeah, you can see it in the logs |
21:12:30 | lqdev[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:38 | Zevv | hm yeah, it's not really a crash-crash, but its also not a nice error message |
21:12:43 | Zevv | add a .size field to your ringbuffer |
21:13:27 | lqdev[m] | but how do I initialize it, then? |
21:13:40 | Zevv | lemmesee. I was on my way to bed, so not too long :) |
21:13:57 | FromGitter | <dumjyl> iqdev[m]: `size: Positive` -> `size: static Positive` |
21:14:24 | Zevv | right |
21:14:58 | lqdev[m] | that also errors out, don't remember the error now |
21:14:58 | Zevv | almost :( |
21:15:19 | Zevv | sorry lqdev, I need my nap-nap |
21:15:19 | lqdev[m] | I tried with static int |
21:15:32 | lqdev[m] | right, goodnight |
21:15:36 | Zevv | if you're still stuck I'd gladly take a look tomorrow morning! |
21:15:37 | * | Jesin joined #nim |
21:15:44 | lqdev[m] | I'll solve this tomorrow, I'm going to sleep aswell |
21:15:46 | FromGitter | <dumjyl> `RingBuffer()` -> `RingBuffer[T, size]()` |
21:16:05 | lqdev[m] | oh gosh. I forgot about that |
21:16:11 | lqdev[m] | I'll try tomorrow |
21:23:50 | * | Trustable quit (Remote host closed the connection) |
21:31:19 | FromDiscord | <Skaruts> is there some pragma that can be used to stop recursive dependencies? |
21:35:58 | FromDiscord | <exelotl> lol that thread |
21:36:31 | FromDiscord | <Kiloneie> People be hating because hating is cool or something |
21:36:39 | FromDiscord | <exelotl> 4th guy evidently hasn't written any javascript in a while |
21:36:48 | FromGitter | <dawkot> Why do I get this in a .nims file: "undeclared identifier: 'setCommand'"? |
21:36:58 | FromGitter | <dawkot> It worked until I updated to 1.0 |
21:39:43 | disruptek | i think it's because you updated to 1.0. |
21:40:09 | FromGitter | <dawkot> sure, but what am I supposed to use? the manual still mentions `setCommand` as if it was supposed to work |
21:40:19 | disruptek | try 0.20. |
21:53:04 | * | asymptotically quit (Quit: Leaving) |
21:53:42 | disruptek | dawkot: is it a regression? |
21:57:08 | * | adeohluwa quit (Ping timeout: 265 seconds) |
21:57:18 | FromGitter | <kayabaNerve> It sounds like a removed feature |
22:10:29 | FromGitter | <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:36 | FromDiscord | <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:56 | FromGitter | <awr1> what was wrong with `setCommand` |
22:53:02 | * | adeohluwa quit (Remote host closed the connection) |
22:53:21 | * | adeohluwa joined #nim |
22:53:53 | FromGitter | <awr1> https://github.com/nim-lang/Nim/blob/version-1-0/lib/system/nimscript.nim#L104 |
22:53:58 | FromGitter | <awr1> it's still here? |
22:56:08 | FromGitter | <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:19 | FromGitter | <awr1> @Skaruts if you're talking about recursive module imports |
23:04:37 | FromGitter | <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:38 | FromGitter | <awr1> also lol at that phoronix thread |
23:10:19 | FromGitter | <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:46 | FromGitter | <awr1> things like `result`, partial case insensitivity, the python syntax (lol), the encouragement of global-namespace importing |
23:14:45 | disruptek | the 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:06 | FromGitter | <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:36 | FromDiscord | <DeltaPHC> The only thing I would actually feel iffy about is the design of case objects :P |
23:15:39 | FromGitter | <awr1> comparisons to perl are lol |
23:15:51 | FromGitter | <awr1> the existence of `$` does not make a language "perl-like" |
23:16:02 | FromGitter | <awr1> also i love the way variants work |
23:17:07 | FromGitter | <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:18 | disruptek | are 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:36 | FromDiscord | <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:03 | FromGitter | <awr1> i had an RFC about the way the discrim works |
23:18:57 | FromGitter | <awr1> is not impled yet though |
23:19:03 | FromGitter | <awr1> https://github.com/nim-lang/RFCs/issues/56 |
23:19:30 | FromGitter | <awr1> you cannot "set" discrims currently after they have been set right now |
23:19:33 | FromGitter | <awr1> it will raise exception |
23:20:15 | FromDiscord | <DeltaPHC> Basically, I don't think setting the discriminator should be a separate step in the first place |
23:20:25 | FromGitter | <awr1> what do you mean |
23:20:56 | * | NimBot joined #nim |
23:21:33 | * | exelotl quit (Ping timeout: 245 seconds) |
23:21:36 | FromDiscord | <DeltaPHC> You would instead set an enum instance by supplying the discriminant and data at the same time |
23:22:16 | FromDiscord | <DeltaPHC> They are meant to be combined, after all |
23:22:33 | FromGitter | <awr1> you can already do that, unless you are referring to something else |
23:24:16 | FromGitter | <awr1> https://play.nim-lang.org/#ix=1WN2 |
23:24:52 | FromGitter | <awr1> also there was this proposal in auxiliary https://github.com/nim-lang/RFCs/issues/56#issuecomment-412440745 |
23:25:12 | FromGitter | <awr1> so you can do it without re-ctoring the whole obj |
23:27:05 | FromDiscord | <DeltaPHC> I suppose I mostly don't want the discriminator to be a field, but it's not really a big deal |
23:31:15 | FromGitter | <awr1> like i said before |
23:31:24 | FromGitter | <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:50 | FromDiscord | <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:55 | FromDiscord | <DeltaPHC> The variant is a part of the construction rather than a field |
23:36:16 | FromGitter | <awr1> that is more or less what i'm getting at |
23:36:43 | FromGitter | <awr1> in ML langs you declare variant types like `type Character = Mario | Sonic | Crash` |
23:37:03 | FromGitter | <awr1> wait i screwed it up |
23:37:51 | FromGitter | <awr1> i mean like `type Character = Mario of <blah blah blah> | Sonic of <blah blah> | Crash of <blah>` |