| 00:02:35 | * | GangstaCat joined #nim |
| 00:07:38 | * | der-landgraf joined #nim |
| 00:09:45 | * | kingofoz quit (Ping timeout: 276 seconds) |
| 00:10:19 | * | kingofoz joined #nim |
| 00:17:39 | * | Demon_Fox joined #nim |
| 00:50:08 | * | GangstaCat quit (Quit: Leaving) |
| 01:00:25 | * | ephja quit (Read error: Connection reset by peer) |
| 01:01:03 | * | ftsf_ joined #nim |
| 01:17:03 | * | der-landgraf quit (Ping timeout: 240 seconds) |
| 01:23:13 | * | der-landgraf joined #nim |
| 01:29:10 | ftsf_ | good morning |
| 01:29:50 | * | chemist69_ joined #nim |
| 01:30:47 | * | der-landgraf quit (Ping timeout: 258 seconds) |
| 01:32:52 | * | yglukhov joined #nim |
| 01:33:36 | * | chemist69 quit (Ping timeout: 276 seconds) |
| 01:37:03 | * | yglukhov quit (Ping timeout: 240 seconds) |
| 01:43:08 | theweirdn8 | #VickieRunsSmackdownLive |
| 01:43:30 | theweirdn8 | ftsf_: i live in the civilized world where its still monday |
| 01:44:22 | ftsf_ | theweirdn8, oh, which one is that? |
| 01:54:01 | ftsf_ | i thought civilisation had crumbled over there |
| 02:01:12 | theweirdn8 | ftsf_: its our birthday today |
| 02:01:31 | * | Jesin quit (Read error: Connection reset by peer) |
| 02:02:18 | ftsf_ | happy birthday! |
| 02:03:53 | * | Jesin joined #nim |
| 02:04:09 | theweirdn8 | USA! USA! USA! |
| 02:04:13 | theweirdn8 | What country are you in? |
| 02:04:38 | ftsf_ | AUS |
| 02:05:01 | ftsf_ | we're currently trying to decide if we have a government or not |
| 02:05:25 | theweirdn8 | Just join the EU from long distance |
| 02:06:17 | * | Jesin quit (Max SendQ exceeded) |
| 02:07:21 | ftsf_ | yeah I hear they have a vacancy coming up |
| 02:12:08 | * | Jesin joined #nim |
| 02:13:11 | * | Jesin quit (Max SendQ exceeded) |
| 02:14:46 | * | Jesin joined #nim |
| 02:17:51 | theweirdn8 | :-) |
| 02:20:43 | * | Jessin joined #nim |
| 02:20:59 | * | Jesin quit (Disconnected by services) |
| 02:21:23 | * | Jessin is now known as Jesin |
| 02:54:52 | * | yglukhov joined #nim |
| 03:01:21 | * | yglukhov quit (Ping timeout: 276 seconds) |
| 03:03:09 | * | theweirdn8 quit (Quit: Leaving.) |
| 03:07:40 | * | afrigginelf joined #nim |
| 03:25:34 | * | afrigginelf quit (Ping timeout: 250 seconds) |
| 03:51:27 | * | GangstaCat joined #nim |
| 04:00:49 | * | vendethiel joined #nim |
| 04:03:55 | * | akamaus joined #nim |
| 04:09:40 | * | vendethiel quit (Ping timeout: 252 seconds) |
| 04:17:46 | * | yglukhov joined #nim |
| 04:21:55 | * | yglukhov quit (Ping timeout: 244 seconds) |
| 04:56:20 | * | endragor joined #nim |
| 05:19:37 | * | s4 joined #nim |
| 05:24:00 | * | kssreeram joined #nim |
| 05:34:49 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 05:53:43 | vegansk | Hey guys, vote for Nim here http://www.slant.co/topics/101/~languages-that-compile-to-javascript. |
| 06:07:39 | ftsf_ | =\ a popularity based "best"? |
| 06:15:06 | * | rlr joined #nim |
| 06:17:06 | * | endragor_ joined #nim |
| 06:19:33 | * | yglukhov joined #nim |
| 06:20:58 | * | endragor quit (Ping timeout: 258 seconds) |
| 06:23:51 | * | yglukhov quit (Ping timeout: 244 seconds) |
| 06:30:23 | * | der-landgraf joined #nim |
| 06:32:28 | * | der-landgraf quit (Excess Flood) |
| 06:34:54 | * | hendi__ joined #nim |
| 06:34:55 | * | der-landgraf joined #nim |
| 06:36:23 | * | endragor_ quit (Remote host closed the connection) |
| 06:36:52 | * | endragor joined #nim |
| 06:56:02 | * | Matthias247 joined #nim |
| 06:58:31 | * | akamaus quit (Ping timeout: 252 seconds) |
| 07:06:43 | * | bjz joined #nim |
| 07:09:40 | * | bjz_ joined #nim |
| 07:11:48 | * | bjz quit (Ping timeout: 246 seconds) |
| 07:11:53 | * | bjz__ joined #nim |
| 07:14:35 | * | Varriount quit (Read error: Connection reset by peer) |
| 07:14:49 | * | Varriount joined #nim |
| 07:14:51 | * | bjz_ quit (Ping timeout: 276 seconds) |
| 07:17:33 | * | huonw quit (Ping timeout: 240 seconds) |
| 07:17:56 | * | bjz__ quit (Ping timeout: 272 seconds) |
| 07:19:47 | * | huonw joined #nim |
| 07:27:48 | * | Satyajit quit (Quit: https://fnordserver.eu) |
| 07:34:10 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 07:38:49 | * | Trustable joined #nim |
| 07:40:38 | * | yglukhov joined #nim |
| 07:43:37 | * | kssreeram joined #nim |
| 07:45:24 | * | yglukhov quit (Ping timeout: 276 seconds) |
| 07:53:01 | * | Demon_Fox quit (Quit: Leaving) |
| 07:57:44 | * | ftsf_ quit (Remote host closed the connection) |
| 07:59:26 | * | RGeisel joined #nim |
| 08:00:08 | * | RGeisel is now known as BratwurstMitSenf |
| 08:09:00 | * | pafmaf joined #nim |
| 08:14:39 | * | hendi__ quit (Ping timeout: 276 seconds) |
| 08:17:20 | * | euantor joined #nim |
| 08:20:54 | * | Satyajit joined #nim |
| 08:24:49 | * | der-landgraf quit (Quit: WeeChat 1.5) |
| 08:26:15 | * | der-landgraf joined #nim |
| 08:35:15 | cheatfate | Araq, is it easy to add option to compiler to replace stdlib files? |
| 08:35:23 | cheatfate | or it already present? |
| 08:35:40 | Araq | as I said, --lib |
| 08:35:50 | Araq | sets the library path |
| 08:39:30 | * | vendethiel joined #nim |
| 08:39:34 | cheatfate | yeah but i want to replace only one file, like asyncdispatch.nim (which used by asyncnet.nim, asynchttpserver.nim) |
| 08:39:41 | cheatfate | i dont want to replace whole library |
| 08:40:29 | cheatfate | i'm tired of my PRs to stdlib, so i think to create nimble package |
| 08:42:27 | * | yglukhov joined #nim |
| 08:50:43 | * | hendi__ joined #nim |
| 08:56:34 | * | bjz joined #nim |
| 08:57:29 | cheatfate | I have tested `--lib` and got `Error: cannot open system.nim' so its not very suitable to replace just only one file |
| 09:02:28 | * | vendethiel quit (Ping timeout: 244 seconds) |
| 09:02:40 | * | Matthias247 joined #nim |
| 09:02:53 | euantor | cheatfateL why not just fork the standard lib, clone it and replace your file in your fork |
| 09:02:59 | euantor | Then point --lib to the cloned fork? |
| 09:03:30 | * | gokr joined #nim |
| 09:05:32 | * | yglukhov_ joined #nim |
| 09:05:48 | cheatfate | euantor, this is long story |
| 09:06:17 | cheatfate | my files is working, but my pr will not be accepted |
| 09:06:35 | cheatfate | so i want to create nimble package |
| 09:06:36 | euantor | Why not? If it works and fixes an issue, what's blocking the merge? |
| 09:07:03 | * | yglukhov quit (Ping timeout: 264 seconds) |
| 09:08:25 | Araq | cheatfate: yeah indeed, just continue to make PRs please |
| 09:08:55 | Araq | have you tried the proc() iterator(): FutureBase unification? |
| 09:09:28 | * | GangstaCat quit (Quit: Leaving) |
| 09:10:35 | cheatfate | Araq, nope, because i'm not fully understand what is it |
| 09:12:50 | cheatfate | Araq, i have new version of ioselectors which is not in one file, how i must organize them? |
| 09:12:57 | cheatfate | for PR? |
| 09:14:17 | Araq | just have the files in an ioselectors subdir |
| 09:32:50 | * | euantor quit (Read error: Connection reset by peer) |
| 09:35:55 | * | Arrrr joined #nim |
| 09:38:18 | * | yglukhov_ quit (Remote host closed the connection) |
| 09:50:22 | * | yglukhov joined #nim |
| 09:54:23 | * | euantor joined #nim |
| 09:54:42 | * | yglukhov quit (Ping timeout: 250 seconds) |
| 10:01:30 | * | fastrom joined #nim |
| 10:07:42 | * | arnetheduck quit (Ping timeout: 250 seconds) |
| 10:22:27 | * | Flox42 quit (Remote host closed the connection) |
| 10:22:28 | * | M-max quit (Remote host closed the connection) |
| 10:22:28 | * | M-Quora quit (Read error: Connection reset by peer) |
| 10:22:34 | * | endragor quit (Remote host closed the connection) |
| 10:25:08 | * | endragor joined #nim |
| 10:26:47 | * | desophos quit (Read error: Connection reset by peer) |
| 10:27:21 | * | Flox42 joined #nim |
| 10:27:26 | * | vendethiel joined #nim |
| 10:32:09 | * | yglukhov joined #nim |
| 10:41:51 | * | theweirdn8 joined #nim |
| 10:41:56 | * | theweirdn8 quit (Client Quit) |
| 10:42:36 | * | theweirdn8 joined #nim |
| 10:55:51 | * | vendethiel quit (Ping timeout: 276 seconds) |
| 11:15:32 | ftsf | is there a way to do `when ProfilerEnabled:` ? |
| 11:17:28 | Araq | when defined(nimProfile) or something |
| 11:17:32 | Araq | grep for it |
| 11:18:26 | ftsf | cheers =) `when defined(profiler):` seems to work |
| 11:21:55 | kier_ | did anything happen with regard to https://github.com/nim-lang/Nim/pull/4367 ? |
| 11:33:44 | Araq | kier_: I think it's a compiler bug and I don't want more workarounds |
| 11:33:53 | Araq | but if it's blocking you I can reconsider |
| 11:39:03 | kier_ | Araq: ah okay. i'm not blocking on it. I'll separate the compiler bug into a separate issue |
| 11:59:20 | derlafff | hi guys. want to ask it again: echo 'import nre' > test.nim && nim c test.nim: lib/impure/nre.nim(246, 45) Error: undeclared identifier: 'Option' |
| 11:59:27 | derlafff | is it a bug or I do smth wrong? |
| 12:01:49 | Arrrr | does import options fix the issue? |
| 12:02:00 | derlafff | nope |
| 12:02:23 | derlafff | Arrrr: 'import options, nre' fails too |
| 12:05:16 | kier_ | derlafff: have you tried on the latest Nim version (the devel branch)? |
| 12:05:43 | derlafff | kier_: only 0.14.2 |
| 12:10:30 | * | Arrrr quit (Read error: Connection reset by peer) |
| 12:17:06 | derlafff | kier_: the same with devel branch |
| 12:17:08 | derlafff | git hash: 5f9da6b2ae137feb762c149ed5a7e0eb0f23a17d |
| 12:17:34 | derlafff | now line is different: lib/impure/nre.nim(245, 45) Error: undeclared identifier: 'Option' |
| 12:18:54 | ftsf | hmm trying to figure out how cyclic imports work =\ |
| 12:19:04 | euantor | I take it unix sockets aren't currently supported in the stdlib (with Named pipes on Windows being the counterpart)? |
| 12:19:05 | ftsf | I get "Error: type expected" |
| 12:20:21 | * | kssreeram quit (Ping timeout: 276 seconds) |
| 12:24:39 | * | M-Quora joined #nim |
| 12:24:46 | * | M-max joined #nim |
| 12:25:09 | * | EastByte quit (Read error: Connection reset by peer) |
| 12:25:17 | * | EastByte joined #nim |
| 12:26:34 | ftsf | can I forward declare a type? |
| 12:40:02 | Araq | ftsf: no, the workaround is to use subtyping |
| 12:40:20 | Araq | there is a branch where cyclic imports are allowed, but it's still a long way from working |
| 12:40:28 | ftsf | subtyping? |
| 12:43:57 | Araq | type Foo = ref object of RootObj |
| 12:44:02 | Araq | # use Foo here. |
| 12:44:08 | Araq | # Later: |
| 12:44:19 | Araq | type RealImpl = ref object of Foo |
| 12:44:28 | jeffc | Sorry to ask a stupid question, but how does one go about building the manual? |
| 12:44:34 | ftsf | Araq, oh I see, I think |
| 12:44:35 | ftsf | I'll try it |
| 12:44:45 | jeffc | Want to check my changes before pushing documentation updates |
| 12:44:54 | Araq | koch web |
| 12:44:58 | jeffc | awesome, thanks |
| 12:46:03 | * | Trustable quit (Ping timeout: 246 seconds) |
| 12:47:10 | * | michael_campbell joined #nim |
| 12:47:12 | * | Trustable joined #nim |
| 12:53:41 | ftsf | Araq, I saw your post about using a types.nim with all the types, is that still a recommended way to do things? |
| 12:54:11 | Araq | I still like it. it's honest. |
| 12:54:31 | Araq | if you have an interdependent mess, don't pretend you don't. |
| 12:55:09 | ftsf | ok, cool. I'm now getting Car.nim(14, 60) Error: Error: ambiguous identifier: 'Car' --use .Car or types.Car however Car.nim no longer defines Car |
| 12:55:27 | Araq | the module should be named cars.nim |
| 12:55:44 | Araq | and yeah, this error message is confusing :P |
| 12:55:51 | ftsf | oh ok |
| 12:56:16 | * | vendethiel joined #nim |
| 13:01:33 | * | endragor quit (Ping timeout: 258 seconds) |
| 13:02:26 | ftsf | ohh that's weird.. car.nim(16, 6) Error: attempting to call undeclared routine: 'map=' proc newCar*(map: Map): Car = var car = new(Car); car.map = map |
| 13:04:44 | ftsf | which didn't occur before moving stuff to types.nim |
| 13:07:37 | * | endragor joined #nim |
| 13:08:44 | * | nsf quit (Quit: WeeChat 1.5) |
| 13:11:09 | * | saml joined #nim |
| 13:20:15 | * | vendethiel quit (Ping timeout: 264 seconds) |
| 13:23:26 | Araq | ftsf: export fields via * |
| 13:23:45 | ftsf | oh of course, they're in a different module now |
| 13:27:10 | * | s4 quit (Quit: Konversation terminated!) |
| 13:35:23 | ftsf | hmm so you can't have a variable with the same name as a module you've imported |
| 13:41:15 | * | kssreeram joined #nim |
| 13:49:34 | * | PMunch joined #nim |
| 13:53:57 | * | ephja joined #nim |
| 13:56:27 | Araq | surely you can, but you might need to disambiguate it |
| 13:59:40 | ephja | what symbols need sys/sysctl.h in cpuinfo? |
| 14:01:05 | ephja | It's archaic indeed. Is it really necessary to reference C files? What a nightmare it must be for everyone who is implementing similar things in other ecosystems |
| 14:07:15 | ephja | is this in case "constants" are changed at some point? which rarely happens in practice, right? |
| 14:12:26 | * | BratwurstMitSenf left #nim (#nim) |
| 14:14:38 | ephja | though I can't see what it is that depends on it in this case. can't the sysctl function be used without referencing the header? |
| 14:14:40 | * | vendethiel joined #nim |
| 14:21:00 | * | akamaus joined #nim |
| 14:21:17 | * | pafmaf quit (Ping timeout: 258 seconds) |
| 14:21:20 | Araq | ephja: I don't remember. |
| 14:21:44 | * | pafmaf joined #nim |
| 14:24:03 | * | maus joined #nim |
| 14:26:56 | * | akamaus quit (Ping timeout: 244 seconds) |
| 14:37:28 | * | vendethiel quit (Ping timeout: 272 seconds) |
| 14:39:43 | michael_campbell | re: var vs. module name - This seems like something a lot of people run into. |
| 14:40:06 | michael_campbell | I know I did, at least. |
| 14:40:16 | michael_campbell | And have seen it mentioned here a few times. |
| 14:40:44 | ftsf | I guess that's the problem with using global variables |
| 14:43:33 | dom96 | I think the compiler needs to detect it and at least give a better error message. |
| 14:43:53 | dom96 | because it is indeed a common problem |
| 14:55:03 | * | endragor quit (Ping timeout: 264 seconds) |
| 14:56:56 | * | vendethiel joined #nim |
| 14:57:55 | jeffc | (Different but related) Same goes for C source file and nim module. Gives a very strange message |
| 15:08:24 | * | PMunch quit (Quit: leaving) |
| 15:09:51 | * | nsf joined #nim |
| 15:20:03 | * | vendethiel quit (Ping timeout: 246 seconds) |
| 15:29:49 | * | euantor quit (Quit: Leaving) |
| 15:32:11 | * | theweirdn8 quit (Quit: Leaving.) |
| 15:49:04 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 15:51:43 | * | kulelu88 joined #nim |
| 15:54:30 | * | PMunch joined #nim |
| 16:01:57 | PMunch | I'm having some trouble using the SDL compiled binaries with the SDL bindings |
| 16:02:38 | PMunch | I might be doing it wrong but it's complaining that the file SDL2/SDL_image.h doesn't exist |
| 16:02:56 | PMunch | Which makes sense since it's a separate source |
| 16:03:13 | Araq | I usually use the wrappers which don't depend on fucking header files |
| 16:03:25 | PMunch | But I can't figure out how to make them compile together in a way that the binding likes it.. |
| 16:03:37 | PMunch | Araq, and which is that then? |
| 16:03:52 | PMunch | This is the sdl2 binding from Nimble.. |
| 16:04:01 | Araq | the official SDL2 repo doesn't depend on the headers |
| 16:04:18 | Araq | or maybe I am an idiot and didn't notice. |
| 16:04:41 | PMunch | https://github.com/nim-lang/sdl2/blob/master/src/sdl2/image.nim |
| 16:04:47 | PMunch | I beg to differ, line 18 |
| 16:05:36 | Araq | don't define SDL_Static |
| 16:05:41 | PMunch | Using the static since I'm compiling with the NDK for Android |
| 16:05:45 | * | J3RN left #nim ("WeeChat 1.5") |
| 16:06:02 | Araq | aha! |
| 16:06:31 | Araq | you need to .passc: "-Ifoo" then |
| 16:06:57 | * | hendi__ quit (Ping timeout: 246 seconds) |
| 16:08:21 | * | theweirdn8 joined #nim |
| 16:09:32 | * | vendethiel joined #nim |
| 16:09:35 | PMunch | Hmm |
| 16:09:55 | PMunch | It doesn't seem to do that for the SDL stuff |
| 16:13:43 | PMunch | I might be going about this all wrong.. |
| 16:16:18 | * | pafmaf quit (Ping timeout: 276 seconds) |
| 16:25:33 | * | yglukhov quit (Ping timeout: 250 seconds) |
| 16:29:35 | * | hendi__ joined #nim |
| 16:30:06 | * | _stowa joined #nim |
| 16:32:33 | * | vendethiel quit (Ping timeout: 276 seconds) |
| 16:34:23 | * | _stowa quit (K-Lined) |
| 16:36:11 | * | brson joined #nim |
| 16:38:58 | PMunch | Okay, I think I figured out something that works |
| 16:39:53 | PMunch | I looked in the C source generated for my file and noticed that SDL2 wasn't mentioned as an import, but SDL2/SDL_images was |
| 16:41:15 | PMunch | So I modified the SDL2 wrapper to not output that and made sure that the Java code for the Android project was set to load the images library |
| 16:41:33 | PMunch | Now it compiles and installs fine |
| 16:42:43 | dom96 | Araq: Maybe we should set this up for the Nim repo? https://lgtm.co/ |
| 16:43:21 | PMunch | Not 100% sure if it works though since the loadTexture function returns null pointers but that is probably because I need to figure out how to do the paths on Android.. |
| 17:02:35 | Araq | dom96: what's it about? |
| 17:02:53 | dom96 | Araq: Doesn't the site provide enough of an explanation? |
| 17:03:01 | * | euantor joined #nim |
| 17:06:32 | Araq | no. |
| 17:09:13 | dom96 | Take a look at the HN thread then https://news.ycombinator.com/item?id=12035346 |
| 17:13:54 | * | euantor quit (Remote host closed the connection) |
| 17:15:53 | * | yglukhov joined #nim |
| 17:17:54 | * | vendethiel joined #nim |
| 17:18:55 | * | hendi__ quit (Ping timeout: 252 seconds) |
| 17:25:06 | PMunch | https://wiki.libsdl.org/SDL_GetBasePath |
| 17:25:15 | PMunch | Where did that go in the SDL wrapper? |
| 17:28:18 | * | yglukhov quit (Remote host closed the connection) |
| 17:32:06 | Araq | PMunch: not required, use os.nim instead |
| 17:32:56 | PMunch | Well I tried to use currentDirectory and that gave me / on Android.. |
| 17:33:17 | PMunch | The SDL function might've done the same though.. |
| 17:33:23 | Araq | os.getAppDir() |
| 17:33:24 | cheatfate | dom96, maybe useful for bitcoin developers |
| 17:33:43 | cheatfate | they always have discussion about any pr :) |
| 17:34:36 | * | yglukhov joined #nim |
| 17:39:00 | * | vendethiel quit (Ping timeout: 246 seconds) |
| 17:42:20 | PMunch | Araq, that returns /system/bin |
| 17:42:41 | Araq | so your app is in /system/bin |
| 17:42:48 | Araq | makes sense, doesn't it? |
| 17:43:34 | PMunch | I highly doubt that my Android app is installed in /system/bin |
| 17:49:21 | * | vendethiel joined #nim |
| 17:57:49 | * | euantor joined #nim |
| 17:59:54 | * | euantor quit (Client Quit) |
| 18:02:01 | ephja | dom96: maybe Aporia doesn't attempt to read the remaining output *after* the process has exited |
| 18:06:41 | PMunch | I'm having some weird issues with cpuTime |
| 18:07:58 | PMunch | I'm running it in a loop and accumulate the time until it goes over a certain threshold (based on FPS) and then let an animation go to it's next frame. But it's not working particularly well.. |
| 18:08:50 | PMunch | I'm guessing it's because the time delta is so small the precision of the float is the issue? |
| 18:09:06 | PMunch | Or is cpuTime not doing what I think it's doing |
| 18:12:57 | PMunch | epochTime seems to do what I wanted |
| 18:13:06 | ephja | dom96: it seems like more like an issue with the thread communication |
| 18:20:11 | * | pafmaf joined #nim |
| 18:22:11 | * | vendethiel quit (Ping timeout: 240 seconds) |
| 18:32:19 | * | devn_ is now known as devn |
| 18:34:56 | * | vendethiel joined #nim |
| 18:39:33 | federico3 | def-: nimfmt is pretty interesting |
| 18:41:18 | * | kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
| 18:41:25 | ephja | neat |
| 18:42:06 | federico3 | if only it wasn't stripping away newlines and comments :) |
| 18:49:51 | ephja | D: |
| 18:52:42 | * | kulelu88 quit (Ping timeout: 272 seconds) |
| 18:55:20 | * | yglukhov quit (Remote host closed the connection) |
| 19:02:51 | * | kunev quit (Ping timeout: 250 seconds) |
| 19:03:48 | * | kunev joined #nim |
| 19:04:32 | * | arnetheduck joined #nim |
| 19:06:53 | def- | federico3: well, it just calls the compiler. next step would be to improve the compiler's renderTree output |
| 19:07:46 | federico3 | def-: I'm thinking of writing my own unless you plan to working on it in the short term |
| 19:12:22 | * | maus_ joined #nim |
| 19:12:23 | * | kunev quit (Ping timeout: 250 seconds) |
| 19:14:17 | * | kunev joined #nim |
| 19:15:31 | * | maus quit (Ping timeout: 240 seconds) |
| 19:16:06 | ephja | Have the Windows directory management and console APIs not been accounted for? |
| 19:21:21 | def- | federico3: go ahead |
| 19:21:49 | ephja | federico3: all that effort wasted |
| 19:21:58 | ephja | j/k |
| 19:22:45 | federico3 | uh? |
| 19:23:22 | Araq | I still don't know why people want auto-formatting in an indentation based language... |
| 19:23:38 | Araq | can anyone enlighten me? |
| 19:24:28 | ephja | x-space indentation to y-space indentation? :-P |
| 19:25:12 | federico3 | well, it depends how in-depth you go with the formatting |
| 19:25:13 | dom96 | Araq: Because people aren't using type sections |
| 19:25:24 | Araq | what? |
| 19:25:40 | dom96 | or they put spaces before a ':' and after it |
| 19:26:10 | ephja | is it not a section if it only contains one type? but I know what you mean |
| 19:27:01 | federico3 | having used gofmt in-line in an editor, the thing also save you some typing |
| 19:27:19 | ephja | it's not like you save that much typing, but it is indeed necessary with cyclical type dependencies |
| 19:32:15 | ephja | but it might make code a little more readable |
| 19:36:45 | ephja | but muh screen real estate :p |
| 19:42:06 | * | yglukhov joined #nim |
| 19:59:13 | * | freezerburnv joined #nim |
| 20:00:11 | * | fastrom quit (Quit: Leaving.) |
| 20:01:12 | * | kunev quit (Ping timeout: 276 seconds) |
| 20:03:50 | * | kunev joined #nim |
| 20:03:58 | * | yglukhov quit (Remote host closed the connection) |
| 20:04:48 | * | kulelu88 joined #nim |
| 20:04:48 | * | kulelu88 quit (Changing host) |
| 20:04:48 | * | kulelu88 joined #nim |
| 20:09:57 | * | yglukhov joined #nim |
| 20:13:20 | * | Matthias247 joined #nim |
| 20:21:56 | * | theweirdn8 quit (Quit: Leaving.) |
| 20:39:22 | * | yglukhov quit (Remote host closed the connection) |
| 20:42:03 | * | kunev quit (Ping timeout: 246 seconds) |
| 20:42:54 | * | kunev joined #nim |
| 20:50:53 | * | yglukhov joined #nim |
| 21:03:44 | * | freezerburnv quit (Ping timeout: 244 seconds) |
| 21:04:24 | * | theweirdn8 joined #nim |
| 21:04:39 | * | maus_ quit (Ping timeout: 264 seconds) |
| 21:07:20 | * | michael_campbell quit (Quit: Textual IRC Client: www.textualapp.com) |
| 21:26:54 | * | fastrom joined #nim |
| 21:27:30 | PMunch | yglukhov, you there? |
| 21:27:55 | yglukhov | PMunch: hey whats up! |
| 21:28:25 | PMunch | Hi! I'm still fiddling with this SDL cross platform stuff |
| 21:28:48 | PMunch | Got everything running smoothly now with SDL2 and SDL image |
| 21:29:18 | PMunch | And started writing a small library of game related things |
| 21:29:30 | yglukhov | cool! |
| 21:29:37 | PMunch | But I've run into an issue with opening files on Android |
| 21:30:33 | PMunch | I've written a small Texture atlas parser (only basic support so far) which works great on desktop |
| 21:31:04 | PMunch | But when trying to run it on Android I only get a file not found exception when using the built in file operations. |
| 21:31:39 | yglukhov | do you put your file in the assets? |
| 21:31:42 | PMunch | Not surprisingly as the files lives inside the APK, but I can't find a way to reference them.. |
| 21:31:50 | PMunch | Yes, the images loads fine |
| 21:32:19 | yglukhov | well, images should not differ from other files in any way =) |
| 21:32:29 | PMunch | Using the loadTexture function from SDL image |
| 21:32:44 | PMunch | I'm guessing it does some sort of wrapping.. |
| 21:32:50 | yglukhov | yup |
| 21:32:58 | yglukhov | you have to use rwops api |
| 21:33:28 | yglukhov | take a look at resource.nim in nimx. pay attention to `when defined(android)` parts. |
| 21:33:50 | ephja | yglukhov: does nimx have support for running code inbetween main loop iterations? |
| 21:33:54 | PMunch | Ah, thanks :) |
| 21:35:41 | yglukhov | ephja: not really, but a pr to nimx allowing that would probably take no more than 10 mins of your time ;) |
| 21:35:48 | yglukhov | but why would you need it? |
| 21:37:34 | ldlework | yglukhov: 404 http://yglukhov.github.io/nimx/livedemo/main.html |
| 21:38:01 | ldlework | also, no DSL!? |
| 21:38:15 | yglukhov | ldlework: yeah, just noticed as well... it breaks occationally =) |
| 21:38:32 | yglukhov | dsl? for what? |
| 21:40:20 | ldlework | yglukhov: yes, because DSL's have never before been associated with GUI toolkits |
| 21:40:27 | ldlework | "the obvious thing" |
| 21:40:56 | yglukhov | you mean the layout dsl? |
| 21:41:15 | ldlework | is there one? I don't see it mentioned in the readme |
| 21:41:32 | yglukhov | no, there's no such thing yet. |
| 21:41:45 | yglukhov | im currently working on an editor though |
| 21:41:53 | ephja | yglukhov: well it's not the only way to run code periodically. timers might be what I need to use for communicating with threads |
| 21:42:11 | yglukhov | ephja: nimx has got timers |
| 21:42:16 | ldlework | yglukhov: hopefully your editor generates layout DSL :) |
| 21:42:29 | yglukhov | ldlework: sorry, thats json =) |
| 21:42:32 | ephja | I noticed that, and that's why I mentioned timers :p |
| 21:42:39 | ldlework | yglukhov: ah that's sufficient |
| 21:43:03 | ldlework | We need an Urwid for Nim |
| 21:44:27 | yglukhov | yup, that would be really great. but i think, i've seen something of a kind in nim... |
| 21:44:51 | ephja | there's termbox, but unfortunately only the 'go' library has windows support |
| 21:46:20 | ephja | the termbox author said something like "I dunno why you would want to write such applications in C anyway". I guess he wasn't thinking about library writers |
| 21:49:24 | PMunch | Aw man, this RWOps thing means I'll have to rewrite my line based loop.. |
| 21:49:46 | PMunch | Or write the lines iterator for a RWops stream.. |
| 21:50:33 | ldlework | if a termbox/urwid ever shows up for nim I have some tools I will probably port from python |
| 21:51:16 | yglukhov | PMunch: in nimx, there's an rwops stream which wraps sdl rwops to nim stream. |
| 21:51:23 | yglukhov | just use it already |
| 21:51:25 | yglukhov | =) |
| 21:51:41 | ephja | there are termbox bindings |
| 21:51:57 | ldlework | is termbox anywhere as nice as urwid? |
| 21:52:03 | ephja | nope |
| 21:52:04 | ldlework | just wondering, never used it |
| 21:52:06 | ldlework | doh |
| 21:52:09 | PMunch | But that still won't work with the lines iterator |
| 21:52:23 | ephja | I dunno if windows support could be bolted onto the termbox bindings |
| 21:52:29 | yglukhov | if lines works with nim streams, that it will |
| 21:52:58 | yglukhov | * then |
| 21:54:55 | ephja | yglukhov: why did you decide to roll your own widget toolkit? |
| 21:55:40 | PMunch | But it doesn't |
| 21:55:57 | PMunch | Only works with files and strings (which are then opened as a file) |
| 21:56:14 | ephja | streams are nice |
| 21:57:50 | PMunch | For many things |
| 21:57:51 | yglukhov | PMunch: anyway, it's almost a one-liner: iterator lines(s: Stream): string = var s: string; while s.readLine(s): yield s |
| 21:57:57 | yglukhov | there you go =) |
| 21:58:19 | PMunch | Oh, streams have a readLine. That changes everything :P |
| 21:58:50 | yglukhov | ephja: coz its fun? =) |
| 21:58:54 | * | vendethiel quit (Ping timeout: 272 seconds) |
| 22:00:03 | yglukhov | ok gotta go. see you guys. |
| 22:00:13 | ephja | I just wanted to know if there were any practical reasons, but it's nice to have a high level library in any case |
| 22:00:21 | ephja | bb |
| 22:00:31 | * | yglukhov quit (Remote host closed the connection) |
| 22:00:38 | ephja | nimqml seems to be coming along nicely though |
| 22:03:55 | * | Demon_Fox joined #nim |
| 22:12:39 | ephja | ldlework: is tcod also too low level? I guess it doesn't really have widgets |
| 22:17:17 | ephja | I don't know which approach to take. maybe I should try to port termbox-go |
| 22:18:50 | dyce_ | hmm is there anyway to dump a table to json format? |
| 22:19:08 | dyce_ | i have a seq of table[string,string] |
| 22:19:17 | ldlework | ephja: yeah tcod is just a render library |
| 22:19:26 | ldlework | it just gives you a character based canvas |
| 22:19:34 | ldlework | with some roguelike features for line of sight and such |
| 22:22:21 | * | Trustable quit (Remote host closed the connection) |
| 22:26:04 | Araq | dyce_: hmmm json.nim should be able to json tables |
| 22:29:16 | dyce_ | Araq: so i guess im looking for something like proc escapeJson , but works on any object. or do i need to build a json object from my sequence of tables? |
| 22:29:18 | * | vendethiel joined #nim |
| 22:33:11 | Araq | what does escapeJson have to do with anything? |
| 22:36:06 | dyce_ | Araq: i am looking for something like python's json.dump https://docs.python.org/2.7/library/json.html (escapeJson seems close, but only works for a string) |
| 22:37:03 | Araq | *% macro? |
| 22:39:00 | * | fredrik92 joined #nim |
| 22:40:22 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 22:45:09 | * | bjz joined #nim |
| 22:45:42 | dom96 | I think that `%` should handle this. |
| 22:47:37 | dyce_ | hmm |
| 22:47:54 | dyce_ | well on a sequence of strings, marshal's $$ does what i want |
| 22:51:20 | * | theweirdn8 quit (Quit: Leaving.) |
| 22:52:06 | * | vendethiel quit (Ping timeout: 272 seconds) |
| 22:52:21 | dyce_ | https://glot.io/snippets/eg9z87axm3 but this doesnt work with a table |
| 22:52:42 | dom96 | dyce_: just write a quick proc that does it for you :) |
| 22:54:51 | dyce_ | dom96: hmm so with jester should i just be using JObject instead of table? |
| 22:55:24 | dom96 | sure |
| 22:57:41 | ephja | dyce_: doesn't it? just that it generates a lot of data for tables for example |
| 22:57:46 | ephja | IIRC |
| 22:58:21 | dyce_ | ephja: it does, is there a way to suppress what is empty? |
| 22:58:49 | ephja | so it gives you the whole structure, even thought it's not necessary in order to recreate it |
| 22:58:59 | ephja | hm don't think so, but I haven't used it much |
| 22:59:07 | ephja | but I know it has a couple of limitations |
| 23:09:12 | * | pafmaf quit (Read error: Connection reset by peer) |
| 23:11:21 | * | PMunch quit (Quit: leaving) |
| 23:12:19 | ephja | I don't know how close you can get to the same level of convenience while keeping only the essential data. |
| 23:19:25 | dyce_ | ephja: i guess this will do https://glot.io/snippets/eg9zzbs7hl |
| 23:20:31 | ephja | I guess, just that there's no need to generate json strings manually |
| 23:22:04 | dyce_ | ephja: hmm what about for a json api? |
| 23:22:13 | dyce_ | using jester |
| 23:22:28 | * | kulelu88 quit (Quit: Leaving) |
| 23:23:00 | dyce_ | or would the better practice be to use jobject and other data structures that represent json |
| 23:32:16 | ephja | dyce_: you could use this if you want http://nim-lang.org/docs/json.html#add,JsonNode,string,JsonNode |
| 23:32:22 | ephja | http://nim-lang.org/docs/json.html#newJObject, |
| 23:32:49 | * | Jesin quit (Quit: Leaving) |
| 23:32:59 | * | pregressive joined #nim |
| 23:36:37 | * | Jesin joined #nim |
| 23:40:20 | ephja | I think you just need to check if "toJson(foo.field1), toJson(foo.field2), ..." compiles |
| 23:41:17 | ephja | does the marshal mechanism always succeed? if so then it could even be used as a fallback. more data would be generated in some cases, but it would be convenient |
| 23:42:58 | ephja | Araq: will getType work? can it replace the 'any' interface? |
| 23:43:56 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 23:47:59 | * | GangstaCat joined #nim |
| 23:51:04 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 23:53:14 | * | bjz joined #nim |