<< 09-06-2018 >>

00:00:57*jlhouchin quit (Ping timeout: 264 seconds)
00:01:17*rockcavera quit (Remote host closed the connection)
00:08:01*endragor quit (Ping timeout: 248 seconds)
00:08:06kinkinkijkinoh generics works
00:08:15kinkinkijkinsomeone in a discord showed me a bit on generics
00:13:39*bevo joined #nim
00:24:15FromGitter<kayabaNerve> If anyone cares, you can now install LTE and run Nim on Tomu's (ARM board the size of an USB port). Code to open a serial connected, control USBs, and play a guessing game is here: https://github.com/kayabaNerve/LTE/blob/master/samples/Nim/FruitGuesser/main.nim ⏎ ⏎ Quite elegant
00:24:26FromGitter<kayabaNerve> Way better than C
00:24:48*yglukhov[i] joined #nim
00:27:46*CodeVance1 joined #nim
00:30:18*Sembei quit (Max SendQ exceeded)
00:31:21*CodeVance quit (Ping timeout: 256 seconds)
00:31:24*Sembei joined #nim
00:34:39kinkinkijkindoes a generic have to be a ref?
00:34:50FromGitter<Varriount> No, it doesn't
00:35:01*endragor joined #nim
00:36:45*thomasross quit (Remote host closed the connection)
00:37:03kinkinkijkinis declaring a type as seq[object] valid?
00:37:12*bevo_ joined #nim
00:37:32*krux02 quit (Remote host closed the connection)
00:37:34*thomasross joined #nim
00:38:15*thomasross quit (Max SendQ exceeded)
00:38:19FromGitter<Varriount> @l1n3n01z Does it run with Nim's garbage collector?
00:38:42*thomasross joined #nim
00:41:19*bevo quit (Ping timeout: 260 seconds)
00:43:27*yglukhov[i] quit (Ping timeout: 265 seconds)
00:45:32*arecaceae quit (Remote host closed the connection)
00:45:56*arecaceae joined #nim
00:50:45*thomasross quit (Remote host closed the connection)
00:51:11*thomasross joined #nim
00:59:00FromGitter<kayabaNerve> Hey @Varriount
00:59:10FromGitter<kayabaNerve> Haven't talked to you in a few days. You doing good?
01:02:43FromGitter<kayabaNerve> Also. Question. Is there a way I can specify standalone but still use Nim's higher features as I still have the stdlib?
01:02:46*yglukhov[i] joined #nim
01:03:02FromGitter<kayabaNerve> Couldn't define custom types because it was standalone...
01:06:27*endragor quit (Ping timeout: 245 seconds)
01:10:40*yglukhov[i] quit (Ping timeout: 260 seconds)
01:17:50FromGitter<kayabaNerve> Why can't I use none when it's in the enum? https://github.com/nim-lang/Nim/blob/master/lib/system/platforms.nim#L36
01:18:23*yglukhov[i] joined #nim
01:19:53FromGitter<kayabaNerve> Just because none should be standalone when you specify the OS over the CLI?
01:20:14FromGitter<kayabaNerve> I'm still just looking for a way to use the stdlib but no OS, if one exists.
01:28:30sendell[m]Does anybody know of an easy lib for gamepad inputs ? I know about sdl2 but i'd like something more straightforward
01:32:27*jlhouchin1 left #nim (#nim)
01:33:41*endragor joined #nim
01:33:48FromGitter<kayabaNerve> sfml?
01:33:58*riidom quit (Ping timeout: 264 seconds)
01:40:25FromGitter<gogolxdong> Hi, @Varriount ,Are you using this `cmp`? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b1b3009d7b4f6288cb8c204]
01:54:42*CodeVance1 left #nim (#nim)
01:58:51*yglukhov[i] quit (Ping timeout: 265 seconds)
02:00:58FromGitter<Varriount> @gogolxdong Yes
02:01:49FromGitter<kayabaNerve> @Varriount what's it's point
02:02:06*yglukhov[i] joined #nim
02:02:20FromGitter<kayabaNerve> I mean, it doesn't check if the lengths are different
02:02:30FromGitter<kayabaNerve> So is it just to see if the strings start the same way?
02:02:41FromGitter<kayabaNerve> Or the longer starts with the smaller?
02:04:17*cspar quit (Ping timeout: 256 seconds)
02:05:29FromGitter<Varriount> Or wait, let me check
02:06:28FromGitter<Varriount> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b1b3624ddd61d08e53fd66f]
02:07:34*endragor quit (Ping timeout: 264 seconds)
02:07:53FromGitter<Varriount> @gogolxdong ^
02:09:27FromGitter<Varriount> @kayabaNerve You should still be able to create custom object types. Reference types will have to have their memory managed manually
02:15:50FromGitter<gogolxdong> I found the HeaderData is not in a right order after sortSegmentsIn.
02:16:49FromGitter<gogolxdong> I'm using ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5b1b38919ca98417e25669be]
02:16:57FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b1b3899144c8c6fea8124f7]
02:18:07FromGitter<kayabaNerve> Yeah it was a ref
02:18:10FromGitter<kayabaNerve> Good to know
02:18:53FromGitter<kayabaNerve> @Varriount so how do I get it to use stdlib and do it for me :p or is not possible with no OS
02:19:16FromGitter<kayabaNerve> I tried Linux for the hell of it. It tried to get Linux specific headers
02:19:29FromGitter<Varriount> Unfortunately, the stdlib isn't really designed for use without a GC.
02:20:07FromGitter<kayabaNerve> I meant <stdlib.h> Malloc
02:20:16FromGitter<kayabaNerve> And what does the GC require?
02:20:40FromGitter<kayabaNerve> I don't have an OS, sockets, IO. I do have the C stdlib
02:21:48FromGitter<Varriount> Hm, Well on windows the GC requires VirtualAlloc
02:22:01FromGitter<Varriount> I believe on Linux it might use memory maps
02:22:46FromGitter<Varriount> I would look here: https://github.com/nim-lang/Nim/blob/devel/lib/system/alloc.nim
02:24:01FromGitter<kayabaNerve> I remember araq saying something something regions
02:25:03FromGitter<Varriount> Yeah, there's a "regions" memory management scheme. I don't recall seeing any documentation on how it should be used though.
02:26:16FromGitter<Varriount> Honestly, you will need to talk to araq
02:26:49FromDiscord<tsquar3d> Anyone Target an MSP430 with nim?
02:27:20FromGitter<kayabaNerve> Options
02:27:22FromGitter<kayabaNerve> gc:refc|v2|markAndSweep|boehm|go|none|regions
02:28:01FromGitter<kayabaNerve> Do I just try each until one works? 🤔
02:28:07*find0x90 joined #nim
02:29:41FromGitter<Varriount> Well, the one you probably want is 'regions'. Boehm might work in your case too, however that requires the Boehm DLL/SO
02:30:03FromGitter<kayabaNerve> Regions looks to be a rename of stack but I think that caused errors...
02:34:14*endragor joined #nim
02:36:22*cspar joined #nim
02:46:30FromGitter<kayabaNerve> *I think regions did
02:51:28FromGitter<kayabaNerve> @Varriount I missed your messages
02:51:29FromGitter<kayabaNerve> Sorry
02:51:37FromGitter<kayabaNerve> And Boehm seems broken as hell
02:52:25FromGitter<Varriount> Boehm requires the Boehm shared library
02:54:44FromGitter<kayabaNerve> ld.exe: project.elf section `.bss' will not fit in region `ram' ⏎ ld.exe: region `ram' overflowed by 33549388 bytes
02:55:24FromGitter<kayabaNerve> That's 33MB
02:55:26FromGitter<kayabaNerve> what the hell
02:55:38FromGitter<Varriount> What are you targeting?
02:56:11FromGitter<kayabaNerve> 8kb RAM ⏎ 64kb Flash
02:56:15FromGitter<kayabaNerve> 64kb
02:56:23FromGitter<kayabaNerve> I can't fit 33MB lol
02:56:27FromGitter<kayabaNerve> tomu.im
02:56:52FromGitter<kayabaNerve> Here's a better link: https://tomu.im/#specs
02:59:17FromGitter<kayabaNerve> @Varriount So no GC for me? :P
02:59:59FromGitter<Varriount> Talk to Araq, he might be able to come up with something
03:00:21FromGitter<kayabaNerve> K
03:00:24FromGitter<kayabaNerve> Thanks anyways
03:08:56*endragor quit (Ping timeout: 265 seconds)
03:11:43*CodeVance joined #nim
03:35:36*endragor joined #nim
03:39:22*find0x90 quit (Quit: find0x90)
03:47:07*CodeVance quit (Read error: Connection reset by peer)
03:47:20*CodeVance joined #nim
03:50:40*CodeVance left #nim (#nim)
03:52:18*xkapastel joined #nim
04:03:07*endragor quit (Ping timeout: 245 seconds)
04:30:15*endragor joined #nim
04:54:56*endragor quit (Ping timeout: 268 seconds)
05:21:53*endragor joined #nim
05:25:57*miran joined #nim
05:44:16*endragor quit (Ping timeout: 268 seconds)
06:11:19*endragor joined #nim
06:32:33*endragor quit (Ping timeout: 248 seconds)
06:46:14*jjido joined #nim
07:00:08*endragor joined #nim
07:03:44FromGitter<Araq> with 8Kb of RAM what do you need a stdlib for? Unicode and hash tables are immediately out of business.
07:14:56*sz0 joined #nim
07:18:38*yglukhov[i] quit (Ping timeout: 276 seconds)
07:18:49*endragor quit (Ping timeout: 265 seconds)
07:26:44*yglukhov[i] joined #nim
07:45:30*endragor joined #nim
07:48:48*Vladar joined #nim
07:55:04*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:00:49*afiskon joined #nim
08:03:29*endragor quit (Ping timeout: 276 seconds)
08:04:41*gmpreussner quit (Ping timeout: 256 seconds)
08:05:48*gmpreussner joined #nim
08:09:12*nsf joined #nim
08:29:59*endragor joined #nim
08:33:05*rauss quit (Ping timeout: 240 seconds)
08:35:05*endragor quit (Ping timeout: 268 seconds)
08:44:56*jjido joined #nim
09:01:19*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:23:01*nc-x[m] left #nim ("User left")
09:31:45*SenasOzys quit (Ping timeout: 248 seconds)
09:32:29FromGitter<mratsim> @tsquar3d I’m pretty sure I saw a repo with MSP430, I think Awesome Nim requires lots of update: https://github.com/VPashkov/awesome-nim
09:32:54FromGitter<mratsim> oh here: https://github.com/lonetech/nim-msp430
09:44:45FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b1ba18cffd8896fe91623a0]
09:45:03FromGitter<gogolxdong> How to echo procname concated with a string?
09:49:43Yardanicowell, it can be easily done with macros, but maybe there are simpler options
09:54:41FromGitter<mratsim> astToStr
09:55:33*SenasOzys joined #nim
09:59:34*yglukhov[i] quit (Ping timeout: 268 seconds)
10:04:04FromGitter<gogolxdong> astToStr +1
10:11:28*xkapastel quit (Quit: Connection closed for inactivity)
10:38:26*krux02 joined #nim
10:43:09*krux02_ joined #nim
10:43:19*krux02 quit (Read error: Connection reset by peer)
10:51:38federico3kayabaNerve: no GC but most stuff you need on a micro works OK
10:51:54*yglukhov[i] joined #nim
11:01:32*zahary quit (Quit: Connection closed for inactivity)
11:15:21*cspar quit (Ping timeout: 264 seconds)
11:16:15*nsf quit (Quit: WeeChat 2.1)
11:25:54*bevo_ quit (Ping timeout: 260 seconds)
11:36:48*cspar joined #nim
11:57:12*SenasOzys quit (Remote host closed the connection)
11:57:33*SenasOzys joined #nim
11:57:37*dddddd joined #nim
12:00:48*elrood joined #nim
12:01:16Yardanico@mratsim I've added a bit of projects which I think should be in awesome list: https://forum.nim-lang.org/t/3904#24309
12:03:01FromGitter<mratsim> How did you vote twice @Yardanico?
12:03:07FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/R4zt/2018-06-09_14-02-43.png)
12:03:47YardanicoIDK :D
12:04:03Yardanicodom96, somehow I pressed "like" button twice on forum :)
12:04:25Yardanicomaybe because I had two tabs open, maybe I pressed "like" button on both of them
12:06:31miranoh, this list reminds me that i should publish my beginners' tutorial
12:11:09*cspar quit (Ping timeout: 264 seconds)
12:14:33miranhttps://narimiran.github.io/nim-basics/
12:15:53Yardanicomiran, wow, very cool!
12:16:00*find0x90 joined #nim
12:16:04miranYardanico: thanks!
12:16:17miranplease don't share it just yet :)
12:16:28Yardanicoah, ok
12:17:15mirani need to add couple of small things (links to both versions (online and pdf), and stuff like that)
12:18:12miranbut proof-reading and corrections are more than welcome - better now than later :)
12:39:43FromGitter<survivorm> Great work, @miran !
12:40:46miranthanks @survivorm! i'm sure it can be better, but i kept it private for too long, so now i'm opening it to the public
12:41:44miranfor now i would like to keep it "between us", so some obvious errors can be corrected, before releasing it to the 'general public' (nim forum, reddit, etc.)
12:44:18dom96Yardanico: Hacks!
12:50:47*find0x90 quit (Ping timeout: 276 seconds)
12:54:57*yglukhov[i] quit (Ping timeout: 240 seconds)
13:01:46dom96478 people on Gitter now :o
13:14:41*Snircle joined #nim
13:15:36federico3we need a better bridge
13:15:53*yglukhov[i] joined #nim
13:18:03*BitPuffin joined #nim
13:20:42FromGitter<mratsim> a bridge in Nim
13:20:52Yardanicoit's actually quite easy
13:21:04FromGitter<mratsim> with a widget on the forum :P
13:21:15FromGitter<mratsim> that can runs on embedded device
13:21:18Yardanicolol
13:21:18FromGitter<mratsim> run*
13:21:57federico3Freenode supports native bridging with Matrix (only)
13:24:53YardanicoBy the way, will converters be available in 1.0? Just curious about their status
13:28:50AraqYardanico: they are here to stay.
13:29:00YardanicoAraq, ok, thanks for your answer! That's great
13:29:03Araqbut maybe I get to change them to
13:29:20Araqtemplate toFoo*(b: Bar): Foo {.converter.}
13:29:30Araqbecause it kinda sucks a converter is a proc
13:32:19FromGitter<matrixbot> `federico3` actually the Gitter room is already bridged into Matrix
13:32:27FromGitter<mratsim> but people might call b twice in the converter and that will cause side-effects and calling b multiple time issues
13:32:48Araqnever seen a converter that does that
13:33:13Araqbut even so, it's not bad if a converter is as hard to use as a template
13:33:21FromGitter<mratsim> converter for physics unit might need it, not sure
13:33:44AraqI mean, templates are kinda important in Nim.
13:35:16*federico3[m] joined #nim
13:37:08dom96federico3: yglukhov was playing around with a matrix bridge yesterday
13:38:08federico3[m]well, I'm seeing a #nim room in Matrix that mirrors Freenode
13:38:32FromGitter<matrixbot> `federico3` and a nim-lang/nim room that mirrors Gitter
13:45:12*MatrixBridge joined #nim
13:45:15*MatrixBridge left #nim ("User left")
13:48:34FromDiscord<2vg> wow, nice tutorial @miran :3
13:48:58miranthanks @2vg!
13:49:23miranif any of you has some suggestions what to change/improve, please let me know
13:49:43FromDiscord<2vg> By the way, I am creating a tutorial for Japanese people :3
13:49:43FromDiscord<2vg> https://2vg.github.io/Nim-World/
13:50:40Yardanico@2vg wow, that's cool!
13:50:47YardanicoI mean really :)
13:51:12YardanicoMaybe I will translate miran's book into Russian once it will be published
13:51:37FromDiscord<2vg> cool
13:52:02FromGitter<kaushalmodi> @narimiran That tutorial looks great! I need to go through it in entirety in next few days.
13:52:45FromGitter<kaushalmodi> I just learned about the interested nature of case statement syntax yesterday, which I made of note of here in my notes: https://scripter.co/notes/nim/#loose-case-syntax
13:53:42FromGitter<kaushalmodi> I mentioning that as I saw https://narimiran.github.io/nim-basics/#_case
13:55:15miranYardanico: i'm not sure i'll freeze/publish some version. i'm more for rolling-release model :) but wow - translation sounds very cool!
13:56:13miran@kaushalmodi: i'm not sure what's the best/correct way of writing 'case'. and i'm not sure i'm even using the same style always in my programs
13:57:05miranbut for the tutorial, i tried to stick to that one style (that i have seen others are using)
13:58:10FromGitter<kaushalmodi> @narimiran As I mention in that notes link, I learned from @dom96 that "no colon, no indented of" is the canonical way: ⏎ ⏎ ```case foo ⏎ of true: ⏎ echo "something" ⏎ else: ⏎ echo "something else"``` [https://gitter.im/nim-lang/Nim?at=5b1bdcf1ddd61d08e541605c]
13:58:29Yardanico@kaushalmodi by the way, it's not *always* required to use "else" in a case statement
13:58:57FromGitter<kaushalmodi> hmm, I show the failing case in the notes..
13:59:06Yardanicoe.g. if you're using "case" for a entry from enum
13:59:13FromGitter<kaushalmodi> may be I should put a qualifier that as long as the "of" cover all cases, else is not needed
13:59:17Yardanicoyeah
13:59:31YardanicoI just said that because maybe you didn't know that :)
13:59:34FromGitter<kaushalmodi> yes, I understood that part.. but I can see that that didn't come out the right way in notes
13:59:41FromGitter<kaushalmodi> thanks, I will fix that
14:00:14FromGitter<kaushalmodi> @narimiran the style I mentioned is at least consistent in Nim Manual and commits.. at least from the 4-5 instances I checked
14:00:51FromGitter<kaushalmodi> The Nim By Example doesn't use this canonical style (uses colon, and indented of)
14:01:40Yardanicowell, I think that we shouldn't really enforce any style options like these, because we don't yet have a "nimfmt" tool to make a standard style for everything :)
14:02:02miranYardanico: agreed
14:02:19miranindented case sometimes helps with readability
14:03:17FromGitter<kaushalmodi> @narimiran I agree. I like the Nim By Example (end statement with colon, indent the stuff in there.. ahem.. for *consistency* ;-)).
14:03:18miranspeaking of readability - i am very much against enforcing a style where there is only one blank line between two (large) functions
14:03:27FromGitter<kaushalmodi> But I was just telling what I learned yesterday
14:04:10miranone blank line, in combination with only two spaces of indentation, makes hard to see where one function ends and the other one begins
14:08:53*xkapastel joined #nim
14:10:37*bevo joined #nim
14:15:31*PMunch joined #nim
14:22:18*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:22:52*Snircle joined #nim
14:36:40*find0x90 joined #nim
14:40:53FromGitter<bevo009> @kaushalmodi so you're using the code runner shortcut to build and run Nim, can you tweak the verbosity in that?
14:45:59*TechAspirer quit (Ping timeout: 260 seconds)
14:49:49*find0x90 quit (Quit: find0x90)
14:50:43*rauss joined #nim
15:00:57FromGitter<kaushalmodi> @bevo009 do you mean nimcr? I have read about it, but not used it yet.
15:27:40*rokups joined #nim
15:31:12FromGitter<notTito> if converter change to template then its harder to write because a template doesnt have a result or return
15:33:36*yglukhov[i] quit (Remote host closed the connection)
15:34:18*yglukhov[i] joined #nim
15:36:11*jjido joined #nim
15:39:57*yglukhov[i] quit (Ping timeout: 264 seconds)
15:42:20*SenasOzys quit (Ping timeout: 245 seconds)
15:45:16*leorize joined #nim
15:52:19*SenasOzys joined #nim
16:01:22*Perkol joined #nim
16:04:17FromGitter<notTito> any chance templates return like procs? that would save us noobs
16:04:59Yardanicothey're for "code substitution" mainly
16:05:06Yardanicoand you can actually make them "return" values
16:06:32Yardanico@notTito https://gist.github.com/Yardanico/24bc924b7d54d30c127c1bc4a22b16cc
16:06:38Yardanicobut only works for when/case/if branches :)
16:06:47Yardanicoor wait actually
16:06:51YardanicoI'm dumb
16:07:03FromGitter<notTito> i know yardanico
16:07:16FromGitter<notTito> its just they have confused me so many times
16:07:25Yardanico@notTito https://gist.github.com/Yardanico/0c3bb147f50011624f9ead5fd9ea9e93
16:08:14FromGitter<notTito> why they can have a return type if for returning you need to do this hack
16:08:33FromGitter<notTito> (not asking you) just making questions
16:09:44FromGitter<notTito> i get errors every time i try to use them bc they are hard to understand and remember their logic so i avoid them
16:10:24Yardanicothere's not a lot of stuff to remember
16:10:46Yardanicolast expression in a proc/macro/template/whatever can be implicitely returned (as a result)
16:11:00Yardanicoif it's written without "discard"
16:12:14FromGitter<notTito> i dont have any examples at hand to show you the errors i am getting
16:27:22*miran quit (Ping timeout: 264 seconds)
16:32:12FromGitter<kayabaNerve> federico3 I can't create ref objects :(
16:32:42FromGitter<kayabaNerve> I've accepted it as a lost cause at all this
16:32:51FromGitter<kayabaNerve> *at this point and am moving on
16:32:54federico3huh?
16:33:08*PMunch quit (Remote host closed the connection)
16:33:50FromGitter<kayabaNerve> For the ARM CPU
16:33:56FromGitter<kayabaNerve> No GC
16:34:02FromGitter<kayabaNerve> No ref objects
16:34:16FromGitter<kayabaNerve> No other cstring to string
16:34:41Yardanicowell, you can do that if you have an OS :)
16:34:46FromGitter<kayabaNerve> Despite having a stdlib
16:34:49Yardanicobut yeah, you need to do something if you don't have an OS
16:34:52FromGitter<kayabaNerve> I do have Malloc
16:35:04Yardanicowell, Araq said that --gc:regions can be used for stdlib
16:35:40FromGitter<kayabaNerve> But it is 33mb
16:35:51Yardanicowhat do you mean by that?
16:36:01*leorize quit (Read error: Connection reset by peer)
16:36:08FromGitter<kayabaNerve> I only have 64kb :p
16:36:14Yardanicowell, because you need to use specific "regions"
16:36:28FromGitter<kayabaNerve> I'm complaining about my own issues on a lost cause and asking you guys to make it better
16:36:29Yardanicoyou need to split your code in gc "regions" AFAIK
16:36:34FromGitter<kayabaNerve> That's what I'm accepting at this point
16:37:15FromGitter<kayabaNerve> And that could help but it'd need to end up less than 10kb
16:39:57*leorize joined #nim
16:41:10*BitPuffin quit (Ping timeout: 264 seconds)
16:41:24dom96You've got 64kb? Sounds like you should avoid the GC then
16:41:50FromGitter<kayabaNerve> dom96 yeah. That's what I'm saying.
16:42:17FromGitter<kayabaNerve> I'm just annoyed that I have a stdlib but Nim thinks I don't
16:42:32*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:44:27FromGitter<kayabaNerve> But Nim is a great language
16:44:31FromGitter<kayabaNerve> Makes dev so easier
16:46:35FromGitter<notTito> can int be 2bytes?
16:46:56FromGitter<notTito> i saw it in @2vg wiki
16:47:44Yardanicoint16?
16:49:35FromGitter<notTito> no int
16:49:43Yardanico2bytes - int16
16:49:49FromGitter<notTito> when sizeof(int) == 2
16:50:03Yardanicoah, well, maybe there are some devices :)
16:50:13Yardanicoah, I mean, 16 bit devices probably
16:51:44*leorize quit (Read error: Connection reset by peer)
16:54:12FromGitter<kayabaNerve> Nim does support those :p
16:55:13Yardanicoit supports almost any piece of hardware given that there's a C compiler able to compile for this device
16:56:54*leorize joined #nim
17:02:59FromGitter<notTito> nice
17:22:07*Vladar quit (Read error: Connection reset by peer)
17:25:31*Vladar joined #nim
17:41:08krux02_sizeof is often propagated to the c compiler
17:41:23krux02_this means that sizeof will not be evaluated at nim compile time
17:44:21FromGitter<mratsim> by the way regarding the sizeof and alignof PR @Krux02, is it still stuck?
17:46:21FromGitter<mratsim> this one: https://github.com/nim-lang/Nim/pull/5664
17:50:55*Perkol quit (Quit: Leaving)
17:54:53*leorize quit (Ping timeout: 265 seconds)
17:56:38*leorize joined #nim
18:02:35*petersjt014[m]1 joined #nim
18:02:35*Miguelngel[m]1 joined #nim
18:04:00*leorize1 joined #nim
18:04:06*oprypin quit (Ping timeout: 245 seconds)
18:04:07*leorize quit (Ping timeout: 245 seconds)
18:04:09*petersjt014[m] quit (Ping timeout: 245 seconds)
18:04:10*Miguelngel[m] quit (Ping timeout: 245 seconds)
18:04:10*dyce[m] quit (Ping timeout: 245 seconds)
18:04:12*qwertfisch quit (Ping timeout: 245 seconds)
18:04:13*qwertfisch joined #nim
18:04:14*qwertfisch quit (Changing host)
18:04:14*qwertfisch joined #nim
18:04:31*oprypin joined #nim
18:05:51*byteflame quit (Ping timeout: 240 seconds)
18:05:52*planetis[m] quit (Ping timeout: 240 seconds)
18:06:00*unclechu quit (Ping timeout: 255 seconds)
18:06:02*sg-james[m] quit (Ping timeout: 245 seconds)
18:06:07*endes[m] quit (Ping timeout: 256 seconds)
18:06:07*macsek1911[m] quit (Ping timeout: 256 seconds)
18:06:16*sroecker[m] quit (Ping timeout: 240 seconds)
18:06:16*sendell[m] quit (Ping timeout: 240 seconds)
18:06:16*carterza[m] quit (Ping timeout: 240 seconds)
18:06:18*hohlerde quit (Ping timeout: 260 seconds)
18:06:27*zielmicha[m] quit (Ping timeout: 255 seconds)
18:06:27*marszym[m] quit (Ping timeout: 255 seconds)
18:06:30*federico3[m] quit (Ping timeout: 245 seconds)
18:06:31*yglukhov quit (Ping timeout: 245 seconds)
18:06:42*narimiran[m] quit (Ping timeout: 256 seconds)
18:06:43*TheManiac quit (Ping timeout: 260 seconds)
18:06:46*notdekka[m] quit (Ping timeout: 260 seconds)
18:06:49*Jipok[m] quit (Ping timeout: 256 seconds)
18:06:52*pqflx3[m] quit (Ping timeout: 240 seconds)
18:06:54*libman[m] quit (Ping timeout: 255 seconds)
18:06:54*hitchhooker[m] quit (Ping timeout: 255 seconds)
18:07:14*gh0st[m] quit (Ping timeout: 260 seconds)
18:07:16*Demos[m] quit (Ping timeout: 256 seconds)
18:07:16*Abnegation quit (Ping timeout: 256 seconds)
18:07:17*petersjt014[m]1 quit (Ping timeout: 260 seconds)
18:07:17*Miguelngel[m]1 quit (Ping timeout: 260 seconds)
18:07:17*xomachine[m] quit (Ping timeout: 260 seconds)
18:07:22*solitudesf quit (Ping timeout: 256 seconds)
18:08:00*cornfeedhobo quit (Ping timeout: 260 seconds)
18:08:08Yardanicowoopsie, matrix-irc bridge down again xD
18:08:27*copygirl quit (Ping timeout: 240 seconds)
18:10:01*cornfeedhobo joined #nim
18:10:11dom96And this is what makes me worried about using Matrix for a bridge :P
18:10:15dom96It seems to go down quite often
18:12:14*skrzyp quit (Remote host closed the connection)
18:12:53shashlickIt's why I stopped using riot and moved to weechat
18:13:02*skrzyp joined #nim
18:16:51YardanicoAnd all these ~30-40 people can't talk with us :(
18:22:54*yglukhov[i] joined #nim
18:24:26*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
18:24:31*cspar joined #nim
18:27:35*yglukhov[i] quit (Ping timeout: 276 seconds)
18:31:51federico3a function to escape unprintable chars in strings?
18:35:30*copygirl joined #nim
18:38:03krux02_mratsim: no I am not stuck, I just work fulltime on another project I have an ideo for a solution now
18:39:06shashlickWhich people are in the matrix room? Why not just use the irc proxy
18:55:57*Arrrr joined #nim
19:11:19*BitPuffin joined #nim
19:18:43*Trustable joined #nim
19:19:41*yglukhov[i] joined #nim
19:21:36*Arrrr left #nim (#nim)
19:23:25*yglukhov[i] quit (Read error: Connection reset by peer)
19:27:02*rokups quit (Quit: Connection closed for inactivity)
19:27:31*leorize1 quit (Ping timeout: 256 seconds)
19:28:18*NimBot joined #nim
19:28:46*miran joined #nim
19:38:34*yglukhov[i] joined #nim
19:41:17*miran_ joined #nim
19:41:41*miran quit (Ping timeout: 276 seconds)
19:42:42*yglukhov[i] quit (Ping timeout: 245 seconds)
19:51:39*miran_ is now known as miran
20:11:14*leorize1 joined #nim
20:11:14*leorize1 is now known as leorize
20:13:38*Trustable quit (Remote host closed the connection)
20:16:47*leorize quit (Read error: Connection reset by peer)
20:21:27*clyybber joined #nim
20:22:38*leorize joined #nim
20:25:20clyybberDid the gitter-irc bridge brake down?
20:25:32FromGitter<Clyybber> test
20:25:38FromGitter<Clyybber> apparently not
20:25:45clyybbergreat
20:30:28*pqflx3[m] joined #nim
20:38:26*leorize quit (Ping timeout: 260 seconds)
20:39:57*BitPuffin quit (Remote host closed the connection)
20:40:05*leorize joined #nim
20:46:44*hitchhooker[m] joined #nim
20:46:45*federico3[m] joined #nim
20:46:45*gh0st[m] joined #nim
20:46:45*byteflame joined #nim
20:46:45*Abnegation joined #nim
20:46:46*yglukhov joined #nim
20:46:46*Miguelngel[m] joined #nim
20:46:46*dyce[m] joined #nim
20:46:47*solitudesf joined #nim
20:46:47*unclechu joined #nim
20:46:47*Demos[m] joined #nim
20:46:51*marszym[m] joined #nim
20:46:52*sg-james[m] joined #nim
20:46:52*carterza[m] joined #nim
20:46:52*TheManiac joined #nim
20:46:52*Jipok[m] joined #nim
20:46:52*petersjt014[m] joined #nim
20:46:52*macsek1911[m] joined #nim
20:46:52*sendell[m] joined #nim
20:46:52*narimiran[m] joined #nim
20:46:52Yardanicoyay, they are joining again!!
20:46:53*zielmicha[m] joined #nim
20:46:53*planetis[m] joined #nim
20:46:53*endes[m] joined #nim
20:46:54*xomachine[m] joined #nim
20:46:54*libman[m] joined #nim
20:46:54*sroecker[m] joined #nim
20:46:55*notdekka[m] joined #nim
20:46:55*hohlerde joined #nim
20:47:10Yardanicowelcome to the IRC, matrix users :P
20:50:00*PMunch joined #nim
20:51:27*leorize quit (Ping timeout: 245 seconds)
20:53:41*leorize joined #nim
20:53:44*nsf joined #nim
20:58:56*leorize quit (Read error: Connection reset by peer)
21:00:19*Vladar quit (Quit: Leaving)
21:04:15*leorize joined #nim
21:53:36*CodeVance joined #nim
21:55:26*leorize quit (Ping timeout: 260 seconds)
21:55:33CodeVancehow to get the path to nim executable that was used to compile the module
21:57:23*leorize joined #nim
22:00:19FromGitter<kayabaNerve> CodeVance: the compiler? What OS?
22:00:30CodeVanceany os.
22:00:34CodeVanceBut I'm using window
22:01:00CodeVanceI just want to add the path to the nim compiler used to compile the nim module
22:01:09CodeVanceat compile time
22:01:16FromGitter<kayabaNerve> The Path var
22:03:18FromGitter<kayabaNerve> cmd: $path ⏎ Powershell: $env:path
22:07:42*miran quit (Ping timeout: 245 seconds)
22:10:57*leorize quit (Ping timeout: 240 seconds)
22:11:21*rockcavera joined #nim
22:13:21*xet7 quit (Remote host closed the connection)
22:18:17PMunch`which nim` on Linux systems should work
22:18:27*leorize joined #nim
22:23:40CodeVanceI'm trying to get the specific path to the nim used to compile the script
22:23:48CodeVanceI know of which nim
22:24:08CodeVanceI'm going to just use manual variables until I find a better solution
22:26:08PMunchYeah I meant do a staticExec of "which nim", that will get the path and put it in a compile-time variable for you
22:27:23CodeVanceOh. Will that work?
22:27:27CodeVanceI didn't know that
22:27:31CodeVanceI'm gonna try
22:28:51*leorize quit (Ping timeout: 256 seconds)
22:31:28CodeVancedidn't work
22:31:56CodeVancewait trying again
22:32:08CodeVancewhere nim on windows works
22:39:20PMunchhttp://ix.io/1cRA
22:39:24PMunchThat works fine for me
22:39:49PMunchPrints out the path that was used to compile nim
22:40:27PMunchIf you want information (like the Nim version for example), you could swap that command for something like nim --version
22:41:17*nsf quit (Quit: WeeChat 2.1)
22:43:30PMunchhttp://ix.io/1cRB
22:44:19PMunchOf course if you did "/some/random/path/nim c test.nim" it wouldn't be correct
22:45:35PMunchTo get the absolute correct information you can use: https://nim-lang.org/docs/system.html#NimVersion
22:45:42PMunchOnly gives you the version though, not the path
22:47:13CodeVanceor you just leave it to the use
22:47:14CodeVanceuser
22:47:23CodeVanceor nimble might have something ...
22:47:25CodeVancemeh
22:47:33PMunchWhat are you trying to achieve?
22:48:10CodeVanceA script which calls nim to compile a script when a folder's content has changed
22:49:07PMunchAh, and you want to use the same version it was originally compiled with
22:51:16*cspar quit (Ping timeout: 256 seconds)
22:51:42CodeVancesure as a default
22:51:51CodeVancenot required but would be nice
22:52:35PMunchIf you have choosenim you could do something like execCmd("choosenim \"" & NimVersion & "\"")
22:52:44PMunchIt won't work for development versions though
22:53:52PMunchBut you might want to switch back as well afterwards
22:55:04PMunchSo I guess you could try to grab the current version with "nim --version", then use the above execCmd to switch to the version that was used for compiling, compile, and then switch back to the version you discovered through "nim --version"
22:55:31PMunchOr use "choosenim show" instead of nim --version
22:55:41CodeVancelol. I think the "let the user worry about it" method is better in this instance
22:55:44PMunchThat would probably make more sense
22:56:09CodeVanceif nim isn't in the path then throw error telling them to set the config file
22:56:29PMunchYeah, choosenim updates the binary in the path as well, so "which nim" won't work
22:57:31CodeVanceBTW is there another way of doing ternary/inline conditionals (I know you can do var plain_english_bool=case true of true:"Yes" else: "No" . But is there another way?
22:57:52PMunchHmm, I guess you could call "choosenim show" in a staticExec, then grab that path and store that for when you want to recompile..
22:58:07PMunchWell you can use ifs
22:58:25PMunchlet something = if myBool: "Hello" else: "world"
22:58:29CodeVanceI think the nim path is added to the path right before compiling
22:59:09PMunchI don't think so..
22:59:37CodeVanceoh then I'm wrong
23:00:27CodeVanceI know in nim.cfg if you use $nim it gives you nim's base directory
23:00:53*cspar joined #nim
23:03:27shashlickwhat's the syntax for =destroy? I'm getting an error on Linux but works on Windows
23:03:58shashlickError: signature for '=destroy' must be proc[T: object](x: var T)
23:04:51PMunchCode?
23:05:01PMunchhttps://nim-lang.org/docs/manual.html#type-bound-operations-destructors
23:05:13PMunchThat's the example from the manual on how to use `=destroy`
23:18:24PMunchHmm, packedjson is behaving weird..
23:18:31PMunchAraq you here?
23:20:25*cspar quit (Ping timeout: 256 seconds)
23:24:54shashlickPMunch: proc `=destroy`(svnz: var SvnzFile) =
23:24:57shashlickhow should it be
23:25:20*elrood quit (Quit: Leaving)
23:25:23PMunchYea that should work if SvnzFile is an object
23:25:37PMunchNot sure if it works on ref-objects, but I wouldn't think so
23:26:19*cspar joined #nim
23:26:23PMunchSo in that case you need one object and a "type SvnzFile = ref SvnzFileObj" declaration
23:29:02*clyybber quit (Quit: good night)
23:30:08*CodeVance1 joined #nim
23:33:14*dddddd quit (Remote host closed the connection)
23:33:22*CodeVance quit (Ping timeout: 264 seconds)
23:33:29*CodeVance1 is now known as CodeVance
23:33:50shashlickhow come it works on Windows but not Linux
23:34:51PMunchSame Nim version?
23:37:19CodeVancedifferent garbage collection scheduel?
23:38:04PMunchWhat are you trying to do?
23:59:21*thomasross quit (Remote host closed the connection)