00:00:01 | * | junland quit (Quit: %ZNC Disconnected%) |
00:00:42 | * | junland joined #nim |
00:16:11 | * | shomodj joined #nim |
00:33:46 | FromGitter | <Varriount> shashlick: Hm, You somehow need to turn the NimNode into a type, and feed that to sizeof() |
00:48:50 | shashlick | well, the thing i keep struggling with is that i need to generate code for runtime - i cannot do anything in the macro itself |
00:59:19 | * | al_ joined #nim |
00:59:37 | * | al_ quit (Client Quit) |
01:02:23 | FromGitter | <awr1> @shashlick i see your neighbor's kid is a burgeoning perl programmer |
01:04:38 | shashlick | he should have known better, this is #nim |
01:04:58 | * | theelous3 quit (Ping timeout: 272 seconds) |
01:05:15 | shashlick | well, i should have known better too and kept my computer locked |
01:09:22 | FromGitter | <JasperJenkins> Have you tried https://nim-lang.github.io/Nim/macros.html#getSize%2CNimNode? |
01:11:47 | FromGitter | <awr1> @shashlick `typeInst = sizeof(typeName.bindSym().getTypeInst())` |
01:12:01 | FromGitter | <awr1> you may need `{.experimental: "dynamicBindSym".}` for that one |
01:13:17 | FromGitter | <awr1> or well, the thing Jasper said |
01:19:48 | * | theelous3 joined #nim |
01:22:45 | shashlick | oh nice thanks! |
01:48:12 | FromGitter | <dawkot> Is there anything like `componentDidMount` in Karax? |
02:02:46 | leorize[m] | sschwarzer: that one is unmaintained, the current one is maintained by PMunch. Your PR and issues should go there |
02:02:51 | * | aexoxea joined #nim |
02:04:45 | leorize[m] | @dawkot: it's recommend to not use karax components system |
02:05:15 | leorize[m] | setRenderer have a postRender callback that you could use |
02:39:30 | * | chimez joined #nim |
02:54:21 | * | mipri joined #nim |
03:00:37 | * | chimez quit (Quit: chimez) |
03:04:07 | * | lritter quit (Ping timeout: 244 seconds) |
03:05:12 | * | lritter joined #nim |
03:11:18 | FromGitter | <dawkot> I ended up using something like this to mimic `componentDidMount`: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d33d7d6a0351b1a8c6db8d3] |
03:13:38 | leorize | but why do you need that? |
03:15:36 | leorize | @dawkot: also, if you like react-style components checkout karax's VComponent |
03:16:50 | leorize | VComponent's onAttach should do what componentDidMount do I think |
03:17:27 | FromGitter | <dawkot> @FromIRC it's useful to be able to run some code every time a modal is shown, for example |
03:17:58 | FromGitter | <dawkot> but not every time a rerender happens |
03:18:17 | FromGitter | <dawkot> if what I did works and VComponents are discouraged then I guess I'll stick to what I have :) |
03:19:24 | leorize | discouraged because according to Araq: "it works as designed but no one understand what it does" |
03:19:46 | leorize | if you have experience with react's component system then maybe you can use it |
03:27:53 | * | theelous3 quit (Ping timeout: 244 seconds) |
03:40:07 | FromGitter | <dawkot> `cannot use symbol of kind 'var' as a 'param' |
03:40:10 | FromGitter | <dawkot> wut |
03:40:30 | FromGitter | <dawkot> in place of `mounted`: ⏎ ⏎ ```template component(mounted = true, body): untyped =``` [https://gitter.im/nim-lang/Nim?at=5d33deaec89880134735ad4f] |
03:45:14 | leorize | for some reason it doesn't appear on my gitter :/ |
03:45:29 | leorize | oh, guess you deleted it |
03:45:34 | FromGitter | <dawkot> I deleted it, stupid mistake |
03:46:19 | * | dddddd quit (Remote host closed the connection) |
03:57:05 | FromGitter | <dawkot> Why does invoking the overloaded version make `componentDidMount` no longer reachable via `{.inject.}`? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d33e291f9af9a44ed626937] |
03:59:07 | leorize | `{.inject.}` injects the symbol to the current scope |
03:59:53 | FromGitter | <dawkot> The thing is, I can access it from `body` when using the first template, but not when calling the second one |
04:00:00 | FromGitter | <dawkot> Even if the `body` argument is exactly the same |
04:00:04 | leorize | your overloaded template probably gensym-ed those {.inject.} instead |
04:00:33 | leorize | mark the overload with {.dirty.} |
04:01:21 | FromGitter | <dawkot> didn't work |
04:03:43 | leorize | weird, but why `block:` though? |
04:03:53 | leorize | you don't need that |
04:04:45 | FromGitter | <dawkot> to make componentId isolated |
04:04:55 | FromGitter | <dawkot> probably could be done another way |
04:05:30 | FromGitter | <dawkot> otherwise it would not compile because every id would have the same identitfier in the global scope |
04:06:17 | leorize | would you like to access componentId from body? |
04:06:19 | FromGitter | <dawkot> oh, I could put the `const` into the function body |
04:06:32 | leorize | if not just remove `{.inject.}` |
04:06:49 | FromGitter | <dawkot> I'm was using it for debugging before |
04:07:15 | leorize | putting it in the function seems fine |
04:07:27 | leorize | you wouldn't need the parens though |
04:07:56 | leorize | I'd say VComponent works much better for this |
04:08:22 | leorize | it's integrated with karax's dom creator, so the attach event will always be correct |
04:09:26 | FromGitter | <dawkot> sure, but I would like to finish the experiment because it seems like a trivial problem |
04:09:43 | FromGitter | <dawkot> then I could compare VComponents to what I make |
04:11:27 | FromGitter | <dawkot> I changed it a little bit, but it's the same problem: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d33e5eff9af9a44ed627eae] |
04:16:00 | leorize | @dawkot: works here though https://play.nim-lang.org/#ix=1P23 |
04:16:05 | leorize | are you on devel? |
04:27:27 | FromGitter | <dawkot> it's the same on both devel and stable (0.20.2) |
04:45:47 | leorize | does that snippet work? |
04:48:29 | * | chimez joined #nim |
04:51:51 | * | chimez quit (Client Quit) |
05:47:31 | * | solitudesf joined #nim |
06:08:26 | * | laaron quit (Remote host closed the connection) |
06:11:28 | * | laaron joined #nim |
06:15:16 | skrylar[m] | finished post-processing the zim file for nim's docs |
06:20:54 | skrylar[m] | also heh, saw work stealing mentioned in chat |
06:21:04 | skrylar[m] | ran in to some talks on that in the rust community |
06:24:16 | * | Summertime quit (Quit: Sunsetting.) |
06:24:46 | * | Summertime joined #nim |
06:28:18 | skrylar[m] | dhall looks neat but the syntax also kind of looks like sigil soup |
06:29:44 | * | vlad1777d joined #nim |
06:41:53 | * | vlad1777d quit (Ping timeout: 268 seconds) |
06:43:10 | skrylar[m] | will have to mess withi t |
06:55:05 | * | nsf joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:40 | * | gmpreussner joined #nim |
07:11:17 | * | gmpreussner quit (Ping timeout: 245 seconds) |
07:14:16 | * | absolutejam2 joined #nim |
07:21:49 | * | sagax joined #nim |
07:40:18 | * | absolutejam2 quit (Ping timeout: 248 seconds) |
07:50:13 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:32:50 | * | ng0 joined #nim |
08:56:13 | * | zyklon quit (Quit: Konversation terminated!) |
09:21:35 | * | uvegbot joined #nim |
09:25:02 | * | actuallybatman quit (Ping timeout: 245 seconds) |
09:26:36 | * | nsf quit (Quit: WeeChat 2.4) |
09:29:46 | * | krux02 joined #nim |
09:31:33 | FromDiscord_ | <kodkuce> "Auth.nim(110, 27) Error: undeclared identifier: 'crypto_pwhash_str'" << WTF , let hash_password = crypto_pwhash_str(inputed{"password"}.getStr, alg=phaDefault) , https://github.com/FedericoCeratto/nim-libsodium/blob/master/libsodium/sodium.nim line 760 there is crypto_pwhash_str, and ofc i did do nimble install libsodium, wierd stuff |
09:32:47 | leorize | I don't think federico3 have released a newer libsodium version |
09:33:16 | leorize | so you'd need to depend on `libsodium@#head` |
09:33:18 | leorize | ^ nimble install that |
09:35:36 | FromDiscord_ | <kodkuce> ty it worked |
09:38:12 | leorize | also if you're using the default algorithm you don't have to specify it |
09:45:20 | * | shomodj joined #nim |
09:45:40 | * | aexoxea quit (Quit: Goodbye!) |
09:46:47 | * | hoijui joined #nim |
09:47:52 | * | aexoxea joined #nim |
09:52:44 | FromDiscord_ | <kodkuce> /bin/ld: cannot find -lcrypto |
09:53:01 | leorize | do you have openssl installed? |
09:53:03 | FromDiscord_ | <kodkuce> hmm i know i solved this last time, just frogot how xD , |
09:53:35 | FromDiscord_ | <kodkuce> i have libressl i guess i did a symbolic link, just for what file is -lcrypto looking |
09:54:25 | leorize | ok, have you installed the development headers for libressl yet? |
09:55:02 | FromDiscord_ | <kodkuce> or meybe its that i dont have devheaders installing now |
09:55:56 | FromDiscord_ | <kodkuce> ok now it works |
09:56:00 | FromDiscord_ | <kodkuce> sorry my bad |
10:00:51 | federico3 | I'll make a release |
10:10:05 | * | stefanos82 joined #nim |
10:16:09 | FromDiscord_ | <kodkuce> https://hastebin.com/oxewisotor.cs |
10:16:48 | leorize | it's from jester? |
10:16:57 | leorize | it's just a debugging hint |
10:17:18 | leorize | you can suppress it with --hint[Pattern]:off |
10:17:30 | FromDiscord_ | <kodkuce> duno if i dont get it, or this hint just isent for my use case, can i shomhow suppress it, am just using asynchttpserver whitout jester |
10:17:45 | FromDiscord_ | <kodkuce> ty |
10:18:27 | leorize | hint's are usually harmless |
10:20:02 | FromDiscord_ | <kodkuce> yep i got that part, anyway will probbaly not use this hintPattern:off and just train my eys to ignore it 😃 |
10:21:22 | * | Vladar joined #nim |
10:23:27 | * | hoijui quit (Ping timeout: 264 seconds) |
10:24:11 | * | absolutejam2 joined #nim |
10:32:07 | Zevv | leorize: nim.nivm go-to-def: is ctrl-] not the right key to map instead of gd? |
10:33:30 | leorize | it's for ctags |
10:33:55 | leorize | `gd` has "better" definition in the docs :p |
10:34:17 | Zevv | gd is local, but jumps to other files |
10:34:22 | Zevv | and it breaks gd :) |
10:34:33 | leorize | :P |
10:34:39 | Zevv | imho c-] is for exteral tools doing the work - ctags, cscope, nimsuggest |
10:34:56 | leorize | yea, but I can't just break everyone habits now :P |
10:35:02 | Zevv | :) |
10:35:07 | federico3 | leorize: released! Thanks for the contributions! |
10:35:09 | Zevv | I'll remap |
10:35:30 | leorize | federico3: np :) |
10:36:04 | leorize | Zevv: that's a little design oversight it seems |
10:36:18 | leorize | and I do know how to implement it to follow `gd`... |
10:38:53 | Zevv | nmap <C-]> <Plug>NimGoToDefBuf |
10:38:54 | Zevv | ? |
10:39:10 | leorize | yea |
10:39:32 | Zevv | Ah I though you didn't know how to do that :) |
10:40:31 | federico3 | TIL https://github.com/samuelroy/coco |
10:40:31 | leorize | there's already special cased code for that scenario :P |
10:41:01 | leorize | Zevv: I could add a NimGoToDefBufLocal if you'd like |
10:41:29 | Zevv | hm I guess the default vim should do - its just doing a generic string match I guess |
10:41:50 | leorize | can it do style insensitivity? |
10:41:54 | Zevv | it's just that c-] is in my fingers |
10:42:07 | Zevv | and I kind of don't like plugins to do remappings for me |
10:42:14 | Zevv | but hey, i'm not complaining :) |
10:42:59 | leorize | np :P feel free to do a g:nim_no_map PR if that bugs you |
10:43:40 | leorize | nim.nvim is mostly designed for me, so I put whatever is convenient in |
10:44:09 | Zevv | yeah, that's how it always starts |
10:44:26 | Zevv | and then you're supporting your stuff for years. I have a few of those lingering projects I don't care for, but still support |
10:46:15 | leorize | I'd say nim.nvim design is perfect for this |
10:46:23 | leorize | everything is reliant on nimsuggest |
10:46:29 | leorize | if there's any bug, blame the compiler :P |
10:48:26 | Zevv | nope, I blame you, that's easier |
10:49:17 | leorize | that works :p |
10:49:48 | leorize | asyncfutures is not prepared for un-copyable objects :/ |
10:55:55 | * | hoijui joined #nim |
10:58:52 | * | dddddd joined #nim |
11:00:29 | * | absolutejam2 quit (Ping timeout: 244 seconds) |
11:04:02 | Zevv | elaborate? |
11:04:36 | leorize | https://github.com/nim-lang/Nim/issues/11808 |
11:09:00 | leorize | Zevv: do you have experience in writing vimdoc? |
11:09:15 | leorize | I can't find any reference to them |
11:09:24 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:09:34 | Zevv | I never tried, so that should be no problem |
11:11:29 | Zevv | silently cleaning out the future might not be not the right thing to |
11:18:57 | leorize | Zevv: I can disable folding by default, but that would affect all of our current users :/ |
11:19:28 | Zevv | fff baaaad excuse ;) |
11:19:50 | leorize | :P |
11:25:41 | leorize | Zevv: wontfix :) |
11:25:53 | Zevv | bwah good for you |
11:25:58 | leorize | neovim have foldenable set to on by default, you should probably toggle that instead |
11:26:08 | Zevv | ow is that it |
11:26:26 | leorize | now that I figured that's the culprit, g:nim_fold is going out :P |
11:27:11 | Zevv | see, I did help you here |
11:27:11 | leorize | the illusion is caused by the fact that most language plugins don't support folding |
11:27:25 | Zevv | the illusion is that folding is a good thing |
11:27:27 | leorize | :P |
11:28:18 | leorize | narimiran: g:nim_fold is going out now, so `set nofoldenable` if you don't want folding instead |
11:28:36 | Zevv | I just did that, anticipating |
11:44:28 | * | absolutejam2 joined #nim |
11:52:15 | * | aexoxea quit (Ping timeout: 264 seconds) |
11:54:01 | * | aexoxea joined #nim |
11:56:36 | Zevv | leorize: was it you doing all the asciinema recordings? |
11:56:42 | leorize | yea |
11:56:52 | Zevv | can I make these things into animated gifs? |
11:57:08 | leorize | feel free to, if it's possible |
11:57:21 | Zevv | no I mean, do you know how to do that :) |
11:57:45 | leorize | https://github.com/asciinema/asciicast2gif |
11:57:55 | Zevv | well well |
11:58:29 | Zevv | I just plugified my vim plugins as well |
11:59:01 | leorize | that tool I just sent is of pure evil |
11:59:22 | Zevv | yeah, I found that, but it is nasty |
11:59:34 | Zevv | nah I'll just put up some static images |
12:00:19 | leorize | or you can record your own screen playing the asciinema and turn that into a gif |
12:04:33 | Zevv | https://github.com/zevv/rcdiff |
12:04:37 | Zevv | https://github.com/zevv/buftabs |
12:10:15 | leorize[m] | nice |
12:10:43 | leorize[m] | you should give the autocmds an augroup though |
12:22:17 | * | absolutejam2 quit (Ping timeout: 268 seconds) |
12:31:44 | Zevv | PR :) |
12:33:53 | * | SenasOzys joined #nim |
12:36:59 | * | krux02 quit (Remote host closed the connection) |
12:43:31 | * | skelett quit (Quit: WeeChat 2.4) |
12:48:05 | * | nsf joined #nim |
12:54:54 | FromGitter | <mratsim> @dom96 @coffeepots a conference in London about alternative programming language to solve problems: https://www.codemesh.io/conferences/code-mesh-ldn/ |
12:55:27 | FromGitter | <mratsim> it's full of Erlang speakers :p |
12:56:14 | Zevv | "Call for talks for Code Mesh LDN closed on 10 July" |
12:58:05 | FromGitter | <mratsim> there is also next years, and other cities |
12:58:11 | FromGitter | <mratsim> always* |
12:58:57 | * | sealmove joined #nim |
13:01:21 | sealmove | Hi~ say we have a proc with a parameter that has a default value, is it possible to properly determine (in the proc body) if an argument was provided for that parameter, or can you only check if it equals the default value? |
13:02:28 | sealmove | If it's possible then I can improve the iterator in parseopt module. |
13:03:03 | disruptek | impossible is a strong word, but the general answer is that it's impossible (an equally strong word). |
13:03:39 | disruptek | s/impossible/possible/ somewhere in there until it makes sense. |
13:04:20 | sealmove | thanks for the answer :) |
13:05:20 | * | lritter quit (Quit: Leaving) |
13:08:29 | Zevv | sealmove: what is the proc signature you're trying to do that with? |
13:08:38 | FromGitter | <mratsim> btw @zah are VTable still on the table? |
13:11:03 | sealmove | Zevv: iterator getopt(cmdline: seq[TaintedString] = commandLineParams(); ......... |
13:11:32 | sealmove | basically if you call it with an empty seq, then it grabs commandLineParams() |
13:11:56 | sealmove | I think that's not intended behaviour, or at least it's unintuitive |
13:13:36 | sealmove | Passing nothing should be different than passing an empty seq, right? |
13:13:40 | Zevv | hmm I was thinking of making a little trampoline template, but these args are not easily varargsed |
13:14:01 | Zevv | sealmove: sure, that's something different |
13:14:12 | sealmove | Yeah I realized it's different than my original question |
13:14:14 | sealmove | Sorry |
13:14:23 | Zevv | np |
13:20:37 | Zevv | I guess the default used to be nil, but that got changed when seqs were no longer allowed to be nil |
13:20:42 | Zevv | this losing the distinction |
13:21:26 | sealmove | I see... |
13:21:58 | sealmove | maybe we can make a custom internal type for that? |
13:23:00 | Zevv | you could make a very improbably default { "somerandomstring" } |
13:24:01 | sealmove | yes I considered that |
13:24:18 | sealmove | but who likes hacks :P |
13:24:36 | Zevv | I'd rather have a one line hack with a little comment saying what is happening |
13:24:45 | Zevv | then adding stuff like custom types |
13:25:09 | sealmove | simplicity vs correctness |
13:25:46 | Zevv | true |
13:29:30 | * | shomodj joined #nim |
13:37:03 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:39:22 | * | solitudesf quit (Ping timeout: 268 seconds) |
13:43:08 | disruptek | life would be pretty empty without hacks. |
13:44:25 | disruptek | what do you use when what you want is a string set? |
13:45:20 | dom96 | use the sets module |
13:46:17 | disruptek | i swear i was just looking at this yesterday but i guess i didn't read it. :-P |
13:46:20 | disruptek | thanks, dom96 |
13:46:28 | * | hoijui quit (Quit: Leaving) |
13:51:18 | sealmove | is there a nice way to skip only the first loop of an iteration? |
13:52:26 | * | shomodj joined #nim |
13:52:58 | disruptek | maybe put up a sign? |
13:53:19 | sealmove | sign? like a bool? |
13:53:56 | disruptek | no, like, "if this is your first time here, please leave and come back later" |
13:54:13 | disruptek | wait, would a bool work? |
13:54:43 | sealmove | this works: |
13:54:47 | sealmove | var isFirstIter = true |
13:54:48 | sealmove | for kind, key, val in getopt(): |
13:54:50 | sealmove | if isFirstIter: |
13:54:52 | sealmove | isFirstIter = false |
13:54:54 | sealmove | continue |
13:55:34 | disruptek | did you even try the sign? |
13:55:54 | sealmove | what do you mean sign? |
13:57:54 | disruptek | i'm just messin' with you, boss, sorry. :-P |
13:58:43 | sealmove | lol, was just wondering if there was a nicer way like iter().skip(1) or something like that |
13:59:20 | sealmove | myiter.skip(1) * |
13:59:31 | disruptek | you can advance iterators manually, if that's what you want. |
14:06:16 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:08:41 | * | aexoxea quit (Quit: Goodbye!) |
14:24:36 | * | solitudesf joined #nim |
14:32:35 | Araq | var i = 0 |
14:32:45 | Araq | for x in iter(): |
14:32:53 | Araq | if i == 0: continue |
14:32:55 | Araq | body |
14:32:58 | Araq | inc i |
14:33:04 | Araq | there is no better way |
14:33:08 | dom96 | Araq, hey, I just remembered, you need to export your twitch streams |
14:33:16 | dom96 | otherwise they'll be gone by the time you're back from holidays |
14:33:35 | Araq | ok... that's going to be tough |
14:33:42 | dom96 | Why? |
14:33:47 | Araq | the wifi here is hardly usable |
14:33:54 | dom96 | It's just a couple of clicks |
14:34:00 | Araq | ok |
14:42:19 | shashlick | Hey Araq - I was trying to write the shared deep copy we discussed but am wondering what's the point |
14:42:31 | Araq | lol |
14:42:59 | shashlick | Any operation on that object (if cast into one) would introduce gc memory again |
14:43:00 | Araq | the point is that you like 0.19 and --newruntime is useful in 0.20 and stable(ish) in 0.21 |
14:44:13 | shashlick | Further, when I getTypeImpl, if I run into a ptr or ref object, the ast doesn't recurse into it |
14:44:25 | shashlick | So I don't have enough detail to do anything |
14:44:28 | Araq | that's a feature... |
14:44:49 | Araq | you need to call getType again, the VM cannot give you an infinite tree that is not lazy... |
14:45:16 | shashlick | Do I call it on the refty or sym |
14:46:11 | shashlick | I am calling getTypeImpl recursively but don't see anything there |
14:52:03 | lqdev[m] | I know this is pedantry beyond what anyone can imagine, but choosenim pretends to show download progress in millibits (`mb`, a unit which does not exist) and not megabytes (`MB`) |
14:52:19 | Araq | I don't know, check the examples, shashlick |
14:52:35 | Araq | yay 1024 bytes/s |
14:52:49 | Araq | if that's not download speed then I don't know what is :P |
15:05:50 | Araq | mratsim: https://github.com/nim-lang/Nim/issues/11797 has NOTHING to do with 'generics' |
15:05:56 | Araq | I know it's your favourite label |
15:06:02 | Araq | but it doesn't apply. |
15:07:01 | stefanos82 | lovely, like the good ol' dialup days; it brings back so many memories ;( |
15:08:53 | * | shomodj joined #nim |
15:09:31 | * | shomodj quit (Client Quit) |
15:09:32 | * | nsf quit (Quit: WeeChat 2.4) |
15:09:51 | * | nsf joined #nim |
15:10:33 | * | shomodj joined #nim |
15:24:37 | * | SenasOzys quit (Ping timeout: 245 seconds) |
15:26:17 | FromGitter | <mratsim> I don't know, there was a seq and a generic part |
15:27:58 | disruptek | holiday, araq. :-P |
15:30:45 | * | chimez joined #nim |
15:32:33 | * | solitudesf quit (Ping timeout: 245 seconds) |
15:42:27 | * | theelous3 joined #nim |
15:43:22 | * | chimez quit (Ping timeout: 245 seconds) |
15:46:11 | * | solitudesf joined #nim |
15:54:29 | dom96 | oooh, we *need* this for Nim https://help.github.com/en/articles/navigating-code-on-github |
15:55:36 | stefanos82 | they even wrote an article why they chose Haskell to implement semantic project |
15:55:52 | stefanos82 | I thought it was supposed to be a flag you turn on within your project(s) |
15:56:01 | stefanos82 | I still have no idea to use it |
15:56:11 | stefanos82 | *how to |
15:57:37 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:05:34 | * | sealmove quit (Quit: WeeChat 2.5) |
16:31:36 | disruptek | why do we keep making multicore architectures if our talent for exploiting them is so underdeveloped? |
16:33:58 | leorize | because we can develop that part? |
16:34:18 | leorize | and even while underdeveloped it's already proven itself to be worth it |
16:34:29 | disruptek | yeah, i was joking. ;-) |
16:34:34 | FromGitter | <Varriount> Because it's easier for hardware manufacturers to improve performance via multiple cores, than it is to make more performance cores |
16:35:00 | disruptek | it's just, sometimes, you have to look at all the bs you're wading through and wonder who put it there. :-D |
16:35:24 | * | nsf quit (Quit: WeeChat 2.4) |
16:36:53 | disruptek | i'm finally readin' this D-borrowing article and rehashing the problem domain over and over just gets tiresome. |
16:41:40 | FromDiscord_ | <kodkuce> https://hastebin.com/opajahadic.bash |
16:41:55 | FromDiscord_ | <kodkuce> hmm duno if i am doing something dumb again or what |
16:43:27 | disruptek | it looks like you're shadowing pid with a json(?) node's getInt() |
16:43:30 | lqdev[m] | you're converting the resulting int to a string using the `$` operator |
16:44:15 | disruptek | oh, that's from a separate piece of code? |
16:44:17 | * | solitudesf quit (Remote host closed the connection) |
16:45:17 | disruptek | yeah, remove the $s and also call claims["role"].node.getStr instead of accessing the str value directly. |
16:46:10 | FromDiscord_ | <kodkuce> oh my bad , ty |
16:50:09 | * | solitudesf joined #nim |
16:54:22 | * | actuallybatman joined #nim |
16:56:48 | disruptek | yay, i found a use for npeg, Zevv. <3 |
16:57:26 | Zevv | sweet, tell me about it |
16:58:17 | disruptek | i need to parse "path templates" eg. /foo/bar/{variable}/bif/{baz} and then perform substitutions for those variables. :-) |
16:58:33 | Zevv | that's a pretty nice fit I guess, good for you :) |
16:58:42 | Zevv | better then parsing YAML surely |
16:59:21 | disruptek | it's in the yaml, but yaml->json isn't a primary goal of this tool, so meh. |
16:59:43 | disruptek | did you look at the pegex to see if it could clear up the ambiguities of yaml for you? |
16:59:58 | Zevv | it isnt complete, it's only doing a subset |
17:00:11 | disruptek | ah, that's disappointing. |
17:00:23 | Zevv | (my guess, that is, as it is way to small compared to the spec) |
17:00:43 | disruptek | the author is the author of yaml, isn't he? |
17:00:55 | Zevv | oh, than I'm surely mistaking :) |
17:01:49 | disruptek | iirc, he wrote the firt yaml parser in perl and then wrote a pegex that he preferred to the original impl. but, i could be all wet on this. |
17:02:52 | Zevv | well, actually, I dropped out when I saw this line in his parser: ".rgx" : "(\\|\\r?\\nXXX|\\>\\r?\\nXXX|\"[^\"]*\"|'[^']*'|(?![&\\*\\#\\{\\}\\[\\]%`\\@]).+?(?=:\\s|\\r?\\n|\\z)):(?:\\ +|\\ *(?=\\r?\\n))" |
17:03:04 | disruptek | badass. |
17:03:24 | disruptek | i mean, why wouldn't you want that? |
17:03:50 | Zevv | surely you're joking mr disruptek |
17:03:56 | disruptek | lol |
17:04:15 | FromGitter | <kayabaNerve> Genius or insanity? |
17:04:45 | disruptek | what i will never understand is that THAT intermediate description is what we actually pass around and handle as a string -- as if it was somehow less prickly thusly. |
17:04:55 | disruptek | ^why THAT, i should say |
17:05:45 | Zevv | lets put a regex in my PEG, that will make things much better |
17:07:42 | Zevv | but then again: that yaml.pgx.json thing seems to be missing stuff. What is 'block_indent', it's not part of the PEG |
17:08:25 | disruptek | it's far easier to read in yaml.pgx.yaml :-D |
17:08:51 | disruptek | too bad he didn't write any comments. 🙄 |
17:08:59 | Zevv | haha :) |
17:20:20 | * | carkh joined #nim |
17:23:29 | disruptek | npeg works in js, right? |
17:26:29 | carkh | hi, i haven't touched a "compile to native" language for like 15 years... my goal is to make a windows specific program that parses the full command line, not your regular extract args, i need the full thing... So i'm starting from getCommandLineW in winlean and it's returning WideCString. Do I need to take special care of this return value ? allocate memory, or free it afterwards ? |
17:27:13 | * | actuallybatman quit (Ping timeout: 246 seconds) |
17:27:23 | Araq | check the Win API documentation from MS |
17:27:31 | carkh | ok |
17:27:57 | * | absolutejam2 joined #nim |
17:33:08 | FromGitter | <awr1> MSDN is not specific on that so I'm guessing it's just preallocated at program init |
17:33:12 | carkh | they don't say anything, i guess the string already exists and should be left alone |
17:33:38 | FromGitter | <awr1> my guess: don't free it, copy it/nim-stringify it "if you want to" |
17:33:53 | carkh | thanks |
17:33:56 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/0R3A/terrain.png) |
17:34:00 | FromGitter | <zacharycarter> heyyyyyy got terrain rendering |
17:34:26 | FromGitter | <awr1> 👍 |
17:34:39 | FromGitter | <awr1> using bgfx? |
17:34:54 | FromGitter | <zacharycarter> yup |
17:35:57 | FromGitter | <awr1> you should take a look at this if you're trying to do terrain rendering |
17:35:58 | FromGitter | <awr1> https://victorbush.com/2015/01/tessellated-terrain/ |
17:36:36 | FromGitter | <zacharycarter> I'm making an old-school rts so I'm aiming for flat shaded tiled terrain |
17:36:44 | FromGitter | <awr1> which may or may not be appropiate for w/e you're doing |
17:36:47 | FromGitter | <awr1> ah ok |
17:37:34 | FromGitter | <zacharycarter> I think there's about to be a tessellated terrain demo for bgfx though |
17:37:41 | FromGitter | <zacharycarter> a guy was posting screenshots for it in the bgfx gitter the other day |
17:40:02 | * | absolutejam2 quit (Ping timeout: 245 seconds) |
17:50:05 | FromDiscord_ | <kodkuce> https://hatebin.com/ponqgefdpq do i need some kind of locks for this, am confused little about threadvars |
17:55:31 | Zevv | disruptek: yes, it does, 'nimble test' runs the tests on node |
17:55:42 | disruptek | brilliant, thanks. :-) |
17:56:10 | * | elrood joined #nim |
17:56:34 | Zevv | zacharycarter: what's your end goal for this project? |
17:57:16 | FromGitter | <zacharycarter> Zevv: a 3d rts of some sort |
17:57:24 | Zevv | "of some sort" :) |
17:57:40 | FromGitter | <zacharycarter> well - I plan on collaborating with a game designer from work on it |
17:57:52 | Calinou | read your Discord notifications already :P |
17:57:53 | * | Calinou hides |
17:58:20 | FromGitter | <zacharycarter> but I mean, for the most part, I know what features the game needs to support |
17:58:47 | Zevv | just wondering, but I though noone makes games from scratch these days |
17:58:50 | * | actuallybatman joined #nim |
17:59:15 | disruptek | handmadehero.org |
17:59:15 | FromGitter | <zacharycarter> Calinou: who are you referring to? |
17:59:21 | Calinou | I mean, on your screenshot |
17:59:24 | FromGitter | <zacharycarter> IMO using a pre-made engine is boring |
17:59:26 | FromGitter | <zacharycarter> oh haha |
17:59:30 | FromGitter | <zacharycarter> :P |
17:59:45 | Zevv | zacharycarter: sure, doing it yourself is much more fun |
17:59:52 | Zevv | do you have prior GL experience? |
18:00:10 | FromGitter | <zacharycarter> yeah, I've been through a few graphics programming rodeos |
18:00:20 | Zevv | cool |
18:00:25 | FromGitter | <zacharycarter> I've also used bgfx before but never delved much into 3d with it - mostly 2d |
18:00:41 | FromGitter | <zacharycarter> but I mean - it's not that different from opengl / directx - just need to figure out how to translate API call from A to B |
18:02:05 | Zevv | My only experiance is ancient OpenGL1.0 and modern GLES, but I have no clue how that compares to metal or direct3D |
18:02:24 | Zevv | I need to get started with vulkan on the short term, so that's something new for me |
18:02:27 | FromGitter | <zacharycarter> that's why using bgfx is nice :) |
18:02:45 | FromGitter | <zacharycarter> I'm not too keen on jumping into vulkan |
18:03:04 | FromGitter | <zacharycarter> but if you want to play with the bleeding edge - it's fine I guess |
18:03:19 | FromGitter | <zacharycarter> Calinou: they're most likely all people complaining about the soft launch of our game at work :P |
18:04:15 | FromGitter | <Varriount> @zacharycarter @zevv My shell is back up to 80% of it's original functionality. :D |
18:04:28 | FromGitter | <zacharycarter> O.o |
18:04:39 | FromGitter | <Varriount> It has pipes! |
18:04:40 | FromGitter | <zacharycarter> nice! |
18:04:42 | Zevv | \o/ |
18:04:45 | FromGitter | <zacharycarter> \o/ |
18:04:48 | Zevv | url? |
18:05:39 | * | shomodj joined #nim |
18:05:53 | FromGitter | <Varriount> https://github.com/Varriount/commandant |
18:06:22 | FromGitter | <Varriount> No nimble file - you'll need Zevv's awesome npeg library if you want to compile it |
18:07:09 | Zevv | I'll rename it to nlex :) |
18:07:48 | FromGitter | <Varriount> :P |
18:08:18 | Zevv | Varriount: should it run with nim devel? |
18:08:25 | * | ikan-keli_ quit (Quit: ZNC 1.8.x-git-125-e415d9f5 - https://znc.in) |
18:08:48 | FromGitter | <Varriount> Yes |
18:09:02 | Zevv | ok, I'll give it a spin |
18:09:12 | * | ikan-keli_ joined #nim |
18:10:10 | * | Amun_Ra quit (Ping timeout: 248 seconds) |
18:10:19 | Zevv | ah wait, you're relying npegs capture-data branch, right? |
18:10:34 | FromGitter | <Varriount> Hm, am I? |
18:10:58 | FromGitter | <Varriount> Ah, yes, I am. |
18:11:06 | FromGitter | <Varriount> I use it for line/position information |
18:11:08 | Zevv | Ok, I never merged that :) |
18:11:25 | Zevv | let me look into that. I just released 0.12 last week to fix araqs breakage, but that doesnt matter |
18:11:50 | FromGitter | <Varriount> Zevv: After this shell project is over, I'd like to look into making improvements to npeg |
18:11:58 | Zevv | hooray! |
18:13:13 | * | CookieCutter joined #nim |
18:13:18 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:13:26 | * | CookieCutter is now known as dgreen |
18:13:48 | dgreen | Is @mratsim around? |
18:13:56 | FromGitter | <mratsim> yes |
18:14:13 | dgreen | I've got a question about SGD with momentum, if you have a second |
18:14:49 | FromGitter | <mratsim> no problem |
18:15:35 | dgreen | I've implemented both nesterov momentum and the learning rate decay factor |
18:15:48 | dgreen | The pytorch implementation however has a "dampening" factor (see: https://github.com/pytorch/pytorch/blob/5911cb8e5cdc24218f57480b6647d37d86e77620/torch/optim/sgd.py#L51-L52) |
18:16:14 | dgreen | I'm honestly not sure what it does, and I haven't been able to find any reference to it in the original SGD paper nor the one that introduced momentum nor the Nesterov paper |
18:16:21 | * | Amun_Ra joined #nim |
18:16:21 | dgreen | Do you want me to figure it out and implement it as well? |
18:16:47 | * | Hinkarn joined #nim |
18:17:22 | dgreen | Also as a side note, where, if anywhere, do you want me to write tests for SGDMomentum/SGD with Nestrov? |
18:18:50 | * | absolutejam2 joined #nim |
18:19:48 | FromGitter | <mratsim> dampening is probably legacy from the old Torch codebase: https://github.com/pytorch/pytorch/issues/6 |
18:19:57 | FromGitter | <mratsim> issue 6 on PyTorch, :p |
18:20:45 | * | Hinkarn quit (Remote host closed the connection) |
18:20:52 | dgreen | Oh yeah I found this issue while looking it up, they just set the default to 0 and never really explain why. But since it seems to be legacy I think I can ignore it? |
18:21:03 | FromGitter | <mratsim> yes |
18:21:12 | FromGitter | <mratsim> for the tests you can put them here: https://github.com/mratsim/Arraymancer/tree/master/tests/nn |
18:21:47 | Zevv | Varriount: in that branch the injected capture[] type changed from string to object, so that is an API change. I do think it is for the good so I'll just merge, assuming that noone is actually using capture[n] instead of $n. Should I add an `$` to give a bit of backwards compatibilty? |
18:21:47 | FromGitter | <mratsim> I've only added the rosenbrock function, to compare the results with PyTorch implementation but never went to implement an optimizer test |
18:22:07 | FromGitter | <mratsim> Adam fails spectacularly on rosenbrock for both PyTorch and Arraymancer :p |
18:22:22 | dgreen | Alright, do you want me to write a test_optimizers.nim in that file? |
18:22:33 | dgreen | Oh brilliant, I wonder why it's so spectacularly bad lol |
18:22:40 | FromGitter | <mratsim> sounds good |
18:23:00 | FromGitter | <mratsim> the acceleration/momentum makes Adam miss the very narrow optimized valley |
18:23:12 | dgreen | Ah that makes sense actually |
18:23:23 | dgreen | Well hopefully my impl of SGDMomentum doesn't do the same... |
18:23:24 | FromGitter | <Varriount> Zevv: Perhaps not yet? Unless someone files an issue. |
18:23:37 | FromGitter | <Varriount> Would I need to change my code? |
18:23:59 | Zevv | no, you're the only one not having to change his code, this is just for you :) |
18:24:18 | FromGitter | <mratsim> it's fine, it's an easy way to compare with PyTorch, I don't think I have the full testing code though, it's laying around on my laptop |
18:24:59 | FromGitter | <mratsim> see here: https://github.com/pytorch/pytorch/blob/a4b2f3e21316461598fbebfdeb97259d2bbf29fa/test/optim/test.py |
18:25:45 | dgreen | Perfect thanks. Worst case I can write some new pytorch code, I'm pretty well versed in pytorch |
18:28:25 | dgreen | Or at least, I like to think I am |
18:29:42 | Zevv | Varriount: it is now in 0.13.0, let me know if this works for you |
18:30:27 | FromGitter | <Varriount> @Zevv: Yep, it works |
18:30:28 | Zevv | mratsim: so, what did you learn today with your 300 lines of resources? |
18:30:45 | Zevv | varriount: sweet. I doubt anyone else used capture[], so this should be fine |
18:30:47 | FromGitter | <mratsim> That I don't have enough time :P |
18:31:43 | FromGitter | <mratsim> I'm back to do some optimized convolution since there was some changes in Nim OpenMP that was blocking me, and it should be pretty quick. THen I'm back to working on my compiler. |
18:32:12 | Zevv | mratsim: right. Time! |
18:32:15 | FromGitter | <mratsim> I did find an excellent paper on channel-based workstealing that would probably fit with Nim model. |
18:33:46 | Zevv | I'm a bit ambivalent about this stuff. The past has taught me that I'm far not smart enough to do these kind of things and I better shy away from it. but I do find it intriging and interesting. |
18:33:49 | FromGitter | <mratsim> Might be interesting for @Araq and @yglukhov, https://epub.uni-bayreuth.de/2990/1/main_final.pdf maybe if I find some time I'll try to implement part of it. It comes with lots of details |
18:34:29 | FromGitter | <mratsim> look page 45 and don't tell me it's too hard :P |
18:34:50 | * | shomodj joined #nim |
18:35:12 | FromGitter | <Varriount> @mratsim I've said it before, and I'll say it again: You're a wonder |
18:35:18 | FromGitter | <mratsim> also the only way to have a better brain (or muscles) is to use and exercise them |
18:35:21 | Zevv | which page 45, the pdf 45 or the pagenr 45 |
18:35:29 | FromGitter | <mratsim> of the pdf |
18:36:10 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/iAoU/DeepinScreenshot_select-area_20190721203543.png) |
18:36:12 | FromGitter | <mratsim> thanks @Varriount :) |
18:38:17 | Zevv | well it looks easier then the YAML spec, that is for sure |
18:42:02 | disruptek | Zevv: when i capture in npeg, do i need to create a block to issue side-effects of the capture (against, eg. $[0-9]) or will captures always pass through to the MatchResult.captures()? |
18:42:23 | * | Cthalupa quit (Ping timeout: 244 seconds) |
18:42:51 | Zevv | captures in code blocks are eaten and do not end up in .captures() |
18:43:48 | * | absolutejam2 quit (Ping timeout: 245 seconds) |
18:44:05 | disruptek | ah, thanks. |
18:44:08 | Zevv | internally there's a capture stack, and doing a code block capture rewinds the stack up the the last closed capture |
18:48:07 | dgreen | @mratsim is there anything in particular in want in the documentation for the optimizers? |
18:50:18 | FromGitter | <mratsim> no, didn't think about it at the moment :) |
18:50:20 | disruptek | Zevv: i think Print isn't working for me; i'm expecting it to match any printable character, including whitespace. |
18:50:38 | dgreen | Ok :) |
18:53:27 | Zevv | only space (32), not other whitespace (\t,\r,\n) |
18:53:39 | Zevv | "Print": {'\x21'..'\x7e',' '}, |
18:54:09 | Zevv | Not sure if that makes sense, but I didn't make these up, these are the posix character classes :) |
18:54:52 | disruptek | i get it, but i don't even think i have spaces in here. it doesn't seem to match on '/' or '.' and i feel it should. |
18:55:24 | Zevv | -d:npegTrace is your friend |
18:55:38 | Zevv | although the output is a bit overkill sometimes |
18:55:57 | Zevv | @mratsim: excellent paper with a lot of background info, thanks for that |
18:58:01 | FromGitter | <deech> What happened to `quote` in `macro`? |
19:06:15 | disruptek | Zevv: it's working fine; i was missing a negative match. great stuff! |
19:07:47 | Zevv | good |
19:10:56 | FromGitter | <Varriount> disruptek: Whatcha working on? |
19:11:15 | disruptek | openapi codegen |
19:13:00 | FromGitter | <Varriount> disruptek: ooh, nice |
19:13:21 | FromGitter | <Varriount> disruptek: Are you going to use npeg for tokenization only, or for both tokenization and AST building? |
19:13:41 | disruptek | how do i use it for ast building? |
19:16:15 | FromGitter | <Varriount> disruptek: You would add the logic for building the AST with the tokenization/capture logic |
19:16:50 | FromGitter | <Varriount> It's possible (and possibly more efficient), but harder to implement |
19:17:21 | FromGitter | <Varriount> Zevv: Were you able to build the shell? |
19:17:22 | FromGitter | <deech> hrm, forgot to `import macros`. |
19:17:42 | disruptek | probably not, because i think i need broader perspective. unless you mean parsing more broadly. but, we consume json at the moment, so i'm only planning to use npeg to omit a reliance on a regexp lib. |
19:18:40 | Zevv | Varriount: yeah, not problem. I played a bit with it, but it died when I typed 'help' :) |
19:18:43 | disruptek | https://github.com/disruptek/openapi -- added some links. |
19:19:03 | FromGitter | <Varriount> Zevv: oh, yeah. I haven't re-enabled builtins yet |
19:19:21 | FromGitter | <Varriount> And everything is on "one wrong move and you die" mode |
19:20:27 | disruptek | i'm in that mode all the time. |
19:20:30 | Zevv | about the AST building: I'm looking for ways to make that easier. State is part of the problem (not possible to pass state through a parser), and I feel I need hooks for pre/post matches, but I can't get my finger on it yet. |
19:20:57 | FromGitter | <Varriount> Zevv: Nah, its fine |
19:21:21 | Zevv | not quite |
19:21:29 | FromGitter | <Varriount> Zevv: To be honest, I feel like AST building is easier when done manually. |
19:22:01 | Zevv | yeah, but everytime I try to, I feel I'm doing too much of the same work over and over again |
19:22:09 | Zevv | which is usually a hint something is amiss there |
19:22:43 | FromGitter | <Varriount> Yeah, but for AST building, you need some way to (not only) transform the tokens into a tree structure, but also a way to add extra information onto those nodes |
19:23:07 | Zevv | and to pass them up to the call tree instead of stashing them somewhere and finding them later. |
19:23:14 | FromGitter | <Varriount> Yeah |
19:23:52 | Zevv | that's much easier in lpeg, due to the duck typing. |
19:24:04 | FromGitter | <Varriount> If there is one, perhaps the solution is not to bundle tokenization and AST building together, but to just make AST building easier? |
19:24:40 | FromGitter | <Varriount> For example, one DSL for tokenization, and one for node building |
19:25:08 | Zevv | yeah but for efficiency you really want to do that in the same pass, not storing the whole world somewhere and later doing the transformation to the AST |
19:26:08 | FromGitter | <Varriount> Yeah, but tokenization can be done in a streaming fashion, so that part isn't really "storing the whole world" |
19:26:24 | Zevv | hmm true. |
19:35:53 | FromGitter | <awr1> @dom96 RE: the semantic thing https://github.com/github/semantic/issues/132 |
19:36:22 | FromGitter | <awr1> in an "ideal world" supposedly nimsuggest could be retooled to be compatible with some API that github uses for this jumping to code thing |
19:36:34 | FromGitter | <awr1> but it seems from this that they don't really want to allow external tools |
19:36:41 | * | krux02 joined #nim |
19:40:10 | FromGitter | <awr1> so if anyone wants to write a nim parser for tree-sitter... |
19:47:05 | * | absolutejam2 joined #nim |
19:49:30 | * | PMunch joined #nim |
19:55:51 | FromGitter | <zacharycarter> if there's a `const` defined in a nimble module I'm using - can I override its assigned value by `-d:key=value` or just re-declare it or something? |
19:58:02 | Zevv | not without .intdefine., afaik |
19:58:06 | Zevv | or similar |
20:00:40 | FromGitter | <zacharycarter> hmm - okay - I guess it's not a big deal since I forked the original code anyway |
20:01:07 | FromGitter | <zacharycarter> I need to make other changes / additions as well so whatever, I don't really care too much if I have my own version of nim-glm |
20:02:17 | disruptek | is this what people call `defensive programming`? because it's annoying. |
20:03:03 | FromGitter | <zacharycarter> what's that? |
20:03:18 | * | clyybber joined #nim |
20:06:03 | disruptek | programming style designed not to permit bugs, which often has a side-effect of not permitting enhancements. |
20:06:46 | FromGitter | <zacharycarter> I think instead of declaring the flag as a const it should have been `when defined()` |
20:06:56 | FromGitter | <zacharycarter> but instead it's a const and I don't see a way to change it :/ |
20:07:26 | FromGitter | <zacharycarter> https://github.com/stavenko/nim-glm/blob/master/glm/globals.nim#L1 |
20:07:41 | FromGitter | <zacharycarter> but this is also a pretty old module - I've used this module in several projects since I started w/ Nim really |
20:08:00 | FromGitter | <zacharycarter> but using it w/ bgfx - I require a left handed coordinate system |
20:08:15 | FromGitter | <zacharycarter> but I also need to handle homogeneous native device coordinates - so I'll need to make other changes to the library as well |
20:08:19 | FromGitter | <zacharycarter> which others probably won't need |
20:09:05 | Zevv | @Varriount: still here? |
20:23:01 | FromDiscord_ | <kodkuce> https://hatebin.com/ponqgefdpq do i need some kind of locks for this, am confused little about threadvars , Reposing with hope 😃 |
20:33:07 | FromDiscord_ | <kodkuce> so threadvar, is variable in local thread, right? |
20:33:47 | FromDiscord_ | <kodkuce> i am guessing this is something simple, but duno in my head its easyer to understend shared memory with locks then this |
20:37:29 | * | disruptek left #nim (#nim) |
20:39:13 | * | disruptek joined #nim |
20:43:47 | * | snuffdtek quit (Remote host closed the connection) |
20:46:44 | * | mipri quit (Quit: Lost terminal) |
20:56:03 | FromDiscord_ | <kodkuce> where are magick helpers when you need them |
20:56:34 | * | Vladar quit (Remote host closed the connection) |
20:58:40 | PMunch | Damn it, tried to run a regular update of the playground server, and now it's down.. |
21:04:02 | PMunch | Hmm, the problem seems to be with docker.. |
21:10:12 | FromDiscord_ | <kodkuce> anyone sees my msgs 😃 |
21:10:26 | PMunch | I see your messages kodkuce |
21:11:14 | FromDiscord_ | <kodkuce> 😃 |
21:11:24 | lqdev[m] | kodkuce: anyone's happy to respond as long as they know the solution |
21:11:42 | PMunch | Well what are you wondering about? |
21:11:47 | PMunch | threadvars? |
21:14:06 | * | krux02 quit (Remote host closed the connection) |
21:14:16 | FromDiscord_ | <kodkuce> yes |
21:14:38 | FromDiscord_ | <kodkuce> so my guess this async dispatch is using threads so it can handle more requests |
21:15:17 | FromDiscord_ | <kodkuce> and now i have a threadvar seq where i store playerid and itsconnection |
21:16:51 | FromDiscord_ | <kodkuce> so example i can then process requests, example p1 wants to send msg to p2 , it goes to that list checks where is p2 and sends msg to its connection |
21:17:09 | * | dgreen quit (Remote host closed the connection) |
21:17:35 | PMunch | Ah, you seem to maybe misunderstand a couple of things |
21:18:05 | PMunch | Async doesn't use threads, and threadvar is used to create thread local variables, not global variables |
21:18:45 | FromDiscord_ | <kodkuce> but my issue is if that all heppeing in across threads wouldet example 1 player disconnection, while other player sending msg to him result with a crash cuz he dosent exist |
21:19:54 | * | gmpreussner joined #nim |
21:20:37 | FromDiscord_ | <kodkuce> "Async doesn't use threads"- Oh "threadvar is used to create thread local variables, not global variables" -hmm then why i am using threadvar if its all running under same thread, cant i just use global var? |
21:21:02 | PMunch | Okay, playground is back up now |
21:21:28 | PMunch | Yes you can |
21:22:11 | PMunch | I don't know why you're using threadvar.. |
21:22:20 | FromGitter | <awr1> @zacharycarter if your build script is in nimscript |
21:22:21 | FromGitter | <awr1> https://nim-lang.org/docs/nimscript.html#patchFile%2Cstring%2Cstring%2Cstring |
21:22:39 | FromGitter | <awr1> maybe? and then patch `GLM_LEFT_HAND` |
21:22:43 | FromDiscord_ | <kodkuce> duno i think last time when i was asking , i think dom told me to use threadvar cuz threads |
21:25:00 | FromDiscord_ | <kodkuce> np will try revrite all whiout threads |
21:25:07 | FromDiscord_ | <kodkuce> *threadvars |
21:25:25 | PMunch | Oh well, I'm off to bed |
21:25:32 | * | PMunch quit (Remote host closed the connection) |
21:25:59 | FromDiscord_ | <kodkuce> good night |
21:33:52 | * | clyybber quit (Quit: WeeChat 2.5) |
21:46:33 | * | solitudesf quit (Ping timeout: 258 seconds) |
21:47:21 | Zevv | @varriount: I think I know how to effectively support AST building and better recursive handling of matches. |
21:48:37 | Zevv | Parsers can be made instantiated with a generic type T, that propagates through the PEG code block captures. A code block consumes its closed captures and then returns a value of type T. This value/result is then placed back onto the capture stack, and is later available for code block captures down the stack. |
21:49:00 | Zevv | So a code block gets either string captures found in the subject, or value captures which were already processed up the tree. |
21:50:01 | Zevv | I'll drop a proof of concept one of these days |
21:50:03 | Zevv | first Zzzz |
22:00:23 | * | Jesin joined #nim |
22:27:05 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:27:39 | * | shomodj joined #nim |
22:27:54 | * | shomodj quit (Client Quit) |
22:41:25 | * | shomodj joined #nim |
22:59:52 | * | elrood quit (Remote host closed the connection) |
23:23:32 | * | absolutejam2 quit (Ping timeout: 258 seconds) |
23:32:31 | * | Cthalupa joined #nim |
23:32:38 | * | arecaceae quit (Remote host closed the connection) |
23:32:57 | * | arecaceae joined #nim |
23:33:20 | FromGitter | <Varriount> Zzzzev 😴:P |
23:42:26 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:48:07 | FromGitter | <brentp> anyone have a float16 module for nim? |