00:14:10 | * | codevance[m] is now known as CodeVance |
00:49:27 | FromGitter | <honewatson> where is your issue @ephja? |
00:50:43 | FromGitter | <ephja> I was referring to nimpretty issues. it needs more testing |
00:53:11 | FromGitter | <honewatson> Yup so you are saying there is currently only one nimpretty issue in the issue tracker? |
00:56:46 | FromGitter | <honewatson> I noticed that the line is split at a pragma |
00:57:15 | * | fjvallarino quit (Remote host closed the connection) |
00:57:48 | FromGitter | <honewatson> ```proc procTempl(items: seq[Name]): string {. ⏎ compileTime.} =``` [https://gitter.im/nim-lang/Nim?at=5b39788b89db5e701c99a2a1] |
00:58:25 | FromGitter | <honewatson> maybe it would be better to have a new line at parameters |
00:58:56 | FromGitter | <honewatson> like this |
00:59:10 | FromGitter | <honewatson> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3978de3c5abf52b633b8e2] |
01:30:51 | * | fjvallarino joined #nim |
02:09:15 | * | mitai quit (Remote host closed the connection) |
02:16:29 | * | copygirl quit (Ping timeout: 276 seconds) |
02:16:49 | * | copygirl joined #nim |
02:16:57 | * | pydsigner quit (Ping timeout: 240 seconds) |
02:17:08 | * | pydsigner joined #nim |
02:26:16 | * | rockcavera joined #nim |
02:34:13 | * | tiorock joined #nim |
02:34:13 | * | tiorock quit (Changing host) |
02:34:13 | * | tiorock joined #nim |
02:34:13 | * | rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services))) |
02:34:13 | * | tiorock is now known as rockcavera |
02:34:59 | * | tiorock joined #nim |
02:34:59 | * | tiorock quit (Changing host) |
02:34:59 | * | tiorock joined #nim |
02:34:59 | * | rockcavera is now known as Guest25907 |
02:34:59 | * | Guest25907 quit (Killed (verne.freenode.net (Nickname regained by services))) |
02:34:59 | * | tiorock is now known as rockcavera |
02:36:10 | * | tiorock joined #nim |
02:39:50 | * | rockcavera quit (Ping timeout: 260 seconds) |
02:40:57 | * | fjvallarino quit (Remote host closed the connection) |
02:41:04 | * | fjvallarino joined #nim |
02:57:25 | * | fjvallarino quit (Remote host closed the connection) |
03:04:26 | * | ashleyk_ quit (Remote host closed the connection) |
03:04:37 | * | ashleyk_ joined #nim |
03:17:37 | * | fjvallarino joined #nim |
03:21:57 | * | fjvallarino quit (Ping timeout: 240 seconds) |
03:27:01 | * | tiorock quit (Changing host) |
03:27:01 | * | tiorock joined #nim |
03:27:01 | * | tiorock is now known as rockcavera |
03:29:25 | * | thomasross joined #nim |
03:54:55 | * | fjvallarino joined #nim |
04:05:18 | * | endragor joined #nim |
04:18:04 | shashlick | http://neurocline.github.io/papers/survey-of-programming-language-packaging-systems.html |
04:19:33 | * | endragor quit (Remote host closed the connection) |
04:32:05 | * | endragor joined #nim |
04:50:12 | * | endragor quit (Remote host closed the connection) |
05:05:47 | * | skrylar joined #nim |
05:11:15 | * | endragor joined #nim |
05:15:25 | * | endragor quit (Remote host closed the connection) |
05:15:49 | * | skrylar quit (Remote host closed the connection) |
05:44:34 | FromGitter | <Varriount> Araq: Is there a way to use spawn, such that it doesn't matter if the global thread pool already has all tasks runnning? |
05:45:33 | FromGitter | <Varriount> I'm trying to work around osproc's lack of support for passing custom file handles to subprocesses by running threads to join input/output streams together. |
05:49:37 | * | lompik joined #nim |
06:16:27 | * | nsf joined #nim |
06:28:58 | * | ketralnis joined #nim |
06:38:40 | * | Vladar joined #nim |
07:04:54 | Araq | Varriount, don't work around, patch osproc |
07:05:27 | FromGitter | <Varriount> Araq: I don't know if I have the time - This is for a summer assignment. |
07:05:48 | FromGitter | <Varriount> And the change wouldn't be so much "patching" as "rewriting" |
07:06:11 | Araq | really? is it not just writing a different constructor for Process? |
07:07:30 | FromGitter | <Varriount> Araq: No, because the osproc logic is riddled with checks for 'poParentStreams' and 'poStdErrToStdOut' flags, which affect things like file closing and the like. |
07:08:52 | FromGitter | <Varriount> And these new input/output/errput arguments could be a parent stream or standard output/errput. The code would need to handle what happens when the flags don't match up with the passed in files. |
07:09:52 | FromGitter | <Varriount> Also, any idea why the `newFileHandleStream` in streams is disabled? It's currently being removed through a "when true: discard; else" construct |
07:25:41 | Araq | portability problems, I guess |
07:27:41 | Araq | anyhow, copy and adapt from osproc what you need |
07:27:52 | Araq | should get you there faster than hacking around with threads. |
07:28:21 | Araq | I can understand a proper PR would be too much work. |
07:29:51 | Araq | the stdlib is always good as a stone pit... :-) |
07:49:29 | dom96 | I'd really love to rewrite osproc |
07:49:39 | dom96 | It's something that all languages seem to be bad at |
07:58:49 | * | pwntus joined #nim |
08:00:14 | FromGitter | <Varriount> If I do, I would base the API off of Python and D. |
08:00:59 | FromGitter | <Varriount> dom96, araq: Any other languages that might be a good inspiration for an API? |
08:01:51 | Araq | I base the API off of Nim's, because I like osproc. |
08:02:01 | Araq | I mean, ok, I'm the primary author of this beast. |
08:02:20 | Araq | but it's great and you're all wrong about it :P |
08:02:57 | FromGitter | <Varriount> Araq: osproc.nim is probably the most complicated module in the standard library. |
08:03:12 | Araq | never looked at asyncdispatch? ;-) |
08:03:46 | Araq | the implementation is complicated and should make use of 2 or 3 include files, but the API is pretty simple. |
08:04:53 | Araq | and that's in fact, what you don't like about it, it's too simple so it doesn't support everything you need to do. |
08:06:12 | dom96 | I always dread having to deal with osproc |
08:06:26 | dom96 | Well, any process handling in general |
08:09:10 | * | endragor joined #nim |
08:18:57 | Araq | let p = startProcess(cmd, args, env, inputStream, outputStream, errorStream) |
08:19:08 | Araq | inputStream.write "data" |
08:19:12 | Araq | p.close() |
08:20:02 | Araq | startProcess at least takes 6 parameters, there is no way around it |
08:20:57 | Araq | ah I forgot 'workingDir', lovely |
08:24:28 | Araq | and osproc's startProcess lacks the stream parameters. |
08:25:18 | Araq | and that's it; your solution is to throw it away. a module that works on diverse Unixes, is used by the compiler and testament and was battle-tested in production. |
08:25:37 | Araq | just get off my lawn already. |
08:25:50 | * | dddddd joined #nim |
08:26:17 | dom96 | Don't worry |
08:26:23 | dom96 | I won't actually rewrite it |
08:26:32 | dom96 | The reason I would like to rewrite it is to understand it properly. |
08:28:42 | * | krux02 joined #nim |
08:28:47 | Araq | good :-) |
08:34:48 | FromGitter | <alehander42> Araq, I remember you told me to tweak some things around EqResult handling last time I had diff problems with karax |
08:35:10 | Araq | yeah. |
08:35:12 | FromGitter | <alehander42> what was it exactly, I can't find it searching the irc logs |
08:35:43 | FromGitter | <alehander42> hm, is there a karax chat room :D I don't know if it's offtopic for #nim |
08:36:18 | Araq | proc eq |
08:36:38 | Araq | return similar --> return different |
08:43:32 | * | yglukhov[i] joined #nim |
08:46:33 | * | yglukhov[i] quit (Remote host closed the connection) |
08:50:00 | FromGitter | <alehander42> it's not fixing it |
08:50:13 | FromGitter | <alehander42> I tried changing more cased --> different |
08:50:20 | FromGitter | <alehander42> and that kinda works indeed |
08:50:30 | FromGitter | <alehander42> but the problem is that naturally component updating is broken |
08:51:07 | FromGitter | <alehander42> (or is it naturally? actually if everything is different, wouldn't that mean everything would be redrawn anyway) |
08:59:50 | * | skrylar joined #nim |
09:01:57 | Araq | what component updating? |
09:01:58 | * | rauss quit (Read error: Connection reset by peer) |
09:02:03 | Araq | do you use components? |
09:02:38 | FromGitter | <alehander42> yeah? |
09:03:01 | FromGitter | <alehander42> are they deprecated ? :D |
09:04:11 | * | rauss joined #nim |
09:05:13 | FromGitter | <Vindaar> @Araq reg. the `0O` oct literals. I'm not a fan either, tbh. Should `parseOct` parse those (it does right now) or should that be removed as well? |
09:05:40 | Araq | not deprecated, but I never was happy with the updating logic :-) |
09:06:23 | Araq | Vindaar: well the stdlib doesn't need to follow Nim's rules, we can also decide parseOct needs to support what e.g. Python supports |
09:06:40 | Araq | btw, the c, C notation needs a deprecation period. |
09:07:03 | Araq | it was used in the stdlib, it might have been used elsewhere. |
09:08:34 | FromGitter | <Vindaar> Ok, fine with me :) Not sure how I'd deprecate that in the lexer though. Just add a message to the 'c' and 'C' case, but leave it valid for now? |
09:10:22 | FromGitter | <Vindaar> Ok, fine with me :) |
09:14:08 | FromGitter | <alehander42> ok, so if I don't use components: only building a "pure" VNode tree, and I do the -->different thing, does this ensure that all nodes are basically redrawn ? |
09:14:30 | FromGitter | <alehander42> (basically doing a "dummy" diff) |
09:22:58 | Araq | vindaar. yes |
09:23:20 | Araq | alehander42: hmmm, probably |
09:23:50 | FromGitter | <Vindaar> ok! |
09:25:14 | FromGitter | <alehander42> I mostly need the ability to "markDirty" only a small part of components/nodes, to make sure they're not redrawn each time |
09:25:27 | FromGitter | <alehander42> other aspects of components aren't so important to me |
09:27:41 | FromGitter | <alehander42> i really need to take a deeper look at the impl, I was trying to imagine how would I do such a diffing system and I really stumbled with the "key of a vnode" idea: do you use a combo of class/id/order for that? |
09:28:52 | FromGitter | <alehander42> iirc they had some logic influence |
09:28:57 | FromGitter | <alehander42> in karax |
09:34:18 | * | noonien joined #nim |
09:43:51 | * | brainproxy quit (Ping timeout: 240 seconds) |
10:07:18 | FromGitter | <kindlychung> https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L18-L21 |
10:25:25 | * | yglukhov[i] joined #nim |
10:35:21 | * | brainproxy joined #nim |
10:36:09 | * | elrood joined #nim |
10:39:04 | FromGitter | <gogolxdong> How to get current element value using karax ,like button ? |
10:44:06 | * | nsf quit (Quit: WeeChat 2.1) |
10:48:02 | FromGitter | <gogolxdong> Is there a pointer like this? |
10:55:22 | * | Vladar quit (Quit: Leaving) |
10:57:42 | FromGitter | <kindlychung> https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L18-L21 |
10:58:08 | FromGitter | <kindlychung> Why all the trouble here? Why not just: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a05403d8f71623d555889] |
11:03:41 | * | donlzx quit (Quit: Leaving) |
11:05:05 | * | brainproxy quit (Ping timeout: 248 seconds) |
11:08:28 | * | Vladar joined #nim |
11:22:17 | * | NimBot joined #nim |
11:29:29 | FromGitter | <alehander42> @gogolxdong you can always use html selectors |
11:30:07 | FromGitter | <alehander42> otherwise it's a bit strange, as your own code should generate the value of a button anyway, so it should be able to somehow deduce/preserve the previous value |
11:30:23 | * | NamPNQ joined #nim |
11:33:46 | * | brainproxy joined #nim |
11:35:09 | * | xet7 joined #nim |
11:36:02 | FromGitter | <kindlychung> I have done away with the `DoublyLinkedNodeObj` thing and everything seems fine: https://gist.github.com/kindlychung/80549bcb409c3109ed7234fdfd2ae2db |
11:39:43 | FromGitter | <kindlychung> Also, if the length of the doubly linked list gets too long, the program crashes: |
11:39:53 | FromGitter | <kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a0f093c5abf52b634dfcb] |
11:40:12 | FromGitter | <kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a0f1bf166440661126dae] |
11:44:45 | * | find0x90 joined #nim |
11:44:49 | * | find0x90 quit (Client Quit) |
11:45:01 | * | yglukhov[i] quit (Remote host closed the connection) |
11:50:46 | * | MaritimeHistory joined #nim |
12:02:45 | * | brainproxy quit (Ping timeout: 264 seconds) |
12:05:07 | * | floppydh joined #nim |
12:13:03 | FromGitter | <gogolxdong> can use getVNodeById to get the value, but I know this can Do this properly semantics gracefully. |
12:13:51 | FromGitter | <mratsim> @kindlychung that’s probably because before you couldn’t do what you did. |
12:14:03 | FromGitter | <mratsim> ref object with fields |
12:14:28 | * | fvs joined #nim |
12:15:00 | FromGitter | <kindlychung> @mratsim Ok. Any idea why I got that crash? Thanks. |
12:18:01 | FromGitter | <mratsim> can you compile with gc:markandsweep? |
12:25:16 | FromGitter | <kindlychung> Ah, that works indeed. |
12:26:49 | FromGitter | <kindlychung> How do I put the --gc:markandsweep option in nim.cfg? |
12:27:10 | Yardanico | add --gc:markandsweep to nim.cfg :) |
12:27:56 | FromGitter | <kindlychung> Yay. :) |
12:30:45 | * | SenasOzys quit (Ping timeout: 260 seconds) |
12:34:50 | * | brainproxy joined #nim |
12:36:57 | FromGitter | <mratsim> you can probably open a bug on the refcounting GC then |
12:37:40 | Yardanico | @kindlychung can you also try with --gc:v2 ? |
12:39:03 | * | SenasOzys joined #nim |
12:41:12 | FromGitter | <kindlychung> ```SIGSEGV: Illegal storage access. (Attempt to read from nil?)``` |
12:42:45 | FromGitter | <kindlychung> @Yardanico Why did that happen? What's the diff between v2 and markandsweep? |
12:43:04 | Yardanico | v2 is the "second" version (as the name says) of the GC :) |
12:43:51 | Yardanico | you should definitely create an issue if some code works with markandsweep and doesn't work with default gc/gcv2 |
12:44:14 | FromGitter | <kindlychung> Ok. |
12:46:36 | Araq | not really. it's probably just a bug in your code/wrappers and the other GC gets lucky |
12:47:01 | Yardanico | Araq, yeah, I wanted to mention this too |
12:49:01 | FromGitter | <kindlychung> Options given on the commandline in shell will override nim.cfg, right? |
12:50:24 | Yardanico | hmm |
12:51:15 | FromGitter | <kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a1fc37b811a6d63c88ff1] |
12:51:47 | FromGitter | <kindlychung> Is there something wrong with the code above? |
12:52:01 | FromGitter | <kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a1ff1d99c896d64df3fd5] |
12:55:05 | * | barelyMalicious joined #nim |
12:55:43 | barelyMalicious | Well, gc v2 won't work even with empty files https://github.com/nim-lang/Nim/issues/7970 |
12:59:54 | Yardanico | barelyMalicious, actually that's very strange |
13:02:40 | * | barelyMalicious quit (Ping timeout: 260 seconds) |
13:03:36 | * | SenasOzys quit (Remote host closed the connection) |
13:05:40 | * | endragor quit (Remote host closed the connection) |
13:10:44 | * | Vladar quit (Remote host closed the connection) |
13:20:38 | * | Vladar joined #nim |
13:21:03 | * | ieatnerds joined #nim |
13:21:25 | ieatnerds | Hi guys! |
13:21:33 | Yardanico | ieatnerds, hello |
13:23:00 | ieatnerds | How are you? |
13:26:45 | * | elrood quit (Remote host closed the connection) |
13:26:51 | Yardanico | ieatnerds, why are you asking? :) |
13:27:53 | * | fjvallarino quit (Remote host closed the connection) |
13:27:59 | ieatnerds | Thought I'd start off with pleasantries before I asked for some help. |
13:28:00 | * | fjvallarino joined #nim |
13:29:18 | Yardanico | ieatnerds, you can straight up ask for the help here, it's ok :) |
13:30:12 | ieatnerds | I'm using the parsecsv module. The rowEntry() proc is supposed to return a string, but when I try and parseInt that string I get a type mismatch error. got <string>, which is what parseInt is supposed to take, is it not? |
13:30:38 | Yardanico | ieatnerds, what module did you import for parseInt? strutils or parseutils? |
13:31:03 | ieatnerds | strutils |
13:31:03 | Yardanico | if it's from parseutils, you need to use it like this: |
13:31:08 | Yardanico | ah, then it should work, hm |
13:31:25 | ieatnerds | nope, my bad I did in fact take it from pasrutils |
13:31:35 | ieatnerds | let me try strutils |
13:31:42 | Yardanico | ieatnerds, parseutils is for parsers mostly |
13:32:02 | Yardanico | like here - https://github.com/Yardanico/nim-mathexpr/blob/master/mathexpr.nim#L191 |
13:32:20 | krux02 | be warned strutils is badly designed. |
13:32:28 | dom96 | Yardanico: Nice prediction of what the problem was :) |
13:32:46 | * | NamPNQ quit (Ping timeout: 264 seconds) |
13:33:37 | ieatnerds | And it works. Thank you! It's been a little since I've used nim, started a new job and didn't have a lot of free time to code. |
13:34:20 | Yardanico | ieatnerds, actually you can import strutils and parseutils at the same time and it will still work because parseInt from parseutils and from strutils have different signatures |
13:34:37 | * | endragor joined #nim |
13:34:45 | Yardanico | !eval import parseutils; import strutils; echo parseInt("1") |
13:34:48 | NimBot | 1 |
13:37:07 | zacharycarter | anyone else use / mess w/ openbsd? |
13:37:28 | krux02 | hi zacharycarter |
13:37:33 | krux02 | what is / mess w/? |
13:37:53 | krux02 | how is your new job? |
13:38:19 | zacharycarter | mess around with / toy with |
13:38:24 | zacharycarter | I don't have one haha |
13:38:26 | zacharycarter | so shitty :P |
13:39:00 | * | endragor quit (Ping timeout: 245 seconds) |
13:39:05 | zacharycarter | how are you? I haven't been on much lately because I've had a lot going on in my personal life - selling my house and all that |
13:40:26 | krux02 | Ok thanks for asking. I have basically no personal life because I am writing my master theses every day from the morning to the evening. |
13:40:39 | krux02 | But it is in nim, so I am online here a lot |
13:40:47 | krux02 | not always active though. |
13:41:19 | krux02 | I made an issue on your project regarding the deprecation of OpenGL on OSX. I just wanted to hear your thoughts about it. |
13:41:35 | zacharycarter | BGFX :D |
13:41:49 | krux02 | yea bgfx is a nice abstraction. |
13:41:55 | zacharycarter | oooo masters thesis using Nim :D awesome! |
13:42:02 | krux02 | yea I know |
13:42:16 | zacharycarter | mmhmm |
13:42:17 | zacharycarter | I'm going to use it in my next project |
13:42:17 | krux02 | I can finally compile Nim to glsl |
13:42:21 | zacharycarter | whenever I get around to starting it |
13:42:35 | zacharycarter | currently I'm thinking about moving the playground to obsd |
13:42:45 | zacharycarter | so I'm figuring out httpd and fast / slow cgi etc |
13:42:49 | krux02 | so there is no barrier anymore, I can write libraries and use them from both the gpu and the cpu whenever I want to |
13:42:57 | krux02 | cgi? |
13:43:19 | krux02 | I don't know a lot about web technologies |
13:43:23 | zacharycarter | that is awesome :D |
13:43:24 | zacharycarter | common gateway interface |
13:44:10 | zacharycarter | I don't think docker / containerization is the most secure approach to doing what the playground is doing |
13:44:15 | zacharycarter | I think sandboxing would be better |
13:44:23 | zacharycarter | and if I use vms I can probably allow for different operating systems on the playground too |
13:44:26 | zacharycarter | hopefully anyway |
13:44:36 | krux02 | I think the compile in wasm would be great |
13:45:17 | zacharycarter | I've been reading this guys stuff a lot - https://learnbchs.org/ |
13:45:18 | krux02 | I am thrilled by 'the least amount of common web technology involed' solutions |
13:45:20 | zacharycarter | and I'm basically just replacing C w/ Nim |
13:45:26 | zacharycarter | I will add that for sure |
13:45:33 | zacharycarter | I have a lot of features planned |
13:45:34 | zacharycarter | and a front end facelift too |
13:46:38 | krux02 | oh hipster free |
13:46:43 | krux02 | cool feature :P |
13:53:05 | federico3 | the fancy page with font-awesome in it is not very hipster free |
13:56:49 | federico3 | (the other stuff is not similar with Nim + seccomp) |
13:57:22 | krux02 | the bchs looks very nim compatible because it is all in C |
13:58:33 | FromGitter | <alehander42> well, it seems like a "just use c and implement reinvent absolutely everything you might need from a normal framework" framework <3 |
13:59:48 | FromGitter | <alehander42> oh boy I am missing the satire |
14:00:55 | krux02 | alehander42: well when it is C you can use every C library from the system |
14:01:04 | dom96 | zacharycarter: huh, you've changed your mind about using Docker for the playground? |
14:01:29 | krux02 | so it is probably more the library approch instead of "we ship with everything any miserably fail at it" approach |
14:02:20 | FromGitter | <alehander42> @krux02 yeah, it's a cool idea, bchs looks cool |
14:02:36 | FromGitter | <alehander42> but still, I prefer higher level wrappers |
14:02:47 | FromGitter | <alehander42> and dsl-s |
14:02:56 | dom96 | BCHS is nice, but honestly, just use Linux like most people :P |
14:03:52 | dom96 | OpenBSD is the very definition of "hipster" |
14:04:42 | zacharycarter | haha yeah - I disagree with his definition of hipster |
14:05:04 | zacharycarter | but I think sandboxing would be more secure |
14:05:10 | zacharycarter | than docker |
14:05:49 | zacharycarter | also so far httpd / kcgi seem very simple |
14:06:52 | dom96 | sandboxing how? |
14:11:41 | dom96 | You know what's simpler? A reverse proxy |
14:11:58 | dom96 | CGI is yet another protocol |
14:12:54 | zacharycarter | sandboxing the application that is being compiled |
14:13:20 | zacharycarter | and eventually run |
14:13:38 | dom96 | Yes, I know. But I don't know what this BCHS stack offers in terms of sandboxing |
14:13:50 | zacharycarter | oh sorry |
14:14:23 | zacharycarter | https://kristaps.bsd.lv/absdcon2016/ |
14:14:26 | zacharycarter | I think that slide deck explains it pretty well |
14:15:28 | dom96 | So chroot, pledge, setuid? |
14:16:42 | zacharycarter | yeah |
14:17:40 | zacharycarter | but I think pledge is used mostly |
14:17:43 | FromGitter | <gogolxdong> getVNodeById involves more complexity. |
14:18:10 | FromGitter | <gogolxdong> have to preserve id and index. |
14:19:04 | dom96 | zacharycarter: Why move to this instead of just improving the current implementation? |
14:19:23 | FromGitter | <gogolxdong> Is it possible to wrap `this`? I didn't find its implementation and the only example is in kajax, but obviously it's not the same object. |
14:19:48 | dom96 | gogolxdong: it is possible, but you shouldn't do that. |
14:20:06 | dom96 | An ID+index is an ID in itself |
14:20:15 | dom96 | id="myDiv5" |
14:20:59 | FromGitter | <gogolxdong> you mean it's recommended solution? |
14:22:42 | dom96 | I don't know what you're doing |
14:22:48 | dom96 | so I can't say with certainty |
14:23:56 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a357c60c387078356d609] |
14:24:44 | FromGitter | <gogolxdong> I'm trying to inject an operation column into data table for different kinds of resource type. |
14:25:07 | FromGitter | <gogolxdong> This is for instance. |
14:26:00 | dom96 | well then `getVNodeById("instanceDropDown")` sounds fine to me |
14:27:09 | FromGitter | <gogolxdong> I have provider and instanceid now, to preserve the information have to introduce an additional index. |
14:27:24 | zacharycarter | dom96: I am going to improve the current solution - most of the improvement is on the front end anyway |
14:27:31 | zacharycarter | but it gives me a chance to learn / play around w/ some openbsd |
14:27:42 | zacharycarter | and if it results in a more secure playground - then I think it's worth it |
14:28:02 | zacharycarter | I'm not starting over I still have all the code I wrote / can reference it |
14:28:11 | zacharycarter | and it might end up being easier than the docker / webpack hell I'm going through now on linux |
14:28:21 | zacharycarter | since the new editor I'm using can't be loaded via CDN without a lot of extra work |
14:28:26 | zacharycarter | monaco editor or whatever |
14:28:39 | dom96 | bah |
14:28:43 | dom96 | What's wrong with ace? |
14:29:00 | zacharycarter | ace can't do this - |
14:29:05 | zacharycarter | https://webassembly.studio/ |
14:29:07 | zacharycarter | you can w/ monaco |
14:29:18 | dom96 | I'm not sure what's insecure about Docker, the Rust playground uses it too |
14:30:00 | zacharycarter | well from my understanding - containerization takes the reverse approach of security vs sandboxing |
14:30:12 | zacharycarter | containerization layers security on after the fact |
14:30:20 | zacharycarter | sandboxing starts out by restricting everything up front |
14:30:42 | zacharycarter | and there is a lot of security shit to docker that I don't know about / haven't explorted |
14:30:47 | zacharycarter | and there is a lot of security shit to docker that I don't know about / haven't explored |
14:31:04 | zacharycarter | if this openbsd experiment doesn't work I'll go back to docker / linux |
14:31:08 | zacharycarter | I'm hoping it will make everything easier - but I'll see |
14:33:37 | zacharycarter | https://docs.docker.com/engine/security/security/ |
14:34:03 | FromGitter | <gogolxdong> wrapped these ,doesn't work |
14:34:09 | FromGitter | <gogolxdong> ```var this* {.importc: "this".}: VNode ⏎ var this* {.importc: "this".}: Node``` [https://gitter.im/nim-lang/Nim?at=5b3a37e03d8f71623d55decf] |
14:49:05 | * | epictek[m] joined #nim |
14:53:05 | xomachine[m] | There is another breaking change I found. It looks like since 0.18.1 the static: expression has its own scope, and that makes impossible to use global compile time variables. Why it has been done? |
15:00:49 | FromGitter | <kaushalmodi> xomachine[m]: Use ⏎ ⏎ ```var foo {. compileTime .}: int``` [https://gitter.im/nim-lang/Nim?at=5b3a3e203c5abf52b6356feb] |
15:01:29 | FromGitter | <kaushalmodi> I too stumbled into this recently: https://github.com/kaushalmodi/nim-emacs-module/commit/19dc1336a7b31da40a5225515e2f2cfb826bd2a4 |
15:02:04 | * | miran joined #nim |
15:06:30 | * | MaritimeHistory quit (Ping timeout: 260 seconds) |
15:07:56 | xomachine[m] | @kaushalmodi, thank you! But it is still dissappointing that I can not use {.push, compileTime.} with var and am have to add this pragma to each variable (instead of putting it under static:) |
15:14:33 | FromGitter | <Vindaar> Hm, question regarding procedure types: https://gist.github.com/Vindaar/2933bcc614ea6960ba6f393bb14ffdd9 |
15:15:06 | FromGitter | <Vindaar> for the generic type `Func2`, `f2` matches. For the normal type `Func1`, `f1` does not match. Is that expected behavior or a bug? |
15:25:38 | federico3 | again, docker is not a security/sandboxing tool |
15:34:47 | FromGitter | <kaushalmodi> Question about unittest: How do I allow a test to fail? |
15:34:59 | FromGitter | <kaushalmodi> Cannot figure out how to use "skip" |
15:38:44 | FromGitter | <kaushalmodi> .. looks like `skip` has to be put at the end.. ⏎ ⏎ ```test "foo": ⏎ check: ⏎ # some failing test ⏎ skip``` [https://gitter.im/nim-lang/Nim?at=5b3a47043c5abf52b6358d69] |
16:09:08 | * | Trustable joined #nim |
16:32:25 | * | sz0 quit (Quit: Connection closed for inactivity) |
16:33:15 | dom96 | xomachine[m]: global compile-time variables are going to be deprecated so that symbol files are possible |
16:34:07 | * | Vladar quit (Quit: Leaving) |
16:34:26 | dom96 | Here is what should be used now: https://github.com/nim-lang/Nim/blob/devel/lib/core/macrocache.nim |
16:35:21 | krux02 | dom96: will it still be bossible to have compile time variables in a statick block when they are not modified outside of the module? |
16:35:42 | dom96 | I think so |
16:36:05 | dom96 | Otherwise all macros would break |
16:39:29 | xomachine[m] | Thats pity. Less consistency between compile time and run time code. |
16:44:35 | * | ieatnerds quit (Ping timeout: 240 seconds) |
16:45:51 | * | Trustable quit (Remote host closed the connection) |
16:47:04 | * | fjvallarino quit (Remote host closed the connection) |
16:48:18 | * | Trustable joined #nim |
16:50:39 | * | krux02 quit (Remote host closed the connection) |
16:59:01 | * | Vladar joined #nim |
17:02:58 | zacharycarter | federico3: I didn't assert it was |
17:03:10 | zacharycarter | at least not today haha |
17:06:08 | xomachine[m] | Why we are assuming that [there](https://github.com/nim-lang/Nim/blob/559a7615ad8e2e169aa9684f034c156881d88d4d/compiler/platform.nim#L233-L235) is no cross compilation? Especially considering that os option intended to be used for cross compilation (https://github.com/nim-lang/Nim/blob/27b081d1f77604ee47c886e69dbc52f53ea3741f/compiler/commands.nim#L590-L596) |
17:12:11 | * | jxy quit (Quit: leaving) |
17:15:14 | * | gsingh93_ joined #nim |
17:16:43 | * | fjvallarino joined #nim |
17:25:06 | * | jxy joined #nim |
17:37:33 | * | smt joined #nim |
17:39:21 | Yardanico | shashlick, did you fix the typo and then ran the `nim check`? Because I didn't fix the typo and `nim check` crashes with it |
17:39:36 | Yardanico | in your `nim check` output you don't even get a error message for line 14 |
17:45:27 | shashlick | Ya cause the issue asked to fix that typo |
17:45:35 | shashlick | I'll try without that and see |
17:46:09 | Yardanico | shashlick, issue name is "nim check crash due to typo" so it's about `nim check` crashing when it encounters a typo |
17:53:37 | shashlick | yardanico: confirmed |
17:54:55 | shashlick | yardanico: sorry for the confusion - I'm going to delete my messages so as not to confuse the issue |
18:00:26 | shashlick | data-man: we should only close after adding a test case |
18:03:13 | * | ieatnerds joined #nim |
18:10:06 | * | smt` joined #nim |
18:12:58 | * | ieatnerds quit (Ping timeout: 264 seconds) |
18:13:49 | * | smt quit (Ping timeout: 256 seconds) |
18:17:57 | CodeVance | What about using concepts for nimnodes |
18:19:56 | Yardanico | CodeVance, you mean concepts instead of object variants? |
18:21:16 | * | Ven`` joined #nim |
18:22:50 | CodeVance | Alongside with |
18:22:54 | CodeVance | not instead |
18:23:36 | FromGitter | <ephja> does nimpretty not format this module correctly when merged with the other code that I want to show?🤔 |
18:24:03 | CodeVance | Like the name and `name=` proc only works for RoutineNodes. instead of checking it on calling, you could just use a concept and never be able to call it if it isn't correct |
18:25:16 | Yardanico | hmm, yeah, that could lead to less bugs in the compiler |
18:25:42 | dom96 | The kind of a NimNode is only known at runtime |
18:25:45 | dom96 | Concepts won't help you here |
18:25:58 | CodeVance | But would concepts work at compile time? |
18:26:05 | Yardanico | CodeVance, they only work at compile-time\ |
18:26:11 | Yardanico | they have no runtime overhead |
18:26:16 | CodeVance | that's why I asked instead of doing it myself |
18:26:16 | CodeVance | XP |
18:26:24 | Yardanico | there's a proposed "vtable" for runtime concepts |
18:26:52 | CodeVance | can u use concepts at compile time |
18:29:57 | CodeVance | I know how concepts work (or think I do) but would my idea work too. (or at least what's the thought, is it a waste of time or not) |
18:29:59 | FromGitter | <ephja> so passing --output still causes the input file to be rewritten? I should redo everything |
18:33:47 | * | elrood joined #nim |
18:34:28 | FromGitter | <data-man> @shashlick: I mean, I don't have rights to close issues and PRs. I guess I'm punished in this way. :-D |
18:35:32 | zacharycarter | codevance: I think concepts only work at compile time |
18:41:05 | CodeVance | Poor data-man XD |
18:41:44 | * | leru joined #nim |
18:41:52 | CodeVance | I've read what happened to you. |
18:42:49 | CodeVance | zachary carter I want to use concepts at compile-time's runtime |
18:42:54 | CodeVance | for templates/macros |
18:43:35 | zacharycarter | no idea about that |
18:43:55 | Yardanico | CodeVance, idk if this will work honestly |
18:44:04 | Yardanico | only if VM supports concepts :) |
18:45:45 | dom96 | 400 responses already. Keep it coming guys! https://nim-lang.org/blog/2018/06/23/community-survey-2018.html |
18:51:34 | shashlick | dom96: CI still fails for https://github.com/nim-lang/packages/pull/772 but merged latest changes |
18:51:56 | CodeVance | I've filled the survey |
18:52:03 | dom96 | Yes. Packages keep going away really often these days |
18:54:21 | dom96 | I'll fix it eventually |
18:54:51 | dom96 | The upkeep for this is becoming annoying |
18:55:01 | dom96 | Might have to come up with something better |
19:01:14 | FromGitter | <Vindaar> speaking of packages: https://github.com/nim-lang/packages/pull/781 ⏎ finally spent some time to put this into a "usable" state :) |
19:01:47 | shashlick | what test case category will https://github.com/nim-lang/Nim/issues/5870 fall under? |
19:02:12 | shashlick | i'm thinking "test\compiles" |
19:13:18 | CodeVance | Yardanico I'll find out later XD |
19:21:28 | FromGitter | <kaushalmodi> What's the best way to check if a type exists? |
19:21:36 | * | ieatnerds joined #nim |
19:21:47 | * | Trustable quit (Remote host closed the connection) |
19:21:54 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
19:22:33 | * | nsf joined #nim |
19:22:50 | FromGitter | <kaushalmodi> For example, I did this to stop using `SomeReal` that's deprecated in 0.18.1; while also making the code work using Nim 0.18.0: |
19:22:56 | FromGitter | <kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a7b9033b0282df4fa3c40] |
19:23:02 | FromGitter | <kaushalmodi> is there a better way? |
19:27:45 | FromGitter | <Varriount> dom96: What's gratifying is knowing that this community has over 400 people willing to answer a survey. :D |
19:28:13 | Yardanico | @kaushalmodi btw, you can just check version string, it's much shorter |
19:29:09 | FromGitter | <kaushalmodi> I wanted something like "version older than 0.18.1" |
19:29:25 | FromGitter | <kaushalmodi> didn't want to hard-code to `NimVersion == "0.18.0"` |
19:30:58 | FromGitter | <kaushalmodi> hmm... interestingly `declared` works for types too |
19:32:06 | FromGitter | <kaushalmodi> From https://nim-lang.org/docs/system.html#declared,untyped, ⏎ ⏎ > Special compile-time procedure that checks whether x is declared. x has to be an identifier or a qualified identifier. |
19:32:23 | FromGitter | <kaushalmodi> I am assuming a type is either an identifier or qualified identifier :) |
19:33:01 | FromGitter | <GULPF> I think `when (NimMajor, NimMinor, NimPatch) < (0, 18, 1):` works for checking the version as well |
19:34:48 | dom96 | You should check for the existence of procs/types, not the version |
19:34:53 | dom96 | so yes, `declared` is the way to go |
19:35:15 | FromGitter | <ephja> NimVersion < "x.y.z"? |
19:35:26 | FromGitter | <kaushalmodi> @ephja yes, that works too |
19:35:30 | FromGitter | <kaushalmodi> But feels hacky |
19:35:55 | FromGitter | <kaushalmodi> you need to rely on the string lengths to the same, etc. |
19:39:05 | * | krux02 joined #nim |
19:42:25 | FromGitter | <kaushalmodi> @ephja This is what I mean: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a802163042f2df3506007] |
19:42:38 | FromGitter | <kaushalmodi> (I am on 0.18.1) |
19:54:18 | FromGitter | <kaushalmodi> dom96: Thanks. It wan't apparent that `declared` would work for types too. But it is. @GULPF Thanks for that trick :) |
19:59:51 | * | Vladar quit (Quit: Leaving) |
20:04:25 | * | ieatnerds quit (Ping timeout: 245 seconds) |
20:05:37 | * | lompik quit (Ping timeout: 245 seconds) |
20:08:23 | FromGitter | <mratsim> @kaushalmodi you can use expect(IndexError): foo if a test is supposed to give an IndexError |
20:08:47 | FromGitter | <mratsim> and you can use when compiles(bar): check false if somethin is not supposed to compile |
20:11:09 | * | kinkinkijkin quit (Remote host closed the connection) |
20:18:24 | * | gitterbot[m] joined #nim |
20:30:54 | FromGitter | <kaushalmodi> @mratsim Thanks for both of those tips! |
20:37:51 | * | gb00s quit (Quit: The Lounge - https://thelounge.github.io) |
20:39:25 | * | Perkol joined #nim |
20:40:08 | * | sz0 joined #nim |
20:40:25 | Perkol | Is there a way to exit Nim program? |
20:40:50 | Perkol | That is some function to exit program before it ends? |
20:42:14 | FromGitter | <kaushalmodi> Perkol: quit, https://nim-lang.org/docs/system.html#quit,int |
20:43:24 | * | Ven`` quit (Remote host closed the connection) |
20:43:34 | * | Ven`` joined #nim |
20:45:33 | Perkol | Thanks |
20:45:54 | * | Perkol quit (Quit: Leaving) |
20:47:15 | * | ieatnerds joined #nim |
20:51:50 | * | ieatnerds quit (Ping timeout: 260 seconds) |
20:56:50 | * | Ven`` quit (Quit: q+) |
20:58:56 | CodeVance | is there a collection of nim macros |
21:03:53 | FromGitter | <mratsim> @CodeVance, no there is none, but you can start an awesome Nim Macros repo ;) |
21:03:57 | * | noonien quit (Quit: Connection closed for inactivity) |
21:04:57 | CodeVance | keck. I shall. since I've started macro-smithing |
21:05:19 | CodeVance | I just don't want my beauties to be lost |
21:05:23 | FromGitter | <kaushalmodi> CodeVance: isn't that a very broad definition? A macro could be anything.. |
21:05:46 | FromGitter | <kaushalmodi> I mean.. you could have a macro specific to web devel |
21:06:12 | CodeVance | a macro can't be anything. it has to start with macro |
21:06:34 | CodeVance | Sure. macro for webdev using a macro for dsl |
21:06:51 | CodeVance | small self sustaining example code |
21:07:20 | FromGitter | <kaushalmodi> CodeVance: What are your macros related to? |
21:08:34 | CodeVance | one is for a badly designed ecs that automatically creates methods for registering components to a system |
21:10:04 | CodeVance | other is my class macro. which is just the same as the other class macros, except you can set and overwrite default values for attributes, and will fortunately be made obsolete by default attribute values for type |
21:11:14 | CodeVance | Another one is for context, it basically adds `{.this: self.}` and injects self parameter into all the procs within its body |
21:11:18 | FromGitter | <kaushalmodi> OK, I shouldn't have asked.. none of that made sense. I'll bookmark this to revisit at a later point. |
21:14:35 | CodeVance | lol they are for personal use |
21:15:05 | CodeVance | I made it so I don't have to type too much |
21:15:26 | CodeVance | And the other one. I can't get the type of a component at runtime |
21:15:29 | CodeVance | So I do it with a method |
21:16:15 | CodeVance | It's like boilerplate but I'm the one that owns the boiler plate factory |
21:25:04 | FromGitter | <Vindaar> > It's like boilerplate but I'm the one that owns the boiler plate factory ⏎ haha, I like that :D |
21:45:04 | FromGitter | <mratsim> @CodeVance, don’t forget about “using” as a this: self comanion |
21:45:07 | FromGitter | <mratsim> companion |
21:46:06 | CodeVance | I know of using |
21:46:33 | * | Jesin joined #nim |
21:46:45 | CodeVance | but if I want to use using self:Type in more than one place.... |
21:47:11 | CodeVance | I can't be sure that the procs won't get mixed up |
21:48:02 | CodeVance | plus its a small macro |
21:48:12 | CodeVance | maybe I'm reinventing the wheel |
21:57:02 | * | rauss quit (Read error: Connection reset by peer) |
21:59:26 | * | rauss joined #nim |
22:03:38 | * | miran quit (Ping timeout: 256 seconds) |
22:11:50 | * | rosshadden joined #nim |
22:15:15 | * | rauss quit (Ping timeout: 260 seconds) |
22:23:24 | * | elrood quit (Quit: Leaving) |
22:25:59 | FromGitter | <Quelklef> wow, til of NIm's `using` statement |
22:26:21 | FromGitter | <Quelklef> this language is like a damn attic where you think you "know" it but then there's always something you don't |
22:26:35 | FromGitter | <Quelklef> I suppose it is right there front-page on the manual, though... |
22:27:34 | * | rosshadden quit (Read error: Connection reset by peer) |
22:29:30 | * | rosshadden joined #nim |
22:30:43 | FromGitter | <rayman22201> lol... That's why I still think Nim needs better Docs... They are good, but they could be better. |
22:31:05 | FromGitter | <rayman22201> The secret project I want to work on but can't find the time to do... |
22:34:44 | CodeVance | using isn't used much in the stdlib |
22:35:00 | CodeVance | or examples |
22:35:03 | CodeVance | or anywhere |
22:35:07 | CodeVance | But its useful |
22:35:17 | CodeVance | Just remember to not use commas, use semicolons |
22:35:32 | CodeVance | or else the type gets overriden |
22:39:01 | * | nsf quit (Quit: WeeChat 2.1) |
22:48:41 | * | leru quit (Remote host closed the connection) |
22:49:16 | * | ieatnerds joined #nim |
22:53:35 | * | ieatnerds quit (Ping timeout: 240 seconds) |
22:57:32 | * | ieatnerds joined #nim |
23:02:03 | * | ieatnerds quit (Ping timeout: 268 seconds) |
23:20:19 | * | Jesin quit (Quit: Leaving) |
23:26:51 | * | Jesin joined #nim |
23:49:17 | * | fjvallarino quit (Remote host closed the connection) |
23:49:47 | * | fjvallarino joined #nim |
23:54:00 | * | fjvallarino quit (Ping timeout: 245 seconds) |
23:57:02 | * | fjvallarino joined #nim |