00:00:46 | * | zachcarter quit (Quit: zachcarter) |
00:01:27 | * | jsgrant__ quit (Ping timeout: 245 seconds) |
00:02:31 | * | zachcarter joined #nim |
00:14:54 | zachcarter | is the video on http://fragworks.io for the physics section a bad idea? |
00:27:27 | * | jackkv quit (Quit: ZNC - 1.6.0 - http://znc.in) |
00:29:56 | * | bjz joined #nim |
00:31:02 | * | tigerfinch left #nim (#nim) |
00:33:59 | * | brson joined #nim |
00:49:50 | * | brson quit (Quit: leaving) |
00:50:21 | * | arnetheduck joined #nim |
00:53:45 | * | jsgrant__ joined #nim |
01:12:35 | * | chemist69_ quit (Ping timeout: 260 seconds) |
01:22:09 | * | Amun_Ra quit (Remote host closed the connection) |
01:22:09 | * | ekarlso_ quit (Read error: Connection reset by peer) |
01:23:02 | * | fold4 quit (Read error: Connection reset by peer) |
01:26:15 | * | chemist69 joined #nim |
01:38:07 | * | jsgrant__ quit (Ping timeout: 240 seconds) |
01:39:06 | * | jsgrant- joined #nim |
01:45:06 | * | yglukhov joined #nim |
01:45:23 | * | BennyElg quit (Ping timeout: 240 seconds) |
01:45:28 | * | BennyElg_ joined #nim |
01:48:40 | * | vlad1777d quit (Quit: Leaving) |
01:49:23 | * | yglukhov quit (Ping timeout: 240 seconds) |
02:01:24 | * | BennyElg_ quit (Ping timeout: 240 seconds) |
02:02:29 | rauss | No, it looks good |
02:02:32 | * | BennyElg joined #nim |
02:08:52 | * | BennyElg quit (Ping timeout: 260 seconds) |
02:09:13 | * | BennyElg joined #nim |
02:15:39 | * | BennyElg_ joined #nim |
02:17:08 | * | BennyElg quit (Ping timeout: 268 seconds) |
02:17:55 | FromGitter | <zacharycarter> Varriount: not at all, sorry I missed your IM |
02:21:01 | * | couven92 joined #nim |
02:21:38 | couven92 | Rise and shine everybody! (For those of you in Europe at least...) :) |
02:25:20 | zachcarter | couven92: what do you think? |
02:25:24 | zachcarter | http://fragworks.io |
02:26:38 | couven92 | zachcarter, from the logo on the homepage page I'm inclined to say that my first impression "blows me away"... |
02:26:59 | zachcarter | :D |
02:27:01 | * | federico3 quit (Ping timeout: 240 seconds) |
02:28:47 | zachcarter | still lots of work to do on it but I’m glad you like it |
02:29:05 | couven92 | zachcarter, fro some the reason the 32/64 numbers in "32-bit" and "64-bit" on http://fragworks.io/documentation/index/ appear in a really large non monospace font on my end. Which is very strange to look at since the rest is in monospace araound it |
02:29:23 | zachcarter | ah yeah the only page I’ve done work on so far is the homepage |
02:29:32 | zachcarter | the rest of the pages are very not working yet |
02:30:19 | couven92 | ah, okay :) My browser also complains about not finding any of the referenced sass files |
02:30:37 | * | BennyElg_ quit (Ping timeout: 240 seconds) |
02:30:52 | zachcarter | ugh yeah I need to fix that too I don’t know why it’s complaining about sass files |
02:31:05 | * | BennyElg joined #nim |
02:33:28 | couven92 | but the idea of a Game framework for Nim sound nice! Though, I personally am really not into GameDev at all... :P |
02:33:49 | zachcarter | haha well still glad you think so |
02:35:26 | couven92 | But it's impressive for Nim that it is able to run on so many platforms, and thus that we are able to even make Game frameworks for all those platforms... PMunch has told me about doing SDL stuff on Android in Nim, he's always very excited about that :D |
02:37:37 | zachcarter | yup! |
03:09:14 | jackv | One of Nim's design goals is to be game-friendly, is it not? At least an implicit one? |
03:16:25 | zachcarter | jackv: Yes - garbage collection can be tuned for soft realtime systems such as games |
03:18:53 | zachcarter | jackv: are you interested in game dev w/ Nim? |
03:18:58 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
03:24:37 | jackv | zachcarter: not particularly, although fragworks looks pretty awesome :) |
03:24:49 | zachcarter | jackv: thank you! |
03:35:12 | * | BennyElg quit (Ping timeout: 245 seconds) |
03:35:17 | * | BennyElg_ joined #nim |
03:53:59 | * | bjz joined #nim |
03:54:21 | * | BennyElg joined #nim |
03:54:33 | * | BennyElg_ quit (Ping timeout: 246 seconds) |
04:02:24 | * | BennyElg quit (Ping timeout: 240 seconds) |
04:03:26 | * | BennyElg joined #nim |
04:27:15 | * | yglukhov joined #nim |
04:29:10 | * | zachcarter quit (Quit: zachcarter) |
04:30:16 | * | BennyElg quit (Remote host closed the connection) |
04:31:31 | * | yglukhov quit (Ping timeout: 240 seconds) |
04:46:46 | * | couven92 quit (Quit: Client Disconnecting) |
05:01:34 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:29:12 | * | BennyElg joined #nim |
05:31:52 | * | chemist69 quit (Ping timeout: 260 seconds) |
05:35:52 | * | chemist69 joined #nim |
05:47:56 | * | rauss quit (Quit: WeeChat 1.7.1) |
06:09:06 | * | arnetheduck quit (Ping timeout: 240 seconds) |
06:14:37 | * | BennyElg quit (Remote host closed the connection) |
06:24:36 | * | rokups joined #nim |
06:43:57 | * | BennyElg joined #nim |
06:46:23 | * | BennyElg quit (Read error: Connection reset by peer) |
06:46:44 | * | BennyElg joined #nim |
07:09:34 | * | yglukhov joined #nim |
07:13:55 | * | yglukhov quit (Ping timeout: 240 seconds) |
07:24:32 | * | nsf joined #nim |
07:34:56 | BennyElg | I would like to create a web project game but I still have much to learn on nim before |
07:37:27 | * | gatmac quit (Remote host closed the connection) |
08:14:02 | * | Amun_Ra joined #nim |
08:27:55 | * | SusWombat quit (Ping timeout: 240 seconds) |
08:32:04 | * | chemist69 quit (Ping timeout: 240 seconds) |
08:47:25 | * | arnetheduck joined #nim |
08:50:26 | * | chemist69 joined #nim |
09:10:30 | * | vlad1777d joined #nim |
09:14:25 | * | Matthias247 joined #nim |
09:29:36 | * | nsf quit (Quit: WeeChat 1.7.1) |
09:57:12 | * | byte512 quit (Quit: Bye.) |
10:01:56 | * | byte512 joined #nim |
10:16:01 | * | couven92 joined #nim |
10:31:21 | * | Sembei quit (Remote host closed the connection) |
10:35:25 | * | onionhammer quit (Ping timeout: 240 seconds) |
10:40:26 | * | zachcarter joined #nim |
10:40:44 | zachcarter | o/ |
10:42:45 | * | bjz_ joined #nim |
10:44:04 | * | bjz quit (Ping timeout: 240 seconds) |
11:02:11 | * | Snircle joined #nim |
11:03:44 | * | cspar__ joined #nim |
11:06:24 | * | cspar_ quit (Ping timeout: 240 seconds) |
11:11:01 | * | Arrrr joined #nim |
11:14:21 | FromGitter | <TiberiumN> How does json module handle nulls? |
11:14:38 | FromGitter | <TiberiumN> Raise an error? |
11:21:06 | BennyElg | What do u mean nulls? |
11:21:16 | BennyElg | like this? """{"hello": "1", "world": "" }""" |
11:21:26 | BennyElg | it will just return empty string. |
11:23:10 | BennyElg | import json |
11:23:10 | BennyElg | var jsonData: JsonNode |
11:23:10 | BennyElg | jsonData = json.parseJson("""{"hello": "1", "world": null }""") |
11:23:12 | BennyElg | echo(jsonData["world"].kind) ##JNull |
11:32:37 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:36:31 | * | Tiberium joined #nim |
11:42:17 | * | rokups quit (Quit: Connection closed for inactivity) |
11:44:23 | * | couven92 quit (Ping timeout: 240 seconds) |
11:58:39 | Tiberium | hmm, I forgot, what's the proc it is: someProc(x+y) echoes "x+y = " & $(x+y) |
11:58:43 | Tiberium | is it available in runtime? |
12:24:55 | FromGitter | <Varriount> Tibrerium: sounds like something from the macros module |
12:26:15 | Tiberium | ah, I just thought I can use it at runtime :) yes, thanks, found it |
12:27:10 | Tiberium | ah no |
12:27:13 | Tiberium | I'm mistaken |
12:27:21 | Tiberium | https://nim-lang.org/docs/future.html#dump.m,typed |
12:28:43 | BennyElg | what is the easiest way to initialize seq from [1..100] |
12:29:00 | * | odc quit (Remote host closed the connection) |
12:29:00 | * | euantor quit (Remote host closed the connection) |
12:30:09 | Tiberium | BennyElg, probably https://nim-lang.org/docs/sequtils.html#repeat,T,Natural |
12:30:16 | Tiberium | ah no |
12:31:20 | Tiberium | BennyElg, import sequtils; let data = toSeq(countup(1, 100)) |
12:31:27 | Tiberium | maybe there's a better way though |
12:31:38 | Tiberium | so countup is an iterator, and toSeq transforms any iterator into sequence |
12:31:53 | Tiberium | BennyElg, https://nim-lang.org/docs/sequtils.html#toSeq.t,untyped |
12:32:19 | BennyElg | Thanks, this is what I needed. |
12:33:13 | Tiberium | BennyElg, you can make it constant if you're not modifying it |
12:33:28 | BennyElg | Yea :) |
12:34:51 | zachcarter | does anyone know how to submit a project to nimble? |
12:34:56 | zachcarter | I need to get frag on nimble I think |
12:36:10 | dom96 | zachcarter: just create a PR on the packages repo |
12:36:20 | zachcarter | alright thanks |
12:36:23 | dom96 | you can even use ``nimble publish`` to do that more automatically |
12:36:35 | zachcarter | just found that out :P doing that now |
12:37:10 | * | nsf joined #nim |
12:46:42 | * | euantor joined #nim |
12:47:47 | * | odc joined #nim |
13:00:58 | * | federico3 joined #nim |
13:03:27 | Tiberium | dom96, about my crash - it seems that doing a hack - initializing newAsyncHttpClient() on every long polling request fixes the problem lol |
13:03:46 | Tiberium | (however I'll keep it running for two hours to see if it crashes) |
13:04:03 | Tiberium | maybe it can be some memory corruption? |
13:05:33 | Tiberium | also it seems that newAsyncHttpClient is pretty fast - in release mode 1 million calls in second |
13:10:05 | * | TheLemonMan joined #nim |
13:15:18 | BennyElg | Nice |
13:16:23 | demi- | Tiberium: if you use ASAN, you might be able to work that out |
13:16:35 | Tiberium | demi-, what is ASAN? |
13:17:12 | demi- | http://clang.llvm.org/docs/AddressSanitizer.html |
13:18:11 | demi- | i wrote up a blog on how to use this with nim: https://pewpewthespells.com/blog/using-sanitizers-with-nim.html |
13:20:44 | * | Arrrr quit (Ping timeout: 240 seconds) |
13:21:53 | zachcarter | I need to start poaching users from libgdx |
13:21:56 | zachcarter | :P |
13:22:22 | Tiberium | demi-, but how to use it on linux? |
13:23:36 | demi- | Tiberium: you would have to use clang instead of gcc as the compiler, pass the flags i mentioned, and that should be it |
13:24:04 | demi- | idk what the tooling packages on linux look like though, that might come with llvm+clang, or it might not |
13:24:08 | Tiberium | demi-, I'm a bit confused because "-lclang_rt.tsan_osx_dynamic" there's osx |
13:24:18 | Tiberium | demi-, I have llvm and clang installed anyway :) |
13:24:32 | demi- | that is linking the OS X library, you would find your own .so |
13:24:54 | demi- | presumably `-lclang_rt.asan_linux_dynamic` |
13:25:01 | Tiberium | demi-, nope |
13:25:32 | demi- | it might not be part of the default package, as it is additional tooling beyond the basic compiler |
13:26:35 | Tiberium | demi-, there's no results for "lclang_rt.asan_linux_dynamic" in google so I think I need to find another name |
13:27:11 | Tiberium | demi-, ah wait |
13:27:29 | Tiberium | demi-, ah, no, I thought my nim.cfg would overwrite it |
13:28:16 | demi- | it might not be literally "clang_rt.asan_linux_dynamic", it is probably "clang_rt.asan<something>" |
13:28:31 | demi- | the `-l` is the flag |
13:30:56 | Tiberium | demi-, ah, clang is C++ only compiler or C too? |
13:31:14 | demi- | both |
13:31:17 | demi- | clang and clang++ |
13:32:05 | Tiberium | demi-, ok, and nim uses default "/usr/bin/ld" should I change this too? |
13:32:30 | demi- | no, that is your linker |
13:32:54 | Tiberium | demi-, it's GNU ld |
13:33:17 | demi- | a linker is a linker |
13:34:19 | * | couven92 joined #nim |
13:52:09 | Tiberium | demi-, yay I got it compiled |
13:52:35 | Tiberium | demi-, and got it running with LD_PRELOAD |
13:52:48 | Tiberium | demi-, so if something bad happens I'll see some output? |
13:53:02 | demi- | yeah, you should see a bunch of output when you run it |
13:53:21 | Tiberium | demi-, I don't see anything after start, just usual output of my app |
13:53:38 | Tiberium | no asan output after start. maybe you mean after error happens? |
13:53:57 | * | PMunch joined #nim |
13:55:28 | Tiberium | demi-, ah it works |
13:55:48 | Tiberium | demi-, (I tried to add ASAN_OPTIONS="verbosity=1" and yes, there's some output after start) |
13:56:08 | demi- | |
13:56:13 | Tiberium | ==20863==AddressSanitizer Init done |
13:58:03 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:58:38 | demi- | if you have any memory corruption, that will detect it |
13:59:07 | Tiberium | demi-, I hope it's memory corruption, because otherwise it would be very hard to spot a bug in my bot or stdlib |
14:03:30 | * | bjz joined #nim |
14:03:47 | Tiberium | demi-, oh, it seems this is not a memory corruption |
14:03:54 | Tiberium | so something is bad in nim world |
14:04:00 | Tiberium | I mean either in stdlib or in my app |
14:04:23 | Tiberium | (but if it's a bug in my app, how can moving http client initialization to every cycle of the loop fix the problem?) |
14:06:35 | demi- | is it possible to initialize an object to nil |
14:06:56 | Tiberium | demi-, OH SIHT |
14:06:57 | Tiberium | SHIT |
14:07:12 | demi- | ? |
14:07:39 | Tiberium | demi-, ah, nothing serious :) just my console got spammed by clang |
14:07:57 | Tiberium | firstly "SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s)." yeah, it's a memory leak in my C library wrapper, but it's not the main problem |
14:07:57 | demi- | yeah, that might be a memory thing |
14:08:34 | Tiberium | demi-, and now my console is filled with spam |
14:08:57 | FromGitter | <TiberiumN> (https://files.gitter.im/nim-lang/Nim/f6DF/image.png) |
14:09:02 | FromGitter | <TiberiumN> it keeps logging lol |
14:09:14 | demi- | yeah, it logs a lot |
14:09:23 | FromGitter | <TiberiumN> it's endless loop? |
14:09:38 | dom96 | How does your bot crash? |
14:09:42 | dom96 | what trace back does it output? |
14:10:13 | Tiberium | dom96, as usual, let me find it in irc logs maybe |
14:11:14 | * | xet7 joined #nim |
14:11:26 | Tiberium | dom96, ah, can't find it, will do it again |
14:14:49 | * | rokups joined #nim |
14:17:19 | * | TheLemonMan quit (Remote host closed the connection) |
14:18:28 | Tiberium | dom96, https://gist.github.com/TiberiumN/5d0ce8c61a5fc668062bcbeb32b81739 |
14:19:31 | Tiberium | dom96, it doesn't happen if, instead of using one http client and calling getContent in it every loop, I initialize new http client on every loop iteration |
14:19:36 | PMunch | Can I create a concept of a type that has a function taking certain parameters without really returning anything? |
14:19:42 | Tiberium | *every iteration, not every loop |
14:20:44 | Tiberium | dom96, I'll try to do it with usual HttpClient, not async |
14:21:44 | dom96 | weird, but yeah, try that. If it also happens for HttpClient you can rule out memory corruption |
14:21:59 | dom96 | Based on that error I think memory corruption is unlikely though |
14:22:08 | dom96 | More likely a logic bug in httpclient |
14:22:49 | Tiberium | dom96, also if it happens in not async http client, we can get better traceback :) |
14:23:41 | dom96 | true |
14:34:46 | Tiberium | dom96, ok, it still happens with non-async http client, but I didn't capture the traceback :( re-running it right now |
14:35:47 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:36:58 | * | BennyElg quit (Remote host closed the connection) |
14:40:04 | * | jsgrant- quit (Ping timeout: 240 seconds) |
14:40:34 | PMunch | Hmm, in the concepts documentation they show a concept with x and y named Comparable. How would you pass in a Comparable to a procedure? |
14:42:55 | PMunch | Basically what I want is to write a Scene graph system. I have multiple things that have a render function on the form "render(renderer: RendererPtr, objectToBeRendered, x, y: cint)" I want to write a concept for all such functions so I can place them |
14:43:15 | Tiberium | dom96, https://gist.github.com/TiberiumN/09b191843ad4cdeb186d7dce392db877 , there's still async because my app is async |
14:43:22 | Tiberium | ProtocolError lol |
14:46:18 | Tiberium | dom96, I'm using getContent |
14:46:22 | FromGitter | <Varriount> PMunch: Keep in mind that (for now) concepts are like very fancy generics |
14:46:57 | PMunch | Yeah I know, but wouldn't what I describe work with them? |
14:48:18 | PMunch | Hmm, on second thought I think it could be a better idea to take in a rendering function instead.. |
14:48:49 | FromGitter | <Varriount> Callbacks are always a good mechanism. |
15:01:00 | dom96 | Tiberium: The best way to investigate this is probably to add some code to echo what httpclient sends to the server and what the server sends back. |
15:01:13 | dom96 | The traceback doesn't really show much |
15:03:22 | * | BennyElg joined #nim |
15:12:23 | * | xet7 quit (Remote host closed the connection) |
15:30:38 | * | BennyElg quit (Remote host closed the connection) |
15:38:33 | * | Trustable joined #nim |
15:39:46 | * | jsgrant-_ joined #nim |
15:45:55 | * | jsgrant-_ quit (Ping timeout: 240 seconds) |
15:51:36 | * | zachcarter quit (Quit: zachcarter) |
15:58:22 | * | jsgrant-_ joined #nim |
16:02:07 | * | onionhammer joined #nim |
16:03:29 | * | Vladar joined #nim |
16:08:35 | Tiberium | dom96, I don't really know - httpclient sends normal headers, and server sends normal answer but after one request server just sends "" back |
16:08:45 | Tiberium | (after 10-20 minutes) |
16:09:00 | Tiberium | with creating new client instance on every iteration everything is good... |
16:13:02 | * | BennyElg joined #nim |
16:13:31 | * | nightmared quit (Quit: WeeChat 1.7.1) |
16:15:33 | Tiberium | dom96, maybe for now I'll stick with this approach |
16:16:21 | * | nightmared joined #nim |
16:16:30 | * | nightmared quit (Client Quit) |
16:17:04 | dom96 | after exactly one request? |
16:17:20 | dom96 | so basically it cannot do multiple requests? |
16:17:28 | Tiberium | dom96, no |
16:17:33 | Tiberium | it crashes after 20-30 minutes |
16:18:00 | * | couven92 quit (Ping timeout: 255 seconds) |
16:20:10 | FromGitter | <TiberiumN> Ah, maybe I'll just create new http instance if old crashes |
16:20:56 | * | nightmared joined #nim |
16:20:59 | * | jsgrant-_ quit (Remote host closed the connection) |
16:37:10 | * | PMunch quit (Quit: leaving) |
16:46:11 | Tiberium | dom96, is there any downsides of creating asynchttpclient for example, for every API request? |
16:46:20 | Tiberium | or using global one would be safe? |
16:46:32 | Tiberium | (using one thread with async) |
16:48:47 | * | TheLemonMan joined #nim |
17:01:19 | dom96 | it's less efficient because you'll be allocating memory all the time |
17:01:34 | dom96 | using a global one would have the same problems |
17:01:59 | Tiberium | dom96, then what I need to do? |
17:04:29 | dom96 | just create a new async http client instance, it should be fine for your purposes |
17:05:19 | Tiberium | dom96, I mean I have separate http clients for api and long polling, and for api requests I'm creating a new async http client instance for every api request |
17:10:00 | * | chemist69 quit (Ping timeout: 260 seconds) |
17:11:58 | * | chemist69 joined #nim |
17:22:08 | * | chemist69 quit (Ping timeout: 260 seconds) |
17:31:45 | * | couven92 joined #nim |
17:40:10 | * | chemist69 joined #nim |
17:42:17 | * | rokups quit (Quit: Connection closed for inactivity) |
17:51:44 | demi- | is there a way i could apply pragmas to the entire scope of a file, like i'm writing a wrapper and everything in a particular file maps to the contents of the C++ header file, can i just write that once per file or do i have to do it on every declaration? |
17:53:09 | Tiberium | demi-, yes, I think you can |
17:53:23 | Tiberium | demi-, I might be mistaken, but try {.push yourpragma.} at the start of the file |
18:04:04 | * | Sentreen quit (Ping timeout: 240 seconds) |
18:04:13 | * | Jesin joined #nim |
18:04:32 | pydsigner | demi-: https://github.com/nim-lang/sdl2/blob/22af92679448b14e0fbe3775ca8cd6ada5e997a6/src/sdl2/ttf.nim#L38 |
18:06:42 | Tiberium | yep I was right :) |
18:06:47 | demi- | pydsigner: thank you, this is fantastic |
18:08:37 | pydsigner | I remembered seeing it after what Tiberium said |
18:16:35 | * | NimBot joined #nim |
18:17:14 | * | Sentreen joined #nim |
18:19:29 | * | nsf quit (Quit: WeeChat 1.7.1) |
18:25:22 | * | xet7 joined #nim |
18:27:12 | * | _yeeve quit (Ping timeout: 240 seconds) |
18:29:39 | BennyElg | hey |
18:29:45 | BennyElg | How Do I iterate fastRows till I have rows |
18:34:45 | * | _yeeve joined #nim |
18:38:38 | * | _yeeve quit (Max SendQ exceeded) |
18:38:39 | BennyElg | I get this when I try to iterate over rows using rows |
18:38:41 | BennyElg | rror: unhandled exception: Commands out of sync; you can't run this command now [DbError] |
18:40:16 | Tiberium | how to get current file name at compile time? for example I want my log to have the name of file where logging proc was called |
18:42:33 | Tiberium | ah, nvm, splitting currentSourcePath would be fine |
18:42:52 | demi- | https://nim-lang.org/docs/system.html#instantiationInfo, |
18:43:41 | Tiberium | demi-, yeah, there's also a "currentSourcePath()" shortcut |
19:01:16 | * | Matthias247 joined #nim |
19:02:51 | * | mal``` quit (Quit: Leaving) |
19:06:20 | * | Vladar quit (Remote host closed the connection) |
19:12:34 | * | mal`` joined #nim |
19:20:25 | * | deviance_ joined #nim |
19:22:04 | * | deviance_ quit (Quit: deviance_) |
19:22:16 | * | nightmared quit (Quit: WeeChat 1.7.1) |
19:22:36 | * | nightmared joined #nim |
19:49:18 | * | krux02 joined #nim |
20:03:28 | * | nsf joined #nim |
20:12:49 | * | couven92 quit (Ping timeout: 255 seconds) |
20:13:08 | * | devted joined #nim |
20:34:44 | * | zachcarter joined #nim |
20:35:08 | * | couven92 joined #nim |
20:44:41 | subsetpark | So I've been using readLineFromStdin to accept user input - but when I try to pipe text into my binary, the result is always `nil`. What am I doing wrong? |
20:46:56 | demi- | does it terminate in a newline? |
20:49:28 | subsetpark | Nope |
20:50:08 | subsetpark | If it terminates in a CR/LF/whatever rather than newline, is it not interpreted as a line? |
20:50:48 | demi- | that is a newline |
20:52:53 | subsetpark | well, my point is, it's just a string |
20:53:15 | subsetpark | it's just something like $ echo '1 2 +' | nimapplication |
20:53:40 | Tiberium | Question about async - if I want to schedule my proc's (for example, to run my proc every 5 minutes), how can I do it? create a proc which would sleep 0.1 sec and then check for timer for all procs? |
20:53:50 | Tiberium | (or sleep 1 second) |
20:56:06 | BennyElg | using mysql db |
20:56:06 | BennyElg | Error: unhandled exception: Commands out of sync; you can't run this command now [DbError] |
20:56:20 | BennyElg | anyone has an idea why after create I cant execute fetchRows? |
20:57:07 | demi- | Tiberium: you would want a timer per proc, and have it sleep for the interval on a separate thread, or create a runloop system that will automatically update the timers on a thread based on time since original scheduling |
20:57:48 | Tiberium | demi-, I'm using async, so I can use sleepAsync instead of different threads |
20:58:13 | Tiberium | demi-, timer per proc sounds good |
20:59:25 | demi- | Tiberium: you want something like this: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html |
21:00:05 | demi- | instead of sleeping you want to idle, instead of blocking the CPU |
21:02:48 | * | xet7 quit (Quit: Leaving) |
21:02:56 | * | bjz joined #nim |
21:04:05 | Tiberium | demi-, https://github.com/nim-lang/Nim/blob/master/lib/pure/asyncdispatch.nim#L1316 |
21:04:11 | dom96 | subsetpark: sounds like you should be using stdin.readLine. Where is readLineFromStdin defined in? |
21:04:20 | Tiberium | probably this is not usual sleep, because other coroutines still can run |
21:05:04 | subsetpark | @dom96 GRZwwpLoGCu6O8a |
21:05:16 | subsetpark | whoops - presumably that's my password for something important |
21:05:22 | subsetpark | https://nim-lang.org/docs/rdstdin.html |
21:05:58 | dom96 | yeah, try stdin.readline() |
21:06:47 | subsetpark | How would I determine whether there was something being piped in, and use the linenoise interface if not? |
21:07:47 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:07:48 | demi- | subsetpark: you should be able to read from STDIN either way, it just may not contain newlines to parse from |
21:08:22 | subsetpark | I know, but rdstdin wraps linenoise nicely |
21:09:41 | subsetpark | Anyway, I feel like it shouldn't be as difficult as it is - there might be something else currently interfering |
21:10:12 | * | ludocode quit (Ping timeout: 240 seconds) |
21:16:53 | * | Tiberium quit (Remote host closed the connection) |
21:19:34 | * | vlad1777d quit (Quit: Leaving) |
21:20:31 | dom96 | maybe it's a bug in rstdin? |
21:23:51 | * | ludocode joined #nim |
21:33:59 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
21:40:17 | * | krux02 quit (Remote host closed the connection) |
21:40:40 | * | Kingsquee joined #nim |
21:58:53 | * | Trustable quit (Remote host closed the connection) |
22:04:25 | * | ludocode quit (Remote host closed the connection) |
22:05:19 | * | chemist69 quit (Ping timeout: 255 seconds) |
22:22:21 | * | chemist69 joined #nim |
22:24:25 | * | couven92 quit (Remote host closed the connection) |
22:24:49 | * | couven92 joined #nim |
22:24:54 | * | couven92 quit (Remote host closed the connection) |
22:25:54 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:27:16 | FromGitter | <Varriount> demi-: I believe you can use isatty() |
22:34:07 | * | nsf quit (Quit: WeeChat 1.7.1) |
22:34:44 | * | PMunch joined #nim |
22:35:44 | * | bjz joined #nim |
22:36:27 | * | bjz quit (Client Quit) |
22:38:28 | * | bjz joined #nim |
22:38:42 | * | bjz quit (Client Quit) |
22:41:02 | demi- | varriount, hm? |
23:18:13 | * | Calinou quit (Ping timeout: 268 seconds) |
23:20:36 | * | Calinou joined #nim |
23:23:46 | * | devted quit (Quit: Sleeping.) |
23:43:53 | * | Amrykid quit (Ping timeout: 240 seconds) |
23:45:24 | * | Calinou quit (Ping timeout: 240 seconds) |
23:46:17 | * | Amrykid joined #nim |
23:51:55 | * | bjz joined #nim |
23:53:53 | PMunch | How efficient are the sequtils insert and delete functions? |
23:58:54 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |