<< 09-10-2019 >>

00:16:08shashlickOpen to suggestions, any for src and binary then?
00:23:17*lritter quit (Remote host closed the connection)
00:28:26*krux02_ quit (Remote host closed the connection)
00:40:15FromGitter<Obround> How come consts can be re-defined in a try-except statement without an except to handle it? The following code executes perfectly: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d9d2c6fe8de6f3ca063c0eb]
00:40:38*laaron joined #nim
00:42:09*laaron quit (Remote host closed the connection)
00:42:34*laaron joined #nim
00:43:42shashlickIt's a different block / scope so probably allowed
00:43:46*lritter joined #nim
00:44:20FromGitter<Obround> Huh.
00:45:30FromGitter<Obround> That doesn't seem right.
00:45:56FromGitter<Obround> Doesn't try-catch kinda add on to the toplevel statements?
00:48:37*Kaivo quit (Ping timeout: 250 seconds)
00:56:15*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
00:56:57*laaron joined #nim
00:58:25*sealmove quit (Quit: WeeChat 2.6)
01:11:00*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
01:16:16*laaron joined #nim
01:22:54*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
01:23:28*laaron joined #nim
01:24:38*laaron quit (Client Quit)
01:25:16*laaron joined #nim
01:29:14*aEverr quit (Ping timeout: 240 seconds)
01:29:35*aEverr joined #nim
01:30:12*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
01:31:27*laaron joined #nim
01:41:44*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
01:42:21*laaron joined #nim
01:43:58*me7 joined #nim
01:45:17*laaron quit (Client Quit)
02:05:03*doesntgolf joined #nim
02:10:59*theelous3_ joined #nim
02:12:02*Romanson joined #nim
02:24:10FromGitter<gogolxdong> Hi, @shashlick, how is nimterop going ?
02:33:24*theelous3 quit (Read error: Connection reset by peer)
02:37:31*NimBot joined #nim
02:53:01*dddddd quit (Remote host closed the connection)
03:00:30*lritter quit (Ping timeout: 265 seconds)
03:01:04*lritter joined #nim
03:11:16*Jjp137 quit (Read error: Connection reset by peer)
03:12:08*Jjp137 joined #nim
03:43:11*chemist69 quit (Ping timeout: 246 seconds)
03:45:20*chemist69 joined #nim
03:49:44*rockcavera quit (Remote host closed the connection)
03:55:36*traviss quit (Quit: Leaving)
04:02:19*doesntgolf quit (Read error: Connection reset by peer)
04:14:31*nsf joined #nim
04:25:20*narimiran joined #nim
04:27:43shashlickBeen busy with getHeader - new feature to get c libraries built automatically
04:28:01shashlickSee nimgit2 for an example
04:29:28yumaikaso/
04:30:24*Cthalupa quit (Ping timeout: 265 seconds)
04:35:45*Cthalupa joined #nim
04:46:06FromGitter<gogolxdong> yes, you always did what I need, thanks, checking.
05:20:51*NimBot joined #nim
05:22:33*aEverr joined #nim
05:26:57*aEverr quit (Ping timeout: 265 seconds)
05:30:54*virus_ joined #nim
05:48:31FromDiscord<Rika> I'm honestly baffled as to why Nim isn't that popular
05:48:32*absolutejam4 joined #nim
05:56:44Zevvput a $3B company behind it and it'll fly
05:57:59FromDiscord<Rika> Having a big tech company behind nim would make me feel uh
05:58:03FromDiscord<Rika> Idk
05:59:13Zevvso that's the whole point actually. There is no $agenda$ here, so things move differently
06:00:48*virus_ quit (Read error: Connection reset by peer)
06:01:21*skoude joined #nim
06:08:31*solitudesf joined #nim
06:17:28*couven92 joined #nim
06:19:51*absolutejam4 quit (Ping timeout: 264 seconds)
06:21:37me7hi all i'm participate in hacktoberfest and submit pr https://github.com/nim-lang/Nim/pull/12374 2 days ago
06:21:45me7could someone help review?
06:23:08*PMunch joined #nim
06:26:07FromDiscord<juan_carlos> Looks good to me. The more details the better. :)
06:30:18*theelous3_ quit (Ping timeout: 245 seconds)
06:35:12*yumaikas will also probably be doing doc PRs for a few Nim repos
06:35:27yumaikasI don't have them ready at all atm, however
06:37:21*navinmistry joined #nim
06:41:37*me770 joined #nim
06:44:23*me770 quit (Remote host closed the connection)
06:52:00FromDiscord<juan_carlos> Inside `macro` how to get `Table[string, string]` contents?, it wont have `.sons` nor `.strVal` nor `.intVal` nor do `$` ?.
06:54:47PMunchjuan_carlos, you want to read from a static (compile-time) Table?
06:56:54FromDiscord<juan_carlos> I need to pass something that would allow `"foo": "bar"` to `macro`, `Tuple` wont allow whitepaces on keys, `JsonNode` wont do CompileTime.
06:57:45FromDiscord<juan_carlos> Yes, I was thinking of using a `Table`.
06:59:02Zevvjuan_carlos: can you create a fictional snippet of code to show what you're trying to do? Show what you want to go in and what you'd want to come out?
06:59:06livcdRika: we are waiting for gogolxdong to get us that sweet chinese investment money
07:00:00*gmpreussner quit (Quit: kthxbye)
07:02:58*tdc quit (Ping timeout: 268 seconds)
07:04:57*gmpreussner joined #nim
07:06:04*krux02 joined #nim
07:07:53FromGitter<mratsim> @Rika Status is a big company :D (at least it's bigger than most blockchain company)
07:09:24FromDiscord<juan_carlos> Here: https://play.nim-lang.org/#ix=1Y6n
07:09:43FromDiscord<juan_carlos> I can use `seq[tuple[string]]` but makes passing arguments really weird.
07:10:36*navinmistry quit (Remote host closed the connection)
07:11:10*navinmistry joined #nim
07:12:22*navinmistry quit (Remote host closed the connection)
07:12:30*navinmistry joined #nim
07:13:39ZevvYour data does not exist as a table inside the macro
07:13:43Zevvyou are talking compile time here
07:13:55Zevvit will be passed as a tree of NimNodes, which you could iterate though
07:14:33FromDiscord<juan_carlos> Ok, but it does not have `.sons`, where they at?.
07:15:15FromDiscord<juan_carlos> The table need to be on a `const`?.
07:15:22Zevvhttp://ix.io/1Y6r
07:15:28Zevvthis works, but do realize it works *at compile time*
07:16:07Zevvadd 'echo t.astGenRepr()' to the top of your macro, you can see what is happening there
07:16:17FromDiscord<juan_carlos> Oh, thank you very much!. 🀯
07:16:50yumaikaslol, `macro micro` is cute
07:17:08FromDiscord<juan_carlos> Tiny macro :P
07:23:14*yumaikas is about to try a REAL(TM) nim webserver
07:23:15*absolutejam4 joined #nim
07:23:24yumaikasOr well, a webapp written in Jester
07:30:33*floppydh joined #nim
07:31:43PMunchZevv, yay someone is using astGenRepr :)
07:32:03PMunchyumaikas, it's a pretty good experience IMO
07:32:07*Vladar joined #nim
07:32:29FromGitter<mratsim> What does it do compared to toStrLit, repr, dumpAstGen and expandMacros?
07:35:20PMunchmratsim, it gives you the code that you need to put in a macro to create that tree
07:35:50yumaikasPMunch: Yeah, I actually think it kinda is. You do need to get used to some things being different, and the docs are *way* too spares at the moment
07:35:55yumaikas*sparse
07:36:23yumaikasLike, I had to read the source for nimForum to get a handle on how I think I'm supposed to read form data
07:36:52PMunchmratsim: https://play.nim-lang.org/#ix=1Y6v (be sure to switch to debug output to see the results)
07:37:20PMunchYeah.. Documentation for Jester isn't great unfortunately
07:37:40PMunchMaybe that should be my next undertaking after the multitasking article series I'm doing
07:38:05yumaikasI'm planning on beefing it up some myself
07:38:18yumaikasI've got notes on things that aren't clear
07:41:33yumaikasPMunch: Do you have anything you'd want documented off the top of your head?
07:41:52PMunchNothing I can think of right away no
07:42:06PMunchBut I have done my fair share of digging through its source code to figure out how it works
07:42:25yumaikasI know a couple of things I had to look up outside of the source code, specifically how to dig into response.formData
07:42:44yumaikasrequest.formData, that is
07:43:42yumaikasI also rather like working with htmlgen
07:44:13yumaikasWell, except when it doesn't let me attach custom attributes like `data-id` to elements
07:46:05*navinmistry quit (Remote host closed the connection)
07:46:26yumaikasPMunch: can you cascade routes into each other? Like get "/admin":; get "/admin/":
07:47:42FromGitter<mratsim> @Pmunch I was talking about astGenRepr not dumpAstGen
07:49:05FromDiscord<juan_carlos> The best is dumpLisp, then you can pretend you know Lisp (???) πŸ€ͺ
07:49:40PMunchyumaikas, yeah that should be possible
07:49:55PMunchmratsim, dumpAstGen is basically just "echo astGenRepr()"
07:50:17PMunchIt's the same as dumpLisp and dumpTree which run lispRepr, and treeRepr
07:52:04PMunchHmm, htmlparser wraps my entire HTML in a `<document>` tag that isn't there, and removes the `<!DOCTYPE html>` tag..
07:53:26yumaikasIs htmlparser what you'd use for web-scraping?
07:53:39*navinmistry joined #nim
07:55:43PMunchNot sure really, I was just trying to replace all images with it's base64 encoded equivalent
07:55:52PMunchEffectively embedding them into the output
07:57:32yumaikasOk
07:57:57*yumaikas is running into issues with formData["key"].body exploding or 404-ing when in a cond block
07:59:36*navinmistry quit ()
08:02:17FromGitter<alehander42> guys
08:02:39FromGitter<alehander42> so how stable is nimlsp now?
08:03:16PMunchWell, I use it daily
08:03:43PMunchBut it's still got a couple of issues that I should sort out
08:05:35yumaikasPMunch: Is there any reason that formData would be empty?
08:05:54leorizeno one submitted any data?
08:07:06yumaikasI'm seeing formData in the request according the browser, but jester's request isn't seeing it? Is there something I might be missing, like using URL params instead?
08:07:46leorizeare you doing a POST request?
08:07:56PMunchHmm, I remember working with those a while back, and that they did some weird stuff
08:08:07yumaikasleorize: Yes, I am
08:08:18FromDiscord<juan_carlos> Is Broken: https://github.com/dom96/jester/issues/213#issue-502594002
08:12:04yumaikasThat broken?
08:14:10yumaikas(as in, broken to that exent?)
08:15:23leorizehttps://github.com/dom96/jester/blob/master/jester/request.nim#L105
08:15:44FromDiscord<juan_carlos> I dunno, try yourself the example there, post results and findings on the bug.
08:15:45leorizelooks like jester only process multipart/form-data
08:16:11yumaikasWell, that should be fixed long-term, but I can fix that easily enough for myself right now
08:18:00FromGitter<alehander42> we shoukld add it https://langserver.org/
08:18:11yumaikasleorize: Thanks for taking a look
08:18:21PMunchalehander42, true
08:18:36FromGitter<alehander42> they have wip section as well
08:19:06FromGitter<alehander42> i'll try to make a mini langserver component with the editor i work on
08:20:01leorizejuan_carlos: it works for me
08:20:12yumaikasChanging the enctype of the form did the trick, I think
08:20:40leorizeso formData is for multipart forms
08:20:48leorizethe `@` is for the form-urlencoded
08:20:49PMunchHow can I get the request-uri in Jester?
08:21:41FromDiscord<juan_carlos> Linux leorize ?.
08:21:53leorizeyea
08:22:30leorizePMunch: you mean stuff like /dologin?
08:23:17Zevvrequest.pathinfo?
08:23:29Zevvrequest.path?
08:23:29leorizerequest.path is better imo
08:23:39leorizei never understand the entire app name in jester
08:24:14yumaikasI suspect the app name is there to make it easier to prefix applications?
08:26:32PMunchHmm, so the thing is that I have multiple domains pointing to the same server. And I want to distinguish them in Jester
08:27:11leorizePMunch: request.host
08:27:38yumaikasPMunch: why not distinguish them in nginx/apache?
08:28:09*Romanson quit (Quit: Connection closed for inactivity)
08:29:14Zevvwho says he is running nginx or apache?
08:29:14PMunchBecause this is a server running locally, without nginx/apache
08:30:15leorizeremember to use -d:useStdlib because I trust asynchttp more than httpbeast :P
08:30:16yumaikasZevv: Or some other proxying server
08:31:02yumaikasI suppose I don't know what all is being done here
08:31:31yumaikasleorize: Why do you trust asynchttp more than httpbeast?
08:31:46yumaikas(Not saying one shouldn't but am curious as to the evidence for going that way)
08:32:29leorizedom isn't really active nowadays
08:32:54leorizeso I don't think httpbeast, a side project of his can get as much attention as stdlib's asynchttpserver
08:33:32Zevvhttpbeast was created as a proof of concept for raw nim power - it might not be as robust te malicious input as the async http
08:33:43yumaikasIf dom isn't active, has anyone taken over ownership of jester then?
08:34:04yumaikasIIRC, Nim has financial backing from a company, do they use jester in their codebase?
08:34:06leorizehe is still active enough to merge prs, but that's about it I think
08:34:26leorizenah, they wrote most of their stuff
08:34:29FromGitter<alehander42> i think jester is absolutely the web framework for nim currently
08:34:30Zevvbtw what happened to zacharycarter, he just dissapeared into thin air a week ago?
08:34:36FromGitter<alehander42> the other ones aren't maintaiend
08:34:44FromGitter<alehander42> i tried to write one more rails/phoenix-like
08:34:50FromGitter<alehander42> but i just dont have much time for it
08:34:55FromGitter<alehander42> so its still WIP
08:35:09FromGitter<alehander42> i think there is one by andrea https://github.com/andreaferretti/rosencrantz
08:35:22yumaikasI mean, *like* the ideas behind how Jester is set up, but it needs TLC
08:35:26FromGitter<alehander42> as well, it seems he uses it, as ive seen issues by him
08:35:40FromGitter<alehander42> TLC?
08:36:27yumaikasTender Loving Care
08:36:55FromGitter<alehander42> this is mine https://github.com/alehander42/http but i still need to impl better orm support combined with validation DSL + i wanted some rest/graphql dsl-s as well
08:37:05FromGitter<alehander42> so its in the middle of nowhere realistically
08:37:20FromGitter<alehander42> yeah, i guess someone can jump and do it if he uses jester
08:37:22yumaikasBasically, it needs the edges filled out a bit better, IMO, and some more documentation love
08:37:32FromGitter<alehander42> it really is close
08:37:41FromGitter<alehander42> yeah, documentation/examples applies to karax as well
08:37:50yumaikasWho made karax?
08:37:56leorizeAraq
08:37:57FromGitter<alehander42> Araq
08:38:03Zevvkaraqs
08:38:16yumaikasSo that should theorectically be kept up a wee bit better
08:38:20FromGitter<alehander42> we can take some inspiration by crystal here, their frameworks all have docs/websites and stuff: it doesnt really matter so much, but it helps
08:38:38FromGitter<alehander42> karax should be fine i think
08:38:43FromGitter<alehander42> i use it in my codebase a lot
08:38:52PMunchHmm, interesting error: http://ix.io/1Y6K
08:39:04FromGitter<alehander42> i use something like a fork of older version and it works fine
08:39:11yumaikasalehander: Ok, how many hours per month do you think you can give to helping get the docs and such up to date?
08:39:13FromGitter<alehander42> but iirc now it has a lot of new changes and fixes
08:39:14*absolutejam4 quit (Ping timeout: 240 seconds)
08:39:21FromGitter<alehander42> about karax?
08:39:49FromGitter<alehander42> well, i can give several hours totally, but i cant really commit to hours per month
08:40:04PMunchI mean when you know what's going on (that path takes a jester.Request, and getNativeReq returns a asynchttpserver.Request) it's pretty obvious, but that error should be improved..
08:40:07yumaikasKarax, jester, w/e you think your effor would go best
08:40:09FromGitter<alehander42> i need to fix my own projects :( :D
08:40:20yumaikaslol
08:40:32ZevvI need to fix my life first...
08:40:33livcdalehander42: crystal has like 1 to 2 "frameworks" that everyone uses afaik
08:40:44FromGitter<alehander42> well ok, we dont have more
08:41:28*asymptotically joined #nim
08:41:29livcdalehander42: you started yours,andrea has his, 2vg had mofuw etc
08:41:41FromGitter<alehander42> but they have at least simple presense https://amberframework.org/ https://luckyframework.org/
08:42:16*absolutejam4 joined #nim
08:42:26FromGitter<alehander42> yeah, but id say only jester and andrea's are ready to use
08:42:29livcdalehander42: they seem to be used by their authors in "production"
08:42:37FromGitter<alehander42> iirc mofuw is very experimental
08:43:11*yumaikas has plans on trying to help improve Jester, maybe to the tune of 4 hours a month or so
08:43:24yumaikasWe'll see how life goes
08:43:27FromGitter<alehander42> but what i mean is not how many do we have, but that we just need to "pretty-"fy them a bit: make a nice landing page
08:43:42FromGitter<alehander42> add a irc/gitter channel for them, release new versions
08:43:54FromGitter<alehander42> show that its maintained
08:44:02FromGitter<alehander42> and having some kind of community
08:44:27Araqit comes down to manpower though
08:44:31yumaikasUpdate the github readme to indicate that Jester is 1.0 ready
08:44:42yumaikasWe obviously have some manpower here
08:44:50AraqI can write Karax, I can't maintain it well
08:44:59FromGitter<alehander42> absolutely, thats why if someone decides to become a maintainer of e.g. jester, this would be welcome
08:44:59yumaikasFair point
08:45:33yumaikasAraq: Other than yourself, do you have many mantainers for different parts of Nim?
08:45:50*shomodj joined #nim
08:46:31livcdalehander42:alehander42: you need to have a project that depends on it and that basically shows others that they can somehow rely on it as well. Like with Status's libraries
08:46:59Araqyumaikas, yeah but the responsibilities are not well-defined
08:47:25yumaikasFair enough.
08:48:36FromGitter<alehander42> not necessarily
08:48:49FromGitter<alehander42> i mean, its good to have at least 1-2 examples
08:49:11yumaikasAs far as projects that rely on Jester go, we have at least nimforum
08:49:38FromGitter<alehander42> but i know i am trying a new 1.0 language, with young ecosystem, if i just see a good framework with 1-2 examples and docs that i can easily link the homepage for to a colleague
08:49:42FromGitter<alehander42> i think that would still be fine
08:50:02FromGitter<alehander42> yeah, nim-lang org as well i guess
08:50:34FromGitter<alehander42> andrea also uses it probably for
08:50:39AraqI'm thinking about rewriting karax
08:50:40FromGitter<alehander42> something existing, no idea
08:51:03Araqwell I already did, should create a Nimble package for it
08:51:04yumaikasalehander42: That's why I want to update jester
08:51:12FromGitter<alehander42> ive heard the idea for something like a nim version of svelte
08:51:16PMunchThe playground uses both Jester and Karax
08:51:17yumaikasAraq: What's new in karax?
08:51:22ZevvAraq: why does karax deserve a rewrite?
08:51:52Araqwell Karax will stay, but it's time to give "Knete" another try
08:52:07yumaikasKnete?
08:52:20Araqwhich is the Karax DSL without DOM diffing, just the stateful DOM that you update
08:52:26PMunchAnd I'm writing a web-server right now that will possibly go into production and run in many places
08:52:51Araqlike jQuery I guess
08:52:56yumaikasHuh, ok
08:53:04*navinmistry joined #nim
08:53:21FromGitter<alehander42> maybe because of the "do reactivity on compile time" idea https://svelte.dev/blog/svelte-3-rethinking-reactivity
08:53:22livcdI dont think we can pronounce "Knete"
08:53:29livcdDo you pronounce it like "neat" ?
08:53:32FromGitter<alehander42> which would be much easier to do in lang like nim maybe
08:53:45Araqyumaikas, but I'm biased, I only get to see the problems/bugs
08:53:50narimiranlivcd: i guess it is like "nette"
08:53:56yumaikasAnd I'm writing a web server I plan on using a fair bit myself, and opening up and encouraging others to use
08:53:58Araqit's K-nete
08:54:09livcdach soo
08:54:14livcdgerman pronounciation
08:54:22yumaikasAraq: problems/bugs with Karax, or just in general?
08:54:57Araqwith Karax, it starts with the fact that many people do not understand the virtual DOM idea, at all
08:55:22Araqthey are like "oh and on this button click, mark these elements red"
08:55:25yumaikasAlso, I don't think I've said this yet, but I quite like what y'all have done with Nim. Obviously it's still needing work, but as a langauge, it's been very pleasant to work with.
08:56:05Araqno, no, no, you don't "mark elements red", you have some state that you change and the color depends on the state and everything gets redrawn
08:56:07PMunchHmm, editing a file that is staticRead does not cause a rebuild..
08:56:27leorizenim c -r?
08:56:32leorizethen it's an optimization :P
08:56:40yumaikasAraq: I understand that notion
08:56:46yumaikasnim c -r watches for changes?
08:56:54leorizeno
08:56:59Araqit does.
08:57:04Araqsince 1.0.0
08:57:04yumaikasBut then, I've dived into frontend dev enough to know about virtual dom
08:57:35Araqyumaikas, sure.
08:57:58yumaikasGranted, that's not necessarily a
08:57:59livcddoes jester work on windows ?
08:58:05leorizeyes
08:58:18yumaikas*common notion in people that aren't frontend devs
08:58:42yumaikasIIRC, it has when() statements that switch between httpbeast and asynchttp
08:58:45PMunchYeah this is with "nim c -r"
08:59:03AraqPMunch, 'nim c -rf' then
08:59:13PMunchAah, force build, nice
08:59:52PMunchHmm, is there anything in the stdlib that will allow me to search for tags by id or class in the output of htmlparser?
09:00:04FromGitter<alehander42> i dont really agree this is such a big deal
09:00:08AraqfindAll or similar
09:00:26FromGitter<alehander42> as many frontend people already worked with react and others which should also do the "change state to change ui"
09:00:32Araqalehander42: I probably did fix too many DOM diffing bugs, it's tiring
09:00:35FromGitter<alehander42> but maybe there is just a better way to do reactivity
09:00:53FromGitter<alehander42> yeah, they are annoying
09:01:24Araqthe DOM is inherently full of state
09:01:42Araqand DOM diffing is alien
09:02:26zedeusPMunch: no, but there's q and nimquery via nimble
09:02:37livcdWould Knete be a successor or an alternative ?
09:02:44Araqalternative
09:03:14Araqbut I'm busy with Nim already :P
09:03:44yumaikasAraq: So you are, lol. TBH, I'm surprised you wrote Karax
09:04:01Araqwas paid for it :P
09:04:30*yumaikas also wonders why getCurrentException() is a call, rather than being part of the except: syntax
09:04:39Araqa different problem is that DOM diffing is like garbage collection, you pretend to be unable to tell the system what just happened
09:04:40yumaikasAraq: That's always nice
09:04:55leorizeyumaikas: it's also a part of the syntax :P `except as`
09:05:24Araqbut it's silly, yeah, guess what, it was a "sort" operation, what's wrong with telling the diffing mechanism about it?
09:05:38FromGitter<alehander42> Araq, so do you have an opinion on svelte
09:05:51*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
09:05:56Araqmuch like "what's wrong with telling the system that it can free the memory now"
09:06:02yumaikashttps://nim-lang.org/docs/tut2.html#exceptions-try-statement Looks like that doesn't document except as?
09:06:15livcdThe thing is with this part of the ecosystem you are not sure whether it is safe to use it for anything else than a side project. Especially when you dont have the skills to fix things yourself
09:06:22*pbb joined #nim
09:06:27*tdc joined #nim
09:06:57*yumaikas writes down that link as a thing to PR documents for later
09:06:58leorizeyumaikas: it was added later, but the tut wasn't updated: https://nim-lang.org/docs/manual.html#exception-handling-except-clauses
09:07:58FromGitter<alehander42> something like https://svelte.dev/tutorial/reactive-declarations
09:08:14FromGitter<alehander42> iirc there was something similar in karax as well
09:08:14*pbb quit (Client Quit)
09:08:25yumaikasAraq: Sorting lead to lots of heartburn in Karax?
09:08:42leorizePMunch: looks like wxNim doesn't export `delete`?
09:09:07*pbb joined #nim
09:09:13Araqyumaikas, no, it's an example for why these systems are kinda stupid
09:10:17FromGitter<alehander42> but its not the same, as here stuff is more inlined and doesnt need diff
09:12:11yumaikasAraq: Ah, ok.
09:13:10PMunchleorize, delete?
09:13:22leorizeC++ delete
09:13:33AraqI care for predictable results, DOM diffing is complex and unpredictable, I'm willing to trade 30 easy-to-fix bugs that is caused by the duplicated state for 1 complex-to-fix DOM diffing bug
09:13:41PMunchleorize, do you need that?
09:13:48PMunchWhat are you trying to do?
09:13:51*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:15:37Araqbut don't listen to me, I'm biased and in theory you only need to solve the DOM diffing once in a central component and then all the users benefit from a better abstraction.
09:16:02Araqjust like with garbage collection.
09:16:47yumaikasFair enough, though it is worth stating that solving those things can be hard
09:17:38*skoude quit (Ping timeout: 240 seconds)
09:18:20Araqyumaikas, I don't know, have too little experience with the old ways of doing direct DOM updates
09:19:13yumaikasOh, I was referring to how GC and Dom diffing are both nontrivial problems
09:19:20Araqmy guess would be though that the real problems came from JS's dynamic nature
09:20:31yumaikasEh, that, and the fact that the DOM api is a huge, complicated thing
09:20:54yumaikaswith lots of edge cases for different browsers
09:21:30Araqbut that's not addressed by DOM diffing at all
09:21:50leorizePMunch: nvm, looks like Destroy() is used to free wxWidgets pointers
09:21:51*absolutejam4 quit (Ping timeout: 265 seconds)
09:21:52Araqyou need to use some wrapper to patch over it
09:22:22yumaikasAraq: No, it's not addressed by DOM diffing
09:23:07yumaikasDOM Diffing is, as a I undestand it, a few steps of evolution beyond WPF-style MVVM data-binding
09:23:15PMunchleorize, yeah that's why I was confused :P
09:23:17*Cthalupa quit (Ping timeout: 240 seconds)
09:23:21yumaikasIDK if you ever did that sort of thing.
09:23:44AraqDOM diffing creates the illusion of an "Immediate mode" UI
09:24:09*asymptotically quit (Quit: Leaving)
09:24:23yumaikasIs there a way to set a global error handler for jester without try/excepting every route?
09:24:58yumaikasAraq: So what is your favorite part about Nim? Whet keeps you working on it?
09:25:04Araqthere is system.globalRaiseHook
09:25:36leorizeyumaikas: `error Exception` <-- that's the route you need
09:26:05yumaikasleorize: ty
09:26:09*absolutejam4 joined #nim
09:26:39leorizeyumaikas: jester's changelog documents a lot of features
09:27:31Araqleorize, yay... XD
09:27:32PMunchWhy does async require things to be GCsafe?
09:27:42ZevvPMunch: don't go there :)
09:27:46PMunchOr "require", it's just a warning :P
09:27:55PMunchZevv, haha, why?
09:28:12yumaikasleorize: Good to know. I might have to scan that when I'm looking over Jester's docs to update the README
09:28:14Zevvhttps://github.com/dom96/nim-in-action-code/issues/6
09:29:08ZevvI do understand the "one day this might be running on threads and you can't tell" argument, but I really still do not see why this is the case when stuff is *really* async.
09:29:55ZevvI *feel* there is some history involved - I see a lot of commits in the past where .gcsafe. was added to "make tests green" and reasons like that. But I once spent an hour or so removing these pragmas up to the point where stuff just works and the compiler no longer complains - everything is valid.
09:30:28ZevvSo maybe, just maybe, things have changed and improved in some areas, and these fences that were once put up are no longer needed. Or maybe, just maybe, somehing essential still eludes me.
09:30:38yumaikasOne reason wy you'd want it to be gc-safe is that when you're running async code, like event handlers, and global state changes in a different handler, it can invalidate something you had head before an async wait
09:30:47*tdc quit (Ping timeout: 250 seconds)
09:30:52*yumaikas has run tino this with TCL async code
09:30:58yumaikas*into
09:31:58PMunchHmm
09:32:12federico3https://github.com/plasma-umass/Mesh
09:32:16yumaikasZevv: Does that make any sense?
09:33:26*Cthalupa joined #nim
09:34:36*yumaikas is *close* to replicating the basic functionality of the Erlang wiki, after too many late-night hours
09:38:40*ng0 joined #nim
09:43:38*Cthalupa quit (Ping timeout: 240 seconds)
09:45:45Araqyumaikas, I keep working on Nim because the initial basic design still holds up well after a decade and things can be improved incrementally
09:46:32yumaikasAraq: That is an impressive achievement (that initial basic design holding up)
09:49:26*navinmistry quit (Remote host closed the connection)
09:50:04FromGitter<alehander42> btw
09:50:04*crem quit (Read error: Connection reset by peer)
09:50:11FromGitter<alehander42> Araq, how can i pass KeyboardEvent
09:50:19FromGitter<alehander42> in karax
09:50:34*navinmistry joined #nim
09:50:56FromGitter<alehander42> it only expects a proc or EventHandler , but this doesnt work well eg for onkeydown
09:51:58FromGitter<alehander42> hm, i can add an overload for addEventHandler
09:51:59*crem joined #nim
09:53:28*abm joined #nim
09:53:44*skoude joined #nim
09:53:48*shomodj joined #nim
09:55:41yumaikasWelp, this wiki is 382 lines by wc vs the 579 for the Erlang version
09:56:13yumaikasAnd it was more pleasant to write, less symbole soup, and less reliance on 110 braces
09:56:41yumaikashttp://junglecoder.com:9999 if anyone wants to scribble on it
09:57:13leorizenot the best thing to expose httpbeast out :P
09:57:22leorizeespecially since Zevv found ways to crash it :P
09:57:25yumaikasleorize: This isn't staying up long
09:57:48*paxis quit (Ping timeout: 245 seconds)
09:57:57yumaikasleorize: If httpbeast is behind nginx, does that mitigate things more?
09:58:20leorizeyea, it will mitigate against bad headers
09:58:35leorizewhich httpbeast is certainly not coded with in mind
09:58:57leorizeasynchttpserver is more resilient in this regard, but it does not have a timeout for receiving headers
09:59:24yumaikasWell, this will be behind nginx anyway
09:59:41yumaikasRight now I'm just showing off to peeps here in #nim
10:00:09yumaikasAnd watching the traffic in my tmux pain, lol
10:00:57leorizethe wiki looks nice
10:01:19*Cthalupa joined #nim
10:01:21leorizeand I'm a fan of Iosevka :)
10:01:24*shomodj_ joined #nim
10:01:55yumaikasThanks!
10:02:12yumaikasI think I still have one or two kinks to work out
10:03:55yumaikas(and yes, all the stuff for editing and creating posts is exposed without auth. I'm hoping that doesn't lead to RCE right now)
10:03:56*shomodj quit (Ping timeout: 240 seconds)
10:04:51leorizedon't worry, you can emergency shutdown with this :p https://github.com/dom96/httpbeast/issues/21
10:05:13yumaikasAnd it's going to be down for a sec
10:05:44*Cthalupa quit (Ping timeout: 246 seconds)
10:05:51FromGitter<alehander42> great!
10:05:55FromGitter<alehander42> i already edited a post
10:05:57FromGitter<alehander42> or something
10:06:02yumaikasYeah, I see that
10:06:16FromGitter<alehander42> wow you know my ip <3
10:06:33yumaikasEh, I don't think Jester logs IPs by default?
10:06:45yumaikasAnd I certainly don't have them set to log atm
10:07:02FromGitter<alehander42> i am kidding, every website knows my ip
10:07:07PMunchMan Nim is great. Wrote a small web-server with an embeded HTML site including images that does some simple replacing based on your query and an internal table that's populated by a POST route. Took me only a couple of hours, including designing the web-page, and the entire thing comes in at <800Kb in a stripped release build :)
10:07:09yumaikasTrying /admin if you want to add pages
10:07:12*Cthalupa joined #nim
10:07:16PMunchBut now it's time for lunch :)
10:07:37FromGitter<alehander42> nice
10:07:43FromGitter<alehander42> but what happens to the table if its down
10:08:03yumaikasalehander42: Talking to me?
10:08:17FromGitter<alehander42> no, sorry
10:08:21FromGitter<alehander42> PMunch^
10:08:24yumaikasAh
10:09:47*yumaikas is curious if anyone has written a nimble package for websockets yet
10:10:07leorizeormin have a websocket backend so, yes
10:12:13yumaikasormin isn't an ORM?
10:12:25leorizeit's an orm
10:12:32yumaikas...
10:12:51leorizesorry, what I meant was that ormin have an example of being used with websocket
10:12:54leorizefor a chat application
10:12:59yumaikasOh, ok
10:13:06yumaikasmakes more sense
10:17:38zedeusyumaikas: run this from your terminal `nimble search websocket`
10:19:00yumaikaszedeus: I'll have to remember that going forward
10:19:18yumaikas(nimble search, that is)
10:23:15*sealmove joined #nim
10:23:19sealmovehi
10:23:36*skoude quit (Ping timeout: 240 seconds)
10:23:48FromGitter<alehander42> hm i triggered of kTypeMismatch, kVarNeeded: ⏎ ⏎ ``` doAssert nArg != nil``` [https://gitter.im/nim-lang/Nim?at=5d9db534456909176d8f69e3]
10:23:51FromGitter<alehander42> in semcall
10:23:54FromGitter<alehander42> is this an ICE
10:25:19yumaikashttps://github.com/yumaikas/kbwiki Code, for the morbidly curious. I doubt the code is anything special to people who know jester and etc
10:29:15zedeusyumaikas: check this out for much simplified database code https://github.com/moigagoo/norm
10:29:51leorizeyumaikas: checkout nimble.directory
10:30:46leorizeuse ormin, it's just awesome :P
10:31:27*thomasross quit (Ping timeout: 265 seconds)
10:31:34zedeusormin is more work
10:31:34yumaikasWhat is nimble.directory?
10:31:37*laaron joined #nim
10:31:46leorizeit's a website
10:31:54narimiranhttps://nimble.directory/about.html
10:32:14*laaron quit (Remote host closed the connection)
10:32:58*thomasross joined #nim
10:33:03leorizenorm is heavy once you have big objects and only wants parts of them per query
10:33:10*radsoc joined #nim
10:34:49yumaikasSo, that relies on a packages.json hosted on GitHub?
10:35:39*leorize quit (Remote host closed the connection)
10:35:53yumaikasWell, once I get this to a stable place, I'll PR to put it up there
10:36:17*leorize joined #nim
10:41:09*clyybber joined #nim
10:47:18narimiranNim v1.0.2 is ready for testing! You can grab it here: https://github.com/nim-lang/nightlies/releases/tag/2019-10-09-version-1-0-e9f7455 This is *not* the final/official/released version, but we would appreciate if you would test it and report if you experience any (new) problems.
10:47:25narimiranping shashlick federico3 at el.
10:47:30narimiran*et al.
10:49:09federico3narimiran: pong?
10:49:15federico3narimiran: #nim-testers
10:49:23narimiransee above about v1.0.2 testing
10:49:57*sealmove quit (Quit: WeeChat 2.6)
10:50:11federico3narimiran: can I have a proper version number e.g. 1.0.2a please?
10:51:03narimirani guess 1.0.1 should have been proper version number, but i already bumped it. i don't think characters are allowed for nim versions
10:52:10*skoude joined #nim
10:56:38federico3sigh
10:57:00federico3also I need a xz file with the sources only
11:03:40PMunchalehander42, it's wiped
11:03:40FromDiscord<Rika> i'm getting a `node lacks field: strVal` when calling strVal on a NimNode
11:03:56FromDiscord<Rika> am i doing something wrong?
11:04:01Araqyes. :-)
11:04:02leorizenot all nimnode has strval
11:04:28FromDiscord<Rika> which do?
11:04:48FromDiscord<Rika> oh
11:04:54FromDiscord<Rika> the docs are wrong for strVal
11:05:15FromDiscord<Rika> https://nim-lang.org/docs/macros.html#strVal%2CNimNode says `retrieve the implementation of symbol. symbol can be a routine or a const.`
11:05:28Zevvgood spot
11:06:06PMunchnarimiran, what is new in 0.2?
11:06:30ZevvRika: but has been fixed in the bleeding edge docs already I see
11:07:28narimiranPMunch: there are two big things for windows: nimpretty is now shipped (:P), and package name mangling is fixed so no more errors when you try to compile same file twice
11:07:55PMunchIs there a prettier way to do "{.gcsafe.}: var response = baseHtml.deepCopy()"?
11:08:25PMunchnarimiran, ah so nothing exiting for us Linux users :)
11:09:21leorizePMunch: why do you need that?
11:09:42*seni joined #nim
11:10:06narimiranPMunch: one nimsuggest leak was fixed by leorize, everybody benefits from that :)
11:10:24leorizeonly nim.nvim users :P
11:10:39leorizeI'm the only one that actually do tcp connection to nimsuggest
11:11:48Araqshashlick, when you're around join #nim-testers please
11:12:31Araqsame for stefanpandalu (sorry, forgot the exact name)
11:14:35FromGitter<alehander42> @stefantalpalaru
11:14:42FromGitter<zetashift> @narimiran can I get the same with `choosenim devel` ?
11:14:50narimiranno
11:15:11narimirandevel is 1.0.2 + other things which weren't backported
11:18:17*navinmistry quit (Remote host closed the connection)
11:18:35*navinmistry joined #nim
11:20:54*radsoc quit (Quit: radsoc)
11:26:08*skoude quit (Ping timeout: 245 seconds)
11:35:09*me7 quit (Remote host closed the connection)
11:38:56*navinmistry quit (Remote host closed the connection)
11:41:47*rockcavera joined #nim
11:43:27*skoude joined #nim
11:47:37*skoude quit (Ping timeout: 240 seconds)
11:53:27clyybberAraq: I have a problem with case objects. The lode d in genObjConstr is `Instr(...)`. So d.lode is not a symbol, and I can't contruct a field access to it.
11:54:23*navinmistry joined #nim
11:54:49clyybberIt would work if I could contruct a field access to `var tmp: TLoc`
11:55:16clyybberBut I don't know how I would do that, without the original nkSym.
11:55:33clyybberAnd `var tmp: TLoc` doesn't have a lode so not a nkSym
11:56:28clyybberSo my question in the end is, how can I contruct a field access to the field of a TLoc (without its lode). assuming that TLoc is the location of an object?
11:58:37*navinmistry quit (Ping timeout: 240 seconds)
12:02:37*skoude joined #nim
12:06:50*absolutejam4 left #nim ("WeeChat 2.5")
12:09:40*shashlick quit (Remote host closed the connection)
12:09:54*paxis joined #nim
12:12:06*shashlick joined #nim
12:13:45*shashlick quit (Remote host closed the connection)
12:14:18*shashlick joined #nim
12:14:19FromDiscord<kodkuce> if i have list of tuple(word:string, num:int) whats fastest way to remove all ints from tose tuples, to create a new list with only words, i know i can for loop it just asking if there is some faster magic way
12:15:33narimiranvar newList = oldList.mapIt(it.word)
12:17:13FromDiscord<kodkuce> ty i see my fam member uses map in JS all time i personaly newer used map in any lang, need to learn about it more πŸ™‚
12:23:42*stefantalpalaru joined #nim
12:24:17*dddddd joined #nim
12:26:52FromDiscord<kodkuce> wtf does this mean
12:26:53FromDiscord<kodkuce> /home/me/.choosenim/toolchains/nim-1.0.0/lib/pure/collections/sequtils.nim(495, 7) Error: internal error: environment misses: result`gensym342261
12:27:16*luis_ joined #nim
12:27:56narimiranmake a small snippet where you have such behaviour, we cannot know blindly
12:28:50narimiranuse nim playground and give us a link
12:29:16*Kaivo joined #nim
12:31:52FromDiscord<kodkuce> https://play.nim-lang.org/#ix=1Y84
12:32:04*Connor[m] quit (Ping timeout: 248 seconds)
12:32:14*Connor[m] joined #nim
12:32:22*narimiran[m] quit (Ping timeout: 250 seconds)
12:33:00FromDiscord<kodkuce> i tryed it in new var too whitout mapIt too but gamed same error
12:33:08*yglukhov[m] quit (Ping timeout: 248 seconds)
12:33:09*lqdev[m] quit (Ping timeout: 248 seconds)
12:33:28FromDiscord<kodkuce> i think issue is form chaining filterIt and sortIT
12:33:34narimiranplease, full example where i can see the error in the playground
12:33:35shashlick@disruptek nimgit2 is now ready to go - https://travis-ci.org/genotrance/nimgit2/builds/595439728
12:34:21shashlickBut no libssh2 on windows yet, and osx refused to find it either but at least it is functional
12:35:21*skrylar[m] quit (Ping timeout: 240 seconds)
12:35:24*planetis[m] quit (Ping timeout: 250 seconds)
12:35:26FromDiscord<kodkuce> https://play.nim-lang.org/#ix=1Y87 sorry
12:35:40*skoude quit (Ping timeout: 265 seconds)
12:35:48*testgovno[m] quit (Ping timeout: 248 seconds)
12:35:49*MrAxilus quit (Ping timeout: 248 seconds)
12:36:09*lqdev[m] joined #nim
12:36:21*gh0st[m] quit (Ping timeout: 240 seconds)
12:36:41*isaac[m] quit (Ping timeout: 250 seconds)
12:37:05*planetis[m] joined #nim
12:37:46*testgovno[m] joined #nim
12:37:47*MrAxilus joined #nim
12:37:56narimirani think i remember a similar bug report
12:38:10FromDiscord<kodkuce> i solved this issue by just swpaing position
12:38:16narimiranwhat you can do as a workaround it to split it in two parts
12:38:18FromDiscord<kodkuce> first doing sort then filter it
12:38:18*luis_ quit (Remote host closed the connection)
12:38:19*narimiran[m] joined #nim
12:38:30*luis_ joined #nim
12:38:41FromDiscord<kodkuce> wierd but it works no error now
12:38:51*isaac[m] joined #nim
12:38:57narimiranhttps://play.nim-lang.org/#ix=1Y88 - if changing the order doesn't work in some future example
12:39:02*gh0st[m] joined #nim
12:39:10*skrylar[m] joined #nim
12:39:11FromDiscord<kodkuce> just duno if this need to be reported
12:39:35*yglukhov[m] joined #nim
12:46:59jkenI have an object, and a seq I know contains that object, how do I remove it from the seq?
12:47:05jkenDo I need to know its index in the seq?
12:48:10Araqyes
12:48:11lqdev[m]use `find`
12:48:22lqdev[m]it returns the index of that object
12:48:28jkenperfect, thanks!
12:48:50lqdev[m]but beware, `find` is O(n) if you care about performance
12:49:22jkenRight now I don't, but if I did, would the recommendation be to use some other data structure that isn't a seq?
12:50:04shashlickSets
12:50:31jkenoh, right, that might actually be what I want.
12:50:40jkenNo duplicates allowed in my seq anyway
12:50:59clyybberAraq: Do you have an answer to the above?
12:54:17*Hideki_ joined #nim
12:54:40FromGitter<deech> Is there a dynamic length container that works with `typedesc`? I'm aware I can have a `seq` of `NimNode` but I'm looking for something like D's `AliasSeq`
12:54:47FromGitter<deech> https://dlang.org/library/std/meta/alias_seq.html
12:58:08*lritter quit (Ping timeout: 276 seconds)
13:02:17*tdc joined #nim
13:02:47Araqclyybber, what's the question?
13:09:01*sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in)
13:10:18clyybberAraq: How I can construct a field access to the field of a TLoc (without its lode), assuming that TLoc is the location of an object?
13:10:40clyybberhttps://irclogs.nim-lang.org/09-10-2019.html#11:53:27
13:11:08*luis_ quit (Ping timeout: 276 seconds)
13:33:24*nsf quit (Quit: WeeChat 2.5)
13:39:37*tdc quit (Quit: Leaving)
13:50:52*a_b_m joined #nim
13:51:17*thomasross_ joined #nim
13:51:17*thomasross quit (Killed (orwell.freenode.net (Nickname regained by services)))
13:51:17*thomasross_ is now known as thomasross
13:51:22*narimiran_ joined #nim
13:54:02PMunchHmm, I have a slight issue with Karax on the playground
13:54:08*tklohna_ joined #nim
13:54:18*junland_ joined #nim
13:54:33*lkw_ joined #nim
13:54:41*stefan_ joined #nim
13:54:45PMunchIn createDom I have a "if not runningCode: <show regular button> else: <show button with spinner>"
13:55:00*jonafato joined #nim
13:55:11*zama_ joined #nim
13:55:12*literal_ joined #nim
13:55:13*ball2 joined #nim
13:55:19*xace quit (Ping timeout: 268 seconds)
13:55:19*ball1 quit (Ping timeout: 268 seconds)
13:55:19*onionhammer quit (Ping timeout: 268 seconds)
13:55:20*tklohna quit (Ping timeout: 268 seconds)
13:55:23*joshbaptiste quit (Ping timeout: 268 seconds)
13:55:24*zama quit (Ping timeout: 268 seconds)
13:55:25*literal quit (Ping timeout: 268 seconds)
13:55:26*Sargun quit (Ping timeout: 268 seconds)
13:55:27*dddddd quit (Ping timeout: 268 seconds)
13:55:27*stefantalpalaru quit (Ping timeout: 268 seconds)
13:55:27*abm quit (Ping timeout: 268 seconds)
13:55:27*narimiran quit (Ping timeout: 268 seconds)
13:55:27*Jjp137 quit (Ping timeout: 268 seconds)
13:55:29*junland quit (Ping timeout: 268 seconds)
13:55:29*dv^_^ quit (Ping timeout: 268 seconds)
13:55:30*jonafato- quit (Ping timeout: 268 seconds)
13:55:31*lkw quit (Ping timeout: 268 seconds)
13:55:35*Sargun_ joined #nim
13:55:36*onionhammer joined #nim
13:55:37*dv^_^ joined #nim
13:55:39*lkw_ is now known as lkw
13:55:42clyybberAraq: ping
13:55:49*dddddd joined #nim
13:56:28PMunchThis works fine when I click a regular button. But now I merged a PR that sets the shortcut "Ctrl-Enter" to run the code, which is handled by the editor library I use
13:56:42PMunchWhen you run the code this way it doesn't seem like the DOM updates
13:56:48*joshbaptiste joined #nim
13:56:50PMunchAny way to manually prompt it to update?
13:57:04*stefan_ is now known as stefantalpalaru
13:57:18*Jjp137 joined #nim
13:59:58*xace joined #nim
14:00:27*zama_ quit (Changing host)
14:00:27*zama_ joined #nim
14:00:37*zama_ is now known as zama
14:00:39clyybberPMunch: https://github.com/pragmagic/karax/commit/6a0c2871adfa24c3b2083239262df8c2073f60b6
14:02:34*radsoc joined #nim
14:03:31*asymptotically joined #nim
14:07:21*zahary joined #nim
14:07:41*radsoc quit (Read error: Connection reset by peer)
14:08:14clyybberAraq: I'll be off for now, but I'll read the IRC logs if you have an answer.
14:08:15*clyybber quit (Quit: WeeChat 2.6)
14:08:28FromGitter<alehander42> PMunch hey
14:08:40FromGitter<alehander42> this is kinda confusing , i am not sure if i know the right solution
14:08:47FromGitter<alehander42> i think kxi.redraw()
14:08:50FromGitter<alehander42> is what you need
14:09:00PMunchclybber, I'm unable to call it..
14:09:07FromGitter<alehander42> because karax doesnt know about events from libs etc
14:09:18PMunchYeah I'm guessing that's the issue
14:09:23FromGitter<alehander42> at least thats what i do for a lot of "events" in my program
14:09:35FromGitter<alehander42> probably there might be a better idiom to use for this
14:09:45FromGitter<alehander42> but i am not sure which
14:10:06planetis[m]Hi when are you releasing 1.0.2?
14:10:13PMunchAha, kxi.redraw worked
14:10:17FromGitter<alehander42> maybe something like {.redraw.} pragma etc but e.g. i use many karax instances , so not so obvious
14:10:43FromGitter<alehander42> clybber's suggestion is very interesting, but i dont have the new karax
14:10:47FromGitter<alehander42> i wonder how react solves this problem
14:10:49*narimiran_ is now known as narimiran
14:11:36narimiranplanetis[m]: when it is ready :P the plan is tomorrow, but that is only if there are no issues reported from people who are beta-testing it
14:13:58*Hideki_ quit (Remote host closed the connection)
14:14:00leorizePMunch: kxi is the default param for `redraw()`, so you can just call it plainly instead
14:14:02planetis[m]namiran: i found a bug with shuffle, you might want to include https://github.com/nim-lang/Nim/pull/12396
14:14:03planetis[m]awesome
14:14:42PMunchBy the way, if anyone could help with the issue I have with this docker so I can build Nim myself I will add packages to the playground as well :)
14:14:47PMunchhttp://ix.io/1XzF
14:14:54*Hideki_ joined #nim
14:14:58PMunchleorize, oh. I will update that next time I touch that file
14:15:05FromGitter<alehander42> nice
14:15:08FromGitter<alehander42> what is the issue
14:15:13*Hideki_ quit (Remote host closed the connection)
14:15:13PMunchI doesn't work :P
14:15:13FromGitter<alehander42> leorize good one
14:15:20FromGitter<alehander42> but how :P
14:15:26PMunchhttp://ix.io/1Y8J
14:15:27*Hideki_ joined #nim
14:15:35PMunchIt's unable to find its libs
14:15:47leorizeread nim.cfg
14:15:51leorizeyou'll understand why
14:16:37leorizePMunch: I think there's a better way
14:16:57leorizeupdate this apkbuild: https://github.com/alpinelinux/aports/blob/master/testing/nim/APKBUILD
14:17:04leorize:P
14:17:09PMunchWhich nim.cfg?
14:17:37leorizeconfig/nim.cfg
14:17:54narimiranplanetis[m]: if i understand correctly, currently it is possible to have `j == i`, i.e. nothing gets shuffled. correct?
14:18:19PMunchAha..
14:19:04leorizebtw ./koch install $target will install the compiler to the target directory
14:19:09leorizecopy that out and it'll work
14:19:38PMunchOh cool
14:20:27planetis[m]yes that is the bug
14:22:26PMunchOkay, I will look more into it tomorrow
14:22:30*PMunch quit (Remote host closed the connection)
14:24:38narimiranplanetis[m]: but isn't no-shuffle also a valid option?
14:27:20disruptekshashlick: nice work on nimgit2, it's a huge improvement. can you cut a release for me to nimble against?
14:28:04planetis[m]I dont know...
14:28:28*floppydh quit (Quit: WeeChat 2.6)
14:29:34planetis[m]totally forgot... i need to check knuth shuffle again
14:30:32planetis[m]lol it is
14:31:52narimiranbug: fixed :D
14:42:43shashlick@disruptek yep, will post releases for nimterop, nimarchive and nimgit2
14:43:53*luis_ joined #nim
14:54:09disruptekw00t
14:54:25*luis__ joined #nim
14:54:49disruptekshashlick you are an irreplaceable asset to this community.
14:54:50*luis_ quit (Ping timeout: 246 seconds)
14:57:22*luis__ quit (Remote host closed the connection)
14:59:01shashlickthanks buddy πŸ™‚
15:03:21Araqtotally agree, thank you shashlick!
15:06:19Araqbbl
15:08:51*Trustable joined #nim
15:13:22FromGitter<awr1> hello
15:13:32disruptekawwww sup dawg
15:14:34FromGitter<awr1> in physics rn lol
15:15:37disruptekwell, take me off speakerphone.
15:17:55FromDiscord<Rika> hi
15:18:14FromGitter<awr1> what is nimgit2 being used for?
15:18:40disruptekgonna be auto-bisecting git trees in golden.
15:20:19*zahary quit (Quit: Leaving.)
15:23:48*navinmistry joined #nim
15:25:38shashlick@disruptek - right now, both nimgit2 expects libssh2 to be installed (on linux) whereas nimarchive pulls down bzlib, zlib and liblzma and compiles them
15:25:44shashlickwhat do you think is the better approach?
15:26:02disruptekpersonally, i prefer shared libs.
15:26:18shashlickon windows obviously have to download and build, but for linux/osx, do you think it is appropriate to expect the user to download packages
15:26:24shashlickusing their pkg manager
15:26:31leorizeit depends
15:26:44leorizesome prefer not having to touch their pkg manager
15:26:51disruptekunless you don't want to support arbitrary library versions, yeah.
15:27:13disruptekwe're talking about linux users here...
15:27:30shashlickwell, nimterop does support std headers but right now, nimarchive only downloads sources
15:27:48disrupteki guess if you want to be clever, you could build it only if it's not found, or even based on different distros. i wouldn't, though.
15:27:51shashlicki'm wondering if we need a nimz, nimbzlib, nimxyz for every such lib and then have a dependency using nimble
15:27:58shashlickor if this is all a waste of time since no one gives a crap
15:28:36shashlicki know i want nimarchive since i eventually want it statically compiled into choosenim
15:28:40disruptekit's bootstrapping at this point, i think. so you're fine. down the road, probably this stuff will split up and recombine in myriad ways.
15:28:44FromDiscord<Kiloneie> You can have multiple files open if you thread them correct ?
15:28:45disruptekat this point, what works wins.
15:29:01Yardanico@Kiloneie what do you mean by "thread"?
15:29:02disruptekyou don't need threading for multiple file handles.
15:29:10Yardanico^
15:29:19FromDiscord<Kiloneie> So how do you open multiple files ?
15:29:20*navinmis_ joined #nim
15:29:28disruptekassign their handles to multiple variables.
15:29:29leorizejust open it
15:29:35FromDiscord<Kiloneie> ohhh....
15:29:46Yardanico@Kiloneie just https://nim-lang.org/docs/io.html#open%2Cstring%2CFileMode%2Cint
15:30:11Yardanico(io is included in system module, so you don't have to import it explicitly btw)
15:31:30FromDiscord<Kiloneie> You know it's horribly documented right ? I simply didn't know you can do that because whenever i tried to open another file whilst i had one open with the same variable it would error on me.
15:31:48Yardanico@Kiloneie I don't really think it's a documentation issue
15:31:53FromDiscord<kodkuce> what error?
15:31:54Yardanicoit's the same in almost all modern programming languages
15:32:04leorizeyou shouldn't have any error
15:32:14leorizethe handle would just silently leak but that's about it
15:32:27*navinmistry quit (Ping timeout: 264 seconds)
15:32:42leorizeor... did you happen to try to reassign to a `let` variable?
15:33:08FromDiscord<Kiloneie> no idea, thanks.
15:33:54FromDiscord<Kiloneie> and saying it's the same in every programming language, i haven't programmed in any programming language much, this is the most i have ever(besides scripting languages for games)
15:34:11leorizewell it shouldn't error in anyway
15:34:21leorizeregardless of whatever language you're using
15:34:31YardanicoWell trying to reassign let variable is always an error in nim :)
15:34:42disrupteknot in a loop. πŸ˜‰
15:34:59leorizeit's more of "recreating" the variable than reassigning it :P
15:35:10disruptektrue enough.
15:35:31disrupteki really wish i could declare a let variable and then merely assign it once later.
15:35:33FromDiscord<Kiloneie> okay, found the error i thought was the error but it's a different one.
15:35:38shashlickany other suggestions on where to put source and binaries that nimterop creates
15:35:43disruptekhoisted lets.
15:35:49FromDiscord<Kiloneie> You do gotta close a file if you try to open it again but for reading this time
15:36:00disruptekshashlick: nimble problem.
15:36:02Yardanico@Kiloneie it's open for reading by default though
15:36:17*Hideki_ quit (Remote host closed the connection)
15:36:19Yardanicobut if you opened it only for writing first, then yes
15:36:25FromDiscord<Kiloneie> that's what i meant
15:36:31shashlicknimble doesn't really do this source and binary stuff, it is mainly a nimterop introduction
15:36:38FromDiscord<Kiloneie> my bad, all done now.
15:37:02*Hideki_ joined #nim
15:37:29leorizeshashlick: I'd prefer that nimterop don't create dlls on *nix
15:37:42leorizemaybe even windows
15:37:49shashlicknimterop will do what the wrapper writer wants, offers all options
15:37:57disruptekyes, but it will be a feature of other nimble packages.
15:37:58shashlicki'm asking more for what nimgit2 and nimarchive should do
15:38:23leorizebundle by default with an option to use external libs
15:38:45disruptekone crazy dude has already written multiple packages that need this feature. it should be codified in nimble.
15:39:13shashlickcrazy really is the word
15:39:36disrupteki mean it in the best possible sense. 🀣
15:40:23shashlickπŸ˜„
15:41:25shashlickanyone on osx, if you can get libgit2 cmake to detect libssh2 (which fails since it is unable to find libssl) - please let me know
15:41:54disruptekseems like some other ssl-using lib should have solved this.
15:42:11shashlickhttps://travis-ci.org/genotrance/nimgit2/jobs/595439737#L275
15:42:34jkenI am working on an event handling system. I have a proc queueEvent(event: Event)
15:42:43shashlickfew lines above, openssl is detected but libssh2 uses some other way to find openssl
15:42:47jkenI want to have proc queueEvent(event: Event, payload)
15:42:58disruptekahh, that's annoying.
15:43:07jkenWhere payload could be anything a registered event handler might expect to handle
15:43:12jkenAre generics what I want here?
15:43:23jkenor is there a better way to approach that in nim?
15:43:41*Hideki_ quit (Ping timeout: 265 seconds)
15:43:43disruptekuse a generic if you truly want this proc to be generic; ie. you want to accept virtually anything.
15:44:19disruptekvirtually anything.
15:44:45leorizeshashlick: does nimterop verify the downloaded source?
15:45:40shashlickit uses git which probably does, but not when it's a zip file
15:45:52shashlickarchives it just extracts
15:45:53disruptekjken: otherwise, maybe you want a typeclass of things you accept.
15:46:20leorizeshashlick: it should check the integrity though
15:46:47shashlickhow to do that
15:47:16*mat44 joined #nim
15:47:19leorizeyou can source out to external tools, but then you're hopeless on windows
15:47:30jkendisruptek, rethinking my types is probably the answer, I think I want an Event type that holds EventType and EventData types
15:47:39*Hideki_ joined #nim
15:47:40jkenwhere EventData could be some kind of generic
15:47:43Yardanicojken: what about object variants?
15:47:47disruptekyou could at least use md5, but if you're worried about mitm attacks... 🀷
15:48:26disruptekjken: it sounds like a variant object with eventtype as a discriminator and varied fields supporting different data values.
15:48:26jkenYardanico, a quick glance at the docs says thats exactly what I need
15:48:27jkenthanks!
15:48:32*mat44 quit (Remote host closed the connection)
15:48:53jkenThis language amazes me
15:48:55*Hideki_ quit (Remote host closed the connection)
15:48:57leorizeshashlick: nim have an sha1 module which might work at compile-time, so that could be a start
15:49:06disruptekit's pretty amazing, to be sure.
15:49:13Yardanicojken: be aware that fields can't have the same name in different cases in object variant though
15:49:23leorizeshashlick: also, could your libgit2 issues just boiled down to libssh2 not there at all?
15:50:02shashlickpkg-config shows libgit2 being present
15:50:02*navinmis_ quit (Remote host closed the connection)
15:50:13*navinmistry joined #nim
15:50:14disruptekthe pattern that emerges is a case object with different fields named after their kind. each such field is a ref to an object that holds the (potentially clashing) fields named however you wish for that form of the variant.
15:50:20shashlickactually, on travis, yes looks like it isn't installed
15:50:33shashlickbut even on my local machine, it fails since it cannot find openssl
15:50:35shashlicklibssl
15:50:55shashlicklibgit2 => libssl
15:50:59shashlickugh libssh2
15:51:04*shomodj_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:51:27shashlickis it possible to find nimcache dir during compile time
15:51:49disruptekyes, by specifying it yourself.
15:52:06disruptekwell, you asked. 😝
15:52:29shashlicknimcacheDir() exists in nimscript but not vm looks like
15:52:43*luis_ joined #nim
15:52:45leorizeyea
15:52:59leorizeshashlick: well what's the log on your local machine then?
15:53:54shashlicksorry don't have it right now, will share later
15:55:06*Hideki_ joined #nim
15:59:02*couven92 quit (Read error: Connection reset by peer)
15:59:29*Hideki_ quit (Ping timeout: 250 seconds)
15:59:40*luis_ quit (Quit: luis_)
16:00:05*luis_ joined #nim
16:01:16shashlickokay - am going to put all nimterop artifacts into nimcache and also propose that nimble move all its temp artifacts from $TMP to nimcache since it is per user
16:02:01jkenHow can I access the kind of an object variant after creation?
16:02:14Yardanicojken: using the field you used for "case" statement in type definition
16:02:19Yardanicoif you used "kind", use "kind"
16:02:48Yardanicobut you can name the field used for switching between different object variants anything you want really
16:02:51jkenI get an error because its resolving `event.kind` to macros.kind(event) I think
16:03:10Yardanicojken: what error? can you post it on the gist or other pasting service?
16:04:42jkenYardanico, the error: https://paste.debian.net/plain/1105569
16:05:03Yardanicojken: how did you define your object variant type? Can you post it as well?
16:05:07jkenThe typeS: https://paste.debian.net/plain/1105570
16:05:29jkenThen I get that error when accessing event.kind
16:05:31Yardanicojken: if you want to use them in other modules you need to also add * to all fields inside a type
16:05:31disruptek`case kind*: EventType`
16:05:36jkenah,
16:08:29*luis_ quit (Remote host closed the connection)
16:09:28*luis_ joined #nim
16:10:11*Yardanico left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.")
16:10:58jkenfinal question, say I have a proc that creates events, which are an object variant type, is there a syntax to pass arguments through to the Event() call. Something like **kwargs in python?
16:11:23jkenor do I need seperate procs to create different variants of the event ypoe
16:11:25jkentype*
16:12:04*ng0 quit (Ping timeout: 260 seconds)
16:12:22disruptekvarargs[] is a typed array for arbitrary arity.
16:12:40disruptekeg. proc echo(varargs[string, `$`])
16:12:50FromDiscord<Kiloneie> var a = reopen(f, "Test2.txt", fmRead)
16:12:51FromDiscord<Kiloneie> Why does this proc not work like "f.reopen" ... ? Seems unnecessary.
16:13:02disruptek(it runs $ to convert arguments into strings for inclusion in the array)
16:13:26jkenhmm, I am not sure that is entirely what I mean
16:13:39jkenlet me put something on the nim playground together
16:14:17disruptekthere's no way to have arbitrary argument types in this statically-typed language.
16:14:48disruptekbut, you could have varargs[EventData] where EventData is a variant object.
16:14:48*ng0 joined #nim
16:15:25jkenI think then I just end up pushing the responsilbity of creating EventDatas into the same type of thing
16:15:36jkenwhere I need seperate procs to create each variant of EventData
16:15:42*shomodj joined #nim
16:15:56jkenwhich is probably for the best.. I am just new to static typign
16:15:58disruptekyes.
16:16:03jkenThanks!
16:16:27*Tyresc joined #nim
16:16:34disruptekthe machinery in the middle can stay the same. you just add new forms of data at ingestion and digestion and, uh, emission.
16:20:57*shomodj quit (Read error: Connection reset by peer)
16:22:04FromGitter<alehander42> you can just overload your Event call
16:22:19FromGitter<alehander42> and if you can, please use camelCase for calls
16:22:46FromGitter<alehander42> Event is a type name usually ;P
16:23:07FromGitter<alehander42> (except if you implement `()` for the type)
16:23:29FromGitter<alehander42> Kiloneie it works like f.reopen
16:23:34FromGitter<alehander42> doesnt it
16:24:19FromDiscord<Kiloneie> it's showing me a problem...
16:24:22*navinmistry quit (Remote host closed the connection)
16:24:37FromGitter<alehander42> please copy the error in cases like this :)
16:25:56FromDiscord<Kiloneie>
16:25:56FromDiscord<Kiloneie> https://cdn.discordapp.com/attachments/371759389889003532/631527775714410496/Capture.PNG
16:26:26FromGitter<alehander42> yes
16:26:29FromDiscord<Kiloneie> if i give it the filename in string, then it gives more error, meh.
16:26:32FromGitter<alehander42> but see that it tells you exactly
16:26:46FromGitter<alehander42> but ok, read the error my friend
16:26:51FromGitter<alehander42> it tells you correctly
16:27:03FromGitter<alehander42> you need `filename`
16:27:26FromGitter<alehander42> and maybe then it tells you about the return value?
16:28:02FromGitter<alehander42> ah, so you mean that you want a *different* overload
16:28:06FromDiscord<Kiloneie> it doesn't work unless i feed that into another variable
16:28:09FromGitter<alehander42> which doesnt take arguments, sorry
16:28:16FromDiscord<Kiloneie> yeah that's what i meant
16:28:32FromDiscord<Kiloneie> i thought it would be a simple proc
16:29:30FromGitter<alehander42> ah i see
16:29:33FromGitter<alehander42> the point of reopen is different
16:29:40FromDiscord<Kiloneie> it seems pointless to have this proc, all it does is reduce 1 single f.close call, but requires you to feed the return value into another variable.
16:29:40FromGitter<alehander42> the point is to take your existing `f`
16:29:46FromDiscord<Kiloneie> aha ?
16:29:50FromGitter<alehander42> and redirect it to another file
16:29:57FromGitter<alehander42> e.g. usually one uses it for stdout
16:30:07FromGitter<alehander42> so you can redirect
16:30:11FromGitter<alehander42> your stdout to a file
16:30:15*Hideki_ joined #nim
16:30:15FromGitter<alehander42> and after you call it
16:30:20FromGitter<alehander42> echo writes to the file instead
16:30:29FromGitter<alehander42> its basically using `freopen`
16:30:59FromDiscord<Kiloneie> ah okay. Not exactly what i thought a reopen proc would be
16:31:03FromGitter<alehander42> the freopen family of syscalls
16:31:08FromGitter<alehander42> thats why its called like that
16:31:27FromDiscord<Kiloneie> okay thanks
16:31:37FromGitter<alehander42> no problem, i misunderstood as well
16:31:57FromDiscord<Kiloneie> seems like good stuff to cram into my video butttttt man it's gonna be too long of a video then, so nope.
16:32:16*skoude joined #nim
16:32:20FromGitter<alehander42> yeah maybe keep them shorter
16:32:36FromGitter<alehander42> at least i prefer to watch 2 shorter videos than 1 long
16:32:46FromGitter<alehander42> but people might be different i dunno
16:33:08FromDiscord<Kiloneie> Im already a video behind, because i listened to a suggestion to maybe do video and audio seperately but that's impossible... tried it, failed.
16:33:42FromDiscord<Kiloneie> i try to give as much beginner info as possible on the subject, although i did make some videos about multiple subjects xD...
16:34:24*ng0_ joined #nim
16:34:44FromDiscord<Kiloneie> Trying to watch your own video and then make the audio, lol that is mission waste of time.
16:35:24*ng0 quit (Ping timeout: 260 seconds)
16:36:26*skoude quit (Ping timeout: 240 seconds)
16:40:16*navinmistry joined #nim
16:41:36*Hideki_ quit (Ping timeout: 240 seconds)
16:41:55leorizeKiloneie: usually people scripts beforehand
16:42:03*navinmistry quit (Remote host closed the connection)
16:42:09leorizewhich make adding audio much easier since you know what will happen
16:42:17*navinmistry joined #nim
16:44:11FromDiscord<Kiloneie> i do make scripts, but the problem is, i usually deviate from it in some ways, because i figure out a better way or something extra that should be shown and told when doing it, so doing audio AFTER video seems nutz to me.
16:45:05leorizeyou should revise your script multiple times before actually recording something :P
16:45:28leorizefollow your script, if you figure out a cool thing to talk, note it to the script
16:45:34*ng0_ is now known as ng0
16:45:40leorizeso eventually you get a fluid demonstration which you can voice over later
16:45:48FromDiscord<Kiloneie> thats waaay too much work D:
16:45:58leorizequality don't come for free :P
16:46:25FromDiscord<Kiloneie> i do revise my script, but not when recording, unless i stumble on the wording because it sounds off when i forget a "the" or something
16:46:57FromDiscord<Kiloneie> i am not a perfectionist, i can be, but i would lose my shit eventually if i did that.
16:47:09leorizei think you can still save your other video :p
16:47:24leorizenote what you did and would be cool to talk, then re record it with those changes
16:47:43leorizeor you can do the improvising way :P
16:48:15FromDiscord<Kiloneie> i already wrote the script now, im recording now, so, you will see in in a good hour
16:48:21FromDiscord<Kiloneie> i can't improvise that well D:
16:49:44leorizea foolproof way would be to just talk while recording
16:50:12leorizethen you can voice over if you feel like explaining things in a better way
16:52:18*nsf joined #nim
16:52:43*skoude joined #nim
16:54:42FromDiscord<Kiloneie> thats what i do, but someone wanted to remove the keyboard typing entierly, so i decided to give it a try, but i can't do that. And besides, some people love the keyboard lol.
16:57:38*skoude quit (Ping timeout: 265 seconds)
16:59:41*luis_ quit (Quit: luis_)
17:01:14*gangstacat quit (Quit: Ĝis!)
17:02:36*gangstacat joined #nim
17:03:58*thomasross_ joined #nim
17:03:58*thomasross is now known as Guest60683
17:03:58*thomasross_ is now known as thomasross
17:04:33*Guest60683 quit (Read error: Connection reset by peer)
17:08:11*thomasross is now known as Guest62483
17:08:11*thomasross_ joined #nim
17:08:11*Guest62483 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
17:08:11*thomasross_ is now known as thomasross
17:16:07lqdev[m]if you're slow with typing do it Ben Eater's way
17:16:15lqdev[m]speed up the video and leave the audio
17:16:19lqdev[m]at 1x speed
17:16:35lqdev[m]and make a jump cut in the audio when the video speedup ends
17:17:19lqdev[m]it doesn't remove typing entirely, it just makes it faster and less painful for some people.
17:20:47acidxbisqwit's videos are also nice, but takes a lot of work to prepare. (all code is typed first, debugged, optimized, etc, then a program is used to "coreograph" the code, e.g. by moving stuff around and copying/pasting/changing stuff, and then passed to a program that actually generates keypresses to simulate someone programming it from the scratch.)
17:25:25FromDiscord<Kiloneie> too much
17:30:59lqdev[m]well mate, I already said it but my general rule when doing things is quality > quantity
17:31:13*traviss joined #nim
17:31:14lqdev[m]it takes a lot of work but it's worth it in the end
17:33:58FromDiscord<Kiloneie> Yes, but, isn't the quality of my videos good enough already ? Although i do need my microphone on a microphone arm, and my mic won't fit any, so i would have to spend like 150€ on a new one on a stand. Will see about that, if my refund of a broken program comes back to me.
17:40:05*PMunch joined #nim
17:40:56*PMunch quit (Remote host closed the connection)
17:41:26FromDiscord<Kiloneie> What i like about my keyboard being loud is that it makes editing easier, as it is picked up by my pic well enough that i can easily know just by looking at the audio waveforms which parts of the video i am doing literally nothing, and which i am doing something.
17:42:35*navinmistry quit (Ping timeout: 265 seconds)
17:44:43Zevvyou should make a little box with a button emitting 15Khz beeps. Every time you make a mistake you hit the button and you can find that in your waveform to know where to fixup
17:48:29FromDiscord<Kiloneie> i just stop the video and start over. when i made a good bit of the video i just end it there and make another clip, then i use some software to convert my obs files to files da vinci resolve uses as well as merges them in order into a singular file
17:48:58FromDiscord<Kiloneie> This is how it looks after recording
17:48:58FromDiscord<Kiloneie> https://cdn.discordapp.com/attachments/371759389889003532/631548670864654347/Capture.PNG
18:03:01narimiranlqdev[m]: you're not the only one telling him that, but the response is always the same, so maybe we should stop suggesting....
18:04:39FromDiscord<Kiloneie> Well these suggestions would seriously increase the time spent to make a video of slightly better quality if any...
18:08:09FromGitter<alehander42> well i think they're both valid approaches
18:08:50FromDiscord<Kiloneie> what i should do is add a button to go ot the previous video and the next
18:08:57FromDiscord<Kiloneie> which i have no clue how to do
18:09:44narimiranhow many people told you about keyboard noises? and your response is: "well, some people like noise, lol"
18:10:03FromGitter<alehander42> on one hand kiloneie is underestimating how nice it to have something that stands out, or which is very well "edited" or has specific , if you want, gimmicks for this channel
18:10:17narimirani didn't hear even one "oh i really like the sound of your typing" comment
18:10:21FromGitter<alehander42> on the other hand still there is also market for simpler but more detailed videos probably
18:10:34FromGitter<alehander42> but yeah, typing is something that should be fixed if it annoyes people
18:10:43FromGitter<alehander42> basic good sound is the bread and butter of such videos
18:11:04FromGitter<alehander42> it doesnt make sense to put so much time every day which cost much much much much more than 150 dollars
18:11:04narimiranand no, buying 150€ mic stand is not the only option
18:11:21FromGitter<alehander42> if there are simple things which would annoy a listener
18:14:05FromDiscord<Kiloneie> the thing about typing is that, everytime someone says he doesn't really like it, another one pops up that does..., literally, here and in the thread topic for my videos., i do have a membrane keyboard sitting on top of my computer. Typing sound would get significantly reduced by a mic stand, trust me because currently the keyboard is much closer to the mic than my mouth is, if it was on a stand it would reverse.
18:14:09FromDiscord<Kiloneie> it's that simple
18:14:24FromDiscord<Kiloneie> but i haven't found a mount that could fit my old mic
18:14:37narimiranyou should experiment with stuff. maybe that cheap 5€ mic that you attach to your t-shirt or some headset with mic would solve your problems, as neither of those is on the table where it picks up vibrations from typing
18:15:21narimiran" currently the keyboard is much closer to the mic than my mouth is" -- why, how?
18:15:38narimirancan't you fix the position of the mic without the expensive stand?
18:16:14FromGitter<alehander42> i have to finally watch one of those videos
18:16:26narimiranput some thick books underneath mic, so it is raised to be next to your mouth, or something. experiment, man
18:17:43FromDiscord<Kiloneie> if i put it on the other side, it will pick up my extremely loud mouse, on the left it picks up the keyboard, and the stand is TINY
18:17:53FromDiscord<Kiloneie> let me find a pic
18:18:23FromDiscord<Kiloneie>
18:18:24FromDiscord<Kiloneie> https://cdn.discordapp.com/attachments/371759389889003532/631556071240237066/pic.PNG
18:19:14FromDiscord<Kiloneie> a mic on an arm is also great because there won't be any distance difference between reading from my second monitor and my main
18:19:29FromDiscord<Kiloneie> which can be noticed sometimes if i do it mid video
18:20:15FromDiscord<Kiloneie> if i were to put it on a lot of boxes or something, idk, maybe.
18:24:18*Kameleon joined #nim
18:25:22*Kameleon quit (Client Quit)
18:25:33*Kameleon joined #nim
18:29:36*minierolls joined #nim
18:40:21minierollswhen defining type SOMETHING = object, if SOMETHING is all caps in visual studio code then it is highlighted a different color than if not all caps
18:40:35minierollsjust checking but is there some recommendation against using all caps for type names
18:42:42disruptekit's not stylistically idiomatic, but it's mostly because nim is not c and the c idiom makes it easier to identify symbols from that language when they may appear in nim code.
18:46:58FromGitter<alehander42> so basically you want to use PascalCase for types
18:47:08FromGitter<alehander42> except maybe for C_TYPES as disruptek says
18:51:54minierollsah yeah normally I would, but I have an object whose actual name is all caps
18:52:05minierollswould be weird to pascalcase it
18:52:19disruptekwait, is it RONALDO?
18:52:28minierollslmao no
18:52:38disruptekoh, 'cause that woulda be nuts.
18:58:04yumaikasWelp, I have jester+db_sqlite+htmlgen running at https://feed.junglecoder.com
18:59:37FromDiscord<minierolls> @Kiloneie u can also get one of those mic arms that will let u hang the mic upside down above your monitors
19:00:05FromDiscord<Kiloneie> thats what i need, but nothing fits my mic shown in the pic above
19:00:12FromDiscord<Kiloneie> need a new set
19:11:10*Kameleon quit (Quit: Leaving)
19:24:28FromDiscord<Kiloneie> Here we go another video: https://youtu.be/BpgeUCbexY8
19:24:29FromDiscord<Kiloneie> This one was supposed to air yesterday, gonna have to make up for it soon.
19:29:43FromDiscord<Kiloneie> I tried to zoom in to a part twice in the video, the transition is a bit bad, i tried to use a dynamic zoom instead of the static one, but Da vinci resolve seriously hates me <.<.
19:42:08FromDiscord<juan_carlos> Cool video!. I just use `writeFile`, `readFile`, `lines`, `staticRead` a lot.
19:42:47FromDiscord<Kiloneie> Thank you !
19:48:48jkenWhat does "template/generic instantiation of `get` from here" actually mean?
19:51:25disruptekit means that's the code that called the code that generated the error below.
20:02:27lqdev[m]this error message kinda sucks
20:02:36lqdev[m]it doesn't tell what happened very well
20:05:46Araqit's perfectly clear
20:06:41*tiorock joined #nim
20:06:41*tiorock quit (Changing host)
20:06:41*tiorock joined #nim
20:06:41*rockcavera quit (Killed (wolfe.freenode.net (Nickname regained by services)))
20:06:41*tiorock is now known as rockcavera
20:07:00lqdev[m]nope. what's a "template/generic instantiation from here"?
20:08:51*koranza joined #nim
20:08:54*stefantalpalaru quit (Quit: stefantalpalaru)
20:11:09*nsf quit (Quit: WeeChat 2.5)
20:18:33*asymptotically quit (Quit: Leaving)
20:19:24*koranza quit (Remote host closed the connection)
20:30:54*NimBot joined #nim
20:32:38FromDiscord<kodkuce> The force is strong in @Kiloneie he persistent shooting video every day, πŸ‘
20:35:56FromDiscord<Kiloneie> Thanks, and yeah. yesterday there was no video though
20:36:07FromDiscord<Kiloneie> (gotta make up for it D:)
20:36:55FromDiscord<Kiloneie> When every video will be making the views my first one is, that will be a happy day for me.
20:39:02FromDiscord<Kiloneie> Also, thats kinda the point of me not having a job right now, for this. BUT i am only spending like a 1/4 of the day on making them now that i've gotten better at making them, should be doing more soon.
20:39:08FromDiscord<Kiloneie> Too much youtube D:
20:56:01*shomodj joined #nim
20:56:36*narimiran quit (Ping timeout: 240 seconds)
21:03:54*radsoc joined #nim
21:21:47FromGitter<nixfreakz_twitter> does anyone have a tuts or articles how to get started creating linux commandline tools using nim?
21:25:43disruptekwhaddya wanna make?
21:26:30FromGitter<nixfreakz_twitter> wc -l , ls , cut, examples like that , to learn more about nim
21:27:15*solitudesf quit (Ping timeout: 240 seconds)
21:27:23disrupteklookup c-blake's cligen to quicken parsing arguments. other than that, you'd have to ask a specific question to get specific recommendations.
21:27:55disruptekyou can look at how https://github.com/disruptek/golden works as an example of a simple cli tool.
21:28:56disruptekalso see the stuff in my `xs` repo. those are small and pretty easy to grok.
21:45:49*skoude joined #nim
21:50:21*skoude quit (Ping timeout: 268 seconds)
21:54:07*rockcavera quit (Remote host closed the connection)
21:58:00minierollsDoes anyone know if a C interface to Nim library will allow access to custom objects (defined as structs maybe?)
21:58:04*seni quit (Quit: Leaving)
21:58:35*Trustable quit (Remote host closed the connection)
21:59:52FromDiscord<treeform> minierolls, you can look at generated C code and look at it yourself
22:00:31FromDiscord<treeform> If you want c using nim lib, it might make sense to generate a c header file with structs and functions for you lib and make c and nim use it.
22:00:40FromDiscord<treeform> If you want c using nim lib, it might make sense to write a c header file with structs and functions for you lib and make c and nim use it.
22:01:30*radsoc quit (Quit: radsoc)
22:05:10FromDiscord<minierolls> But how will the memory management work? If I return a struct from Nim then how does it free
22:05:36FromDiscord<minierolls> Struct pointer*
22:06:58FromDiscord<Lunar> https://hastebin.com/vomahuruze.nim
22:07:11FromDiscord<Lunar> /home/lunar/Nim/Commands/File Transfer/server.nim(4, 9) Hint: 'actualFile' is declared but not used [XDeclaredButNotUsed]
22:07:11FromDiscord<Lunar> /home/lunar/Nim/Commands/File Transfer/server.nim(4, 26) Error: invalid indentation
22:07:23FromDiscord<Lunar> Sorry, I meant
22:07:36FromDiscord<Lunar> ```/home/lunar/Nim/Commands/File Transfer/server.nim(4, 9) Hint: 'actualFile' is declared but not used [XDeclaredButNotUsed] /home/lunar/Nim/Commands/File Transfer/server.nim(4, 26) Error: invalid indentation```
22:07:46FromDiscord<Lunar> Hopefully y'all can see that πŸ˜…
22:08:36FromDiscord<treeform> @minierolls I have no idea how it will work. You could do an openGL style API where you return IDs to things not actual things.
22:08:49FromDiscord<Lunar> Anyways, when I unindent it, it give me another error saying ```/home/lunar/Nim/Commands/File Transfer/server.nim(4, 1) Error: complex statement requires indentation```
22:12:40FromDiscord<Lunar> Turns out, I can't create multiple variables on one statement. Instead of doing ```var actualFile:string, line:string``` I had to do ```var actualFile:string <insert newline here> var line:string```
22:13:02FromDiscord<treeform> also :void is odd
22:13:14FromDiscord<Lunar> I find that somewhat disappointing...
22:13:15FromDiscord<treeform> also you need {.async.} if you are going to use await inside the proc
22:13:25FromDiscord<Lunar> is ``:void`` not a thing in Nim?
22:13:40FromDiscord<treeform> also split returns an seq[string] but you want a string?
22:13:57FromDiscord<treeform> aslo `add` does not return anyting
22:14:08FromDiscord<treeform> just use `actualFile.add(line)`
22:14:13FromDiscord<treeform> without the =
22:14:18FromDiscord<Lunar> ``Error: invalid pragma: async``
22:14:24FromDiscord<Lunar> Got it
22:15:24FromDiscord<Lunar> Declaring the function like this: ```proc saveFile(file: AsyncSocket):void {.async.} =```
22:15:29FromDiscord<treeform> Not sure what you are trying to do, but this compiles
22:15:30FromDiscord<treeform> https://play.nim-lang.org/#ix=1Ybu
22:15:31FromDiscord<Lunar> Fixing the void now
22:15:55FromDiscord<treeform> it has to be `Future[void]` for an `{.async.}` proc
22:16:03FromDiscord<treeform> I would just omit void, everyone else does
22:16:57FromDiscord<Lunar> Just did. Still didn't work. I copied and pasted your example, and found that it compiled too. I believe it was because I didn't import ``asyncdispatch``
22:17:05FromDiscord<Lunar> I'm probably wrong though...
22:17:17FromDiscord<treeform> yes you need `asyncdispatch`
22:17:44FromDiscord<treeform> I don't get this part here: `var fileName:string = actualFile.split("\a")[0]`
22:18:00FromDiscord<treeform> I had to add a `[0]` to get it to work
22:18:06FromDiscord<Lunar> Ah, thank you
22:18:25*r3c joined #nim
22:18:26FromDiscord<treeform> I think you might want to write code in smaller prices and run them often.
22:18:31FromDiscord<treeform> Thats what I do πŸ™‚
22:18:40r3cHi
22:18:45FromDiscord<Lunar> I believe I'll start doing that
22:18:48FromDiscord<Lunar> Howdy r3c
22:19:05FromDiscord<Lunar> I noticed that you split up creating the variables onto multiple lines
22:19:15FromDiscord<Lunar> That makes more sense, not going to lie
22:19:26r3cI was wondering, can you serve static files with httpserver? No Jester
22:19:26FromDiscord<treeform> then `,`? yeah
22:19:50FromDiscord<treeform> r3c, yes I do that for work. I don't use Jester. But I do use httpserver.
22:20:03r3cIs it complicated?
22:20:08FromDiscord<treeform> let me look
22:20:12FromDiscord<treeform> I don't remmber it being
22:21:27r3cI had crazy idea writing framework from scratch :P
22:21:38r3c*have
22:22:08FromDiscord<treeform> Hmm I was wrong I don't do that. It looks dead easy though. I server static files through nginx. I use nginx because of SSL and because its battle hardened vs attacks. So in nginx i split traffic between static files and dynamic nim stuff.
22:23:00*Vladar quit (Remote host closed the connection)
22:23:08r3cinteresting
22:23:54FromDiscord<Lunar> Is it possible to make an async variable?
22:23:57FromDiscord<treeform> On high volume sites I even split between a static domain and "dynamic domain". Well my API is a single websocket .. I don't like REST.
22:25:15FromDiscord<treeform> @Lunar I don't think so. Once you have async stuff you get the race conditions and need locking kind of ...
22:25:26FromDiscord<treeform> @Lunar I don't think so. Once you have async stuff you get the race conditions and need locking kind of ...
22:25:46r3cHow does jester serve static files?
22:26:45FromDiscord<treeform> @r3c I think the source for it is: https://github.com/dom96/jester/blob/dc74a797ebca15e4f1b46a7f2e1f4e733b1c5ee2/jester.nim#L166
22:27:51FromDiscord<treeform> @r3c, server static files is easy, get the URL path, see if the file is there, figure out the mime-type of the file (usually by extension) send the header, then write size, then write the file body.
22:28:16FromDiscord<treeform> Jester does extra by also handing caching which I what most of that code is, caching and error handling.
22:28:25r3coh yes :) tnx
22:30:00FromDiscord<treeform> I recommend going nginx route to serve static files. nginx is a nice shield to hide behind.
22:31:12FromDiscord<treeform> really easy to setup SSL with LetsEncrypt, which modern web basically requires.
22:32:04*rayman22201 quit (Quit: Connection closed for inactivity)
22:33:27r3cill try both, tnx @treeform
22:36:33*rockcavera joined #nim
22:41:33FromGitter<theretromaniac> Hello everyone, i start recently to play with him and today i am playing with cli. I have this code: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Any help? [https://gitter.im/nim-lang/Nim?at=5d9e621d874aeb2d231aaae8]
22:45:43*ng0 quit (Quit: Alexa, when is the end of world?)
22:51:21r3cchange the for loop with while loop
22:51:48r3clike in the example https://nim-lang.org/docs/parseopt.html
22:52:34*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:01:29*MaineTim joined #nim
23:05:06FromGitter<theretromaniac> Thank you
23:05:18FromGitter<theretromaniac> i fix it with for loop
23:05:35FromGitter<theretromaniac> just have to add
23:06:45FromGitter<theretromaniac> ` quit(0) ` ⏎ under case of
23:07:24*leorize quit (Ping timeout: 260 seconds)
23:09:02*Traviss__ joined #nim
23:09:19*Tyresc quit (Quit: WeeChat 2.7-dev)
23:10:31*MaineTim quit (Ping timeout: 260 seconds)
23:10:54*leorize joined #nim
23:12:23*traviss quit (Ping timeout: 245 seconds)
23:12:53*rockcavera quit (Remote host closed the connection)
23:22:52FromDiscord<Kiloneie> Why does fmReadWrite clear my file ?
23:23:51FromDiscord<Kiloneie> i used a for loop using the lines iterator and my file is empty after running it
23:35:43FromDiscord<garageagle> Is there something that I can do like python's `print("> " end="")`?
23:38:13*krux02 quit (Ping timeout: 245 seconds)
23:39:36disruptekgarageagle: if you mean to write without a newline, you could stdout.write("some text") or stdmsg().write("other text")