<< 05-08-2019 >>

00:08:28clyybbergood night
00:08:29*clyybber quit (Quit: WeeChat 2.5)
00:10:34FromGitter<Varriount> @zacharycarter Do you have any libraries/frameworks to recommend for 2d games?
00:11:16*Jesin quit (Quit: Leaving)
00:14:40*Jesin joined #nim
00:20:09krux02_I have
00:20:11krux02_SDL2
00:20:18krux02_with software rendering
00:27:31disrupteki wouldn't say `no` to an alias for {1,2,3}.card() => .len()
00:45:58krux02_good idea :D
00:46:07krux02_I got that wrong mand times as well
00:46:34krux02_disruptek: if you make a pr for it, I will approve it
01:02:48disruptekaight.
01:17:35*krux02_ quit (Remote host closed the connection)
01:34:23*laaron joined #nim
02:16:05*rockcavera joined #nim
02:57:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:58:13*laaron joined #nim
03:15:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
03:17:46*laaron joined #nim
03:49:47FromDiscord_<sisyphus> This might be a dumb question but I couldn't find anything on it. Is there a way to use echo but not have it print a newline?
04:27:40*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
04:29:45*nsf joined #nim
04:32:04*laaron joined #nim
04:38:50FromGitter<zacharycarter> sdl2 is fine for most needs - unless you have a lot of sprites - like if you're trying to do particles or something
04:43:15*go|dfish quit (Ping timeout: 248 seconds)
04:46:00*dddddd quit (Remote host closed the connection)
04:48:18*go|dfish joined #nim
05:11:31*go|dfish quit (Ping timeout: 248 seconds)
05:15:12*fjellfras joined #nim
05:15:33*fjellfras quit (Max SendQ exceeded)
05:16:02*fjellfras joined #nim
05:16:25*go|dfish joined #nim
05:16:41*fjellfras quit (Max SendQ exceeded)
05:17:12*fjellfras joined #nim
05:17:49*fjellfras quit (Max SendQ exceeded)
05:18:17*fjellfras joined #nim
05:18:54*fjellfras quit (Max SendQ exceeded)
05:19:21*fjellfras joined #nim
05:42:57def-mratsim: I'm not doing anything Nim-related nowadays.
05:48:56*solitudesf joined #nim
06:03:04FromGitter<bevo009> @sisyphus ⏎ stdout.write prints without a new line ⏎ or use this proc: ⏎ ⏎ ```proc print*(args: varargs[string, `$`]) = ⏎ stdout.write(args) ``` [https://gitter.im/nim-lang/Nim?at=5d47c6984635976e043155c0]
06:59:44*krux02 joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:00:38*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:04:45*gmpreussner joined #nim
07:06:44*laaron joined #nim
07:12:05*fjellfras quit (Ping timeout: 268 seconds)
07:21:09FromGitter<Riderfighter> Hello everyone!
07:22:38FromGitter<zacharycarter> hi Riderfighter
07:22:56FromGitter<zacharycarter> well - still no luck with Nim hcr - I think you called it Araq - I'd run into another bug I don't understand
07:23:13FromGitter<zacharycarter> gdb is telling me - `Backtrace stopped: previous frame identical to this frame (corrupt stack?)` when I try to print a backtrace after I run into a sigsev
07:32:22Zevvvaaaalgriiind!
07:33:13FromGitter<zacharycarter> on windows
07:34:49FromGitter<Riderfighter> hey zevv 👋
07:35:41Zevvthen it's not a sigsegv :)
07:36:46FromGitter<zacharycarter> well whatever
07:36:59FromGitter<zacharycarter> I'm compiling with mingw and using gdb
07:40:18shashlick@Araq - I'm 50-50 between windows and Linux
07:40:32shashlickWindows is daily driver
07:45:24Araqok, then we should give --newruntime a try IMO
07:52:33shashlickHow does new runtime work with dlls?
07:53:03shashlickI presume you are suggesting for feud, but it is 100% windows right now
08:00:59FromGitter<mratsim> btw do owned refs have their finalizer/destructors in newruntime?
08:01:55FromGitter<mratsim> and does custom allocators work at the moment?
08:06:47*fjellfras joined #nim
08:14:28livcdwhen should i use the --newruntime?
08:17:22FromGitter<mratsim> When you want to live dangerously but don't like to walk through a crossroad when it's red for you.
08:33:08*floppydh joined #nim
08:40:04*floppydh quit (Quit: WeeChat 2.5)
08:40:16*floppydh joined #nim
08:52:31*mlkzdk joined #nim
08:54:34*fjellfras_ joined #nim
08:56:18*fjellfras quit (Ping timeout: 268 seconds)
08:58:14*fjellfras joined #nim
08:59:16*fjellfras_ quit (Ping timeout: 246 seconds)
09:03:25*fjellfras_ joined #nim
09:03:42*fjellfras quit (Ping timeout: 268 seconds)
09:15:44*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
09:16:50*skelett quit (Quit: WeeChat 2.4)
09:19:15*skelett joined #nim
09:20:02*laaron joined #nim
09:22:24FromGitter<Riderfighter> Well I just ran into a really weird bug
09:24:03FromGitter<Riderfighter> let me make sure i'm not being stupid but right now my nearly created seq using newSeq w a size of 16 turns into a seq w a size of 31
09:29:21FromGitter<Riderfighter> heh ik why
09:36:03*mlkzdk quit (Ping timeout: 248 seconds)
09:40:18FromGitter<gogolxdong> forward question: Where to find docs directory after jekyll build nim-lang/website?
09:41:35FromGitter<mratsim> @Riderfighter that sounds strange, any repro code?
09:46:43FromGitter<Riderfighter> @mratsim it was because I was messing with copymem, no unsafeaddr's though
09:47:45FromGitter<Riderfighter> I'll try and remake a simple example
09:48:50FromGitter<Riderfighter> I actually don't remember what I did to be honest lol
09:52:54FromGitter<mratsim> you probably forget to take myseq[0].addr and overwrote the data structure length field
09:53:02FromGitter<mratsim> vs myseq.addr
10:02:18*stefanos82 joined #nim
10:02:35FromGitter<Riderfighter> yeah that looks like what I did, I just undid all my stuff
10:07:58FromGitter<Riderfighter> it was weird though
10:08:39FromGitter<Riderfighter> since I had three different variables that were all newSeqbyte (16), but when the second seq[byte] went through my proc the length wasn't 16 anymore
10:10:35FromGitter<Riderfighter> `newSeqbyte (16)` instead of w/e gitter parsed that as
10:26:42*fjellfras_ quit (Ping timeout: 245 seconds)
10:28:14*fjellfras_ joined #nim
10:28:50*fjellfras_ quit (Max SendQ exceeded)
10:29:19*fjellfras_ joined #nim
10:29:57*fjellfras_ quit (Max SendQ exceeded)
10:30:28*fjellfras_ joined #nim
10:38:59*dddddd joined #nim
10:43:34*lritter joined #nim
10:50:43*abm joined #nim
10:58:22*Vladar joined #nim
11:02:40*mlkzdk joined #nim
11:04:55*mlkzdk quit (Read error: Connection reset by peer)
11:17:52*fjellfras_ quit (Quit: Leaving)
11:42:18Mister_Magister!eval let ar: array = ["a"]; if "a" in array: discard
11:42:21NimBotCompile failed: /usercode/in.nim(1, 31) Error: type mismatch: got <type array, string>
11:42:31Mister_Magisterany idea how to solve it?
11:42:45Mister_Magisterwhat is wrong with it
11:44:36Mister_Magister!eval let ar: array = [1]; if 1 in array: discard
11:44:38NimBotCompile failed: /usercode/in.nim(1, 27) Error: type mismatch: got <type array, int literal(1)>
11:46:45FromGitter<Vindaar> there's no such thing as the type "array". If you want to manually use write the type, it's gotta be `array[1, string]` (first case) or `array[1, int]` (second case). ⏎ Also "in array" is wrong, since you want to check the content of your just defined variable `ar`, not the type
11:48:27Mister_Magister@Vindaar so how would you define "array" with ints and if some number is in that "array"?
11:48:42euantorMister_Magister: like this https://www.irccloud.com/pastebin/jAyExYC9/
11:49:12euantor`1` is the array length, `string` is the array's element tye
11:49:27Mister_Magisterand more elemets would be [1,2,3,array] ?
11:49:34Mister_Magisterohh
11:49:50Mister_Magisteri get it thanks!
11:50:03*Kaivo joined #nim
11:50:37euantoryou don't need to specify the type though, so `let ar = ["a"]` would be inferred as `array[1, string]`
11:52:45*adeohluwa joined #nim
11:57:47Mister_Magister!eval let sudo_file: array[2, int64] = [604210590, 932317680]; let t: int64 = 1; if t in sudo_file: discard
11:57:49NimBotCompile failed: /usercode/in.nim(1, 34) Error: type mismatch: got <array[0..1, int]> but expected 'array[0..1, int64]'
11:57:58Mister_Magistereuantor: ehere is your god now ;-;
11:58:33Mister_Magisters/ehere/where/
11:58:56FromGitter<zacharycarter> !eval let sudo_file: array[2, int64] = [604210590'i64, 932317680]; let t: int64 = 1; if t in sudo_file: discard
11:58:58NimBot<no output>
11:59:31euantorMister_Magister: check this :) https://www.irccloud.com/pastebin/g0ypur5F/
11:59:57euantoralternative is `int64(604210590), int64(932317680)`
12:00:24FromGitter<zacharycarter> you only really have to be specific for the first element of the array
12:00:32FromGitter<zacharycarter> the rest are inferred
12:00:37euantoryeah, true
12:00:45euantorI usually like to do it for all elements
12:01:27Mister_Magister!eval let sudo_file: array[2, int64] = [604210590'int64, 932317680]; let t: int64 = 1; if t in sudo_file: discard
12:01:30NimBotCompile failed: /usercode/in.nim(1, 44) Error: invalid number: '604210590'i'
12:01:45Mister_Magisterdoesn't seem to work euantor
12:01:59FromGitter<mratsim> probably bot quirk with quote
12:02:05Mister_Magister!eval let sudo_file: array[2, int64] = [604210590'64, 932317680]; let t: int64 = 1; if t in sudo_file: discard
12:02:05FromGitter<mratsim> or irc quote quirks
12:02:07NimBotCompile failed: /usercode/in.nim(1, 44) Error: invalid number: '604210590'64'
12:02:13Mister_Magister!eval let sudo_file: array[2, int64] = [604210590'i64, 932317680]; let t: int64 = 1; if t in sudo_file: discard
12:02:16NimBot<no output>
12:02:19Mister_Magistertypo
12:02:55Mister_Magisterwhere can i find documentation about '
12:03:39euantorMister_Magister: `'i64` instead of `'64` or `'int64`
12:04:07FromGitter<mratsim> it's just a way to attach a type to a literal
12:04:24FromGitter<mratsim> 1'i64 vs 1'i32
12:05:20euantorA list of type suffixes is here: https://nim-lang.org/docs/manual.html#types-preminusdefined-integer-types -search for `The type suffixes are:`
12:06:04Mister_Magistereuantor: ye ye
12:06:06Mister_Magistertypo
12:07:23Mister_Magistereuantor: more like https://nim-lang.org/docs/manual.html#lexical-analysis-numerical-constants
12:07:33*nif quit (Quit: ...)
12:07:42*nif joined #nim
12:15:08euantoryeah, sorry
12:17:46Mister_Magisterdon't be :P thank you all
12:44:23*adeohluwa quit (Remote host closed the connection)
12:44:35*nsf quit (Quit: WeeChat 2.4)
12:44:36*adeohluwa joined #nim
12:45:24*adeohluwa quit (Remote host closed the connection)
13:19:53leorize[m]please don't specify the types manually though
13:20:17Mister_Magisterleorize[m]: how would you do it then
13:20:28Calinoutype inference will assign the type automatically for you
13:20:48Mister_Magisterbut it assigned the int instead of int64 isn't that right?
13:21:09leorize[m]!eval let sudo_file = [604210590'i64, 932317680]; let t = 1'i64; if t in sudo_file: discard
13:21:12NimBot<no output>
13:21:31Mister_Magisteru specified type
13:23:45leorize[m]I'd also tell you to use camelCase, but then style-insensitivity is designed for this
13:24:31Mister_Magisteryee camelCase ftw
13:24:39leorize[m]i omitted the type of sudo_file and t
13:24:43livcdAraq did you already comment on the d:release and d:danger ?
13:24:46Mister_Magisterit's not my code
13:24:49Mister_Magisterah ye
13:25:03leorize[m]'i64 is a part of the constant if you're asking
13:25:15*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
13:25:40leorize[m]also the ' is not really required, the 1i64 also works
13:26:17Araqlivcd, link?
13:26:19*laaron joined #nim
13:37:34*snowolf quit (Read error: Connection reset by peer)
13:37:43*Cadey quit (Ping timeout: 276 seconds)
13:38:20*snowolf joined #nim
13:38:36*Cadey joined #nim
13:40:45*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
13:41:39*laaron joined #nim
13:54:00livcdAraq: https://github.com/nim-lang/Nim/issues/11860
13:57:00AraqI use 'koch boot -d:release' more often than 'koch boot -d:danger'
13:57:26AraqI almost never use 'koch boot -d:danger', I'm working on IC to make the compiletimes scalable
13:57:50Araqand I don't think yet-another RFC bikeshedding about the name 'danger' would have solved anything
13:59:25Araqthis change wasn't done in a vacuum either, plenty of people screamed for more safety
14:19:52livcdAraq: i was wondering about the perf difference
14:21:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:22:17Araqwe produce shitty code for integer overflow detection
14:22:44Araqthere is a better way to do it but it's disabled
14:23:12Araqbut I suspect the overhead comes from all these checks that add up :P
14:24:20Araqbut we could make nightlies use -d:danger indeed
14:26:00*nsf joined #nim
14:26:01*laaron joined #nim
14:27:20leorizewhy don't we use the better way then?
14:29:16Araqa day only has 24 hours
14:31:03FromDiscord_<Kiloneie> Can someone help me with Nim in Action book's chapter 3 start code ? The code provided in the book just won't work for me, i tried researching the procedures used in the example in the os library, but i can't figure out the problem.
14:31:57FromDiscord_<Kiloneie> Can someone help me with Nim in Action book's chapter 3 start code ? The code provided in the book just won't work for me, i tried researching the procedures used in the example in the os library, but i can't figure out the problem.
14:31:57FromDiscord_<Kiloneie>
14:31:57FromDiscord_<Kiloneie> Code:
14:31:57FromDiscord_<Kiloneie>
14:31:57FromDiscord_<Kiloneie> import os
14:31:58FromDiscord_<Kiloneie> echo("Chat application started")
14:31:58FromDiscord_<Kiloneie> if paramCount() == 0:
14:32:00FromDiscord_<Kiloneie> quit("Please specify the server address, e.g. ./client localhost")
14:32:00FromDiscord_<Kiloneie>
14:32:02FromDiscord_<Kiloneie> let serverAddr = paramStr(1)
14:32:03FromDiscord_<Kiloneie> echo("Connecting to ", serverAddr)
14:32:14leorizeplease avoid pasting code to discord
14:32:45leorizeuse play.nim-lang.org or a paste service as code will be streamed to IRC line-by-line
14:33:37leorizeI don't see any problem with that code though, what's your error?
14:33:58FromDiscord_<Kiloneie> Error: execution of an external program failed: '"c:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication\src\client.exe" '
14:34:32leorizeof course it would fail :P
14:34:38leorizesee the `quit` condition
14:35:10leorizeyou didn't pass any parameter to the client
14:35:37leorizetry `client.exe localhost` in cmd
14:36:01FromDiscord_<Kiloneie> wait, you actually run this from the command line ?
14:36:14*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:36:29*nif quit (Quit: ...)
14:36:39*nif joined #nim
14:36:42leorizeyea?
14:37:14FromDiscord_<Kiloneie> So running it from Vs Code is just wrong...
14:37:27leorizeyou can use the terminal in vscode to run it as well
14:38:11leorizealso, doesn't the "Please specify the server address" message appear?
14:38:52*laaron joined #nim
14:39:01FromDiscord_<Kiloneie> Hint: operation successful (34862 lines compiled; 0.809 sec total; 46.922MiB peakmem; Debug Build) [SuccessX]
14:39:01FromDiscord_<Kiloneie> Hint: "c:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication\src\client.exe" [Exec]
14:39:01FromDiscord_<Kiloneie> Chat application started
14:39:01FromDiscord_<Kiloneie> Command line parameters: @[]
14:39:01FromDiscord_<Kiloneie> Please specify the server address, e.g. ./client localhost
14:39:04FromDiscord_<Kiloneie> Error: execution of an external program failed: '"c:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication\src\client.exe" '
14:39:04FromDiscord_<Kiloneie> PS C:\Users\Kiloneie\Desktop\Nim Projects\ChatApplication>
14:39:05FromDiscord_<Kiloneie>
14:39:07FromDiscord_<Kiloneie> This is the whole output
14:39:30leorizewell, it asked you to specify the server address...
14:42:01FromDiscord_<Kiloneie> In the VS Code, how do i get to my src folder, cmd's cd function doesn't work here, it automatically puts me one level above
14:42:34leorize`cd src` doesn't work?
14:42:51leorizethen you can do this "trick": `.\src\client.exe localhost`
14:43:21FromDiscord_<Kiloneie> It does... but i tried pasting the full path and that didn't work xD...
14:44:43FromDiscord_<Kiloneie> Now it works... i kept just running the code using F6, completely missing the point
14:44:48FromDiscord_<Kiloneie> Thanks
14:51:21FromDiscord_<Kiloneie> What code pasting website/service do you guys use btw ?
14:51:51FromDiscord_<Kiloneie> What code pasting website/service do you guys use btw ? Probably the playground for Nim i guess.
14:52:01Cadeyi prefer https://gist.github.com
14:52:27leorizeI use ix.io, which is used by the playground also
14:52:57FromDiscord_<Kiloneie> It does have that nice Nim coloring
14:52:58leorizealso @Kiloneie, please avoid editing your messages on discord
14:53:16Cadeyhow do i depend on arbitrary git repos with nimble?
14:53:59leorizerequire "<git repo url>"
14:54:00FromDiscord_<Kiloneie> Okay, i guess it can be annoying when someone starts to read your message xD...
14:54:01lqdev[m]@Kiloneie I use termbin
14:54:44leorize@Kiloneie well this is how editing looks like to us IRC users https://irclogs.nim-lang.org/05-08-2019.html#14:51:21
14:55:20FromDiscord_<Kiloneie> O,O, okay
15:07:19FromDiscord_<Kiloneie> Did you guys buy the book Nim in Action ?
15:14:12leorizeI didn't have the funds to buy it, and now I know Nim well enough to not need it :P
15:17:45FromDiscord_<Kiloneie> I bought it yesterday, im gonna read as well as do the exercises on Nim Track | Exercism, then proceed to make some tutorial videos on Nim on YouTube
15:22:52Araqnice, thanks!
15:24:15FromDiscord_<Kiloneie> You're welcome :P! I will be posting drafts/unfinished videos here or on the forum(or both) to see what you guys think beforehand so i can fix any problems and improve them.
15:35:19disruptekthis http response length issue is the kind of black-box misfeature that could really waste some time for a lot of people.
15:39:36Araqwhy?
15:39:48Araqif the browser eats it we have to too
15:42:26Mister_Magisteris there something like var_dump in nim?
15:44:34disruptekyou know, i was going to say that some that write software that uses the network don't understand the network, but i realized that they would find it easier to read the code, which they presumably understand. so maybe it doesn't matter than a get mysteriously returns no response in nim alone.
15:52:21*Kaivo quit (Quit: WeeChat 2.5)
15:56:25*Kaivo joined #nim
16:01:07*Kaivo quit (Client Quit)
16:01:24*Kaivo joined #nim
16:03:15*floppydh quit (Quit: WeeChat 2.5)
16:06:33FromDiscord_<Kiloneie> Does anyone know a good program for writting organized notes ? Im writting all my notes in windows sticky notes and it works... but not enough, no search filter etc.
16:06:33FromDiscord_<Kiloneie>
16:06:33FromDiscord_<Kiloneie> I tried getting it into xmind, but i don't really know if i like it or not... maybe there is something better
16:14:57FromGitter<zetashift> org-mode but it has somewhat of a learning curve?
16:16:46FromDiscord_<Kiloneie> How do i find that ? Google provides tshirts...
16:17:37disruptekhttps://orgmode.org/
16:21:54FromGitter<zetashift> (also we have a nim-lang off-topic channel for stuff like this, not sure how to reach it from Discord)
16:23:39FromDiscord_<Kiloneie> I see text channels: general, offtopic, discord-only, test
16:23:39FromDiscord_<Kiloneie> What isn't covered in the general channel ?
16:25:15FromGitter<zetashift> Everything not Nim-related can go into the offtopic I suppose
16:54:40Araqshashlick, ok, so now how to reproduce your problem?
16:56:21shashlickSo if you pull latest head for feud, comment out boehm from nim.cfg and nimble debug on windows, it should build with gcasserts
16:56:32shashlickUse 0.20.x or devel
16:56:44shashlickApp crashes on startup
16:56:54shashlickI know it isn't a minimal setup
16:57:35shashlickI have tried removing the entire portion of monitoring dlls in separate thread
16:58:55shashlickI also made the plugins not use ptrs to refs, tried allocShared as well as global vars
16:59:28FromGitter<mratsim> Yeah I've raised 200 bugs to the Nim rpo :p
16:59:31FromGitter<mratsim> repo*
17:02:25Araqcongrats
17:03:54Araq nimble search feud
17:03:54Araq Error No package found.
17:04:41shashlickgit clone https://github.com/genotrance/feud
17:04:49shashlickon Windows
17:07:22Araqok
17:09:44AraqInstalling [email protected]
17:09:44Araq Prompt: [email protected] already exists. Overwrite? [y/N]
17:09:44Araq Answer: n
17:09:57Araq(Nimble dies)
17:10:53Araqcan we please get Nimble out of this embarrassing state?
17:11:32Araqfirstly, why does it ask me whether to reinstall [email protected] when I already have it
17:11:43Araqsecondly, when I press 'n' it should continue
17:13:04Araqanyway, no I have
17:13:05Araq Error: Nothing to build. Did you specify a module to build using the `bin` key in your .nimble file?
17:13:49shashlickyou need to `nimble release` or `nimble debug` since it builds all the dlls and the main exe
17:14:12shashlickuse debug since you will get gcasserts
17:15:30shashlickyou can also create an allow.ini with one line, config - that way only the config plugin will be loaded
17:15:59shashlickplugins\allow.ini
17:20:37*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
17:20:51disruptekcomments kinda thin, no? https://play.nim-lang.org/#ix=1QGY
17:21:36Zevvis there a defined() for --newruntime?
17:22:00shashlickno it is just --newruntime from the fullhelp
17:22:31Zevvsorry, other way around: how can I detect if code is compild with newruntime?
17:22:36ZevvI'd like to when: out some code
17:23:32FromGitter<mratsim> newruntime works, just look into system.nim
17:24:10Zevvbut not yet implemented for Tables and Json etc, right
17:24:28FromGitter<mratsim> ah no sorry https://github.com/nim-lang/Nim/blob/2dc8a323242b639875d24d1baa7c8c9da2055fe2/tests/destructor/t7346.nim#L5
17:24:33ZevvI'd like to run my test suite with newruntime, but then I need to disable some parts for now
17:24:35FromGitter<mratsim> nimNewRuntime is the trick
17:24:45*laaron joined #nim
17:25:15shashlickwhen defined(nimV2):
17:25:23FromGitter<mratsim> I wonder, does newruntime implies destructors?
17:25:59ZevvnimV2, that has hits in other libs, thanks
17:27:26shashlickhttps://github.com/nim-lang/Nim/blob/devel/lib/system.nim#L3128
17:33:05Zevvhm I have codegen issues with newruntime, redeclaration of identifiers...
17:33:24disruptekam i doing this right? https://play.nim-lang.org/#ix=1QH6
17:33:59disruptekZevv: i wish you'd quit doing that.
17:34:23Zevvsorry
17:34:44Zevvif you elaborate on what exactly offended you, I can take care in the future to avoid doing just that
17:34:44shashlickhttps://en.wikipedia.org/wiki/The_Men_Who_Stare_at_Goats_(film)
17:34:44*disruptek 🤪
17:35:06disruptekhey, goats are a thing.
17:35:13disruptekit's hard out here for a goat.
17:35:38disruptekZevv: the redeclarations are really getting to me, my bad.
17:35:52Zevvyour bad?
17:35:59disruptekmea culpa
17:36:13Zevvand they're all called s2. Is your goat also called s2?
17:36:22shashlick@disruptek - maybe this gives some ideas? https://github.com/genotrance/feud/blob/master/src/pluginapi.nim#L63
17:36:45disruptekhis name is steve, but he answers to s2. maybe it's a pointer.
17:36:56Zevvmine is a NimStringV2
17:37:00Zevvoh, mine *are* NimStringV2
17:37:55disruptekshashlick: well, i want to pass a static string and have it get used as the filename in a static function call.
17:41:05shashlickit's already a macro, why do you need static inside it
17:43:58disrupteki don't, thanks.
17:44:35disruptekfor some reason, i thought it was like a specific closure environment i had to enter.
17:46:26shashlicki have difficulty getting into the macro mentality - i get that it runs at compile time but the code should generate something that happens at runtime
17:47:50disrupteki just don't understand why i can work with nimnodes during compilation but not during runtime.
17:48:00disruptekdoesn't the compiler work with nimnodes during runtime?
17:48:46shashlicknimnodes = ast which gets rendered by gcc to executable - no more nimnodes at runtime
17:48:53Araqshashlick, feud/build/scintilla/win32/HanjaDic.cxx:10:23: fatal error: string_view: No such file or directory
17:48:53Araq #include <string_view>
17:48:53Araq ^
17:48:53Araqcompilation terminated.
17:48:58shashlickcompiled vs interpreted
17:49:20shashlickAraq - let me check - i got a similar report on nimscintilla, guess they updated their repo
17:49:40disrupteki want to write a problem that manipulates nim ast outside of compilation. that's not possible currently, though the compiler does it.
17:50:22disrupteki don't see how that's a hard concept.
17:50:31disrupteks/problem/program/
17:51:35shashlickAraq: what version of gcc you using?
17:53:02*encryptize[m] joined #nim
17:54:50encryptize[m]Hey! I've got a question. How can I make arguments in my program? I'm using Telebot and want the command to be with arguments. I mean, for example /help command.
17:55:56FromGitter<zetashift> encryptize[m] : check out https://nim-lang.org/docs/parseopt.html
17:56:17FromGitter<zetashift> or https://github.com/docopt/docopt.nim
17:57:44encryptize[m]Okey.
18:00:26shashlick@Araq: looks like string_view is not available in mingw 6.3.0 that is on http://nim-lang.org
18:00:34shashlickit's there on v8.1.0 that i use
18:00:40Araqok...
18:01:01Araqcan you give me a download link?
18:01:20shashlicka sec
18:01:59shashlickhttps://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/sjlj/x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0.7z
18:03:09Araqwe should ship that one with Nim 0.20.4 then
18:04:45shashlicki'll look into bumping up the version - we will need to update all CIs as well
18:07:42Araqhuh? posix-sjlj ?
18:08:05shashlicki just picked the one that is most downloaded
18:09:08rockcaverawin32 seh download in Nim page
18:09:33shashlickokay looks like posix-dwarf is most downloaded for windows
18:10:29shashlickwell, but that is for i686
18:10:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
18:10:40Araqsjlj sucks, we want seh
18:10:50Araqor better
18:11:14*laaron joined #nim
18:11:21shashlickokay yes, seh is most downloaded
18:11:25shashlickhttps://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download
18:11:53shashlickx86_64-posix-sjlj, x86_64-posix-seh, x86_64-win32-sjlj, x86_64-win32-seh are the four options
18:17:09Araqx86_64-win32-seh
18:20:28Araqplease
18:24:32shashlickhttps://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/seh/x86_64-8.1.0-release-win32-seh-rt_v6-rev0.7z
18:27:09FromGitter<Varriount> shashlick: Man, the Mingw-w64 project is *still* using Sourceforge?
18:27:46shashlickYep at least for files
18:30:05FromGitter<Varriount> I'm still miffed that Mingw-gcc links with mscvrt.dll, rather than an official Microsoft C runtime
18:47:50Araqshashlick, Plugin 'config' crashed in 'set()'
18:50:06shashlickDid you turn off boehm
18:50:28shashlickThem it will build with standard gc and asseets
18:50:42shashlickIt does crash in config in various places
18:51:14shashlickSet is a callback called from handlePluginCommand in plugins
18:51:34shashlickSometimes in hook, sometimes in execConfig
18:51:53FromGitter<arnetheduck> Araq, fwiw I just added dwarf eh to `nlvm` (haven't pushed yet).. man, handling `finally` is a pain.
18:52:03shashlickplg is the plugin object created by main thread in plugin.nim
18:52:16shashlickIt is passed to the callbacks
18:53:28shashlickThe contents of plg are what get messed up
18:53:37FromGitter<arnetheduck> I have a project on sourceforge since 2004:ish :)
18:54:02shashlickMainly the callbacks table which is used to track the callbacks in each plugin
18:54:19shashlickSo handlePluginCommand no longer finds callbacks further down
18:55:23Araqshashlick, just give me the command to get a "GC assert"
18:55:45Araqassume that I know nothing and that I don't want to think
18:56:22*laaron quit (Remote host closed the connection)
18:58:42*laaron joined #nim
19:01:06shashlickIt should crash on startup itself
19:01:44shashlickOnly allow config plugin to run, turn off boehm and run
19:05:12disruptekthis might be the most difficult reproduction i've seen yet.
19:06:33*NimBot joined #nim
19:08:30*Vladar quit (Ping timeout: 244 seconds)
19:08:53*Vladar joined #nim
19:10:49Araqshashlick, well I now have an empty feud.ini and it dies with
19:11:08AraqError: call depth limit reached in a debug build (2000 function calls).
19:17:50shashlickAgain because my objects get emptied out or corrupted
19:18:11shashlickBut I'm amused you aren't getting asserts
19:21:31Araqwell it's great that you are amused but I'm trying to help you, finally.
19:22:07shashlickI'll be in front of a computer in 5 minutes and try to simplify
19:22:24shashlickAlso will change over to seh in case it makes a diff
19:22:31Araqand you're violating Kernighan's rule
19:22:48Araq"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
19:22:59shashlickAm in UK with family so
19:23:10shashlickReally appreciate it Araq 😁
19:23:41shashlickHappy to learn and apply back for the community
19:27:26disruptekalso, it's twice as hard to understand someone else's code, so by all means, do it your way, but pretend an imbecile is trying to follow your logic. 😁
19:30:15shashlickNim gdb has definitely made things easier but once you go into compiler territory, it gets complex fast
19:30:15Araqload*: SharedSeq[string]
19:30:34Araq^ how do you think this can work?
19:30:42shashlickThat's the shared lib I made
19:30:59shashlickBecause of this issue
19:31:20shashlickBut I've also tried direct loading dll without any of this sharing
19:31:21*nsf quit (Quit: WeeChat 2.4)
19:31:47shashlickRemoved monitorPlugins
19:32:58shashlickYou know, let me try and make a simple sample for you to debug
19:33:33shashlickYou've tried enough - if you aren't seeing the assert then no point
19:54:32FromGitter<iffy> I'm updating from an older version of Nim to 0.20.2 and am getting Error: can raise an unlisted exception: RootEffect in my custom logger:
19:54:52FromGitter<iffy> https://gist.github.com/iffy/062be86fe228d5fe6449cf90a9551b71
19:55:22FromGitter<iffy> It's complaining because the `fn(ln)` call on line 11 can raise RootEffect? maybe?
19:58:12FromGitter<iffy> I'm trying to understand the error so that I know what to fix
20:09:07*Jesin quit (Quit: Leaving)
20:09:09shashlickWhere is RootEffect defined
20:09:49shashlickYou need to identify all exceptions with the raises pragma
20:11:18FromGitter<iffy> I think RootEffect is defined in Nim
20:11:58FromGitter<iffy> https://github.com/nim-lang/Nim/blob/d208d7a99575fe8fdef9087aa4efd5c7e7781d9e/lib/system.nim#L712
20:16:15shashlickoh okay, ya probably add the raises pragma for the log method?
20:18:35*abm quit (Quit: Leaving)
20:19:34shashlick@Araq - somehow it crashes right away for me - just tried with seh - http://ix.io/1OV9
20:23:19FromGitter<zacharycarter> if I use `getType` in a macro and iterate over a type's fields how can I use those fields to get the value in an instance?
20:23:40FromGitter<zacharycarter> do I just do like a dot expression with the field I retrieved from getType?
20:27:17shashlickya that should work
20:27:25FromGitter<zacharycarter> okay thanks
20:29:01FromGitter<iffy> hmm... how do I use locks to safely access a global seq?
20:30:32shashlickAraq: minor tweaks and i'm crashing like this http://ix.io/1QHT - points to https://github.com/genotrance/feud/blob/master/src/pluginapi.nim#L40
20:33:27Zevvhmm are nim stream sematincs actually really streams? both stringstream and filestream are actually just an object abstraction over something that is "already there". Can I create an empty stringstream, feed it data on one point, consume on the other end, and have it not store all the data?
20:39:45FromGitter<iffy> Okay, I just used SharedList instead
20:40:07FromGitter<iffy> Can I just say, after a several month break from being able to use Nim, how much fun Nim is to use :)
20:40:21shashlicksorry, was going to respond - there's also SharedSeq i put together but it isn't very efficient yet
20:40:31shashlickhttps://github.com/genotrance/shared/
20:40:52shashlickbut if just a global seq, you can just do `withLock lock:`
20:41:40shashlickAraq: so after that HashSet failure, I replaced HashSet with a seq[string] and now the onLoad passes, but now i get a gcassert in another spot
20:42:59shashlickhttp://ix.io/1QHZ - which points to https://github.com/genotrance/feud/blob/master/src/utils.nim#L42
20:43:26shashlickwhich is just a new(obj) field - that's my dead end
20:44:09*Jesin joined #nim
20:46:28shashlicki've created a branch "araq" on feud with some minor tweaks to show full stack trace and replaced HashSet with seq (though that's a separate crash of its own)
20:46:37shashlickplease let me know if you can try that
20:46:44*gokr joined #nim
20:47:02shashlicki'll also try to create a minimal sample where basic stuff fails but appreciate it
20:48:15FromGitter<iffy> @shashlick thanks!
20:59:02gokrAraq: I am rewriting my Spry UI stuff to use your highlevel libui wrapper instead of rawui. I can compile your examples fine, but in the end I get linking errors. https://gist.github.com/gokr/8bd653e8294ced60ed6b8df7e35af7ff
20:59:39gokrI am not sure what is going on.
21:03:54*Vladar quit (Remote host closed the connection)
21:06:32gokrAraq: Ok, so I made a trivial new Nim package - that depends on "ui" in the nimble file, and... it has the same issue. So a package other than "ui" fails to link, it seems.
21:11:23*krux02 quit (Remote host closed the connection)
21:12:37shashlickWin or lin
21:13:20shashlickLin looks like
21:13:28gokrMe? Linux yeah
21:15:47gokrWith lots of verbosity on, it seems compiling controlgallery2 in examples - links a huge amount of libui obj files. But... Nim doesn't do that when I try to build my little test package.
21:29:25gokrWoof, now it works suddenly...
21:29:54gokrI did a "nimble uninstall ui" and then "nimble install" on my uitest package, and badam, problem disappeared I think
21:30:52disruptekthat's my favorite kind of problem.
21:31:37gokrYup, it works now. No idea what that was about. Perhaps getting "ui" installed as a dependency is done slightly differently compared to doing "nimble install" on itself.
21:31:57disruptekone of the reasons i don't use nimble...
21:33:02shashlickUi has some resource files
21:37:22gokrNot sure what that is actually, but this was a linking thing.
21:41:22FromGitter<Varriount> gokr: Linking bugs are always *so* much fun. \s
21:45:17disrupteki just wish they weren't so rare. 🙄
22:14:53*solitudesf quit (Ping timeout: 268 seconds)
22:29:56FromGitter<zacharycarter> if I have two nim nodes - one represents a constructed object and one represents the name of a field on that object - so it's a symbol
22:30:06FromGitter<zacharycarter> is it possible to resolve object.sym?
22:31:27FromGitter<zacharycarter> ah I think I need to use bindsym
22:35:19FromGitter<zacharycarter> or maybe not - I dunno
22:38:19*gokr quit (Ping timeout: 268 seconds)
23:08:59Araqiffy, LogFunc = proc(msg:cstring) {.raises: [Exception], tags: [], gcsafe.}
23:09:09Araqbut I'd argue its a stdlib bug
23:27:03FromGitter<gogolxdong> I have issues to build documents with nim-lang/website ⏎ Not Found ⏎ `/docs/tut1.html' not found.
23:30:42FromGitter<gogolxdong> Do I need to run something to build tut1.rst to tut1.html?
23:35:08*asd joined #nim
23:39:32asd if for 'ptr' you assign addr, what do you assign for 'ref'?
23:54:52FromGitter<gogolxdong> new or an ptr of a ref type with dereference operator [], like x = y[], x = new y