<< 22-01-2019 >>

01:13:28*ng0 quit (Quit: Alexa, when is the end of world?)
01:15:26*abm quit (Ping timeout: 250 seconds)
01:29:40FromDiscord_<exelotl> What will destructors mean for embedded? Will it be possible to have as fine control over memory and use as few resources as `--gc:none` currently does?
01:30:37FromDiscord_<exelotl> I've checked `--gc:regions` and it's really not cutting it for me, uses too much memory doing things I never wanted in the first place
01:43:51*skellock joined #nim
01:48:25*zachk quit (Quit: Leaving)
02:00:19rayman22201I expect it will be closer to `--gc:none`, but idk for sure. `--gc:destructors` is implemented in the latest devel, so you can try it now.
02:02:33rayman22201destructors is actually fully implemented afaik (modulo possible bugs), the parts still missing are the stdlib support; specifically destructor based `seq` and `string` are still wip.
02:03:16*dddddd quit (Ping timeout: 268 seconds)
02:06:51FromDiscord_<exelotl> Oh okay thanks, I'll give it a try
02:06:51*zyklon_ quit (Read error: Connection reset by peer)
02:09:16zestyrIs the github wiki page on destructors up to date, or is there better documentation now?
02:10:14rayman22201the wiki and reading the source are probably your best bet atm.
02:10:33rayman22201Still too early for good docs :-)
02:10:43rayman22201use at your own risk lol
02:15:58*dddddd joined #nim
02:17:04*Snircle quit (Read error: Connection reset by peer)
02:17:38*Snircle joined #nim
02:24:58*zyklon_ joined #nim
03:01:11FromGitter<arnetheduck> hey @genotrance, you around? care to run that one-liner again?
03:02:06*banc quit (Quit: Bye)
03:03:49*skellock quit (Quit: WeeChat 2.3)
03:10:14FromGitter<arnetheduck> or anyone else on linux, if you could try the following line in an empty directory: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c468996c45b986d119beb20]
03:14:22FromGitter<qqtop> @arnetheduck it works here , says: space mutants
03:14:46zestyrworks, compiles and outputs space mutants
03:15:12FromGitter<arnetheduck> @qqtop ooh, nice, thanks :) that's the new continuous build of `nlvm` in action
03:16:39zestyrtried compiling some other code but got this (not sure if relevant): /tmp/.mount_nlvmKuhMTL/Nim/lib/system/gc.nim(31, 10) Error: cannot open file: sharedlist
03:23:18*banc joined #nim
03:36:42*zachcarter quit (Ping timeout: 250 seconds)
04:03:46*nsf joined #nim
04:05:32FromGitter<arnetheduck> oh, that's a bummer, thanks.. I think I know what it is, think I forgot some config file
04:06:13*darithorn quit (Quit: Leaving)
04:06:41*zachcarter joined #nim
04:10:53*zachcarter quit (Ping timeout: 245 seconds)
04:12:48*zachcarter joined #nim
04:17:26*zachcarter quit (Ping timeout: 250 seconds)
04:23:36shashlickSorry was out
05:11:29ldleworkhttp://www.ccs.neu.edu/home/stchang/pubs/ckg-popl2017.pdf
05:15:43FromGitter<arnetheduck> hey @zestyr or @shashlick, mind trying that again with a freshly downloaded version? should be fixed
05:16:00zestyrsame link?
05:17:52FromGitter<arnetheduck> yeah
05:18:47*narimiran joined #nim
05:18:59FromGitter<arnetheduck> points to https://github.com/arnetheduck/nlvm/releases/tag/continuous which I'm setting up as an experimental build.. feedback welcome
05:27:26shashlickHey @arnetheduck what are you testing here
05:35:14FromGitter<arnetheduck> nlvm binary that also has the stdlib built in, so have a single executable with everything needed, basically, to compile nim programs (well, still need gcc to link) @shashlick
05:38:12ldleworkdom96: you might find that paper pretty interesting
05:48:25*ryukoposting quit (Quit: WeeChat 1.6)
05:49:21shashlickNice - are you using something like holy build box to make it cross distro?
05:57:48*lritter joined #nim
06:04:39*dddddd quit (Ping timeout: 244 seconds)
06:06:59*ftsf joined #nim
06:07:56*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
06:13:41*zachcarter joined #nim
06:17:47*zachcarter quit (Ping timeout: 240 seconds)
06:18:47*kapil____ joined #nim
06:32:03*absolutejamPhone quit (Ping timeout: 246 seconds)
06:32:22*absolutejamPhone joined #nim
06:45:16*donlzx joined #nim
07:06:23zestyrarnethedock: works now! but my programs segfault on exit
07:06:34zestyrit's using C FFI, not sure if that matters
07:10:21*krux02 joined #nim
07:11:45*ftsf quit (Quit: Leaving)
07:11:45*zyklon_ quit (Read error: Connection reset by peer)
07:29:32*absolutejamPhone quit (Read error: Connection reset by peer)
07:29:48*zyklon_ joined #nim
07:40:54*zachcarter joined #nim
07:41:58*Jesin quit (Ping timeout: 250 seconds)
07:45:36*zachcarter quit (Ping timeout: 268 seconds)
07:47:08Araqhttps://github.com/nim-lang/RFCs/issues/122
07:47:21Araqworth discussing.
08:00:00*gmpreussner quit (Quit: kthxbye)
08:02:13*absolutejamPhone joined #nim
08:04:45*gmpreussner joined #nim
08:04:50*absolutejamPhone quit (Client Quit)
08:05:08*absolutejamPhone joined #nim
08:25:15*absolutejam joined #nim
08:38:18*absolutejamPhone quit (Read error: Connection reset by peer)
09:01:26FromGitter<mratsim> replied
09:04:54*Vladar joined #nim
09:08:09*Cthalupa quit (Ping timeout: 246 seconds)
09:09:32*Cthalupa joined #nim
09:10:07*donlzx quit (Quit: Leaving)
09:17:45*kapil____ quit (Quit: Connection closed for inactivity)
09:24:23*abm joined #nim
09:25:02*zachcarter joined #nim
09:28:17*PMunch joined #nim
09:29:16*zachcarter quit (Ping timeout: 246 seconds)
09:29:47*FromGitter quit (Remote host closed the connection)
09:29:48*oprypin quit (Quit: Bye)
09:31:43*abm quit (Ping timeout: 245 seconds)
09:32:17*FromGitter joined #nim
09:33:20*zachcarter joined #nim
09:35:27*vonHabsi1 quit (Ping timeout: 244 seconds)
09:35:34*vonHabsi__ quit (Ping timeout: 246 seconds)
09:40:17*vonHabsi joined #nim
09:46:23*vonHabsi quit (Ping timeout: 268 seconds)
09:50:27*vonHabsi joined #nim
09:53:14*vonHabsi_ joined #nim
10:00:46*vonHabsi_ quit (Ping timeout: 244 seconds)
10:00:53*vonHabsi quit (Ping timeout: 245 seconds)
10:09:38*vonHabsi joined #nim
10:13:24*vonHabsi_ joined #nim
10:16:06PMunchHmm, did the defer at top level limitation get re-instated in devel?
10:18:14*nc-x joined #nim
10:18:25nc-xPMunch: yes
10:18:55nc-xactually it was a regression that the error for top level defer was not being given
10:19:54*vonHabsi quit (Ping timeout: 246 seconds)
10:19:55nc-xhttps://github.com/nim-lang/Nim/issues/10186 araq asked here to forbid it
10:20:03*vonHabsi_ quit (Ping timeout: 245 seconds)
10:20:22*nc-x quit (Client Quit)
10:21:08*floppydh joined #nim
10:21:19PMunchYeah I was wondering about that, I think it was causing some strange issues in my code
10:21:23AraqI still think 'defer' sucks
10:22:09Araqtry finally is much cleaner and not eternally confused about its scopes
10:24:10PMunchWell, I use defer for SDL stuff. I want to keep my renderer, sdl2 instance, image and TTF subsystems, and my window around until I quit my application. I would need to put essentialy my entire program in nested try catches for that if I wasn't using defer
10:24:27PMunchWell maybe not nested, but I would still need to put them all in a new scope
10:24:39Araqor you use a helper proc.
10:25:17PMunchhttp://ix.io/1yVA/Nim
10:25:22PMunchTake that as an example
10:25:39*stefanos82 joined #nim
10:25:55PMunchThe logic surrounding those defers and whan to clean up what would be a bit tricky with a try catch
10:26:19*nc-x joined #nim
10:26:20PMunchSay that it fails the nil check for the window, I must then release the things allocated before that, but not after
10:26:26nc-xis defer still required after destructors?
10:27:02PMunchHmm, I guess not
10:27:20PMunchAs long as the library properly implements them
10:27:27PMunchOr there is a way to do it yourself
10:27:41PMunchHei, nimlsp now has 50 stars on GitHub :)
10:27:49nc-xso IMO it would be better to remove defer from the language.
10:28:00FromGitter<likemik60537659_twitter> @2vg Hi why did you stop working on mofuw ?
10:28:12nc-xPMunch: great.. how usable is it?
10:29:32*nc-x quit (Client Quit)
10:29:41PMunchWell, I use it every day. So pretty usable I'd say :)
10:30:01leorizeIf it has all the suggestion features I'd just direct my neovim plugin users to it :P
10:30:55PMunchDefine "all the suggestion features"
10:31:04leorizebasically autocomplete
10:31:19FromGitter<alehander42> does it work for other backends
10:31:26FromGitter<alehander42> i often had problems with my previous plugin
10:31:31leorizeI'm rather skeptical to pick an async completion plugin to implement that on
10:31:46FromGitter<alehander42> when using it on jsbackend stuff
10:32:16PMunchalehander42, well it uses nimsuggest. So whatever that supports nimlsp supports
10:32:18*dom96_w joined #nim
10:32:33PMunchleorize, autocomplete works yes
10:33:00PMunchgithub.com/PMunch/nimlsp#supported-protocol-features
10:33:09FromGitter<alehander42> hm, i'll check
10:34:28FromGitter<alehander42> if nimsuggest can deal with `defined` stuff, that's an important thing to fix there
10:45:14FromGitter<alehander42> @PMunch i don't undestand something about nimlsp
10:45:28PMunchWhat don't you understand about it?
10:45:34FromGitter<alehander42> i can't see how can i hint the nim folder in sublime settings
10:45:38FromGitter<alehander42> and looking at the source
10:45:48FromGitter<alehander42> it seems if it doesnt get an explicit command arg
10:45:56FromGitter<alehander42> it uses currentSourcePath which sounds wrong
10:46:18FromGitter<alehander42> (or does this mean it uses its own nim submodule)
10:46:26PMunchYou need to pass it as an argument
10:46:43FromGitter<alehander42> in the "command"
10:46:45FromGitter<alehander42> hm ofc
10:46:50PMunchIf you compile it from it's own sources it will default to that, otherwise it will need to be passed as an argument when the process is launched
10:47:13PMunchTypically your editor has some way of sending command line arguments to the program in the LSP configuration
10:47:47FromGitter<alehander42> yeah
10:47:56FromGitter<alehander42> i didnt realize i can also pass the args there
10:49:49PMunchSaves the hassle of having yet another config file :)
10:53:46FromGitter<alehander42> wtf sublime has inline css color pickers
10:53:58FromGitter<alehander42> now
10:54:00FromGitter<alehander42> the future has arrived
10:54:38*vlad1777d quit (Ping timeout: 245 seconds)
11:07:36*vlad1777d joined #nim
11:08:14PMunchWhat?
11:10:20*dddddd joined #nim
11:10:57FromGitter<alehander42> for a long time sublime didnt really have good custom inline style/gadgets api support
11:11:19FromGitter<alehander42> so e.g. color pickers worked by spawning a separate native window with separate ui
11:11:24PMunchAaah
11:11:31PMunchYeah I can see how that would suck
11:11:43FromGitter<alehander42> it seems they added new abilites to the view api
11:11:53FromGitter<alehander42> vscode competition is good after all
11:12:31FromGitter<alehander42> btw now nimlsp starts fine
11:12:32Araqplease keep me updated, I keep flirting with Sublime
11:12:57FromGitter<alehander42> but i never find it in the LSP "choose a server" list
11:13:32FromGitter<alehander42> Araq, have you tried SublimeMerge btw: they made a git client not a long ago
11:15:18PMunchalehander42, do you have NimLime installed?
11:15:24*zyklon_ quit (Read error: Connection reset by peer)
11:15:58FromGitter<alehander42> yes
11:16:41PMunchHmm, strange
11:16:59PMunchAnd NimLime sees the .nim file as a valid file and runs syntax highlighting and such on it?
11:17:36PMunchIt should just be a matter of enabling the LSP server for Nim globally
11:17:40PMunchIIRC
11:20:05FromGitter<alehander42> yes, i usually use only nimlime
11:20:58FromGitter<alehander42> i'll play with the completion options
11:21:00FromGitter<alehander42> just in cas
11:21:08narimiranPMunch: i'm not familiar with LSP — is there any benefit of using your package in vscode compared to the current nim plugin?
11:21:58*zachcarter quit (Ping timeout: 268 seconds)
11:22:35PMunchHmm, probably not much
11:22:47FromGitter<alehander42> waiit
11:22:48FromGitter<alehander42> yeah
11:22:49FromGitter<alehander42> i see
11:22:56FromGitter<alehander42> the problem is that if i add enabled: true
11:22:58PMunchThe benefit of LSP is mostly that you will get the same level of support for any IDE that supports LSP
11:23:02FromGitter<alehander42> it's actually enabled already
11:23:09PMunchBut a tailored plug-in will probably always be better
11:23:14FromGitter<alehander42> so sublime doesnt show it in the 'enable' list obviously
11:23:19PMunchalehander42, aha
11:23:21narimiranPMunch: thanks
11:23:29PMunchThat makes sense I guess
11:24:04Araqpfff tailored plugins, that's heresy. We're after an equally mediocre experience for every editor. Praise LSP!
11:24:14PMunchnarimiran, that being said many of the Nim plugins out there are a bit out of date, so having one consolidated effort on making nimlsp work is probably the best long-term solution
11:24:58PMunchAraq, haha. Yeah I'm not touting LSP as the be all, end all of plug-ins. But it's a nice way to allow people to write Nim in pretty much any editor.
11:26:10PMunchStill has the slight issue of requiring some way of syntax highlighting and document recognition though, things which I don't think are included in the LSP spec
11:26:10Araqyeah, you convinced my months ago, I haven't changed my mind
11:26:11FromGitter<alehander42> PMunch: so what should be possible currently in e.g. sublime: autocompletion / hovering seeing definition?
11:27:07PMunchAutocompletion, hovering to see the definition and doc-comment, then you have three buttons (in Sublime) that can show you references to that function, jump to the defenition, and one more thing (rename?)
11:27:21FromGitter<alehander42> yeah i saw those while trying
11:27:24FromGitter<alehander42> the typescript lsp
11:27:27FromGitter<alehander42> to compare
11:27:30PMunchIt also supports error checking on save (which will highlight errors in the document)
11:28:12Araqdoes LSP support a "mini map" / code folding?
11:28:44PMunchI don't think so, unless I misunderstand what you mean
11:28:55PMunchThose would be more syntactic/display features
11:28:59Araqpity
11:29:21Araqdoes it support 'dus'?
11:29:41narimiranPMunch: "(...) references to that function, jump to the definition" --> well, the current nim plugin for vscode has (sometimes) trouble with that, so LSP might be better already
11:29:47FromGitter<alehander42> what does minimap / code folding have to do with lsp, they're editor token/grammar based features
11:30:10narimiranit is ok, if it is a function that you have defined in that file, but if it is in some other file - bummer
11:30:11PMunchalehander42, exactly.
11:30:22FromGitter<alehander42> i fold nim code often
11:30:43Araqrigtht... and editors are known to provide good Nim parsers on their own
11:30:43FromGitter<alehander42> i always have a minimap of it too
11:30:50PMunchnarimiran, it works pretty well, can even take you to the body of a macro that generated a procedure. But other times it fails, not entirely sure why
11:31:16Araq'dus' is one of my favourite features, no editor has it though. :-/
11:31:25PMunchAraq, well that is what I was saying. Along with nimlsp editors also need syntax highlighting and document recognition
11:31:31FromGitter<alehander42> Araq, in any case, this should be part of the same abstraction that deals with giving highlighting info
11:31:31PMunchWhat does dus do again?
11:31:33FromGitter<alehander42> not with lsp
11:31:42narimiranok, i might give it a try some day :) i'll probably spend too much trying to make it work (that's on me, not on you ;)), so i need a weekend for that :D
11:32:03Araq'dus': goto definition unless you're on the definition then it's goto usages
11:32:13*zyklon_ joined #nim
11:32:22Araqbasically "jump to what I think"
11:32:33PMunchHmm, I don't think that's supported..
11:32:41FromGitter<alehander42> well, lsp provides all the needed primitives
11:32:43PMunchBut I guess an editor could support that
11:32:59FromGitter<alehander42> a plugin/editor can add dus to context menu/shortcut
11:33:14FromGitter<alehander42> e.g. the general lsp plugins
11:33:17PMunchnarimiran, it's gotten a lot easier to use. alehander42, just got it up and running in minutes
11:33:20FromGitter<alehander42> sounds useful indeed
11:33:27FromGitter<alehander42> PMunch, careful there ..
11:33:27FromGitter<alehander42> :D
11:33:36PMunchDoesn't it work yet?
11:33:53FromGitter<alehander42> it starts and logs events correctly now
11:34:04PMunchWell that's a start :P
11:34:12FromGitter<alehander42> but the problem is, i can't really see any effect
11:34:40FromGitter<alehander42> e.g. i can see `../hover` when i hover over a function name
11:35:02FromGitter<alehander42> but no info box or anything
11:35:14FromGitter<alehander42> same with completion and didChange
11:35:30FromGitter<alehander42> maybe my nimsuggest is old?
11:35:54PMunchnimlsp uses nimsuggest as a library
11:35:59PMunchSo it's compiled into the nimlsp binary
11:36:08PMunchSo that's not the issue
11:36:17PMunchBut that is indeed strange
11:36:30PMunchIs this Sublime 2 or 3 by the way?
11:36:34FromGitter<alehander42> sublime3
11:36:49FromGitter<alehander42> (3.1.1)
11:37:19PMunchI think that's the version I tried it with..
11:37:29PMunchAt least 3, not sure about the subversion
11:37:32FromGitter<alehander42> i am usually in a branch in my nim folder, i will check with devel & new install
11:38:10PMunchYou could also try to compile nimlsp in debug mode, it get's a lot more verbose that way
11:39:01FromGitter<alehander42> ok
11:40:32*vlad1777d quit (Remote host closed the connection)
11:41:50FromGitter<alehander42> i can just copy the nimsuggest folder right
11:42:17PMunchWell it doesn't use nimsuggest, so for all nimlsp cares you can delete it :P
11:43:24PMunchI don't quite understand why it's so hard to install nimlsp.. When I did it it was quite straight forward..
11:43:43PMunchI guess I'll have to spin up a clean VM of some sort and try it myself..
11:44:28FromGitter<alehander42> no, I guess it worked in the beginning, but it wasnt obvious, because i couldn't actually "enable" it , maybe this should be clarified in the readme
11:45:47PMunchYeah I want it to be as simple to install as possible..
11:45:54*zyklon_ quit (Read error: Connection reset by peer)
11:51:37ZevvAraq: you said varargs[SomeInteger] is not efficient, should I make it just vararg[int] then
11:54:08*kapil____ joined #nim
12:00:11FromGitter<alehander42> PMunch: i found the issue
12:00:22FromGitter<alehander42> getProjectFile is entering an infinite loop
12:00:24FromGitter<alehander42> for my file
12:02:35*zyklon_ joined #nim
12:10:35dom96_wPMunch: Still depending on the compiler sources?
12:10:45dom96_wif so, an easy installation will be really painful
12:17:13*Snircle joined #nim
12:17:26*zachcarter joined #nim
12:18:57PMunchalehander42, well that's not good
12:19:02PMunchAny idea what's causing it?
12:19:16*skellock joined #nim
12:19:21*vonHabsi joined #nim
12:19:30PMunchdom96_w, it still relies on compiler sources. But the .nimble file automatically pulls them so all you need to get the binary is "nimble install nimlsp" :)
12:20:05PMunchSo that part is easy enough. But you still need to point it to where it can find the Nim stdlib and you need to set up your editor to execute it properly.
12:20:20dom96_wYeah, I've been there. It's very easy to get compiler version mismatches
12:20:43dom96_wMake sure to pin the compiler package commit
12:20:57*donlzx joined #nim
12:21:40PMunchYeah I think it does that already, but I might've forgotten
12:22:14FromGitter<alehander42> @PMunch well the path becomes `/` sometimes
12:22:20FromGitter<alehander42> and it doesnt change after that
12:22:40FromGitter<alehander42> this is easy to check, but not sure what's the right behavior then (just reusing the default config?)
12:22:42PMunchHmm, that's strange
12:23:24PMunchWell it requires to get the correct project path to work correctly
12:23:56PMunchI guess implementing the show notification thing would be a good idea. That way it could show this as an error in the UI at least.
12:26:31FromGitter<alehander42> yeah, sounds reasonabl
12:27:04PMunchBut why does it enter an infinate loop in the first place? Do you have a very strange project structure?
12:31:47AraqZevv, no, it's the varargs/openarray that turns stuff into an array construction
12:31:59Araqthat neither Nim nor the C compiler are able to optimize away.
12:32:06Araqwell that's my educated guess
12:32:15Araqdidn't look at the asm
12:39:47*zyklon_ quit (Ping timeout: 240 seconds)
12:43:03Zevvok I'll drop those
12:45:18FromGitter<alehander42> PMunch, well I started with a single file in my `~` folder
12:46:04FromGitter<alehander42> later it seemed to work with the nimlsp repo(still no completion tho, but this is because sublime wasnt firing completion events for some reason)
12:46:27FromGitter<alehander42> but in any case, those loops should terminate cleanly
12:48:50PMunchYeah that is definitely not great..
12:51:32livcdDoes jester still workk on Windows ?
12:53:14FromGitter<alehander42> PMunch well otherwise it seems great, does it support renaming already
12:53:36*oprypin joined #nim
12:54:03PMunchYes
12:54:24PMunchBut at least in Vim it requires that the cursor is on the first character
12:54:31PMunchDon't think that's a general limitation though
13:00:28*Perkol joined #nim
13:00:45Zevvthe bitops multibit operations now unroll in a macro, PR updated
13:01:24*PrimHelios joined #nim
13:01:53*PrimHelios quit (Remote host closed the connection)
13:03:39Zevvadds dependency of bitops on macros, though, not sure if that is bad
13:11:48FromGitter<arnetheduck> @zestyr not sure - most ffi works fine, but there are some subtle mem handling / gc issues left to fix in nlvm still, could be that.. cool, thanks for trying :) if you wanna compile with --debuginfo, then run through gdb and grab a call stack, feel free to report a bug on https://github.com/arnetheduck/nlvm
13:28:28Araqhmm what should the switch be that turns off exceptions for sysFatal
13:28:51Araqwe already have -d:noSignalHandler to turn off signal handlers
13:29:19Araqand we have --opt:size. and --gc:regions and --gc:none. and --os:standalone
13:29:46Araqall of which try to attack the same problem, strip out stuff so that Nim runs with 32K of RAM
13:30:48Araqshould we go on with this path of individual switches or do we want higher level switches that declare more of the intend
13:32:59FromGitter<Varriount> SysFatal?
13:39:55Araqthe stuff the spec says are strictly speaking not catchable errors
13:40:03Araqlike IndexError
13:56:59*abm joined #nim
14:03:29*donlzx quit (Quit: Leaving)
14:08:13dom96_wlivcd: there is a bug that causes it to break on Windows sadly
14:10:25livcddom96_w: oh :/
14:13:31Zevv"Sorry, one more thing: Produce a single ``setBit`` call with or'ed bits.". Is that better? The current macro is fully optized away by my compiler, setBits(1,3,5,7) results in a nice 0xAA being or'ed
14:13:52ZevvOr I didn't understand your comment, also possible
14:16:35Araqno that's what I meant
14:17:06Zevvso that's ok now
14:20:03Zevvthanks
14:22:33*zachcarter quit (Ping timeout: 245 seconds)
14:38:46*vlad1777d joined #nim
14:51:07narimirandom96_w: hey, you here?
14:51:48dom96_wyes
14:52:50narimirani've cleaned up asyncftpclient's types, as you instructed. the tests are passing, but i'd like to check with you too if i didn't clean it up too much :) https://github.com/nim-lang/Nim/pull/10401/commits/0fa0808fda4b02be146edb2e6a7a9cdb06b95910
15:00:29dom96_wSeems good
15:01:45*JnR joined #nim
15:02:52narimiranthanks
15:02:55JnRIs anyone here? Noone else has used Nim
15:03:12JnRThis is the only source for info
15:03:41narimiranJnR: yes, there are plenty of us here :)
15:06:51JnRFantastic. I'm fairly unexperienced with programming(still haven't left Python) and I ran across Nim yesturday for the first time and it looks like it has limitless potential. As far as a macro I guess. All I've seen are the flawless example interpreters from the site. Is there some kind of serious limitations to it's ability that I'm not seeing?
15:08:04JnRAlot of it's benefit I see ad educational too, like interpreting languages and such
15:08:19narimiranjust start using nim :)
15:09:13*MyMind quit (Ping timeout: 245 seconds)
15:09:19*Pisuke joined #nim
15:09:20JnRWell each language is a huge commitment in my opinion. I've spent a year working with Python now and there so much I haven't done yet
15:11:01JnRNim could be run out of some guys garage and I honestly would have no idea because it
15:11:09JnRbecause it's so unpopular
15:12:09ZevvThere's no google or netscape or other big organization behind Nim
15:12:24Zevvwhich unfortunately makes a lot of difference in exposure
15:13:27absolutejamjust saw the nimpy post on reddit & hn
15:13:32absolutejamthat's pretty cool
15:13:43absolutejamLeveraging nim to do Python's heavy-lifting
15:13:45JnRI'm don't normally just hop on bandwagons but computer programming is one subject where popularity HAS to be taken into account
15:14:14absolutejamJnR: I've been playing with Nim for a about a week, and while you need a bit of time to play with it, you'll only do yourself good by learning it
15:14:57absolutejamI know what you mean, you don't want to learn something seriously limited, but maybe look at the stlid
15:15:00leorizeZevv: well status.im is pretty big :P
15:15:08absolutejamand search nimble, the package manager
15:15:13leorizebut yea, they don't have a huge influence on devs
15:15:35absolutejamIt's not Go level, but it also doesn't make you feel gross when writing it, like Go does
15:15:43FromGitter<kaushalmodi> JnR: See if Nim works for you/your pet projects
15:15:53absolutejam(Go level of popularity/hotness and packages I mean)
15:15:56FromGitter<kaushalmodi> Once you convince yourself to use it, you can convince your peers
15:16:20JnRI was actually thinking of starting with GUI programming. Only because writing GUIs with Python just never feels right
15:16:59PMunchJnR, there are some interesting GUI offerings in Nim :)
15:17:43absolutejamI actually ventured into Nim and wen't back to Python for the project I'm writing
15:17:54absolutejambut that's because the I need the dynamic nature of Python vs. any static language
15:17:59JnRPMunch Do you think I could port QT fairly easily with Nim?
15:18:14absolutejambut I'm happy to add (beginner) Nim to my skillset, because the next _appropriate_ project will be in Nim
15:18:28leorizeJnR: someone already wrapped QML iirc
15:18:50absolutejamThat's nothing against Nim, that's because I done goofed with the way I want to implement said project
15:18:56PMunchYeah there's this: github.com/filcuc/nimqml
15:19:21PMunchAnd this: github.com/ba0f3/qml.nim although it's a bit older so it might not quite work
15:21:55JnRThanks for your opinions. I'll probably start by using it like a Tool for python applications rather than jumping in headfirst
15:23:40JnRPMunch I was kinda looking forward to having the opportunity to prove I can improve everything I find faulty
15:23:43FromGitter<kaushalmodi> talking of GUI libraries, I happen to just learn about http://www.ir.isas.jaxa.jp/~cyamauch/eggx_procall/
15:23:54FromGitter<kaushalmodi> has anyone heard of that one/used that?
15:24:09FromGitter<kaushalmodi> I might need to create a wrapper for EGGX
15:24:58PMunchJnR, you might also want to check out my genui macro: github.com/PMunch/wxnim#the-genui-macro
15:25:22PMunchkaushalmodi, that looks horrible..
15:26:41FromGitter<kaushalmodi> heh, what would be a better library today? I have zero experience with GUI stuff
15:27:50JnRPMunch Thanks! I was just about to start looking for a solid working reference program to look around
15:28:22PMunchkaushalmodi, well I tend to use wxWidgets or Gtk
15:28:38PMunchQt is of course always an option, the licensing issues are much better now
15:29:07PMunchI should get cracking on my own library as well..
15:29:25FromGitter<kaushalmodi> PMunch: I am looking at creating this from the EGGX examples: https://ptpb.pw/ee5u/c
15:29:26JnRI hate to say it but Qt5 is ad good as it gets for Python
15:29:28dom96_wnimx!
15:29:53dom96_wNot complete but a pretty nice start
15:30:00JnRI wish I knew JS so I could use Electron
15:30:16skellockfriends dont let friends use electron
15:30:18dom96_wSadly I still believe Electron/libcef is best
15:30:30leorizethere's gintro for pygtk lovers
15:31:04JnRI googled Nimx and got Natnl Institute of mental healthj
15:31:26PMunchElectron is horrid..
15:31:31skellockJnR: osnap
15:31:32FromGitter<kaushalmodi> search "nimx nim"
15:31:52PMunchkaushalmodi, well if you're only drawing pixels and such I guess you could use SDL2
15:31:55leorizeor look for it in nimble.directory
15:32:00PMunchOr try to wrap that lib
15:32:03FromGitter<kaushalmodi> JnR: huh searching just "nimx" returns the correct result for me
15:32:06FromGitter<kaushalmodi> on google
15:32:11JnROk this time i got FEMA.gov
15:32:16PMunchGoogle does a lot of profiling
15:32:20FromGitter<kaushalmodi> PMunch: thanks, that's what I need
15:32:33PMunchSince you've googled for Nim stuff before then it's more likely to find a nim lib for you
15:32:37JnRwait a minute...
15:32:39FromGitter<kaushalmodi> If you followed my yesterday's messages, I am still working on systemverilog/nim integration
15:32:45JnRWhy is my search bar using Yahoo?!?
15:32:53PMunchHaha :P
15:33:03FromGitter<kaushalmodi> now looking into having the arrays, etc. from SV side to plot to graphs, etc.
15:33:07FromGitter<kaushalmodi> like in Matlab
15:33:23PMunchJnR, while I still hold that Electron is horrid you don't actually need to know JS to use it. You can do it in Nim
15:33:37FromGitter<zetashift> what there are nim electron bindings?
15:34:02FromGitter<zetashift> https://github.com/PMunch/nim-electron oh snap that's neato
15:34:02PMunchzetashift, yes.. https://github.com/PMunch/nim-electron
15:34:16FromGitter<zetashift> haha :P
15:34:19PMunchAlso with Karax if you want: github.com/bluenote10/nim-electron-karax
15:34:57FromGitter<zetashift> Well I'm not a big fan of electron but vscode and discord make it seem really okay
15:35:13PMunchUntil you check their RAM usage..
15:35:18JnRPMunch what could possibly be so bad about Electron? It's universal, relatively simple. Some apps I tried were very resource heavy but that might be the creators fault
15:35:47zestyrThey're inherently heavy, it's essentially a glorified Chromium wrapper
15:36:19zestyrhaving your program run in what's essentially a full browser is really unnecessary
15:36:26PMunchWell as you say it's a resource hog. It also plays really bad with accesibility options, offer little to no desktop integration, and is generally just a bad idea..
15:36:29skellocktable stakes is 150mb on disk; 2 processes - one running node.js / another chromium; -- then you get to start building your app
15:36:33FromGitter<zetashift> @PMunch yea it isn't great, ~170mb for discord and 140 for vscode but all in all for the experience I get it's kind of word it
15:36:41*PMunch quit (Remote host closed the connection)
15:36:57*PMunch joined #nim
15:37:07FromGitter<zetashift> also vscode only got big because of a nimsuggest memory leak but that doesn't really happen all that often
15:37:39JnRWhy can't chromium be limited further?
15:37:42FromGitter<zetashift> worth it* man my spelling is really bad today
15:37:48PMunchIt's really a case of having a hammer making everything look like a nail
15:37:48JnRAs far as the resources it's using
15:38:02*Geezus42 joined #nim
15:38:15PMunchPoor web devs only knowing JS and wanting to create some actual applications.
15:38:21zestyrwell, why do you even want to write a desktop application in a browser environment? web development is bad enough as it is lol
15:38:24PMunchAnd then node, and later electron was born..
15:39:22JnRWell before trying it it sounded like an easy platform to put python onto.... And then I realized I was so, sooo wrong
15:39:26FromGitter<zetashift> because before QML I think Qt was really hard to get into
15:39:35PMunchIsn't Electron also bundled into every application, meaning that you essentially have multiple copies of chromeium installed on your machine?
15:39:37FromGitter<zetashift> and that was the only solid cross platform api
15:39:47FromGitter<zetashift> yep
15:40:17PMunchwxWidgets is pretty solid IMO
15:40:27FromGitter<mratsim> I'm pretty sure this is the same with zlib on Windows ;)
15:40:47PMunchWell, Windows is it's own flavour of special..
15:40:54JnRI don't know HTML or CSS but they sound like great ways to add structure
15:41:07PMunchWithout any real package management system having libraries just doesn't work all that well
15:41:15PMunchJnR, they're not
15:41:39PMunchTheir initial uses are very different from what they are used for today, and it shows
15:42:10PMunchPlus 30 years of different browsers have made the spec a bit hairy
15:43:27JnRCouldn't I just hypothetically put C in Chromium and run apps natively?
15:43:57PMunchThat's essentially what my nim-electron project does, but with Nim creating the C code
15:44:10PMunchIt has a small JS part that essentially just works as a bridge for the C code
15:44:39JnRDoes Nim interpret C as Js or actually run C on the Browser?
15:45:17PMunchWell the way it works is that Nim creates C code which is compiled into a native binary. Then another part of the project is compiled from Nim to JS.
15:45:48PMunchThe JS part then interfaces with Electron, and the C part interfaces with the JS part over a socket.
15:46:01PMunchSo you can implement the business logic in C and the GUI logic in JS
15:46:18PMunchNot that you should of course
15:46:25narimiranJnR: did you check out the nim telegram channel? ;)
15:46:43PMunchIt's really quite ironic that I'm the person with the nim-electron library since I'm so opposed to using Electron..
15:46:54FromGitter<zetashift> yea ;P
15:47:16FromGitter<zetashift> but honestly cross platform gui libraries are insanely hard to do
15:47:41PMunchI know, tried to make one
15:47:51PMunchStill want to complete it though. It certainly had some promise
15:48:00zestyrGtk and Qt are both cross-platform
15:48:10PMunchWell, not really
15:48:31PMunchThey run across multiple platforms, doesn't integrate all that well though
15:48:49PMunchQt on Linux for example doesn't integrate with the notification system
15:49:04JnRPMunch That's exactly the type of Nim implementation I've been looking for. If it's actually more efficient than the standard Election application than that's a huge plus
15:49:57PMunchWell, the GUI logic would still be in JS. And the RAM usage of Electron isn't going away. But at least you can do heavy computations in native code
15:50:19JnRnarimiran Nim telegram channel? Is telegram something I should know about or is it literally a telegram?
15:50:19PMunchAnd interface with C libraries, which might help with desktop integration
15:50:32PMunchHaha, Telegram is a chat applications
15:50:50PMunchWe haven't set up an actual telegram chain for Nim :P
15:51:46JnROhhhhh
15:52:21JnRWait isn't a Web Browser basically a glorified markup text editor?
15:52:40JnRI actually have no idea
15:52:51zestyrweb browsers are huuuuge these days
15:52:55narimiranJnR: your style reminded me of one telegram user so i had a deja vu ;)
15:53:24PMunchJnR, in a way yes
15:53:42PMunchHTML stands for Hyper-Text Markup Language
15:54:07FromGitter<alehander42> @PMunch: what you were describing sounded a bit like https://github.com/atom/xray
15:54:20PMunchThen someone figured out they wanted to have things in different colours and such, so CSS was born. And then someone figured they could add some fun dynamic content, and JS was born
15:54:27JnRI learned about Nim from that one text editor that runs Qscintilla. Nim was in charge of the high speed text formatting
15:54:30FromGitter<alehander42> they use a rust process which does most of the work / maintains internal data strcutures while using electron for rendering
15:54:37FromGitter<alehander42> are you talking abiout sm similar
15:55:50PMunchYeah, it would be something similar to that.
15:55:58PMunchThe basic example I have made is of course much simpler
15:56:40JnRnarimiran I'm glad I have a style and it's not being hunted down by an angry mob for once. This is a great channel lol
15:56:56PMunchJnR, which one?
15:57:03PMunchThe editor you mentioned
15:57:39JnRHold on I'm looking it up...
15:57:56PMunchThe Nim community is pretty friendly :) Despite some people not agreeing :P
15:58:02JnRhttps://matkuki.github.io/ExCo/index.html
15:58:39JnRThe editor is rediculous it has about 1000 features
15:58:56ZevvVim has 2000, and emacs 3000 - that's how editors go
15:59:16JnRBut it claims you can optionally use Nim to add really high speed formatting procedures
15:59:39zestyrmeh, Emacs already has all these features :)
15:59:55ZevvEmacs does not have hexagon toolboxes!
16:00:06JnRBut this one puts them all in the GUI
16:00:17zestyrEmacs is a GUI, unless you use the inferior terminal version
16:00:35JnRLike they're not all keyboard commands, theres a hude GUI menu
16:00:38zestyrIt even has xwidgets, you can embed browsers inside it
16:00:52PMunchzestyr, inferior?
16:01:05PMunchGUIs are over-rated
16:01:16zestyrworse colors, limited keycodes, no GUI features like images (displaying PDFs etc)
16:01:29zestyrand slower
16:01:35Zevvtake it easy guys, lets finish the editor wars first before we go to GUI/desktop wars
16:01:36PMunchAh, well those things I can get behind
16:01:38JnRI thought Emacs and Vim were useless when I first tried them because they didn't assist me with the controls
16:01:58PMunchThe terminal definitely isn't perfect. When I think of GUI apps it's the more common kind
16:02:18PMunchJnR, oh yeah. Vim and Emacs can be pretty hard to get into
16:02:51JnRActually I got into Vim and I must admit it's pretty fun once you learn the controls
16:02:58FromGitter<zetashift> but once you do, oh damn
16:03:09JnRBut when I really wanted to get work done I opened another editor
16:03:30FromGitter<zetashift> I can't ctrl+S anymore it's either :w(q) or space+f+s
16:03:37zestyrlol
16:03:42PMunchHuh, I like how that editor uses Nim for extra lexer stuff. Interesting application
16:04:00FromGitter<zetashift> never heard of it either looks solid
16:04:01*abm quit (Quit: Leaving)
16:04:09PMunchYeah, I'm broken whenever I try to use other editors
16:04:23PMunchTry to jump around, run commands etc.
16:04:41ZevvI have this signature on my email for the last 20 years:
16:04:41JnRWell if you've heard of Qscintilla, this is the Editor featured on their website
16:04:41Zevv--
16:04:41Zevv:wq
16:04:41Zevv^X^Cy^K^X^C^C^C^C
16:04:44zestyrThen there's this: https://github.com/yuutayamada/nim-emacs-module
16:04:58FromGitter<zetashift> lol
16:05:05PMunchZevv, solid joke :)
16:05:25PMunchJnR, I've heard of Qscintilla. Not quite sure what it is though
16:06:33JnRPMunch As far as I understand It's a really advanced text formatting engine. It's open source for C and Python
16:07:34*darithorn joined #nim
16:07:54JnRPMunch I didn't realize how complicated text editing was before I tried using Scintilla
16:08:28PMunchYeah if you want to do it right it's hard
16:08:37PMunchThat's true for most things though
16:08:45Zevv:)
16:08:58Zevvstory of my life.
16:10:06JnRI don't care I'm determined that there's an easy way no ones found yet
16:10:11JnRJust one more hour
16:10:51FromGitter<kaushalmodi> someone said Emacs?
16:11:03FromGitter<zetashift> how is the nim support in emacs now btw?
16:11:07FromGitter<kaushalmodi> I am all ears, Not reading the whole thread, yeah, it's the best editor
16:11:16FromGitter<zetashift> haha
16:12:22ZevvVim support has improved significatanly over the last few days thanks to leorize btw: https://github.com/alaviss/nim.nvim
16:13:05JnRWhat is NeoVim? is it better than Vim?
16:13:11PMunchzetashift, as long as the syntax highlighter works and it has LSP support it should be fine
16:13:15ZevvJnR: it's a rewrite
16:13:43leorizethe ui, yes, but the core was based on vim
16:13:46Zevvvim is decades of legacy and compatibilty, and some people felt that slowed down progress.
16:14:20FromGitter<kaushalmodi> @zetashift the nim-mode has been working great for me
16:14:39zestyrI still haven't been able to fix flycheck, so I just disabled it
16:14:46FromGitter<kaushalmodi> I've heard there's lsp-mode for emacs too, but I need to learn what lsp is all about and then I can configure it to use PMunch's Nim lsp work
16:14:47JnRWell, nothing ruins progress like some weird sentimental pride of the good ol days
16:15:05FromGitter<kaushalmodi> zestyr: I live without flycheck
16:15:11zestyrlol
16:15:30FromGitter<kaushalmodi> zestyr: I use Org Babel a lot!
16:15:33ZevvJnR: you should ask Araq (the lead nim developer) about C and legacy and "good old days" one day :)
16:15:42FromGitter<kaushalmodi> I quickly type in a snippet, C-c C-c and I see the result
16:16:01zestyrya literate programming in org is pretty nice
16:16:48FromGitter<kaushalmodi> here's a quick peek of what it looks like
16:16:57FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/lA40/image.png)
16:17:16FromGitter<kaushalmodi> (for folks who don't know Org mode / Emacs / Org babel and the nim support in there)
16:17:24JnRZevv lol Some of the channels are seriously too hostile to discuss an opinion in because of those damn "Old days"
16:18:02ZevvHere people with opinions are usually just banned, that's pretty effective
16:18:11narimiran:)
16:18:49FromGitter<tweenietomatoes> Narimiran <3
16:19:06JnRI've learned that every channel as an army of memers waiting to jump on an outsider with something new to say
16:19:07PMunchZevv, what has changed with Nim support in Vim?
16:19:20narimiran@tweenietomatoes yes?
16:19:29FromGitter<tweenietomatoes> im biggest fan of you
16:19:30ZevvPMunch: I switched to the leorize's indenter
16:19:50narimiran@tweenietomatoes should i start to worry?
16:20:00FromGitter<kaushalmodi> hehe
16:20:12ZevvI have pretty low requirements for language support for editors and I don't do highlightign, but a good indenter makes me happy
16:20:22FromGitter<tweenietomatoes> Netbeans 10 is best IDE ever.
16:20:27FromGitter<tweenietomatoes> use it.
16:21:05PMunchZevv, I've been using Vim with only a syntax highlighter until I made nimlsp
16:21:33*absolutejam quit (Ping timeout: 244 seconds)
16:22:20Zevvnimlsp, that's new to me, reading up...
16:22:33JnRI wish I could just steal Sublimes easy and simple formatting tools
16:22:42JnRI don't like the editor
16:22:46FromGitter<kaushalmodi> PMunch: you need to blog about this
16:23:36FromGitter<kaushalmodi> If someone understand the LSP stuff and uses Emacs, look into https://github.com/joaotavora/eglot
16:23:55PMunchkaushalmodi, hmm that is a good idea
16:24:00PMunchBeen a while since my last post
16:24:09FromGitter<kaushalmodi> My understanding is that PMunch's nimlsp will pair with that eglot client in Emacs
16:24:45*Geezus42 quit (Ping timeout: 268 seconds)
16:24:51FromGitter<kaushalmodi> PMunch: may be also include an LSP primer
16:24:52PMunchPretty much yes
16:24:56FromGitter<kaushalmodi> what is it all about :)
16:25:02PMunchGood idea
16:25:24PMunchlangserver.org has a nice briefing on it
16:25:33FromGitter<kaushalmodi> PMunch: I hope these make sense to you https://github.com/joaotavora/eglot#commands-and-keybindings
16:26:07PMunchYup
16:26:44*Geezus42 joined #nim
16:28:24JnROh damn I didn't even realize there was a language server option
16:29:44*Trustable joined #nim
16:31:43JnRSo the Language Server runs externally from the editor?
16:32:19PMunchYup
16:32:34JnRThat doesn't slow anything down?
16:32:52leorizemost editors do the communication asynchronously
16:33:02leorizeyou wouldn't feel a thing
16:33:23PMunchWell the LSP protocol is pretty terrible
16:33:29AraqXD
16:33:36PMunchSo it's definitely not the fastest thing in the world
16:34:10*vlad1777d quit (Ping timeout: 246 seconds)
16:34:17JnRI mean I don't plan of like diffing files with it or something
16:35:09FromDiscord_<Generic> ß
16:35:34JnRI've spend too much time trying to program text formatting into an editor directly. It's really complex
16:36:03JnRAnd Python will eventually struggle to handle the load
16:38:41*floppydh quit (Quit: WeeChat 2.3)
16:45:18dom96_wPMunch: in what ways is it terrible?
16:47:00shashlickdom96_w: can you look at the choosenim init script PR?
16:47:15dom96_wI'll look tonight
16:47:32shashlickonce that's in, we can enable windows in travis
16:49:33PMunchdom96_w, the LSP protocol?
16:49:40dom96_wyeah
16:49:56PMunchWell it sends all data as UTF-8, but sends all indices and slices as UTF-16 offsets..
16:50:17PMunchThat's probably the worst part
16:50:35dom96_whah, that's indeed terrible
16:50:41dom96_wAny idea how they came up with this?
16:50:45JnRSomebody recommended using Nim with Crystal but I can't find a single thing on the two working together
16:51:17PMunchC# saves strings as UTF-16, because that's what Microsoft but their money on back in the days
16:51:38PMunchJava does as well IIRC
16:52:01PMunchI guess it made sense to whoever prototyped it for VSCode..
16:52:15PMunchBut the fact that it's essentially a weird HTTP/JSON hybrid for same-machine communication is already a red flag
16:52:16narimiranJnR: less comparing, more using ;)
16:52:31PMunchShould've used a binary format of some kind..
16:52:54dom96_wbleh, binary protocols suck
16:52:56PMunchInstead the editor has to encode something as JSON which the LSP server then needs to decode back into values
16:53:38dom96_wIt's not like you're sending hundreds of these messages a second, serialization won't have a big impact on the performance.
16:54:00PMunchI know, it's just the principal of it :P
16:54:16PMunchAnd you could potentially send a didChange with every keystroke
16:54:22JnRnarimiran I have to do all the research first! I'm always afraid I missed something crucial and waste time
16:54:34dom96_wJSON is far easier to debug too :P
16:55:16PMunchWell that's fair, but using a defined binary protocol they probably have a formatter of some kind
16:55:25narimiranJnR: ok, then continue on doing what you do, and report back to us when you find something crucial :P
16:55:32PMunchLike BSON for example (disclaimer, never actually used BSON)
16:56:43PMunchOh well, I'm off now
16:56:45*PMunch quit (Remote host closed the connection)
16:57:08JnRnarimiran What's crucial is that I've hit a dead end looking for Nim support. This chat is probably better than Google right about now...
16:57:35Araqbinary protocols ftw, no clusterfuck of escaping rules, and with length prefixes you can pre-allocate buffers
16:57:41FromGitter<kaushalmodi> JnR: this chat is great, and also Nim Forum
16:58:05narimiranJnR: youdontsay.gif :P
16:59:09narimiranJnR: now if you start writing some nim, you might hit some (crucial) wall, and we might help you with it. for now it is all just theoretical and not very helpful (to you)
17:07:43*ng0 joined #nim
17:11:06dom96_wAraq: try parsing raw WiFi packets and then get back to me :P
17:11:15dom96_wI'll take JSON any day
17:11:40Araqyou think they become easier with random "cannot parse json, missing "]}"" errors?
17:16:52livcdkaushalmodi: i am too stupid / too lazy to dig into lisp and if I do not find a working pkg I give up. I think I eventually might migrate to VS Code.
17:21:52FromGitter<kaushalmodi> livcd: sure, different strokes for different folks
17:22:04FromGitter<kaushalmodi> but what's the reference?
17:22:48FromGitter<kaushalmodi> is this the canonical way to mimic binary math (doing 4-bit addition below): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c475168dab15872ced62cbc]
17:23:15livcdkaushalmodi: just showerthoughts. I was surprised I did not find good enough powershell babel pkg.
17:23:29FromGitter<kaushalmodi> ah ok
17:23:53*Jesin joined #nim
17:23:58FromGitter<kaushalmodi> hmm, I use emacs on RHEL 6.8, so ob-shell works great
17:24:02FromGitter<kaushalmodi> never needed powershell
17:24:34livcdmostly popular ob-<popular> work fine :)
17:25:19FromGitter<kaushalmodi> it's not babel, but have you looked at powershell.el?
17:25:46livcdidk i think i tried to hook it in and failed
17:25:51FromGitter<kaushalmodi> the repo looks pretty active: https://github.com/jschaf/powershell.el
17:25:58FromGitter<kaushalmodi> open an issue there
17:26:02FromGitter<kaushalmodi> if you don't ask, you don't get
17:26:26FromGitter<kaushalmodi> *that turned out to be too philosophical*
17:26:56livcdstrange I think i have tried different powershell.el...
17:44:13*aguspiza joined #nim
17:46:51*zyklon_ joined #nim
17:47:10FromDiscord_<Mage> How do you lexographically sort a table?
17:49:52FromGitter<kaushalmodi> I cannot figure out how to pass a var by ref
17:50:22FromGitter<kaushalmodi> If I have a `cint`, `foo`, how do I pass it to a proc that expects `ref cint`?
17:50:52FromGitter<kaushalmodi> `addr foo` doesn't work, and `ref foo` doesn't because `ref` expects a type identifier after it
17:52:28JnRPMunch You have alot of great Nim stuff on your GitHub. I didn't realize how much you used Nim
17:55:46leorizekaushalmodi: you need to make a ref
17:56:02leorizebut why would there be a Nim proc that take ref cint?
17:56:13leorizeare you sure you're not mistaking it with `ptr cint`?
17:56:17FromGitter<kaushalmodi> the same .. SV/nim interface
17:56:40FromGitter<kaushalmodi> hmm, I could probably use ptr
17:56:55leorizeref implies the GC
17:57:13FromGitter<kaushalmodi> leorize: I was converting this bit: https://ptpb.pw/ENDC/c
17:57:18FromGitter<kaushalmodi> see the c_answer in there
17:57:23leorizethen it's `ptr`
17:57:29leorizeC don't have the GC :P
17:57:33FromGitter<kaushalmodi> ok
17:57:35leorizeactually you could use `var`
17:57:42leorizeIIRC c2nim generates them like that
17:57:47FromGitter<kaushalmodi> yes, var was work there
17:57:49FromGitter<kaushalmodi> but then ..
17:58:05FromGitter<kaushalmodi> there's this other bit: ` t_add(&vl_hw_answer, inp1, inp2);`
17:58:18FromGitter<kaushalmodi> that calls the `t_add` within C from SV
17:58:36FromGitter<kaushalmodi> there I can use `ptr` .. trying out
17:58:47leorize?
17:59:15FromGitter<kaushalmodi> that `t_add` function is not implemented in C but in systemverilog
17:59:27FromGitter<kaushalmodi> An API connects the two
18:00:23leorizeif I understand this correctly you're implementing this C file in Nim?
18:01:02FromGitter<kaushalmodi> I am doing both
18:01:21FromGitter<kaushalmodi> having Nim proc implementation run in SV and have an SV task/function run in Nim/C
18:02:03Zevvdom96_w: about the raw wifi packets: there's a certain field in WPA2 with the endianess the wrong way around. That is my fault, and I'm actually proud of it :)
18:02:14leorizewell, I don't really understand that...
18:02:16leorizebut here's a tip
18:02:42leorizeif you pass stack object to the function a lot, use `var`
18:02:51leorizeotherwise go for `ptr`
18:02:56leorizethat's for Nim->C
18:03:01FromGitter<kaushalmodi> understood
18:03:11FromGitter<kaushalmodi> TIL to use `ptr` for C stuff
18:03:33FromGitter<kaushalmodi> leorize: FYI this is the working code: https://ptpb.pw/17Wf/nim
18:03:52FromGitter<kaushalmodi> see how I depend on the `t_add` implementation from SV side
18:04:09leorizewell you can certainly use `var` in that `t_add`
18:04:19FromGitter<kaushalmodi> hmm, trying that now
18:04:21leorizeit's generally the same as `ptr` for C interop
18:04:33FromGitter<kaushalmodi> the `&` in C-code made me believe that they always need to be pointers
18:04:47*abm joined #nim
18:05:01leorize`var` is our fancy abstraction on that :P
18:05:36leorizein C they don't have anything similar to `var`, so they pass pointers around
18:05:59FromGitter<kaushalmodi> .. and of course `var` works
18:06:00FromGitter<kaushalmodi> thanks!
18:06:05FromGitter<kaushalmodi> and it looks a bit cleaner too
18:09:20FromGitter<kaushalmodi> leorize: what does `static int` in C signify?
18:09:28FromGitter<kaushalmodi> `static int` function return type
18:09:45FromGitter<kaushalmodi> In Nim implementation, I left out the static bit and it still worked
18:10:53FromGitter<kaushalmodi> e.g. from this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c475cac35350772cf71c3d8]
18:10:55Zevvit limits the visibility of the function to the file
18:10:56FromDiscord_<exelotl> static means that the function is private to the current file
18:11:05FromDiscord_<exelotl> ^
18:11:09FromGitter<kaushalmodi> thanks
18:11:22Zevvstatic keyword is a strange beast in C, it can mean a handful of different things depending on where it is used.
18:11:26FromGitter<kaushalmodi> but Nim procs are private by default
18:11:37FromGitter<kaushalmodi> so I don't need to do anything about that
18:11:45Zevvthe C comittee seems to jump through funny hoops to avoid adding new keywords
18:11:49FromGitter<kaushalmodi> right?
18:12:04leorizeyou don't really have to care about them with Nim
18:12:06Zevvnim scope and C scope are not really related
18:13:11leorizestatic is more of a way to hide the symbol iirc
18:13:42leorizeuseful when you're writing a C program, where symbol collisions just wait to happen
18:14:03FromGitter<kaushalmodi> understood, thanks guys
18:15:54*lritter quit (Ping timeout: 246 seconds)
18:35:10FromGitter<arnetheduck> woot, a bug of mine from 2015 is getting attention :) kudos @rayman22201! (and the rest of the team for not closing it!)
18:35:15FromGitter<arnetheduck> https://github.com/nim-lang/Nim/issues/3011
18:36:21FromGitter<mratsim> "BigBoneDaddy: Nope" ?
18:36:30rayman22201lol. Call me crazy, but I just like good error messages. :-P
18:36:58FromGitter<mratsim> "Go to Elm" ;)
18:37:19rayman22201lol. I also like practical languages.
18:38:18dom96_wZevv: your fault?! :O
18:39:00*dom96_w quit (Quit: Textual IRC Client: www.textualapp.com)
18:44:00ZevvI did a first reference implementation of the cient side, and at the plugfset things didnt work. so the engineer on the other side glances at the hexdump and sais "oh I see it, the endianess is wrong" and adjus his code
18:44:26Zevvso thats my heritage :)
18:44:59Zevvs/plugfset/plugfest/
18:48:23Zevvoh that was WPA, not WPA2
18:49:48*powerbit joined #nim
18:53:08*kapil____ quit (Quit: Connection closed for inactivity)
18:55:02shashlicki have a question for the community
18:55:18shashlicksay you have `typedef struct _STRUCT6 { char name; } STRUCT6;`
18:55:54shashlickyou need a type for `struct _STRUCT6` as well as STRUCT6 in Nim since C could refer to both types in the code
18:56:03shashlickwhat's the best way to disambiguate
18:56:56Araqyou translate 'struct _FOO' to Foo and FOO to Foo
18:56:59shashlickhold, make that `typedef struct _STRUCT6 { char name; } *STRUCT6;` <= note the * in the second STRUCT6
18:57:16AraqFooPtr
18:57:45shashlickin the previous example, you can have just one Foo and call it since they both get mapped correctly by Nim
18:58:01shashlickgood, i was thinking FooPtr
18:59:29shashlickchallenge though is that when someone refers to STRUCT6 further down in the code, they mean STRUCT6Ptr and not the other struct _STRUCT6
19:01:20shashlickhere's another one - `typedef struct { char name; } *STRUCT6;`
19:02:31shashlickhere you need `type STRUCT6 = ptr object`?
19:02:33Araqcan't you take over c2nim maintainance instead?
19:02:43Araqall these problems are solved.
19:03:28Araqit's just a parser with arbitrary token lookahead, it's not *that* hard
19:03:53shashlickc2nim doesn't like the *STRUCT6 - errors out
19:04:27Araqcases like these are in its test suite
19:04:38Araqand the syntax is STRUCT6* btw
19:04:50Araqthe pointer star follows the type
19:06:42Araqhttps://nim-lang.org/docs/c2nim.html#embedding-nim-code it was designed with the workflow in mind "ok, edit the C code, but at least you don't have to touch the produced Nim code"
19:07:02Araqthen you can diff&patch your modified header files whenever a new version comes out
19:07:46shashlickbut that's the difference with nimterop - you don't have to touch the C headers
19:07:47Araqand the wrappers are at least somewhat idiomatic Nim without a 'ptr ptr cchar' where it should be a cstringArray
19:08:09shashlickyou let gcc and tree-sitter handle all that complexity
19:08:13Araqit's impossible to not touch anything, C's type system is too broken for that
19:08:51Araqand stripping away the #defines is *wrong*, it doesn't "handle all that complexity", it throws away information.
19:10:17Araqand let me clear. Maybe your nimterop is already superior, if so, more power to you. But then why do you ask me about basic C struct handling.
19:10:30Araq;-)
19:10:36shashlickthat's where i diverge in the thinking process - we had the same conversation around nimgen
19:11:22shashlickas a user, i'm not interested in dealing with C, but I want leverage it
19:11:53shashlicki'm doing this so that others can just work with nim and not have to look at C
19:12:04Araqas a user I don't want generated Nim code with wrong types, I want high quality wrappers.
19:12:49shashlickwell that's my aspiration and i've just had two months on this
19:12:49*zyklon_ quit (Read error: Connection reset by peer)
19:12:59Araqthat means somebody actually read the results, removed the typedef int MA_INT; crap and maybe even added default values for parameters
19:13:46Araqshashlick, again, I should take a look at nimterop before we discuss this any further
19:13:51AraqI don't want to be unfair.
19:14:03shashlicki totally get your input Araq, don't get me wrong
19:15:20shashlicki would want to maintain c2nim as well, but I don't think I get it after building on it with nimgen
19:15:40AraqUrho 3D, Unreal Engine 4, wxWidgets were wrapped with c2nim. Was it automatic? No, it was semi-automatic. Would I pick a different tool today for it? No.
19:16:00AraqAm I terribly biased? Yes. ;-)
19:17:15Araqso ... give me something to read, source code or docs
19:17:33Araqso that we can finally start a more productive discussion afterwards
19:18:25Araqbtw SWIG uses c2nim's approach too, I'm not alone.
19:18:52shashlickhere's my logic - I believe gcc should deal with preprocessing and not me because there's no way I can compete with it
19:19:05shashlickno doubt it loses information if you checkin your results but that's not what I'm advocating
19:19:19shashlicksecond, I don't want to write a parser since there's again no way to keep up
19:19:48shashlicki'd have picked clang but have compromised with tree-sitter since it is a lighter dep - might never be good enough but oh well
19:20:04shashlickgcc itself could have given me a nice AST but i don't see any decent api
19:20:16shashlickthat part can be replaced anyway since an AST is an AST
19:20:21*nsf quit (Quit: WeeChat 2.3)
19:20:33shashlickonce I have this, I can translate that AST into Nim's and let renderer do the work
19:20:43*Perkol quit (Quit: Leaving)
19:21:03shashlickbut since I'm only interested in translating headers, it doesn't seem worth it
19:21:15shashlickmaybe that changes too but for now, it works fine
19:21:34Araqit works fine for you, c2nim worked fine for me.
19:21:42Araqthe problems start when somebody else use it :P
19:22:05FromGitter<mratsim> the issue with editing C headers is that every time upstream change you need to redo it.
19:23:05Araqmratsim: I just explained how this can be handled.
19:23:29Araqand the good headers rarely change btw, it's a public interface
19:24:01FromGitter<mratsim> the diff/patching is a pain, I'm doing that already when handling packaging for dumb OpenCV2, OpenCV3, OpenCV4, Cuda 9, Cuda 10 ...
19:24:03Araqinnovation happens under the hood, not as an eternal bikeshed over the "perfect API" (hmmm, reminds me of something...)
19:25:30Araqwell I don't know OpenCV2-4 nor Cuda
19:25:54Araqbut unless they don't ever use #define, how could nimterop work with it?
19:26:05shashlickso my goal is to allow cImport("header.h") and it just works - provide helpers to pull in the code over github/download/pkgconfig, etc.
19:26:10FromGitter<mratsim> they use define all over the place
19:26:45shashlicknimterop simply passes everything thru gcc and gets platform specific code
19:26:57shashlickit allows gcc to recurse thru all include files and processes that output
19:27:13FromGitter<mratsim> but mainly it's monkey patching their Cmake for distribution packaging. It's different from headers, but monkey-patching is soso
19:27:47shashlicknow, here's the thing, I can easily throw out the tree-sitter => nim engine and pull in c2nim for that piece
19:27:57shashlickrest of it can sit in place
19:28:05FromGitter<mratsim> I think tree-sitter is very impressive
19:28:18shashlickbut getting fixes in c2nim isn't easy, very few people understand the AST and renderer
19:28:31AraqI do and you're talking with me
19:28:32shashlickI don't and that's why I stay away from deep compiler fixes
19:28:48*aguspiza quit (Ping timeout: 245 seconds)
19:28:50Araqand I can move ast.nim and renderer.nim to c2nim to make it free of deps
19:29:05Araqprobably a good idea, I can always backport renderer.nim from time to time
19:29:09FromDiscord_<jos> hi i have a nim porlbem!!!!!
19:29:33FromDiscord_<jos> i used to do #include "nimcache/whatever.h" in my native C (which i linked with nim)
19:29:40FromDiscord_<jos> but now nimcache is gone, is there a better way?
19:29:43Araqand again, I'm not married to c2nim, if you have something better, I don't mind
19:29:53shashlickbut when we hit syntax limitations in c2nim, getting fixes is not easy
19:29:59*zyklon_ joined #nim
19:30:10Araqbut if you *start* with throwing away #define I don't believe it's something better, sorry
19:30:30FromDiscord_<exelotl> @jos you can use the --nimCache compiler option to get back the old behavior if you want
19:30:32Zevvjos: nimcache moved to ~/.local/cache on unix, you're free to provide you location with the --nimcache:PATH option
19:30:40shashlickagain I am letting gcc process it at compile time - why do you think that is throwing out anything?
19:30:43FromDiscord_<jos> that way seemed terrible anyway, so i'm happy to switch
19:31:01FromDiscord_<jos> is there a way to do it without using --nimCache because that seems dumb
19:31:06shashlickyou get a wrapper that is specific to the platform being built on
19:31:16FromDiscord_<jos> like can i have some directive in nim to generate declarations for c to its own file?
19:31:20FromDiscord_<jos> that'd be much nicer
19:31:23shashlickand the method works cross-platform
19:31:23Araq#define MYCONST 34
19:31:34Araq^ what does nimterop do with it?
19:31:41shashlickconst MYCONST = 34
19:31:49Araqok, how does it do it?
19:31:52shashlickusing -dD I get that info from gcc
19:32:09shashlicki also get #define function prototypes though don't do anything with it yet
19:32:16Araq#define MY_ACCESSOR(x) x._fieldName
19:32:25Araqwould be my next question
19:33:08shashlicki get that too - just a question of mapping it
19:33:22Araqinteresting, I wasn't aware of -dD
19:33:28shashlickall the complicated #ifdef stuff is lost but that isn't as useful
19:33:47shashlickso I guess I understand what you mean by throwing away things
19:34:05shashlickthat is still available to nimterop and stuff that I don't recognize, I just skip
19:34:19shashlicksince tree-sitter is the one parsing it, I don't get stuck with syntax
19:34:46shashlickno doubt there are tree-sitter issues too but they have been moving slowly
19:36:16shashlickgiven they are backed by github, I am hoping for improvements
19:36:41shashlickbut with Microsoft acquiring github and hence Atom, not sure with the vscode competition
19:38:15shashlickhttps://github.com/genotrance/nimterop/blob/master/nimterop/getters.nim#L167 <= is the proc to get output from gcc
19:38:35shashlickyou can run any h file with `toast -p header` and it will spit out the preprocessed headers
19:39:15shashlickuse `toast -pr header` to recurse thru include files as well - e.g. required for readline.h - you cannot process each h file separately and get the same results
19:39:45Zevv-r still pulls in half the world sometimes, though
19:40:09shashlickyep and we could improve it to filter out headers not of interest
19:41:33shashlickmaybe we maintain a list of standard C/C++ headers and skip those always
19:41:58FromGitter<kaushalmodi> Chiming in about nimterop vs c2nim. Nimterop now works flawlessly for me for wrapping svdpi.h. There was a bug but shashlick already fixed that. With c2nim I wasn't able to proceed much further (I have opened an issue for that).
19:43:07Araqcan you show me both the header file and the produced .nim code?
19:43:26FromGitter<kaushalmodi> Produced Nim code by nimterop?
19:43:31Araqyes
19:43:33FromGitter<kaushalmodi> Header file is in that issue
19:43:52FromGitter<kaushalmodi> OK, will send once I am at computer
19:44:22FromGitter<kaushalmodi> shashlick: I guess the Nim file is what I see on stdout on doing `cDebug()`?
19:44:38shashlicki can run that snippet thru toast and see what we get
19:47:53Araqbtw if it translates svBitVec32* d to ptr svBitVec32 it's wrong, or not, you never know. Now to be fair, that's exactly what c2nim does too and it's terrible
19:48:20Araqbut at least c2nim doesn't even try to make it 100% "automatic, no thinking involved"
19:48:21shashlick@kaushalmodi: need svdpi_compatibility.h as well though
19:49:02Araqint svGetCallerInfo(const char** fileName, int *lineNumber);
19:49:05Araqis
19:49:25Araqproc svGetCallerInfo(fileName: var cstring; lineNumber: var cint)
19:49:48Araqor ptr cstring, but not cstringArray, these things matter in a Nim wrapper...
19:50:00FromGitter<kaushalmodi> shashlick: yes, I will link the compatibility header too
19:51:46shashlickAraq: agreed and nimterop doesn't even understand ** yet so I'm yet to cross that boat
19:52:56shashlickbut you could define it the right way and once https://github.com/genotrance/nimterop/issues/52 is possible, nimterop won't overwrite something that is already defined
19:53:31shashlickso ya, no good answers, and like I was asking earlier, with Nim's _ restriction and duplicate names, it isn't trivial or obvious what to do
19:53:58FromGitter<kaushalmodi> Araq: ⏎ ⏎ 1) svdpi.h: https://ptpb.pw/9z4q/c ⏎ 2) svdpi_compatibilty.h: https://ptpb.pw/8La-/c ⏎ 3) nimterop output: https://ptpb.pw/-vx0/nim [https://gitter.im/nim-lang/Nim?at=5c4774d6c45b986d11a20cdd]
19:55:17shashlicksvGetCallerInfo() isn't even in there since nimterop didn't recognize it
19:55:53FromGitter<kaushalmodi> shashlick: so far I haven't run into it
19:56:09FromGitter<kaushalmodi> everyday I am gradually adding tests for each of the svdpi.h API funcs
19:56:19*Tyresc joined #nim
19:59:12AraqI get the same results with c2nim :-)
19:59:41Araqwell not really, c2nim respects --nep1
20:00:00FromGitter<kaushalmodi> Then I wonder why https://github.com/nim-lang/c2nim/issues/149 happened
20:00:13FromGitter<kaushalmodi> I probably missed out some arguments
20:02:21Araqyou need to look at the #defines and tweak them, as c2nim's manual tries to explain
20:02:32Araqthat's what I did, took 5 minutes
20:02:50Araqand I also used
20:02:52Araq#define DLLNAME "svdpi.dll"
20:02:52Araq#dynlib DLLNAME
20:02:52Araq#cdecl
20:03:13Araqso that the wrapper accesses the DLL directly, the header file is not required at all then
20:06:22AraqI mean, this header has "DEPRECATED PORTION OF FILE STARTS FROM HERE."
20:06:31Araq" DEPRECATED PORTION OF FILE ENDS HERE."
20:06:50Araqseems to be a good idea to touch the file and wrap only what's relevant, I dunno.
20:07:40Araqbut good job at nimterop, shashlick, no irony implied.
20:07:44Araq*on
20:07:57Araqlooks quite nice
20:09:44shashlickthanks 🙂
20:10:12shashlickas always, open to feedback, if there's a better way, I'm all for it, as long as it is within my ability to comprehend!
20:11:44*a_b_m joined #nim
20:12:32*zachcarter joined #nim
20:12:40*a__b__m joined #nim
20:15:22*abm quit (Ping timeout: 246 seconds)
20:16:18*a_b_m quit (Ping timeout: 245 seconds)
20:17:19*zachcarter quit (Ping timeout: 268 seconds)
20:22:14FromGitter<kaushalmodi> Araq: good catch on the "DEPRECATED PORTION OF FILE STARTS FROM HERE." portion .. I wonder why they didn't wrap that in some define
20:23:14*a__b__m quit (Quit: Leaving)
20:24:42*zachk joined #nim
20:25:19*miran joined #nim
20:27:51*narimiran quit (Ping timeout: 246 seconds)
20:31:25ZevvI get to do a short (+/-30m) Nim introduction presentation at one of my customers - I was wondering of anyone has some slides or other presentation material which I can abuse/reuse?
20:34:16FromGitter<kaushalmodi> Zevv: I had seen some online
20:34:19FromGitter<kaushalmodi> give me a min
20:34:19miranZevv: i know that @juancarlospaco from telegram channel did some presentations and has some slides
20:34:54FromGitter<kaushalmodi> miran: yup, those: https://github.com/juancarlospaco/nim-presentation-slides
20:37:25Zevvthat's a good start already, thanks!
20:38:20FromGitter<kaushalmodi> Zevv: https://fervent-euler-388819.netlify.com/#/0
20:38:51FromGitter<kaushalmodi> @juancarlospaco I just deployed your repo to Netlify, and copied the English version to index.html
20:39:10*aguspiza joined #nim
20:39:24FromGitter<kaushalmodi> though .. I am getting a bit dizzy after few slides :)
20:39:56Zevvmy fan is going WHEEEEEE from the transitions :)
20:43:38*zachcarter joined #nim
20:45:00*MightyJoe quit (Ping timeout: 250 seconds)
20:45:15*cyraxjoe joined #nim
20:48:02*zachcarter quit (Ping timeout: 250 seconds)
20:49:02*abm joined #nim
21:01:00*zyklon_ quit (Quit: WeeChat 1.9)
21:06:21*Trustable quit (Remote host closed the connection)
21:06:55federico3Zevv: https://github.com/FedericoCeratto/nim-slides if you want to contribute to a shared slide deck. No tooling needed
21:10:58JnRNow why would Nim have me go through this extensive guide to create an interpreter and never even suggest how I should organize my source code?
21:11:45Zevvfederico3: thanks, looks good! These go well with a parallel live code&show
21:12:28FromGitter<kaushalmodi> JnR: Look at nimble README
21:12:53FromGitter<kaushalmodi> do `nimble init foo` and follow the structure auto-created for you
21:13:03JnRFromGlitter Thanks. Maybe there's hope after all
21:13:11FromGitter<kaushalmodi> https://github.com/nim-lang/nimble#project-structure
21:14:02FromGitter<kaushalmodi> JnR: umm The "FromGitter" you see would be for every message coming from Gitter
21:14:12FromGitter<kaushalmodi> not just me :)
21:15:16JnRkaushalmodi Lol let me fix one problem at a time
21:15:34*krux02 quit (Remote host closed the connection)
21:17:26JnRWait so this chat room is just connected to multiple external Apps to allow it to exist everywhere?
21:17:54shashlickDiscord <=> IRC <=> Gitter
21:17:54JnRTelegram, Glitter
21:18:03shashlickTelegram isn't linked yet
21:18:40JnRThis is one seriously progressive IRC channel
21:40:39JnRWill nimble just load up C files like Nim files?
21:41:02*oculux quit (Quit: blah)
21:41:58*oculux joined #nim
21:49:49*miran quit (Ping timeout: 268 seconds)
22:02:51*zachcarter joined #nim
22:04:44*aguspiza quit (Ping timeout: 250 seconds)
22:07:15*zachcarter quit (Ping timeout: 246 seconds)
22:07:50*Vladar quit (Remote host closed the connection)
22:15:55*stefanos82 quit (Remote host closed the connection)
22:35:53*skellock quit (Ping timeout: 245 seconds)
22:36:51*zachk quit (Changing host)
22:36:51*zachk joined #nim
22:38:39rayman22201The one problem with this channel. Most nimmers are European, so they start to go to sleep :-P
22:39:46rayman22201I don't really understand your question @JnR. What do you mean "load up"?
22:40:58*smitop joined #nim
22:48:32smitopI'm getting ``Address already in use [OSError]`` errors everytime I run my server, except for the first time I boot up my development VM
22:48:35smitopWhy
22:49:29rayman22201Your server is trying to bind to the same port and the port didn't get properly released.
22:50:57smitopI've tried killing every process with `nim` in the name
22:51:08rayman22201killing a process does not release the port
22:51:13smitopHow do I release a port
22:51:42smitop`socket.close()`?
22:51:48rayman22201in fact, the opposite lol. The OS will do it eventually, but you should do it properly in the exit code of your app
22:52:02rayman22201let me double check. I think so
22:52:54rayman22201yup. socket.close should do it
22:55:26FromGitter<Varriount> JnR: what do you mean?
22:58:00rayman22201@smitop, one more thing you might want to do: `socket.setSockOpt(OptReusePort, true)`
22:58:11rayman22201because this: https://stackoverflow.com/questions/5106674/error-address-already-in-use-while-binding-socket-with-address-but-the-port-num
23:04:02*vegax87 quit (Changing host)
23:04:03*vegax87 joined #nim
23:04:03*vegax87 quit (Changing host)
23:04:03*vegax87 joined #nim
23:13:38*skellock joined #nim
23:14:34FromGitter<dandevelo> Does anyone know why --noMain is not working like mentioned here: https://forum.nim-lang.org/t/4434 ?
23:16:46JnRVarriount I'm reffering to the DMI Parser tutorial on the Nim website. At the end of the tutorial I have both Nim and C code that has to be run to format this Interpreter
23:17:50JnRVarriount The tutorial actually gave me the C code to run so I know it's not a mistake
23:23:38JnRIt's no big deal I just haven't ever had a reason to build any of my Python projects so this is a different format. I'm gonna hold off on jumping into compiling an entire project
23:27:04*skellock quit (Ping timeout: 250 seconds)
23:33:25JnRI found this solution on the Nim site https://nim-lang.org/docs/c2nim.html
23:45:54FromGitter<dandevelo> Has anyone here used Nim to create a static library?
23:52:38federico3dandevelo: you mean you compile againts the C code generated by Nim?
23:53:55FromGitter<dandevelo> @federico3: yes, compile the C code generated by Nim in a static library and use that static library in another Nim or C application
23:54:41*ng0 quit (Quit: Alexa, when is the end of world?)
23:57:39*zachcarter joined #nim
23:57:41*leorize quit (Quit: WeeChat 2.3)
23:59:07*Jjp137 quit (Ping timeout: 240 seconds)