00:01:17 | FromDiscord_ | <Kaynato> Oh,, that is... a lot better than what I am dealing with right now, thank you clybber |
00:01:42 | clyybber | np, ping me if you have questions |
00:01:54 | clyybber | or if you want it to be updated to the latest vulkan headers |
00:08:52 | * | Kaynato joined #nim |
00:21:09 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
00:29:02 | * | rockcavera joined #nim |
00:30:59 | * | krux02_ quit (Remote host closed the connection) |
00:32:37 | * | Hideki_ joined #nim |
00:37:53 | * | Hideki_ quit (Ping timeout: 276 seconds) |
00:43:12 | * | clyybber quit (Quit: WeeChat 2.6) |
00:46:41 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:56:16 | FromDiscord_ | <sealmove> Zevv: Thanks for the info! I will try to fix my grammar. |
01:17:02 | sealmove | Zevv: sorry :( I didn't think it could be a grammar issue. I will debug my grammar before anything, next time. |
01:40:54 | * | uu91 quit (Read error: Connection reset by peer) |
01:41:12 | * | uu91 joined #nim |
01:42:27 | * | disruptek quit (Ping timeout: 250 seconds) |
01:42:56 | * | disbot quit (Ping timeout: 252 seconds) |
01:58:17 | * | disruptek joined #nim |
01:58:27 | * | disbot joined #nim |
02:09:32 | * | lvmbdv quit (Ping timeout: 276 seconds) |
02:17:01 | * | lvmbdv joined #nim |
02:21:44 | * | seni quit (Quit: Leaving) |
02:26:56 | * | lvmbdv quit (Ping timeout: 240 seconds) |
02:30:16 | * | abm quit (Quit: Leaving) |
02:31:48 | * | njoseph quit (Ping timeout: 246 seconds) |
02:35:02 | * | lvmbdv joined #nim |
02:35:32 | * | njoseph joined #nim |
02:44:14 | * | uu91 quit (Read error: Connection reset by peer) |
02:44:43 | * | uu91 joined #nim |
02:49:47 | * | sagax joined #nim |
02:52:48 | * | crem quit (Ping timeout: 245 seconds) |
02:54:36 | * | crem joined #nim |
03:04:56 | disruptek | !repo npeg |
03:04:56 | disbot | https://github.com/zevv/npeg -- 11PEGs for Nim, another take 8 66⭐15 2🍴 |
03:05:24 | * | endragor joined #nim |
03:07:09 | leorize | disruptek: oooh your bot got better |
03:07:18 | leorize | any command list yet? :P |
03:07:24 | disruptek | try !help |
03:07:29 | leorize | !help |
03:07:55 | Kaynato | Hello, if there's an opportunity for a quick question - due to the interface with a c library, I receive a ptr pointer to what ought to be some sequence of floats. I have a tuple type, FloatVec4 which consists of 4 floats. Is it completely wrong to do something like `var vecdata = cast[ptr FloatVec4](memmap)`? |
03:08:48 | leorize | maybe |
03:08:55 | disruptek | kinda; the float type might vary. |
03:08:58 | leorize | i don't know if the compiler aligns members in tuple |
03:09:19 | disruptek | i would use what you're passed or copy it to your own structure. |
03:09:49 | leorize | converting to UncheckedArray might be better |
03:10:09 | Kaynato | i was thinking about UncheckedArray but wasn't sure how I would really approach it there |
03:10:10 | disruptek | that would solve half the problem. |
03:12:05 | leorize | so what kind of C voodoo are you interfacing with? |
03:12:14 | Kaynato | vulkan |
03:12:57 | Kaynato | This is what I have in that section - Pixel is my 4-float tuple, WIDTH and HEIGHT were passed in as args https://hastebin.com/raw/ejehoyulis |
03:14:37 | leorize | unchecked array please |
03:14:48 | leorize | do you know what kind of float are they using? |
03:15:00 | leorize | if not just assume float32 |
03:15:21 | Kaynato | mhm, that's what I'm assuming |
03:49:03 | * | ponyrider quit (Quit: WeeChat 2.6) |
03:53:21 | Kaynato | almost working - is there a definite way to convert array[255, char] to string, or to directly do strcmp on the badly typed string? |
03:56:30 | disruptek | hit backspace and type it again. |
04:00:25 | * | sealmove quit (Quit: WeeChat 2.6) |
04:12:01 | FromDiscord_ | <Kaynato> Good joke - only if I could do that... The interfacing library defines its own arbitrary maxlength of pseudo-cstring char arrays, and I don't think I can safely replace those with regular cstring in the cimports. I just want to ask if there's any established convention or if I can just do an ad hoc method to convert. |
04:15:51 | * | chemist69 quit (Ping timeout: 250 seconds) |
04:16:59 | disruptek | there's no routine to convert from the arbitrary form to a standard cstring? i guess you get to write that yourself. |
04:17:24 | FromDiscord_ | <Kaynato> Huh, alright then. Thanks for the heads-up |
04:17:44 | disruptek | i'd still rather write that stuff in nim than c. 😉 |
04:17:55 | * | chemist69 joined #nim |
04:17:58 | disruptek | had to do something similar for git. |
04:25:01 | * | sagax quit (Remote host closed the connection) |
04:27:11 | * | rockcavera quit (Remote host closed the connection) |
04:34:24 | * | Hideki_ joined #nim |
04:38:51 | * | Hideki_ quit (Ping timeout: 246 seconds) |
04:46:03 | * | nsf joined #nim |
04:47:46 | * | uu91 quit (Read error: Connection reset by peer) |
04:48:04 | * | uu91 joined #nim |
04:54:57 | * | Jesin quit (Ping timeout: 265 seconds) |
05:20:38 | * | uu91 quit (Read error: Connection reset by peer) |
05:20:51 | * | uu91 joined #nim |
05:25:06 | disruptek | !repo disruptek/atoz |
05:25:07 | disbot | https://github.com/disruptek/atoz -- 11Amazon Web Services (AWS) APIs in Nim 8 10⭐15 0🍴 |
05:25:18 | disruptek | added 5 more apis 🎉 |
05:35:31 | FromGitter | <Willyboar> !help |
05:49:49 | * | sagax joined #nim |
06:02:09 | * | kevinchau joined #nim |
06:08:12 | * | uu91 quit (Read error: Connection reset by peer) |
06:08:28 | * | uu91 joined #nim |
06:22:11 | Zevv | disruptek: why the cutlery? |
06:24:03 | * | uu91 quit (Read error: Connection reset by peer) |
06:24:21 | * | uu91 joined #nim |
06:24:22 | Zevv | https://zevv.nl/div/cutlery.png |
06:25:51 | FromDiscord_ | <WilliamDraco> forks |
06:26:25 | FromDiscord_ | <WilliamDraco> I.E. 10 stars, 0 forks |
06:27:30 | Zevv | 0 forks and knives |
06:28:08 | FromDiscord_ | <WilliamDraco> Still technically correct I'd wager 😉 |
06:32:26 | * | narimiran joined #nim |
06:48:27 | * | solitudesf joined #nim |
06:55:49 | FromDiscord_ | <Rika> is there a better datatype than seq for "an array with size determined at runtime which never changes size" |
06:56:00 | FromDiscord_ | <Rika> or is seq best? |
06:59:42 | Zevv | let me turn that around: what is *wrong* with a seq? Because basically it is "an array with size determined at runtime", and not resizing does not cost anything. |
07:00:07 | Zevv | The only downside I can think of is that you would have *many* of these and the 16 byte administration overhead of a seq is too much for you. |
07:00:27 | Zevv | If that is the case, you could just allocate one huge seq and do your own bookkeeping inside it. |
07:02:12 | * | LargeEpsilon joined #nim |
07:16:14 | * | kevinchau quit (Remote host closed the connection) |
07:22:22 | * | uu91 quit (Read error: Connection reset by peer) |
07:22:36 | * | uu91 joined #nim |
07:27:54 | * | uu91 quit (Read error: Connection reset by peer) |
07:28:09 | * | uu91 joined #nim |
07:44:36 | * | njoseph quit (Ping timeout: 265 seconds) |
07:44:46 | * | uu91 quit (Read error: Connection reset by peer) |
07:44:49 | FromDiscord_ | <Rika> Zevv, I was asking more of "I do not know if this is the best data type to use" |
07:45:08 | * | uu91 joined #nim |
07:45:21 | Zevv | well, I guess it Is, sorry for the rambling :) |
07:46:30 | * | PMunch joined #nim |
07:53:57 | * | dddddd quit (Remote host closed the connection) |
07:55:47 | FromDiscord_ | <mratsim> @Kaynato, you can do ptr FloatVec4 if you importc FLoatVec4 to ensure compat |
07:56:49 | FromDiscord_ | <mratsim> this is a good example of fully importing a C type into Nim: https://github.com/status-im/nim-decimal/blob/master/decimal/decimal_lowlevel.nim#L204-L214 |
07:57:05 | FromDiscord_ | <mratsim> and to import and opaque type just don't list the fields |
07:57:11 | FromDiscord_ | <mratsim> an* |
07:57:19 | * | uu91 quit (Read error: Connection reset by peer) |
07:57:36 | * | uu91 joined #nim |
07:58:27 | FromGitter | <alehander92> i am surprised you didnt write |
07:58:28 | FromGitter | <alehander92> a macro |
07:59:14 | FromGitter | <alehander92> which is a good thing, a bit of repetition is fine |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:04:52 | * | gmpreussner joined #nim |
08:09:55 | FromDiscord_ | <mratsim> for FFI when you are exploring, I feel it's easier to just write stuff. Plus it was mostly generated by c2nim |
08:10:21 | FromGitter | <alehander92> yep |
08:21:31 | * | njoseph joined #nim |
08:21:43 | PMunch | Haha, I've been trying to push the binary size of my Nim -> Arduino program down. The .text section of it was originally 23490 bytes compared to the C++ version at 14792 bytes (ouch) |
08:22:19 | PMunch | After much back and forth with different compilation options and GCC flags I was looking at "nim --fullhelp" for anything that might help |
08:22:52 | PMunch | Turns out that --excessiveStackTrace:off was enough to bump it down to 15264 bytes |
08:27:03 | Zevv | PMunch: sweet |
08:27:14 | PMunch | Oh no, wait |
08:27:26 | PMunch | It was apparently the --opt:size flag I had added as well :P |
08:27:30 | PMunch | That makes more sense |
08:27:32 | Zevv | :) |
08:27:36 | * | solitudesf quit (Ping timeout: 240 seconds) |
08:28:16 | Zevv | Not sure if you caught my question yesterday: how does nim handle constants these days? Pretty importand on low ram devices - there were some discussion some time ago that consts always end up in a C variable anyway |
08:29:23 | FromGitter | <alehander92> dont they get inlined |
08:29:32 | PMunch | Yeah they seem to be inlined |
08:29:40 | FromGitter | <alehander92> but yeah this means they still have to be somewhere |
08:29:50 | FromGitter | <alehander92> e.g. in the data segment? not sure how this all works still |
08:31:10 | Zevv | On atmel it's tricky anyway, the .text section is usually not mapped in the normal address space |
08:31:19 | Zevv | you need special instructions for accessing those |
08:32:03 | Zevv | I'm sick and done with all these atmel avrs. For $.20 you get a nice and fat ARM at your local dealer, there is really no use for these things anymore IMHO |
08:32:16 | Zevv | the only reason would be that you want somethign DIL |
08:34:34 | FromGitter | <alehander92> hm wat is this |
08:34:35 | FromGitter | <alehander92> atmel |
08:34:48 | Zevv | atmel AVR MCU architecture. |
08:35:11 | PMunch | Hmm, this is so weird.. |
08:36:00 | PMunch | With -d:release -d:danger I get larger binaries than if I don't include them. But adding --opt:size makes builds with these two flags smaller than those without.. |
08:36:01 | * | Hideki_ joined #nim |
08:36:23 | PMunch | But only if I have some other --passC flags defined |
08:37:12 | PMunch | Seems like it is the -flto flag that causes it to drop dramatically with this combination of flags |
08:38:04 | PMunch | Building with "-d:release -d:danger --opt:size" in both cases. With "-flto": 15264 bytes, without: 28588 bytes |
08:38:25 | * | krux02 joined #nim |
08:40:34 | * | Hideki_ quit (Ping timeout: 252 seconds) |
08:50:36 | * | PMunch quit (Ping timeout: 240 seconds) |
08:51:16 | * | PMunch joined #nim |
08:55:05 | * | krux02 quit (Remote host closed the connection) |
08:55:52 | * | lritter joined #nim |
09:27:10 | * | shashlick[m] quit (Remote host closed the connection) |
09:27:20 | * | Connor[m] quit (Remote host closed the connection) |
09:27:20 | * | xomachine[m] quit (Remote host closed the connection) |
09:27:25 | * | isaac[m]1 quit (Remote host closed the connection) |
09:27:26 | * | yglukhov[m] quit (Write error: Connection reset by peer) |
09:27:26 | * | Manny8888 quit (Remote host closed the connection) |
09:27:27 | * | planetis[m] quit (Remote host closed the connection) |
09:27:29 | * | d-nice2[m] quit (Write error: Connection reset by peer) |
09:27:30 | * | leorize[m] quit (Remote host closed the connection) |
09:27:31 | * | k0mpjut0r quit (Write error: Connection reset by peer) |
09:27:32 | * | macsek1911[m] quit (Remote host closed the connection) |
09:27:32 | * | meff[m] quit (Remote host closed the connection) |
09:27:33 | * | spymasterd[m] quit (Read error: Connection reset by peer) |
09:27:34 | * | M948e5[m] quit (Read error: Connection reset by peer) |
09:27:35 | * | lqdev[m] quit (Read error: Connection reset by peer) |
09:27:36 | * | skrylar[m] quit (Read error: Connection reset by peer) |
09:27:37 | * | GitterIntegratio quit (Write error: Connection reset by peer) |
09:27:39 | * | TheManiac[m] quit (Write error: Connection reset by peer) |
09:27:41 | * | LEdoian[m] quit (Write error: Connection reset by peer) |
09:27:42 | * | lasso[m] quit (Remote host closed the connection) |
09:27:43 | * | Demos[m] quit (Read error: Connection reset by peer) |
09:27:44 | * | zielmicha[m]1 quit (Read error: Connection reset by peer) |
09:27:44 | * | joachimschmidt55 quit (Remote host closed the connection) |
09:27:45 | * | Miguelngel[m] quit (Remote host closed the connection) |
09:27:45 | * | Asbrn[m] quit (Remote host closed the connection) |
09:27:46 | * | zacharycarter[m] quit (Read error: Connection reset by peer) |
09:27:46 | * | Balu[m] quit (Remote host closed the connection) |
09:27:47 | * | Mike[m]7 quit (Remote host closed the connection) |
09:27:47 | * | nergal[m] quit (Write error: Broken pipe) |
09:27:47 | * | BitPuffin quit (Read error: Connection reset by peer) |
09:35:52 | * | floppydh joined #nim |
09:35:56 | * | floppydh quit (Client Quit) |
09:36:06 | * | floppydh joined #nim |
10:05:49 | PMunch | Hmm, is there a way to expand varargs in a template? |
10:05:54 | PMunch | I think I've asked this before |
10:10:28 | * | lqdev[m] joined #nim |
10:10:28 | * | isaac[m]1 joined #nim |
10:10:28 | * | k0mpjut0r joined #nim |
10:10:28 | * | TheManiac[m] joined #nim |
10:10:29 | * | BitPuffin joined #nim |
10:10:29 | * | Demos[m] joined #nim |
10:10:29 | * | M948e5[m] joined #nim |
10:10:29 | * | leorize[m] joined #nim |
10:10:29 | * | LEdoian[m] joined #nim |
10:10:30 | * | GitterIntegratio joined #nim |
10:10:30 | * | nergal[m]1 joined #nim |
10:10:34 | * | d-nice2[m] joined #nim |
10:10:34 | * | pigmej joined #nim |
10:10:34 | * | skrylar[m] joined #nim |
10:10:34 | * | Manny8888 joined #nim |
10:10:35 | * | zielmicha[m]1 joined #nim |
10:10:35 | * | Miguelngel[m] joined #nim |
10:10:35 | * | Connor[m] joined #nim |
10:10:35 | * | shashlick[m] joined #nim |
10:10:35 | * | xomachine[m] joined #nim |
10:10:35 | * | meff[m] joined #nim |
10:10:35 | * | Asbrn[m] joined #nim |
10:10:35 | * | zacharycarter[m] joined #nim |
10:10:35 | * | planetis[m] joined #nim |
10:10:35 | * | nc-x[m] joined #nim |
10:10:35 | * | joachimschmidt55 joined #nim |
10:10:36 | * | spymasterd[m] joined #nim |
10:10:36 | * | salotz[m] joined #nim |
10:10:36 | * | Balu[m] joined #nim |
10:10:36 | * | Mike[m]2 joined #nim |
10:10:37 | * | lasso[m] joined #nim |
10:10:37 | * | macsek1911[m] joined #nim |
10:10:37 | * | yglukhov[m] joined #nim |
10:21:34 | * | uu91 quit (Read error: Connection reset by peer) |
10:21:54 | * | uu91 joined #nim |
10:30:52 | * | LargeEpsilon quit (Ping timeout: 265 seconds) |
10:44:17 | madprops | hmm wondering how adapt this js function to nim https://play.nim-lang.org/#ix=22XN |
10:44:34 | madprops | the js seems to fill an array at different orders through index |
10:44:50 | madprops | i can't just do it with a simple seq, unless i fill it maybe |
10:47:39 | * | Hideki_ joined #nim |
10:47:40 | PMunch | That seems to calculate the edit distance between two strings |
10:47:44 | PMunch | You might want: https://nim-lang.org/docs/editdistance.html |
10:50:42 | madprops | weird, can't seem to be able to import it |
10:53:35 | * | Hideki_ quit (Remote host closed the connection) |
10:53:45 | madprops | "cannot open file: editdistance" |
10:55:23 | PMunch | Nim version? |
10:55:32 | PMunch | It used to be part of strutils |
11:00:27 | madprops | 1,0,2 |
11:00:35 | madprops | s/,/\. |
11:01:00 | madprops | hmm weird |
11:01:03 | madprops | it works with strutils |
11:01:12 | madprops | am i running an older nim? |
11:01:18 | FromGitter | <alehander92> std/editdistance |
11:01:19 | FromGitter | <alehander92> ? |
11:01:36 | madprops | ah that works |
11:01:40 | madprops | why do i need the std/ ? |
11:02:02 | FromGitter | <alehander92> well it's in `std/` |
11:02:16 | madprops | isn't strutils etc in std too? |
11:02:18 | FromGitter | <alehander92> i think the idea was to namespace std modules to not clash with custom user ones |
11:02:24 | madprops | oh |
11:02:33 | FromGitter | <alehander92> not really, but i think `std/strutils` .. should work? |
11:02:40 | FromGitter | <alehander92> i am not sure how the whole things works now |
11:03:11 | madprops | maybe docs should reflect stuff like this |
11:03:23 | FromGitter | <alehander92> yes |
11:03:27 | FromGitter | <alehander92> narimiran do we have docs |
11:03:29 | FromGitter | <alehander92> for std/ ? |
11:03:46 | FromGitter | <alehander92> couldnt google them |
11:04:25 | narimiran | plenty of `std/...` stuff here: https://nim-lang.github.io/Nim/lib.html |
11:06:18 | FromGitter | <alehander92> but no explanation of std/ vs just imports |
11:06:55 | FromGitter | <alehander92> did this happen at all the std/strutils thing |
11:16:23 | * | ng0 joined #nim |
11:22:17 | * | thomasross_ joined #nim |
11:22:17 | * | thomasross is now known as Guest16810 |
11:22:17 | * | Guest16810 quit (Killed (adams.freenode.net (Nickname regained by services))) |
11:22:17 | * | thomasross_ is now known as thomasross |
11:23:11 | Araq | 'import strutils' works because of backwards compat with every existing Nim project out there |
11:23:29 | Araq | new stdlib modules must be accessed via 'std/' |
11:24:24 | * | rockcavera joined #nim |
11:26:36 | * | Vladar joined #nim |
11:26:44 | FromDiscord_ | <onelivesleft> `nim doc` questions: can you change the order things appear in? can you have it insert another file? (would be a lot easier than copy-pasting my readme.md eery time I change it) |
11:35:09 | * | letto quit (Ping timeout: 265 seconds) |
11:37:44 | FromDiscord_ | <onelivesleft> I've found `.. include`, but I can't get `start-line` to work |
11:38:03 | Araq | there is menu for "group by type" on the left |
11:38:22 | Araq | but I don't know if that a stdlib specific feature |
11:40:01 | FromGitter | <qqtop> incidentally it should be mentioned that export std/... will not work |
11:42:08 | Araq | that's not std/ specific, you don't export paths |
11:42:12 | Araq | you export module names |
11:42:57 | Araq | maybe it's overly picky but for now that's the current design |
11:43:32 | FromDiscord_ | <python273> is there any workaround for https://forum.nim-lang.org/t/3133? |
11:43:59 | * | tklohna joined #nim |
11:45:26 | Araq | you could do maybe const POSIX_CONST = parseInt(staticExec(cprogramThatOutputsPOSIX_CONST)) |
11:45:32 | Araq | but please don't |
11:45:50 | Araq | just look up the constant's value and write 'const x = value' |
11:46:48 | Araq | it helps when you stop pretending Posix is a real thing, in reality it's some fake standard closely tied to C, hostile to every other compiled language |
11:49:14 | FromGitter | <alehander92> but if he uses like 20 of those |
11:49:42 | FromGitter | <alehander92> it wouldn't be very nice to do that, i guess someone should publish such a detect-like lib on nimble |
11:49:44 | * | uu91 quit (Read error: Connection reset by peer) |
11:49:58 | * | uu91 joined #nim |
11:49:59 | * | thomasross quit (Ping timeout: 276 seconds) |
11:50:27 | Araq | these days you can look up the values in Rust's source code. Or Go's. Previously it was FPC's. |
11:50:54 | Araq | they all have the same problem, Posix is a non-standard. |
11:51:06 | FromGitter | <alehander92> of course, i am just saying someone can package that so not everyone needs to do it |
11:51:15 | FromGitter | <alehander92> e.g. something that loads them on build time as you said |
11:51:37 | Araq | well ok, but detect.nim is buried inside Nim somewhere |
11:52:11 | Araq | it exists, you can adapt it, maybe make it interactive. |
11:52:29 | FromGitter | <alehander92> ah i found it interesting |
11:54:34 | FromDiscord_ | <python273> thanks, I'm hacking around stuff, so hardcoding seems fine for now |
11:55:06 | Araq | python273: just give it a nice error message on "not linux" |
11:55:09 | narimiran | btw, @python273 you should switch your nick to python 3! |
11:57:46 | * | thomasross joined #nim |
12:00:53 | * | tiorock joined #nim |
12:00:54 | * | rockcavera is now known as Guest36717 |
12:00:54 | * | Guest36717 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
12:00:54 | * | tiorock is now known as rockcavera |
12:04:25 | FromGitter | <kayabaNerve> Psh. 1.6 or bust. |
12:05:36 | * | njoseph quit (Ping timeout: 240 seconds) |
12:05:43 | FromGitter | <kayabaNerve> Anyone who uses a Python not in the 1 series isn't using Python, but rather New Python. Like New Coke, because it has New in the name, it is objectively worse. |
12:07:05 | * | uu91 quit (Read error: Connection reset by peer) |
12:07:18 | * | uu91 joined #nim |
12:07:34 | * | uu91 quit (Read error: Connection reset by peer) |
12:07:50 | * | uu91 joined #nim |
12:08:00 | Araq | now look at this, https://github.com/nim-lang/Nim/pull/12667/checks?check_run_id=322767602 |
12:08:02 | disbot | ➥ VM: improvements for var T/addr; WIP @11Araq |
12:10:54 | Araq | I broke no Nimble package :-) |
12:11:10 | * | LargeEpsilon joined #nim |
12:24:49 | * | clyybber joined #nim |
12:33:40 | clyybber | Araq: Hi, does it fix #12282? |
12:33:49 | clyybber | #12282 |
12:33:51 | disbot | https://github.com/nim-lang/Nim/issues/12282 -- 3var param with type conversion doesn't work in VM @11Clyybber; snippet at 12https://play.nim-lang.org/#ix=22XY 😏 |
12:34:59 | clyybber | disruptek: disbot should probably have detected it even with the `?` |
12:36:56 | * | endragor quit (Remote host closed the connection) |
12:37:01 | Araq | clyybber, maybe |
12:38:46 | * | sealmove joined #nim |
12:40:45 | * | sleepyqt joined #nim |
12:44:51 | * | abm joined #nim |
12:47:19 | * | njoseph joined #nim |
12:59:14 | sealmove | Zevv: https://github.com/zevv/npeg/issues/17#issuecomment-559015363 |
13:00:50 | * | njoseph quit (Ping timeout: 276 seconds) |
13:02:22 | Zevv | interesting, will look into that |
13:11:12 | * | njoseph joined #nim |
13:11:43 | * | solitudesf joined #nim |
13:21:26 | sealmove | just producing more issues because you were complaining there are not enough ;D |
13:21:52 | sealmove | personally I don't care about such minor inconveniences |
13:22:15 | sealmove | just reporting as I stumble across them |
13:24:14 | * | uu91 quit (Ping timeout: 276 seconds) |
13:25:10 | * | uu91 joined #nim |
13:26:19 | * | couven92 joined #nim |
13:34:16 | rockcavera | Somewhere that exposes Nim code optimizations for speeding execution? |
13:37:46 | * | nsf quit (Quit: WeeChat 2.6) |
13:51:16 | FromGitter | <alehander92> <3 |
13:51:24 | FromGitter | <alehander92> what is your program |
13:51:25 | FromGitter | <alehander92> doing |
13:59:30 | Araq | wow syntax highlighting for format strings is nice |
14:06:12 | Yardanico | yes :P |
14:06:58 | Yardanico | btw just fyi - `sh build_all.sh` worked flawlessly on x86_64 void (musl) |
14:07:36 | FromDiscord_ | <funcmike> 😉 spawn starts a task in threadpool yes? so starting 1000x spawn tasks is using only fixed number of threads in threadpool? |
14:07:48 | Yardanico | yes |
14:08:15 | Yardanico | https://nim-lang.org/docs/threadpool.html#MaxThreadPoolSize and setMax/MinPoolSize |
14:08:32 | FromDiscord_ | <funcmike> async starts a task in asyncdispatcher ? single threaded |
14:10:30 | PMunch | Hmm, why aren't top level variables in Nim translated to just top level variable declarations in C? |
14:10:39 | PMunch | I have to call NimMain in order to initialise them |
14:11:01 | Yardanico | @funcmike well, by default yes, but no one stops you from using async and threads at the same time :P |
14:11:08 | FromDiscord_ | <onelivesleft> I'm getting `VM problem: too many registers required` - should I use dev version or something? Is this something that will be fixed in release soon? |
14:11:28 | Yardanico | @onelivesleft it means that youre completime function is too big to execute for the VM |
14:11:36 | Yardanico | or a macro |
14:11:44 | Yardanico | try to split it into smaller macros/compiletime procs |
14:12:22 | FromDiscord_ | <onelivesleft> it is a pretty big macro 😛 |
14:12:24 | Yardanico | or maybe you have a very big variable at compile-time, I'm not sure |
14:13:18 | FromDiscord_ | <funcmike> so why is this distinction between asyncdispatcher and threadpool ? i know concurrency vs parallelism but i want to understand why nim choose this way (different then others)- task switching implemention (scheduler) is different? |
14:13:55 | Yardanico | what do you mean it's different? |
14:14:03 | Yardanico | async is just like your normal async in any modern programming language |
14:14:07 | Yardanico | and the same goes for threads |
14:14:51 | FromDiscord_ | <funcmike> ok so why async/spawn? |
14:15:09 | Yardanico | to differentiate between the two |
14:15:23 | leorize | PMunch: some of them uses the heap (ie. strings) so they have to be initialized |
14:16:02 | FromDiscord_ | <funcmike> ok but why i cant run async task in multithreaded threadpool ? |
14:16:25 | leorize | then I guess someone decided that it doesn't worth adding extra code for stack-based variables |
14:16:37 | Yardanico | @funcmike you can do it, nobody stops you from doing that |
14:16:46 | Yardanico | but watch out for GC safety (nim's default GC is thread-local) |
14:16:54 | leorize | you can't atm actually |
14:17:19 | FromGitter | <alehander92> funcmike can you show another language |
14:17:26 | FromGitter | <alehander92> where you can await from another thread |
14:17:38 | FromGitter | <alehander92> probably there are, i am just trying to learn more about this as well |
14:17:50 | FromDiscord_ | <funcmike> rust with tokio runtime for ex. |
14:18:14 | leorize | @funcmike: it's separated into two because they are fundamentally different |
14:18:28 | leorize | later on we can add abstractions to make them seamless |
14:20:09 | leorize | work is being done for that: https://github.com/nim-lang/Nim/pull/11724 |
14:20:11 | disbot | ➥ Make Flowvar compatible with Async @11rayman22201 |
14:20:29 | Araq | also, this part of Nim is still in heavy development, we're getting --gc:arc mitigating the .gcsafe restrictions |
14:21:11 | FromGitter | <alehander92> i see so rust has mutlithread executors |
14:21:24 | FromGitter | <alehander92> i didnt know how this works thanks |
14:22:04 | FromGitter | <alehander92> would gc:arc permit easier await thread() ? |
14:22:37 | FromDiscord_ | <funcmike> alehander92: https://tokio.rs/blog/2019-10-scheduler/ (Work-stealing scheduler based on Go) |
14:22:38 | FromGitter | <alehander92> PMunch you cant run code |
14:22:42 | FromGitter | <alehander92> in c on top level |
14:23:03 | Araq | well check out http://seastar.io/ attaching the event loop to a single thread is not outdated afact |
14:23:05 | FromGitter | <alehander92> so i guess some more complicated initializations |
14:23:18 | FromGitter | <alehander92> might need to be called in a function? |
14:23:19 | PMunch | alehander92, ah so it's just because Nim isn't tracking if it is = 1 or = someproc() |
14:23:28 | FromGitter | <alehander92> and i guess |
14:23:30 | FromGitter | <alehander92> also to follow the |
14:23:39 | FromGitter | <alehander92> stuff happens when your import a module thing |
14:23:42 | FromGitter | <alehander92> but not sure about that |
14:23:59 | Araq | and they even have http://docs.seastar.io/master/classseastar_1_1foreign__ptr.html |
14:28:33 | * | NimBot joined #nim |
14:32:29 | FromDiscord_ | <funcmike> 🙂 Any ETA on --gc:arc, from what i see it will be next big thing for Nim ? |
14:32:53 | leorize | not confirmed :P |
14:33:02 | leorize | --newruntime is the next big thing |
14:34:13 | leorize | but turns out it wasn't compatible with most of nim code |
14:34:21 | * | couven92 quit (Quit: Client Disconnecting) |
14:35:03 | leorize | so we can't be sure with these experiments until things start to be ported to it |
14:35:13 | * | Romanson joined #nim |
14:35:35 | Araq | funcmike: I still think we'll have it in beta-quality this Christmas |
14:35:47 | Araq | more and more programs compile with it |
14:35:51 | FromGitter | <nixfreakz_twitter> has anyone came across this error https://github.com/alaviss/nim.nvim/issues/17 ? |
14:36:37 | FromDiscord_ | <funcmike> Araq: nice Christmas present 🙂 |
14:36:53 | leorize | nixfreakz_twitter: \o/ a bug |
14:37:11 | leorize | looks like your nimsuggest couldn't be executed sometimes |
14:37:59 | FromGitter | <nixfreakz_twitter> yeah not sure why though |
14:38:01 | Yardanico | do you have nimsuggest in path @nixfreakz_twitter ? |
14:38:44 | sealmove | yesterday I downloaded Nim on a friend's PC (Linux binary) and readFile was not working! |
14:39:05 | FromGitter | <nixfreakz_twitter> its under .nimble/bin/ |
14:39:07 | FromGitter | <nixfreakz_twitter> so yes |
14:39:18 | leorize | nixfreakz_twitter: just pushed a fix |
14:39:26 | leorize | now the error should display properly |
14:39:48 | sealmove | didn't have time to investigate, but it's weird; I wonder... |
14:40:03 | FromGitter | <nixfreakz_twitter> getting git error installing nimsuggest again |
14:40:18 | Yardanico | ? |
14:40:20 | sealmove | what can cause readFile() to fail? |
14:40:26 | Yardanico | permissions? |
14:40:32 | sealmove | yes, checked that |
14:40:38 | leorize | out of file descriptors? |
14:40:49 | sealmove | unlike, the code was 2 lines |
14:40:56 | sealmove | unlikely* |
14:41:09 | leorize | without an error message it's hard |
14:41:20 | sealmove | it was like "could not open file" |
14:41:31 | FromGitter | <nixfreakz_twitter> using choosenim stable |
14:42:08 | sealmove | anyway, I will investigate more today and report, but it was disturbing |
14:42:45 | leorize | nixfreakz_twitter: any error messages? |
14:44:09 | * | nsf joined #nim |
14:44:17 | FromGitter | <nixfreakz_twitter> do you see it above ? gitter is screwing up my color scheme by highlighting it |
14:45:13 | leorize | no, i don't see any? |
14:45:24 | FromGitter | <nixfreakz_twitter> ok one momenet |
14:45:56 | FromGitter | <nixfreakz_twitter> I'm going to post on IRC |
14:47:01 | * | nixfreak joined #nim |
14:47:04 | leorize | use a pastebin then post the link here |
14:47:43 | nixfreak | http://pastebin.ws/f656w |
14:48:51 | leorize | don't install nimsuggest with nimble |
14:48:53 | leorize | use choosenim |
14:49:20 | nixfreak | I have stable for choosenim |
14:49:38 | nixfreak | choosenim v0.4.0 (2019-04-18 22:21:21) [linux/amd64] |
14:50:12 | Yardanico | update it pls :P |
14:50:15 | Yardanico | and nim 1.0.2 is also out |
14:50:27 | nixfreak | sorry updating now |
14:50:33 | Yardanico | well I'm not sure if that will help |
14:50:50 | Yardanico | but generally it'll rule out the possibility of a fixed bug in choosenim/nimble/nim |
14:52:08 | narimiran | wait with updating nim for a few minutes ;) |
14:52:30 | nixfreak | umm ok canceled |
14:53:30 | nixfreak | thanks for looking into this , its appreciated |
14:54:19 | * | ng0_ joined #nim |
14:56:28 | * | ng0 quit (Ping timeout: 260 seconds) |
14:59:02 | Araq | can anybody confirm that choosenim has 1.0.4 already? |
14:59:28 | FromDiscord_ | <Rika> is |
14:59:30 | FromDiscord_ | <Rika> i just updated |
14:59:47 | FromDiscord_ | <Rika> Araq, ^ |
14:59:56 | Araq | thanks! |
15:00:00 | narimiran | nixfreak: there, you can update now and have the freshest nim :) |
15:00:07 | nixfreak | I'm updating now , thanks |
15:00:48 | FromDiscord_ | <Rika> article when |
15:00:53 | nixfreak | pretty sweet i can update two devices at the same time and use syncthing to sync them |
15:01:18 | Yardanico | I'm still using nim devel :P |
15:01:29 | nixfreak | doesn't matter what device i have nim libs are always on my devices |
15:02:48 | FromDiscord_ | <Rika> ooh TIL about syncthing |
15:03:09 | narimiran | @Rika never :P |
15:04:45 | nixfreak | I use it on all my devices |
15:06:17 | nixfreak | sweet nvim works great again |
15:06:28 | * | PMunch quit (Quit: Leaving) |
15:06:59 | narimiran | Nim 1.0.4 changelog is here: https://github.com/nim-lang/Nim/blob/version-1-0/changelogs/changelog_1_0_4.md |
15:11:36 | leorize | narimiran: Manjaro support for detectOS is a language change? :P |
15:11:52 | narimiran | leorize: nitpick :P |
15:15:32 | nixfreak | Error detected while processing User Autocommands for "asyncomplete_setup": |
15:15:34 | nixfreak | E15: Invalid expression: |
15:15:36 | nixfreak | E116: Invalid arguments for function asyncomplete#register_source |
15:15:38 | nixfreak | Press ENTER or type command to continue |
15:15:54 | nixfreak | it works just that error now |
15:16:16 | leorize | is your asyncomplete the latest version? |
15:17:40 | nixfreak | I'll check when I get back thanks again for all the help |
15:24:49 | * | clyybber quit (Quit: WeeChat 2.6) |
15:32:14 | * | shadowbane quit (Quit: Konversation terminated!) |
15:32:53 | * | bacterio quit (Read error: Connection reset by peer) |
15:36:01 | * | Kaivo joined #nim |
15:38:36 | * | ng0_ is now known as ng0 |
15:41:27 | shashlick | dom96: you there? |
15:46:46 | * | Vladar quit (Quit: Leaving) |
15:48:41 | * | sleepyqtx joined #nim |
15:52:26 | * | sleepyqt quit (Ping timeout: 276 seconds) |
16:11:25 | * | a_b_m joined #nim |
16:14:28 | * | abm quit (Ping timeout: 245 seconds) |
16:18:02 | * | a_b_m quit (Quit: Leaving) |
16:25:31 | * | leorize quit (Quit: WeeChat 2.6) |
16:40:16 | FromDiscord_ | <Rika> why do `set`s not have augmented assignment? is there a reason or is it just an oversight? |
16:40:35 | * | bacterio joined #nim |
16:40:55 | disruptek | what is `augmented assignment`? |
16:41:11 | FromDiscord_ | <Rika> uh shit, its whatever `+=` is actual'y called |
16:41:14 | FromDiscord_ | <Rika> actually* |
16:42:35 | FromDiscord_ | <Rika> disruptek, ^ |
16:42:49 | disruptek | it seems like some attention was paid to the purity of sets as a concept, hence `card` versus `len` and some of the other design decisions. |
16:43:27 | disruptek | that's my best guess. i don't think there's a technical reason for the omission; it seems like it should be feasible. |
16:43:35 | * | Jesin joined #nim |
16:43:49 | FromDiscord_ | <Rika> purity? |
16:44:16 | disruptek | yeah, like despite the fact that we're iterator, we're not a sequence, damnit. |
16:47:14 | * | dddddd joined #nim |
16:47:25 | * | floppydh quit (Quit: WeeChat 2.6) |
16:57:13 | Zevv | hey disruptek how many cutleries do you have on your repo then? |
16:58:45 | disruptek | no one likes my code. 😭 |
17:02:53 | disruptek | 👭cloning https://github.com/zevv/npeg... |
17:03:18 | disruptek | just for you, buddy. |
17:05:36 | FromDiscord_ | <Rika> two forks but no knives, thats sad |
17:05:52 | disruptek | you cut deep, son. |
17:07:13 | disruptek | or maybe no one needs to fork code that's perfect. |
17:07:17 | disruptek | yeah, that's it. |
17:18:38 | * | LargeEpsilon quit (Ping timeout: 268 seconds) |
17:22:24 | * | uu91 quit (Read error: Connection reset by peer) |
17:22:44 | * | uu91 joined #nim |
17:29:17 | * | njoseph quit (Ping timeout: 276 seconds) |
17:31:48 | * | Romanson quit (Quit: Connection closed for inactivity) |
17:31:49 | * | LargeEpsilon joined #nim |
17:32:07 | * | bacterio quit (Read error: Connection reset by peer) |
17:34:27 | Zevv | nah, we need to unite and go to the unicode consortium |
17:35:30 | * | njoseph joined #nim |
17:35:40 | Zevv | wow dude really, you made just for me? That's you and me holding hands, right! |
17:36:11 | disruptek | yeah; i just can't get over the photo of you in a skirt and i wanted to immortalize it and share it with others. |
17:39:02 | * | LargeEpsilon quit (Ping timeout: 276 seconds) |
17:40:14 | Zevv | feel free, I have no shame |
17:40:34 | Zevv | hm funny, there really does not seem to be any version-fork-like symbol in unicode |
17:40:59 | disruptek | 🔱 |
17:41:12 | Zevv | :) |
17:41:23 | disruptek | you prefer that one? |
17:41:37 | * | njoseph quit (Ping timeout: 240 seconds) |
17:42:31 | Zevv | Ⴤ ? |
17:42:36 | Zevv | ⑂ |
17:42:42 | Zevv | ψ |
17:49:03 | Zevv | ⎇! |
17:49:11 | Zevv | or is that more like a branch |
17:49:52 | disruptek | 🌲 |
17:51:49 | * | solitudesf- joined #nim |
17:52:06 | Zevv | going through the unicode table is like reading an encyclopedia, so many things to see and discover you never knew existed |
17:53:30 | disruptek | you outta check out these new things called "color charts." |
17:53:47 | * | solitudesf quit (Ping timeout: 268 seconds) |
17:55:12 | Zevv | I find colors very... disruptive |
17:55:15 | * | Trustable joined #nim |
17:56:11 | disruptek | figures. |
17:58:35 | * | Trustable quit (Client Quit) |
18:01:25 | * | nsf quit (Quit: WeeChat 2.6) |
18:02:26 | Zevv | jesting aside, your bot is growing up nicely. It's not on github, is it? |
18:02:45 | disruptek | nah. |
18:03:03 | disruptek | well, the guts it's based on is. |
18:03:08 | disruptek | !repo disruptek/xs |
18:03:09 | disbot | https://github.com/disruptek/xs -- 11xstreamstartup.com 8 1⭐15 0🍴 |
18:08:12 | * | njoseph joined #nim |
18:10:06 | FromGitter | <zacharycarter> Hmm - so I have an issue. BGFX doesn't support 32 bit integer buffer attributes, so I was storing 4 32 bit integer values in 4 32 bit floats and passing them to my shader code which had inputs of ivec4 or integer vec4 and this worked |
18:10:28 | FromGitter | <zacharycarter> at least it worked on d3d11 - on Metal it throws up with - hrm - when targeting metal I'm getting: Vertex attribute a_texcoord4(5) of type int4 cannot be read using MTLAttributeFormatFloat4 |
18:11:26 | FromGitter | <zacharycarter> bgfx does support 16 bit integer attributes though... I'm not great at bitwise ops but it should be possible to store a 32 bit int in two 16 bit ints correct? |
18:11:40 | FromGitter | <zacharycarter> and then on the shader side of things I could create a 32 bit int from two 16 bit ints? |
18:12:27 | * | nif quit (Quit: ...) |
18:12:37 | * | nif joined #nim |
18:13:10 | FromGitter | <zacharycarter> I guess it's as easy as - https://stackoverflow.com/questions/44098765/split-unsigned-32-integer-into-two-16-bit-numbers-that-can-be-rebuilt ? |
18:13:44 | * | solitudesf-- joined #nim |
18:13:54 | * | njoseph quit (Ping timeout: 265 seconds) |
18:14:24 | Zevv | zacharycarter: sure |
18:14:38 | Zevv | not sure if it has performance inpact in your shader tho |
18:15:01 | FromGitter | <zacharycarter> yeah :/ |
18:15:12 | Zevv | and watch your step when your numbers are signed |
18:15:24 | * | solitudesf- quit (Ping timeout: 246 seconds) |
18:15:26 | * | njoseph joined #nim |
18:16:54 | FromGitter | <zacharycarter> thanks Zevv :) |
18:22:50 | * | solitudesf-- quit (Ping timeout: 252 seconds) |
18:23:19 | * | shashlick_ joined #nim |
18:23:27 | * | narimiran quit (Ping timeout: 250 seconds) |
18:23:51 | * | narimiran joined #nim |
18:23:53 | * | shashlick quit (Ping timeout: 250 seconds) |
18:36:58 | * | narimiran quit (Ping timeout: 245 seconds) |
18:42:20 | * | bacterio joined #nim |
18:42:25 | * | uu91 quit (Ping timeout: 265 seconds) |
18:44:04 | Zevv | oh you're talking float16/float32, right? |
18:44:58 | * | uu91 joined #nim |
18:45:58 | FromGitter | <zacharycarter> yeah |
18:45:59 | * | njoseph quit (Ping timeout: 276 seconds) |
18:46:18 | FromGitter | <zacharycarter> well the values were int32s in memory on the Nim side of things |
18:46:58 | FromGitter | <zacharycarter> like an array of 4 int 32s, but the attribute for the vertex buffer was 4 float 32s and on the shader side of things, the input varying was 4 int32s |
18:47:07 | FromGitter | <zacharycarter> and on d3d11 everything worked fine - but of course on Metal things don't |
18:49:23 | * | letto joined #nim |
18:50:54 | * | narimiran joined #nim |
18:57:40 | * | njoseph joined #nim |
19:01:12 | * | clyybber joined #nim |
19:05:03 | * | solitudesf joined #nim |
19:05:43 | FromGitter | <slomp> Q: is there a way to preppend/append something to an existing environment variable in a `nim.cfg` file? ⏎ (I'm aware of `@putenv`, but that simply *replaces* the value of the environment variable) |
19:07:06 | * | nif quit (Quit: ...) |
19:07:15 | * | nif joined #nim |
19:08:14 | FromGitter | <slomp> (btw, I know I can append to an environment variable with a nim script like `config.nims`, but I'm curious about a way of achieving that with just `nim.cfg`) |
19:10:28 | * | nif quit (Client Quit) |
19:10:37 | * | nif joined #nim |
19:11:13 | Araq | slomp: I think there is no way but disruptek is adding features to nim.cfg |
19:11:24 | Araq | so maybe ask him politely about it ;-) |
19:12:10 | disruptek | i dunno how to do that; i guess maybe you can set a value with the concatenation of a previous value, right? |
19:12:32 | disruptek | string expansion? |
19:14:12 | clyybber | Or just use nims :p |
19:14:19 | FromGitter | <slomp> I tried that, but it doesn't work: ⏎ ⏎ ```@putenv "PATH" "T:/MSYS2/mingw64/bin:$PATH"``` [https://gitter.im/nim-lang/Nim?at=5ddecb0b6a85195b9eb8192f] |
19:14:33 | * | uvegbot joined #nim |
19:14:39 | disruptek | what does that produce? |
19:15:18 | FromGitter | <slomp> the above will *literally* set the `PATH` to `T:/MSYS2/mingw64/bin;%PATH%` |
19:15:36 | * | zyklon quit (Ping timeout: 246 seconds) |
19:16:08 | disruptek | wow, so it's converting the $PATH syntax but not actually evaluating it. |
19:16:38 | FromGitter | <slomp> I found out about it with the following snippet on my main nim file that got built-and-run out of that config: ⏎ ⏎ ```import os ⏎ echo getEnv("PATH")``` [https://gitter.im/nim-lang/Nim?at=5ddecb9655066245982841aa] |
19:16:47 | disruptek | will you file an issue, please? i will look into fixing it. |
19:17:35 | FromGitter | <slomp> Sure :) ⏎ Thanks for looking into it! |
19:20:35 | disruptek | it seems that the new recommendation will be to put stuff in nim.cfg if it's site-specific or variant with regard to dependency status; use config.nims if it's invariant, as package managers won't mess with that file. |
19:26:17 | Araq | er, did you try |
19:26:55 | Araq | x %= "T:/stuff;$PATH" |
19:27:03 | Araq | @putenv "PATH" x |
19:36:09 | FromGitter | <slomp> @Araq: I just tried, and got this: ⏎ ⏎ ```nim.cfg(17, 9) Error: 'on' or 'off' expected, but 'T:/MSYS2/mingw64/bin;%PATH%' found``` [https://gitter.im/nim-lang/Nim?at=5dded0288e906a1c8d2aafa7] |
19:36:28 | FromGitter | <slomp> I think `x` is some boolean variable used elsewhere by the cfg system? |
19:37:52 | Araq | instead of 'x' use foo.bar |
19:40:17 | * | njoseph quit (Ping timeout: 240 seconds) |
19:40:24 | Araq | wait a sec |
19:40:36 | Araq | there is @prependenv and @appendenv |
19:40:42 | FromGitter | <slomp> 1) foo.bar %= "T:/MSYS2/mingw64/bin;%PATH%" ⏎ 2) @putenv "PATH" foo.bar ⏎ nim.cfg(18, 28) Error: expected identifier, but got: . |
19:41:07 | clyybber | use foobar :p |
19:41:07 | Araq | @prependenv "PATH" "Z:\..." |
19:41:13 | Araq | it already exists |
19:41:19 | Araq | since forever |
19:41:25 | FromGitter | <slomp> Oh!! I swear I searched all over the place for this and couldn't find them! |
19:41:25 | Araq | undocumented of course .P |
19:41:43 | Araq | read compiler/nimconf.nim to be enlightened |
19:42:05 | FromGitter | <slomp> Yeah, the cfg system does not have much documentation, but I remember browsing the source code looking for things like that |
19:42:12 | FromGitter | <slomp> My bad, let me give it a try |
19:42:17 | shashlick_ | Araq: https://github.com/nim-lang/Nim/pull/12750 failed for an unrelated connection issue |
19:42:18 | disbot | ➥ Substitute $nimbleDir in --path flags @11genotrance |
19:42:30 | shashlick_ | can you please restart that test |
19:42:37 | Araq | shashlick_, friday is PR merge friday |
19:42:42 | disruptek | shashlick: i'm trying to figure out these tests. |
19:42:57 | shashlick_ | heeh 🙂 |
19:43:11 | disruptek | also the change to nim.cfg. |
19:44:37 | FromGitter | <slomp> @Araq, @disruptek : It worked, many thanks! ⏎ I'll file the issue and close it immediately to have it as documentation in case someone googles the same issue in the future |
19:46:33 | disruptek | good idea. |
19:46:50 | disruptek | shashlick: i think the idea of the PR is a good one. |
19:47:01 | disruptek | i just think the impl could be better. |
19:47:45 | disruptek | this will help me throw away some possibly-inaccurate and relatively complex code that nimph uses to guess nimbleDir values. |
19:50:30 | shashlick_ | thanks for the review, i'll look into it |
19:51:16 | FromGitter | <slomp> @Araq , @disruptek : done: https://github.com/nim-lang/Nim/issues/12751 |
19:51:18 | disbot | ➥ [nim.cfg] @putenv does not expand inline variables @11slomp; snippet at https://play.nim-lang.org/#ix=22ZB 😏 |
19:55:30 | shashlick_ | @disruptek - replied, ptal |
19:56:56 | shashlick_ | what's a good example of a file that has some portion of it automatically managed by a tool |
19:57:11 | shashlick_ | but the user can still hand edit outside that portion |
19:59:37 | * | nsf joined #nim |
19:59:52 | disruptek | nim.cfg. |
20:02:51 | * | uvegbot quit (Quit: Konversation terminated!) |
20:03:12 | * | uvegbot joined #nim |
20:04:02 | shashlick_ | i'll let Araq decide on searchPaths vs lazyPaths but this goes back to the original point that in this mode, there should be nothing lazy |
20:04:32 | disruptek | yes, but you're breaking the semantics for package management outside of nimble. |
20:04:42 | shashlick_ | cause there's ways to clear lazyPaths but searchPaths aren't |
20:05:11 | disruptek | then you may as well just remove lazyPaths altogether. they won't exist as a result of this change, anyway. |
20:05:16 | disruptek | they can never get populated. |
20:05:32 | disruptek | i dunno why you're trying to cripple the compiler this way. |
20:05:46 | shashlick_ | it's opt in for who needs it, nothing existing is impacted |
20:06:16 | disruptek | how do you figure? if i specify --nimblePath, it adds whatever it finds to --path, right? isn't that what you want to happen? |
20:06:53 | shashlick_ | only if that path has a $nimbleDir in it |
20:07:37 | disruptek | so you're making it even more complex. |
20:07:50 | disruptek | big 👎 from me. |
20:07:56 | shashlick_ | if it is just `--path:"$projectpath/localdeps"` , the behavior is the same as today |
20:08:28 | disruptek | well, that won't do anything, will it. |
20:08:41 | shashlick_ | it will get added to searchPaths |
20:09:09 | shashlick_ | and if you have --nimbleDir then Nim will search that path and add it to lazyPaths unless you use --noNimblePath or --clearNimblePath |
20:09:10 | disruptek | so what? i don't have anything in "localdeps" and even if i did, it could only add one path. not the contents. |
20:09:34 | * | deepend quit (*.net *.split) |
20:10:06 | disruptek | why don't you do this in nimble instead? quit breaking my compiler. |
20:10:21 | shashlick_ | debate that with Araq then - this is what he wants |
20:10:27 | disruptek | once you record --nimblePath values in the compiler, you can use that to stuff your nim.cfg with whatever you want. |
20:10:40 | disruptek | don't break my env. |
20:10:51 | shashlick_ | that's exactly what i'm doing here |
20:11:09 | disruptek | good. record them in their lil array. leave --path alone. |
20:11:26 | disruptek | it's breaking to paint --paths with your --lazy semantics. |
20:11:53 | disruptek | especially when the user has not asked you to do so. |
20:12:08 | * | njoseph joined #nim |
20:12:24 | shashlick_ | ok let Araq decide whether this is searchPaths or lazyPaths |
20:12:42 | shashlick_ | just cause you say the word nimble doesn't immediately mean lazy - this is a different mode |
20:12:49 | disruptek | i don't care who i have to argue with. |
20:13:04 | disruptek | stop trying to impose this "mode" on me. |
20:13:06 | shashlick_ | and the user is explicitly asking for this mode so |
20:13:16 | disruptek | make it something separate, then. |
20:13:19 | shashlick_ | no one is asking you to use it |
20:13:22 | disruptek | --stupidModePaths. |
20:13:41 | disruptek | i can't escape it and i cannot elide it, as now i can't determine how it has changed my configuration. |
20:14:17 | shashlick_ | why do you expect a user to use nimph and suddenly run `nimble modecfg` in the middle of it |
20:14:37 | * | krux02 joined #nim |
20:14:39 | disruptek | why should you limit what they're able to do with their toolchain? |
20:14:59 | disruptek | they can use nimph whenever they want without any configuration or state. it helps. |
20:15:18 | disruptek | the fact is, nimble isn't as good at finding and fixing configuration problems. |
20:15:45 | * | deepend joined #nim |
20:22:52 | * | solitudesf- joined #nim |
20:24:12 | * | solitudesf quit (Ping timeout: 252 seconds) |
20:26:15 | * | nsf quit (Quit: WeeChat 2.6) |
20:32:21 | * | tane joined #nim |
20:32:40 | * | bacterio quit (Read error: Connection reset by peer) |
20:34:26 | * | sleepyqtx quit (Quit: Leaving) |
20:34:50 | * | LargeEpsilon joined #nim |
20:39:23 | * | LargeEpsilon quit (Ping timeout: 265 seconds) |
20:41:04 | * | jwm224 quit (Ping timeout: 252 seconds) |
20:42:56 | * | jwm224 joined #nim |
20:49:28 | Zevv | how does one find relevant info in azure CI output |
20:50:29 | narimiran | Zevv: https://dev.azure.com/nim-lang/Nim/_build/results?buildId=877&view=ms.vss-test-web.build-test-results-tab ? |
20:52:49 | Zevv | how do i get there from github test results? |
20:53:19 | Zevv | I always end up in 3klines verbatim output |
20:53:34 | clyybber | We don't have when expressions..? |
20:53:37 | narimiran | starting from https://github.com/nim-lang/Nim/pull/12742, you click on "Details", which takes you to https://dev.azure.com/nim-lang/Nim/_build/results?buildId=877, there you click "Tests" |
20:53:39 | disbot | ➥ Refactoring of VM register sizes to allow for bigger programs running in the VM @11zevv |
20:54:39 | Zevv | narimiran: with you |
20:55:08 | clyybber | Araq: Any reason we don't have when expressions and any obligations to adding them? |
20:55:40 | Zevv | narimiran: thanks, I missed the little tiny 'tests' tab that does not look like a tab |
20:56:09 | narimiran | yeah, UI/UX is not the friendliest.... |
20:56:29 | Zevv | hmm funny fail, not sure if I even caused hat. |
20:56:55 | FromGitter | <slomp> Out of curiosity: shouldn't the following work in a `nim.cfg` file? ⏎ `foo.bar %= gcc.path` ⏎ I get the following: ⏎ `Error: expected identifier, but got: .` ⏎ This is coming from `checkSymbol` in `nimconf.nim`. ... [https://gitter.im/nim-lang/Nim?at=5ddee3166a85195b9eb8d14e] |
21:00:52 | clyybber | oh wait, we actually do have when expressions.. |
21:04:08 | * | ltriant joined #nim |
21:07:23 | * | tane quit (Quit: Leaving) |
21:11:08 | * | nif quit (Quit: ...) |
21:11:18 | * | nif joined #nim |
21:14:12 | * | narimiran quit (Ping timeout: 268 seconds) |
21:15:08 | clyybber | this week really was harsh wrt issues. Now at 30 newly opened issues.. |
21:15:26 | disruptek | how many closed? |
21:15:45 | clyybber | 6 |
21:27:15 | clyybber | 31 now.. |
21:28:34 | rockcavera | how to make Nim code similar to this C code: int *a = malloc(sizeof(int) * 100)? |
21:29:46 | clyybber | a: ptr int = c_malloc(sizeof(int) * 100) |
21:32:14 | Araq | var a = cast[ptr UncheckedArray[cint]](c_malloc(sizeof(cint) * 100) |
21:32:26 | Araq | or you use a 'seq' and learn Nim |
21:32:56 | clyybber | ah right, lol totally missed that it should be an array |
21:33:23 | rockcavera | thanks |
21:34:40 | rockcavera | I actually used seq in my Nim code from a C code transcript |
21:38:06 | Araq | clyybber, trial deletion requires =trace as well as =rawDestroy or something like that |
21:38:16 | Araq | so it's 2 more procs, not just one |
21:38:59 | clyybber | Why? Do you want the =destroy to invoke trace or what? |
21:42:17 | jxy | can somebody confirm issue #12753 for me? am I using template wrong? |
21:42:19 | disbot | https://github.com/nim-lang/Nim/issues/12753 -- 3template generates wrong code @11jxy; snippet at 12https://play.nim-lang.org/#ix=230j 😏 |
21:42:34 | clyybber | jxy: Nope looks like a bug to me |
21:45:24 | clyybber | Araq: ping |
21:46:49 | jxy | the playground is nice, it looks like it started to give wrong results since 0.18.0 |
21:47:28 | jxy | and 0.17.2 is correct |
21:47:53 | clyybber | hmm |
21:48:10 | clyybber | jxy: Can you git bisect? |
21:48:36 | Araq | clyybber, after tracing we need to dealloc individual objects |
21:49:05 | nixfreak | |
21:49:24 | clyybber | Araq: You mean without recursively destroying the refs they point to? |
21:56:05 | jxy | clyybber: maybe next week |
22:01:09 | Araq | clyybber, exactly |
22:02:55 | * | uu91 quit (Ping timeout: 268 seconds) |
22:05:10 | clyybber | Araq: Hmm, yeah I see no way around it. |
22:08:57 | * | nixfreak quit (Ping timeout: 240 seconds) |
22:10:30 | * | nif quit (Quit: ...) |
22:10:44 | * | nif joined #nim |
22:14:01 | Araq | me neither but since 'ref' is builtin, maybe we don't have to expose its machinery for the time being |
22:14:17 | clyybber | Araq: Does a template that is an expression have to have a return type? |
22:14:37 | Araq | yeah but 'untyped' works |
22:14:55 | clyybber | Araq: Ah, right. I was confused because I flipped it with typed |
22:17:52 | clyybber | That naming really doesn't make any sense does it? |
22:18:43 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
22:24:29 | Araq | oh I know! |
22:24:37 | * | solitudesf- quit (Ping timeout: 240 seconds) |
22:24:42 | Araq | we need annotated sections in the =hooks |
22:25:34 | Araq | then we have 'trace: for ...' and 'destroy:' sections within =destroy and we can also optimize =sink further by explicitly marking the "destroy previous value" snippet inside it |
22:26:00 | Araq | no new hooks required, but some template magic... |
22:29:15 | sealmove | how to construct a Type node in macros? |
22:30:02 | clyybber | Araq: Hmm, interesting idea |
22:30:07 | * | Calinou left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.") |
22:30:26 | sealmove | there is no `newTypeNode` proc or something |
22:31:12 | * | uu91 joined #nim |
22:31:26 | sealmove | i mean, when constructing a var declaration (without assignment), can you only give the type as a string? or is there a way to construct the type node directly? |
22:31:34 | sealmove | nnkIdentDefs.newTree( |
22:31:37 | sealmove | ident(a.id), |
22:31:40 | sealmove | ident(datatype), |
22:31:41 | sealmove | newEmptyNode() |
22:31:43 | sealmove | ) |
22:31:46 | sealmove | instead of `ident(datatype)` |
22:32:06 | Araq | bindSym"int" |
22:32:29 | Araq | but don't go too far, the compiler must still semcheck your constructed type properly |
22:32:56 | Araq | in other words, treating types as any other AST for construction is fine |
22:33:03 | Araq | *like any |
22:33:41 | sealmove | ok, that's what I was wondering, thanks! |
22:43:33 | * | Ven`` joined #nim |
22:44:55 | sealmove | nimitai already works for some simple .ksy files :)))) |
22:50:18 | * | nif quit (Quit: ...) |
22:50:28 | * | nif joined #nim |
22:51:57 | sealmove | I will add a hello_world.ksy example which should work! |
22:54:17 | FromDiscord_ | <trey.merkley> Is there a way to change the styles in nimx? |
22:55:10 | shashlick_ | @disruptek you are suggesting a separate iterator and proc |
22:55:28 | shashlick_ | What would get called where |
22:55:56 | disruptek | what we can change to an iterator, we will. |
22:56:16 | disruptek | the proc doesn't need to change. |
22:56:24 | disruptek | (though it should) |
22:59:10 | sealmove | there you go: https://github.com/sealmove/nimitai |
23:01:33 | shashlick_ | @disruptek - doesn't nimble just have 1 nimbleDir |
23:01:43 | shashlick_ | it's Nim that looks in instances |
23:01:55 | shashlick_ | i somehow feel just replacing $nimbleDir with the last one makes most sense |
23:02:29 | disruptek | nope, --nimblePath explodes a bunch of directories to --lazyPaths any time you invoke it. |
23:03:06 | disruptek | i use multiple nimblePaths to have separate distributions; eg. so i can have different projects share the same closeted trees. |
23:04:01 | disruptek | as another example, it lets you always link to the compiler library that matches the compiler, by issuing a `nimble develop` in your Nim tree. |
23:04:25 | disruptek | because, as you recall, you can only follow .nimble-link files via --nimblePath statements. |
23:04:31 | FromDiscord_ | <mratsim> @zacharycarter regarding your splitting of int32 into 2xint16, just use an union type, example on splitting uint16 into uint8: https://github.com/mratsim/chirp8/blob/master/src/cpu.nim#L9-L23 |
23:08:00 | shashlick_ | what do you mean by separate distributions |
23:08:19 | shashlick_ | do you do --nimblePath=1 --nimblePath=2 |
23:08:23 | disruptek | yeah. |
23:09:14 | shashlick_ | the problem with pathSubs is that everything that calls it - and it goes deep into the compiler code - expects only 1 path |
23:09:32 | disruptek | you don't have to break pathSubs. just add something better. |
23:09:55 | shashlick_ | ya but it still would mean that other callers of pathSubs won't handle nimbleDir correctly, or at all |
23:10:20 | disruptek | yes, it's not ideal. but you can handle it inside of pathSubs if you want. |
23:10:20 | shashlick_ | part of the problem is the limitations with the % operator itself |
23:10:35 | disruptek | hey man, no one said you had to modify the compiler. |
23:10:56 | shashlick_ | how can you return 1 path when there can be n nimblePaths to substitute |
23:11:12 | disruptek | like i said, i think it's a good change that's helpful. |
23:11:18 | disruptek | you return the best one. |
23:11:45 | disruptek | i actually count the uses of the path and return the most populous one. |
23:12:37 | disruptek | this would free me up from having to compute popularity in order to identify --nimblePaths, since i'd have a record of them. then i can count their use more accurately, if i want. |
23:13:14 | shashlick_ | what is the best one - I proposed checking if the dirExists but Araq said weirdos like me can create it at compile time |
23:13:30 | shashlick_ | it might not even be there |
23:13:40 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:13:48 | disruptek | directories that don't exist don't seem like ideal candidates, so i select them last. |
23:13:54 | shashlick_ | so i'm thinking perhaps the last nimbleDir added to the list (first in storage order) will be most relevant |
23:14:04 | * | clyybber quit (Quit: WeeChat 2.6) |
23:14:12 | disruptek | honestly, i think $nimbleDir/ just doesn't even make sense. why are you adding it? |
23:14:44 | shashlick_ | so that instead of a full path in nim.cfg which is host specific, you can say $nimbleDir/pkg-1.0.0 |
23:14:54 | * | Ven`` joined #nim |
23:15:01 | disruptek | the last will work well with package managers, as they are more likely to append to the file versus prepending. |
23:15:16 | disruptek | but as you've shown, the semantics of that are ambiguous at best. |
23:15:23 | disruptek | why do you want ambiguous semantics? |
23:15:33 | * | Ven`` quit (Client Quit) |
23:16:04 | shashlick_ | what is ambiguous? |
23:16:16 | disruptek | it's pointless anyway. that path is already picked up by --nimblePath=/some/nimbleDir. i don't even add paths if they are already expressed. |
23:16:55 | disruptek | i only add --path for packages that need it because they have silly structures mandated by Nimble, like src/nimph/src/nimph/src. |
23:17:11 | disruptek | or whatever the hell it works out to. like i said, silly. |
23:17:53 | disruptek | it's ambiguous because you're trying to guess a single path from an array of paths. makes no sense. |
23:18:03 | disruptek | that's why you're having so much trouble. |
23:18:52 | shashlick_ | again, the point is to not search nimbleDir - it is to point to a specific version of a package |
23:19:13 | disruptek | then why are you using --nimblePath? just specify the path with --path. |
23:20:00 | disruptek | --nimblePath is a shortcut to "add all the packages within"; it's like asking the compiler to just loop over the directories and follow them. it's also essential for following .nimble-link files. |
23:20:28 | disruptek | it's handy because it lets you quickly develop without having to stop to adjust requirements and nim.cfg files each time you twiddle a dependency. |
23:21:29 | disruptek | it's basically letting you refer to entire trees of dependencies symbolically. nice. |
23:21:44 | shashlick_ | nimble already does all that and gives me a list of specific paths - all we are doing is putting it in nim.cfg and fixing it so that the compiler again doesn't search for anything |
23:21:53 | disruptek | well, stop. |
23:22:08 | disruptek | just put them in as --path if that's what you want, and keep using --noNimblePath. |
23:22:21 | disruptek | you're breaking functionality that's very handy and powerful. |
23:23:00 | disruptek | the compiler already does what we both want today. 🙄 |
23:23:28 | shashlick_ | Araq wouldn't ask for this if it was already there |
23:23:44 | shashlick_ | and adding a different way doesn't break any existing code path |
23:23:51 | disruptek | let Araq speak for himself. |
23:24:12 | disruptek | it's breaking my code path, and that of any user of my software. |
23:24:48 | disruptek | i can't believe i have to explain to you how to use Nimble, but here we are. |
23:35:48 | * | Ven`` joined #nim |
23:36:34 | shashlick_ | ya and I cannot believe that you are going on about legacy behavior, which i am not even touching |
23:37:04 | disruptek | well, it's not my fault that you guys never took advantage of it. |
23:38:18 | disruptek | why do you want to add a different way? can you explain that? |
23:38:28 | disruptek | because i cannot. |
23:40:03 | shashlick_ | never mind then |
23:45:54 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:49:12 | xace | does the nim iterators for walkDir or w/e follow symbolic links to directories? my goal is to recursively find all files, subfolders and symbolic links included |
23:49:35 | disruptek | they yield a component value which indicates the kind of link, be it real or symbolic. |
23:50:15 | xace | disruptek: yes, but would it step into them? |
23:50:26 | FromDiscord_ | <yewpad> i think you have to do that manually |
23:50:42 | disruptek | recursion is up to you. |
23:50:47 | * | clyybber joined #nim |
23:50:57 | xace | seems like there is a followfilter `pclinktodir` |
23:51:43 | disruptek | oh, oswalkdir. |
23:52:13 | disruptek | you can specify the values to follow. |
23:52:32 | disruptek | filter = {pcLinkToDir, pcDir} |
23:52:46 | disruptek | https://nim-lang.org/docs/oswalkdir.html |
23:53:12 | * | lritter quit (Ping timeout: 252 seconds) |
23:53:43 | clyybber | Am I crazy or is `set1 < set2 or set1 > set2` not equivalent to `set1 != set2` |
23:53:47 | xace | https://nim-lang.org/docs/os.html#walkDirRec.i,string # i was going to use this... i find it really difficult to browse nim documentaiton some times |
23:54:14 | clyybber | Ugh, nevermind |