00:00:54 | * | clyybber quit (Quit: WeeChat 2.5) |
00:04:04 | * | rockcavera quit (Remote host closed the connection) |
00:23:18 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:16:52 | mfiano | leorize: are you the author of nim.nvim? |
01:34:08 | * | vivus quit (Remote host closed the connection) |
01:35:25 | FromGitter | <gogolxdong> Anyone have expericence on video content analysis and research? |
01:38:10 | * | laaron quit (Remote host closed the connection) |
01:38:40 | * | nif quit (Quit: ...) |
01:38:55 | * | nif joined #nim |
01:39:12 | * | theelous3_ quit (Read error: Connection reset by peer) |
01:39:12 | * | theelous3 quit (Read error: Connection reset by peer) |
01:40:42 | * | laaron joined #nim |
01:45:04 | * | rockcavera joined #nim |
01:56:13 | * | ng0_ joined #nim |
01:58:12 | * | ng0 quit (Ping timeout: 260 seconds) |
02:35:53 | * | arecaceae quit (Remote host closed the connection) |
02:36:18 | * | arecaceae joined #nim |
02:52:34 | * | lritter quit (Ping timeout: 272 seconds) |
02:53:00 | * | lritter joined #nim |
02:57:20 | * | rockcavera quit (Remote host closed the connection) |
03:10:09 | * | rockcavera joined #nim |
03:19:45 | * | dddddd quit (Remote host closed the connection) |
03:38:04 | * | leorize quit (Ping timeout: 260 seconds) |
03:59:13 | * | rockcavera quit (Remote host closed the connection) |
04:13:13 | * | nsf joined #nim |
04:13:38 | * | leorize joined #nim |
04:46:19 | * | terps joined #nim |
04:47:02 | * | nif quit (Quit: ...) |
04:47:11 | * | nif joined #nim |
04:54:25 | * | terps quit (Ping timeout: 250 seconds) |
04:56:30 | * | terps joined #nim |
04:58:31 | * | terps quit (Read error: Connection reset by peer) |
05:03:14 | * | laaron quit (Remote host closed the connection) |
05:03:41 | * | terps joined #nim |
05:05:02 | * | nif quit (Quit: ...) |
05:05:11 | * | nif joined #nim |
05:12:21 | * | endragor joined #nim |
05:14:41 | * | laaron joined #nim |
05:26:01 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
05:26:24 | * | laaron joined #nim |
05:50:36 | * | solitudesf joined #nim |
06:04:11 | * | terps quit (Ping timeout: 250 seconds) |
06:05:07 | * | laaron quit (Remote host closed the connection) |
06:06:56 | * | couven92 joined #nim |
06:07:49 | * | laaron joined #nim |
06:09:19 | * | sagax joined #nim |
06:45:15 | * | ng0_ is now known as ng0 |
06:45:27 | * | PMunch joined #nim |
06:48:07 | * | terps joined #nim |
06:55:53 | * | krux02 joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:17 | * | couven92 quit (Quit: Client disconnecting) |
07:00:37 | * | couven92 joined #nim |
07:04:52 | * | gmpreussner joined #nim |
07:18:46 | FromGitter | <ahcm> @gogolxdong yes, why? nim related? |
07:30:47 | FromGitter | <gogolxdong> Yes,we are going to build such thing in Nim as a killer application like Google Cloud https://cloud.google.com/video-intelligence/. And we need who has such experience |
07:31:42 | * | oalvarez joined #nim |
07:37:38 | FromGitter | <bevo009> Why do I get this warning using round()? ⏎ Warning: use strformat module instead; round is deprecated [Deprecated] |
07:38:31 | FromGitter | <bevo009> I tried 'import stformat' and got: ⏎ Warning: imported and not used: 'strformat' [UnusedImport] |
07:41:30 | FromGitter | <bevo009> it's using code from miran's book |
07:44:25 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
07:55:00 | FromGitter | <gogolxdong> We are preparing presentation for Huawei and Tencent in Shenzhen, China ,after nim release 1.0. Any ideas are welcomed. |
08:02:26 | PMunch | A presentation for Huawei and Tencent? |
08:02:39 | PMunch | What kind of presentation? |
08:03:55 | FromGitter | <gogolxdong> What's Nim and what Nim can do. |
08:05:56 | PMunch | Cool, have they requested it, or have you asked to pitch it to them? |
08:06:40 | FromGitter | <gogolxdong> This can be arranged. :) |
08:07:02 | PMunch | Huh? |
08:08:19 | FromGitter | <gogolxdong> we pitch it to them. |
08:08:46 | PMunch | Ah okay |
08:12:18 | FromGitter | <gogolxdong> We pick SPA, GUI, Emebbed system and system development demonstrations, have got our own production as SPA demo. |
08:13:16 | PMunch | Sounds like reasonable choices for Huawey/Tencent |
08:13:21 | PMunch | Huawei* |
08:14:10 | FromGitter | <gogolxdong> yeah , I know them. |
08:56:43 | * | ehmry joined #nim |
09:04:26 | * | clyybber joined #nim |
09:09:47 | FromGitter | <zacharycarter> Lol I didn't realize I was name dropped in that Reddit thread yesterday 😛 |
09:11:30 | * | shomodj joined #nim |
09:12:52 | PMunch | Which one? |
09:14:46 | FromGitter | <zacharycarter> I'll send the link when I get back to my desk. It was about HCR |
09:19:48 | FromGitter | <mratsim> you said, “I will be the guinea pig” :p |
09:25:48 | FromGitter | <bevo009> what is replacing math.round? |
09:27:04 | * | terps quit (Ping timeout: 264 seconds) |
09:28:57 | * | terps joined #nim |
09:31:06 | FromGitter | <zacharycarter> @mratsim true... |
09:31:32 | FromGitter | <zacharycarter> I need to spend more time on figuring out what is causing the errors I'm seeing with hcr |
09:44:13 | PMunch | bevo009, nothing? |
09:44:30 | PMunch | https://github.com/nim-lang/Nim/blob/master/lib/pure/math.nim#L736 <- maybe this should be added to the math module itself? |
09:45:08 | PMunch | Oh, you're talking about the round version with places |
09:45:17 | PMunch | This thing: https://nim-lang.org/docs/math.html#round,T,int |
09:49:55 | FromGitter | <bevo009> I think Miran's book needs an update with this |
09:49:56 | FromGitter | <bevo009> ```import strformat ⏎ echo &"{sin(cRadians):.2f}"`````` [https://gitter.im/nim-lang/Nim?at=5d552ac41dadc42a11746726] |
09:50:19 | FromGitter | <bevo009> to replace echo sin(cRadians).round(2) |
09:51:05 | FromGitter | <bevo009> That's what the cryptic deprecated msg means right? |
09:51:52 | PMunch | Yes |
09:51:56 | PMunch | That's what it means |
09:52:22 | FromGitter | <bevo009> All good. I like when I can figure it out myself :) |
09:52:37 | PMunch | Basically the round operation from math can't reliably work because of how floats work, so it was deprecated in favour of the string formatting versions. |
09:53:43 | FromGitter | <bevo009> yeah I was just reading the fix commits |
09:54:27 | FromGitter | <bevo009> Took me a while to find the discussion |
09:55:08 | FromGitter | <cupen> Is there a actor framework for nim? like akka for scala/java. I know it a big project, just an alpha version would be nice. ;) |
09:57:57 | FromGitter | <bevo009> @PMunch have you taken over developing the Nim Playground? |
09:58:11 | PMunch | bevo009, yes I'm the current maintainer :) |
09:58:20 | FromGitter | <bevo009> Do you plan to implement a run keyboard shortcut, or support args/user input? |
09:58:52 | PMunch | Yeah I was thinking about a run keyboard shortcut, along with some other practical ones |
09:58:56 | FromGitter | <bevo009> I notice you fixed up the save gists feature, nice |
09:59:02 | Araq | if your productivity is too high and you don't spend enough time in debugging, you should switch over to use an "actor framework". |
09:59:07 | FromGitter | <zacharycarter> PMunch: https://www.reddit.com/r/ProgrammingLanguages/comments/cq4b1x/compiled_language_that_can_interpret_itself/ewwouhp/ |
09:59:39 | PMunch | bevo009: Yes, not only that, but you can also link directly to the playground with your ix.io paste :) |
10:00:19 | PMunch | cupen, there is nimoy: https://github.com/evacchi/nimoy |
10:00:38 | FromGitter | <bevo009> yeah I'll have to study how ix.io works |
10:00:55 | PMunch | It's pretty neat |
10:00:55 | FromGitter | <bevo009> pasting to the playground and save gist seems easier |
10:01:04 | Araq | ok, PMunch had the better answer :P |
10:01:12 | PMunch | Araq, haha :P |
10:01:15 | FromGitter | <cupen> @PMunch it seems do not support cluster. |
10:01:24 | Araq | I still hate actors. |
10:01:28 | FromGitter | <cupen> and here is too. https://nim-lang.org/0.13.0/actors.html |
10:01:30 | PMunch | Yeah I've never used it, just did a quick Google search.. |
10:01:47 | FromGitter | <cupen> why? actors is nice for game backend. |
10:02:00 | PMunch | bevo009, how so? |
10:02:31 | Araq | maybe, I never wrote a game backend. |
10:03:29 | Araq | in general if you say "message passing" I say "great, undebuggable code where everything happens somewhere else" also known as the "Smalltalk experience". |
10:03:32 | FromGitter | <bevo009> @PMunch sorry I means 'share to ix' button |
10:04:02 | PMunch | ix.io is great, you can curl directly to it, so it's really easy to set up scripts that will send things to ix. And all of the options are controlled through the URL, so to get line numbers just add a / to the URL, to get syntax highlighting add /nim |
10:04:23 | clyybber | Araq: I guess thats why actor models are mostly used in applications where errors are guaranteed to pop up. |
10:04:56 | PMunch | Yeah share to ix basically just sends it to ix, and since the playground supports loading from ix it gives you the direct link to do so |
10:05:21 | FromGitter | <bevo009> @PMunch I'd probably need a simple tutorial to use it correctly |
10:05:39 | PMunch | The button? |
10:05:49 | FromGitter | <bevo009> ix.io the site |
10:05:56 | PMunch | Oh :P |
10:06:15 | FromGitter | <bevo009> yeah the button is brain dead simple |
10:06:26 | PMunch | I've got this as a keyboard shortcut: xclip -o -selection -primary | curl -F 'f:1=<-' ix.io | head -c-1 | echo "$(< /dev/stdin)/" | xclip -i -selection clipboard |
10:06:50 | PMunch | It grabs my current selection, sends it to ix, and puts the URL in my clipboard |
10:07:11 | PMunch | So basically a regular copy-paste but I get a link instead |
10:07:21 | FromGitter | <bevo009> cheers, stealing that |
10:07:26 | Araq | proc send(msg): void |
10:07:36 | Araq | there, I spelt out the problem with "actors" |
10:07:59 | Araq | its return type is 'void'. can't compose it. |
10:08:46 | Araq | it's the ultimate side-effect-heavy paradigm. |
10:09:23 | FromGitter | <cupen> Haha, I agree with you about this, it's hard to write code correctly in a distributed environment. |
10:09:41 | Araq | so you pass a "return address" in the message so the actor knows whom to reply to |
10:10:10 | Araq | see also Golang's 'go' keyword. |
10:10:34 | Araq | gimme FlowVars already please, thanks. |
10:27:21 | * | laaron quit (Remote host closed the connection) |
10:30:36 | FromGitter | <cupen> ;p |
10:31:29 | * | laaron joined #nim |
10:32:45 | federico3 | PMunch: what's that echo? |
10:33:38 | FromGitter | <alehander42> is nim-prompt |
10:33:47 | * | actuallybatman quit (Ping timeout: 245 seconds) |
10:33:47 | FromGitter | <alehander42> the best nim lib for repl-s |
10:34:00 | dom96 | !eval echo"hello" |
10:34:03 | NimBot | hello<br/> |
10:34:26 | dom96 | PMunch whyyy |
10:35:59 | clyybber | Araq: We should always =sink into result, right? |
10:36:12 | clyybber | When its possible |
10:37:43 | PMunch | federico3, not entirely sure, I think it was a way to replace the newline with a / or something like that |
10:37:48 | * | dddddd joined #nim |
10:37:56 | PMunch | dom96, ah.. |
10:38:17 | krux02 | !eval 17+4 |
10:38:19 | NimBot | Compile failed: <span style="color: #66d9ef;">Hint: </span>used config file '/nim/config/nim.cfg'<span style="color: #50fa7b;"> [Conf]</span><br/><span style="color: #66d9ef;">Hint: </span>system<span style="color: #50fa7b;"> [Processing]</span><br/><span style="color: #66d9ef;">Hint: </span>widestrs<span style="color: #50fa7b;"> [Processing]</span><br/><span style="color: #66d9ef;">Hint: </span>io<span style="color: #50fa7b;"> [Processing]</span><br/><span style... |
10:38:20 | FromGitter | <alehander42> @dom96 i made a nimbox-based dsl |
10:38:26 | dom96 | !eval it's worse like this |
10:38:28 | NimBot | Compile failed: <span style="color: #66d9ef;">Hint: </span>used config file '/nim/config/nim.cfg'<span style="color: #50fa7b;"> [Conf]</span><br/><span style="color: #66d9ef;">Hint: </span>system<span style="color: #50fa7b;"> [Processing]</span><br/><span style="color: #66d9ef;">Hint: </span>widestrs<span style="color: #50fa7b;"> [Processing]</span><br/><span style="color: #66d9ef;">Hint: </span>io<span style="color: #50fa7b;"> [Processing]</span><br/><span style... |
10:38:36 | FromGitter | <alehander42> do you think it make sense to include it in nimbox |
10:38:42 | FromGitter | <alehander42> or should it be another lib |
10:38:47 | dom96 | alehander42: separate package IMO |
10:38:48 | PMunch | I moved the HTML conversion to the server, the idea was to have an argument in the JSON that would choose which output you wanted |
10:39:10 | dom96 | PMunch okay, so please make the default as it was |
10:39:18 | PMunch | Will do |
10:39:54 | krux02 | pmunch why didn't you just put an anse escape stream filter at the end? |
10:40:24 | PMunch | What do you mean? |
10:40:51 | krux02 | well, I would have done all the ansi escape filtering as a post process. |
10:41:11 | PMunch | On the front-end? |
10:41:39 | krux02 | you wrote it for the nim playground didn't you? |
10:41:49 | PMunch | Yes |
10:42:26 | krux02 | how do you do the htmlification for the browser? |
10:42:33 | PMunch | I don't quite remember why I moved it to the back-end, but I think I had some reasoning for it.. |
10:42:46 | PMunch | Currently it's all done on the back end |
10:42:57 | krux02 | it is ok to have it in the backend. |
10:43:21 | PMunch | The HTML is just added directly into the site |
10:43:21 | krux02 | with backend you mean "on the server" |
10:43:25 | PMunch | Yes |
10:43:36 | krux02 | that is a good solution. |
10:43:59 | PMunch | https://github.com/PMunch/nim-playground/blob/master/src/nim_playground.nim#L52-L54 |
10:45:22 | krux02 | ok, but that means the nimbot uses the nim playground codebase doesn't it? |
10:45:46 | PMunch | No, it just does a call to play.nim-lang.org/compile |
10:46:07 | krux02 | arg |
10:46:43 | krux02 | why does everything need to be a microservice hell |
10:46:53 | krux02 | that also explains why nimbot is so slow |
10:47:24 | PMunch | It is slow because the VPS that the playground runs on is slow :P |
10:47:58 | PMunch | And the docker encapsulation of the execution adds a fairly big delay |
10:48:51 | PMunch | I have considered setting up a pool of running containers and just delegate tasks to them, that would save a lot of execution time |
10:49:31 | dom96 | err |
10:49:44 | dom96 | really? You want NimBot to run it's own playground? |
10:50:20 | krux02 | I don't even know what the point of !eval is |
10:50:29 | dom96 | Having two risky services that need a lot of maintenance is a bad idea |
10:50:49 | krux02 | If you ask me, we don't need !eval at all. |
10:51:02 | dom96 | and no, network requests to a microservice are negligible |
10:51:14 | krux02 | dom96, no they are not. |
10:51:25 | dom96 | they are |
10:51:26 | krux02 | network requests are never neglible |
10:51:48 | dom96 | both are running on a VPS, the latency is likely less than 50ms |
10:52:02 | krux02 | wich is 50ms too much |
10:52:04 | dom96 | the bulk of the time is compilation |
10:52:23 | krux02 | compilation is also too slow, that is tre |
10:52:25 | krux02 | true |
10:52:27 | dom96 | This isn't a freaking real-time system |
10:53:05 | PMunch | Yeah it doesn't really matter if !eval takes a while :P |
10:53:11 | krux02 | I don't care if it is realtime system or not. I just think that adding network latency to anything for no real good is a bad idea. |
10:53:17 | dom96 | no |
10:53:21 | dom96 | there is a real good |
10:53:28 | PMunch | I mean if it took a couple of minutes it would be annoying, then discussion would have moved on |
10:53:30 | dom96 | maintenance costs far more |
10:53:44 | krux02 | the only reason why the latency in !eval doesn't really matter is because !eval doesn't really matter. |
10:54:31 | FromGitter | <alehander42> krux02 how would !eval work otherwise |
10:54:39 | FromGitter | <alehander42> you cant run nim code on the irc client |
10:54:56 | krux02 | alehander42: do you need to? |
10:54:59 | dom96 | honestly, this is just a waste of time arguing over |
10:55:04 | FromGitter | <alehander42> this can only work with some kind of web service |
10:55:15 | dom96 | !eval is a common feature in language IRC channels |
10:55:26 | dom96 | stop crying about features that you don't even care about |
10:55:29 | dom96 | let others use them at least |
10:55:46 | FromGitter | <alehander42> i have to agree, if people maintain and use it, it is needed |
10:56:20 | krux02 | alehander42: well, an alternative is how the emacs chat does it. In emacs you can run an IRC client, and code snippents that are in emacs can be evaluated wih a key combanation. There you have 0 latencey for the answer. |
10:56:26 | dom96 | people obviously use it, otherwise I wouldn't have noticed that it's broken |
10:56:35 | PMunch | Hmm, dom96 should I add IRC colour output? |
10:56:53 | FromGitter | <alehander42> krux02: well people here use 10 different things, e.g. i run gitter in a browser, people use discord or weechat |
10:57:03 | FromGitter | <alehander42> this is a very obscure solution |
10:57:23 | dom96 | PMunch I would prefer to do that myself, you should add a JSON output that has things like {"messages": ["color": "red", text: "Error: ... "]} |
10:57:26 | krux02 | dom96: I noticed that it was broken yesterday, because I wanted to know if I can easily break it. |
10:57:37 | FromGitter | <alehander42> i'd say it would be better to have a multilang service well engineered for that |
10:57:45 | PMunch | dom96, yeah I'm already working on that |
10:57:56 | dom96 | PMunch thanks :) |
10:57:57 | FromGitter | <alehander42> but otherwise it sems fine to me |
10:57:57 | PMunch | But I was just planning on taking the output from ansiparse |
10:58:10 | PMunch | So it would be the ANSI codes and not colour names |
10:58:58 | dom96 | PMunch sure, that will work too |
10:58:59 | krux02 | PMunch, Just a random question are you British? |
11:00:51 | FromGitter | <alehander42> PMunch is the third son of Charles |
11:02:57 | PMunch | Haha, no I'm Norwegian |
11:03:11 | PMunch | Is it my use of colour over color that made you wonder? |
11:07:12 | FromGitter | <cupen> @PMunch ";p" was a emoji, like 😄 |
11:08:40 | PMunch | ? |
11:11:59 | FromGitter | <cupen> sorry, just replay this. *<federico3>* PMunch: what's that echo? |
11:16:28 | krux02 | PMunch, yes it was colour over color. |
11:17:10 | krux02 | I know that British English is the original English, but American English took over to be the standard English |
11:18:16 | krux02 | you also have "Colour" in the codebase of nim playground |
11:18:36 | PMunch | In school we are taught British english, pronounciation and all. But I'm a bit back and forth |
11:18:42 | PMunch | Always preferred colour though |
11:19:36 | PMunch | I still use my British accent from time to time, but for the most part I use my non-descript American accent |
11:30:31 | * | stefanos82 joined #nim |
11:36:49 | Zevv | Is there some "trust-my-I-know-what-I'm-doing" way to get around "cannot be captured as it would violate memory safety"? I have a nested function X that is called recursively, which is defined inside function Y. Y gets passed a var T which I like to modify from function X, but now I need to pass this closure around in all calls to X. Techincally not a problem, but it is somewhat noisy. |
11:38:13 | krux02 | PMunch, I think you use your Norwegian accent for most of the time though. |
11:38:22 | clyybber | Zevv: I guess replace var with ptr? |
11:38:38 | Zevv | oh right. that's dirty but that would work |
11:38:59 | krux02 | Zevv, ptr is always the "trust me I know what I am doing" thing |
11:39:42 | Zevv | :) |
11:40:05 | Zevv | I guess the error is a bit too trigger happy, since this is a valid use case imho |
11:40:15 | Zevv | there is no escaping, but maybe it is not trivialy provable for the compiler |
11:41:01 | Zevv | oh I just did a little template that silently pass the var around, that is nice. It's almost like a monad, silently passing stuff around without telling anyone |
11:46:38 | krux02 | Zevv I prefer a very strict compiler that you have to turn off from time to time over a compiler that magically pretends on everything to know what you mean. |
11:56:57 | PMunch | Well yes :P Although I write more English than Norwegian I still speak more Norwegian than English on most days |
11:57:52 | PMunch | But we have some English speaking people at work so it's not that uncommon that I speak more English than Norwegian some days :P |
12:04:48 | * | nsf quit (Quit: WeeChat 2.4) |
12:08:10 | * | rockcavera joined #nim |
12:08:45 | leorize | mfiano: yes, I'm nim.nvim's author |
12:11:26 | Zevv | krux02: fair enough |
12:12:26 | dom96 | Zevv: is this a new error? |
12:12:47 | mfiano | leorize: cool. I am just starting to learn nim, but i live in vim so was hoping this would work out despite being experimental still. |
12:14:48 | PMunch | !eval echo "Colours are gone now dom96" |
12:14:50 | NimBot | Colours are gone now dom96 |
12:14:57 | dom96 | thx |
12:15:00 | FromGitter | <bevo009> @dom96 anyone seeing old forum threads popping up unanswered? ⏎ eg this thread says activity 23 hours ago ⏎ https://forum.nim-lang.org/t/1887 ⏎ But you click on it and it's "1 YEAR SINCE LAST REPLY" [https://gitter.im/nim-lang/Nim?at=5d554cc4029a51607f9aa09f] |
12:15:11 | dom96 | bevo009: yes, it's a known bug |
12:15:19 | PMunch | So you can add "outputFormat" to the JSON object to request different formats |
12:15:22 | FromGitter | <bevo009> ok cheers |
12:15:27 | dom96 | (you can't see the post because it's moderated, or a spammer made it) |
12:15:59 | FromGitter | <bevo009> I wasn't sure if it was new or not |
12:16:54 | PMunch | HTML for the HTML output, Raw for only text (the old way, default), ANSI to get the output with the actual ANSI escape codes like they appears from the compiler, and AnsiParsed which gives an array of objects splitting the string into ANSI CSI and String blocks. |
12:22:52 | * | terps quit (Ping timeout: 264 seconds) |
12:22:53 | * | Kaivo joined #nim |
12:23:30 | PMunch | Okay, as soon as the cache catches up the online playground should get colours back as well :) |
12:24:48 | * | abm joined #nim |
12:26:24 | * | laaron quit (Remote host closed the connection) |
12:28:15 | * | laaron joined #nim |
12:30:28 | FromDiscord_ | <kodkuce> can anyone explain to me how to write code to drop a websocket connection if it zoombies out( AKA just connects and sends no msg) http://niv.github.io/websocket.nim/docs/0.1.1/websocket/server.html ? i tryed first making an async proc and then doing asyncSleep(sometime) then check if connection authed , tought i head issue here passing varaible as ref and head issue killing ws from that proc crashed my server for some reason |
12:34:20 | Zevv | dom96: not sure how old or new it is |
12:35:58 | dom96 | kodkuce: You should track each client's last pong, periodically send pings to each client and disconnect clients that haven't sent a message in the last 20 seconds or whatever amount you want |
12:36:06 | * | terps joined #nim |
12:37:13 | FromDiscord_ | <kodkuce> hmm will try |
12:37:43 | dom96 | you could also require each client to send a hello message, if they don't send one within a certain amount of time, disconnect them |
12:38:26 | dom96 | In any case, this is something you need to solve by creating a protocol for your communications |
12:38:30 | * | laaron quit (Remote host closed the connection) |
12:41:38 | FromDiscord_ | <kodkuce> my main issue is atm how to brunch out from webscoket, atm all code is run under while true: and from what i see it heppends evry time i recive a ws msg |
12:43:08 | * | laaron joined #nim |
12:58:28 | * | terps quit (Ping timeout: 252 seconds) |
12:58:34 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
12:58:56 | * | laaron joined #nim |
13:00:38 | * | terps joined #nim |
13:04:04 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
13:04:26 | * | laaron joined #nim |
13:05:42 | FromDiscord_ | <Kiloneie> You should read about game networking, theres a ton of that out there. It seems you have taken up a project you are not ready for(or don't understand what it takes) |
13:14:20 | Zevv | why is naming things so hard :( |
13:20:24 | * | rockcavera quit (Remote host closed the connection) |
13:20:26 | leorize | mfiano: it's already working pretty well, according to my issues track record :) You'd need neovim though, this plugin won't run properly on vim |
13:20:52 | mfiano | of course. i do use that |
13:21:27 | mfiano | One thing that bothers me is the need for yet another completion framework. I think I have 4 now due to various languages supporting just 1 |
13:22:07 | mfiano | But, it seems to be working |
13:22:09 | leorize | what frameworks are you using? |
13:22:34 | mfiano | I use ncm2 with LSP for most other languages |
13:22:48 | leorize | oh, it should work with ncm2 I think |
13:22:54 | leorize | I'll read up on that in a bit |
13:23:11 | mfiano | It did not, by default anyway |
13:23:26 | mfiano | I'm not certain how to configure those completion systems yet though. |
13:23:58 | * | rockcavera joined #nim |
13:24:49 | * | terps quit (Quit: WeeChat 2.5) |
13:47:22 | dom96 | kodkuce: you should have a look at how my snake game is implemented, it's old(ish) code now but should still be helpful, I'm happy to answer any questions you have as well. |
13:47:29 | * | Ven`` joined #nim |
13:47:32 | dom96 | https://github.com/dom96/snake |
13:47:41 | dom96 | Kiloneie: everyone's gotta start somewhere :) |
13:49:15 | * | xet7 quit (Remote host closed the connection) |
13:49:25 | * | laaron quit (Remote host closed the connection) |
13:50:17 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
13:51:42 | * | laaron joined #nim |
14:00:47 | FromGitter | <iffy> In Python, there's the pattern of classes with methods named `something_X` and `something_Y`. Then your code can access available methods at runtime by looking through `dir(self)` and looking for the `something_` prefix. For instance, the cmd module https://docs.python.org/3/library/cmd.html lets you add commands to your repl by writing `do_X` methods. |
14:01:25 | FromGitter | <iffy> What's an equivalent way of adding a bunch of procs to a Table so that I can look up the procs by string name? |
14:01:33 | * | PMunch quit (Remote host closed the connection) |
14:01:54 | FromGitter | <alehander42> it would be possible for a prompt library |
14:02:00 | FromGitter | <alehander42> to do a similar thing in nim |
14:02:26 | FromGitter | <iffy> I'm actually making an RPC thing, the `cmd` module was just an example. |
14:02:30 | FromGitter | <alehander42> one would e.g. define his doX functions for the Repl type or under a template |
14:02:41 | FromGitter | <alehander42> and it would autogenerate stuff based on it |
14:02:43 | FromGitter | <iffy> I want to somehow annotate some procs for inclusion in the interface |
14:02:47 | FromGitter | <alehander42> i did a lot of similar things |
14:02:51 | FromGitter | <alehander42> for my IPC |
14:03:20 | FromGitter | <iffy> Do you have an example of what that looks like? |
14:03:59 | FromGitter | <alehander42> e.g. ⏎ exportAPI: ⏎ reload is proc(lang: Lang, data: PoolData): Future[void] ⏎ prestart is proc(wait: bool, reload: bool, events: seq[EventElement], main: SourceTextLine): Future[void] ⏎ ... [https://gitter.im/nim-lang/Nim?at=5d55664fba937704ca828bb6] |
14:04:13 | * | lritter quit (Ping timeout: 245 seconds) |
14:04:49 | FromGitter | <alehander42> is called |
14:04:55 | FromGitter | <iffy> do you have the reload and prestart bodies defined there? Or somewhere else? |
14:04:57 | FromGitter | <alehander42> oh God, wait, this doesnt look clear |
14:05:11 | FromGitter | <alehander42> no, they are separate functions defined up |
14:05:14 | FromGitter | <alehander42> but they can be inside |
14:05:16 | FromGitter | <alehander42> as well |
14:05:35 | FromGitter | <iffy> (it's clear enough) |
14:05:55 | FromGitter | <alehander42> you can have something like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d5566c3204d3d7385de427c] |
14:06:30 | FromGitter | <iffy> and rpc is a template or a macro? |
14:06:34 | FromGitter | <alehander42> a macro |
14:06:50 | FromGitter | <iffy> so I've got to dust off my macro skills :) |
14:06:56 | FromGitter | <alehander42> which can e.g. process each function and prepare code that does .. what it needs |
14:07:00 | * | lkw quit (Quit: ZNC 1.7.3 - https://znc.in) |
14:07:01 | FromGitter | <alehander42> btw take a look at https://github.com/status-im/nim-json-rpc |
14:07:02 | FromGitter | <alehander42> as well |
14:07:07 | FromGitter | <alehander42> maybe it can work for you? |
14:08:52 | FromGitter | <iffy> it looks like it might be perfect; thank you! |
14:09:07 | FromGitter | <alehander42> with macros i usually just iterate and do ssomething like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d556783f3c2c17e1fb4ea03] |
14:09:15 | FromGitter | <alehander42> oh great |
14:09:19 | FromGitter | <alehander42> :) |
14:11:57 | * | lkw joined #nim |
14:16:35 | * | lkw quit (Client Quit) |
14:17:50 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:22:32 | FromGitter | <iffy> Hmm... that first example in the readme doesn't work for me: `Error: undeclared identifier: 'result'` |
14:25:33 | * | endragor quit (Remote host closed the connection) |
14:27:07 | * | lkw joined #nim |
14:29:22 | * | xet7 joined #nim |
14:32:34 | FromGitter | <mratsim> that’s strange, thanks for the bug report |
14:48:44 | * | nsf joined #nim |
14:50:17 | * | laaron quit (Remote host closed the connection) |
14:53:10 | * | laaron joined #nim |
15:09:22 | * | sagax quit (Remote host closed the connection) |
15:10:12 | * | endragor joined #nim |
15:12:20 | * | endragor quit (Read error: Connection reset by peer) |
15:12:31 | * | endragor joined #nim |
15:14:12 | FromDiscord_ | <Kiloneie> You know naming things is fcking me too xD... look at this shit: https://play.nim-lang.org/#ix=1RMX |
15:21:39 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:25:33 | FromDiscord_ | <Kiloneie> Omg finally finished Roman numerals exercise after 3 freaking(not full) days D: |
15:29:25 | FromDiscord_ | <Kiloneie> Mine is once again a mile long: https://exercism.io/tracks/nim/exercises/roman-numerals/solutions/4d5888b530634189b8f69c90e7bf5af1 |
15:29:25 | FromDiscord_ | <Kiloneie> |
15:29:25 | FromDiscord_ | <Kiloneie> and this is the shortest? solution ? https://exercism.io/tracks/nim/exercises/roman-numerals/solutions/c30861d5613f4976af148d3a0f0ffea0 |
15:29:25 | FromDiscord_ | <Kiloneie> |
15:29:25 | FromDiscord_ | <Kiloneie> I can't even understand it... |
15:33:52 | * | nsf quit (Quit: WeeChat 2.4) |
15:35:25 | * | laaron quit (Remote host closed the connection) |
15:36:11 | * | zedeuss is now known as zedeus |
15:36:56 | FromGitter | <mratsim> it’s just doing division until there is no rest |
15:37:07 | FromGitter | <mratsim> remainder* |
15:37:47 | FromDiscord_ | <Kiloneie> I tried that, and failed miserably D:. i got the result right but the letters were mostly never matching how it actually should be |
15:37:52 | * | laaron joined #nim |
15:38:19 | FromGitter | <mratsim> probably because you need special handling on 4 |
15:38:31 | FromGitter | <mratsim> and 9 |
15:38:49 | FromDiscord_ | <Kiloneie> yeah, i couldn't wrap my head on that one until today with gluing strings together |
15:39:50 | FromGitter | <mratsim> Gooseus just handle 4 and 9 like another 5 instead of introducing specific ordering logic |
15:40:53 | FromDiscord_ | <Kiloneie> Comes with experience i lack ^,^ |
15:44:42 | clyybber | krux02: Can you help me understand something? |
15:45:10 | clyybber | AFAICT discardCheck converts calls to something with {.discardable.} to `discard call()` |
15:46:07 | clyybber | Or it should? |
15:46:15 | clyybber | But it doesn't? |
15:47:23 | * | Ven`` joined #nim |
15:49:03 | krux02 | clyybber, I am here |
15:49:55 | clyybber | Hi, this branch: https://github.com/nim-lang/Nim/blob/devel/compiler/semstmts.nim#L141 |
15:50:19 | krux02 | discardable is something that doesn't work very well, Araq knows more about it than me, but as far as I know it is something that should only be used in rare cases because it doesn't work well with everything in Nim |
15:50:52 | clyybber | krux02: Yeah, I have to deal with it in injectdestructors and I thought about making it a transform in sem |
15:51:15 | clyybber | So that it just inserts a discardStmt where needed |
15:51:29 | clyybber | and it seems the logic is already there, but it is dead code rn |
15:51:39 | krux02 | what do you mean, with "where needed" |
15:51:59 | clyybber | let f be a proc with {.discardable.} |
15:52:15 | krux02 | the discard stmt is needed for the semchecker. It is an artificial requirement. Theoretically it could be removed and everything would still compile. |
15:52:59 | clyybber | so a call to f like `f()` gets transformed to `discard f()` |
15:53:21 | clyybber | If `f()` is in a stmt list and not used as an expression |
15:54:22 | clyybber | krux02: But the thing is the branch tries to insert the discardStmt and then throws it away. |
15:54:45 | clyybber | As in `n` doesn't get returned |
15:54:48 | krux02 | yea, this is something the compiler doesn't do cleanly |
15:55:16 | clyybber | If I fix this to insert discardStmts they will appear in macros right? |
15:55:26 | clyybber | s/in macros/to macros |
15:56:17 | krux02 | I don't think it is a problem to have an autoinjected discard statement in macros. |
15:56:33 | krux02 | but maybe the thing should then be renamed to autodiscard, because that is what it does. |
15:56:50 | krux02 | I think my RFC here is related: https://github.com/nim-lang/RFCs/issues/149 |
15:57:06 | krux02 | bascally it proposes a new algorithm to do type inference. |
15:57:35 | krux02 | Then it would introduce the discard statement when (void) is expected |
15:57:48 | clyybber | I see. |
15:58:02 | krux02 | the RFC doesn't mention the discard statement though |
15:58:10 | krux02 | but I think it would be affected and should be mentioned |
15:58:30 | * | laaron quit (Remote host closed the connection) |
15:58:41 | clyybber | krux02: Ok, so you are ok with the autoinject discard for discardable? |
15:58:59 | krux02 | yes I am. |
15:59:11 | clyybber | Nice, thank you |
15:59:25 | * | rayman22201 joined #nim |
15:59:46 | krux02 | But if you do that, I would like you to also add a documentation comment to ``discardable``, so that people know that the compiler will try to autoinject the discard statement. |
16:00:32 | krux02 | one last question, when exactly would the discard statement be injected? |
16:01:31 | krux02 | I think the discard statment somewhere in a deep ast is fine |
16:02:03 | krux02 | but in short expressions, such as ``mymacro(somediscardableproccall(123,"abc"))`` there should not be a discard statement, as the macro programmer probably wants to use the value. |
16:03:07 | clyybber | krux02: Everywhere where somediscardableproccall is used as a statement. |
16:03:27 | krux02 | yea that is fine with me. |
16:03:38 | krux02 | because that is what it eventually is. |
16:03:43 | clyybber | Yeah |
16:04:27 | krux02 | I think this discard statement is some of the distinguishing features of Nim that really turned out to be great. |
16:04:55 | krux02 | so so great for wrapping C API (return int all the time often without meaning) |
16:05:47 | clyybber | Yeah, I wholeheartedly agree |
16:09:13 | krux02 | not so great for ... |
16:10:19 | clyybber | well, for C API's thats what the discardable thing is for |
16:12:35 | * | shomodj joined #nim |
16:12:46 | * | shomodj quit (Client Quit) |
16:18:08 | krux02 | yea |
16:18:16 | krux02 | C has a weird history |
16:19:05 | krux02 | I also think that the approach of Go where ever procedure has N arguments and N return values is nicer than nims single tuple result. |
16:20:23 | krux02 | this ``iterator mpairs(abc): tuple[int, var T]`` is just a hack. There is no tuple type like that. |
16:29:16 | FromGitter | <Varriount> krux02: I don't quite follow? Aren't Go's return types just tuples behind the scenes? |
16:30:12 | krux02 | it is not what it compiles to in the backend. |
16:31:45 | krux02 | when you have different types, you can attach type attributes individually, for example var or discardable. when you have only a single tuple type, you have only one type to attach attributes. In Nim it works anyway for the pairs iterator, but if you ask me that is not the cleanest way possible. |
16:44:45 | disruptek | discard is great. |
16:44:50 | disruptek | very much agree with that. |
16:48:57 | * | endragor_ joined #nim |
16:49:01 | * | actuallybatman joined #nim |
16:49:32 | disruptek | krux02: i'm trying to grok that; so you'd like nim to be able to return a tuple that has some attributes that are immutable and others mutable? |
16:49:52 | krux02 | no not really |
16:49:59 | krux02 | I don't want to change what we have. |
16:50:09 | disruptek | but, i mean in your ideal version. |
16:50:17 | krux02 | It is just something that I thought about that could be better. |
16:51:17 | krux02 | disruptek: what you are describing is what we already have for iterators. In my ideal version we would not need to abuse tuples for that. |
16:51:42 | * | endragor quit (Ping timeout: 245 seconds) |
16:53:00 | FromGitter | <dawkot> does anyone know why `inp.text` results in nil here? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d558deb90bba62a127fa0cd] |
16:54:11 | disruptek | krux02: maybe you want iterator syntax to destructure an object? |
16:54:32 | krux02 | disruptek, it is not about the syntax |
16:55:04 | krux02 | it is about how types in the compiler how they are represented, what you are allowed to do with them etc. |
16:55:32 | krux02 | having different type values would clean things up in the compiler |
16:55:49 | disruptek | so it really is bigger than that abuse in iterators. |
16:55:55 | * | abm quit (Remote host closed the connection) |
16:56:17 | * | abm joined #nim |
16:56:35 | krux02 | well the abuse in iterator has consequences. It basically means that the tuple type has been hacked to support this weired interal tags |
16:56:56 | krux02 | I don't really like it. But I am also not going to change anything about it until I really hit a problem with it. |
16:58:02 | disruptek | i didn't understand why tuple didn't offer `contains` or `low` or `high`. now i kinda understand why they were omitted but i'm not sure i wouldn't like to put them back in. |
16:58:26 | disruptek | it's not your python's tuple. |
16:59:30 | * | ng0 joined #nim |
16:59:47 | disruptek | maybe what you want is partially materialized objects. it's actually not crazy. |
17:00:18 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:02:10 | disruptek | nim's return value, its result, could be a third-way magical PMO that perhaps even affords some kind of unique capability or dialog between caller/callee that is otherwise absent. |
17:02:39 | shashlick | nightlies are completely broken on windows and arm since sqlite is not available |
17:05:45 | * | Trustable joined #nim |
17:16:07 | * | terps joined #nim |
17:26:47 | FromGitter | <dawkot> this is it not valid syntax? ```nim ⏎ const form, input, button = randId() ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5d5595d67d56bc60805c2aa9] |
17:27:00 | FromGitter | <dawkot> it's not a big deal, but pretty weird |
17:29:55 | * | Ven`` joined #nim |
17:31:04 | * | endragor_ quit (Remote host closed the connection) |
17:36:35 | * | sagax joined #nim |
17:41:07 | * | shomodj joined #nim |
17:41:25 | * | terps quit (Ping timeout: 250 seconds) |
18:07:03 | Zevv | Hmm imports which have main code but no symbols which are used by others are marked as 'imported and not used' |
18:12:51 | Zevv | message for NPeg users: I've added a bunch of features over the last few days, much obliged if you have some time to see if your stuff does not break with latest master |
18:18:41 | lqdev[m] | Zevv: https://github.com/zevv/npeg#ast-abstract-syntax-tree-captures in the second code example, rule `number`: `>+Digit` will be parsed as a unary operator `>+` operating on `Digit`, you need parentheses here |
18:19:48 | lqdev[m] | https://github.com/zevv/npeg#code-block-captures you also forgot the 'object' in the Capture type description |
18:20:16 | Zevv | hmm dang I should make these examples in the readme testable |
18:21:36 | Zevv | lqdev[m]: and *ha* got you there, no parentheses needed. Npeg is smart and understands concatenated prefixes :) |
18:21:57 | Zevv | "smart" might end up to be "stupid" one day, but it surely seems like a good idea for now |
18:22:02 | lqdev[m] | I kind of thought you may have added that, it's a nice feature |
18:33:49 | disruptek | Zevv: my npeg is fine, thank you; but, i don't do anything sophisticated with it. ;-) |
18:33:50 | * | terps joined #nim |
18:34:08 | Zevv | thanks for testing anyway! |
18:41:10 | FromGitter | <alehander42> i might stream |
18:42:40 | Zevv | subject? |
18:43:40 | FromGitter | <alehander42> around 22;00 |
18:43:55 | FromGitter | <alehander42> moving out some code of my project into a karax-like lib for termbox |
18:59:28 | * | terps quit (Ping timeout: 264 seconds) |
19:00:14 | Zevv | might attend! |
19:01:12 | FromGitter | <alehander42> ok |
19:01:15 | FromGitter | <alehander42> installing obs |
19:01:26 | FromGitter | <alehander42> thats what people do righ |
19:07:28 | Zevv | no clue, i dont stream :) |
19:08:04 | disruptek | alehander42: which os? |
19:14:49 | FromGitter | <alehander42> i dont promise |
19:14:51 | FromGitter | <alehander42> linux |
19:15:51 | disruptek | if you're using wayland, https://github.com/schauveau/wf-recorder-x could use some extra testing. |
19:24:23 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:30:43 | * | vesper11 quit (Ping timeout: 248 seconds) |
19:31:16 | * | actuallybatman quit (Ping timeout: 244 seconds) |
19:31:45 | FromGitter | <alehander42> https://www.twitch.tv/alehander42/ |
19:39:31 | * | krux02 quit (Remote host closed the connection) |
19:43:13 | federico3 | what are you doing? |
19:45:02 | federico3 | alehander42: [shameless plug] https://github.com/FedericoCeratto/nim-dashing |
19:53:08 | Zevv | disruptek: how does one record wayland? |
19:53:16 | Zevv | wasn't that designed to be uninjectable & unrecordable? |
19:53:47 | disruptek | unrecordable? |
19:54:23 | Zevv | there's no mechanism in wayland to peek in someone elses window, nor to record keystrokes or mouse events |
19:55:01 | disruptek | i dunno. i had to hack up the code a bit and it's pretty tiny; you can probably see how it does it in that project above. |
19:55:11 | Zevv | looking :) |
19:55:27 | disruptek | it does record the mouse cursor, but i doubt it gets keyboard events. |
19:57:23 | Zevv | ah its inside the weston wayland implementation |
19:58:01 | clyybber | Araq: Any problems with making lastSon a template? |
20:05:50 | disruptek | you could write your dsl on top of dashing. |
20:06:09 | * | drewr quit (Ping timeout: 250 seconds) |
20:13:45 | FromGitter | <Varriount> Zevv: What's unique about the Weston implementation? |
20:14:26 | * | Trustable quit (Remote host closed the connection) |
20:14:32 | Zevv | not unique probably. But the wayland protocol itself does not provide for capturing, but this particular implementation does |
20:14:44 | Zevv | but it's not done through the wayland protocol, that's all |
20:16:52 | * | actuallybatman joined #nim |
20:21:53 | * | drewr joined #nim |
20:31:56 | * | amalek_heylel joined #nim |
20:33:31 | * | amalek_heylel left #nim ("WeeChat 2.5") |
20:40:43 | * | actuallybatman quit (Ping timeout: 246 seconds) |
20:42:45 | FromDiscord_ | <strexicious> I am getting a not very informative error "invalid type: 'var seq[proc (){.closure.}]' in this context: 'Engine' for let". (How should I post more info?) |
20:42:45 | FromDiscord_ | <strexicious> https://cdn.discordapp.com/attachments/371759389889003532/611661073510039552/unknown.png |
20:42:51 | * | vesper11 joined #nim |
20:43:01 | FromDiscord_ | <strexicious> I am getting a not very informative error "invalid type: 'var seq[proc (){.closure.}]' in this context: 'Engine' for let". How should I post more info? Also can you see the attached image? |
20:43:01 | FromDiscord_ | <strexicious> https://cdn.discordapp.com/attachments/371759389889003532/611661073510039552/unknown.png |
20:43:57 | Zevv | strexicious: can see image, but better is to put some code on a pastbin, preferably something stand-alone that others can run to reproduce your problem |
20:43:59 | disruptek | the attached shows up as a link to the image, so yes, that works. |
20:44:27 | disruptek | are you getting a stack trace? |
20:46:38 | FromDiscord_ | <strexicious> It's a compile time error, so no stack trace. Here is the engine module: <https://pastebin.com/yQYXdPsS> Note: I am also using the result package. |
20:48:17 | FromDiscord_ | <strexicious> The error showed up after recent changes (which were bunch of them). My last resort would be do Ctrl+Z until I pin point it, but I thought I'd ask about the error msg in case it was me not being able to understand a clear message. |
20:48:31 | disruptek | it sounds like the result package is swallowing stuff. did you just add that? |
20:48:41 | disruptek | what does it do? |
20:48:54 | * | Kaivo quit (Quit: WeeChat 2.5) |
20:49:12 | FromDiscord_ | <strexicious> I did not, but I did use it's "mapErr" in the recent changes. |
20:49:21 | FromDiscord_ | <strexicious> It's basically a helper Result type. |
20:52:20 | FromDiscord_ | <Shield> maybe it's Result[Engine, string]? |
20:52:36 | FromDiscord_ | <strexicious> What is? |
20:53:09 | FromDiscord_ | <Shield> proc startEngine*(width: int32, height: int32, r: float, g: float, b: float): Result[Engine, string] |
20:53:10 | FromDiscord_ | <strexicious> The Result crate for reference is: https://nimble.directory/docs/result//result.html |
20:54:15 | FromDiscord_ | <strexicious> Yes, that's the return type. It was working before |
20:55:02 | disruptek | looking at result, it seems that part is okay. |
20:56:00 | disruptek | i think the problem is `let ngn: Engine = ...` -- how does that syntax work? |
20:56:18 | FromDiscord_ | <strexicious> no difference |
20:56:36 | * | sagax quit (Remote host closed the connection) |
20:56:41 | disruptek | oh i see, it's composed. |
20:57:16 | disruptek | does chaining like that work in nim? i guess i never tried it. |
20:58:01 | FromDiscord_ | <strexicious> oh.. I would assume so. |
20:58:08 | disruptek | that's a neat import from js. seems to work. |
20:58:53 | FromDiscord_ | <strexicious> From JS? 👀 You talking about Result? |
20:59:19 | disruptek | no, just the length chain style that's so prevalent there. |
21:00:31 | FromDiscord_ | <strexicious> Oh. Yeah. Also from Rust :P |
21:04:11 | * | stefanos82 quit (Quit: Quitting for now...) |
21:06:25 | rayman22201 | Try making ngn var instead of let |
21:07:07 | FromDiscord_ | <strexicious> Tried that too. Actually, I think the error is Engine's fields |
21:08:04 | FromGitter | <dumjyl> `var SomeType` is only valid as a parameter and return type. |
21:08:27 | disruptek | where are you reading that? |
21:09:04 | FromDiscord_ | <strexicious> Yeah, I think I get it now |
21:09:15 | disruptek | oh i missed the paste somehow. 🙄 |
21:10:16 | * | abm quit (Quit: Leaving) |
21:15:53 | * | Mister_Magister quit (Ping timeout: 245 seconds) |
21:16:13 | * | Mister_Magister joined #nim |
21:18:56 | rayman22201 | That could use a better error message for sure. var is not valid in a typedef |
21:23:27 | FromGitter | <kdheepak> I have a silly question, I want to generate the following javascript code: `{ color: 0x00ff00 } ` |
21:24:12 | FromGitter | <kdheepak> In nim if I use `{ "color": 0x00ff00 }` I get `([{Field0: makeNimstrLit("color"), Field1: 65280}]))` instead. |
21:24:35 | FromGitter | <kdheepak> `0x00ff00` == `65280` so that's not the issue. |
21:24:53 | Zevv | do not use tuples but an object |
21:25:44 | Zevv | hm wait js, not even sure if objects map to js objects, let me check |
21:26:29 | Zevv | yes, that would work probably |
21:28:08 | FromGitter | <kdheepak> Thanks |
21:28:17 | FromGitter | <kdheepak> ```type ⏎ Color* = object ⏎ color: int ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5d55ce711dadc42a11795f97] |
21:28:21 | FromGitter | <kdheepak> This seems to work |
21:28:34 | Zevv | right! |
21:28:54 | * | actuallybatman joined #nim |
21:29:17 | FromGitter | <kdheepak> awesome! |
21:31:58 | * | solitudesf quit (Ping timeout: 258 seconds) |
21:34:13 | FromGitter | <Riderfighter> Hello everyone! |
21:49:53 | clyybber | Hi |
21:57:40 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
21:59:56 | * | clyybber quit (Quit: WeeChat 2.5) |
22:20:53 | * | lritter joined #nim |
22:38:41 | * | seni joined #nim |
22:40:46 | * | dddddd quit (Ping timeout: 246 seconds) |
22:50:41 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:05:52 | FromDiscord_ | <Kiloneie> Go to bed O,O |
23:15:27 | * | shomodj joined #nim |
23:20:02 | * | shomodj quit (Ping timeout: 245 seconds) |
23:23:57 | * | Jesin quit (Quit: Leaving) |
23:29:12 | * | abm joined #nim |
23:29:47 | * | sagax joined #nim |
23:34:00 | * | Jesin joined #nim |
23:41:23 | * | abm quit (Ping timeout: 248 seconds) |