00:05:15 | * | arnetheduck joined #nim |
00:10:07 | * | renarc joined #nim |
00:13:34 | * | arnetheduck quit (Ping timeout: 264 seconds) |
00:44:54 | * | rauss quit (Read error: Connection reset by peer) |
00:46:45 | * | rauss joined #nim |
00:50:24 | * | def-pri-pub joined #nim |
01:01:34 | * | renarc quit (Ping timeout: 264 seconds) |
01:09:05 | * | thomasross quit (Read error: Connection reset by peer) |
01:10:33 | * | vlad1777d quit (Remote host closed the connection) |
01:11:12 | FromGitter | <zacharycarter> I'm very close with my multiplayer example |
01:11:29 | FromGitter | <zacharycarter> but my async loop isn't pumping in the second thread |
01:11:46 | FromGitter | <zacharycarter> it seems still hung up on the sdl2 game loop somehow :/ |
01:19:47 | * | renarc joined #nim |
01:22:05 | FromGitter | <zacharycarter> hoping someone can help me figure out what I'm doing wrong : https://gist.github.com/zacharycarter/307182651fc3dd972c849b9d8acf9de8 |
01:22:07 | FromGitter | <zacharycarter> I'm so close |
01:22:39 | * | yglukhov joined #nim |
01:27:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:29:46 | FromGitter | <zacharycarter> bleh sdl2 is still blocking so I'm not getting my events that's why |
01:29:58 | * | ipjk_ quit (Quit: Leaving) |
01:30:10 | FromGitter | <krux02> have you tried peekEvents? |
01:30:24 | FromGitter | <zacharycarter> I don't know how to use it :/ I think it's peepevents |
01:30:44 | FromGitter | <krux02> well you should create a buffer of events |
01:32:21 | FromGitter | <krux02> then you call SDL_PumpEvents() which does the blocking when you want it |
01:33:01 | FromGitter | <krux02> and then with SDL_PeepEvents you can get all events at once |
01:33:13 | FromGitter | <zacharycarter> hrm okay |
01:33:36 | FromGitter | <krux02> but I don't know where your problem is |
01:33:43 | FromGitter | <krux02> how is the blocking causing problems? |
01:34:14 | FromGitter | <zacharycarter> my communication method is kind of crazy |
01:34:22 | FromGitter | <zacharycarter> I have a background thread that I'm using channels to communicate with |
01:34:29 | FromGitter | <zacharycarter> and then from that thread I'm firing off SDL custom events |
01:34:34 | FromGitter | <zacharycarter> and handling them in the main thread |
01:35:20 | FromGitter | <krux02> ok |
01:35:42 | FromGitter | <krux02> not sure if that is a good idea, but sure you can do it |
01:36:03 | FromGitter | <zacharycarter> it seems to be working and relatively fast |
01:36:12 | FromGitter | <krux02> so instead of sdl2.defaultEvent you should have a seq of Events |
01:36:25 | FromGitter | <krux02> EventObj it is called AFAIK |
01:36:25 | FromGitter | <zacharycarter> yeah I just tried tht |
01:36:46 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1c62ebac826f054db1b1c] |
01:36:51 | FromGitter | <zacharycarter> doesn't like it though |
01:37:16 | FromGitter | <krux02> oh yea |
01:37:23 | FromGitter | <krux02> what api are you using |
01:37:30 | FromGitter | <zacharycarter> official sdl2 one |
01:37:38 | FromGitter | <krux02> ok |
01:37:46 | FromGitter | <zacharycarter> seems like it wants a ptr to an event object |
01:37:50 | FromGitter | <zacharycarter> I'll dump it and see what I get |
01:40:03 | FromGitter | <krux02> yes it does ⏎ you should pass the pointer to the first element in the seq |
01:40:59 | FromGitter | <krux02> numevents is the length of the seq |
01:41:37 | FromGitter | <krux02> basically the API sucks, because it should have been openarray, but yea at least it works |
01:46:16 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1c868c101bc4e3ae995cb] |
01:46:36 | FromGitter | <zacharycarter> something like that? |
01:46:46 | FromGitter | <krux02> nope the seq evts needs to have a length |
01:46:55 | FromGitter | <krux02> it is used as a preallocated buffer |
01:47:06 | FromGitter | <krux02> that is a common C API patters |
01:47:26 | FromGitter | <zacharycarter> gotcha |
01:47:32 | FromGitter | <krux02> that means that you need ``evts = newSeqsdl2.Event (100)`` |
01:48:07 | FromGitter | <zacharycarter> thanks |
01:48:15 | FromGitter | <zacharycarter> yay working! |
01:48:28 | FromGitter | <krux02> cool |
01:48:38 | FromGitter | <krux02> I actually never used peepEvents :P |
01:49:03 | FromGitter | <zacharycarter> me either heh |
01:49:06 | FromGitter | <zacharycarter> obviously |
01:49:49 | FromGitter | <krux02> there are a lot of functions in opengl that require a preallocated buffer to be written to |
01:50:29 | FromGitter | <krux02> does it run faster now? |
01:51:13 | FromGitter | <zacharycarter> no, something else must be up with my code ugh |
01:56:48 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:10:11 | * | relax joined #nim |
02:10:35 | * | chemist69 joined #nim |
02:13:25 | * | libman joined #nim |
02:16:51 | def-pri-pub | zacharycarter: heya |
02:17:25 | FromGitter | <zacharycarter> hey def-pri-pub |
02:17:35 | FromGitter | <zacharycarter> I saw your message about the matrix thing |
02:17:43 | FromGitter | <zacharycarter> need to do some thinking on it |
02:17:44 | def-pri-pub | was just about to ask you that |
02:17:47 | def-pri-pub | Yeah |
02:18:25 | def-pri-pub | IMO, I'm not sure if providing an OpenGL emulation is good |
02:19:33 | def-pri-pub | I know you put a lot of work into adding ZGL, but I have to give a little doubt if it's worth it to have. |
02:19:35 | FromGitter | <zacharycarter> when you say OpenGL emulation do you mean the way zengine abstracts away the API currently? |
02:19:43 | def-pri-pub | Yeah, sort of |
02:20:04 | def-pri-pub | ZGL is an abstraction over OpenGL, am I correct? |
02:20:24 | def-pri-pub | (and ZGL was a port of raylib's OpenGL abstraction) |
02:21:04 | FromGitter | <krux02> I know that myself I try to avoid API that put abstraction over abstraction |
02:21:08 | def-pri-pub | Though, I don't think telling the programmer to call OpenGL stuff themselves is good |
02:21:34 | FromGitter | <krux02> well it depends |
02:21:50 | FromGitter | <krux02> opengl has a lot of state, and changing that ist bad |
02:22:33 | FromGitter | <krux02> or at least error prone |
02:22:55 | FromGitter | <krux02> but interacting with OpenGL in a defined way is something I don't see as bad |
02:24:14 | * | nimnoob joined #nim |
02:24:33 | nimnoob | Hello. |
02:25:49 | FromGitter | <zacharycarter> hi nimnoob |
02:26:25 | FromGitter | <zacharycarter> def-pri-pub: I've thought about replacing the zengine renderer with something like - https://github.com/JoeyDeVries/Cell |
02:26:44 | * | tax joined #nim |
02:27:53 | def-pri-pub | Is it pure C? |
02:28:14 | def-pri-pub | Not that I had C++, but I'd like to avoid adding in C++ if we can. |
02:28:19 | def-pri-pub | hate* |
02:28:36 | FromGitter | <zacharycarter> no I mean I'd port it |
02:28:36 | def-pri-pub | Also, what happened to those BGFX bindings? |
02:28:52 | def-pri-pub | Was it not worth it? |
02:29:24 | FromGitter | <zacharycarter> well bgfx adds another layer of complexity |
02:29:36 | FromGitter | <zacharycarter> I abandoned frag because of it |
02:29:55 | FromGitter | <zacharycarter> a lot of people couldn't be bothered with getting frag to run |
02:29:59 | FromGitter | <zacharycarter> because they had to compile bgfx etc |
02:30:13 | FromGitter | <zacharycarter> I liked bgfx personally |
02:30:20 | def-pri-pub | Yeah, I think I did have issues with BGFX myself on Linux |
02:34:31 | FromGitter | <zacharycarter> I wouldn't get so down on zgl yet def-pri-pub I think it's a decent abstraction |
02:34:58 | FromGitter | <zacharycarter> but I'll fool around with someting else soon |
02:35:04 | def-pri-pub | Well, that push matrix issue does need to be fixed. |
02:35:54 | nimnoob | Can anyone help me with this error? http://pasted.co/b4530f70 i don't have anything in /bin it's in /system/bin/sh so how do i change this? |
02:36:00 | FromGitter | <zacharycarter> I'll take a look in the morning my brain is so fried from this networking crap I was trying to get working all day |
02:36:23 | * | dddddd quit (Remote host closed the connection) |
02:37:01 | def-pri-pub | (I also think that a max stack size of 16 is kind of really dinky) |
02:37:22 | Tanger | nimnoob: Check if system/bin/sh is in your path. It may not be set properly in your environment or nim may not be searching the path by default |
02:39:16 | nimnoob | Ok thanks. |
02:43:05 | FromGitter | <zacharycarter> curse sdl2 and its event loop |
02:47:44 | nimnoob | Tanger : it doesn't work. This is what it looks like. http://pasted.co/d12ee7af what am i doing wrong? |
02:51:11 | * | endragor joined #nim |
02:53:44 | nohusuro | nimnoob: are you on linux or mac? |
02:54:45 | nimnoob | I'm on Android. |
02:55:05 | nohusuro | using termux? |
02:55:17 | nimnoob | Yes using Termux |
02:55:30 | nohusuro | show us the output of: which sh |
02:55:51 | * | endragor quit (Ping timeout: 252 seconds) |
02:56:09 | * | endragor joined #nim |
02:56:47 | nimnoob | It says /data/data/com.termux/files/usr/bin/sh |
02:56:49 | nohusuro | also the output of echo $PREFIX |
02:57:34 | nimnoob | Ok hang on a sec. |
02:58:40 | nimnoob | echo $PREFIX = /data/data/com.termux/files/usr |
02:59:00 | nohusuro | ok type this: export CONFIG_SHELL=$PREFIX/bin/sh |
02:59:03 | nohusuro | and see if you can compile |
03:03:09 | nimnoob | nohusuro : i'm getting the same error message. |
03:03:15 | def-pri-pub | zacharycater: I found a fix for `pushMatrix` and I PR'd it |
03:03:35 | nohusuro | nimnoob: also do these |
03:03:51 | nohusuro | export BIN_SH=$PREFIX/bin/sh |
03:04:15 | nohusuro | export TMPDIR=/data/data/com.termux/files/tmp |
03:04:19 | nohusuro | export TMP=$TMPDIR |
03:04:25 | nohusuro | export TEMP=$TMPDIR |
03:04:40 | nohusuro | then try again |
03:07:15 | * | shashlick joined #nim |
03:08:04 | nohusuro | also are you compiling with -d:android -d:termux |
03:08:29 | nohusuro | as seen in the nim.cfg here: https://github.com/nim-lang/Nim/blob/786f9315e381406181843d245b5ac1f8553b6fa2/config/nim.cfg#L93-L103 |
03:13:15 | * | smt_ quit (Quit: Leaving) |
03:13:35 | * | smt joined #nim |
03:15:47 | FromGitter | <zacharycarter> meh I give up - I don't think it's sdl2's fault |
03:16:24 | FromGitter | <zacharycarter> something is up with my background thread |
03:16:33 | * | mahmudov quit (Quit: Leaving) |
03:16:46 | * | mahmudov joined #nim |
03:16:57 | FromGitter | <zacharycarter> the async reader proc doesn't get invoked until I start moving things around on the main thread |
03:22:07 | * | Ven`` joined #nim |
03:23:36 | nimnoob | Nohusuro : my Nim.cfg looks exactly like that but it gives me the same error code. I tried everything but the error seems to be the same |
03:24:37 | nohusuro | so you also tried with the -d flags? |
03:24:39 | * | yglukhov joined #nim |
03:26:06 | nohusuro | maybe try to manually specify the useShPath |
03:26:21 | nohusuro | --define:useShPath:/data/data/com.termux/files/usr/bin/sh |
03:27:06 | nimnoob | Maybe i'm doing something wrong http://pasted.co/97f32598 |
03:28:11 | shashlick | Can someone help with my asyncdispatch attempt? https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286 |
03:28:55 | shashlick | after get_fingerprint() runs, function doesn't continue (line 14+) |
03:29:50 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:30:41 | * | Ven`` quit (Ping timeout: 248 seconds) |
03:32:09 | nimnoob | Nohusuro : unfortunately replacing that value didn't work. |
03:32:32 | nohusuro | then I'm out of ideas, sorry nimnoob |
03:32:45 | nohusuro | perhaps nuke termux and try from scratch |
03:33:09 | nohusuro | nimnoob: your d:android needs a - |
03:33:14 | nohusuro | needs to be -d:android |
03:33:38 | nimnoob | No don't be. Thanks a lot for your tips. |
03:33:46 | nimnoob | Oh ok |
03:34:14 | nohusuro | said I was out of ideas before I saw your paste :P |
03:35:31 | nimnoob | :) |
03:36:26 | nohusuro | so your final call should look like this |
03:36:36 | nohusuro | nim c -r -d:android -d:termux hallo |
03:38:06 | nohusuro | shashlick: have you verified the value of data in get_fingerprint? |
03:38:14 | nohusuro | perhaps put an echo $data after ln#2 |
03:39:33 | FromGitter | <zacharycarter> anyone know why I can't do this: |
03:39:39 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1e2fb177fb9fe7ee0e1fb] |
03:39:41 | * | pilne quit (Quit: Quitting!) |
03:40:01 | FromGitter | <zacharycarter> sorry it should read |
03:40:14 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1e31e1081499f1f512e16] |
03:40:45 | FromGitter | <zacharycarter> and that compiles heh |
03:41:04 | nohusuro | soooo, fixed? xD lol |
03:41:24 | FromGitter | <zacharycarter> lol it's still not working in my code |
03:41:37 | FromGitter | <zacharycarter> but of course in this asinine example it is fine |
03:41:43 | shashlick | nohusuro: works fine, I get the output as expected |
03:42:18 | shashlick | nohusuro: it prints the Fingerprint line, I also tried printing jdata and it is as expected too |
03:42:26 | FromGitter | <zacharycarter> okay this fails |
03:42:32 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1e3a8bc46472974559889] |
03:42:47 | shashlick | nohusuro: line 15 doesn't print though |
03:48:25 | nohusuro | zacharycarter, try something like this: http://termbin.com/9yjk |
03:49:22 | FromGitter | <zacharycarter> thanks nohusuro |
03:51:54 | * | nimnoob quit (Ping timeout: 260 seconds) |
03:53:14 | nohusuro | shashlick: perhaps the {.async.} flag on get_fingerprint is being ignored because there's no awaiting on that proc? |
03:54:38 | * | tax quit (Ping timeout: 246 seconds) |
03:56:28 | nohusuro | maybe try wrapping it in a thread and awaiting that |
04:00:10 | * | def-pri-pub quit (Quit: Lost terminal) |
04:00:12 | shashlick | but get_fingerprint() itself is being awaited right? |
04:00:16 | shashlick | how many layers do I need? |
04:14:39 | FromGitter | <zacharycarter> hrm I need to be able to cast to a pointer |
04:14:48 | FromGitter | <zacharycarter> not just call addr |
04:36:02 | * | BigEpsilon joined #nim |
04:36:45 | * | UxerUospr joined #nim |
04:44:43 | nohusuro | zacharycarter, addr gets a pointer. https://nim-lang.org/docs/system.html#pointer |
04:44:56 | nohusuro | built-in pointer type, use the addr operator to get a pointer to a variable |
05:05:50 | * | gmpreussner quit (Ping timeout: 240 seconds) |
05:12:36 | * | yglukhov joined #nim |
05:16:48 | * | yglukhov quit (Ping timeout: 240 seconds) |
05:18:46 | * | yglukhov joined #nim |
05:18:47 | * | Vladar joined #nim |
05:19:19 | * | UxerUospr quit (Quit: Lost terminal) |
05:19:57 | * | relax quit (Ping timeout: 252 seconds) |
05:20:31 | * | shashlick quit (Ping timeout: 248 seconds) |
05:20:59 | * | yglukhov quit (Remote host closed the connection) |
05:24:58 | * | gmpreussner joined #nim |
05:30:58 | * | Lord_Nightmare quit (Ping timeout: 264 seconds) |
05:33:24 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:38:07 | * | BigEpsilon quit (Ping timeout: 248 seconds) |
05:48:31 | * | yglukhov joined #nim |
05:51:10 | * | libman quit (Quit: Connection closed for inactivity) |
05:57:23 | * | Lord_Nightmare joined #nim |
06:05:44 | * | BigEpsilon joined #nim |
06:08:24 | * | jsgrant quit (Quit: jsgrant) |
06:10:16 | * | yglukhov quit (Remote host closed the connection) |
06:20:28 | * | nsf joined #nim |
06:20:34 | * | PMunch joined #nim |
06:22:31 | * | ShalokShalom quit (Read error: Connection reset by peer) |
06:27:39 | * | ShalokShalom joined #nim |
06:31:27 | nohusuro | Why can't addHandler accept subtypes of EventArgs? http://termbin.com/rbqy |
06:38:17 | Araq | because this form of subtyping would be unsound. |
06:40:23 | nohusuro | unsound how? |
06:42:10 | Araq | I can emit an EventArgs and your handleevent crashes? |
06:42:25 | Araq | because it only deals with ServerConnectedEventArgs |
06:42:48 | FromGitter | <mratsim> @Yardanico @Varriount Yeah term rewriting macro are really awesome, especially for math libraries (fusing a*X+Y in a single loop). So powerful that Google wish they had it in Python/C++ and spent a lots of time to build a compiler that does that: technical: https://www.tensorflow.org/versions/r0.12/resources/xla_prerelease, layman: https://developers.googleblog.com/2017/03/xla-tensorflow-compiled.html |
06:43:15 | nohusuro | Araq: shouldn't that just be a compile time error? |
06:43:31 | Araq | I call this "Araq's rule of subtyping": "if you like subtyping you don't understand subtyping" |
06:44:52 | * | Arrrr joined #nim |
06:45:37 | Araq | nohusuro: emit's type signature accepts an EventArgs, how could the compiler prevent it? |
06:45:55 | Araq | by making your handleevent incompatible and that's what it does :P |
06:46:03 | * | PMunch quit (Quit: Leaving) |
06:46:51 | Araq | btw don't use the 'events' module, it predates async and is generally unuseful |
06:47:24 | nohusuro | is there any note of that in the documentation? |
06:47:38 | nohusuro | if it predates async, why not make it deprecated? |
06:47:57 | * | gokr joined #nim |
06:49:18 | Araq | PRs welcome |
06:50:29 | Araq | I'm not a fan of stdlib modules which explain type theory |
06:54:46 | FromGitter | <mratsim> Do we need that?: https://wiki.haskell.org/Typeclassopedia |
06:58:15 | nohusuro | 23 |
06:58:24 | nohusuro | hmm, whoops, wrong window |
07:01:02 | * | PMunch_ joined #nim |
07:01:35 | * | endragor quit (Remote host closed the connection) |
07:01:54 | * | PMunch_ is now known as PMunch |
07:04:51 | * | solitudesf joined #nim |
07:05:11 | * | solitudesf quit (Remote host closed the connection) |
07:05:21 | * | Arrrr quit (Ping timeout: 240 seconds) |
07:05:31 | * | solitudesf joined #nim |
07:07:09 | * | endragor joined #nim |
07:07:10 | nohusuro | Araq: coming back to your argument about the subtyping being unsound, events are unsound as it stands anyway with the current typing: http://termbin.com/dp13 |
07:15:13 | nohusuro | I think if events were to stick around EventHandlers should be allowed a type specifier like: var x: EventHandler[xEventArgs] |
07:15:35 | nohusuro | that way the compiler would know which EventTypes should be allowed and throw compiler errors on mismatched types |
07:19:20 | * | claudiuinberlin joined #nim |
07:20:56 | * | claudiuinberlin quit (Client Quit) |
07:29:14 | * | yglukhov joined #nim |
07:31:13 | * | claudiuinberlin joined #nim |
07:33:53 | * | claudiuinberlin quit (Client Quit) |
07:36:25 | * | claudiuinberlin joined #nim |
07:38:59 | * | Sembei joined #nim |
07:39:02 | * | Pisuke quit (Ping timeout: 260 seconds) |
07:48:37 | gokr | Araq: Just curious, what kind of state are we in when it comes to channels/threads/shared nothing concurrency etc etc? |
07:55:02 | * | Yardanico joined #nim |
08:06:31 | Yardanico | hmm, I'm playing around with term rewriting templates/procs - is there a way to capture all table-like literals? e.g. I want to convert {"a": "b"} to Table[string, string] with term rewriting , is it possible? |
08:12:01 | Araq | nohusuro: so you don't understand what "unsound" means, ok. |
08:13:28 | nohusuro | how is the example I showed any more sound than allowing the subtypes? |
08:14:17 | nohusuro | if the subtyping was enforced, that error could have been avoided at compile time |
08:14:35 | nohusuro | anyway, will stick with async |
08:16:43 | Araq | the point of a type system is to prove your types are sound. since it cannot prove it, you have to manually do the object conversion that can fail at runtime. that's the *point* |
08:17:01 | Araq | you need to write it, you then are aware of it. |
08:17:30 | Araq | "it's unsound anyway, because I can write it this way" misses the point. |
08:19:17 | * | mahmudov quit (Ping timeout: 260 seconds) |
08:20:20 | Araq | gokr: we're getting a better threadpool implementation and then that's it, pretty much. |
08:21:44 | gokr | Mmm, you mean "that's it" as in - then it's fully usable in a first incarnation? |
08:22:37 | gokr | IIRC you have mentioned the channels are "slow" earlier, although I am not sure what the problem was. |
08:23:06 | Araq | "that's it" means "good enough for v1" |
08:23:28 | Araq | channels are "slow" in the sense they use locks. |
08:23:29 | gokr | Also, we don't have any lightweight "coroutine"-thingy yet, right? Just catching up, IMHO a good threadpool goes a long way. |
08:23:43 | gokr | Aha, ok, then not *that* slow then. |
08:24:20 | Araq | we had coroutines but nobody works on them and fixing them requires different memory management |
08:25:15 | gokr | Aha, ok. I do note Stefan Talpalaru did a lot of different experiments with chan, Go channels etc etc. But... I would like to stick to "official Nim" stuff. |
08:26:24 | gokr | Btw, just read Dennis article using channels for logging, damn does he write nice articles. |
08:26:37 | Yardanico | Araq, is there a way to match {"1": "1", "2": "2"} in term rewriting template? |
08:27:05 | Demos[m] | Huh so on windows a ~4 line change in times.nim and sysio.nim allow for compilation using clang, lld and the native windows headers and crt |
08:27:09 | gokr | Just in case someone here has missed his articles, it's a gold mine: https://hookrace.net/blog/nim/ |
08:27:28 | Yardanico | Demos[m], make a PR ? :) |
08:27:40 | Yardanico | I did the same a while ago: added intel compiler to times.nim on windows |
08:27:41 | Araq | Yardanico: match against the type in the pattern and then analyse it furhter in the macro body |
08:28:59 | Demos[m] | Yeah not sure how welcome it’d be since when defined(clang) can mean lots of things |
08:29:11 | * | rokups joined #nim |
08:29:11 | Yardanico | Demos[m], when defined(clang) and defined(windows) ? |
08:30:14 | Araq | gokr: I'm still evaluating/implementing memory regions for Nim. I've grown to dislike GCs ;-) |
08:30:15 | * | skrylar quit (Remote host closed the connection) |
08:30:30 | Demos[m] | Msys, Mingw headers (perhaps with different symbols in the crt) or windows kit |
08:30:33 | Demos[m] | Nope that would still match mingw afaik |
08:30:44 | Demos[m] | Also some of the changes may cause breakage elsewhere so I gotta test on lots of tool chains before I make a pr |
08:31:20 | Yardanico | Araq, just write the type in the pattern? like "openarray[tuple[key, val: string]]"? |
08:31:24 | Yardanico | or I need to add {lit} somewhere? |
08:31:52 | gokr | Araq: Hum... so let's say I don't know much about memory regions - can you give me the 2 sentence brief? |
08:32:45 | Araq | Yardanico: openarray[(string, string)] |
08:34:01 | Demos[m] | Is that a specific syntax with that tuple of typedesc? |
08:34:05 | gokr | Araq: Never mind, checking wikipedia :) |
08:34:25 | Demos[m] | Or is it just covered by some part of the syntax I’m not realizing |
08:35:05 | Araq | gokr: allocation takes a region parameter, illegal mixing of inter region pointers is prevented at runtime, whole regions are freed, single deallocs are rare/unsafe |
08:36:14 | gokr | Hmmm. |
08:36:26 | Yardanico | Araq, https://gist.github.com/Yardanico/9a11410ccee6cc4d987c18a4001c0742, please don't blame me for noob TR code |
08:37:17 | Araq | regions can be of a maximal size, a http request could be a region, requests that take too much memory get killed, the server stays alive (well, we'll see about that one) |
08:38:25 | gokr | Araq: Am I correct in guessing that this also fits well with shared nothing concurrency? Simply different regions. |
08:39:07 | Araq | yes. also regions themselves should have 'move' semantics |
08:39:24 | Araq | move the region to a different thread, let it write to it, take it back |
08:39:35 | gokr | Ahhh. |
08:40:00 | livcd | What do you guys use nim for ? |
08:40:24 | gokr | I can't help wonder though how such a model would affect Nim programming in general. |
08:40:37 | Tanger | livcd, Writing a bot for Slack atm |
08:40:52 | PMunch | livcd, pretty much anything |
08:41:57 | PMunch | Games, scripts, research, even made a database implementation in it :) |
08:42:02 | gokr | livcd: I have my experimental language I am building (sprylang.org). I also use it for smaller stuff, like an experimental snapstore implementation (REST service) etc. |
08:42:27 | PMunch | Oh yeah, I've also built some web-things with it. |
08:42:36 | gokr | And I am contemplating to use it for another REST/MQTT service in a EU research project. |
08:43:40 | * | MyMind joined #nim |
08:43:48 | gokr | And I toyed with Nim for Arduino, but... Arduino code is often very short - and you also often want to reuse code from the net - so... I don't consider Nim to be a "good" choice for Arduino. |
08:44:06 | Yardanico | maybe it would be better with memory regions? :) so you can use GC |
08:44:14 | gokr | Also, Arduino style C++ is quite easy anyway ;) |
08:45:03 | * | Sembei quit (Ping timeout: 246 seconds) |
08:45:21 | gokr | livcd: In general I would say Nim is usable in almost all domains. However... not the best pick for all domains, of course. |
08:56:17 | PMunch | gokr, yeah I've wanted to use Nim for Arduino as well. Since it's FFI is so simple I figured it would be easy to use existing C libraries and such. But as you say the code is often so simple anyways that I've never found the time/motivation to try it out vs. writing a couple lines of C code. |
08:58:17 | gokr | Exactly. Now I have written a slightly more complex Arduino thingy, it's about 600 lines of code, and I had to modify two existing C++ libraries also - so... Nim in the mix would have just added complexity. |
08:59:41 | gokr | Araq: Are you still thinking of dumping methods too? |
09:00:04 | federico3 | gokr, PMunch: I've been writing some Nim-only programs for some microcontrollers and sensors. Templating and macros make it faster than arduino |
09:00:32 | gokr | Faster to write I suppose you mean? |
09:00:36 | PMunch | Yeah, that's what I've been hoping for. Just never got around to trying it :P |
09:01:13 | * | BigEpsilon quit (Quit: Leaving) |
09:01:16 | PMunch | federico3, I would love to have a look at your code to see how you've done it :) |
09:01:32 | federico3 | gokr: and to execute. Arduino does a lot of bit manipulation at runtime that could be done at compile time in Nim |
09:02:13 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
09:02:52 | * | claudiuinberlin joined #nim |
09:03:08 | Araq | gokr: yes but more realistic is that I make them "uni" methods and remove the "multi" part from them |
09:03:44 | gokr | Ah, yeah... multimethods are used quite seldomly I think. |
09:04:20 | PMunch | I'm still waiting for the "func" keyword myself. It's such a simple but really neat thing. |
09:07:07 | Yardanico | also I think newbies would mistake "func" with "function" in other programming languages |
09:07:32 | PMunch | So? |
09:07:39 | Araq | "mistake"? that's what functions are, procedures without side effects |
09:07:45 | Yardanico | Araq, I know |
09:07:52 | PMunch | They would quickly notice the difference when they can't make side-effects :P |
09:08:04 | Yardanico | but in other programming languages there's no such thing as noSideEffect procedure |
09:08:11 | Yardanico | *in a lot of other programming languages |
09:08:31 | gokr | A nice error message ought to help there "func's can't have side effects, perhaps you should use a proc?" |
09:10:01 | Araq | PMunch: if we introduce 'func' we should do it properly and forbid writes to all non-var-parameters |
09:10:30 | Araq | makes for an excellent escape analysis |
09:11:41 | Araq | and gives us "deep" immutability. |
09:12:15 | PMunch | Hmm, I'm not quite sure I follow |
09:12:27 | * | yglukhov quit (Read error: Connection reset by peer) |
09:12:56 | * | yglukhov joined #nim |
09:13:24 | Araq | func f(x: ref Node) = x.field = "value" # forbidden |
09:14:06 | PMunch | Oh yeah, that should be forbidden |
09:14:15 | PMunch | Is it not with the "noSideEffect" pragma? |
09:15:01 | * | arnetheduck joined #nim |
09:15:06 | yglukhov | Araq: hi, what do you think https://github.com/nim-lang/website/pull/48 |
09:18:25 | Araq | PMunch: the definition of "side effect" is "accesses global variable (or calls something that has a side effect)" |
09:19:46 | * | claudiuinberlin quit (Read error: Connection reset by peer) |
09:20:34 | Yardanico | Araq, is there some way to get info why some term-rewriting template doesn't match an expression? concepts for example have {.explain.} thing |
09:20:46 | Yardanico | If I call a template explicitely - it works |
09:20:57 | * | dddddd joined #nim |
09:24:54 | * | gangstacat quit (Quit: Ĝis!) |
09:27:18 | PMunch | Ooh, only global... |
09:27:45 | PMunch | Hmm yeah, I would expect a noSideEffect to also apply to your earlier example |
09:28:02 | * | gangstacat joined #nim |
09:28:08 | Yardanico | ah, I can't change variable types with term rewriting, makes sence |
09:28:17 | Yardanico | *sense |
09:32:13 | Yardanico | but sadly there's no norecurse pragma :) https://forum.nim-lang.org/t/338 |
09:37:35 | * | couven92 joined #nim |
09:45:51 | Araq | Yardanico: what are you trying to do? |
09:46:11 | Yardanico | Araq, no, sorry, it was my noobish understanding of TR |
09:46:24 | Yardanico | I juse wonder if this is implemented ? https://forum.nim-lang.org/t/338 |
09:46:58 | Yardanico | about tables: "However, a term rewriting macro should not change the semantics anyway. " |
09:48:05 | Araq | it's not. |
09:49:21 | * | yglukhov quit (Remote host closed the connection) |
09:54:15 | * | Arrrr joined #nim |
09:54:15 | * | Arrrr quit (Changing host) |
09:54:15 | * | Arrrr joined #nim |
10:00:51 | PMunch | Hmm, would it be possible to implement tail-end recursion (by reusing the stack frame) in Nim? |
10:04:03 | Araq | где ты любишь сидеть? на стуле или на кресле или на дибане? |
10:04:14 | Araq | на дне. |
10:04:54 | Araq | ^ no idea if it's correct. |
10:05:13 | * | rabbi joined #nim |
10:05:52 | Yardanico | Araq, well "на дне" means "at the bottom" |
10:05:53 | PMunch | https://translate.google.com/#auto/en/где ты любишь сидеть%3F на стуле или на кресле или на дибане%3Fна дне. |
10:06:04 | * | rabbi quit (Client Quit) |
10:06:14 | Yardanico | Araq, also "диВане", not "диБане" :) |
10:06:21 | PMunch | Yeah, somehow I doubt that this is what you meant to say. But then again it might be google translate that's messing up :P |
10:06:43 | Yardanico | yeah, "на дне" usually used with sea or ocean |
10:06:46 | * | rabbi joined #nim |
10:07:00 | rabbi | /q |
10:07:10 | * | rabbi quit (Client Quit) |
10:07:28 | Yardanico | lol |
10:07:37 | Yardanico | he entered, wrote "/q" and left |
10:07:41 | Araq | Yardanico: I need to say "on the floor" |
10:07:49 | Yardanico | Araq, ah, it's "на полу" |
10:07:57 | Arrrr | I hate these nim syntax changes. Now we have to type in turkish?. |
10:08:04 | Yardanico | https://translate.google.ru/#en/ru/on%20the%20floor |
10:08:20 | Araq | Arrrr: lol |
10:08:37 | * | rabbi joined #nim |
10:09:13 | Araq | pretty sure I never heard полу |
10:09:26 | * | rabbi quit (Client Quit) |
10:09:27 | Araq | this excercise is too hard |
10:09:42 | * | rabbi joined #nim |
10:09:49 | Araq | what's the nominative? |
10:10:08 | Yardanico | Araq, "пол" |
10:10:49 | Yardanico | it can mean either "floor" or "gender" |
10:10:52 | Araq | it's a test, if I get it right my teacher knows I had help |
10:11:51 | * | yglukhov joined #nim |
10:14:05 | * | rabbi_ joined #nim |
10:16:14 | * | rabbi_ quit (Client Quit) |
10:16:58 | * | rabbi_ joined #nim |
10:20:26 | Araq | is дочь neutrum? |
10:20:39 | crem | feminine |
10:21:16 | Araq | ok thanks |
10:22:16 | crem | btw пол-gender and пол-floor have different forms in prepositional case. A few words have different locative and prepositional cases (лес, луг, etc), but it seems that пол is not one of those, although it almost looks like it is. |
10:22:50 | * | rabbi quit (Quit: Lost terminal) |
10:23:34 | FromGitter | <Grabli66> Araq is teaching russian language? :) |
10:23:42 | crem | learning |
10:23:53 | crem | teaching is the opposite. :) |
10:24:05 | FromGitter | <Grabli66> Yes. Learning :) |
10:25:40 | crem | There is a pretty active discord server for those who learns russian btw. Especially useful to practice speaking I think. |
10:27:14 | * | mahmudov joined #nim |
10:27:36 | Araq | every single word is painful :P |
10:27:45 | FromGitter | <Grabli66> Why he is doing that? He wants migrate into Russia? |
10:28:37 | Araq | mostly to train my brain |
10:30:42 | * | Ven`` joined #nim |
10:31:11 | FromGitter | <Grabli66> Then you'll need learn the meaning of "трахнем по писюрику" :) |
10:32:52 | crem | For listening practice, there are radio stations which have full text transcript of their programs. |
10:35:00 | * | BitPuffin|osx joined #nim |
10:39:50 | * | rabbi_ quit (Quit: leaving) |
10:40:38 | Yardanico | Grabli66: even I don't know the meaning of "писюрик", but I know that this translates to something like "let's drink some vodka" :D |
10:40:58 | Yardanico | and russian is my native language |
10:43:07 | * | endragor_ joined #nim |
10:43:07 | * | endragor quit (Read error: Connection reset by peer) |
10:43:22 | * | endragor_ quit (Remote host closed the connection) |
10:44:10 | * | endragor joined #nim |
10:44:11 | FromGitter | <Grabli66> I think it's the unit of measure of vodka. Which means to drink a little vodka. |
10:44:19 | Yardanico | well it's not commonly used |
10:45:24 | crem | I don't understand why people always try to teach others swear/weird russian words. It's not the same when learning other languages. |
10:45:53 | crem | but |
10:45:54 | FromGitter | <Grabli66> It was joke. |
10:46:41 | Yardanico | well all know about vodka and bears + balalaika :P |
10:47:27 | crem | In Switzerland they always ask foreigners to pronounce Chuchichäschtli. But it's not that hard or not funny at all (to foreign ear), yet it's very common. |
10:47:37 | * | yglukhov quit () |
10:48:14 | crem | Russian "защищающийся" is even more weird, but I've never seen anyone being proud for having that word. |
10:49:25 | crem | And защищающийся (defending) is more common word than Chuchichäschtli (small kitchen cupboard). |
10:53:15 | * | rauss quit (Read error: Connection reset by peer) |
10:55:10 | * | yglukhov joined #nim |
10:55:41 | * | rauss joined #nim |
10:58:08 | * | Ven`` quit (Ping timeout: 240 seconds) |
11:01:49 | FromGitter | <Varriount> Araq: While you learn Russian, I'm learning German. So far the biggest difficulty is remembering the gender of all the nouns, and how to use various prepositions |
11:03:52 | FromGitter | <Grabli66> If there are so many russian speakers, and Araq will learn russian. Тогда может быть по-русски будем общаться? :) |
11:06:35 | crem | Entweder Deutsch oder Russisch. Wir soll nur Englisch verbieten. |
11:09:19 | livcd | heh my family was forced to learn both russian and german during "occupations". Sadly that affected me in a way that I cant develop any positive feelings towards both of them |
11:09:41 | Araq | varriount: the genders are not that hard, often the suffix determines it |
11:10:45 | Araq | die Uhr, die Schnur, der Flur ... oops |
11:10:49 | crem | Remembering which preposisions (+case) to use with which verbs is the hardest for me. |
11:11:24 | crem | Schnur is the same in Russian btw. :) |
11:11:37 | crem | шнур |
11:12:07 | * | yglukhov quit (Remote host closed the connection) |
11:13:55 | livcd | my grandmother is still mixing a lot of german words when she talks to us |
11:29:20 | * | ShalokShalom quit (Read error: Connection reset by peer) |
11:31:34 | * | yglukhov joined #nim |
11:36:20 | * | yglukhov quit (Remote host closed the connection) |
11:36:51 | * | ShalokShalom joined #nim |
11:39:30 | * | yglukhov joined #nim |
11:44:02 | * | yglukhov quit (Ping timeout: 260 seconds) |
11:52:26 | * | ShalokShalom_ joined #nim |
11:55:06 | * | ShalokShalom quit (Ping timeout: 246 seconds) |
12:01:18 | Arrrr | Is there a set limit for enums? |
12:03:24 | * | Snircle joined #nim |
12:03:27 | * | nattefrost joined #nim |
12:03:35 | * | yglukhov joined #nim |
12:06:36 | * | yglukhov quit (Remote host closed the connection) |
12:06:46 | FromGitter | <Varriount> Arrr: Yes, although it's ridiculously high |
12:06:59 | Yardanico | int32.high ? |
12:11:17 | * | krux02 joined #nim |
12:15:11 | * | krux02 quit (Remote host closed the connection) |
12:15:51 | * | krux02 joined #nim |
12:16:22 | subsetpark | Jiddisch ist wie Deutsch, nur... <doesn't know how to say 'simpler'> |
12:16:47 | crem | einfacher ? |
12:16:58 | * | ShalokShalom_ is now known as ShalokShalom |
12:22:28 | * | renarc quit (Ping timeout: 240 seconds) |
12:23:55 | FromGitter | <krux02> I don't know, but a set of enums is done with a bit flags in an integer |
12:23:59 | FromGitter | <Bennyelg> My wife is russian |
12:24:15 | FromGitter | <Bennyelg> I will learn from her if it's necessary /:D |
12:24:16 | FromGitter | <krux02> so I would not recommend enums higher than 64 elements when you want to use sets |
12:24:41 | FromGitter | <krux02> I had a russian ex girldfriend, I did not learn from her :/ |
12:24:52 | FromGitter | <Bennyelg> I just know hour to curse :D |
12:25:34 | FromGitter | <krux02> well either "I had a girlfriend", or "I have an ex girlfriend" :shrug: |
12:25:58 | FromGitter | <Bennyelg> heheh |
12:26:45 | FromGitter | <Bennyelg> I am from Israel , and I am expecting a child now, interesting what will came from russian & some middle east roots :D |
12:27:13 | * | yglukhov joined #nim |
12:29:22 | * | tax joined #nim |
12:30:15 | * | manjaro-kde5- joined #nim |
12:31:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
12:31:44 | Yardanico | Well there are many nationalities in Russia |
12:32:12 | subsetpark | Bennyelg - where in ISR? |
12:32:47 | * | renarc joined #nim |
12:43:41 | * | renarc quit (Remote host closed the connection) |
12:49:43 | * | rokups quit (Quit: Connection closed for inactivity) |
12:52:28 | FromGitter | <Bennyelg> Yavne |
12:53:57 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
13:00:02 | subsetpark | Oh not far at all from TA- my partner is from there |
13:01:39 | * | gangstacat quit (Quit: Ĝis!) |
13:11:07 | * | madmalik joined #nim |
13:11:45 | Yardanico | dom96, it seems that getSystemVersion in posix.nim ( in osinfo package) can be improved a bit: https://gist.github.com/Yardanico/b55579a53c82f9ae02e4c40cf7fbb063 |
13:12:18 | Yardanico | especially the mac os x part |
13:12:25 | dom96 | so make a PR |
13:17:13 | Yardanico | -13 lines of code! |
13:17:17 | Yardanico | https://github.com/nim-lang/osinfo/pull/5 |
13:17:27 | crem | No PR is bad! |
13:20:11 | FromGitter | <mratsim> @Araq On this issue, https://github.com/nim-lang/Nim/issues/6387 there is no need to go Linus Torvalds on me. In any case, there is an inconsistency, either all procs (generic and non-generic) require mixin, or none. Given Nim focus on metaprogramming I think it would be really beneficial to have macro resolve before generic type checking, so replacement could occur before. |
13:22:08 | FromGitter | <mratsim> I could workaround by exporting * with `**` but it might have unexpected side effect on tuple deconstruction like `(a, _) = (1, 2)` |
13:23:34 | FromGitter | <mratsim> Gitter formating "exporting \_ with `\_*`" |
13:23:52 | FromGitter | <krux02> @mratsim how do you think that macros can resolve before generic type checking? |
13:24:31 | FromGitter | <krux02> macros can have typed arguments, meaning the type checker needs to run |
13:25:03 | FromGitter | <krux02> or am i misunderstanding something |
13:25:06 | FromGitter | <mratsim> My macro is untyped in this case, and works if the proc is non-generic |
13:25:40 | FromGitter | <mratsim> But as soon as I add [T], I get invalid identifier |
13:26:18 | FromGitter | <mratsim> There is a test case with 3 examples in the ticket |
13:27:47 | FromGitter | <mratsim> Actually I misspoke it's not type resolution, it's identifier resolution that happens before macro resolution |
13:27:59 | FromGitter | <mratsim> But only with generics |
13:28:48 | Yardanico | 3990 stars! |
13:29:05 | FromGitter | <Bennyelg> |
13:29:06 | FromGitter | <krux02> well ... I don't get that error you get |
13:29:47 | * | couven92 quit (Quit: Client disconnecting) |
13:30:11 | FromGitter | <mratsim> Unless I should add mixin the other way, in the macro? I can't test yet |
13:30:38 | FromGitter | <krux02> ah now I get the error |
13:30:48 | FromGitter | <krux02> I actually have to use two different modules |
13:30:51 | FromGitter | <Bennyelg> Ok so I am starting to create AWS library starting to mimic all the botocore functionality. |
13:30:52 | FromGitter | <krux02> yea I see |
13:30:55 | FromGitter | <Bennyelg> wish me luck :D |
13:36:51 | euantor | Regarding osinfo it would be nice to have common APIs for all systems |
13:37:00 | euantor | I'm going to try find some time to clean it up a little more |
13:45:39 | * | relax joined #nim |
13:46:50 | * | shashlick joined #nim |
13:50:07 | * | endragor quit (Remote host closed the connection) |
13:51:12 | krux02 | euantor: It would be nice if everybody would use the same system :P |
13:51:21 | euantor | sure would |
13:51:39 | krux02 | the one system |
13:52:06 | euantor | Question is: which one? |
13:52:41 | FromGitter | <mratsim> I gave up on standards: https://imgs.xkcd.com/comics/standards.png |
13:53:48 | * | endragor joined #nim |
13:58:23 | * | endragor quit (Ping timeout: 248 seconds) |
14:04:37 | relax | I get this error when I "nimble install yaml" -- any tips on how to debug? Error: unhandled exception: File exists [OSError] |
14:05:22 | PMunch | relax, you appear to have a file that the package is trying to create |
14:05:35 | * | PMunch quit (Quit: Leaving) |
14:06:29 | flyx | well that's kind-of obvious, but probably does not help much. |
14:06:50 | relax | strace-ing the install doesn't show any obvious smoking guns |
14:07:45 | flyx | can you install other packages? |
14:07:59 | relax | yes |
14:08:13 | dom96 | run with --debug |
14:09:13 | relax | very last log output is a file copy in the install: |
14:09:20 | relax | Copying file /tmp/nimble_32160/githubcom_flyxNimYAML/test/yaml-test-suite/name/block-scalar-indicator-order to /home/john/.nimble/pkgs/yaml-0.10.2/test/yaml-test-suite/name/block-scalar-indicator-order |
14:10:09 | dom96 | Does that file exist? :) |
14:10:47 | relax | I mean, I guess it must :) |
14:11:09 | dom96 | Well, the error could be misleading |
14:11:10 | relax | but if it does, it must have been created by the install |
14:11:26 | flyx | relax: I can imagine where the error comes from. yaml-test-suite is a submodule and contains various soft links that may mess up depending on your operating system |
14:11:52 | relax | hmmm, on Ubuntu? |
14:11:54 | shashlick | trying my async question again - never get to line 15, any ideas? https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286 |
14:12:02 | dom96 | why would you put soft links in a git repo? |
14:12:05 | flyx | relax: I did not know nimble does fetch submodules and will exclude that from the nimble file |
14:12:37 | flyx | dom96: the folks I work with on the test suite are Perl coders and like to do such things ;) |
14:12:55 | dom96 | shashlick: exeProcess isn't async |
14:12:58 | * | gangstacat joined #nim |
14:12:59 | dom96 | *execProcess |
14:13:41 | dom96 | but that shouldn't be a problem really |
14:13:51 | dom96 | does line 10 get called? |
14:14:13 | shashlick | dom96: yes, it does, and i get the return value as expected |
14:14:40 | shashlick | and it does run multiple execs in parallel in effect |
14:15:35 | dom96 | what do you mean you get the return value as expected? |
14:16:21 | * | gokr quit (Ping timeout: 240 seconds) |
14:16:23 | shashlick | dom96: if I print jdata which is the json representation of the output from the execProcess, it is as I would expect without async |
14:17:08 | shashlick | so if I add a line to echo jdata, it's there in get_fingerprint(), but findmusicdup() doesn't continue |
14:17:29 | dom96 | that's weird. |
14:17:33 | flyx | relax: as quick fix, delete the directory /tmp/nimble_32160/githubcom_flyxNimYAML/test/yaml-test-suite and copy the rest, that may work. |
14:18:00 | dom96 | bbl |
14:18:07 | relax | flyx: it seems to clean up after itself |
14:18:20 | relax | so, that whole tree is gone |
14:18:31 | relax | also, the file that it seems to be erroring on doesn't actually exist |
14:19:23 | flyx | it does, but is a symlink. |
14:19:33 | flyx | see https://github.com/yaml/yaml-test-suite/tree/f1c5f445fe675fc3f95f602a79a0fa7e9d933903/name |
14:20:17 | flyx | well, I wanted to migrate from git-submodules to git-subrepo anyway, this seems to be a good time. |
14:20:19 | relax | oh, sorry, meant that the destination doesn't exist |
14:20:31 | relax | would adding "test" to skipDirs help? |
14:20:39 | flyx | probably. |
14:20:54 | flyx | definitely. |
14:20:55 | relax | a couple other directories are giving similar warnings |
14:22:48 | flyx | actually, everything but the yaml folder may be skipped |
14:25:52 | flyx | I'll need to make a new release, will probably be done this evening. stay put. |
14:26:26 | flyx | kinda strange this did not surface earlier. |
14:26:31 | relax | okay -- just sent you a really simple PR too: https://github.com/flyx/NimYAML/pull/45 |
14:26:46 | relax | thanks for your help! |
14:27:33 | flyx | yeah well, this does not suffice. I will also need to bump the version number and add a changelog entry -- just way for the release ;) |
14:27:41 | flyx | *wait |
14:28:03 | relax | sure, sounds good |
14:41:21 | dom96 | you can also merge it and let relax install it via `nimble install yaml@#head` :) |
14:42:09 | * | gangstacat_ joined #nim |
14:42:21 | * | yglukhov joined #nim |
14:42:48 | * | gangstacat quit (Quit: Leaving) |
14:42:56 | * | gangstacat_ is now known as gangstacat |
14:51:41 | shashlick | how do you yield in an async proc? |
14:52:21 | subsetpark | dom96: trying to clean out my nimble/choosenim and start fresh after all that hacking i was doing a while ago. i've gotten rid of ~/.choosenim and ~/.nimble and ~/.config/nimble - something else is left though |
14:52:42 | subsetpark | https://www.irccloud.com/pastebin/kPe8Vc85/ |
14:52:58 | subsetpark | What could be left that is pointing to .choosenim? |
14:53:45 | dom96 | NIM_LIB_PREFIX env var? |
14:54:01 | subsetpark | nice one! |
14:54:29 | dom96 | please submit an error for this, nimble should state that it's using this env var. |
14:55:01 | subsetpark | |
14:58:41 | subsetpark | ooh, and I've got another one coming... nimble doesn't recognize git@ URLs :) |
15:05:55 | subsetpark | ah, its trickier than that i guess ... :/ |
15:10:22 | Yardanico | argh, convince your friends to add a star to github nim repo! |
15:12:17 | * | jsgrant joined #nim |
15:14:23 | * | gokr joined #nim |
15:19:25 | * | nsf quit (Quit: WeeChat 1.9) |
15:23:49 | shashlick | zero luck with asyncdispatch - wish there were more examples |
15:24:30 | Yardanico | shashlick, "await" or "yield" ? |
15:24:36 | shashlick | dom96, nohusuro: I put execProcess() into a separate proc and now the code continues, but it runs in sequence instead of running multiple procs in parallel |
15:25:08 | * | gokr quit (Ping timeout: 240 seconds) |
15:26:10 | shashlick | updated gist: https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286 |
15:26:51 | shashlick | I even tried spawn() on the execProcess and an isReady() loop but it still blocks |
15:27:16 | shashlick | i tried sleepAsync() to get the thread to yield within that loop and it just sits in that loop, doesn't suspend |
15:28:15 | Yardanico | shashlick, your code is not async |
15:28:22 | Yardanico | shashlick, execProcess blocks the entire thread |
15:31:01 | Yardanico | shashlick, you can try this - https://github.com/cheatfate/asynctools |
15:36:01 | * | ShalokShalom quit (Remote host closed the connection) |
15:38:45 | * | ShalokShalom joined #nim |
15:41:11 | * | msmorgan joined #nim |
15:45:14 | relax | contrary to the docs at https://nim-lang.org/docs/osproc.html, I have to call .inputStream.close() on a process otherwise it'll wait forever for EOF on its input |
15:45:42 | relax | am I missing something? |
15:50:49 | * | Trustable joined #nim |
15:51:15 | shashlick | Yardanico: I'll check it out thanks. If I spawn execProcess(), it doesn't block anymore so I can poll the process and yield. Even then it doesn't work |
15:56:09 | shashlick | Yardanico: asynctools is great - thank you! |
15:57:51 | * | vlad1777d joined #nim |
15:58:47 | * | tax quit (Ping timeout: 246 seconds) |
16:09:11 | * | BigEpsilon joined #nim |
16:14:09 | FromGitter | <ephja> ===nim yields too many unrelated things :p=== |
16:14:24 | Yardanico | ? |
16:16:56 | * | Xe is now known as uuuuuuuuuuuuuuuu |
16:17:00 | * | uuuuuuuuuuuuuuuu is now known as Xe |
16:17:28 | FromGitter | <ephja> I always mess up the markdown. #test |
16:17:46 | FromGitter | <ephja> I meant the #nim tag, on twitter for example |
16:21:08 | * | shashlick quit (Ping timeout: 240 seconds) |
16:25:36 | * | yglukhov quit (Remote host closed the connection) |
16:28:42 | * | Ven`` joined #nim |
16:33:32 | * | vlad1777d quit (Remote host closed the connection) |
16:34:47 | FromGitter | <Bennyelg> Hey, today it's an holiday , its the Jewish new year. ⏎ I want to congratulate you with "Sana tova", a good health to you and to your family & friends, ⏎ I wish this year will be better for you all. ⏎ And I hope that Nim will release 1.0.0 version. ⏎ ... [https://gitter.im/nim-lang/Nim?at=59c298a7614889d4751f5db1] |
16:35:02 | * | solitudesf quit (Remote host closed the connection) |
16:35:05 | FromGitter | <Bennyelg> Shana* |
16:35:18 | Yardanico | wow, thanks, you too! :) |
16:36:24 | * | TjYoco joined #nim |
16:37:43 | dom96 | Happy Jewish new year :) |
16:38:45 | FromGitter | <krux02> https://i.imgur.com/Up4WVU3.png |
16:38:59 | Yardanico | what is this? |
16:39:02 | FromGitter | <krux02> yay changed a few lines to get roguelike rendering :P |
16:39:19 | FromGitter | <krux02> it is from my project opengl-sandbox |
16:39:27 | FromGitter | <mratsim> Nim is still easier to search than go |
16:39:33 | FromGitter | <krux02> it is an opengl tile renderer |
16:39:40 | FromGitter | <mratsim> Btw who did this? https://www.quora.com/I-developed-a-programming-language-thats-better-than-Go-Swift-Java-C-C++-C-Python-etc-Should-I-monetize-it |
16:39:41 | Yardanico | btw, Bennyelg, we are not so original in russia, so our new year is 31th of december - 1th of january :) |
16:40:10 | Yardanico | mratsim: lokl |
16:40:12 | Yardanico | lol |
16:41:06 | * | nsf joined #nim |
16:41:10 | FromGitter | <zacharycarter> @krux02 mind sharing the source? |
16:41:32 | FromGitter | <krux02> of course you can see it |
16:41:58 | FromGitter | <zacharycarter> @krux02 you sould try integrating it with my rl library |
16:45:20 | FromGitter | <krux02> https://github.com/krux02/opengl-sandbox/blob/master/examples/retro_tiling.nim |
16:45:59 | FromGitter | <krux02> it was really just a few lines changed for my already existing tile renderer |
16:46:18 | FromGitter | <krux02> it has smooth scrolling |
16:46:30 | FromGitter | <krux02> a map that is limited by the size of an opengl texture |
16:46:31 | * | shashlick joined #nim |
16:47:42 | FromGitter | <krux02> well you can do it |
16:48:13 | FromGitter | <krux02> but it has the property to use standards that Apple does not implement |
16:49:08 | FromGitter | <krux02> ok people I have to catch a train |
16:49:09 | FromGitter | <krux02> bye |
16:49:40 | * | krux02 quit (Remote host closed the connection) |
17:07:45 | flyx | relax: I pushed a new NimYAML release, should now work with nimble |
17:11:01 | * | BigEpsilon quit (Ping timeout: 240 seconds) |
17:12:05 | * | gokr joined #nim |
17:17:29 | * | BigEpsilon joined #nim |
17:23:34 | * | yglukhov joined #nim |
17:25:17 | * | mahmudov quit (Ping timeout: 260 seconds) |
17:25:34 | * | mahsav2 quit (Ping timeout: 264 seconds) |
17:31:02 | FromGitter | <zacharycarter> okay I finally understand how roguelikes do font rendering now |
17:31:08 | FromGitter | <zacharycarter> took me way too long to understand that |
17:37:32 | * | claudiuinberlin joined #nim |
17:40:34 | * | BigEpsilon quit (Ping timeout: 264 seconds) |
17:40:35 | FromGitter | <ephja> they blit the glyphs onto a grid? :p |
17:45:22 | * | zachk joined #nim |
17:46:28 | FromGitter | <zacharycarter> yeah but I couldn't figure out they figured out what glyph to render without some kind of mapping |
17:46:36 | FromGitter | <zacharycarter> like a bitmap font file |
17:46:39 | FromGitter | <zacharycarter> but they do it without it |
17:48:28 | relax | thanks flyx! |
18:00:50 | * | elrood joined #nim |
18:02:21 | * | skrylar joined #nim |
18:10:50 | Yardanico | someone unstarred nim repo :D |
18:11:11 | * | vlad1777d joined #nim |
18:14:36 | * | Jesin quit (Quit: Leaving) |
18:15:40 | FromGitter | <zacharycarter> bastard |
18:16:21 | * | vlad1777d quit (Ping timeout: 240 seconds) |
18:17:56 | FromGitter | <ephja> we need to find out who that person is |
18:18:03 | * | PMunch joined #nim |
18:18:09 | * | BitPuffin|osx quit (Ping timeout: 248 seconds) |
18:18:24 | TjYoco | should i sell my stock now? |
18:22:16 | Yardanico | we can definitely write a thing which will compare (with github api) who starred nim repo and who unstarred it |
18:22:19 | Yardanico | if we will log it |
18:24:49 | FromGitter | <Grabli66> You want find him and beat? :) |
18:25:04 | Yardanico | no-no-no |
18:25:07 | Yardanico | just ask him why |
18:25:22 | FromGitter | <ephja> we have thugs on the payroll, right? |
18:26:08 | * | yglukhov quit (Remote host closed the connection) |
18:27:15 | Arrrr | If zach is not too busy with concepts ... |
18:27:37 | Yardanico | :D |
18:27:53 | FromGitter | <ephja> actually, neither Araq nor Zah are particularly threatening IMHO |
18:28:48 | Yardanico | but Araq can protect us from trolls! |
18:29:00 | FromGitter | <Grabli66> He betrayed us, cause Nim does not have interfaces :) |
18:29:29 | Yardanico | https://forum.nim-lang.org/t/31 :) |
18:29:42 | Yardanico | and http://openmymind.net/Interfaces-In-Nim/ |
18:29:47 | FromGitter | <ephja> it doesn't even have a fizzbuzz generator factory |
18:31:00 | Yardanico | ehm, www-ait |
18:31:13 | Yardanico | so "streams" use almost interface-like thing |
18:31:14 | FromGitter | <Grabli66> It's him. Look at his face. It must be him :) |
18:32:26 | Arrrr | That blog went full elixir |
18:32:44 | skrylar | elixirs neat, kinda. |
18:32:52 | Yardanico | Arrrr, this blog contains only one article about Nim :P |
18:34:07 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:35:42 | * | madmalik quit (Quit: Connection closed for inactivity) |
18:36:08 | * | Jesin joined #nim |
18:36:39 | FromGitter | <brentp> I thought nim concepts were like interfaces. at least "interfaces" in the golang sense |
18:36:52 | skrylar | i think concepts only apply at compile time |
18:37:11 | Yardanico | yeah |
18:37:16 | skrylar | although its probably possible to make a macro that gives you go interfaces |
18:38:03 | FromGitter | <brentp> oh. now I see TFA |
18:42:11 | * | yglukhov joined #nim |
18:44:15 | * | shashlick quit (Ping timeout: 246 seconds) |
18:46:02 | PMunch | Shhh, don't let Araq see you call them interfaces |
18:49:17 | FromGitter | <Varriount> @brentp At some point in the future there will be a way to create run-time interfaces with concepts. |
18:49:21 | Yardanico | yes |
18:49:26 | Yardanico | "vtref" and "vtptr" |
18:49:54 | FromGitter | <Varriount> Lo, the vtrefs and vtptr types will come, and all will be milk and honey. |
18:50:27 | Yardanico | anyone wants a seq of users who starred nim repo? in marshal (json) format ? :D |
18:50:48 | Yardanico | here you go - https://transfer.sh/hZsOd/data.txt |
18:51:16 | Yardanico | I'll share a code now, it's very simple |
18:51:26 | FromGitter | <Grabli66> "vtref" and "vtptr". What is this? |
18:51:38 | Yardanico | you will be able to use concepts at run-time |
18:51:49 | Yardanico | e.g. create a seq[SomeVtrefConcept] |
18:51:50 | FromGitter | <Grabli66> Cool. |
18:52:07 | FromGitter | <Grabli66> Awesome :) |
18:52:09 | FromGitter | <Grabli66> When? |
18:52:17 | Yardanico | God (Araq) knows |
18:53:26 | FromGitter | <Varriount> Well, I believe Zahary was the one working on concepts. I don't know if he's done anything recently though. |
18:55:22 | * | shashlick joined #nim |
18:57:15 | dom96 | If zahary agrees with my suggestion then "vtref concept" will become "interface". |
18:59:19 | subsetpark | dom96: this is obnoxious, but if you can fast track https://github.com/nim-lang/packages/pull/585 i'd appreciate it |
19:00:20 | dom96 | Sure, done. |
19:00:33 | subsetpark | :P |
19:00:47 | * | fastrom joined #nim |
19:01:11 | subsetpark | dziękuję |
19:03:00 | dom96 | Tá fáilte romhat |
19:03:25 | * | nsf quit (Quit: WeeChat 1.9) |
19:04:26 | subsetpark | uhh |
19:04:28 | subsetpark | slainte |
19:04:33 | subsetpark | I assume |
19:05:24 | dom96 | Huh? :) |
19:06:25 | subsetpark | just meeting your erse with some erse of my own |
19:09:16 | dom96 | oh hah, it's an actual English word. |
19:09:28 | dom96 | Nice |
19:10:51 | * | Snircle joined #nim |
19:13:48 | * | vendethiel- joined #nim |
19:14:05 | * | jjido joined #nim |
19:14:18 | * | Ven`` quit (Ping timeout: 252 seconds) |
19:16:13 | shashlick | Yardanico: I'm using asynctools so that I can do await execProcess() - processes are executed as expected but again, the function does not resume after the exec completes |
19:17:48 | shashlick | updated gist: https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286 |
19:18:43 | shashlick | difference here is that all processes are kicked off in parallel so the async is working that way, that it didn't before with the osproc.execProcess(), but after they complete, the procs don't resume |
19:20:52 | yglukhov | dom96: hey, https://github.com/nim-lang/website/pull/48 has got a green light =) |
19:21:20 | dom96 | Awesome |
19:21:28 | dom96 | Any news on the logo? |
19:21:33 | yglukhov | dom96: the logo is being worked on, will likely be ready tomorrow |
19:21:38 | dom96 | cool |
19:22:34 | yglukhov | dom96: also we have to do smth about nimble patches. the crew had to switch to my fork again =) |
19:23:24 | yglukhov | honestly i havent yet investigated 400, but 403 should be good enough |
19:24:00 | dom96 | new website should be live soon |
19:24:20 | dom96 | I might not get a chance to look into that PR today |
19:24:30 | dom96 | but will try to keep it in mind |
19:24:39 | yglukhov | cool, thanks |
19:24:49 | * | jjido quit (Ping timeout: 248 seconds) |
19:25:25 | * | BitPuffin|osx joined #nim |
19:33:22 | * | mahmudov joined #nim |
19:36:41 | * | vendethiel- quit (Ping timeout: 240 seconds) |
19:36:46 | Yardanico | :D https://gist.github.com/Yardanico/c9520e036f4eab6e07fe0926bddd72e6 |
19:41:37 | subsetpark | we've got a new logo?? |
19:41:58 | Yardanico | subsetpark, noo |
19:42:03 | Yardanico | it's Reel Valley logo |
19:42:19 | Yardanico | a logo of yglukhov's game to nim-lang website |
19:42:26 | Yardanico | featured projects stuff |
19:46:19 | * | yglukhov quit (Remote host closed the connection) |
19:55:41 | FromGitter | <Varriount> Is there a way to play that game without having a facebook account? |
19:59:17 | * | mahmudov quit (Ping timeout: 260 seconds) |
20:00:19 | FromGitter | <mratsim> buy Nim in Action? :p |
20:00:53 | FromGitter | <mratsim> “Nim Humble Bundle" |
20:01:20 | FromGitter | <mratsim> Actually that could be a thing ! |
20:01:24 | * | manjaro-kde5_ joined #nim |
20:02:19 | Yardanico | Varriount: wait for android/ios release :P |
20:04:35 | * | manjaro-kde5- quit (Ping timeout: 240 seconds) |
20:13:47 | FromGitter | <brentp> Inside of a function, I am creating `var meta = new_sequint8 (L)` and then passing to a C function: `hts_idx_set_meta(idx, cint(len(meta)), castptr uint8 (meta), cint(0))` how can I do the equivalent of this so that meta is not GC'ed or how can I pass something that's not GC'ed? |
20:14:28 | FromGitter | <brentp> GC_unref ? |
20:15:10 | Araq | does the C function take ownership of the data? |
20:15:22 | Araq | usually it doesn't and so you don't have to do anything to keep the GC happy |
20:15:38 | FromGitter | <brentp> in this case, it does |
20:15:57 | Araq | then you need to GC_ref the seq and eventually GC_unref it, yes |
20:18:39 | * | TjYoco quit (Ping timeout: 248 seconds) |
20:18:50 | FromGitter | <brentp> ok. thanks. as it goes, I found GC_ref immediately after posting |
20:19:08 | * | Vladar quit (Quit: Leaving) |
20:22:03 | * | manjaro-kde5- joined #nim |
20:24:39 | * | PMunch quit (Quit: leaving) |
20:26:10 | * | manjaro-kde5_ quit (Ping timeout: 264 seconds) |
20:28:02 | * | yglukhov joined #nim |
20:28:15 | FromGitter | <edubart> I am trying to do some codes with generics, but every now and then I step on a bug in the compiler, I've created some issues just now |
20:28:49 | * | Arrrr quit (Read error: Connection reset by peer) |
20:29:49 | FromGitter | <edubart> unluckily I found bug inside a workaround of another bug that I've previously found |
20:31:13 | FromGitter | <edubart> now I need a workaround for the bug in workaround for another bug >.> |
20:41:39 | * | Yardanico quit (Remote host closed the connection) |
20:43:32 | * | TjYoco joined #nim |
20:50:57 | * | Trustable quit (Remote host closed the connection) |
20:55:53 | * | rabbi joined #nim |
20:56:11 | * | arnetheduck quit (Remote host closed the connection) |
20:57:01 | * | shashlick quit (Ping timeout: 240 seconds) |
20:59:08 | * | relax quit (Ping timeout: 240 seconds) |
21:03:03 | * | shashlick joined #nim |
21:05:18 | * | rabbi quit (Quit: Lost terminal) |
21:06:00 | * | mahmudov joined #nim |
21:07:18 | * | manjaro-kde5_ joined #nim |
21:09:33 | * | libman joined #nim |
21:09:53 | skrylar | https://imgur.com/a/DmRRC that could have gone better :\ |
21:10:21 | * | manjaro-kde5- quit (Ping timeout: 252 seconds) |
21:19:01 | * | elrood quit (Quit: Leaving) |
21:20:20 | * | nattefrost quit (Remote host closed the connection) |
21:21:54 | libman | Um, am I in the right channel? |
21:22:01 | msmorgan | For what? |
21:22:23 | FromGitter | <Yardanico> Hi libman |
21:22:40 | libman | Was that image generated in Nim? |
21:22:54 | FromGitter | <Yardanico> xD ask skrylar |
21:26:19 | * | dddddd quit (Ping timeout: 240 seconds) |
21:28:10 | skrylar | what, people post their sprite art games in here all the time |
21:31:02 | * | TjYoco quit (Quit: Leaving) |
21:31:54 | libman | Did Nim find a new niche in interactive VR musclepr0n? |
21:32:50 | * | vlad1777d joined #nim |
21:33:36 | skrylar | ah you just wanted to be a jerk. whatever |
21:36:26 | libman | Me? Jerk? Never! I fully support your, um, preferences and whatnot. |
21:37:36 | FromGitter | <Yardanico> skrylar: but these games are made in Nim :P |
21:38:14 | FromGitter | <Yardanico> Anyway good... ehm.. 3D model |
21:39:58 | FromGitter | <Yardanico> "Muscleporn", I haven't seen that one yet, hmm |
21:40:39 | FromGitter | <Yardanico> Oh shit it's actually a real thing |
21:43:45 | * | dddddd joined #nim |
21:43:48 | * | gokr quit (Ping timeout: 240 seconds) |
21:44:04 | skrylar | i wonder if putting that pixel-perfect filter on vector rendering would work for animated sprites |
21:44:16 | skrylar | like what synfig does but with the tweak so the little sprite outlines don't mess up |
21:44:29 | libman | Ok, I get it. NIM project is now rebranding itself from "New Improved Modula-3" to "Nondeterministic Interactive Musclepr0n" |
21:45:18 | skrylar | although that algorithm is dependent on the order pixels are drawn, it might be better to use a multisampling filter |
21:45:27 | skrylar | shrug |
21:49:18 | * | Jesin quit (Quit: Leaving) |
21:55:24 | * | thomasross joined #nim |
22:02:08 | * | shashlick quit (Ping timeout: 240 seconds) |
22:05:47 | * | adeohluwa joined #nim |
22:05:53 | adeohluwa | :) |
22:06:08 | adeohluwa | this error I get |
22:06:25 | adeohluwa | spawn takes a GC safe call expression |
22:07:24 | adeohluwa | yglukhov: am using tips u provided |
22:07:58 | adeohluwa | import threadpool, use spawn, compile with --threads:on |
22:09:46 | * | jsgrant quit (Quit: jsgrant) |
22:12:33 | * | nsf joined #nim |
22:14:59 | * | mahsav joined #nim |
22:19:40 | * | shashlick joined #nim |
22:24:13 | skrylar | hm. don't the docs say the compiler won't chain converters |
22:24:37 | skrylar | was just thinking about importing C++ classes with multiple base types |
22:24:50 | skrylar | you can have a converter enforce the heirarchy but if its like 3 layers deep it might take some doing |
22:34:13 | * | yglukhov quit (Remote host closed the connection) |
22:38:43 | shashlick | Yardanico, dom96, nohusuro: Turns out my async implementation wasn't working since I wasn't calling poll() or runForever() to invoke the dispatcher. Noob error and it's the second paragraph in the asyncdispatch help. It is also present in the asyncnet sample code but wasn't obvious. |
22:38:54 | shashlick | thanks for your help though |
22:47:35 | * | def-pri-pub joined #nim |
22:47:58 | * | shashlick quit (Quit: Leaving) |
22:49:49 | * | Jesin joined #nim |
22:57:23 | dom96 | Do you guys know how to disable the VS Code extension's auto formatting? |
22:57:38 | dom96 | I've had multiple times when I copy pasted Nim code and it screwed up the formatting :\ |
22:57:46 | dom96 | not cool |
23:09:10 | Araq | dom96: press control-Z to undo just the formatting |
23:09:19 | Araq | not that it doesn't suck |
23:12:19 | def-pri-pub | zacharycarter: ya here tonight? |
23:15:36 | * | nsf quit (Quit: WeeChat 1.9) |
23:16:01 | dom96 | Araq: :/ |
23:16:14 | dom96 | thanks for the tip though |
23:16:56 | Araq | eventually NimEdit's rendering will be good and its bugs fixed and then I'm not gonna use anything else :P |
23:18:05 | adam12 | Interesting (nimedit). Hadn't seen it before. |
23:18:40 | adam12 | I'm not sure I could ever switch from vim, just due to muscle memory. |
23:19:06 | Araq | VS Code really sucks for code navigation too, I want to open multiple projects at the same time dammit |
23:20:13 | Araq | adam12: any editor that doesn't distinguish scroll position and cursor position is unusable |
23:21:10 | adam12 | :) |
23:23:32 | * | Nobabs27 joined #nim |
23:29:43 | * | skrylar quit (Remote host closed the connection) |
23:33:19 | * | def-pri-pub quit (Ping timeout: 248 seconds) |
23:36:10 | * | thomasross quit (Remote host closed the connection) |
23:36:39 | * | thomasross joined #nim |
23:44:44 | FromGitter | <zacharycarter> hey def-pri-pub: I am now |
23:52:28 | FromGitter | <zacharycarter> pro tip folks: always compile your game engine with -d:release :P |
23:52:35 | FromGitter | <zacharycarter> I was wondering why my roguelike rendering was so slow |
23:52:44 | FromGitter | <zacharycarter> threw -d:release on and it's too smooth now |