<< 30-07-2019 >>

00:12:47*gangstacat joined #nim
00:34:37*gangstacat quit (Ping timeout: 252 seconds)
00:38:33*gangstacat joined #nim
01:05:52*Cthalupa quit (Ping timeout: 244 seconds)
01:07:16*Cthalupa joined #nim
01:08:04*brainproxy quit (Ping timeout: 246 seconds)
01:38:21*fvs joined #nim
01:42:05*ng0_ joined #nim
01:44:04*krux02 quit (Remote host closed the connection)
01:44:52*ng0 quit (Ping timeout: 260 seconds)
01:45:13*brainproxy joined #nim
01:51:00*fvs quit (Quit: leaving)
02:02:47*laaron joined #nim
02:29:22*shashlick quit (Remote host closed the connection)
02:30:31*shashlick joined #nim
02:32:21leorize[m]shashlick: o/
02:32:35*a_b_m quit (Quit: Leaving)
02:34:35shashlickhey
02:35:00shashlicki'm looking at https://github.com/nimterop/nimterop/issues/134
02:35:26shashlickthe question I had was for ` CVRhsFn* {.impcvode.} = proc(t: realtype, y: N_Vector, ydot: N_Vector, user_data: pointer): cint {.cdecl.}`
02:35:54shashlickimpcvode = importc declared earlier
02:36:29shashlickthis is a function pointer, does it need anything else to be declared in the generated C code?
02:36:34shashlicknote header is missing
02:37:46leorize[m]nothing else is needed
02:38:04leorize[m]in spirit it's just a pointer
02:40:17shashlickokay so i don't have it declared wrong for a dynlib situation
02:42:42leorizetry removing `importc` from them
02:44:41shashlickok that might be it - i am not able to recreate their issue for another reason
02:45:01shashlickonce i can, i think i'll have to remove importc from all non procs if dynlib
02:47:08*brainproxy quit (Ping timeout: 245 seconds)
02:52:21*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:57:04*laaron joined #nim
03:19:45*brainproxy joined #nim
03:53:38*brainproxy quit (Ping timeout: 248 seconds)
04:11:12*dddddd quit (Remote host closed the connection)
04:13:33*fjellfras joined #nim
04:21:52*brainproxy joined #nim
04:37:38*nsf joined #nim
04:38:44shashlick@mratsim - when you get a chance, is nim-isl ready to go? curious what your feedback was on using nimterop
04:45:46*sagax quit (Quit: Konversation terminated!)
04:56:02*brainproxy quit (Ping timeout: 272 seconds)
05:09:00*chimez joined #nim
05:09:01*chimez quit (Remote host closed the connection)
05:11:51*shomodj joined #nim
05:23:54*fjellfras quit (Ping timeout: 272 seconds)
05:25:36*fjellfras joined #nim
05:26:14*fjellfras quit (Max SendQ exceeded)
05:27:35*brainproxy joined #nim
05:31:04*fjellfras joined #nim
05:39:24*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
05:43:07*solitudesf joined #nim
05:43:46*laaron joined #nim
05:54:53*brainproxy quit (Ping timeout: 268 seconds)
05:59:05*hoijui joined #nim
06:02:13*solitudesf quit (Read error: Connection reset by peer)
06:03:18*solitudesf joined #nim
06:09:45*chimez joined #nim
06:14:54*jjido joined #nim
06:21:43*disruptek quit (Ping timeout: 245 seconds)
06:25:35*disruptek_ joined #nim
06:25:54*snifftek joined #nim
06:26:57*ng0_ is now known as ng0
06:29:00*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:29:36*brainproxy joined #nim
06:30:01FromGitter<zacharycarter> strongly considering trying out sokol_gfx instead of bgfx
06:30:14FromGitter<zacharycarter> then I wouldn't have to do any dynamic / static linking
06:30:30FromGitter<zacharycarter> although I could probably also do that with bgfx if I used the amalgamated header - maybe I should just do that
06:35:31*solitudesf quit (Remote host closed the connection)
06:35:57*solitudesf joined #nim
06:37:27*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:37:27*snifftek quit (Remote host closed the connection)
06:40:20*snifftek joined #nim
06:41:37*solitudesf quit (Ping timeout: 258 seconds)
06:42:22*shomodj joined #nim
06:44:18*clyybber joined #nim
06:52:32*fjellfras quit (Ping timeout: 245 seconds)
06:52:32*snifftek quit (Read error: Connection reset by peer)
06:53:07*snifftek joined #nim
06:54:08*chimez quit (Quit: chimez)
06:56:34*brainproxy quit (Ping timeout: 258 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:23*gmpreussner joined #nim
07:05:10*fjellfras joined #nim
07:12:12*shomodj quit (Read error: Connection reset by peer)
07:12:23*shomodj joined #nim
07:15:01*krux02 joined #nim
07:23:21*brainproxy joined #nim
07:23:35*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
07:24:11*laaron joined #nim
07:33:39*leorize_ joined #nim
07:34:52*leorize quit (Ping timeout: 260 seconds)
07:37:27*m712 quit (Quit: bye-nyan!)
07:40:39*Cthalupa quit (Ping timeout: 258 seconds)
07:45:47*Cthalupa joined #nim
07:55:28*fjellfras quit (Ping timeout: 246 seconds)
08:04:51*mal`` quit (Quit: Leaving)
08:08:54*alexander92 joined #nim
08:10:45*mal`` joined #nim
08:11:14*fjellfras joined #nim
08:11:29*laaron quit (Remote host closed the connection)
08:11:52*fjellfras quit (Max SendQ exceeded)
08:12:24*fjellfras joined #nim
08:13:22*laaron joined #nim
08:17:33*Vladar joined #nim
08:21:08*floppydh joined #nim
08:27:08*brainproxy quit (Ping timeout: 245 seconds)
08:32:11*hoijui quit (Quit: Leaving)
08:40:32*Vladar quit (Ping timeout: 244 seconds)
08:48:08*leorize_ quit (Ping timeout: 260 seconds)
08:49:40*leorize joined #nim
08:58:59*Vladar joined #nim
09:01:17*tjmac joined #nim
09:01:59alexander92krux02: what do you use in emacs for gdb? https://www.gnu.org/software/emacs/manual/html_node/emacs/GDB-Graphical-Interface.html or https://github.com/weirdNox/emacs-gdb
09:05:05krux02alexander92, the first one
09:05:33krux02because it was builtin
09:05:44krux02I tried to keep my footprint low.
09:05:53krux02I started with terminal gdb and get it running there.
09:06:06krux02Then I tried to get the debug information integrated into frontends.
09:06:28krux02surprisingly eclipse was very helpful to get the gdb pretty printers correct.
09:07:03krux02eclispe is annoying, you have to create a nonsese project to be able to start the debugger. But the debugger part is really done well.
09:07:55FromGitter<alehander42> nice, i see, i was more interested in how do they deal with the MI / normal output separation
09:08:06FromGitter<alehander42> so i might check out eclipse's lib
09:08:45FromGitter<alehander42> it makes sense, i expect their (or jetbrains' ) debugger interfacing libs to be more robust
09:09:35krux02I used eclipse once around 2006 for C++ development. I was very disappointed. Never used it since then again.
09:10:51FromGitter<alehander42> i've heard jetbrains IDE-s are nicer these days
09:11:05FromGitter<alehander42> but i suspect eclipse improved as well , 2006 is ancient
09:11:23FromGitter<alehander42> (however, i dont even use vs code , so not a huge fan)
09:11:34krux02I now use emacs for everything. Might be not the best thing for anything, but it is better than most things most of the time.
09:12:07krux02I started vs-code once.
09:12:17krux02Arg it is slow.
09:13:45krux02project wide search, I am used for it to be instant. I have to wait there. Then it complained about too many files in a folder, then I could not rebind keys properly. Then I could not bind all of my keys because of some horrible keyboard mapping that only people with a us qwerty layout can think about.
09:14:27krux02If you don't fit the Norm it is not for you. Emacs is the opposite, if you are strange, an outsider, emacs still has a solution for you that doesn't suck.
09:14:34FromGitter<alehander42> hmm, i thought if it stays open, its pretty fine
09:14:39FromGitter<alehander42> yeah, emacs is very configurable
09:15:11krux02well, most importantly it does have keyboard support.
09:15:15FromGitter<alehander42> but i still find it .. maybe a bit too "doing everything", the whole "emacs is an amazing os with an ok editor"
09:15:19krux02vs code dose not have keyboard support.
09:16:00FromGitter<alehander42> thats why i use sublime: very fast and kinda configurable, but mostly useful as editor only (but i see the emacs appeal )
09:16:02FromGitter<alehander42> what does this mean exactly
09:16:10FromGitter<alehander42> remapping shortcuts based on layout?
09:16:35krux02I would not say emacs is an os, it is more a programable work environment dan can do everythig* (* as long as is based on text processing).
09:16:41*solitudesf joined #nim
09:17:17krux02I tried vs-code, C-ä was interpreted as C-c
09:17:23krux02I could not map anything on C-ä
09:17:35krux02because it was C-c for the editor
09:17:40krux02C-c was also C-c for the editor.
09:17:59krux02the one key that I have thet I know won't clash, ... vs-code found a way to make it clash.
09:18:15krux02I tink by now that bug got a workaround.
09:18:22FromGitter<alehander42> hm, i have to add a shortcut-mapping scheme to my debugger env
09:18:36krux02but then you still can't rebind Alt-Click to anything else.
09:18:37FromGitter<alehander42> i didnt really think of german keyboards
09:18:57FromGitter<alehander42> does it deal with the z-y
09:19:01FromGitter<alehander42> swap thing ok
09:19:13krux02I don't have a default German layout.
09:19:46FromGitter<alehander42> ah, so the problem is with unicode symbols?
09:19:58krux02I use "de neo" some dvorak inspired (but not dvorak) layout optimized of hybrid usage of German, English and programming symbols.
09:20:15FromGitter<alehander42> because i imagine the editor just gets the keys from the os
09:20:25FromGitter<alehander42> huh
09:20:29FromGitter<alehander42> interesting
09:20:51krux02well yes the editor does keys from the US and then does "smart" things with it to fuck it up.
09:21:08FromGitter<alehander42> hm https://neo-layout.org/ ?
09:21:20krux02If the program takes the input keys from the OS as they are, everything is correct. But so many editors fuck it up.
09:21:36FromGitter<alehander42> do you have problems in browsers?
09:21:48krux02They all want to control how input is handled and they want more low level control
09:22:02krux02and every time they fuck it up and break the support for this keyboard layout.
09:22:06FromGitter<alehander42> i reuse monaco (vscode's editor lib), so some of my presses are handled by it
09:22:12krux02It was the same for jetbrains.
09:22:13FromGitter<alehander42> so i'll check how it works
09:22:24krux02It was the same for netbeans.
09:22:49FromGitter<alehander42> so which app
09:22:51FromGitter<alehander42> does handle it fine
09:23:05krux02every program does doesn't do smart shit.
09:23:29krux02browsers are fine. emacs is fine. Terminal is fine, QT and GTK applications are fine.
09:23:50krux02but smart text editors "IDE" most of the time just fuck it up.
09:23:56*fjellfras quit (Ping timeout: 272 seconds)
09:24:12krux02those programs where it is most important that they don't fuck it up.
09:24:18krux02I am tired, I use emacs now.
09:24:50krux02btw many games fuck it up as well.
09:25:12krux02I should probably make a video about how to support keyboards in Games for PC.
09:25:22krux02(use scancodes, done)
09:26:13FromGitter<alehander42> hm, so in my electron window probably everything should be fine, but not sure about my editor tab
09:26:18FromGitter<alehander42> anyway, ill test eventually
09:28:34krux02btw, I looked at how electron does keyboard input. It is broken there.
09:28:42FromGitter<alehander42> if its possible at all to test
09:29:19FromGitter<alehander42> how is it broken? doesnt it reuse the browser mechanic
09:29:30*laaron quit (Remote host closed the connection)
09:33:37krux02I don't know what it does.
09:34:14krux02But the way it handles modifiers and key codes is doomed to cause problems on on US keyboards.
09:34:22*laaron joined #nim
09:35:18FromGitter<alehander42> i didnt have problems until now (and i use normal qwerty)
09:35:26FromGitter<alehander42> or do you mean non-US
09:35:35FromGitter<alehander42> i have actually never tried to
09:35:41FromGitter<alehander42> use a cyrillic shortcut
09:35:50krux02I mean non-us
09:35:53FromGitter<alehander42> i probably never suspected its possible
09:36:01krux02see the problem?
09:37:27krux02this is the documentation that I found: https://github.com/electron/electron/blob/master/docs/api/accelerator.md
09:37:30FromGitter<alehander42> well, its not the same, as almost all the time one writes code using the latin alphabet, so it wouldnt be very useful to have it
09:37:45krux02where are the f keys (f1 to f12)?
09:38:23krux02what does the key "!" mean?
09:38:32krux02does it mean shift+1
09:39:13krux02what does Ctrl+; mean?
09:39:26krux02If you have to press a modifier
09:39:33krux02to get a ;
09:39:44krux02for example Shift
09:39:49krux02does Ctrl+; still work?
09:40:11krux02or do you need to remap it to Ctrl+Shift+;
09:40:25FromGitter<alehander42> the main problem is "A to Z"
09:40:40krux02yes
09:40:44FromGitter<alehander42> but yeah those seem a bit confusing as well
09:40:49krux02I just saw the f keys do exist
09:41:05FromGitter<alehander42> and another lib i use, mousetrap also has a lot of github issues
09:41:07FromGitter<alehander42> about layouts
09:41:39krux02I also don't see Pause key
09:42:24krux02If you don't want to have problems with keyboard input and layouts, then you have to use scancodes from SDL2, they do it correctly.
09:43:14krux02You have to pick weather you want a sematic location, e.g. WASD in shooters have a semantic location, you don't want to rebind them for a different layout, you wat to map the key location (use scancodes)
09:43:43krux02Or you might pick semantic meaning of a key, for exapmle an o then means "open" or something that starts with o.
09:44:08krux02then you want to not pick scancodes.
09:44:23krux02But they you also may never compose those keys with the shift modifier.
09:44:25FromGitter<mratsim> btw @shashlick: any feedback/preference on Dash vs Velocity vs Zeal for offline docs? ⏎ ⏎ I've used Dash on my Mac but the nagging screen is too annoying.
09:44:56FromGitter<mratsim> seems like Velocity is windows only
09:47:11FromGitter<mratsim> ah Dash is mac only, I guess that settles it
09:55:07*fjellfras joined #nim
09:55:45*fjellfras quit (Max SendQ exceeded)
09:56:16*fjellfras joined #nim
09:56:18*alexander92 quit (Ping timeout: 248 seconds)
09:57:55*clyybber quit (Quit: WeeChat 2.5)
10:01:16*sagax joined #nim
10:13:53*fjellfras quit (Ping timeout: 268 seconds)
10:18:09*PrimHelios_ quit (Quit: ZNC - https://znc.in)
10:18:29*PrimHelios joined #nim
10:23:56*brainproxy joined #nim
10:28:50*Vladar quit (Remote host closed the connection)
10:32:01*stefanos82 joined #nim
10:32:50*Vladar joined #nim
10:54:56*MyMind joined #nim
10:55:00*Sembei quit (Ping timeout: 258 seconds)
10:55:08FromGitter<gogolxdong> ```code paste, see link```
10:56:50ZevvI tried to contact ryukoposting to ask where he has gone, but no reply. github and gitlab logs both stopped a month a go :/
10:58:47*brainproxy quit (Ping timeout: 245 seconds)
11:03:36FromGitter<mratsim> lemonboy also archived all his Nim repo :/
11:11:40livcdbut he comitted something 26d ago
11:21:13FromGitter<gogolxdong> what's the length limit of file name in Linux and Windows?
11:22:26*nsf quit (Quit: WeeChat 2.4)
11:24:07FromGitter<gogolxdong> Linux is 256 characters , unfortunately it has 275 characters.
11:26:26*alexander92 joined #nim
11:28:02*brainproxy joined #nim
11:29:03*abm joined #nim
11:30:33Zevvits 4096 on modern linux
11:30:34Zevv256 is ancient
11:31:28krux02well, don't we support ancient linux?
11:32:18Zevvnope
11:32:41ZevvI'm pretty sure PATH_MAX was updated to 4k before the epoll api was added :)
11:44:44FromGitter<kaushalmodi> @mratsim looks like lemonman switched to zig: https://github.com/ziglang/zig/graphs/contributors
11:44:57krux02he did
11:45:10krux02but I also heared he came back
11:45:18*dddddd joined #nim
11:45:49FromGitter<kaushalmodi> Would be nice to hear from lemonman / @Lemonboy
11:45:51livcddid you drive him away ?
11:45:53livcdoh
11:55:33FromGitter<alehander42> when do people use waitFor ? it seems like something that one should almost always not do
12:02:48FromGitter<mratsim> to block when in a normal sync proc?
12:05:17FromGitter<alehander42> yeah, makes sense, so only on the boundary between sync and async code
12:06:04FromGitter<alehander42> i wondered if it ever makes sense to use waitFor inside {.async.}, but probably not
12:12:15FromGitter<alehander42> if this is so, i wonder why is waitFor in an async function not a compile error ( i read some similar ideas in the forum i think)
12:14:01FromGitter<mratsim> you use await in an async block
12:14:16FromGitter<alehander42> we can define waitFor with {.error.} in {.async.}
12:14:31FromGitter<mratsim> I think @dom96 would be open for a PR that {.fatl.} or error in async block
12:14:39FromGitter<mratsim> fatal*
12:14:51FromGitter<alehander42> yeah, i only wondered if there is an exotic
12:15:01FromGitter<alehander42> situation where it might make sense to call waitFor from async
12:15:07FromGitter<alehander42> which i cant think of
12:15:31FromGitter<alehander42> but this might become clear in the PR
12:16:43FromGitter<alehander42> even more: if this is so (waitFor: sync => wait async, await: async => wait async), why dont we reuse `await`
12:16:56FromGitter<alehander42> and `await` in sync code becomes equivalent to waitFor
12:17:58FromGitter<mratsim> My gut feeling is that we want the distinction to prevent dev logical errors
12:18:00dom96because that's misleading, `await` will block the thread and it might not be immediately obvious that is what's happening
12:18:05FromGitter<mratsim> just like we use let vs var
12:18:39dom96you can disallow `waitFor` in async proc if you're feeling up for it, it'll require changes in the async macro though
12:19:02FromGitter<alehander42> yep, I guess i just need to add a waitFor {.error/fatal.} declaration being emitted inside?
12:19:34FromGitter<alehander42> i see, waitFor just seems not obvious as a name to me, maybe "blockAndWait" is more obvious then
12:19:39FromGitter<alehander42> but its already there
12:19:44FromGitter<mratsim> the macro scans for "await" right? during the scan we can just add a branch that errors if waitFor is found
12:20:18FromGitter<alehander42> ah, yeah i thought of the jsffi async macro where await is just a declaration
12:20:35FromGitter<mratsim> wait_for is the name used in C++
12:21:37FromGitter<alehander42> but still .. i feel like adding a waitFor declaration
12:21:42FromGitter<alehander42> inside the async macro is more correct
12:21:52FromGitter<alehander42> because it must be a part of the overloading resolution
12:22:05dom96mratsim: wow, really?
12:22:07FromGitter<alehander42> users might have their own different waitFor functions
12:22:36FromGitter<mratsim> https://en.cppreference.com/w/cpp/thread/future/wait_for
12:24:20dom96amazing, so we came up with the same name completely independently :D
12:24:43dom96or maybe someone suggested it to me with this name and they got it from C++
12:26:32*jxy quit (Read error: Connection reset by peer)
12:26:54*jxy joined #nim
12:32:45*alexander92 quit (Ping timeout: 258 seconds)
12:54:01shashlick@mratsim zeal is available for osx
12:54:07shashlickThat's what I use
12:54:18shashlickIt's not the best but ya
12:54:38FromGitter<Riderfighter> Hello everyone
12:58:42*brainproxy quit (Ping timeout: 248 seconds)
12:59:44lqdev[m]hi
13:03:22FromGitter<Riderfighter> @alehander42 how is your electron program going ? :)
13:18:17FromGitter<Riderfighter> lqdev: how is rod going, how much progress have you made :D
13:28:05shashlick@dom96 - https://github.com/nim-lang/nimble/pull/686
13:28:31FromGitter<Riderfighter> On the topic of editors/IDEs, Jetbrains is probably my go-to company for IDE not because I want to have my hand held when coding(though its comforting) its because of how smooth everything works and the additional features they implement in their IDEs to help you program
13:28:41*brainproxy joined #nim
13:28:50FromGitter<Riderfighter> iirc you can pay them a certain amount of money and they will produce an IDE for a specific language :)
13:33:36shashlickOk time for another renewed push on feud - the backlog is just too long
13:33:57lqdev[m]@Riderfighter I'm working on variables right now
13:35:07FromGitter<Riderfighter> shashlick: what is feud?
13:42:57*PrimHelios quit (Ping timeout: 245 seconds)
13:43:30*PrimHelios joined #nim
13:46:38lqdev[m]shit, I have a bit of a problem now. how can I pass an object by reference yet not have it be ref? can't use var since I need to return the object from a proc
13:47:10FromGitter<Riderfighter> dereference it?
13:48:14lqdev[m]problem is, the object I have is a regular `object` so there's nothing to dereference
13:48:23FromGitter<kaushalmodi> @Riderfighter https://github.com/genotrance/feud (`doAssert shashlick == @genotrance`)
13:48:37lqdev[m]I was thinking about using ptr but it's unsafe
13:49:45FromGitter<kaushalmodi> lqdev[m]: but aren't `ptr` and `ref` the only "reference" types we have?
13:50:15lqdev[m]yes, but you can pass variables to procs by reference using `var`
13:50:44FromGitter<kaushalmodi> hmm, true
13:50:54lqdev[m]think I'll just make the object a ref object, it'll be much simpler that way
13:51:01FromGitter<Riderfighter> oh wow feud is cool
13:51:01FromGitter<Riderfighter> lol
13:51:25lqdev[m]though I don't like that it'll be allocated on the heap since I want things to be as fast as possible
13:53:39FromGitter<Riderfighter> welp feud is definitely getting a star from me haha
13:53:42FromGitter<Riderfighter> ;)
13:56:56lqdev[m]what's the proper name for a `let` in Nim? It's definitely not a variable, since they aren't… well, variable
13:57:31lqdev[m]is it 'constant'?
13:58:21FromGitter<Riderfighter> const = constant
13:58:28FromGitter<Riderfighter> I guess its an immutable variable
14:00:36FromGitter<Riderfighter> so i looked at the nim tutorial and nim describes "let" as a single assignment variable
14:00:45FromGitter<kaushalmodi> yep
14:00:59FromGitter<kaushalmodi> (sorry to spam again with my notes) https://scripter.co/notes/nim/#variable-types <- lqdev[m]
14:01:08FromGitter<Riderfighter> ""The difference between let and const is: let introduces a variable that can not be re-assigned, const means "enforce compile time evaluation and put it into a data section""
14:03:48*disruptek_ is now known as disruptek
14:03:52*nsf joined #nim
14:19:35*Vladar quit (Remote host closed the connection)
14:32:47Zevvtechnically, it might even end up in the .text section
14:39:36FromGitter<Riderfighter> is there a way of echoing byte data in a raw representation of what it would be?
14:40:23FromGitter<Riderfighter> what I mean is if I echoed my byte data of two 255 bytes I would get "\xff\xff" as the echoed value
14:43:02FromGitter<Riderfighter> sorry if this is really obvious, but i've been clueless as how to do this
14:44:51*brainproxy quit (Quit: WeeChat 2.5)
14:59:50lqdev[m]and now I'm stuck at variable references
15:04:06lqdev[m]anyone has a nice, well-documented register-based VM compiker I could perhaps learn from?
15:04:12lqdev[m]s/compiker/compiler
15:05:23FromGitter<mratsim> Nim compiler is register based
15:06:08ZevvRiderfighter: http://ix.io/1Q44
15:06:49Zevvshould be able to print any type as long as it has an address
15:07:52FromGitter<Riderfighter> ok I was already doing something similar I was just curious if there was a built-in way of doing that hah
15:09:43lqdev[m]you mean nimscript? I took a look at the codegen but I don't understand it that well since it doesn't have any comments
15:13:30*sammich quit (Quit: No Ping reply in 180 seconds.)
15:14:50*sammich joined #nim
15:15:55FromGitter<mratsim> even the compiler
15:16:30FromGitter<mratsim> otherwise mmmh, have a look there: https://github.com/status-im/nimbus/wiki/Interpreter-optimization-resources
15:17:29FromGitter<mratsim> it' mostly about interpreter but there are one or 2 papers on registers VM
15:18:12FromGitter<mratsim> https://skemman.is/bitstream/1946/4809/1/hhg-bs.pdf and https://www.scss.tcd.ie/publications/tech-reports/reports.07/TCD-CS-2007-49.pdf
15:40:59krux02koch temp recently got much slower.
15:41:14krux02at least that is what I am feeling right now.
15:41:23disruptekthat's interesting.
15:42:17FromGitter<Riderfighter> Stupid question for people who use https://github.com/xomachine/NESM , how do you set the length of a string to lets say an int16? I currently have this but it's not working as I would expect it to https://dsh.re/87120
15:43:59disrupteknewStringOfCap(32768'16)
15:47:05FromGitter<Riderfighter> ok so i'm stupid
15:47:15*Vladar joined #nim
15:47:27FromGitter<Riderfighter> https://dsh.re/4833c
15:47:32FromGitter<Riderfighter> ^ this is what I was meant to do
15:47:34lqdev[m]@mratsim I know how to write a VM, the problem I have is compiling bytecode for the VM
15:47:54Zevvkrux02: something as stupid as this would probably never happen to you, but it happend to mee to often: sure your main nim compiler was not a debug build by accident :)
15:49:01krux02Zevv, as stupid as what?
15:49:44Zevvwondering why stuff compiles so slow, and finding out your main nim compiler was built with debug on
15:50:12krux02well that happende to me already.
15:50:22krux02and it is annoying.
15:50:28Zevvright, so that's not your problem now - just making sure :)
15:51:23krux02I always build nim with -d:danger by now
15:51:42krux02it seems like the compilation of the generated C files is much slower as well.
15:52:25krux02but that might also be because I am currently developing at an old computer.
15:52:53Zevvwould be interesting to make a run of building every 20 of the last 2000 commits and plotting build time and generated size
15:53:19krux02Zevv, for sure
15:53:37krux02I think it is necessary that at some point we collect data on performance and store it persistently.
15:53:49krux02So thet we know when a commit fucks up performance.
15:54:11krux02Right now we notice it far too lake when some feature kills the performance.
15:55:57dom96What I'd like to see is one of you set up a proper CI infra
15:56:07dom96the Nim CI is insanely unreliable
15:56:47FromGitter<Riderfighter> CI?
15:56:56krux02well I did some improvements to Nim CI.
15:57:06krux02But it doesn't help when the written tests are shitty.
15:57:17disruptekthat's part of the idea of issues-as-tests; they monitor performance, too.
15:57:18FromGitter<Riderfighter> What does CI mean if I may ask ?
15:57:28krux02I usually find out that tests are shitty when they fail, regularly.
15:57:39krux02continuous integration
15:57:46FromGitter<Riderfighter> ohhh
15:57:46krux02basically testing
15:57:48FromGitter<Riderfighter> Thank you
15:58:01FromGitter<Riderfighter> Yeah I got that part, I've just never used "CI" haha
15:58:22krux02dom96 what do you propose to improve CI?
15:59:00krux02I personally would like if we would move away from these external CI services and build our own testing servers.
15:59:45dom96Yeah, that would be good. But possibly a huge time sink.
15:59:57krux02the current CI is a huge time sink as well.
16:00:18krux02I don't know why, but everything on github and the CI servers is extremely slow.
16:00:21dom96What have you guys done to make it more reliable, if anything?
16:01:13krux02it takes several seconds to open any link, and the information always drops in like I am connected via 56k modem.
16:01:45krux02In terms of reliability I just disabled shitty tests.
16:01:46dom96yeah, that's something that could be solved by creating a bot that filters out what went wrong and comments on the PR
16:02:23krux02when tests one pass sometimes, and you have 100s of them, yea one of them will fail for sure.
16:02:30*laaron quit (Remote host closed the connection)
16:02:31lqdev[m]krux02: that's my internet connection rn
16:02:34dom96It would also help to have a branch that is always in a good state
16:02:41krux02I think the next thing we should do is to restart tests automatically.
16:03:48krux02But I did to improve tests generally is, I improve the test spec. I came up with the idea of the megatest.
16:04:33krux02so that we don't get as often a timeout on the CI servers.
16:05:03krux02dom96, well devel is supposed to always be in a good state.
16:05:42krux02Problem is, Araq really likes to push to devel directly. He runs tests locally, but not all of them. And when he things its good, he pushes. I really don't like that.
16:05:42dom96yeah, but it's not. One way to fix this is to disallow pushing to it
16:06:20krux02yes
16:06:31krux02nobody, not even Araq should be allowed to push to devel.
16:13:37*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:18:32FromGitter<Riderfighter> Does anyone here happen to use the NESM lib by chance, I have another question related to it
16:19:24disruptekdon't ask to ask.
16:22:01FromGitter<Riderfighter> See the thing is, I think I solved my question hence why I asked but, when serializing an object with a field that is of string is this the correct way to specify the prefixed length as a certain int type or is there a better way? Here is my code https://dsh.re/8352d
16:22:11FromGitter<Riderfighter> asked for permission*
16:23:36*tjmac quit (Quit: -bye)
16:23:39disruptekthat's an object, ie. a struct on the wire.
16:24:42Zevvis there a way to get the initial csource build from build_all.sh to run in parallel?
16:24:50ZevvI got 11 cores doing nothing
16:25:05krux02Zevv, yes
16:25:13krux02use make
16:25:22krux02make -j 8
16:25:27FromGitter<Riderfighter> disruptek: Yes I know, I'm trying to change the way a string is serialized using the NESM lib(its serialized in the format of {length of string as uint32}{string}) but I need the format {length of string as int16}{string}, sorry if that was unclear
16:25:32*nif quit (Quit: ...)
16:25:41*nif joined #nim
16:25:41disruptekmy use of nesm: https://github.com/disruptek/i3ipc/blob/master/i3ipc.nim#L217
16:26:34disruptekyou want something like `length: int16; str: string`
16:27:09disruptekor `string as {size: {}.length}`
16:27:22FromGitter<Riderfighter> I'm just trying to make it pack my obj to something like `\x00\x05hello` instead of `\x00\x00\x00\x05hello`
16:27:58Zevvkrux02: ok, so I manually clone the csources git, do a make -j12 in the csources
16:28:05Zevv
16:28:32krux02yes
16:29:01Zevvoh I see that outputs the nim binary into bin/nim
16:29:20Zevvso after that I just make koch
16:29:21Zevvright
16:29:25FromGitter<Riderfighter> Does what I'm trying to do make sense disruptek?
16:29:42krux02Ridirfighter: don't worry about excess zero bytes too much. That is a problem that general purpose compression libraries can handle pretty well.
16:29:57krux02They know this problem very well and optimize on it.
16:30:27disruptek'fighter: try what i gave you and see how it looks.
16:31:27FromGitter<Riderfighter> krux02: the reason why I need something so specific is because the string is going to be in the middle of a packet and I know for a fact the server will close the connection if the string length isn't an int16
16:32:03krux02well, then I don't know, I did not use that library yet.
16:32:39krux02but did you try to pass in a custom encoder/decoder for the string types?
16:32:40FromGitter<Riderfighter> disruptek: when I serialize my object using what you said I get `000068656C6C6F` which becomes `\x00\x00hello`, the string length isn't properly put as an int16
16:33:13FromGitter<Riderfighter> krux02: I'm not going to lie I just installed this lib like not even 20 minutes ago so I have zero clue what I'm doing, but I'll try that once I figure out how to haha
16:33:13disruptekthe length field doesn't get set automatically; you have to do that yourself.
16:33:17FromGitter<Riderfighter> ahhh
16:33:18FromGitter<Riderfighter> ok
16:33:25FromGitter<Riderfighter> there is my issue I guess haha
16:33:27*matti quit (Ping timeout: 252 seconds)
16:35:16FromGitter<Riderfighter> ok I got it working the way I want it, thank you both disruptek and krux02 sorry for being a pain :L ⏎ ⏎ here is my working code, https://dsh.re/7348b, it serializes the length automatically it seems so that is pretty cool
16:36:09Zevvkrux02: ok, I got a little script checking out every 10th version, doing a build and checking size of bin/nim and build time of koch temp
16:36:16Zevvlets see what it shows tomorrow
16:36:17FromGitter<Riderfighter> also krux02/disruptek, I'm sorry if my responses came off as rude I wasn't sure how to phrase my sentences
16:36:43disruptekyou're fine, 'fighter; i don't think anyone misunderstood you -- glad it's working. :-)
16:36:59disruptekZevv: what about git bisect?
16:37:13krux02Zevv, would be nice if you could get some more detailed staticstics as well. More date == better
16:38:07Zevvyeah, but I need to cook dinner and bring a sick squirrel to a vet and do my bookkeeping
16:38:26disruptekdon't eat the sick ones; just throw those back.
16:38:36Zevvghehe
16:38:49*matti joined #nim
16:39:47*matti quit (Max SendQ exceeded)
16:41:07*matti joined #nim
16:41:43*nsf quit (Quit: WeeChat 2.4)
16:42:01*matti quit (Max SendQ exceeded)
16:43:19*matti joined #nim
16:44:17*matti quit (Max SendQ exceeded)
16:46:49*matti joined #nim
16:48:23*hoijui joined #nim
16:56:32*krux02 quit (Remote host closed the connection)
17:02:07FromGitter<brentp> @mratsim is status writing an interpreter?
17:07:32*zyklon quit (Ping timeout: 245 seconds)
17:16:29*hoijui quit (Quit: Leaving)
17:22:17FromGitter<alehander42> @Riderfighter its good thank
17:22:33FromGitter<alehander42> trying to work on a different async part today
17:25:07*rockcavera quit (Remote host closed the connection)
17:29:49*rockcavera joined #nim
17:30:14*alexander92 joined #nim
17:38:36*shomodj joined #nim
17:42:29FromGitter<alehander42> hm @krux02 how are compile errors usually tested
17:42:33FromGitter<alehander42> in the compiler
17:46:27Cadeythere's the when compiles(code) pattern IIRC
17:47:11FromGitter<alehander42> nope, i mean in the suite
17:55:57lqdev[m]I was reading through the source code of the compiler and I kind of have the feeling it's really obfuscated behind super-abbreviated names
17:59:24FromGitter<alehander42> e.g.?
18:04:07*kungtotte quit (Quit: WeeChat 2.5)
18:05:31ZevvSo, if I trigger a "Error: unhandled exception: vm.nim(706, 16) `nfIsRef in regs[ra].node.flags` [AssertionError]
18:07:08lqdev[m]@alehander42 eg. the fact that 'assign' is abbreviated as 'asgn'
18:09:05FromGitter<alehander42> yeah, short, but hopefully not too much
18:10:11lqdev[m]I mean this is one of the few edge cases I don't like, since 'assign' isn't overly long in the first place
18:11:32*ng0 quit (Quit: Alexa, when is the end of world?)
18:13:11FromGitter<Riderfighter> disruptek and krux02 if you're still here thank you so much for your help earlier ! <3
18:16:39*abm quit (Read error: Connection reset by peer)
18:28:04*ng0 joined #nim
18:29:03FromGitter<zetashift> Anybody using emacs with nim-mode? I'm always getting a squiggly red line at the top because of imports, anyone else having this or do I have something setup incorrectly
18:30:46Cadeywhat is your setup?
18:34:19FromGitter<zetashift> Nim installed using choosenim and doom-emacs with the nim module enables
18:34:23FromGitter<zetashift> enabled*
18:34:30*stefanos82 quit (Quit: Quitting for now...)
18:49:22*nsf joined #nim
18:51:50*snifftek quit (Remote host closed the connection)
19:03:35*floppydh quit (Quit: WeeChat 2.5)
19:08:29FromGitter<zacharycarter> is this possible? - `var a = b = 1`
19:08:49FromGitter<zacharycarter> or forget the var - assume `a` has already been declared
19:08:53lqdev[m]`var a = (b = 1; b)`
19:08:58FromGitter<zacharycarter> thanks
19:18:20*abm joined #nim
19:23:09*kungtotte joined #nim
19:35:37*ng0 quit (Quit: Alexa, when is the end of world?)
19:36:49*elrood joined #nim
19:37:19Zevvkrux02: http://zevv.nl/div/nimstats.png little graph of build times (purple) and binary size (green). Something happened around june 15th
19:38:29Zevvbuild time of 'koch temp' increased by 50%, binary size increased by 33%
19:38:51Zevvneed to do some paperwork, will bisect later
19:40:01*clyybber joined #nim
19:45:45*clyybber quit (Quit: WeeChat 2.5)
19:59:25FromGitter<kaushalmodi> Zevv: looks like between June 2 and June 5: https://github.com/nim-lang/Nim/compare/fc4f0808...8cc97532
20:04:35*nsf quit (Quit: WeeChat 2.4)
20:04:51Zevvindeed
20:04:53Zevvbisecting
20:07:28*PrimHelios quit (Quit: ZNC - https://znc.in)
20:07:47*PrimHelios joined #nim
20:21:26*jjido joined #nim
20:25:39Zevvyeah well, pretty obvious
20:25:41*sschwarzer joined #nim
20:25:43Zevv-d:danger vs -d:release
20:26:10Zevvfor me increases the nim binary size by 30% and increases 'koch temp' time by 70%
20:28:23*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:37:07*jjido joined #nim
20:40:15*NimBot joined #nim
20:51:10*sschwarzer quit (Quit: leaving)
20:54:49*luis_ joined #nim
21:03:59FromGitter<mratsim> You should raise a bug, I think nim should be build with -d:release and -d:danger by default but it should be a language design/RFC discussion
21:09:40*krux02 joined #nim
21:10:14FromGitter<zacharycarter> https://gist.github.com/zacharycarter/ba93e26e5d185d41edf1ec1ee89bf38e
21:11:11FromGitter<zacharycarter> need to add support for opengl and d3d11 but then I should have no more windows dependency on sdl
21:11:36FromGitter<zacharycarter> and eventually I'll add metal, ios, x11, emscripten, etc
21:12:04*donpdonp left #nim ("WeeChat 1.9.1")
21:13:24FromGitter<zacharycarter> sorry I meant macOS not metal
21:22:39FromGitter<Riderfighter> have you guys heard of the programming language "V"
21:22:53FromGitter<Riderfighter> its kinda metal
21:22:54FromGitter<Riderfighter> https://volt-app.com
21:22:59FromGitter<Riderfighter> that was made with it
21:24:56FromGitter<Riderfighter> its kinda crazy, good thing nim can achieve similar feats :)
21:25:16*Vladar quit (Remote host closed the connection)
21:26:40solitudesfits crazy how people bought into it, when its lowkey scam
21:26:50lqdev[m]oh no
21:26:51lqdev[m]not this again
21:27:18lqdev[m]tip #1: stay away from anything that's too good to be true (V)
21:30:07FromGitter<Riderfighter> the volt app is sketch imo
21:30:21FromGitter<Riderfighter> idk to believe V or not haha
21:31:06ldleworkis Vlang fake?
21:31:11FromGitter<Riderfighter> I seems legit
21:31:14FromGitter<Riderfighter> it*
21:31:38ldleworkbut what's the low-key scam bit
21:31:56FromGitter<Riderfighter> you'd have to ask solitudesf
21:33:03FromGitter<mratsim> it's not fake but plenty of features were hyped while they were not implemented
21:33:27FromGitter<mratsim> but it's much better than that: https://www.reddit.com/r/nim/comments/ciomjm/noscriptweb_a_new_type_of_javascriptfree/
21:34:03lqdev[m]@Riderfighter https://github.com/voltapp/volt/issues/143
21:35:40*solitudesf quit (Remote host closed the connection)
21:36:04*solitudesf joined #nim
21:38:46FromGitter<mratsim> btw @lqdev, since you were interested in parallelism at one point and are also a game dev, did you watch that talk: https://www.gdcvault.com/play/1022186/Parallelizing-the-Naughty-Dog-Engine ?
21:38:47FromGitter<zacharycarter> ouch - no direct3d bindings for Nim... only ones I could find are 5 years old
21:38:54FromGitter<mratsim> I was quite impressed with their solution
21:38:56FromGitter<Varriount> !? lqdev: How can one pack that much in a 300kb binary?
21:40:41FromGitter<Varriount> I'm highly suspicious
21:41:57FromGitter<mratsim> 300kb is was a whole game 25 years ago
21:42:31lqdev[m]@Varriount dynamic linking, I suppose?
21:43:17*jmiven quit (Quit: reboot)
21:43:20lqdev[m]@mratsim no, I didn't. I don't really watch talks, I much prefer written articles
21:43:35lqdev[m]but thanks, I'm gonna check it out
21:43:37FromGitter<mratsim> Slides: http://twvideo01.ubm-us.net/o1/vault/gdc2015/presentations/Gyrling_Christian_Parallelizing_The_Naughty.pdf
21:44:08FromGitter<mratsim> I usually don't like videos, too slow to learn from but I watched this one during lunch
21:44:10*jmiven joined #nim
21:44:15FromGitter<Varriount> lqdev: There's no other DLLs in the DMG file.
21:44:50lqdev[m]@Varriount compression? maybe he just ran it through `strip -s` and `upx --best`
21:45:04FromGitter<Varriount> I'm more inclined to believe that.
21:45:20*FromGitter * Varriount fires up the inspection tools
21:46:01*luis_ quit (Quit: luis_)
21:46:08lqdev[m]also, -O3 can do wonders
21:46:29*luis_ joined #nim
21:58:49*PrimHelios_ joined #nim
21:59:43*PrimHelios quit (Ping timeout: 276 seconds)
22:00:00*arecaceae quit (Remote host closed the connection)
22:00:19*arecaceae joined #nim
22:01:14*solitudesf quit (Ping timeout: 258 seconds)
22:03:19*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:08:27*elrood quit (Remote host closed the connection)
22:37:57FromGitter<mratsim> -O3 will bloat the code with loop unrolling though
22:38:08FromGitter<mratsim> he probably used -0size
22:38:16FromGitter<mratsim> -Osize
22:46:04*luis_ quit (Quit: luis_)
22:46:34*luis_ joined #nim
22:47:52shashlicki don't get it - stable build on 32-bit, same thing in 64-bit is crashing
22:48:16*MyMind quit (Ping timeout: 272 seconds)
22:48:26FromGitter<Varriount> shashlick: What is crashing? The compiler?
22:48:51shashlickmy text editor
22:49:07shashlicki finally integrated my SharedSeq lib and got rid of boehm
22:49:08FromGitter<Varriount> Is it interfacing with any C libraries?
22:49:17shashlicknow tracing some GCASSERT
22:49:45shashlickyes - scintilla, nng
22:49:58FromGitter<Varriount> Because it may be crashing due to an improperly wrapped C interface
22:50:35FromGitter<Varriount> Like, `int` is being used somewhere a `cint` should be.
22:51:22shashlickwhat do I do with these
22:51:23shashlick`[GCASSERT] decRef: waZctDecRefTraceback (most recent call last)`
22:51:32shashlicki've commented out both wrappers
22:52:53FromDiscord_<CΛTッ> V is very fun, especially the part where it calls mkdir -p
22:54:13FromGitter<Varriount> Howso?
22:55:05FromGitter<Varriount> @CΛTッ: Nice name.
23:01:09FromGitter<mratsim> @shashlick, seems like you are decreasing an object with a refcount of zero
23:02:36shashlickits dying here of all places - https://github.com/genotrance/feud/blob/master/src/utils.nim#L42
23:03:47shashlickall it is doing is creating a new ref object and putting something in a seq
23:08:35FromGitter<mratsim> One simply does not parse a command-line argument
23:14:03FromGitter<zacharycarter> sweet! got the five year old directx bindings working
23:14:11FromGitter<zacharycarter> back on track - but now to sleep
23:18:19shashlick?
23:19:20shashlickcan you cast a ref T to pointer?
23:42:28*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:46:09*luis_ quit (Quit: luis_)
23:54:27FromGitter<Varriount> Yes