00:10:02 | FromGitter | <Varriount> Tiberium: Threads |
00:10:20 | FromGitter | <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:23 | FromGitter | <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:36 | FromGitter | <Varriount> @TiberiumPY I'd just go with threads. As long as you're willing to copy/pass messages, you'll be fine. |
00:45:35 | FromGitter | <TiberiumPY> Not just messages - I have one global API object. But maybe I can create separate one's |
00:46:55 | FromGitter | <TiberiumPY> So it will be fine if I create one thread per plugin? |
00:47:24 | FromGitter | <TiberiumPY> It would be like 15 threads, and in future it would be something like 30-40 |
00:52:39 | FromGitter | <Varriount> Why can't multiple plugins be in one thread? |
00:52:56 | FromGitter | <Varriount> Or have plugins state whether they are blocking or not. |
00:53:52 | FromGitter | <Varriount> `nonblocking`, `sharedBlocking`, `isolatedBlocking` |
00:56:13 | FromGitter | <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:17 | FromGitter | <TiberiumPY> And what would be if some thread would do long http request? |
01:03:22 | FromGitter | <TiberiumPY> Application will not block? |
01:05:46 | FromGitter | <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:03 | cheatfate | async is not very good for cpu intensive tasks, but for any tasks which depends on IO, it much better then threads |
01:23:12 | cheatfate | and async don't care about long http requests |
01:23:34 | cheatfate | because this is IO task |
01:24:00 | cheatfate | so it send request and continue to do other work, until data will arrive from server |
01:26:09 | * | chemist69 joined #nim |
01:36:33 | FromGitter | <TiberiumPY> It doesn't happen for me |
01:36:52 | * | bjz joined #nim |
01:37:55 | FromGitter | <TiberiumPY> I'm doing async request, then parsing it to JSON |
01:38:09 | FromGitter | <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:12 | FromGitter | <Varriount> @TiberiumPY How much JSON are you parsing? |
02:15:02 | zachcarter | what’s the cheapest form of string concatenation in nim? |
02:15:07 | zachcarter | strutils format? |
02:15:27 | zachcarter | I don’t even mean string concatenation really I just mean formatting a string - like combining string values |
02:15:34 | zachcarter | is format any cheaper than string & string |
02:24:25 | zachcarter | I’m guessing that’s the case |
02:24:35 | zachcarter | Varriount: can you confirm for me? |
02:25:50 | FromGitter | <Varriount> zachcarter: Depends. Do you need a brand new string, or can you mutate one? |
02:26:19 | zachcarter | generally a brand new string |
02:26:43 | FromGitter | <Varriount> Then `&` should do it. |
02:26:52 | zachcarter | awesome thank you |
02:56:09 | * | dddddd quit (Remote host closed the connection) |
03:05:28 | zachcarter | another question |
03:05:41 | zachcarter | is there a way to check if an object has a field of a certain type defined? |
03:05:57 | zachcarter | so like |
03:06:01 | zachcarter | type |
03:06:06 | zachcarter | foo = object |
03:06:13 | zachcarter | a:int |
03:06:20 | zachcarter | does foo have an int field? |
03:13:23 | * | chemist69 quit (Ping timeout: 256 seconds) |
03:40:22 | * | chemist69 joined #nim |
03:42:28 | zachcarter | Think I found a bug with the docu tool? |
03:43:30 | zachcarter | thttps://gist.github.com/zacharycarter/014270d712e1913ab7ebddf9b9035316 |
03:44:17 | zachcarter | nevermind… |
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:55 | krux02 | zachcarter, there is macros.getTypeImpl |
04:25:01 | * | krux02 quit (Quit: Leaving) |
04:25:32 | zachcarter | lemme 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:15 | FromGitter | <TiberiumPY> @Varriount small JSON, but http request takes like 0.2s |
07:03:16 | * | bjz joined #nim |
07:23:06 | FromGitter | <TiberiumPY> In this |
07:23:18 | FromGitter | <TiberiumPY> In this plugin I need |
07:23:37 | FromGitter | <TiberiumPY> To send two http requests |
07:24:48 | * | yglukhov joined #nim |
07:24:57 | ldlework | TiberiumPY what are you working on btw |
07:25:28 | * | chemist69 quit (Ping timeout: 240 seconds) |
07:27:57 | * | chemist69 joined #nim |
07:29:46 | FromGitter | <TiberiumPY> Chat bot for social network :) |
07:29:57 | FromGitter | <TiberiumPY> Just with commands |
07:34:52 | ldlework | TiberiumPY 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:20 | FromGitter | <TiberiumPY> By the way, what are the drawbacks of making like 20-30 threads, and each of them will do http requests? |
07:53:41 | FromGitter | <TiberiumPY> Will they block each other! |
07:53:42 | FromGitter | <TiberiumPY> ? |
07:57:59 | * | Trustable joined #nim |
07:58:14 | FromGitter | <Varriount> Thread contention |
07:59:10 | FromGitter | <Varriount> The threads all compete for their time slice. It's the same problem as having too many applications running at once |
08:04:05 | FromGitter | <TiberiumPY> I don't know what to do now, use async or threads |
08:07:17 | FromGitter | <Varriount> Have plugins execute in a single "plugin" thread. That way the main thread isn't stalled. |
08:07:57 | FromGitter | <Varriount> Use asynchronous logic on the main thread, and maybe the plugin thread if possible |
08:13:02 | * | Tiberium joined #nim |
08:14:23 | FromGitter | <TiberiumPY> But then, if one of my plugins will block, every other plugin will block too? |
08:26:14 | ldlework | https://nim-lang.org/docs/ |
08:31:49 | FromGitter | <TiberiumPY> Yeah, I know there's docs |
08:32:16 | * | shashlick quit (Ping timeout: 246 seconds) |
08:33:07 | * | shashlick joined #nim |
08:33:47 | ldlework | Hmm |
08:33:59 | ldlework | I have some modules in a folder inside my package |
08:34:20 | ldlework | do they really have to do `import ../some_module` because only relative imports are supported? |
08:34:34 | ldlework | Which means these imports will break if the module is ever moved |
08:34:39 | def- | ldlework: you can add a nim.cfg |
08:34:58 | ldlework | I mean, wouldn't a "path" like mechanism make this a little friendlier? |
08:35:10 | ldlework | adding the path of the file to compile, but also where the compiler was invoked, and so on |
08:35:28 | ldlework | ala python |
08:36:15 | ldlework | alright I see it |
08:38:45 | ldlework | def-: where is the docs for nim.cfg |
08:39:03 | * | Matthias247 joined #nim |
08:40:00 | * | nsf joined #nim |
08:41:12 | ldlework | got it working |
08:41:13 | * | yglukhov quit (Remote host closed the connection) |
08:41:15 | ldlework | nsf: you use nim? |
08:42:09 | * | yglukhov joined #nim |
08:44:54 | * | yglukhov quit (Remote host closed the connection) |
08:53:20 | FromGitter | <Varriount> @TiberiumPY Well, that's the trade-off |
08:55:36 | FromGitter | <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:55 | nsf | ldlework: no |
09:34:59 | * | reactormonk quit (Ping timeout: 268 seconds) |
09:35:56 | FromGitter | <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:02 | FromGitter | <TiberiumPY> or tuple, it'll fine too |
09:43:03 | * | yglukhov joined #nim |
09:48:08 | FromGitter | <dom96> @TiberiumPY i recommend sticking with async |
09:48:30 | FromGitter | <TiberiumPY> @dom96 but what I can do if one of my plugins block entire program? |
09:48:48 | FromGitter | <TiberiumPY> it does api request, then downloads photo, then sends photo via post, and then answers |
09:48:54 | FromGitter | <TiberiumPY> all via await/async |
09:49:03 | FromGitter | <TiberiumPY> but app is still freezing |
09:49:10 | FromGitter | <TiberiumPY> so other plugins can't process message |
09:50:58 | FromGitter | <dom96> I would say that that is the plugins problem |
09:51:09 | ldlework | In 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:29 | FromGitter | <dom96> But it shouldn't block if it's using async. So you must be doing something wrong. |
09:51:47 | FromGitter | <dom96> Ldlework: for what purpose? |
09:51:49 | * | yglukhov joined #nim |
09:51:59 | FromGitter | <TiberiumPY> yeah, I can even provide source code of this plugin |
09:53:02 | ldlework | dom96, so I can relate the name into the user interface |
09:53:19 | ldlework | dom96: for nimsynth, we have a bunch of categorized modules implementing daw instruments |
09:53:29 | ldlework | it'd be nice to just divine their category |
09:53:40 | ldlework | in the case they are moved, etc |
09:54:04 | FromGitter | <dom96> Hrm. Not sure. |
09:54:22 | FromGitter | <TiberiumPY> https://gist.github.com/TiberiumN/da141627a1c8195e7c4e0f45d8ed4223 |
09:56:01 | FromGitter | <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:03 | FromGitter | <TiberiumPY> I don't know how to debug things like this |
10:00:44 | FromGitter | <TiberiumPY> I call `call` procedure using `await` too |
10:02:38 | FromGitter | <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:28 | FromGitter | <dom96> Those nested try's. *shudder* :) |
10:25:42 | FromGitter | <dom96> That code looks fine to me. |
10:25:58 | FromGitter | <dom96> Why do you think it's blocking? |
10:31:21 | Tiberium | dom96, because if I send command to this plugin, my app can't receive new events |
10:31:40 | Tiberium | so when processing in this plugin done, it receives all new events |
10:32:00 | Tiberium | (I mean my main loop received all new events) |
10:32:35 | FromGitter | <dom96> Sounds like a logic bug |
10:34:27 | Tiberium | so 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:56 | Tiberium | in this proc I create new Message instance and do "await bot.api.answer(message, errorMessage)" |
10:35:01 | Tiberium | ah sorry, no |
10:35:24 | Tiberium | I do "let processResult = bot.processMessage(message)" and then "yield processResult" and I check if it failed |
10:35:49 | Tiberium | and in processMessage I have big case statement, so if command == "quality", it calls this plugin |
10:36:07 | Tiberium | all 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:47 | FromGitter | <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:05 | Tiberium | and 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:36 | ldlework | How do I get the keys of a table as a list? |
11:15:34 | Tiberium | ldlework, keys(table) |
11:15:37 | Tiberium | it's an iterator |
11:15:56 | Tiberium | you can use toSeq(keys(table)) to get a sequence |
11:16:15 | ldlework | how do I sort that? |
11:16:24 | Tiberium | sort? |
11:16:45 | Tiberium | there's many procs in sequtils |
11:16:45 | Tiberium | https://nim-lang.org/docs/sequtils.html |
11:16:59 | ldlework | type mismatch: got (seq[string]) |
11:17:01 | ldlework | but expected one of: |
11:17:03 | ldlework | proc sorted[T](a: openArray[T] |
11:17:28 | ldlework | now what |
11:17:41 | Tiberium | ldlework, there's sort proc in tables module |
11:18:44 | FromGitter | <dom96> You can find out where it's blocking |
11:19:00 | FromGitter | <dom96> Echo("blah") |
11:19:06 | FromGitter | <dom96> Await foo() |
11:19:15 | FromGitter | <dom96> Echo("after await") |
11:19:23 | Tiberium | ah, you mean this |
11:19:23 | Tiberium | ok |
11:19:30 | FromGitter | <dom96> Yes :) |
11:19:38 | ldlework | Tiberium that's only for OrderedDict |
11:19:43 | ldlework | how do I sort a seq[string] |
11:19:50 | ldlework | is it that sort wants me to provide a comparison function? |
11:20:12 | FromGitter | <dom96> Ldlework: yes |
11:20:25 | FromGitter | <dom96> You should look up some examoles |
11:20:44 | FromGitter | <dom96> There is probably a sort example on Rosetta code. |
11:24:19 | Tiberium | dom96, it blocks exactly in this plugin |
11:26:37 | Tiberium | wait, I have one idea. maybe use callbacks? |
11:28:02 | Tiberium | ah no |
11:28:07 | Tiberium | you can't use "await" in callback |
11:30:45 | Tiberium | ehm |
11:31:07 | Tiberium | what can be the reason of compiler just stopping compilation? |
11:31:09 | Tiberium | without any errors |
11:31:16 | Tiberium | just exists |
11:31:17 | Tiberium | exits |
11:31:26 | Tiberium | with non-zero exit code |
11:31:49 | Tiberium | exit code "1" |
11:32:32 | Tiberium | ah, nevermind |
11:32:35 | Tiberium | forgot "await" |
11:33:20 | Tiberium | ok, it blocks on postContent |
11:37:01 | Tiberium | maybe all my plugins are blocking and I just don't know it? |
11:37:16 | Tiberium | how 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:22 | Tiberium | hmm, for experiment I transferred my bot to threads - using "spawn" when calling plugin |
13:08:33 | Tiberium | it works |
13:08:49 | Tiberium | but I can't use parseHtml since it's not gc safe :( |
13:10:09 | * | Matthias247 quit (Read error: Connection reset by peer) |
13:24:14 | Tiberium | oh well |
13:24:18 | Tiberium | not all things are great |
13:24:27 | Tiberium | SIGPIPE: Pipe closed |
13:24:31 | Tiberium | What 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:24 | FromGitter | <dom96> I don't understand how your plugin could be blocking. |
13:48:35 | FromGitter | <dom96> Are you absolutely sure? |
13:50:38 | Tiberium | I think yes |
13:50:46 | * | chemist69 quit (Ping timeout: 246 seconds) |
13:50:51 | * | dddddd joined #nim |
13:52:49 | Tiberium | So 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:34 | FromGitter | <dom96> Nope. |
14:03:45 | FromGitter | <dom96> Did doing what I suggested not help you find the cause? |
14:04:13 | FromGitter | <dom96> Await and yield will result in the control being given to another async procedure. |
14:04:27 | FromGitter | <dom96> Are you using waitFor anywhere? |
14:05:31 | Tiberium | no |
14:06:05 | Tiberium | if I put echo everythere, it blocks in posting content to URL with form data |
14:06:09 | Tiberium | in plugin |
14:06:25 | Tiberium | *with multipart data |
14:08:27 | * | chemist69 joined #nim |
14:12:07 | FromGitter | <dom96> Maybe you're using await or yield and that's the problem? |
14:12:34 | FromGitter | <dom96> They will both always pause the procedure they're in |
14:12:41 | FromGitter | <dom96> Until the future completes |
14:13:35 | Tiberium | dom96, yeah that's probably the problem, I'm using await everywhere and yield in two places |
14:14:41 | FromGitter | <dom96> You need to run some async procs in the background. |
14:14:56 | FromGitter | <dom96> I guess. Use asyncCheck for that. |
14:15:25 | Tiberium | yeah!! |
14:15:28 | Tiberium | so I need to use "asyncCheck" ? |
14:15:35 | Tiberium | ok I'll try |
14:16:27 | Tiberium | wait |
14:16:28 | Tiberium | IT WORKS |
14:16:40 | Tiberium | dom96 big THANKS!!! |
14:23:17 | FromGitter | <dom96> Sure :) |
14:23:24 | FromGitter | <dom96> Glad it works |
14:28:26 | Tiberium | dom96, ah, but would there be a way to catch an exception from asyncCheck? |
14:29:27 | Tiberium | sure, I can catch them from plugins themselves, but if really something bad happens with plugin, whole app will crash |
14:30:32 | FromGitter | <dom96> Yes. Take a look at asyncCheck definition |
14:32:09 | Tiberium | ah, I tried to use code almost like asyncCheck def :) |
14:36:40 | * | yglukhov quit (Remote host closed the connection) |
14:44:46 | FromGitter | <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:26 | Tiberium | dom96, 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:32 | Tiberium | or wait, let me try myself |
15:08:20 | Tiberium | ok, I failed |
15:08:27 | Tiberium | or how to pass a proc to template |
15:08:55 | Tiberium | so 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:01 | Tiberium | dom96, 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:07 | FromGitter | <dom96> Use sleepAsync in a while loop |
16:43:41 | * | Tiberium quit (Remote host closed the connection) |
16:53:53 | rauss | dom96: 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:52 | FromGitter | <dom96> Afraid not. |
17:06:17 | FromGitter | <dom96> I |
17:06:40 | FromGitter | <ephja> zah is back! |
17:07:02 | FromGitter | <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:23 | ehmry[m] | dom96: can you estimate when the next release will be? |
17:56:35 | * | niv joined #nim |
17:57:21 | FromGitter | <dom96> Nope. It's been on the horizon for a while now. |
17:57:29 | FromGitter | <dom96> Ultimately it's up to Araq. |
17:57:53 | * | Matthias247 joined #nim |
17:57:59 | ehmry[m] | ok |
17:58:00 | ehmry[m] | np |
18:01:22 | FromGitter | <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:34 | federico3 | dom96: I think that violates reddit rules |
18:20:20 | Vladar | Important 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:28 | FromGitter | <ephja> hmmm. waiiiit a minute 樂 |
18:28:09 | FromGitter | <ephja> |
18:39:11 | * | yglukhov quit (Remote host closed the connection) |
18:39:46 | libman | 2D forevah! |
18:41:47 | libman | Of 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:12 | FromGitter | <TiberiumPY> fools day btw |
18:56:17 | FromGitter | <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:41 | FromGitter | <TiberiumPY> oh no |
19:39:46 | FromGitter | <TiberiumPY> I tested my bot on Windows |
19:39:55 | FromGitter | <TiberiumPY> and after some "spamming" of similar commands |
19:40:04 | FromGitter | <TiberiumPY> it just fully take 1 cpu to 100% |
19:40:06 | FromGitter | <TiberiumPY> and freezes |
19:40:10 | FromGitter | <TiberiumPY> ehh, debugging with VS2015 |
19:40:22 | FromGitter | <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:01 | FromGitter | <Varriount> libman: I like the adventure games of the 1990s |
19:59:49 | FromGitter | <Varriount> @TiberiumPY Is your online code somewhere? We could try looking over it |
19:59:58 | Vladar | I watch GDC classic game postmortems before I go to sleep |
20:01:40 | * | Xe is now known as dQw4w9WgXcQ |
20:04:35 | FromGitter | <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:11 | Vladar | hcorion: 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:41 | FromGitter | <hcorion> But how to tell without being able to print to console? |
20:05:50 | FromGitter | <TiberiumPY> @Varriount sure, but I have only russian comments in my app :) |
20:05:59 | FromGitter | <TiberiumPY> @Varriount |
20:06:07 | FromGitter | <TiberiumPY> @Varriount https://github.com/TiberiumN/Nickel |
20:06:10 | Vladar | hcorion: when-blocks mb? |
20:06:34 | FromGitter | <hcorion> Good idea |
20:06:35 | FromGitter | <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:22 | FromGitter | <Varriount> @TiberiumPY Chrome is suggesting I run the page though translate |
20:08:09 | libman | TiberiumPY: why GPL3? |
20:08:37 | * | cspar joined #nim |
20:08:44 | FromGitter | <Varriount> @TiberiumPY "Chat bot for VKontakte, written in Nim" |
20:08:49 | FromGitter | <TiberiumPY> yeah |
20:09:02 | FromGitter | <TiberiumPY> libman: mainly because there's big commercial interest for bots for vk.com :) |
20:09:07 | FromGitter | <TiberiumPY> what's wrong with gpl? |
20:09:46 | libman | It means many other people within the Nim community can't use your code, most often for purely philosophical reasons. |
20:10:25 | FromGitter | <TiberiumPY> I didn't knew that GPLv3 is bad |
20:10:50 | libman | GPLv3 is 11 pages of legal threats no one really understands. |
20:11:07 | FromGitter | <Varriount> Well, it's not "bad" as such |
20:11:11 | FromGitter | <TiberiumPY> so I need to make it "MIT licensed" ? |
20:11:43 | libman | Using the MIT license (like Nim and the vast majority of nimble libraries) makes everything much easier for everyone. |
20:11:43 | FromGitter | <Varriount> It just makes using the code with other things difficult. |
20:12:05 | libman | Lots of MIT-equivalent licenses on http://copyfree.org/standard/licenses |
20:12:19 | FromGitter | <Varriount> GPL is good for applications, not so much for libraries |
20:12:37 | FromGitter | <TiberiumPY> and my project is an app |
20:12:50 | FromGitter | <TiberiumPY> I want to make a VK API library in future for Nim |
20:13:11 | FromGitter | <TiberiumPY> because you know, russian vk.com community isn't great |
20:13:16 | FromGitter | <TiberiumPY> they copy everything they can touch |
20:13:21 | FromGitter | <TiberiumPY> they don't care about licences |
20:13:24 | * | dQw4w9WgXcQ is now known as Xe |
20:13:50 | libman | It's less harmful with apps than libs, but it's still example Nim code made public but locked away behind legal threats. |
20:14:07 | FromGitter | <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:57 | Xe | TiberiumPY: do you have a bitcoin address? |
20:15:06 | FromGitter | <TiberiumPY> no, but I can |
20:15:09 | Xe | i'll send you $20 in bitcoin if you relicense it to CC0 |
20:15:11 | libman | If "bad guys" don't care about licenses, then why use licenses to hurt everybody else? |
20:15:22 | FromGitter | <TiberiumPY> CC0 ? |
20:15:30 | FromGitter | <TiberiumPY> I can do it :D |
20:15:33 | Xe | Creative Commons Zero, effectively public domain |
20:15:42 | libman | Xe: https://en.wikipedia.org/wiki/Cobra_effect |
20:16:48 | Xe | libman: at the least there's not more GPL3 code |
20:16:57 | FromGitter | <Varriount> libman: Did you notice any interesting cultural shifts, moving from Russia to the US? |
20:17:34 | libman | I was 10 years old. USSR just collapsed. It was like moving to a different universe. But that's #nim-offtopic. |
20:18:55 | libman | If license freedom zealots start paying people to s/GPL3/CC0/, it would be foolish for anyone to start with a free license. |
20:19:27 | FromGitter | <TiberiumPY> so mit is actually good enough? |
20:20:15 | libman | Beyond a certain point, license choice becomes about culture signaling. Like ISC for OpenBSD folk. |
20:20:31 | FromGitter | <Varriount> ISC? |
20:20:38 | FromGitter | <TiberiumPY> I don't really contribute to open source projects |
20:21:06 | FromGitter | <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:22 | libman | I haven't actually produced any useful code in years, but my most recent snippets used the Unlicense. |
20:21:26 | FromGitter | <TiberiumPY> so it's easier to learn a new language when you need to (re)write something that you know already |
20:22:39 | FromGitter | <TiberiumPY> and yeah, it's in GPL because I didn't knew that license to take |
20:22:40 | libman | I 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:23 | libman | (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:05 | FromGitter | <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:22 | FromGitter | <TiberiumPY> I just need to solve one bug in Nim before I can implement most of it :) |
20:30:17 | libman | I 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:24 | libman | Now 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:58 | FromGitter | <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:05 | FromGitter | <TiberiumPY> ok, will dig into httpclient source :) ⏎ https://github.com/nim-lang/Nim/issues/5611 |
20:41:22 | * | Nobabs27 joined #nim |
20:48:38 | FromGitter | <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:42 | demi- | 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:44 | demi- | 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:02 | FromGitter | <TiberiumPY> Well, now I understand that httpclient is really low-level |
21:13:46 | FromGitter | <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:17 | FromGitter | <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:28 | FromGitter | <TiberiumPY> https://github.com/nim-lang/Nim/issues/5611#issuecomment-290947742 ⏎ any thoughts? |
21:21:45 | Tiberium | ah np |
21:21:50 | Tiberium | problem isn't fixed :( |
21:22:51 | cheatfate | demi-, try to use https://github.com/cheatfate/asynctools |
21:23:06 | cheatfate | you will need 2 modules asyncpipe and asyncproc |
21:25:07 | cheatfate | demi-, micro is decent editor, but for some reason i can't paste text to micro, through putty... :( |
21:27:13 | Tiberium | ah no |
21:27:14 | Tiberium | it's fixed |
21:28:51 | Tiberium | I fixed it, but maybe in a wrong place :( |
21:34:37 | * | Tiberium quit (Remote host closed the connection) |
21:40:56 | FromGitter | <dom96> Nimble supports application packages too. Not just libraries. |
21:41:08 | FromGitter | <dom96> So you can definitely out your project there. |
21:41:14 | FromGitter | <dom96> *put |
21:41:53 | * | perturbation joined #nim |
21:42:28 | ldlework | I miss ftsf :( |
21:54:22 | * | yglukhov joined #nim |
21:58:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:04:31 | demi- | cheatfate: hmmm, idk; open an issue? |
22:04:48 | demi- | there has been some work around usage with screen/tmux recently |
22:23:06 | * | smt quit (Read error: Connection reset by peer) |
22:24:25 | demi- | 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 |