<< 01-04-2017 >>

00:10:02FromGitter<Varriount> Tiberium: Threads
00:10:20FromGitter<Varriount> Or async, if you can count on the plugins to not block either.
00:10:41*SusWombat quit (Remote host closed the connection)
00:11:07*SusWombat joined #nim
00:11:23FromGitter<TiberiumPY> I use async, but maybe in a wrong way...
00:12:28*Matthias247 quit (Read error: Connection reset by peer)
00:16:12*cheatfate quit (Read error: Connection reset by peer)
00:16:18*cheatfate_ joined #nim
00:17:27*cheatfate_ is now known as cheatfate
00:32:51*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:38:14*brson joined #nim
00:42:15*PMunch quit (Quit: leaving)
00:44:36FromGitter<Varriount> @TiberiumPY I'd just go with threads. As long as you're willing to copy/pass messages, you'll be fine.
00:45:35FromGitter<TiberiumPY> Not just messages - I have one global API object. But maybe I can create separate one's
00:46:55FromGitter<TiberiumPY> So it will be fine if I create one thread per plugin?
00:47:24FromGitter<TiberiumPY> It would be like 15 threads, and in future it would be something like 30-40
00:52:39FromGitter<Varriount> Why can't multiple plugins be in one thread?
00:52:56FromGitter<Varriount> Or have plugins state whether they are blocking or not.
00:53:52FromGitter<Varriount> `nonblocking`, `sharedBlocking`, `isolatedBlocking`
00:56:13FromGitter<Varriount> tiberium: If the file is large enough, it might be that the act of copying the data (from the socket, or whatever) is causing the program to block. Though, computers can copy memory fairly quickly.
00:57:39*bjz joined #nim
00:58:30*Jesin quit (Quit: Leaving)
00:58:50*bjz quit (Client Quit)
01:03:17FromGitter<TiberiumPY> And what would be if some thread would do long http request?
01:03:22FromGitter<TiberiumPY> Application will not block?
01:05:46FromGitter<TiberiumPY> Nim's manual says that async should be used for IO intensive tasks
01:11:24*brson quit (Ping timeout: 260 seconds)
01:12:21*chemist69 quit (Ping timeout: 264 seconds)
01:20:37*Jesin joined #nim
01:22:16*rokups quit (Quit: Connection closed for inactivity)
01:23:03cheatfateasync is not very good for cpu intensive tasks, but for any tasks which depends on IO, it much better then threads
01:23:12cheatfateand async don't care about long http requests
01:23:34cheatfatebecause this is IO task
01:24:00cheatfateso it send request and continue to do other work, until data will arrive from server
01:26:09*chemist69 joined #nim
01:36:33FromGitter<TiberiumPY> It doesn't happen for me
01:36:52*bjz joined #nim
01:37:55FromGitter<TiberiumPY> I'm doing async request, then parsing it to JSON
01:38:09FromGitter<TiberiumPY> And whole app blocks for this time
01:43:53*yglukhov joined #nim
01:46:31*brson joined #nim
01:48:47*yglukhov quit (Ping timeout: 268 seconds)
01:51:20*brson quit (Client Quit)
01:56:12FromGitter<Varriount> @TiberiumPY How much JSON are you parsing?
02:15:02zachcarterwhat’s the cheapest form of string concatenation in nim?
02:15:07zachcarterstrutils format?
02:15:27zachcarterI don’t even mean string concatenation really I just mean formatting a string - like combining string values
02:15:34zachcarteris format any cheaper than string & string
02:24:25zachcarterI’m guessing that’s the case
02:24:35zachcarterVarriount: can you confirm for me?
02:25:50FromGitter<Varriount> zachcarter: Depends. Do you need a brand new string, or can you mutate one?
02:26:19zachcartergenerally a brand new string
02:26:43FromGitter<Varriount> Then `&` should do it.
02:26:52zachcarterawesome thank you
02:56:09*dddddd quit (Remote host closed the connection)
03:05:28zachcarteranother question
03:05:41zachcarteris there a way to check if an object has a field of a certain type defined?
03:05:57zachcarterso like
03:06:01zachcartertype
03:06:06zachcarter foo = object
03:06:13zachcarter a:int
03:06:20zachcarterdoes foo have an int field?
03:13:23*chemist69 quit (Ping timeout: 256 seconds)
03:40:22*chemist69 joined #nim
03:42:28zachcarterThink I found a bug with the docu tool?
03:43:30zachcarterthttps://gist.github.com/zacharycarter/014270d712e1913ab7ebddf9b9035316
03:44:17zachcarternevermind…
03:44:27*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:01:36*bjz joined #nim
04:07:16*Nobabs27 quit (Quit: Leaving)
04:24:55krux02zachcarter, there is macros.getTypeImpl
04:25:01*krux02 quit (Quit: Leaving)
04:25:32zachcarterlemme check that out, thank you krux02!
05:17:31*chemist69 quit (Ping timeout: 258 seconds)
05:22:21*chemist69 joined #nim
05:35:18*demi- left #nim (" ")
05:37:25*vendethiel quit (Ping timeout: 260 seconds)
05:58:00*yglukhov joined #nim
06:02:46*yglukhov quit (Ping timeout: 264 seconds)
06:19:16*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:36:42*rauss quit (Quit: WeeChat 1.7)
07:02:15FromGitter<TiberiumPY> @Varriount small JSON, but http request takes like 0.2s
07:03:16*bjz joined #nim
07:23:06FromGitter<TiberiumPY> In this
07:23:18FromGitter<TiberiumPY> In this plugin I need
07:23:37FromGitter<TiberiumPY> To send two http requests
07:24:48*yglukhov joined #nim
07:24:57ldleworkTiberiumPY what are you working on btw
07:25:28*chemist69 quit (Ping timeout: 240 seconds)
07:27:57*chemist69 joined #nim
07:29:46FromGitter<TiberiumPY> Chat bot for social network :)
07:29:57FromGitter<TiberiumPY> Just with commands
07:34:52ldleworkTiberiumPY when you get bored of that you should join ftsf and I and make NimSynth with us
07:37:11*yglukhov quit (Remote host closed the connection)
07:49:46*yglukhov joined #nim
07:52:20FromGitter<TiberiumPY> By the way, what are the drawbacks of making like 20-30 threads, and each of them will do http requests?
07:53:41FromGitter<TiberiumPY> Will they block each other!
07:53:42FromGitter<TiberiumPY> ?
07:57:59*Trustable joined #nim
07:58:14FromGitter<Varriount> Thread contention
07:59:10FromGitter<Varriount> The threads all compete for their time slice. It's the same problem as having too many applications running at once
08:04:05FromGitter<TiberiumPY> I don't know what to do now, use async or threads
08:07:17FromGitter<Varriount> Have plugins execute in a single "plugin" thread. That way the main thread isn't stalled.
08:07:57FromGitter<Varriount> Use asynchronous logic on the main thread, and maybe the plugin thread if possible
08:13:02*Tiberium joined #nim
08:14:23FromGitter<TiberiumPY> But then, if one of my plugins will block, every other plugin will block too?
08:26:14ldleworkhttps://nim-lang.org/docs/
08:31:49FromGitter<TiberiumPY> Yeah, I know there's docs
08:32:16*shashlick quit (Ping timeout: 246 seconds)
08:33:07*shashlick joined #nim
08:33:47ldleworkHmm
08:33:59ldleworkI have some modules in a folder inside my package
08:34:20ldleworkdo they really have to do `import ../some_module` because only relative imports are supported?
08:34:34ldleworkWhich means these imports will break if the module is ever moved
08:34:39def-ldlework: you can add a nim.cfg
08:34:58ldleworkI mean, wouldn't a "path" like mechanism make this a little friendlier?
08:35:10ldleworkadding the path of the file to compile, but also where the compiler was invoked, and so on
08:35:28ldleworkala python
08:36:15ldleworkalright I see it
08:38:45ldleworkdef-: where is the docs for nim.cfg
08:39:03*Matthias247 joined #nim
08:40:00*nsf joined #nim
08:41:12ldleworkgot it working
08:41:13*yglukhov quit (Remote host closed the connection)
08:41:15ldleworknsf: you use nim?
08:42:09*yglukhov joined #nim
08:44:54*yglukhov quit (Remote host closed the connection)
08:53:20FromGitter<Varriount> @TiberiumPY Well, that's the trade-off
08:55:36FromGitter<Varriount> The best system I can think of is one where plugins tell the main program whether they should be put in the main thread, a shared plugin thread, or an isolated plugin thread.
09:06:51*scriptum joined #nim
09:17:16*yglukhov joined #nim
09:25:54*fastrom joined #nim
09:29:32*yglukhov quit (Remote host closed the connection)
09:33:55nsfldlework: no
09:34:59*reactormonk quit (Ping timeout: 268 seconds)
09:35:56FromGitter<TiberiumPY> @Varriount firstly I may experiment with all plugins in their own threads, and then maybe make a shared thread. ⏎ But what is the best to use for thread communication? only between main thread and plugin threads (not between plugins) ⏎ I want to pass an object, can I do that?
09:36:02FromGitter<TiberiumPY> or tuple, it'll fine too
09:43:03*yglukhov joined #nim
09:48:08FromGitter<dom96> @TiberiumPY i recommend sticking with async
09:48:30FromGitter<TiberiumPY> @dom96 but what I can do if one of my plugins block entire program?
09:48:48FromGitter<TiberiumPY> it does api request, then downloads photo, then sends photo via post, and then answers
09:48:54FromGitter<TiberiumPY> all via await/async
09:49:03FromGitter<TiberiumPY> but app is still freezing
09:49:10FromGitter<TiberiumPY> so other plugins can't process message
09:50:58FromGitter<dom96> I would say that that is the plugins problem
09:51:09ldleworkIn Nim is there a way to get the name of the folder the module is in?
09:51:20*yglukhov quit (Remote host closed the connection)
09:51:29FromGitter<dom96> But it shouldn't block if it's using async. So you must be doing something wrong.
09:51:47FromGitter<dom96> Ldlework: for what purpose?
09:51:49*yglukhov joined #nim
09:51:59FromGitter<TiberiumPY> yeah, I can even provide source code of this plugin
09:53:02ldleworkdom96, so I can relate the name into the user interface
09:53:19ldleworkdom96: for nimsynth, we have a bunch of categorized modules implementing daw instruments
09:53:29ldleworkit'd be nice to just divine their category
09:53:40ldleworkin the case they are moved, etc
09:54:04FromGitter<dom96> Hrm. Not sure.
09:54:22FromGitter<TiberiumPY> https://gist.github.com/TiberiumN/da141627a1c8195e7c4e0f45d8ed4223
09:56:01FromGitter<TiberiumPY> maybe because of global VkApi? I have only one instance of it in my bot, and I pass to all plugins if there's a command to them
10:00:03FromGitter<TiberiumPY> I don't know how to debug things like this
10:00:44FromGitter<TiberiumPY> I call `call` procedure using `await` too
10:02:38FromGitter<TiberiumPY> Basically this plugin gets message info using API call, then gets photo attachment from result of API call, downloads it to memory, and then sends to everypixel photo "quality" service
10:25:28FromGitter<dom96> Those nested try's. *shudder* :)
10:25:42FromGitter<dom96> That code looks fine to me.
10:25:58FromGitter<dom96> Why do you think it's blocking?
10:31:21Tiberiumdom96, because if I send command to this plugin, my app can't receive new events
10:31:40Tiberiumso when processing in this plugin done, it receives all new events
10:32:00Tiberium(I mean my main loop received all new events)
10:32:35FromGitter<dom96> Sounds like a logic bug
10:34:27Tiberiumso if I receive new event, I unpack event values, event type.. and if it's a new message, I do "await bot.processLpMessage(eventData)"
10:34:56Tiberiumin this proc I create new Message instance and do "await bot.api.answer(message, errorMessage)"
10:35:01Tiberiumah sorry, no
10:35:24TiberiumI do "let processResult = bot.processMessage(message)" and then "yield processResult" and I check if it failed
10:35:49Tiberiumand in processMessage I have big case statement, so if command == "quality", it calls this plugin
10:36:07Tiberiumall this proc's are async and all calls are await or yield for error checking
10:41:36*yglukhov quit (Remote host closed the connection)
10:42:10*yglukhov joined #nim
10:46:48*yglukhov quit (Ping timeout: 260 seconds)
10:57:05*vlad1777d joined #nim
11:06:47FromGitter<dom96> The way i would debug this would be by adding some echo calls around your code. That way you can verify that the control flow is correct.
11:12:05Tiberiumand what I can get by this echo calls? I don't really understand. ah, maybe it's blocking because I check if for "failed" property of future object?
11:13:36ldleworkHow do I get the keys of a table as a list?
11:15:34Tiberiumldlework, keys(table)
11:15:37Tiberiumit's an iterator
11:15:56Tiberiumyou can use toSeq(keys(table)) to get a sequence
11:16:15ldleworkhow do I sort that?
11:16:24Tiberiumsort?
11:16:45Tiberiumthere's many procs in sequtils
11:16:45Tiberiumhttps://nim-lang.org/docs/sequtils.html
11:16:59ldleworktype mismatch: got (seq[string])
11:17:01ldleworkbut expected one of:
11:17:03ldleworkproc sorted[T](a: openArray[T]
11:17:28ldleworknow what
11:17:41Tiberiumldlework, there's sort proc in tables module
11:18:44FromGitter<dom96> You can find out where it's blocking
11:19:00FromGitter<dom96> Echo("blah")
11:19:06FromGitter<dom96> Await foo()
11:19:15FromGitter<dom96> Echo("after await")
11:19:23Tiberiumah, you mean this
11:19:23Tiberiumok
11:19:30FromGitter<dom96> Yes :)
11:19:38ldleworkTiberium that's only for OrderedDict
11:19:43ldleworkhow do I sort a seq[string]
11:19:50ldleworkis it that sort wants me to provide a comparison function?
11:20:12FromGitter<dom96> Ldlework: yes
11:20:25FromGitter<dom96> You should look up some examoles
11:20:44FromGitter<dom96> There is probably a sort example on Rosetta code.
11:24:19Tiberiumdom96, it blocks exactly in this plugin
11:26:37Tiberiumwait, I have one idea. maybe use callbacks?
11:28:02Tiberiumah no
11:28:07Tiberiumyou can't use "await" in callback
11:30:45Tiberiumehm
11:31:07Tiberiumwhat can be the reason of compiler just stopping compilation?
11:31:09Tiberiumwithout any errors
11:31:16Tiberiumjust exists
11:31:17Tiberiumexits
11:31:26Tiberiumwith non-zero exit code
11:31:49Tiberiumexit code "1"
11:32:32Tiberiumah, nevermind
11:32:35Tiberiumforgot "await"
11:33:20Tiberiumok, it blocks on postContent
11:37:01Tiberiummaybe all my plugins are blocking and I just don't know it?
11:37:16Tiberiumhow to check if plugin can be blocking? just simplest example
11:49:25*bjz quit (Ping timeout: 268 seconds)
11:51:27*PMunch joined #nim
11:53:59*bjz joined #nim
12:01:16*nightmared joined #nim
12:09:55*zachcarter quit (Quit: zachcarter)
12:33:39*nightmared quit (Read error: Connection reset by peer)
12:36:16*nightmared joined #nim
12:37:53*rokups joined #nim
12:39:02*PMunch quit (Read error: Connection reset by peer)
12:39:43*PMunch joined #nim
12:45:52*yglukhov joined #nim
12:49:04*nightmared quit (Read error: Connection reset by peer)
12:50:29*yglukhov quit (Ping timeout: 260 seconds)
12:51:13*nightmared joined #nim
13:08:22Tiberiumhmm, for experiment I transferred my bot to threads - using "spawn" when calling plugin
13:08:33Tiberiumit works
13:08:49Tiberiumbut I can't use parseHtml since it's not gc safe :(
13:10:09*Matthias247 quit (Read error: Connection reset by peer)
13:24:14Tiberiumoh well
13:24:18Tiberiumnot all things are great
13:24:27TiberiumSIGPIPE: Pipe closed
13:24:31TiberiumWhat can cause this?
13:31:34*chemist69 quit (Ping timeout: 264 seconds)
13:35:41*chemist69 joined #nim
13:44:44*yglukhov joined #nim
13:48:24FromGitter<dom96> I don't understand how your plugin could be blocking.
13:48:35FromGitter<dom96> Are you absolutely sure?
13:50:38TiberiumI think yes
13:50:46*chemist69 quit (Ping timeout: 246 seconds)
13:50:51*dddddd joined #nim
13:52:49TiberiumSo maybe it's not my plugin, but because I yield processMessage (where I call plugins), and then check for error?
13:54:37*gangstacat joined #nim
13:57:31*couven92 joined #nim
14:03:34FromGitter<dom96> Nope.
14:03:45FromGitter<dom96> Did doing what I suggested not help you find the cause?
14:04:13FromGitter<dom96> Await and yield will result in the control being given to another async procedure.
14:04:27FromGitter<dom96> Are you using waitFor anywhere?
14:05:31Tiberiumno
14:06:05Tiberiumif I put echo everythere, it blocks in posting content to URL with form data
14:06:09Tiberiumin plugin
14:06:25Tiberium*with multipart data
14:08:27*chemist69 joined #nim
14:12:07FromGitter<dom96> Maybe you're using await or yield and that's the problem?
14:12:34FromGitter<dom96> They will both always pause the procedure they're in
14:12:41FromGitter<dom96> Until the future completes
14:13:35Tiberiumdom96, yeah that's probably the problem, I'm using await everywhere and yield in two places
14:14:41FromGitter<dom96> You need to run some async procs in the background.
14:14:56FromGitter<dom96> I guess. Use asyncCheck for that.
14:15:25Tiberiumyeah!!
14:15:28Tiberiumso I need to use "asyncCheck" ?
14:15:35Tiberiumok I'll try
14:16:27Tiberiumwait
14:16:28TiberiumIT WORKS
14:16:40Tiberiumdom96 big THANKS!!!
14:23:17FromGitter<dom96> Sure :)
14:23:24FromGitter<dom96> Glad it works
14:28:26Tiberiumdom96, ah, but would there be a way to catch an exception from asyncCheck?
14:29:27Tiberiumsure, I can catch them from plugins themselves, but if really something bad happens with plugin, whole app will crash
14:30:32FromGitter<dom96> Yes. Take a look at asyncCheck definition
14:32:09Tiberiumah, I tried to use code almost like asyncCheck def :)
14:36:40*yglukhov quit (Remote host closed the connection)
14:44:46FromGitter<gour> hello, how is Nim suitable for Python programmers, iow. I see there is nim-pymod (https://github.com/jboy/nim-pymod) for those wanting to use Nim from Python, but wonder if there is a way for vice versa - to take advantage of so many Python packages/libraries and use them from Nim?
14:46:01*yglukhov joined #nim
15:07:26Tiberiumdom96, I'm doing a big workaround, so: can I create a template so I can call it like "runCheck(bot, api, greeting)" where greeting is a module?
15:07:32Tiberiumor wait, let me try myself
15:08:20Tiberiumok, I failed
15:08:27Tiberiumor how to pass a proc to template
15:08:55Tiberiumso I have a proc "hello" and I will pass it to template like check(hello) and template would generate code like hello("user")
15:18:42*couven92 quit (Quit: Client Disconnecting)
15:29:45*couven92 joined #nim
15:55:29*rauss joined #nim
15:56:46*chemist69 quit (Ping timeout: 264 seconds)
15:59:15*chemist69 joined #nim
15:59:39*Ven joined #nim
16:00:03*Ven is now known as Guest13463
16:01:25*PMunch quit (Quit: leaving)
16:35:01Tiberiumdom96, sorry for being annoying, but can I schedule some async proc to execute like every 5 minutes?
16:38:11*Guest13463 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:39:07FromGitter<dom96> Use sleepAsync in a while loop
16:43:41*Tiberium quit (Remote host closed the connection)
16:53:53raussdom96: You had asked Gokr in his thread about whether his ardunimo lib works for AVR devices. Did you ever play with it? Just wondering as I was about to head down this path.
17:00:24*arnetheduck quit (Ping timeout: 260 seconds)
17:05:52FromGitter<dom96> Afraid not.
17:06:17FromGitter<dom96> I
17:06:40FromGitter<ephja> zah is back!
17:07:02FromGitter<ephja> it's good to see concept related fixes
17:07:19*Vladar joined #nim
17:22:19*libman joined #nim
17:52:52*lenstr quit (Ping timeout: 260 seconds)
17:53:50*niv quit (Ping timeout: 258 seconds)
17:54:11*LeNsTR joined #nim
17:55:23ehmry[m]dom96: can you estimate when the next release will be?
17:56:35*niv joined #nim
17:57:21FromGitter<dom96> Nope. It's been on the horizon for a while now.
17:57:29FromGitter<dom96> Ultimately it's up to Araq.
17:57:53*Matthias247 joined #nim
17:57:59ehmry[m]ok
17:58:00ehmry[m]np
18:01:22FromGitter<dom96> Anyone wanna write a bot army to advertise r/Nim on Reddit's r/place?
18:01:31*nsf quit (Quit: WeeChat 1.7)
18:03:20*dddddd quit (Remote host closed the connection)
18:05:34federico3dom96: I think that violates reddit rules
18:20:20VladarImportant announce, guys: https://forum.nim-lang.org/t/2897 https://www.reddit.com/r/nim/comments/62ugar/announcing_nimgame_3d/
18:26:52*vlad1777d quit (Read error: Connection reset by peer)
18:27:28FromGitter<ephja> hmmm. waiiiit a minute 樂
18:28:09FromGitter<ephja>
18:39:11*yglukhov quit (Remote host closed the connection)
18:39:46libman2D forevah!
18:41:47libmanOf course I haven't played a game since the mid-1990s. You kids go ahead with your fancy shmancy trigonometry. I'll just sit on the ash heap of history and knit.
18:48:33*yglukhov joined #nim
18:51:13*yglukhov quit (Remote host closed the connection)
18:51:47*yglukhov joined #nim
18:56:01*yglukhov quit (Ping timeout: 240 seconds)
18:56:12FromGitter<TiberiumPY> fools day btw
18:56:17FromGitter<TiberiumPY> https://www.reddit.com/r/nim/comments/62ugar/announcing_nimgame_3d/
19:06:38*Jesin quit (Quit: Leaving)
19:11:28*Jesin joined #nim
19:32:16*rokups quit (Quit: Connection closed for inactivity)
19:37:38*mjanssen quit (Quit: leaving)
19:39:41FromGitter<TiberiumPY> oh no
19:39:46FromGitter<TiberiumPY> I tested my bot on Windows
19:39:55FromGitter<TiberiumPY> and after some "spamming" of similar commands
19:40:04FromGitter<TiberiumPY> it just fully take 1 cpu to 100%
19:40:06FromGitter<TiberiumPY> and freezes
19:40:10FromGitter<TiberiumPY> ehh, debugging with VS2015
19:40:22FromGitter<TiberiumPY> I don't really know how to debug things like this :D
19:58:27*Trustable quit (Remote host closed the connection)
19:59:01FromGitter<Varriount> libman: I like the adventure games of the 1990s
19:59:49FromGitter<Varriount> @TiberiumPY Is your online code somewhere? We could try looking over it
19:59:58VladarI watch GDC classic game postmortems before I go to sleep
20:01:40*Xe is now known as dQw4w9WgXcQ
20:04:35FromGitter<hcorion> Hey, does anyone know how I can tell what size my uint's are? I'm programming for the GameBoy and it isn't as preferment as I'd want it to be
20:05:11Vladarhcorion: https://nim-lang.org/docs/system.html#sizeof,T
20:05:12*Ven joined #nim
20:05:36*Ven is now known as Guest36204
20:05:41FromGitter<hcorion> But how to tell without being able to print to console?
20:05:50FromGitter<TiberiumPY> @Varriount sure, but I have only russian comments in my app :)
20:05:59FromGitter<TiberiumPY> @Varriount
20:06:07FromGitter<TiberiumPY> @Varriount https://github.com/TiberiumN/Nickel
20:06:10Vladarhcorion: when-blocks mb?
20:06:34FromGitter<hcorion> Good idea
20:06:35FromGitter<TiberiumPY> but don't worry, this isn't a big problem for me now, as I do testing and developing on Linux mainly
20:07:22FromGitter<Varriount> @TiberiumPY Chrome is suggesting I run the page though translate
20:08:09libmanTiberiumPY: why GPL3?
20:08:37*cspar joined #nim
20:08:44FromGitter<Varriount> @TiberiumPY "Chat bot for VKontakte, written in Nim"
20:08:49FromGitter<TiberiumPY> yeah
20:09:02FromGitter<TiberiumPY> libman: mainly because there's big commercial interest for bots for vk.com :)
20:09:07FromGitter<TiberiumPY> what's wrong with gpl?
20:09:46libmanIt means many other people within the Nim community can't use your code, most often for purely philosophical reasons.
20:10:25FromGitter<TiberiumPY> I didn't knew that GPLv3 is bad
20:10:50libmanGPLv3 is 11 pages of legal threats no one really understands.
20:11:07FromGitter<Varriount> Well, it's not "bad" as such
20:11:11FromGitter<TiberiumPY> so I need to make it "MIT licensed" ?
20:11:43libmanUsing the MIT license (like Nim and the vast majority of nimble libraries) makes everything much easier for everyone.
20:11:43FromGitter<Varriount> It just makes using the code with other things difficult.
20:12:05libmanLots of MIT-equivalent licenses on http://copyfree.org/standard/licenses
20:12:19FromGitter<Varriount> GPL is good for applications, not so much for libraries
20:12:37FromGitter<TiberiumPY> and my project is an app
20:12:50FromGitter<TiberiumPY> I want to make a VK API library in future for Nim
20:13:11FromGitter<TiberiumPY> because you know, russian vk.com community isn't great
20:13:16FromGitter<TiberiumPY> they copy everything they can touch
20:13:21FromGitter<TiberiumPY> they don't care about licences
20:13:24*dQw4w9WgXcQ is now known as Xe
20:13:50libmanIt's less harmful with apps than libs, but it's still example Nim code made public but locked away behind legal threats.
20:14:07FromGitter<Varriount> However if an application uses GPL, it can't link to non-gpl libraries
20:14:18*libman was born in Moscow, Russia; lived in NJ, USA for past 25 years.
20:14:57XeTiberiumPY: do you have a bitcoin address?
20:15:06FromGitter<TiberiumPY> no, but I can
20:15:09Xei'll send you $20 in bitcoin if you relicense it to CC0
20:15:11libmanIf "bad guys" don't care about licenses, then why use licenses to hurt everybody else?
20:15:22FromGitter<TiberiumPY> CC0 ?
20:15:30FromGitter<TiberiumPY> I can do it :D
20:15:33XeCreative Commons Zero, effectively public domain
20:15:42libmanXe: https://en.wikipedia.org/wiki/Cobra_effect
20:16:48Xelibman: at the least there's not more GPL3 code
20:16:57FromGitter<Varriount> libman: Did you notice any interesting cultural shifts, moving from Russia to the US?
20:17:34libmanI was 10 years old. USSR just collapsed. It was like moving to a different universe. But that's #nim-offtopic.
20:18:55libmanIf license freedom zealots start paying people to s/GPL3/CC0/, it would be foolish for anyone to start with a free license.
20:19:27FromGitter<TiberiumPY> so mit is actually good enough?
20:20:15libmanBeyond a certain point, license choice becomes about culture signaling. Like ISC for OpenBSD folk.
20:20:31FromGitter<Varriount> ISC?
20:20:38FromGitter<TiberiumPY> I don't really contribute to open source projects
20:21:06FromGitter<TiberiumPY> I only have https://github.com/TiberiumN/VBot - basically same bot, but with more functionality (because I improved it like 3 months), and in Python
20:21:22libmanI haven't actually produced any useful code in years, but my most recent snippets used the Unlicense.
20:21:26FromGitter<TiberiumPY> so it's easier to learn a new language when you need to (re)write something that you know already
20:22:39FromGitter<TiberiumPY> and yeah, it's in GPL because I didn't knew that license to take
20:22:40libmanI don't want to pollute this channel with miniscule license differences. Anything approved by copyfree.org is a-OK. Nim and most Nimble packages use MIT.
20:24:23libman(At present 87.33% of nimble packages are copyfree - that's 76.697% MIT, 6.109% BSD, 2.489% CC0, 0.452% ISC, 1.357% other public domain.)
20:27:05FromGitter<TiberiumPY> I think my app isn't suitable for Nimble - it's an app, so it has it's own configuration, and no English language. ⏎ But in future I'll separate api wrapper and make it a standalone nimble library
20:27:22FromGitter<TiberiumPY> I just need to solve one bug in Nim before I can implement most of it :)
20:30:17libmanI was just using the Nimble numbers are a sampling. Open source software written in Nim is a part of the ecosystem, even if it's not a nimble module.
20:31:24libmanNow someone can san, whoop, a proc in libman's unlicensed project looks too similar to that GPLv3 proc, unleash the lawyers.
20:32:55*Nobabs27 joined #nim
20:33:12*Nobabs27 quit (Remote host closed the connection)
20:35:58FromGitter<TiberiumPY> as I can say, almost no-one use httpclient for user-like authorization on websites?
20:37:02*Vladar quit (Quit: Leaving)
20:39:10*Tiberium joined #nim
20:40:05FromGitter<TiberiumPY> ok, will dig into httpclient source :) ⏎ https://github.com/nim-lang/Nim/issues/5611
20:41:22*Nobabs27 joined #nim
20:48:38FromGitter<TiberiumPY> so nim's httpclient doesn' save cookies between redirects, and don't save multiple cookies (if they're set with multiple "set-cookie" headers)
20:51:15*demi- joined #nim
20:55:42demi-I'm writing some code that will spawn a new process with a custom configured env, this so far is all ok, but if i try to run any interactive programs this falls apart because i don't have access to the child's streams. I'd use `poParentStreams` but that option is hardcoded to be removed when running on posix systems. I'm trying to come up with ways to work around this and my current idea is that if i add some
20:55:44demi-async read/write to pipe the parent's input and output over to the child's then this might be able to work; however this seems not too easy to do directly, i'd have to create a FD to move this data around. i cannot seem to find any good examples of how to use the asyncdispatch module to get me started with this.
21:13:02FromGitter<TiberiumPY> Well, now I understand that httpclient is really low-level
21:13:46FromGitter<TiberiumPY> so if I add set-cookie check to "`[]=`*(headers: HttpHeaders, key, value: string) =" in httpcore, I'm able to store cookies and resend them to server manually (manually getting location for redirects)
21:14:17FromGitter<TiberiumPY> but I don't know if I made it correctly (I mean maybe there's no need for this check, and I need to implement it locally)
21:16:25*fastrom quit (Quit: Leaving.)
21:16:28FromGitter<TiberiumPY> https://github.com/nim-lang/Nim/issues/5611#issuecomment-290947742 ⏎ any thoughts?
21:21:45Tiberiumah np
21:21:50Tiberiumproblem isn't fixed :(
21:22:51cheatfatedemi-, try to use https://github.com/cheatfate/asynctools
21:23:06cheatfateyou will need 2 modules asyncpipe and asyncproc
21:25:07cheatfatedemi-, micro is decent editor, but for some reason i can't paste text to micro, through putty... :(
21:27:13Tiberiumah no
21:27:14Tiberiumit's fixed
21:28:51TiberiumI fixed it, but maybe in a wrong place :(
21:34:37*Tiberium quit (Remote host closed the connection)
21:40:56FromGitter<dom96> Nimble supports application packages too. Not just libraries.
21:41:08FromGitter<dom96> So you can definitely out your project there.
21:41:14FromGitter<dom96> *put
21:41:53*perturbation joined #nim
21:42:28ldleworkI miss ftsf :(
21:54:22*yglukhov joined #nim
21:58:27*yglukhov quit (Ping timeout: 240 seconds)
22:04:31demi-cheatfate: hmmm, idk; open an issue?
22:04:48demi-there has been some work around usage with screen/tmux recently
22:23:06*smt quit (Read error: Connection reset by peer)
22:24:25demi-cheatfate: how do I create the asyncpipe for stdin/stdout/stderr
23:01:04*libman quit (Quit: Connection closed for inactivity)
23:21:37*shashlick quit (Ping timeout: 246 seconds)
23:23:17*shashlick joined #nim
23:42:25*nsf joined #nim
23:57:16*yglukhov joined #nim