<< 06-04-2019 >>

00:09:29*krux02_ quit (Remote host closed the connection)
00:11:45rayman22201Each is a separate implementation, but it is at the data structure level, not the procedure level. So, "owninghashSet", "nonOwningHashSet", "copyingHashSet".
00:12:56rayman22201I would not have a heterogeneous data structure. You could, but I think it be very messy.
00:27:48FromDiscord<exelotl> is it possible to define a custom type conversion?
00:29:01shashlickConverters?
00:29:57FromDiscord<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:16FromDiscord<exelotl> right now I have to do `myFixed.toInt()`
00:31:24FromDiscord<exelotl> it's not too bad I guess
00:46:13FromDiscord<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:41FromDiscord<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:23FromGitter<kaushalmodi> shashlick: yess! I confirm the fix. Many thanks!
00:55:58FromGitter<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:55shashlickWell there is no version yet so everything is head
01:47:24shashlickProblem 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:06FromDiscord<Avatarfighter> Is there a way to have koch use a different compiler than gcc?
03:48:38shashlickconfigure it in nim.cfg
03:52:52FromDiscord<Avatarfighter> Thank you 😃
03:53:12FromDiscord<Avatarfighter> I think that might've fixed my issue fingers crossed
04:03:12*neceve quit (Read error: Connection reset by peer)
04:04:53shashlickawesome
04:05:19FromDiscord<Avatarfighter> yes it did 😄
04:05:39FromDiscord<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:21FromDiscord<Avatarfighter> Alrighty so clang fixes most of my issues except `./koch tools` can't compile one of the things more debugging 😄
04:17:35FromDiscord<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:00PerkolHow 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:55FromGitter<mratsim> @narimiran, wasn't there a FFI label?
09:26:35FromGitter<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:50FromGitter<liquid600pgm> shashlick: nimterop fails to install on 0.19.9 for some reason https://termbin.com/1ycd
10:11:11salewskiDo we have something like std::equal to compare seq1[a .. b] with seq2[a .. b] direct, without copying parts of both seq?
10:11:16salewskiSee http://www.cplusplus.com/reference/algorithm/equal/
10:11:23*nsf joined #nim
10:13:15*ng0 joined #nim
10:13:51salewskiI 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:50clyybberZevv Is npeg a good fit for a parser?
10:21:55clyybberAlso can it handle streams?
10:42:18*Perkol quit (Remote host closed the connection)
10:47:53ZevvI tried streams, but there were complications with performance and captures. For now it is strings only.
10:48:34ZevvI have ideas to get streaming back in, its next on my list.
10:49:14ZevvI also experimented with parsing mmap()ed files (memFile, in Nim), but that degraded my type safety so I droppde that for now
10:49:58Zevvfor 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:10clyybberI'm in the process of getting the complete EBNF done.
11:09:37clyybberA PEG accepts all context-free languages right?
11:10:32Zevvit breaks on left recursion, though
11:11:24Zevvusually 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:06ZevvThere 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:08clyybberok, thanks I will check both out. I think I don't need left recursion.
11:19:29clyybberI 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:20FromGitter<liquid600pgm> is there any way to create destructors for `ref object`s?
11:50:43FromGitter<liquid600pgm> basically, some proc that will execute when the GC frees the object
11:52:42FromGitter<liquid600pgm> I guess using `new` is my only option?
11:53:36FromGitter<liquid600pgm> I heard something about `\`destroy=\`` but I can't get it to work
12:05:36FromGitter<liquid600pgm> I need this for interfacing with C
12:12:51*oculux joined #nim
12:25:33FromGitter<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:21FromGitter<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:38FromGitter<kayabaNerve> So that means the raises pragma is in the XDeclaredButNotUsed block :/
12:27:02FromGitter<kayabaNerve> Not asking for confirmation really, but if there's a workaround.
12:39:55*theelous3__ joined #nim
12:42:34shashlick@liquid600pgm ya, some issues with strformat, hoping krux02 fixes it
12:43:32Zevvliquid600pgm: destructors is work in progress afaik; araq has been chewing on that for some time
12:43:58Zevvi 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:45shashlickIs this what you are seeing https://travis-ci.org/nimterop/nimterop/jobs/516294339 - @liquid600pgm
12:54:32FromGitter<liquid600pgm> no, I sent you the stack trace
12:55:05FromGitter<liquid600pgm> it's an error in the regex library, somewhere in parseutils
12:55:12FromGitter<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:16federico3https://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:50leorizeZevv, liquid600pgm: see this https://github.com/nim-lang/Nim/blob/devel/tests/destructor/turn_destroy_into_finalizer.nim for ref object destructor
14:29:38FromGitter<liquid600pgm> yeah, that's what I used in the end, it seems to be working fine
14:34:14*dddddd joined #nim
14:42:41Zevvheu since when is that supposed to work?
14:55:24*rockcavera quit (Remote host closed the connection)
14:57:07shashlick@liquid600pgm are you on latest devel?
14:57:23FromGitter<kaushalmodi> @liquid600pgm `nimble install nimterop#@head` worked for me yesterday
14:57:43FromGitter<kaushalmodi> I'm on devel too (probably 4 days old devel)
14:58:08FromGitter<kaushalmodi> Well, not "4 days old", but I last built from devel 4 days back
14:59:00FromGitter<kaushalmodi> Typo: `nimble install nimterop@#head`
14:59:58shashlickNope it is still broken on latest head
15:00:01shashlickhttps://travis-ci.org/nimterop/nimterop/jobs/516416914
15:01:02shashlickBasically 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:05Zevvwhat'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:18shashlickJust use an existing yml file
15:25:35shashlickNimterop has both Travis and appveyor testing
15:25:50shashlickWindows Linux osx across stable and devel
15:25:55FromGitter<liquid600pgm> shashlick: yes, I'm on the latest devel
15:26:32shashlickYa it's been reported, hopefully fixed soon
15:31:55Araqshashlick, 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:30stefantalpalaruIs 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:43leorizeI believe so, as Haiku's gcc 2 compiler can't process Nim generated code
15:53:27clyybberkayabaNerve: 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:32Calinouis there a built-in Nimble command to build and run automatically?
16:00:49Calinouif not, I guess I can just write a task :)
16:07:00shashlickNimble build
16:09:32*mosORadi quit (Quit: Connection closed for inactivity)
16:10:32*krux02 quit (Remote host closed the connection)
16:12:39Calinouit only builds the package, it doesn't run the compiled program
16:13:03CalinouI wrote a task anyway, but it's not portable as it depends on the OS-specific binary name
16:13:14Calinou(could be fixed with `when`, maybe)
16:14:56shashlickThere's exeext or something
16:15:27CalinouI 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:31Calinou(as . is not part of the PATH on Linux/macOS)
16:19:10shashlickhttps://nim-lang.org/0.19.0/ospaths.html#ExeExt
16:25:50Calinouhow do I fetch the number of CPU threads on the system from Nim?
16:26:15Calinou(my DuckDuckGoing is failing here :P)
16:26:28FromGitter<liquid600pgm> Calinou: https://nim-lang.org/docs/cpuinfo.html
16:26:45Calinouthanks :)
16:26:50FromDiscord<Avatarfighter> Just a question, has anyone had any luck compiling `koch tools` on raspbian?
16:27:19FromGitter<liquid600pgm> Avatarfigher: I compiled it successfully, what's your issue?
16:28:24FromDiscord<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:02FromGitter<liquid600pgm> strange, for me the process went pretty smoothly without any major issues
16:29:05FromGitter<liquid600pgm> just plug and play
16:29:09FromDiscord<Avatarfighter> rip
16:29:32FromDiscord<Avatarfighter> this is my third time flashing raspbian hoping that it'll magically fix itself lmao
16:30:16disruptekAvatarfighter: try clang for nim and gcc for nimble.
16:31:00FromDiscord<Avatarfighter> alrighty will do, fingers crossed this works lol
16:35:03BaldEagleX02I 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:21FromGitter<liquid600pgm> is it possible to capture variables from outside of {.cdecl.} anonymous procs?
16:56:41FromGitter<liquid600pgm> without using globals, that is
17:03:52Calinouso there it is, https://github.com/Calinou/godot-size-benchmarks
17:04:04CalinouI decided to write the benchmark runner in Nim because I was fed up with arrays in Bash :P
17:08:16Araqliquid600pgm: that can't work
17:10:23*rnrwashere joined #nim
17:10:43*solitudesf joined #nim
17:11:52FromDiscord<Avatarfighter> Yeah still no luck, gcc also fails to build nimble
17:15:50*anamok joined #nim
17:15:53anamokhello
17:16:31FromDiscord<Avatarfighter> Hello 😄
17:17:01anamokI 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:28Araqyes but it's in the early phase and Nim v1 will ship with the GCs
17:19:54anamokBut 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:41Araqthis has been discussed to death and you won't "fight manual memory management" moreso than people are fighting the GCs now
17:21:12Araqbut we'll see if it works out. As I said, when was the last time we made Nim worse? :P
17:21:58FromDiscord<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:08AraqAvatarfighter: try the -d:leanCompiler switch
17:23:15Araqthen it should take less RAM
17:24:18FromDiscord<Avatarfighter> Will do 😃 I'm really close, I've just had issues with compiling nimble due to something called `linenoise.c`
17:24:35FromDiscord<Avatarfighter> Nothing a bit of fiddling can't fix haha
17:24:45Araqanamok, 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:59federico3Avatarfighter: why, what was the issue?
17:26:03AraqThe differences between Rust and Nim will still be bigger than between Python and Ruby.
17:26:24leorizeAvatarfighter: 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:31I_Right_Iyeah considering Rust code is harder to read than 'C'
17:36:56anamokI 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:09FromDiscord<Avatarfighter> leorize: that's probably the issue lol but I have high hopes 😄
17:43:00leorizeactually you can just put your error output here and everyone can help with that :p
17:43:26FromDiscord<Avatarfighter> I'm awaiting the error atm, I'm compiling fresh rn
17:44:22*nsf quit (Quit: WeeChat 2.4)
17:44:38FromDiscord<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:39leorizetry executing that command in terminal
17:53:06FromDiscord<Avatarfighter> Will do 😃
17:53:26FromDiscord<Avatarfighter> I actually got a different error this time, but I'll see what the output of this one is lol
17:54:28FromDiscord<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:23leorizenice, execution failing for no apparant reason
17:55:29FromDiscord<Avatarfighter> yeah
17:55:41FromDiscord<Avatarfighter> This is the story of my life rn
17:55:57I_Right_Ianamok: 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:26leorizeAvatarfighter: hmm there are countless reason for why execution fail...
17:56:34leorizetry looking at dmesg | tail
17:58:09FromDiscord<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:59leorizeyou are compiling nimble, right?
18:01:00FromDiscord<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:13leorizetry passing --genScript to the compiler
18:01:31leorizeit should generate a script that you can, uh, call multiple times until it succeed :p
18:01:41FromDiscord<Avatarfighter> I decided to compile nim from scratch again
18:01:57FromDiscord<Avatarfighter> I was following step 2 on https://github.com/nim-lang/Nim/blob/devel/readme.md
18:02:12leorizegcc error should not be a nim problem imo
18:02:32ZevvAvatarfighter: I fired up a pi, let me see how far I get. Are you compiling devel from git?
18:02:54FromDiscord<Avatarfighter> Zevv: Yes I am, I'm following the instructions linked on the readme line by line atm
18:03:21Zevvok; I just started with a build_all.sh, that will take some time but so far no problems
18:04:46leorizeZevv: you can use `make` to parallelize the bootstrap
18:05:01Zevvah good to know.
18:05:04FromDiscord<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:20FromDiscord<Avatarfighter> but not when build_all does it :L
18:06:20Zevvleorize: just waiting for the build sh now, trying to follow Avatarfighters steps as close as possible
18:06:41FromDiscord<Avatarfighter> I'm going to be right back for a bit, lmk how it goes 😃
18:06:47Zevvneed to read to the kids in a minute, so I have time :)
18:07:18Zevvok, initial nim-from-c bootstrap worked, stage 1 is building
18:08:52*Tyresc joined #nim
18:11:31Zevvstage 2
18:22:36*kapil____ quit (Quit: Connection closed for inactivity)
18:25:14*ryukoposting joined #nim
18:30:14Zevvsorry Avatarfighter, I just made myself a nim without issues
18:31:03Zevvif 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:11FromDiscord<Avatarfighter> Zevv: I’d love for you to help, ill set something up 😃
18:37:59Zevvbb in about an hour or so
18:43:06FromDiscord<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:48ryukopostingI made my first PR to the compiler aaaaaay
19:09:06ryukopostingit's braindead simple and really not particularly special but yknow
19:13:51*uvegbot quit (Quit: Konversation terminated!)
19:13:58Araqryukoposting, nice
19:14:02*uvegbot joined #nim
19:23:50ryukopostingAraq just moved it to sequtils
19:28:31*nsf joined #nim
19:32:40ryukopostinganyone know where I should look in the compiler if I want to tackle this? https://github.com/nim-lang/Nim/issues/10900
19:33:20ryukopostingI 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:38WilhelmVonWeinerwould there be a speed difference between using an array[2, int] and a tuple (int, int)?
19:37:22ryukopostingWilhelmVonWeiner I'm not an expert, but I'm gonna guess that if there is a difference, it would be miniscule
19:37:43ryukopostingassuming the C backend, at least.
19:38:35*Avatarfighter_ quit (Ping timeout: 256 seconds)
19:38:57WilhelmVonWeinerhm
19:39:03WilhelmVonWeinertuples have named fields is all
19:39:21WilhelmVonWeinerwhich show up if you echo the data structure
19:39:32*mosORadi quit (Quit: Connection closed for inactivity)
19:39:46ryukopostingI look at it as the difference between a C array and a C struct
19:40:36WilhelmVonWeinerwell the tuple field names are stored somewhere
19:41:08WilhelmVonWeinerI have to go but if someone has an affirmative answer do let me know I'm just afk
19:41:24ryukopostingI'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:44ryukopostingnot for Nim, and also targeting ARMv7 not x86, but still
19:42:24ryukopostingInstead of keeping addresses for struct/object/whatever members, GCC usually keeps a single address, then uses offsets to get to different members
19:43:08ryukopostingthe 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:30ryukopostingmy 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:02ryukopostingThe 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:35FromDiscord<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:05ryukopostingpost code?
19:55:18FromDiscord<exelotl> e.g. the following nim code: asm """.string "SRAM_Vnnn" """
19:55:33FromDiscord<exelotl> generates the following C code: asm(" .string "SRAM_Vnnn" \n");
19:59:01ryukopostingI'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:25ZevvAvatarfighter: you still here?
20:07:37Zevvtook 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:30ZevvAraq, I'm helping out Avatarfighter with his Pi-issues, which seem to be memory related - just simply running out of it.
20:48:01ZevvWhat we see happening is that Nim happily compiles all Nim to C, and then spawns the C compiler.
20:48:24ZevvWhile it is waiting for the C to compile, it is still sitting on several hundreds of MB of memory
20:48:38Zevvand basically doing nothing, it seems. How does that work?
20:54:42Araquse --compileOnly and then 'nim jsonbuild nim.json' or similiar
20:55:32Zevvthat makes sense
20:55:43Araq"How does that work?", the Nim compiler uses the RAM and doesn't free it for GCC.
20:56:13ZevvYeah, I kind of worded that question wrong, sorry for that :)
20:56:29AraqIn the 80ies there was this idea called "virtual memory" where you could have a swap file
20:56:39Araqunfortunately it didn't catch on
20:56:40Zevvyeah, I just added a fewhunderd MB's of swap, that works
20:56:46Araq:P
20:57:01Zevvthe only real issue is that his build failed with the message "an error occured"
20:57:28Zevvand there were no clear signs of why, so I'll see if I can find where gcc's complaints went
20:57:51Araqthat's pretty good, usually on Linux you get a segfault instead after the OS randomly killed your browser
20:58:07Zevvwith a very nice report of the OOM killer in the kernel
20:58:16Zevvtelling you exactly what happend, why, and who was the chosen victim
20:58:28Araqsure.
20:58:30Zevvbut now GCC decided on its own that it was probably better to stop before it got killed
20:58:41Zevvbut its output was eaten somewhere down the road
21:00:38Araqthere is also a "file descriptor killer" if program A opens too many files program B is killed instead
21:00:45Zevv
21:00:51Zevvno such thing
21:01:03Araqsee?
21:01:29Zevva bit of a difference there. What is 'too many file descriptors'
21:01:39Zevvis that a limited resource in your OS?
21:02:13Zevvwell, you either kill something, or you keep swapping until the user gets bored and decides a reboot would be bettery
21:02:21Zevv*if* he is able to reboot because the task switcher is swapped to disk
21:02:25Zevvand can't come out
21:02:39Araqmy point is that the OOM killer is worst idea in the history of computing
21:02:47ZevvSo, what's the alternative here
21:03:02Araqdon't overcommit memory, don't promise what you cannot keep.
21:03:58ZevvSo, *overcomitting* is your problem
21:04:16ZevvIt is actually nice to be able to fork() when using more then half my memory
21:04:30Zevvovercomitting is what you do when you COW
21:04:53Araqno, fork() is a design mistake because it leads to overcommit which leads to arbitrary process shutdowns
21:05:26ZevvThat's more like the source, I agree on that
21:05:40Zevvvfork() is underappreciated
21:06:32clyybberZevv: Linux has a file descriptor limit
21:06:45clyybberwhich you can raise in the limits file
21:06:46Zevvyeah, per process
21:06:49clyybberyeah
21:06:49Zevvand that's arbritary
21:06:58ZevvI can set that to MAX_UINT64
21:07:13ZevvI bet you a beer I can get an OOM by opening too many fd's :)
21:09:00clyybberAraq: You can disable overcommiting on linux.
21:09:07Zevvand you can disable OOM
21:09:13Zevvbut you can't disable fork :)
21:09:20Araqclyybber: I know, thank god
21:09:42Araqit's not the default though. the default is the un-operating system mode.
21:10:13clyybberIt's a beautiful hack
21:15:02*noeontheend quit (Remote host closed the connection)
21:15:03*Avatarfighter_ joined #nim
21:16:01FromDiscord<Avatarfighter> Dang that was a ride hah
21:16:02FromDiscord<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:33clyybbergn8
21:26:53*clyybber quit (Quit: WeeChat 2.4)
21:34:12*rnrwashere quit (Remote host closed the connection)
21:42:01FromGitter<Varriount> Araq: How does fork() lead to overcommits?
21:42:20FromGitter<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:42FromDiscord<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:59planetis[m]nice exelotl!
23:14:15*noeontheend quit (Ping timeout: 250 seconds)
23:16:44planetis[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:01I_Right_Icoming 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:52shashlickThere are lists and deques if you want that