00:09:29 | * | krux02_ quit (Remote host closed the connection) |
00:11:45 | rayman22201 | Each is a separate implementation, but it is at the data structure level, not the procedure level. So, "owninghashSet", "nonOwningHashSet", "copyingHashSet". |
00:12:56 | rayman22201 | I would not have a heterogeneous data structure. You could, but I think it be very messy. |
00:27:48 | FromDiscord | <exelotl> is it possible to define a custom type conversion? |
00:29:01 | shashlick | Converters? |
00:29:57 | FromDiscord | <exelotl> well, I don't want implicit conversion. e.g. I have `type Fixed* = distinct uint32` and I would like to be able to do `myFixed.int` to discard the fractional part and and get an integer |
00:30:16 | FromDiscord | <exelotl> right now I have to do `myFixed.toInt()` |
00:31:24 | FromDiscord | <exelotl> it's not too bad I guess |
00:46:13 | FromDiscord | <Avatarfighter> Hello, would anyone be able to help me troubleshoot compiling nim on raspbian by any chance? |
00:47:25 | * | I_Right_I joined #nim |
00:48:41 | FromDiscord | <Avatarfighter> Currently I'm able to compile nim all the way up to the step that requires you to do `./koch tools` which is found on https://nim-lang.org/install_unix.html it throws an error that says `execution of an external program failed: 'gcc -c -w -pthread -O3 -fno-strict-aliasing -I/home/pi/nim│ -0.19.4/lib -o /root/.cache/nim/nimsuggest_r/linenoise.c.o /home/pi/nim-0.19.4/lib/wrappers/linenoise/linenoise.c`. In reality I'm just wondering |
00:50:37 | * | rnrwashere joined #nim |
00:55:23 | FromGitter | <kaushalmodi> shashlick: yess! I confirm the fix. Many thanks! |
00:55:58 | FromGitter | <kaushalmodi> that bug was disallowing me from setting `nimterop#head` in my nimterop wrapper dependencies in the .nimble :) |
00:58:47 | * | luis_ quit (Ping timeout: 240 seconds) |
01:12:30 | * | noeontheend quit (Ping timeout: 264 seconds) |
01:12:54 | * | rnrwashere quit (Remote host closed the connection) |
01:19:28 | * | rnrwashere joined #nim |
01:46:55 | shashlick | Well there is no version yet so everything is head |
01:47:24 | shashlick | Problem with head is that nimble assumes it is up to date even if months old |
01:48:32 | * | rnrwashere quit (Remote host closed the connection) |
01:48:54 | * | rnrwashere joined #nim |
02:00:02 | * | theelous3__ quit (Ping timeout: 245 seconds) |
02:06:47 | * | banc quit (Quit: Bye) |
02:18:34 | * | rnrwashere quit (Remote host closed the connection) |
02:26:42 | * | lritter quit (Ping timeout: 268 seconds) |
02:28:07 | * | banc joined #nim |
02:33:02 | * | noeontheend joined #nim |
02:38:20 | * | vlad1777d joined #nim |
03:23:00 | * | dddddd quit (Remote host closed the connection) |
03:48:06 | FromDiscord | <Avatarfighter> Is there a way to have koch use a different compiler than gcc? |
03:48:38 | shashlick | configure it in nim.cfg |
03:52:52 | FromDiscord | <Avatarfighter> Thank you 😃 |
03:53:12 | FromDiscord | <Avatarfighter> I think that might've fixed my issue fingers crossed |
04:03:12 | * | neceve quit (Read error: Connection reset by peer) |
04:04:53 | shashlick | awesome |
04:05:19 | FromDiscord | <Avatarfighter> yes it did 😄 |
04:05:39 | FromDiscord | <Avatarfighter> Alrighty note to self: clang is needed to compile nim 0.19.4 on raspbian |
04:06:30 | * | noeontheend quit (Ping timeout: 264 seconds) |
04:12:21 | FromDiscord | <Avatarfighter> Alrighty so clang fixes most of my issues except `./koch tools` can't compile one of the things more debugging 😄 |
04:17:35 | FromDiscord | <Avatarfighter> Seems that nimble is failing to build, at least that's farther than I've gotten lul |
04:45:47 | * | uvegbot quit (Ping timeout: 240 seconds) |
04:47:29 | * | rnrwashere joined #nim |
04:49:07 | * | uvegbot joined #nim |
05:03:40 | * | kapil____ joined #nim |
05:09:29 | * | solitudesf joined #nim |
05:11:46 | * | Avatarfighter joined #nim |
05:23:09 | * | narimiran joined #nim |
05:42:40 | * | uvegbot quit (Ping timeout: 264 seconds) |
05:48:36 | * | Manny8888 joined #nim |
05:51:34 | * | I_Right_I quit (Remote host closed the connection) |
05:53:00 | * | rnrwashere quit (Remote host closed the connection) |
06:14:09 | * | solitudesf quit (Ping timeout: 250 seconds) |
06:14:19 | * | mr_yogurt left #nim ("Leaving") |
06:18:16 | * | uvegbot joined #nim |
06:23:15 | * | onionhammer1 quit (Read error: No route to host) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:32 | * | gmpreussner joined #nim |
07:05:14 | * | ricekrispie2 joined #nim |
07:07:22 | * | ricekrispie quit (Ping timeout: 268 seconds) |
07:24:07 | * | Vladar joined #nim |
07:47:37 | * | dddddd joined #nim |
07:59:29 | * | clyybber joined #nim |
08:15:26 | * | Trustable joined #nim |
08:31:12 | * | Perkol joined #nim |
08:45:00 | Perkol | How can I use client functionality of this https://github.com/enthus1ast/nimSocks with httpclient? |
08:50:57 | * | ricekrispie2 left #nim ("Leaving") |
08:56:41 | * | uvegbot quit (Ping timeout: 250 seconds) |
09:00:26 | * | stefanos82 joined #nim |
09:06:36 | * | tefter joined #nim |
09:20:55 | FromGitter | <mratsim> @narimiran, wasn't there a FFI label? |
09:26:35 | FromGitter | <mratsim> Happy that this is finally fixed: Yeah this is fixed: https://github.com/nim-lang/Nim/issues/7632 |
09:28:21 | * | Gertm joined #nim |
09:47:54 | * | enthus1ast quit (Read error: Connection reset by peer) |
09:49:10 | * | vlad1777d quit (Ping timeout: 252 seconds) |
09:50:13 | * | narimiran quit (Ping timeout: 246 seconds) |
10:06:48 | * | salewski joined #nim |
10:08:48 | * | dddddd quit (Remote host closed the connection) |
10:08:50 | FromGitter | <liquid600pgm> shashlick: nimterop fails to install on 0.19.9 for some reason https://termbin.com/1ycd |
10:11:11 | salewski | Do we have something like std::equal to compare seq1[a .. b] with seq2[a .. b] direct, without copying parts of both seq? |
10:11:16 | salewski | See http://www.cplusplus.com/reference/algorithm/equal/ |
10:11:23 | * | nsf joined #nim |
10:13:15 | * | ng0 joined #nim |
10:13:51 | salewski | I assume seq1 == seq2[0 .. seq1.high] will create a copy of seq2. But OK, I can use that for now. |
10:17:30 | * | jjido joined #nim |
10:19:05 | * | salewski quit (Quit: WeeChat 2.3) |
10:21:50 | clyybber | Zevv Is npeg a good fit for a parser? |
10:21:55 | clyybber | Also can it handle streams? |
10:42:18 | * | Perkol quit (Remote host closed the connection) |
10:47:53 | Zevv | I tried streams, but there were complications with performance and captures. For now it is strings only. |
10:48:34 | Zevv | I have ideas to get streaming back in, its next on my list. |
10:49:14 | Zevv | I also experimented with parsing mmap()ed files (memFile, in Nim), but that degraded my type safety so I droppde that for now |
10:49:58 | Zevv | for the first question: parsing is what it does. If you have a spec or some examples I'm happy to get you started |
10:57:03 | * | vlad1777d joined #nim |
11:09:10 | clyybber | I'm in the process of getting the complete EBNF done. |
11:09:37 | clyybber | A PEG accepts all context-free languages right? |
11:10:32 | Zevv | it breaks on left recursion, though |
11:11:24 | Zevv | usually you can rewrite to get rid of that, although the result is not always as readable or intuitive as the left recursive grammar |
11:13:06 | Zevv | There is also Nimly, which might suit you as well: https://github.com/loloiccl/nimly |
11:17:54 | * | vlad1777d quit (Ping timeout: 250 seconds) |
11:19:08 | clyybber | ok, thanks I will check both out. I think I don't need left recursion. |
11:19:29 | clyybber | I have to go my people need me :) |
11:19:31 | * | clyybber quit (Quit: WeeChat 2.4) |
11:45:02 | * | oculux quit (Ping timeout: 252 seconds) |
11:50:20 | FromGitter | <liquid600pgm> is there any way to create destructors for `ref object`s? |
11:50:43 | FromGitter | <liquid600pgm> basically, some proc that will execute when the GC frees the object |
11:52:42 | FromGitter | <liquid600pgm> I guess using `new` is my only option? |
11:53:36 | FromGitter | <liquid600pgm> I heard something about `\`destroy=\`` but I can't get it to work |
12:05:36 | FromGitter | <liquid600pgm> I need this for interfacing with C |
12:12:51 | * | oculux joined #nim |
12:25:33 | FromGitter | <kayabaNerve> There's no way to disable the XDeclaredButNotUsed hint for a function, and everything in it, but still get notifications for its raises pragma, right? |
12:26:21 | FromGitter | <kayabaNerve> You have to use that pragma as a block; it can't be added to as a function pragma. I was hoping if I did that, the raises pragma wouldn't be caught by it. |
12:26:38 | FromGitter | <kayabaNerve> So that means the raises pragma is in the XDeclaredButNotUsed block :/ |
12:27:02 | FromGitter | <kayabaNerve> Not asking for confirmation really, but if there's a workaround. |
12:39:55 | * | theelous3__ joined #nim |
12:42:34 | shashlick | @liquid600pgm ya, some issues with strformat, hoping krux02 fixes it |
12:43:32 | Zevv | liquid600pgm: destructors is work in progress afaik; araq has been chewing on that for some time |
12:43:58 | Zevv | i believe destroy= only works for stack, not for heap |
12:45:47 | * | Snircle joined #nim |
12:46:53 | * | lritter joined #nim |
12:51:57 | * | neceve joined #nim |
12:53:45 | shashlick | Is this what you are seeing https://travis-ci.org/nimterop/nimterop/jobs/516294339 - @liquid600pgm |
12:54:32 | FromGitter | <liquid600pgm> no, I sent you the stack trace |
12:55:05 | FromGitter | <liquid600pgm> it's an error in the regex library, somewhere in parseutils |
12:55:12 | FromGitter | <liquid600pgm> so it might not be related to nimterop at all |
13:14:44 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:18:43 | * | a_chou joined #nim |
13:26:03 | * | montezad joined #nim |
13:29:21 | * | montezad left #nim (#nim) |
13:31:38 | * | onionhammer joined #nim |
13:41:54 | * | a_chou quit (Ping timeout: 264 seconds) |
13:43:17 | * | uvegbot joined #nim |
13:43:36 | * | sealmove joined #nim |
13:46:16 | federico3 | https://news.ycombinator.com/item?id=19582922 mentions of Nim |
13:47:14 | * | jjido quit (Quit: Connection closed for inactivity) |
13:48:07 | * | cgfuh joined #nim |
13:50:33 | * | a_chou joined #nim |
13:53:20 | * | a_chou quit (Client Quit) |
13:59:52 | * | mosORadi joined #nim |
14:03:50 | * | noeontheend joined #nim |
14:13:48 | * | sealmove quit (Quit: WeeChat 2.4) |
14:22:02 | * | noeontheend quit (Remote host closed the connection) |
14:23:36 | * | theelous3__ quit (Ping timeout: 259 seconds) |
14:23:58 | * | tefter quit (Remote host closed the connection) |
14:28:50 | leorize | Zevv, liquid600pgm: see this https://github.com/nim-lang/Nim/blob/devel/tests/destructor/turn_destroy_into_finalizer.nim for ref object destructor |
14:29:38 | FromGitter | <liquid600pgm> yeah, that's what I used in the end, it seems to be working fine |
14:34:14 | * | dddddd joined #nim |
14:42:41 | Zevv | heu since when is that supposed to work? |
14:55:24 | * | rockcavera quit (Remote host closed the connection) |
14:57:07 | shashlick | @liquid600pgm are you on latest devel? |
14:57:23 | FromGitter | <kaushalmodi> @liquid600pgm `nimble install nimterop#@head` worked for me yesterday |
14:57:43 | FromGitter | <kaushalmodi> I'm on devel too (probably 4 days old devel) |
14:58:08 | FromGitter | <kaushalmodi> Well, not "4 days old", but I last built from devel 4 days back |
14:59:00 | FromGitter | <kaushalmodi> Typo: `nimble install nimterop@#head` |
14:59:58 | shashlick | Nope it is still broken on latest head |
15:00:01 | shashlick | https://travis-ci.org/nimterop/nimterop/jobs/516416914 |
15:01:02 | shashlick | Basically this issue https://github.com/nim-lang/Nim/issues/10970#issuecomment-480510934 |
15:02:27 | * | cgfuh quit (Ping timeout: 240 seconds) |
15:04:23 | * | banc quit (Quit: Bye) |
15:06:10 | * | noeontheend joined #nim |
15:08:46 | * | Minimisthupper joined #nim |
15:09:24 | * | Minimisthupper quit (Client Quit) |
15:16:05 | Zevv | what's the easiest way to get a nimble package in CI, travis or azure or whatever? Idealy i'd like to test with both Nim latest stable and latest devel |
15:18:18 | * | Minimisthupper joined #nim |
15:25:18 | shashlick | Just use an existing yml file |
15:25:35 | shashlick | Nimterop has both Travis and appveyor testing |
15:25:50 | shashlick | Windows Linux osx across stable and devel |
15:25:55 | FromGitter | <liquid600pgm> shashlick: yes, I'm on the latest devel |
15:26:32 | shashlick | Ya it's been reported, hopefully fixed soon |
15:31:55 | Araq | shashlick, I think Nimble misuses the compiler API |
15:42:12 | * | Minimisthupper quit (Quit: Konversation terminated!) |
15:42:51 | * | krux02 joined #nim |
15:44:03 | * | stefantalpalaru joined #nim |
15:44:39 | * | clyybber joined #nim |
15:45:44 | * | Minimisthupper joined #nim |
15:46:30 | stefantalpalaru | Is it safe to assume that the C backend does not support versions older than C99? I see some unconditional definitions for 64-bit integers that were introduced in that standard: https://nim-lang.org/docs/system.html#culonglong |
15:48:39 | * | Minimisthupper quit (Client Quit) |
15:48:43 | leorize | I believe so, as Haiku's gcc 2 compiler can't process Nim generated code |
15:53:27 | clyybber | kayabaNerve: Just use {.used.} |
15:54:45 | * | Avatarfighter quit (Ping timeout: 256 seconds) |
15:55:09 | * | nif quit (Quit: ...) |
15:55:28 | * | nif joined #nim |
15:55:54 | * | nif quit (Client Quit) |
15:56:09 | * | nif joined #nim |
15:57:18 | * | nif quit (Client Quit) |
15:57:33 | * | nif joined #nim |
15:58:52 | * | nif quit (Client Quit) |
15:59:23 | * | nif joined #nim |
16:00:32 | Calinou | is there a built-in Nimble command to build and run automatically? |
16:00:49 | Calinou | if not, I guess I can just write a task :) |
16:07:00 | shashlick | Nimble build |
16:09:32 | * | mosORadi quit (Quit: Connection closed for inactivity) |
16:10:32 | * | krux02 quit (Remote host closed the connection) |
16:12:39 | Calinou | it only builds the package, it doesn't run the compiled program |
16:13:03 | Calinou | I wrote a task anyway, but it's not portable as it depends on the OS-specific binary name |
16:13:14 | Calinou | (could be fixed with `when`, maybe) |
16:14:56 | shashlick | There's exeext or something |
16:15:27 | Calinou | I know Windows allows you to omit the .exe extension, but I don't think it's going to work due to the binary name being prefixed with "./" |
16:15:31 | Calinou | (as . is not part of the PATH on Linux/macOS) |
16:19:10 | shashlick | https://nim-lang.org/0.19.0/ospaths.html#ExeExt |
16:25:50 | Calinou | how do I fetch the number of CPU threads on the system from Nim? |
16:26:15 | Calinou | (my DuckDuckGoing is failing here :P) |
16:26:28 | FromGitter | <liquid600pgm> Calinou: https://nim-lang.org/docs/cpuinfo.html |
16:26:45 | Calinou | thanks :) |
16:26:50 | FromDiscord | <Avatarfighter> Just a question, has anyone had any luck compiling `koch tools` on raspbian? |
16:27:19 | FromGitter | <liquid600pgm> Avatarfigher: I compiled it successfully, what's your issue? |
16:28:24 | FromDiscord | <Avatarfighter> One of my major issues atm is that gcc isn't able to compile 0.19.4 on raspbian and when I switch to clang it fails building nimble with the error of `Error: execution of an external program failed: 'clang -c -w -O3 -I/home/pi/nim-0.19.4/lib -o /root/.cache/nim/nimble_r/linenoise.c.o /home/pi/nim-0.19.4/lib/wrappers/linenoise/linenoise.c` |
16:28:45 | * | cgfuh joined #nim |
16:29:02 | FromGitter | <liquid600pgm> strange, for me the process went pretty smoothly without any major issues |
16:29:05 | FromGitter | <liquid600pgm> just plug and play |
16:29:09 | FromDiscord | <Avatarfighter> rip |
16:29:32 | FromDiscord | <Avatarfighter> this is my third time flashing raspbian hoping that it'll magically fix itself lmao |
16:30:16 | disruptek | Avatarfighter: try clang for nim and gcc for nimble. |
16:31:00 | FromDiscord | <Avatarfighter> alrighty will do, fingers crossed this works lol |
16:35:03 | BaldEagleX02 | I deleted ##nim-iot since it was useless and inactive |
16:35:17 | * | BaldEagleX02 left #nim ("Textual IRC Client: www.textualapp.com") |
16:38:09 | * | Jesin quit (Quit: Leaving) |
16:41:34 | * | Jesin joined #nim |
16:41:54 | * | stefantalpalaru quit (Quit: stefantalpalaru) |
16:56:21 | FromGitter | <liquid600pgm> is it possible to capture variables from outside of {.cdecl.} anonymous procs? |
16:56:41 | FromGitter | <liquid600pgm> without using globals, that is |
17:03:52 | Calinou | so there it is, https://github.com/Calinou/godot-size-benchmarks |
17:04:04 | Calinou | I decided to write the benchmark runner in Nim because I was fed up with arrays in Bash :P |
17:08:16 | Araq | liquid600pgm: that can't work |
17:10:23 | * | rnrwashere joined #nim |
17:10:43 | * | solitudesf joined #nim |
17:11:52 | FromDiscord | <Avatarfighter> Yeah still no luck, gcc also fails to build nimble |
17:15:50 | * | anamok joined #nim |
17:15:53 | anamok | hello |
17:16:31 | FromDiscord | <Avatarfighter> Hello 😄 |
17:17:01 | anamok | I have a question about the future of Nim. Is it planned to remove the garbage collector and switch to a memory model similar to Rust? |
17:18:28 | Araq | yes but it's in the early phase and Nim v1 will ship with the GCs |
17:19:54 | anamok | But for me the GC is a huge advantage. I come from Python, I love that Nim is so similar to Python. I don't want to fight with manual memory management. I'm sure I'm not alone with this. |
17:20:41 | Araq | this has been discussed to death and you won't "fight manual memory management" moreso than people are fighting the GCs now |
17:21:12 | Araq | but we'll see if it works out. As I said, when was the last time we made Nim worse? :P |
17:21:58 | FromDiscord | <Avatarfighter> im so hyped to successfully compile nim on raspbian rn, I've been at this for like a week now 😄 |
17:22:06 | * | I_Right_I joined #nim |
17:23:07 | * | vlad1777d joined #nim |
17:23:08 | Araq | Avatarfighter: try the -d:leanCompiler switch |
17:23:15 | Araq | then it should take less RAM |
17:24:18 | FromDiscord | <Avatarfighter> Will do 😃 I'm really close, I've just had issues with compiling nimble due to something called `linenoise.c` |
17:24:35 | FromDiscord | <Avatarfighter> Nothing a bit of fiddling can't fix haha |
17:24:45 | Araq | anamok, if the model works out, it's still not "Rust like", Rust models the heap with a stack-like mechanism and we don't. We model the heap as a heap. It's different enough that we need to try it out. |
17:25:59 | federico3 | Avatarfighter: why, what was the issue? |
17:26:03 | Araq | The differences between Rust and Nim will still be bigger than between Python and Ruby. |
17:26:24 | leorize | Avatarfighter: the stdlib bundles a version of linenoise with it. That might not be compatible with ARM (just a guess) :p |
17:33:15 | * | mosORadi joined #nim |
17:34:31 | I_Right_I | yeah considering Rust code is harder to read than 'C' |
17:36:56 | anamok | I tried Rust but gave up because of its memory model. I love Nim and I hope it won't get too complicated. |
17:40:12 | * | rnrwashere quit (Remote host closed the connection) |
17:41:09 | FromDiscord | <Avatarfighter> leorize: that's probably the issue lol but I have high hopes 😄 |
17:43:00 | leorize | actually you can just put your error output here and everyone can help with that :p |
17:43:26 | FromDiscord | <Avatarfighter> I'm awaiting the error atm, I'm compiling fresh rn |
17:44:22 | * | nsf quit (Quit: WeeChat 2.4) |
17:44:38 | FromDiscord | <Avatarfighter> the last error I got was `Error: execution of an external program failed: 'clang -c -w -O3 -I/home/pi/nim-0.19.4/lib -o /root/.cache/nim/nimble_r/linenoise.c.o /home/pi/nim-0.19.4/lib/wrappers/linenoise/linenoise.c`, I believe the error should be more verbose now so hopefully i'll be able to provide more details |
17:48:06 | * | rnrwashere joined #nim |
17:50:55 | * | rnrwashere quit (Remote host closed the connection) |
17:51:31 | * | rnrwashere joined #nim |
17:51:39 | leorize | try executing that command in terminal |
17:53:06 | FromDiscord | <Avatarfighter> Will do 😃 |
17:53:26 | FromDiscord | <Avatarfighter> I actually got a different error this time, but I'll see what the output of this one is lol |
17:54:28 | FromDiscord | <Avatarfighter> Alright so I get the error `Error: execution of an external program failed: 'gcc -c -w -O3 -fno-strict-aliasing -I/home/pi/Nim/lib -o /home/pi/Nim/nimcache/r_linux_arm/stdlib_system.c.o /home/pi/Nim/nimcache/r_linux_arm/stdlib_system.c'` except when I run it manually in terminal it successfully runs |
17:55:23 | leorize | nice, execution failing for no apparant reason |
17:55:29 | FromDiscord | <Avatarfighter> yeah |
17:55:41 | FromDiscord | <Avatarfighter> This is the story of my life rn |
17:55:57 | I_Right_I | anamok: I can see the merits of the memory model, I don't mind it(but I probably use unsafe way to much). But I can also see why so many people hate it. It sometimes feels like your jumping though loops to get things done. |
17:56:26 | leorize | Avatarfighter: hmm there are countless reason for why execution fail... |
17:56:34 | leorize | try looking at dmesg | tail |
17:58:09 | FromDiscord | <Avatarfighter> I don't see anything specifically related to gcc, I do have something about urandom getting ratelimited, but other than that there isn't much |
17:58:35 | * | noeontheend quit (Remote host closed the connection) |
18:00:28 | * | noeontheend joined #nim |
18:00:59 | leorize | you are compiling nimble, right? |
18:01:00 | FromDiscord | <Avatarfighter> This is really, weird. I'm going to take a break and fiddle with it some more later, thanks for your help guys! |
18:01:13 | leorize | try passing --genScript to the compiler |
18:01:31 | leorize | it should generate a script that you can, uh, call multiple times until it succeed :p |
18:01:41 | FromDiscord | <Avatarfighter> I decided to compile nim from scratch again |
18:01:57 | FromDiscord | <Avatarfighter> I was following step 2 on https://github.com/nim-lang/Nim/blob/devel/readme.md |
18:02:12 | leorize | gcc error should not be a nim problem imo |
18:02:32 | Zevv | Avatarfighter: I fired up a pi, let me see how far I get. Are you compiling devel from git? |
18:02:54 | FromDiscord | <Avatarfighter> Zevv: Yes I am, I'm following the instructions linked on the readme line by line atm |
18:03:21 | Zevv | ok; I just started with a build_all.sh, that will take some time but so far no problems |
18:04:46 | leorize | Zevv: you can use `make` to parallelize the bootstrap |
18:05:01 | Zevv | ah good to know. |
18:05:04 | FromDiscord | <Avatarfighter> Alrighty, hopefully we get the same error, I'm just baffled that I can run the command that failed and have it run successfully lol |
18:05:20 | FromDiscord | <Avatarfighter> but not when build_all does it :L |
18:06:20 | Zevv | leorize: just waiting for the build sh now, trying to follow Avatarfighters steps as close as possible |
18:06:41 | FromDiscord | <Avatarfighter> I'm going to be right back for a bit, lmk how it goes 😃 |
18:06:47 | Zevv | need to read to the kids in a minute, so I have time :) |
18:07:18 | Zevv | ok, initial nim-from-c bootstrap worked, stage 1 is building |
18:08:52 | * | Tyresc joined #nim |
18:11:31 | Zevv | stage 2 |
18:22:36 | * | kapil____ quit (Quit: Connection closed for inactivity) |
18:25:14 | * | ryukoposting joined #nim |
18:30:14 | Zevv | sorry Avatarfighter, I just made myself a nim without issues |
18:31:03 | Zevv | if you trust a stranger I could login on your pi and try to help you out. I'm pretty handy at this stuff, porting and embedded is in my daytime job... |
18:32:53 | * | Minimisthupper joined #nim |
18:35:11 | FromDiscord | <Avatarfighter> Zevv: I’d love for you to help, ill set something up 😃 |
18:37:59 | Zevv | bb in about an hour or so |
18:43:06 | FromDiscord | <Avatarfighter> Sounds good 😄 |
18:51:33 | * | Avatarfighter joined #nim |
18:54:44 | * | Minimisthupper quit (Quit: Konversation terminated!) |
18:56:06 | * | Avatarfighter_ joined #nim |
18:56:39 | * | Avatarfighter quit (Ping timeout: 256 seconds) |
18:58:26 | * | uvegbot quit (Quit: Konversation terminated!) |
18:58:40 | * | uvegbot joined #nim |
19:06:59 | * | anamok quit (Remote host closed the connection) |
19:08:48 | ryukoposting | I made my first PR to the compiler aaaaaay |
19:09:06 | ryukoposting | it's braindead simple and really not particularly special but yknow |
19:13:51 | * | uvegbot quit (Quit: Konversation terminated!) |
19:13:58 | Araq | ryukoposting, nice |
19:14:02 | * | uvegbot joined #nim |
19:23:50 | ryukoposting | Araq just moved it to sequtils |
19:28:31 | * | nsf joined #nim |
19:32:40 | ryukoposting | anyone know where I should look in the compiler if I want to tackle this? https://github.com/nim-lang/Nim/issues/10900 |
19:33:20 | ryukoposting | I really want to make sure this gets fixed quick, since the AWS SDK is gonna be kinda nasty to use until it's fixed |
19:35:27 | * | rnrwashere quit (Remote host closed the connection) |
19:36:38 | WilhelmVonWeiner | would there be a speed difference between using an array[2, int] and a tuple (int, int)? |
19:37:22 | ryukoposting | WilhelmVonWeiner I'm not an expert, but I'm gonna guess that if there is a difference, it would be miniscule |
19:37:43 | ryukoposting | assuming the C backend, at least. |
19:38:35 | * | Avatarfighter_ quit (Ping timeout: 256 seconds) |
19:38:57 | WilhelmVonWeiner | hm |
19:39:03 | WilhelmVonWeiner | tuples have named fields is all |
19:39:21 | WilhelmVonWeiner | which show up if you echo the data structure |
19:39:32 | * | mosORadi quit (Quit: Connection closed for inactivity) |
19:39:46 | ryukoposting | I look at it as the difference between a C array and a C struct |
19:40:36 | WilhelmVonWeiner | well the tuple field names are stored somewhere |
19:41:08 | WilhelmVonWeiner | I have to go but if someone has an affirmative answer do let me know I'm just afk |
19:41:24 | ryukoposting | I've had to dig through GCC's output when dealing with a bug a while back, so maybe I can draw from that |
19:41:44 | ryukoposting | not for Nim, and also targeting ARMv7 not x86, but still |
19:42:24 | ryukoposting | Instead of keeping addresses for struct/object/whatever members, GCC usually keeps a single address, then uses offsets to get to different members |
19:43:08 | ryukoposting | the fact that it does this with Thumb2, where offsets are very limited in size, tells me it probably would do the same thing in an architecture where the hard offsets in an instruction can be quite large, e.g. x86 |
19:44:30 | ryukoposting | my foundation for this is suuuuper hand-wavey, but I'd bet the difference would be nonexistent if using -d:release, and might be measurable (if still tiny) for a debug build, since the names of object/tuple members would be sitting somewhere in memory |
19:46:02 | ryukoposting | The only thing I can be sure on is that differences wouldn't arise from accessing members of the tuple/array/whatever, but they could arise from differences in debug information that gets packed into the two different types |
19:52:35 | FromDiscord | <exelotl> I'm using the asm statement to embed a string into my executable, but it doesn't seem to escape quotes in the generated C code. Is this a bug? |
19:54:39 | * | seni joined #nim |
19:55:05 | ryukoposting | post code? |
19:55:18 | FromDiscord | <exelotl> e.g. the following nim code: asm """.string "SRAM_Vnnn" """ |
19:55:33 | FromDiscord | <exelotl> generates the following C code: asm(" .string "SRAM_Vnnn" \n"); |
19:59:01 | ryukoposting | I'm leaning towards no, but you should definitely talk to one of the devs |
20:03:19 | * | rnrwashere joined #nim |
20:04:37 | * | Avatarfighter joined #nim |
20:07:25 | Zevv | Avatarfighter: you still here? |
20:07:37 | Zevv | took a bit longer then expected, sorry |
20:09:18 | * | luis_ joined #nim |
20:46:48 | * | nsf quit (Quit: WeeChat 2.4) |
20:47:19 | * | luis_ quit (Quit: luis_) |
20:47:30 | Zevv | Araq, I'm helping out Avatarfighter with his Pi-issues, which seem to be memory related - just simply running out of it. |
20:48:01 | Zevv | What we see happening is that Nim happily compiles all Nim to C, and then spawns the C compiler. |
20:48:24 | Zevv | While it is waiting for the C to compile, it is still sitting on several hundreds of MB of memory |
20:48:38 | Zevv | and basically doing nothing, it seems. How does that work? |
20:54:42 | Araq | use --compileOnly and then 'nim jsonbuild nim.json' or similiar |
20:55:32 | Zevv | that makes sense |
20:55:43 | Araq | "How does that work?", the Nim compiler uses the RAM and doesn't free it for GCC. |
20:56:13 | Zevv | Yeah, I kind of worded that question wrong, sorry for that :) |
20:56:29 | Araq | In the 80ies there was this idea called "virtual memory" where you could have a swap file |
20:56:39 | Araq | unfortunately it didn't catch on |
20:56:40 | Zevv | yeah, I just added a fewhunderd MB's of swap, that works |
20:56:46 | Araq | :P |
20:57:01 | Zevv | the only real issue is that his build failed with the message "an error occured" |
20:57:28 | Zevv | and there were no clear signs of why, so I'll see if I can find where gcc's complaints went |
20:57:51 | Araq | that's pretty good, usually on Linux you get a segfault instead after the OS randomly killed your browser |
20:58:07 | Zevv | with a very nice report of the OOM killer in the kernel |
20:58:16 | Zevv | telling you exactly what happend, why, and who was the chosen victim |
20:58:28 | Araq | sure. |
20:58:30 | Zevv | but now GCC decided on its own that it was probably better to stop before it got killed |
20:58:41 | Zevv | but its output was eaten somewhere down the road |
21:00:38 | Araq | there is also a "file descriptor killer" if program A opens too many files program B is killed instead |
21:00:45 | Zevv | |
21:00:51 | Zevv | no such thing |
21:01:03 | Araq | see? |
21:01:29 | Zevv | a bit of a difference there. What is 'too many file descriptors' |
21:01:39 | Zevv | is that a limited resource in your OS? |
21:02:13 | Zevv | well, you either kill something, or you keep swapping until the user gets bored and decides a reboot would be bettery |
21:02:21 | Zevv | *if* he is able to reboot because the task switcher is swapped to disk |
21:02:25 | Zevv | and can't come out |
21:02:39 | Araq | my point is that the OOM killer is worst idea in the history of computing |
21:02:47 | Zevv | So, what's the alternative here |
21:03:02 | Araq | don't overcommit memory, don't promise what you cannot keep. |
21:03:58 | Zevv | So, *overcomitting* is your problem |
21:04:16 | Zevv | It is actually nice to be able to fork() when using more then half my memory |
21:04:30 | Zevv | overcomitting is what you do when you COW |
21:04:53 | Araq | no, fork() is a design mistake because it leads to overcommit which leads to arbitrary process shutdowns |
21:05:26 | Zevv | That's more like the source, I agree on that |
21:05:40 | Zevv | vfork() is underappreciated |
21:06:32 | clyybber | Zevv: Linux has a file descriptor limit |
21:06:45 | clyybber | which you can raise in the limits file |
21:06:46 | Zevv | yeah, per process |
21:06:49 | clyybber | yeah |
21:06:49 | Zevv | and that's arbritary |
21:06:58 | Zevv | I can set that to MAX_UINT64 |
21:07:13 | Zevv | I bet you a beer I can get an OOM by opening too many fd's :) |
21:09:00 | clyybber | Araq: You can disable overcommiting on linux. |
21:09:07 | Zevv | and you can disable OOM |
21:09:13 | Zevv | but you can't disable fork :) |
21:09:20 | Araq | clyybber: I know, thank god |
21:09:42 | Araq | it's not the default though. the default is the un-operating system mode. |
21:10:13 | clyybber | It's a beautiful hack |
21:15:02 | * | noeontheend quit (Remote host closed the connection) |
21:15:03 | * | Avatarfighter_ joined #nim |
21:16:01 | FromDiscord | <Avatarfighter> Dang that was a ride hah |
21:16:02 | FromDiscord | <Avatarfighter> Dang that was a ride haha |
21:16:16 | * | noeontheend joined #nim |
21:16:30 | * | Avatarfighter_ left #nim (#nim) |
21:18:53 | * | Avatarfighter quit (Ping timeout: 256 seconds) |
21:26:33 | clyybber | gn8 |
21:26:53 | * | clyybber quit (Quit: WeeChat 2.4) |
21:34:12 | * | rnrwashere quit (Remote host closed the connection) |
21:42:01 | FromGitter | <Varriount> Araq: How does fork() lead to overcommits? |
21:42:20 | FromGitter | <Varriount> And does CreateProcess have the same flaw? |
21:42:57 | * | solitudesf quit (Ping timeout: 245 seconds) |
21:43:10 | * | Vladar quit (Remote host closed the connection) |
22:03:13 | * | stefanos82 quit (Remote host closed the connection) |
22:09:42 | FromDiscord | <exelotl> I got saving working on the GBA: https://github.com/exelotl/nim-tonc/blob/master/examples/test_sram/main.nim |
22:11:27 | * | xet7 quit (Ping timeout: 240 seconds) |
22:12:08 | * | jjido joined #nim |
22:15:39 | * | rnrwashere joined #nim |
22:22:04 | * | rnrwashere quit (Remote host closed the connection) |
22:24:13 | * | xet7 joined #nim |
22:24:21 | * | rnrwashere joined #nim |
22:41:42 | * | vlad1777d quit (Ping timeout: 250 seconds) |
22:42:23 | * | rnrwashere quit (Remote host closed the connection) |
22:43:51 | * | rnrwashere joined #nim |
22:46:24 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:47:11 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
22:47:29 | * | rnrwashere quit (Remote host closed the connection) |
22:50:33 | * | rnrwashere joined #nim |
22:53:14 | * | rnrwashere quit (Remote host closed the connection) |
23:03:42 | * | rnrwashere joined #nim |
23:09:59 | planetis[m] | nice exelotl! |
23:14:15 | * | noeontheend quit (Ping timeout: 250 seconds) |
23:16:44 | planetis[m] | btw, i remember we once talked about an fsm macro. Have u seen what i made: https://github.com/b3liever/macromachining I though it might interest u |
23:20:18 | * | seni quit (Quit: Leaving) |
23:31:19 | * | noeontheend joined #nim |
23:34:14 | * | Trustable quit (Remote host closed the connection) |
23:38:20 | * | noeontheend quit (Ping timeout: 264 seconds) |
23:42:42 | * | NimBot joined #nim |
23:43:01 | I_Right_I | coming from C to nim... Is using sequences as substitute for link list the preferred method where possible? |
23:53:56 | * | theelous3__ joined #nim |
23:59:52 | shashlick | There are lists and deques if you want that |