<< 29-07-2019 >>

00:02:55FromDiscord_<treeform> carkh, so this works on windows? but remains on linux?
00:06:35FromDiscord_<treeform> on linux you probably want what is called Demonizes a process. I think this whole Demonization on linux is poorly throughout, and feels like a hack everyone does to get process that is "disconnected" from everything.
00:07:03FromDiscord_<treeform> This is how to demonize your own process: https://github.com/treeform/guardmons/blob/master/daemon.nim
00:07:18FromDiscord_<treeform> But I don't know how you would do that for a child.
00:08:08FromDiscord_<treeform> if you just want to do what exec, you could just call that instead?
00:08:14FromDiscord_<treeform> and pass it your process
00:09:16FromDiscord_<treeform> `startProcess("exec", @["your thing", "args"...])`
00:36:20carkhtreeform : i tried with exec from the posix namespace, and it worked on linux
00:36:23carkhthanks !
00:37:32carkhnow i just fire and forget as i'm not interested in the result, looks like its impossible to do so on windows in a sane manner, but i don't xcare as there are no zombie processes there
00:39:27*nif quit (Quit: ...)
00:39:36*nif joined #nim
00:41:24carkhalso i got bitten because ctrl-z on windows is very much not the same as ctrl-z on linux =)
00:41:38carkhthat's another case of processes left dangling
00:53:51*oculux joined #nim
00:55:19*oculux quit (Client Quit)
00:57:06*oculux joined #nim
01:03:04*Tanger joined #nim
01:04:09FromDiscord_<treeform> I feel like process handleing is like #1 job of the OS and they do it poorly.
01:05:25FromGitter<Varriount> Zevv: Anything new afoot?
01:05:40FromGitter<Varriount> treeform: Windows does process handling poorly?
01:10:37FromDiscord_<treeform> Varriount, well yeah, one of my favorite things found today: https://www.raymond.cc/blog/disable-program-has-stopped-working-error-dialog-in-windows-server-2008/ which fixed most annoying thing with windows process handling.
01:28:03FromGitter<Varriount> treeform: From a server administrator perspective, yes.
01:29:08FromGitter<Varriount> However I bet plenty of users would be puzzled if their application just randomly quit, and they didn't know whether it was because they hit the wrong button, or because it crashed.
01:31:34*Tyresc quit (Quit: WeeChat 2.5-dev)
01:41:51shashlickAny opinion on this - https://gitlab.com/eidheim/tiny-process-library
01:45:22*a_b_m quit (Remote host closed the connection)
01:45:52*a_b_m joined #nim
02:38:22*a_b_m quit (Remote host closed the connection)
02:38:49*a_b_m joined #nim
03:01:22*a_b_m quit (Remote host closed the connection)
03:01:48*a_b_m joined #nim
03:04:36*rockcavera joined #nim
03:09:04*a_b_m quit (Quit: Leaving)
03:10:02*laaron joined #nim
03:12:55*laaron quit (Client Quit)
03:14:20*laaron joined #nim
03:16:52*dddddd quit (Remote host closed the connection)
03:32:35*laaron quit (Remote host closed the connection)
03:34:40*laaron joined #nim
03:45:10*nif quit (Quit: ...)
03:46:10*nif joined #nim
04:07:50*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
04:08:10*laaron joined #nim
04:37:02*nsf joined #nim
04:51:26*fjellfras joined #nim
05:06:54skrylar[m]wonder how well this works and how complicated of a matcher itis https://news.ycombinator.com/item?id=18393364 hmm
05:16:04skrylar[m]"14,000 LOC of rust" intuition says this is just doing a simple variant of the markovian scoring that spam filters sometimes use :ponders:
05:22:03*nif quit (Quit: ...)
05:22:12*nif joined #nim
05:26:50*Lord_Nightmare quit (Ping timeout: 244 seconds)
05:28:39*carkh quit (Remote host closed the connection)
05:34:00*Sembei quit (Ping timeout: 268 seconds)
05:34:06*clyybber joined #nim
05:36:10*laaron quit (Remote host closed the connection)
05:37:28skrylar[m]might have to play with some nim code later. i think i know how he made this
05:38:01*Sembei joined #nim
05:38:41*laaron joined #nim
05:40:48skrylar[m]the parts using gpt-2 are spooky but thats to be expected
05:41:45ZevvVarriount: Nope. You?
05:47:11*vlad1777d joined #nim
06:20:00*solitudesf joined #nim
06:22:54*Vladar joined #nim
06:31:23*stefanos82 joined #nim
06:33:27*stefanos82 quit (Client Quit)
06:34:10*vlad1777d quit (Ping timeout: 248 seconds)
06:34:11*stefanos82 joined #nim
06:45:28*solitudesf quit (Ping timeout: 245 seconds)
06:52:01FromGitter<Riderfighter> I feel so popular waking up with a mention haha
06:52:31FromGitter<Riderfighter> Hello everyone :D
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:24*gmpreussner joined #nim
07:09:36*krux02 joined #nim
07:14:39clyybberHi
07:30:03krux02hi
07:30:19krux02clyybber, hi
07:30:56clyybberhi
07:32:35clyybberkrux02: Does your opengl sandbox generate glsl shaders at compile time?
07:33:02krux02yes
07:33:56clyybberOh, thats nice. How would I get the glsl shader into a string? I want to try it with vulkan
07:34:09krux02not only that, also all the glue code
07:34:22krux02what do you mean?
07:35:14clyybberI want to pass in the shader as nim ast and get back the glsl shader as a compile time string value, so that I can store it in the executable or maybe even compile it to SPIRV at compile time.
07:35:59clyybberEssentially, I want to try to port it to vulkan
07:36:13krux02https://github.com/krux02/opengl-sandbox/blob/master/fancygl/shadingDsl.nim#L43
07:36:32krux02that is the function that is evaluated at compile time to genrate the shader
07:36:54krux02well, it is one of them.
07:37:43krux02that is a good idea with vulkan, the only reason I did not do vulkan was, I did have more experience with OpenGL and I was afraid of the complexity that vulkan might introduce.
07:38:20krux02I started with a hello triangle in OpenGL core (with shaders and everything) and then I tried to compress the hello triangle programm as much as possible.
07:38:23clyybberUnderstandable, vulkan really is extremely verbose.
07:39:09krux02what I am also looking forward to is to generate spir-v code instead of GLSL.
07:39:24krux02opengl 4.6 has spir-v support.
07:41:09krux02clyybber, https://github.com/krux02/opengl-sandbox/blob/master/experiment/glslTranslate.nim#L1
07:41:14krux02this is more what you are looking for
07:41:40krux02in the experiment folder I have a Nim to GLSL compiler, so that the shaders can be fully written in Nim
07:41:57clyybberThanks
07:42:15clyybberYou mean running the glsl to spirv compiler at compiletime right?
07:42:23krux02it is tightly bound to my port of glm though.
07:42:29clyybberOr do you want to do straight nim->spirv?
07:42:38krux02straight nim->spirv
07:42:56krux02because glsl has no goto, spirv does, nim compilation sometimes requires goto.
07:43:15krux02that is the reason why I don't really have iterator support in glsl code.
07:43:34krux02I just compile known iterator calls to patterns that work in glsl.
07:44:02krux02but iterator inlining like it is doen in the C backend of Nim is impossible when you compile to GLSL.
07:44:59krux02normal for loops like ``for i, it in myArray.pairs`` will compile, but custom iterators are not supported.
07:47:03krux02clyybber, did you try the examples from opengl-sandbox on your computer?
07:47:40clyybberNo, not yet
07:48:52krux02you should before you try to port it.
07:49:04clyybberYeah
07:49:37krux02I am pretty pround of the example where I call the simplex noise function from the shader.
07:50:40krux02https://github.com/krux02/opengl-sandbox/blob/master/experiment/hello_triangle.nim#L73
07:50:43krux02it is commented out.
07:50:55krux02if you uncomment it, it has big effect on the generated code.
07:51:07clyybberYou also do it in noiseSphere, right?
07:51:15krux02yes
07:51:28krux02bit noiseSphere has incorrect normals.
07:51:34clyybberkrux02: Oh, so simplex runs on the CPU, and it autogenerates the binding code?
07:51:44krux02no
07:51:54krux02simplex compiled to glsl
07:52:11clyybberI thought so, just couldn
07:52:16krux02it is written in Nim, but compiled with all its dependencies into glsl.
07:52:23clyybber't find the definition of simplex
07:52:37krux02it is defined in glm
07:52:44krux02import glm/noise
07:53:11krux02that basically means that there is module support when you want to write your shaders.
07:53:37clyybberThats really cool
07:55:42krux02To implement that, the macro analyzes the used procedure implementation of used symbols. For every used symbol it looks if it is a builtin in glsl, or if it is a function call that needs to be translater.
07:55:52krux02If it is a function call it also compiles that
08:22:19clyybberThats really cool. If you get that nim->spirv compiler to work, we would have a gpu backend essentially
08:22:31clyybberimplemented in a macro, thats mind boggingly cool
08:23:41clyybberAraq: When we have a `proc add(w: Window; elem: owned Widget)`
08:24:17clyybberand we call `add(w, b)` where b is a Button, a subtype of Widget
08:24:45clyybberthe C code we'll generate will be:
08:24:49*Cthalupa quit (Ping timeout: 268 seconds)
08:24:58clyybberT3_ = &b->Sup;
08:25:08clyybberadd(w, &T3_)
08:25:38*Cthalupa joined #nim
08:26:26clyybberThe problem here is that add will set T3_ to nil, but not b, so the destructor of b will still be executed, causing a segfault
08:33:38*vlad1777d joined #nim
08:36:27*stefanos82 quit (Quit: Quitting for now...)
08:41:52clyybberkrux02: Is Araq still on vacation?
08:42:55krux02yes
08:42:58krux02another wee
08:43:01krux02k
08:43:36krux02he goes online from time to time though to check what is going on
08:44:43*shomodj joined #nim
08:52:46FromGitter<arnetheduck> oh dear, another async framework - how will this end? https://github.com/zielmicha/reactor.nim
08:54:26livcdarnetheduck: that one is already dead.. no commits since feb! :X
08:55:02FromGitter<arnetheduck> I can point out a few modules like that in std lib :)
09:00:48*tjmac joined #nim
09:02:54ZevvI think if stuff does not run with 0.20 we might consider it dead, is this the case with reactor?
09:09:14FromGitter<arnetheduck> that's nimbus then, right there :)
09:09:42FromGitter<arnetheduck> and it might settle the discussion for chronos as well, we don't test with 0.20 yet
09:11:44Zevvha :)
09:18:33krux02I would not be so fast to declare something dead.
09:20:34*Lord_Nightmare joined #nim
09:22:05*mattisme quit (Write error: Connection reset by peer)
09:22:06*k0mpjut0r quit (Write error: Connection reset by peer)
09:22:07*TheManiac[m] quit (Remote host closed the connection)
09:22:10*GitterIntegratio quit (Write error: Connection reset by peer)
09:22:11*lqdev[m] quit (Remote host closed the connection)
09:22:11*skrylar[m] quit (Remote host closed the connection)
09:22:11*planetis[m] quit (Remote host closed the connection)
09:22:14*zielmicha[m]1 quit (Remote host closed the connection)
09:22:15*meff[m] quit (Write error: Broken pipe)
09:22:18*xomachine[m] quit (Remote host closed the connection)
09:22:18*johnjane[m] quit (Remote host closed the connection)
09:22:28*macsek1911[m] quit (Remote host closed the connection)
09:22:28*isaac[m] quit (Remote host closed the connection)
09:22:28*BaldEagleX02[m] quit (Remote host closed the connection)
09:22:33*MrAxilus[m] quit (Read error: Connection reset by peer)
09:22:34*gh0st[m] quit (Remote host closed the connection)
09:22:35*nergal[m] quit (Write error: Connection reset by peer)
09:22:37*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:22:38*yglukhov[m] quit (Read error: Connection reset by peer)
09:22:38*narimiran[m] quit (Read error: Connection reset by peer)
09:22:38*BitPuffin quit (Remote host closed the connection)
09:22:38*Miguelngel[m] quit (Remote host closed the connection)
09:22:38*Connor[m] quit (Remote host closed the connection)
09:22:39*Demos[m] quit (Read error: Connection reset by peer)
09:22:39*spymasterd[m] quit (Read error: Connection reset by peer)
09:22:39*leorize[m] quit (Read error: Connection reset by peer)
09:22:39*solitudesf joined #nim
09:22:39clyybberanother matrix purge
09:25:25*solitudesf quit (Read error: Connection reset by peer)
09:25:46*solitudesf joined #nim
09:25:50FromGitter<alehander42> whats new in nim
09:26:25FromGitter<alehander42> @R]
09:26:43FromGitter<alehander42> @Riderfighter yeah, did the electron thing work
09:28:56FromGitter<alehander42> btw are asynctools working well with asyncdispatch still? i found out i use them for one lib i was trying to write
09:29:30FromGitter<alehander42> is their functionality being just frozen? or being included in chronos? (e.g. async pipe)
09:30:54*Connor[m] joined #nim
09:32:04FromDiscord_<Avatarfighter> @alehander42 i believe the electron thing will work its just that my connect times out when i try and npm install electron :/
09:39:51*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
09:40:38*laaron joined #nim
09:45:16*clyybber quit (Quit: WeeChat 2.5)
09:51:18*Demos[m] joined #nim
09:51:19*BitPuffin joined #nim
09:51:19*GitterIntegratio joined #nim
09:51:20*k0mpjut0r joined #nim
09:51:20*gh0st[m] joined #nim
09:51:20*nergal[m]1 joined #nim
09:51:20*mattisme joined #nim
09:51:20*leorize[m] joined #nim
09:51:26*xomachine[m] joined #nim
09:51:26*yglukhov[m] joined #nim
09:51:26*isaac[m] joined #nim
09:51:26*spymasterd[m] joined #nim
09:51:26*macsek1911[m] joined #nim
09:51:26*BaldEagleX02[m] joined #nim
09:51:26*Miguelngel[m] joined #nim
09:51:27*narimiran[m] joined #nim
09:51:27*TheManiac[m] joined #nim
09:51:27*meff[m] joined #nim
09:51:27*zielmicha[m]1 joined #nim
09:51:28*johnjane[m] joined #nim
09:51:28*skrylar[m] joined #nim
09:51:28*planetis[m] joined #nim
09:51:29*MrAxilus[m] joined #nim
09:51:29*lqdev[m] joined #nim
09:54:01FromGitter<Riderfighter> But don't worry I plan on using electron when I'm able to download it
09:55:11*floppydh joined #nim
09:55:28*shomodj joined #nim
09:58:14*shomodj_ joined #nim
10:01:02*vlad1777d quit (Ping timeout: 268 seconds)
10:01:58*shomodj quit (Ping timeout: 252 seconds)
10:20:27*JustASlacker joined #nim
10:48:03krux02Riderfighter: the editor?
10:48:25krux02sorry, atom was the editor
11:03:11*Sembei quit (Ping timeout: 244 seconds)
11:10:03*fjellfras quit (Quit: Leaving)
11:16:49FromGitter<Varriount> Zevv: My college course is over. I should now have all the classes required to get a special piece of paper that says I know stuff
11:23:27*dddddd joined #nim
11:53:38Zevvwell contrats to you man!
11:53:53Zevvand now you'll find that this peaper means much less in real life then you'd expect :)
11:54:41Zevvwas it hard, or were you mostly having fun over the last years?
12:02:40FromGitter<alehander42> btw guys do you use project-wide function jumps
12:02:43FromGitter<alehander42> in any editor
12:02:45FromGitter<alehander42> congraats
12:03:36*Kaivo joined #nim
12:06:57leorize[m]well I do use them
12:15:55ZevvI never did.
12:16:32Zevvoh sorry, I though you ment your Diplomas :)
12:17:41*stefanos82 joined #nim
12:22:44lqdev[m]I think I'm getting the hang of writing a register-based VM
12:22:46lqdev[m]It's surprisingly simple once you start doing it
12:25:15Zevvopschepper
12:31:57FromGitter<alehander42> leorize in vim? how do they work? based on ctags? or some vim-specific kind of index
12:32:24FromGitter<alehander42> lqdev what vm are you writing
12:35:04lqdev[m]@alehander42 one for my interpreted scripting language, rod
12:35:21lqdev[m]after a long time I finally decided to do a solid redesign of the language
12:37:27FromGitter<Riderfighter> You're making a vm!
12:37:31FromGitter<Riderfighter> That's awesome!!
12:38:17*fvs joined #nim
12:38:23FromGitter<alehander42> yes, is it on github
12:38:33FromGitter<Riderfighter> ^
12:38:55leorize[m]@alehander42: I asked nimsuggest nicely :P
12:41:16FromGitter<Riderfighter> You know, its never occurred to me how many people are in the channel but don't talk
12:45:53krux02lurkers
12:46:09krux02I am very often online, but bo
12:46:21krux02most of the time I don't talk.
12:46:39FromGitter<Riderfighter> That's awesome :)
12:46:44krux02I is just recently that Araq is on vacation that I am back here.
12:47:40FromGitter<alehander42> @leorize so you just call nimsuggest when you start typing it? i imagined something like CTRL+P (which can show all accessible functions even without typing)
12:50:56FromGitter<Riderfighter> have you guys seen this: https://min-lang.org
12:51:28leorize@alehander42: something like this? https://asciinema.org/a/OmyoZPO1JfdaOAhZ0r59hebSZ
12:53:01*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
12:54:02*laaron joined #nim
12:54:08*gangstacat joined #nim
12:54:50FromGitter<alehander42> yes
12:54:56FromGitter<alehander42> but for all files in a project
12:55:35leorizenimsuggest doesn't support that usecase
12:55:41leorizebut it's easy to implement if wanted
12:55:56leorizeand no I don't use something like that
12:56:50FromGitter<Riderfighter> wow guys i'm not going to lie i'm really happy with how karax works haha
12:56:53leorizeactually I think I know a way to implement it without any changes to nimsuggest
12:57:04leorizebut it's not something that I personally use
12:57:09FromGitter<alehander42> i see, yeah, this makes sense: i guess i need to just change that part of nimsuggest that generates this and make it iterate thu all modules?
12:57:28FromGitter<alehander42> @Riderfighter yeah min was also written in nim afaik
12:57:55FromGitter<Riderfighter> @alehander42 yeah it was, that's what makes it impressive !
12:58:14leorize@alehander42: yea, that's a way
12:58:25leorizethe command is `outline`
12:58:43leorizemaybe you can add a `poutline` command that does the same for an entire project
12:59:01leorizeif you want to implement this without changes to the compiler
12:59:23leorizethen just iterate recursively to all `*.nim` and use `known` on them
12:59:49leorizeif nimsuggest acknowledge them, they're likely part of the project and you can just `outline` them
13:06:39leorizeand here's yet another way: make an empty line at the end of the file, run `sug` on that empty line
13:06:58leorizeyou'll get every single symbol possible
13:11:41FromGitter<alehander42> hm, that's smart, but a bit too hacky
13:12:26FromGitter<alehander42> maybe if i teach nimsuggest sug to act in the same way if i pass a certain (LOAD_ALL, LOAD_ALL) location
13:12:34FromGitter<alehander42> it would be ok
13:33:00FromGitter<Riderfighter> So what is everyone working on right now?
13:34:08lqdev[m]I'm working on rod's compiler, adding static typing-related stuff right now
13:34:32FromGitter<Riderfighter> i'm excited to see source code of rod's compiler :P
13:34:46lqdev[m]btw I just pushed a few drafts which represent the redesign's goals, you can find them here https://github.com/liquid600pgm/rod/tree/master/drafts
13:36:23FromGitter<Riderfighter> sweet thank you !
13:49:09*nsf quit (Quit: WeeChat 2.4)
13:56:24*alexander92 joined #nim
13:57:13alexander92Riderfighter on various editor-like ui issues
13:58:50alexander92and https://github.com/alehander42/lang
13:59:08alexander92but raaarely: very unfinished idea
14:00:00FromGitter<Riderfighter> Sounds exciting :D ui issues are always fun :P
14:02:16FromGitter<Riderfighter> I hope to see your language become widely used :))
14:02:51alexander92no, please no, its just a toy
14:03:10alexander92about ui, i wonder how often people customize their shortcuts
14:03:50FromGitter<Riderfighter> what do you mean by shortcuts?
14:03:57alexander92it seems some people use "windows-like", some "vim-like", some "visual studio-like", but there is hardly standartization going into more obscure actions
14:04:38alexander92e.g. ctrl+w usually closes a tab, but debuggers: you have all kinds of stuff, F5, F8 , ctrl+stuff, something else
14:04:47FromGitter<Riderfighter> ahhh
14:05:24FromGitter<Riderfighter> I personally don't actually customize my shortcuts, I made my keyboard to change the keymapping based on what editor I have open haha
14:05:29leorizealexander92: there's only vim-like, or emacs-like :P
14:06:12FromGitter<Riderfighter> hahah
14:06:14alexander92riderfighter, hm what do you use for that
14:06:26alexander92leorize, oh i forgot emacs of course
14:07:24lqdev[m]quick question: what would be a good error message when an operator isn't available for a given type?
14:07:40FromGitter<Riderfighter> "Operator isn't permitted for given type"
14:08:16FromGitter<Riderfighter> alexander92: Personally my keyboard has built-in software for it, its a Razer(i know very gamer), and you're able to customize what keymapping it uses for each "game"
14:08:46lqdev[m]Right now I have `Operator '<op>' unavailable for '<type>'` but it sounds weird
14:08:52shashlickif i were to create a new UI element and want it to be cross-platform, which framwork should i use?
14:08:56FromGitter<Riderfighter> lqdev: "Invalid operator for given type" or "Operator non permitted for given type"
14:09:36lqdev[m]maybe `no overload of '<op>' available for '<type>'`?
14:09:49FromGitter<Riderfighter> That would work too
14:09:56alexander92lqdev: "you can't <type> <op> <type>: no operator available"
14:10:45FromGitter<Riderfighter> `no overloaded definitions of '<op>' available for type '<type>'`
14:11:14FromGitter<Riderfighter> alexander92: your message is a tongue twister :P
14:11:54*JustASlacker quit (Quit: Leaving)
14:12:39leorize!eval "a" + "b"
14:12:41NimBotCompile failed: /usercode/in.nim(1, 5) Error: type mismatch: got <string, string>
14:12:52FromGitter<Riderfighter> psh
14:12:56leorize!eval "a" +! "b"
14:12:57FromGitter<Riderfighter> that makes too much sense
14:12:58NimBotCompile failed: /usercode/in.nim(1, 5) Error: undeclared identifier: '+!'
14:13:03leorize^ there :P
14:13:19FromGitter<Riderfighter> The error message should be special to your language
14:13:21FromGitter<Riderfighter> :P
14:14:03lqdev[m]I went with `No overload of '{operator}' available for '{type}'`
14:14:10lqdev[m]clear and easy to understand
14:14:26lqdev[m]also this is for unary operators
14:14:27FromGitter<Riderfighter> idk im really liking alexander92's message :D
14:14:30lqdev[m]so just one param
14:15:30lqdev[m]I mean it makes sense with my message since I'm gonna add operator overloading later on in development
14:17:33FromGitter<Riderfighter> On the real though, your message is really clear so it should be understandable by all :)
14:31:13*Sembei joined #nim
14:48:26FromGitter<mratsim> best news of the day: https://github.com/nim-lang/Nim/pull/11849
14:49:40*lqdev[m] uploaded an image: image.png (3KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/mFGuBUjveRVfJvsAxiDmdehm >
14:49:41lqdev[m]nice, it works!
14:51:10lqdev[m]@Riderfighter pushed the progress to master, check it out if you want although disclaimer: it's largely unfinished
14:51:25FromGitter<Riderfighter> will do !
14:52:11FromGitter<mratsim> is that your custom vm @lqdev?
14:52:21*laaron quit (Remote host closed the connection)
14:54:02*laaron joined #nim
14:59:51*nsf joined #nim
15:07:40*floppydh quit (Quit: WeeChat 2.5)
15:09:33*shomodj joined #nim
15:12:57*shomodj_ quit (Ping timeout: 245 seconds)
15:15:16krux02@mratsim, thanks. I didn't even though this issue was in popular demand.
15:15:31FromGitter<mratsim> more popular in summer than in winter :p
15:15:42krux02lol
15:16:46krux02I just looked into it. And I found out that jmpBack decreses the maxLoopIteration counter. The other jumps don't. And then there is a jump optimizer that optimizes away an opcJmpBack
15:17:06krux02I disabled this optimization for opcJmpBack and it works.
15:27:29disruptekhowdy krux02, should source code filters emit their invocation line, the magic `#?` first line of input?
15:28:13krux02disruptek, no I don't think so
15:28:40disruptekcool, thanks.
15:29:05krux02in org-mode the line ``#+BEGIN_SRC`` is also not part of the source code.
15:31:36*laaron quit (Remote host closed the connection)
15:33:44*laaron joined #nim
15:35:11disruptekright, org-mode is kinda like the opposite of markdown in that source code is essentially block-commented.
15:36:20FromDiscord_<Kiloneie> Hi i am new here, is everyone using VS Code and the compiling ? Or is there a quicker way ?
15:36:23*laaron quit (Client Quit)
15:36:33shashlickthere are vim and emacs users
15:36:38shashlickand sublime text users
15:36:43shashlickand others too
15:36:52*laaron joined #nim
15:39:27disruptekquicker than compiling?
15:40:41*laaron quit (Remote host closed the connection)
15:40:43*shomodj_ joined #nim
15:43:53*shomodj quit (Ping timeout: 268 seconds)
15:45:49FromDiscord_<Kiloneie> I was kinda hoping for the extension to have an option to compile and run the files, that exists ?
15:46:04FromDiscord_<Kiloneie> I have never done it this manually.
15:46:59alexander92https://www.reddit.com/r/askscience/comments/cj9hfd/are_micro_black_holes_even_dangerous/
15:47:05alexander92the end of the first comment
15:47:12alexander92memory leaks matters
15:49:01*leorize quit (Remote host closed the connection)
15:49:36disrupteka matter/memory leak, if you will.
15:49:44*leorize joined #nim
15:50:44disruptekalright leorize, no excuses, change my mind -- what do want to run in order to org-mode on my nim in vi?
15:59:38*stefanos82 quit (Quit: Quitting for now...)
16:07:23leorizewhat is org-mode?
16:08:12*NimBot joined #nim
16:09:53krux02leorize, It is emacs stuff
16:10:08krux02https://orgmode.org/
16:11:06leorizedisruptek: well what feature of org-mode would you like?
16:11:26krux02some text based scriptable computer document format that allows to embed source code in arbitrary languages including nim.
16:12:23FromGitter<kaushalmodi> probably related: I have some Org mode tangling code in Nim here: https://github.com/OrgTangle/ntangle
16:13:01FromGitter<kaushalmodi> it basically takes an Org mode document with prose and code blocks and spits out just the code blocks concatenated together as appropriate to code files
16:13:58FromGitter<kaushalmodi> e.g. https://raw.githubusercontent.com/OrgTangle/ntangle/master/tests/multiple_src_blocks_tangled_to_same_file/multiple_src_blocks_tangled_to_same_file.org tangles to the hi and hello nim files in https://github.com/OrgTangle/ntangle/tree/master/tests/multiple_src_blocks_tangled_to_same_file
16:14:09leorizeso if I get this right, it's kinda like markdown but with more feature?
16:14:16FromGitter<kaushalmodi> yep!
16:14:30leorizeand then you can run a file by concatenating all code blocks?
16:14:37krux02and less editor support (only really works in emacs)
16:14:58FromGitter<kaushalmodi> leorize: the concatenation has some smarts to it
16:14:58krux02leorize, that is one way
16:15:05FromGitter<kaushalmodi> it's not plain concatenation
16:15:26krux02you can also export org-mode to html and the source blocks are executed as code generators.
16:15:26FromGitter<kaushalmodi> e.g. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d3f1b9e3e51d77b1b8d6166]
16:15:50FromGitter<kaushalmodi> above ^ the first and third get concatenated to hi.nim and second and fourth to hello.nim
16:16:12krux02to sum it up, it is flexible
16:16:34krux02but also horrible to configure because there are so many options that are also not always obvious in what they are supposed to mean.
16:21:27leorizedisruptek: well I don't think there's anything like org-mode for (neo)vim
16:21:43leorizethere were vim-orgmode, but it's now unmaintained
16:22:03leorizeI'm curious about org-mode though, can anyone gives a demonstration?
16:22:47leorizeI heard lots of praise about it, but I can't grasp what exactly make it so good
16:23:02*nsf quit (Quit: WeeChat 2.4)
16:25:02disruptekit's good in a text-mode editor, because we don't have OmniOutliner, basically.
16:27:26*Sembei quit (Ping timeout: 272 seconds)
16:27:44lqdev[m]@mratsim no VM yet, it's just the compiler
16:28:58leorizewell looks like org-mode usecase is not for me
16:31:27leorizebut I'm not entirely sure 'bout that
16:31:39leorizehaven't seen any demo of it
16:37:12ldleworkleorize: org-mode is one of the useful pieces of software there is
16:37:27ldleworkat it's core, it's just a simple outliner
16:37:39FromGitter<kaushalmodi> leorize: here's a video from YouTube search: https://youtu.be/SzA2YODtgK4
16:38:04ldleworkbut it has many many features which have grown from that -- centrally org-mode's most powerful features are to do with the aggregation and searching of those outlines
16:38:05FromGitter<kaushalmodi> I haven't watched it, but skipped few seconds here and there and it seems to be giving a good overview
16:38:12ldleworkprimarily the agenda
16:38:21krux02the problem with any videos about emacs is, they always show you the useless features and are super excited about it.
16:39:03*tjmac left #nim ("-bye")
16:39:04FromGitter<kaushalmodi> This one seems to go through the basic org tree structure
16:39:35krux02the things I did so far with org mode seemed to perform quite well.
16:39:54FromGitter<kaushalmodi> Ah, found it.. here's the video I had watched a while back: https://youtu.be/oJTwQvgfgMM
16:40:12FromGitter<kaushalmodi> It explains the Org mode basics that matter
16:40:15krux02I don't want to say that org-mode is high performance when you embed a lot of scripts, but it also doesn't seem to have many stupid slowdown problems.
16:40:28FromGitter<kaushalmodi> The presenter is the original author of Org mode.
16:40:42krux02if you are a vim-er emacs also has evil-mode (vi like editing)
16:41:04leorizeI can never correctly grasp evil-mode :P
16:41:12krux02but I don't know how well the vi keybindings clash with the org-mode keybindings.
16:41:38krux02well I don't use evil-mode, but I heared it is the best vim emulation out there.
16:41:50krux02I used it a bit.
16:41:55krux02with spacemacs.
16:42:14krux02but I don't use spacemacs anymore, I wanted to unclutter my emacs.
16:42:14ldleworkI would rather recommend one of the more popular guides than a video overview: http://doc.norang.ca/org-mode.html
16:42:39leorizeit's loooong :P
16:43:44FromGitter<kaushalmodi> One last video: I've seen redditors who claim to have switched to Emacs from vim after watching this video: https://youtu.be/JWD1Fpdd4Pc
16:43:50ldleworkWell, like any document, you probably don't have to read the whole thing.
16:44:04ldleworkThe video that kaushalmodi just posted is *excellent*
16:44:15ldleworkIf you are a vim person wondering about emacs
16:44:40*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:45:01ldleworkvim is a text editor, emacs is an application platform, is the main take-away
16:46:10leorizewell I've read that one, but it's full of emacs lisp
16:48:57lqdev[m]how fast are Nim exceptions?
16:49:23leorizeslow on C backend
16:49:33leorizefast of C++ if you don't throw a lot
16:49:50lqdev[m]good to know
17:00:03disruptekpro tip: don't have exceptions. engineer them out whenever possible.
17:04:51FromGitter<kdheepak> @Zevv ⏎ ⏎ > I'm running ⏎ > ⏎ > ``` ... [https://gitter.im/nim-lang/Nim?at=5d3f27332136933a871193cf]
17:10:00*snifftek quit (Remote host closed the connection)
17:10:33ZevvYeah, it's nasty. I always wondered why nim just not does simply expose popen()
17:10:39leorizeso I guess whatever you're running, it expects a tty?
17:10:47Zevvno it throws too much at stdout
17:11:27leorizeah, I see
17:12:10leorizethen just do an infinite loop of reading lines :P
17:12:24leorizebasically desaturating the pipe
17:12:29leorizeugly, but a walkaround for now
17:12:41FromGitter<kdheepak> If I'm not able to resolve this I'm going to have to rewrite a much of nim code in Python at the moment ( time critical issue ) and rewrite it in nim when there's a solution :p Which is why, if there's a hacky solution to this that'd be ideal!
17:12:59FromGitter<kdheepak> @leorize are you suggesting a infinite loop in a separate thread?
17:13:40Zevvno, startProcess is basically kind of broken - it just creates a pipe and puts everything in there; when the process is dead it reads the pipe.
17:14:00Zevvso you need to read the pipe yourself
17:14:12*Kaivo quit (Quit: WeeChat 2.5)
17:14:27*clyybber joined #nim
17:14:37leorizeZevv: that's execProcess
17:14:41leorizestartProcess does not do that
17:14:51Zevvah true, sorry
17:14:55ZevvI find osproc hopelessly confusing
17:16:02*Kaivo joined #nim
17:16:40Zevvand I also commented to the wrong issue yesterday just about this stuff :/
17:17:20FromGitter<kdheepak> @leorize is there a simple example somewhere that you can point me to?
17:19:57Zevvkdheepak: sorry for the confusion, but is your process sending a lot of output, or is it waiting for input?
17:21:18FromGitter<kdheepak> My nim program needs to run a command line application, and read the json output that is printed out by the program. So it is reading stdout of the subprocess.
17:21:25Zevvok
17:22:53*shomodj joined #nim
17:23:06Zevvok
17:23:14leorizekdheepak: then you should just get the `outputStream` and start reading on it
17:23:29Zevvright, I was putting togheter a little example
17:23:43shashlickcan you use header and dynlib pragma together?
17:24:48leorizeyes, you can
17:24:58Zevvdheepak: http://ix.io/1PXL
17:24:58leorizenot that it's useful
17:25:01Zevvuntested, sorry
17:25:23Zevvbut it's something like that. You start the process, and then you need to keep reading its output stream until it is EOF
17:25:27shashlick@leorize: if I do this - `proc test() {.header: "test.h", dynlib: "test.so".}`, nim creates a `#include "test.so"`
17:25:30FromGitter<kdheepak> Awesome!
17:25:35FromGitter<kdheepak> Thanks a lot!
17:25:53Zevvwhat will you do with that json? parse it?
17:26:00leorizeshashlick: seems like a bug
17:26:21FromGitter<kdheepak> @Zevv, yes. using the json module.
17:26:27Zevvbecause you can pass the stream straight into parseJson() and get the parsed json tree back
17:26:34Zevvno need for collecting and storing and passing to json
17:26:45shashlick@leorize - even 0.17.2 is broken
17:27:00leorizeyea, no one actually used both :P
17:27:26FromGitter<kdheepak> So this is what I was doing: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d3f2c7ea9200c24281cc4aa]
17:27:27shashlickwhat do i do with https://github.com/nimterop/nimterop/issues/134 then
17:27:50FromGitter<kdheepak> You are suggesting I can do this before the process has finished?
17:27:57Zevvyes
17:28:06Zevvthat's what pipes are for
17:28:45FromGitter<kdheepak> Interesting! I think that worked!
17:28:48FromGitter<kdheepak> Great!
17:28:49Zevvthread pools and all that modern stuff is overrated, just spawn and eat the output. Stone age multiprocessing, proved technology.
17:29:26FromGitter<kdheepak> I was initially checking for the return code as well
17:29:38leorizeshashlick: don't include?
17:29:53FromGitter<kdheepak> Since that process isn't guarenteed to return json, if it errors it prints the error message to the screen.
17:29:56leorizeisn't nimterop capable of translating everything to binary-compatible Nim?
17:30:04shashlick@leorize - that's how it works today
17:30:17FromGitter<kdheepak> Now I guess I just have to put a try except around the parseJson?
17:30:18shashlickya, so i am not sure what's the real use case for force including the header for a dynlib
17:30:31Zevvkdheepak: if you still would need the output when that happens, you should buffer it first. But if failing is ok, you might but the stuff in a try:
17:30:36Zevvright
17:31:09shashlick@leorize - here's the related forum post - https://forum.nim-lang.org/t/5002#31601
17:31:16Zevvbut the error messages are gone. If the tool is proper and sends errors to stderr instead of stdout, I think you can split stdout from stderr and read stderr yourself
17:31:23FromGitter<kdheepak> Yeah, it would be nice to print it out to the user if things fail. But this is good for now.
17:31:37leorize@kaushalmodi well I'm... not converted :P neovim is working too well here
17:31:48FromGitter<kdheepak> Thanks @Zevv and @leorize!
17:33:10leorizeshashlick: so I guess nimterop didn't translate the typedef?
17:33:46leorizestill, it's a bug in the compiler for header + dynlib, so please file an issue for that
17:35:48shashlickrunning the declaration standalone, nimterop is able to
17:35:55shashlickso i think it is something else going on
17:36:16shashlickwhat would be a use case to have header and dynlib? using certain structs?
17:37:17FromGitter<kaushalmodi> leorize: of course :)
17:37:28leorizeshashlick: C++
17:38:24leorizekaushalmodi: well magit is tempting :P but I don't do that much git stuff
17:39:06FromGitter<cheatfate> Only functions can be exported by dynamic library, so using dynlib and header is attempt to get types for arguments in function declaration.
17:39:48FromGitter<cheatfate> Take type information from header, but load this function at runtime.
17:41:31FromGitter<kaushalmodi> leorize: I learned git using magit.
17:41:59FromGitter<kaushalmodi> It has been tremendously helpful to me with my side projects
17:43:04FromGitter<kaushalmodi> There was a time when I had to look up on stack overflow each time I needed to make a PR to something.. and I annoyed a dev fee times by sending merge commits from my unrebased PR
17:43:14FromGitter<kaushalmodi> Fond memories :P
17:43:50*nsf joined #nim
17:45:21shashlick@leorize - i think my problem might be that i'm using importc with dynlib - so even tho the symbol is defined by Nim, it is looking for an import?
17:45:28shashlickhttps://github.com/nim-lang/Nim/issues/11851 meanwhile
17:50:48*shomodj_ joined #nim
17:53:43*shomodj quit (Ping timeout: 246 seconds)
18:03:34*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:03:36*Sembei joined #nim
18:04:33*natrys joined #nim
18:42:13*krux02 quit (Remote host closed the connection)
18:47:36leorizeshashlick: I think importc suppress the declaration when used with header
18:48:10leorize@kaushalmodi: you need to properly learn git :P
18:53:06FromGitter<ahcm> nimble install stbimage fails, probably the git url needs .git at the end for some git versions, not sure how to file a bug resport
18:53:52*alexander92 quit (Quit: WeeChat 2.4)
19:04:01solitudesfinstalls fine here
19:04:52solitudesfother nimble packages fail too?
19:09:03*alexander92 joined #nim
19:16:25FromGitter<mratsim> Arraymancer depends on stbimage and doesn't fail
19:18:36solitudesfalso, you can verify that by editing ~/.nimble/packages_official.json
19:21:06*nif quit (Quit: ...)
19:21:16*nif joined #nim
19:33:15*nif quit (Quit: ...)
19:33:24*nif joined #nim
19:34:09FromGitter<ahcm> $ ~/github/nim-lang/Nim/bin/nimble install stbimage ⏎ Downloading https://gitlab.com/define-private-public/stb_image-Nim using git ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5d3f4a3084bc7a717fe58eb5]
19:34:54FromGitter<ahcm> git version 1.8.3.1 as in scientific linux 7.6.
19:51:12FromGitter<Varriount> @zevv This looks really cool: https://github.com/zevv/lsofgraph
19:51:42Zevvit does graphs. everybody likes graphs.
19:52:20FromGitter<Varriount> I wonder if there's a similar tool for Windows? Goodness knows I'd love to have a visual look at what various ports are doing what on my personal laptop.
19:52:43clyybberAs complex as windows is, I doubt you'd have a chance
19:52:47Zevvshould be fairly trivial to make if you can get the info from somewhere
19:53:45Zevvbut even lsofgraph is only half usable - only one-to-one connections make sense, no way to map stuff like dbus
19:53:54FromGitter<ahcm> linux subsystem?
19:56:00*nsf quit (Quit: WeeChat 2.4)
19:57:45FromGitter<Varriount> @ahcm Hm, maybe?
19:58:04FromGitter<Varriount> Depends on how integrated the subsystem is with the primary networking stack.
19:59:53FromGitter<brentp> what's the fastest replacement for `copyMem(nimstring, cstring, n)` ?
20:00:45FromGitter<brentp> for now I have `nimstring.setLen(0); nimstring.add(cstring)`
20:01:16clyybbernimstring.setLen(n)
20:01:28clyybberand then loop from 0..<n
20:01:35clyybberand copy the chars manually
20:02:25clyybberBut why don't you just convert the cstring to a string, and then use a copy of that string?
20:02:27Zevvwhen copying chars manually, does the compiler c compiler grok what you're doing and using builtin memcpys?
20:02:45clyybberThat would be the fastest, since it will use refs underneath
20:02:59clyybberZevv: You mean optimizing the loop away?
20:03:20Zevvno I mean recognizing that its actually a memcpy, and using an optimized implementation for that
20:03:40FromGitter<brentp> maybe I should just use $cstr, but I wanted to pass in var string to reduce allocations. I'll do the loop and hope the compiler turns it into a memcpy
20:03:48Zevvcompiler builtin memcpy() outperforms byte-by-byte copy loops on a lot of platforms
20:04:35clyybberbrentp: Can you share a snippet?
20:06:33clyybberBecause you aren't saving any allocations, when you manually copy
20:07:27FromGitter<brentp> @Clyybber freshly pushed here: https://github.com/brentp/hts-nim/blob/master/src/hts/files.nim#L27-L36
20:08:06FromGitter<brentp> and used here: https://github.com/brentp/hts-nim/blob/master/tests/test_files.nim#L19-L29
20:08:59clyybberbrentp: That var is unneccessary, if you are doing it for performance
20:09:17clyybberStrings are internally passed by a fat pointer
20:09:55FromGitter<brentp> on `line`?
20:10:19FromGitter<brentp> you can't use setLen without the `var`
20:11:01clyybberbrentp: Yes, and to the second question, no, afaik
20:11:28clyybberOh,
20:11:42clyybbernvrmind the above. I know see what you are doing..
20:12:52clyybberHmm, I don't think you can improve on that
20:13:44FromGitter<brentp> aye. good enough for now
20:18:46*fvs left #nim ("WeeChat 1.6")
20:25:19*shomodj joined #nim
20:42:51*clyybber quit (Quit: WeeChat 2.5)
20:43:46*alexander92 quit (Ping timeout: 248 seconds)
21:27:18*ng0 joined #nim
21:28:55*jjido joined #nim
21:37:43*solitudesf quit (Ping timeout: 250 seconds)
21:47:27*fvs joined #nim
21:57:42*abm joined #nim
22:00:32*Vladar quit (Remote host closed the connection)
22:07:13*a_b_m joined #nim
22:07:50*donpdonp joined #nim
22:08:12donpdonphow can I echo a ptr variable, I want to see its int value
22:10:02*abm quit (Ping timeout: 245 seconds)
22:13:09*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:15:11FromGitter<kaushalmodi> try using `repr`
22:21:45*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:27:12*jjido joined #nim
22:28:24*natrys quit (Quit: natrys)
22:30:20*shomodj joined #nim
22:38:54*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:57:15*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:58:42shashlick@leorize - you around?
23:08:37FromGitter<Varriount> donpdonp: Or you can do `echo pointerVariable[]`
23:10:01FromGitter<Varriount> Zevv: I know that C compilers will usually optimize out byte-copying loops into memcpy calls, but I don't believe the Nim compiler does that itself.
23:17:09*krux02 joined #nim
23:19:23*fvs quit (Quit: leaving)
23:28:39*krux02 quit (Remote host closed the connection)
23:29:31*krux02 joined #nim
23:46:59*brainproxy joined #nim
23:52:55*gangstacat quit (Ping timeout: 250 seconds)