<< 02-07-2018 >>

00:14:10*codevance[m] is now known as CodeVance
00:49:27FromGitter<honewatson> where is your issue @ephja?
00:50:43FromGitter<ephja> I was referring to nimpretty issues. it needs more testing
00:53:11FromGitter<honewatson> Yup so you are saying there is currently only one nimpretty issue in the issue tracker?
00:56:46FromGitter<honewatson> I noticed that the line is split at a pragma
00:57:15*fjvallarino quit (Remote host closed the connection)
00:57:48FromGitter<honewatson> ```proc procTempl(items: seq[Name]): string {. ⏎ compileTime.} =``` [https://gitter.im/nim-lang/Nim?at=5b39788b89db5e701c99a2a1]
00:58:25FromGitter<honewatson> maybe it would be better to have a new line at parameters
00:58:56FromGitter<honewatson> like this
00:59:10FromGitter<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:04shashlickhttp://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:34FromGitter<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:33FromGitter<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:54AraqVarriount, don't work around, patch osproc
07:05:27FromGitter<Varriount> Araq: I don't know if I have the time - This is for a summer assignment.
07:05:48FromGitter<Varriount> And the change wouldn't be so much "patching" as "rewriting"
07:06:11Araqreally? is it not just writing a different constructor for Process?
07:07:30FromGitter<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:52FromGitter<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:52FromGitter<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:41Araqportability problems, I guess
07:27:41Araqanyhow, copy and adapt from osproc what you need
07:27:52Araqshould get you there faster than hacking around with threads.
07:28:21AraqI can understand a proper PR would be too much work.
07:29:51Araqthe stdlib is always good as a stone pit... :-)
07:49:29dom96I'd really love to rewrite osproc
07:49:39dom96It's something that all languages seem to be bad at
07:58:49*pwntus joined #nim
08:00:14FromGitter<Varriount> If I do, I would base the API off of Python and D.
08:00:59FromGitter<Varriount> dom96, araq: Any other languages that might be a good inspiration for an API?
08:01:51AraqI base the API off of Nim's, because I like osproc.
08:02:01AraqI mean, ok, I'm the primary author of this beast.
08:02:20Araqbut it's great and you're all wrong about it :P
08:02:57FromGitter<Varriount> Araq: osproc.nim is probably the most complicated module in the standard library.
08:03:12Araqnever looked at asyncdispatch? ;-)
08:03:46Araqthe implementation is complicated and should make use of 2 or 3 include files, but the API is pretty simple.
08:04:53Araqand 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:12dom96I always dread having to deal with osproc
08:06:26dom96Well, any process handling in general
08:09:10*endragor joined #nim
08:18:57Araqlet p = startProcess(cmd, args, env, inputStream, outputStream, errorStream)
08:19:08AraqinputStream.write "data"
08:19:12Araqp.close()
08:20:02AraqstartProcess at least takes 6 parameters, there is no way around it
08:20:57Araqah I forgot 'workingDir', lovely
08:24:28Araqand osproc's startProcess lacks the stream parameters.
08:25:18Araqand 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:37Araqjust get off my lawn already.
08:25:50*dddddd joined #nim
08:26:17dom96Don't worry
08:26:23dom96I won't actually rewrite it
08:26:32dom96The reason I would like to rewrite it is to understand it properly.
08:28:42*krux02 joined #nim
08:28:47Araqgood :-)
08:34:48FromGitter<alehander42> Araq, I remember you told me to tweak some things around EqResult handling last time I had diff problems with karax
08:35:10Araqyeah.
08:35:12FromGitter<alehander42> what was it exactly, I can't find it searching the irc logs
08:35:43FromGitter<alehander42> hm, is there a karax chat room :D I don't know if it's offtopic for #nim
08:36:18Araqproc eq
08:36:38Araqreturn similar --> return different
08:43:32*yglukhov[i] joined #nim
08:46:33*yglukhov[i] quit (Remote host closed the connection)
08:50:00FromGitter<alehander42> it's not fixing it
08:50:13FromGitter<alehander42> I tried changing more cased --> different
08:50:20FromGitter<alehander42> and that kinda works indeed
08:50:30FromGitter<alehander42> but the problem is that naturally component updating is broken
08:51:07FromGitter<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:57Araqwhat component updating?
09:01:58*rauss quit (Read error: Connection reset by peer)
09:02:03Araqdo you use components?
09:02:38FromGitter<alehander42> yeah?
09:03:01FromGitter<alehander42> are they deprecated ? :D
09:04:11*rauss joined #nim
09:05:13FromGitter<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:40Araqnot deprecated, but I never was happy with the updating logic :-)
09:06:23AraqVindaar: 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:40Araqbtw, the c, C notation needs a deprecation period.
09:07:03Araqit was used in the stdlib, it might have been used elsewhere.
09:08:34FromGitter<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:22FromGitter<Vindaar> Ok, fine with me :)
09:14:08FromGitter<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:30FromGitter<alehander42> (basically doing a "dummy" diff)
09:22:58Araqvindaar. yes
09:23:20Araqalehander42: hmmm, probably
09:23:50FromGitter<Vindaar> ok!
09:25:14FromGitter<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:27FromGitter<alehander42> other aspects of components aren't so important to me
09:27:41FromGitter<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:52FromGitter<alehander42> iirc they had some logic influence
09:28:57FromGitter<alehander42> in karax
09:34:18*noonien joined #nim
09:43:51*brainproxy quit (Ping timeout: 240 seconds)
10:07:18FromGitter<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:04FromGitter<gogolxdong> How to get current element value using karax ,like button ?
10:44:06*nsf quit (Quit: WeeChat 2.1)
10:48:02FromGitter<gogolxdong> Is there a pointer like this?
10:55:22*Vladar quit (Quit: Leaving)
10:57:42FromGitter<kindlychung> https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L18-L21
10:58:08FromGitter<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:29FromGitter<alehander42> @gogolxdong you can always use html selectors
11:30:07FromGitter<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:02FromGitter<kindlychung> I have done away with the `DoublyLinkedNodeObj` thing and everything seems fine: https://gist.github.com/kindlychung/80549bcb409c3109ed7234fdfd2ae2db
11:39:43FromGitter<kindlychung> Also, if the length of the doubly linked list gets too long, the program crashes:
11:39:53FromGitter<kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a0f093c5abf52b634dfcb]
11:40:12FromGitter<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:03FromGitter<gogolxdong> can use getVNodeById to get the value, but I know this can Do this properly semantics gracefully.
12:13:51FromGitter<mratsim> @kindlychung that’s probably because before you couldn’t do what you did.
12:14:03FromGitter<mratsim> ref object with fields
12:14:28*fvs joined #nim
12:15:00FromGitter<kindlychung> @mratsim Ok. Any idea why I got that crash? Thanks.
12:18:01FromGitter<mratsim> can you compile with gc:markandsweep?
12:25:16FromGitter<kindlychung> Ah, that works indeed.
12:26:49FromGitter<kindlychung> How do I put the --gc:markandsweep option in nim.cfg?
12:27:10Yardanicoadd --gc:markandsweep to nim.cfg :)
12:27:56FromGitter<kindlychung> Yay. :)
12:30:45*SenasOzys quit (Ping timeout: 260 seconds)
12:34:50*brainproxy joined #nim
12:36:57FromGitter<mratsim> you can probably open a bug on the refcounting GC then
12:37:40Yardanico@kindlychung can you also try with --gc:v2 ?
12:39:03*SenasOzys joined #nim
12:41:12FromGitter<kindlychung> ```SIGSEGV: Illegal storage access. (Attempt to read from nil?)```
12:42:45FromGitter<kindlychung> @Yardanico Why did that happen? What's the diff between v2 and markandsweep?
12:43:04Yardanicov2 is the "second" version (as the name says) of the GC :)
12:43:51Yardanicoyou should definitely create an issue if some code works with markandsweep and doesn't work with default gc/gcv2
12:44:14FromGitter<kindlychung> Ok.
12:46:36Araqnot really. it's probably just a bug in your code/wrappers and the other GC gets lucky
12:47:01YardanicoAraq, yeah, I wanted to mention this too
12:49:01FromGitter<kindlychung> Options given on the commandline in shell will override nim.cfg, right?
12:50:24Yardanicohmm
12:51:15FromGitter<kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a1fc37b811a6d63c88ff1]
12:51:47FromGitter<kindlychung> Is there something wrong with the code above?
12:52:01FromGitter<kindlychung> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a1ff1d99c896d64df3fd5]
12:55:05*barelyMalicious joined #nim
12:55:43barelyMaliciousWell, gc v2 won't work even with empty files https://github.com/nim-lang/Nim/issues/7970
12:59:54YardanicobarelyMalicious, 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:25ieatnerdsHi guys!
13:21:33Yardanicoieatnerds, hello
13:23:00ieatnerdsHow are you?
13:26:45*elrood quit (Remote host closed the connection)
13:26:51Yardanicoieatnerds, why are you asking? :)
13:27:53*fjvallarino quit (Remote host closed the connection)
13:27:59ieatnerdsThought I'd start off with pleasantries before I asked for some help.
13:28:00*fjvallarino joined #nim
13:29:18Yardanicoieatnerds, you can straight up ask for the help here, it's ok :)
13:30:12ieatnerdsI'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:38Yardanicoieatnerds, what module did you import for parseInt? strutils or parseutils?
13:31:03ieatnerdsstrutils
13:31:03Yardanicoif it's from parseutils, you need to use it like this:
13:31:08Yardanicoah, then it should work, hm
13:31:25ieatnerdsnope, my bad I did in fact take it from pasrutils
13:31:35ieatnerdslet me try strutils
13:31:42Yardanicoieatnerds, parseutils is for parsers mostly
13:32:02Yardanicolike here - https://github.com/Yardanico/nim-mathexpr/blob/master/mathexpr.nim#L191
13:32:20krux02be warned strutils is badly designed.
13:32:28dom96Yardanico: Nice prediction of what the problem was :)
13:32:46*NamPNQ quit (Ping timeout: 264 seconds)
13:33:37ieatnerdsAnd 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:20Yardanicoieatnerds, 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:45Yardanico!eval import parseutils; import strutils; echo parseInt("1")
13:34:48NimBot1
13:37:07zacharycarteranyone else use / mess w/ openbsd?
13:37:28krux02hi zacharycarter
13:37:33krux02what is / mess w/?
13:37:53krux02how is your new job?
13:38:19zacharycartermess around with / toy with
13:38:24zacharycarterI don't have one haha
13:38:26zacharycarterso shitty :P
13:39:00*endragor quit (Ping timeout: 245 seconds)
13:39:05zacharycarterhow 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:26krux02Ok 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:39krux02But it is in nim, so I am online here a lot
13:40:47krux02not always active though.
13:41:19krux02I made an issue on your project regarding the deprecation of OpenGL on OSX. I just wanted to hear your thoughts about it.
13:41:35zacharycarterBGFX :D
13:41:49krux02yea bgfx is a nice abstraction.
13:41:55zacharycarteroooo masters thesis using Nim :D awesome!
13:42:02krux02yea I know
13:42:16zacharycartermmhmm
13:42:17zacharycarterI'm going to use it in my next project
13:42:17krux02I can finally compile Nim to glsl
13:42:21zacharycarterwhenever I get around to starting it
13:42:35zacharycartercurrently I'm thinking about moving the playground to obsd
13:42:45zacharycarterso I'm figuring out httpd and fast / slow cgi etc
13:42:49krux02so 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:57krux02cgi?
13:43:19krux02I don't know a lot about web technologies
13:43:23zacharycarterthat is awesome :D
13:43:24zacharycartercommon gateway interface
13:44:10zacharycarterI don't think docker / containerization is the most secure approach to doing what the playground is doing
13:44:15zacharycarterI think sandboxing would be better
13:44:23zacharycarterand if I use vms I can probably allow for different operating systems on the playground too
13:44:26zacharycarterhopefully anyway
13:44:36krux02I think the compile in wasm would be great
13:45:17zacharycarterI've been reading this guys stuff a lot - https://learnbchs.org/
13:45:18krux02I am thrilled by 'the least amount of common web technology involed' solutions
13:45:20zacharycarterand I'm basically just replacing C w/ Nim
13:45:26zacharycarterI will add that for sure
13:45:33zacharycarterI have a lot of features planned
13:45:34zacharycarterand a front end facelift too
13:46:38krux02oh hipster free
13:46:43krux02cool feature :P
13:53:05federico3the fancy page with font-awesome in it is not very hipster free
13:56:49federico3(the other stuff is not similar with Nim + seccomp)
13:57:22krux02the bchs looks very nim compatible because it is all in C
13:58:33FromGitter<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:48FromGitter<alehander42> oh boy I am missing the satire
14:00:55krux02alehander42: well when it is C you can use every C library from the system
14:01:04dom96zacharycarter: huh, you've changed your mind about using Docker for the playground?
14:01:29krux02so it is probably more the library approch instead of "we ship with everything any miserably fail at it" approach
14:02:20FromGitter<alehander42> @krux02 yeah, it's a cool idea, bchs looks cool
14:02:36FromGitter<alehander42> but still, I prefer higher level wrappers
14:02:47FromGitter<alehander42> and dsl-s
14:02:56dom96BCHS is nice, but honestly, just use Linux like most people :P
14:03:52dom96OpenBSD is the very definition of "hipster"
14:04:42zacharycarterhaha yeah - I disagree with his definition of hipster
14:05:04zacharycarterbut I think sandboxing would be more secure
14:05:10zacharycarterthan docker
14:05:49zacharycarteralso so far httpd / kcgi seem very simple
14:06:52dom96sandboxing how?
14:11:41dom96You know what's simpler? A reverse proxy
14:11:58dom96CGI is yet another protocol
14:12:54zacharycartersandboxing the application that is being compiled
14:13:20zacharycarterand eventually run
14:13:38dom96Yes, I know. But I don't know what this BCHS stack offers in terms of sandboxing
14:13:50zacharycarteroh sorry
14:14:23zacharycarterhttps://kristaps.bsd.lv/absdcon2016/
14:14:26zacharycarterI think that slide deck explains it pretty well
14:15:28dom96So chroot, pledge, setuid?
14:16:42zacharycarteryeah
14:17:40zacharycarterbut I think pledge is used mostly
14:17:43FromGitter<gogolxdong> getVNodeById involves more complexity.
14:18:10FromGitter<gogolxdong> have to preserve id and index.
14:19:04dom96zacharycarter: Why move to this instead of just improving the current implementation?
14:19:23FromGitter<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:48dom96gogolxdong: it is possible, but you shouldn't do that.
14:20:06dom96An ID+index is an ID in itself
14:20:15dom96id="myDiv5"
14:20:59FromGitter<gogolxdong> you mean it's recommended solution?
14:22:42dom96I don't know what you're doing
14:22:48dom96so I can't say with certainty
14:23:56FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a357c60c387078356d609]
14:24:44FromGitter<gogolxdong> I'm trying to inject an operation column into data table for different kinds of resource type.
14:25:07FromGitter<gogolxdong> This is for instance.
14:26:00dom96well then `getVNodeById("instanceDropDown")` sounds fine to me
14:27:09FromGitter<gogolxdong> I have provider and instanceid now, to preserve the information have to introduce an additional index.
14:27:24zacharycarterdom96: I am going to improve the current solution - most of the improvement is on the front end anyway
14:27:31zacharycarterbut it gives me a chance to learn / play around w/ some openbsd
14:27:42zacharycarterand if it results in a more secure playground - then I think it's worth it
14:28:02zacharycarterI'm not starting over I still have all the code I wrote / can reference it
14:28:11zacharycarterand it might end up being easier than the docker / webpack hell I'm going through now on linux
14:28:21zacharycartersince the new editor I'm using can't be loaded via CDN without a lot of extra work
14:28:26zacharycartermonaco editor or whatever
14:28:39dom96bah
14:28:43dom96What's wrong with ace?
14:29:00zacharycarterace can't do this -
14:29:05zacharycarterhttps://webassembly.studio/
14:29:07zacharycarteryou can w/ monaco
14:29:18dom96I'm not sure what's insecure about Docker, the Rust playground uses it too
14:30:00zacharycarterwell from my understanding - containerization takes the reverse approach of security vs sandboxing
14:30:12zacharycartercontainerization layers security on after the fact
14:30:20zacharycartersandboxing starts out by restricting everything up front
14:30:42zacharycarterand there is a lot of security shit to docker that I don't know about / haven't explorted
14:30:47zacharycarterand there is a lot of security shit to docker that I don't know about / haven't explored
14:31:04zacharycarterif this openbsd experiment doesn't work I'll go back to docker / linux
14:31:08zacharycarterI'm hoping it will make everything easier - but I'll see
14:33:37zacharycarterhttps://docs.docker.com/engine/security/security/
14:34:03FromGitter<gogolxdong> wrapped these ,doesn't work
14:34:09FromGitter<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:05xomachine[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:49FromGitter<kaushalmodi> xomachine[m]: Use ⏎ ⏎ ```var foo {. compileTime .}: int``` [https://gitter.im/nim-lang/Nim?at=5b3a3e203c5abf52b6356feb]
15:01:29FromGitter<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:56xomachine[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:33FromGitter<Vindaar> Hm, question regarding procedure types: https://gist.github.com/Vindaar/2933bcc614ea6960ba6f393bb14ffdd9
15:15:06FromGitter<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:38federico3again, docker is not a security/sandboxing tool
15:34:47FromGitter<kaushalmodi> Question about unittest: How do I allow a test to fail?
15:34:59FromGitter<kaushalmodi> Cannot figure out how to use "skip"
15:38:44FromGitter<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:15dom96xomachine[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:26dom96Here is what should be used now: https://github.com/nim-lang/Nim/blob/devel/lib/core/macrocache.nim
16:35:21krux02dom96: 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:42dom96I think so
16:36:05dom96Otherwise all macros would break
16:39:29xomachine[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:58zacharycarterfederico3: I didn't assert it was
17:03:10zacharycarterat least not today haha
17:06:08xomachine[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:21Yardanicoshashlick, 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:36Yardanicoin your `nim check` output you don't even get a error message for line 14
17:45:27shashlickYa cause the issue asked to fix that typo
17:45:35shashlickI'll try without that and see
17:46:09Yardanicoshashlick, issue name is "nim check crash due to typo" so it's about `nim check` crashing when it encounters a typo
17:53:37shashlickyardanico: confirmed
17:54:55shashlickyardanico: sorry for the confusion - I'm going to delete my messages so as not to confuse the issue
18:00:26shashlickdata-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:57CodeVanceWhat about using concepts for nimnodes
18:19:56YardanicoCodeVance, you mean concepts instead of object variants?
18:21:16*Ven`` joined #nim
18:22:50CodeVanceAlongside with
18:22:54CodeVancenot instead
18:23:36FromGitter<ephja> does nimpretty not format this module correctly when merged with the other code that I want to show?🤔
18:24:03CodeVanceLike 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:16Yardanicohmm, yeah, that could lead to less bugs in the compiler
18:25:42dom96The kind of a NimNode is only known at runtime
18:25:45dom96Concepts won't help you here
18:25:58CodeVanceBut would concepts work at compile time?
18:26:05YardanicoCodeVance, they only work at compile-time\
18:26:11Yardanicothey have no runtime overhead
18:26:16CodeVancethat's why I asked instead of doing it myself
18:26:16CodeVanceXP
18:26:24Yardanicothere's a proposed "vtable" for runtime concepts
18:26:52CodeVancecan u use concepts at compile time
18:29:57CodeVanceI 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:59FromGitter<ephja> so passing --output still causes the input file to be rewritten? I should redo everything
18:33:47*elrood joined #nim
18:34:28FromGitter<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:32zacharycartercodevance: I think concepts only work at compile time
18:41:05CodeVancePoor data-man XD
18:41:44*leru joined #nim
18:41:52CodeVanceI've read what happened to you.
18:42:49CodeVancezachary carter I want to use concepts at compile-time's runtime
18:42:54CodeVancefor templates/macros
18:43:35zacharycarterno idea about that
18:43:55YardanicoCodeVance, idk if this will work honestly
18:44:04Yardanicoonly if VM supports concepts :)
18:45:45dom96400 responses already. Keep it coming guys! https://nim-lang.org/blog/2018/06/23/community-survey-2018.html
18:51:34shashlickdom96: CI still fails for https://github.com/nim-lang/packages/pull/772 but merged latest changes
18:51:56CodeVanceI've filled the survey
18:52:03dom96Yes. Packages keep going away really often these days
18:54:21dom96I'll fix it eventually
18:54:51dom96The upkeep for this is becoming annoying
18:55:01dom96Might have to come up with something better
19:01:14FromGitter<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:47shashlickwhat test case category will https://github.com/nim-lang/Nim/issues/5870 fall under?
19:02:12shashlicki'm thinking "test\compiles"
19:13:18CodeVanceYardanico I'll find out later XD
19:21:28FromGitter<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:50FromGitter<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:56FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a7b9033b0282df4fa3c40]
19:23:02FromGitter<kaushalmodi> is there a better way?
19:27:45FromGitter<Varriount> dom96: What's gratifying is knowing that this community has over 400 people willing to answer a survey. :D
19:28:13Yardanico@kaushalmodi btw, you can just check version string, it's much shorter
19:29:09FromGitter<kaushalmodi> I wanted something like "version older than 0.18.1"
19:29:25FromGitter<kaushalmodi> didn't want to hard-code to `NimVersion == "0.18.0"`
19:30:58FromGitter<kaushalmodi> hmm... interestingly `declared` works for types too
19:32:06FromGitter<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:23FromGitter<kaushalmodi> I am assuming a type is either an identifier or qualified identifier :)
19:33:01FromGitter<GULPF> I think `when (NimMajor, NimMinor, NimPatch) < (0, 18, 1):` works for checking the version as well
19:34:48dom96You should check for the existence of procs/types, not the version
19:34:53dom96so yes, `declared` is the way to go
19:35:15FromGitter<ephja> NimVersion < "x.y.z"?
19:35:26FromGitter<kaushalmodi> @ephja yes, that works too
19:35:30FromGitter<kaushalmodi> But feels hacky
19:35:55FromGitter<kaushalmodi> you need to rely on the string lengths to the same, etc.
19:39:05*krux02 joined #nim
19:42:25FromGitter<kaushalmodi> @ephja This is what I mean: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3a802163042f2df3506007]
19:42:38FromGitter<kaushalmodi> (I am on 0.18.1)
19:54:18FromGitter<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:23FromGitter<mratsim> @kaushalmodi you can use expect(IndexError): foo if a test is supposed to give an IndexError
20:08:47FromGitter<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:54FromGitter<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:25PerkolIs there a way to exit Nim program?
20:40:50PerkolThat is some function to exit program before it ends?
20:42:14FromGitter<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:33PerkolThanks
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:56CodeVanceis there a collection of nim macros
21:03:53FromGitter<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:57CodeVancekeck. I shall. since I've started macro-smithing
21:05:19CodeVanceI just don't want my beauties to be lost
21:05:23FromGitter<kaushalmodi> CodeVance: isn't that a very broad definition? A macro could be anything..
21:05:46FromGitter<kaushalmodi> I mean.. you could have a macro specific to web devel
21:06:12CodeVancea macro can't be anything. it has to start with macro
21:06:34CodeVanceSure. macro for webdev using a macro for dsl
21:06:51CodeVancesmall self sustaining example code
21:07:20FromGitter<kaushalmodi> CodeVance: What are your macros related to?
21:08:34CodeVanceone is for a badly designed ecs that automatically creates methods for registering components to a system
21:10:04CodeVanceother 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:14CodeVanceAnother one is for context, it basically adds `{.this: self.}` and injects self parameter into all the procs within its body
21:11:18FromGitter<kaushalmodi> OK, I shouldn't have asked.. none of that made sense. I'll bookmark this to revisit at a later point.
21:14:35CodeVancelol they are for personal use
21:15:05CodeVanceI made it so I don't have to type too much
21:15:26CodeVanceAnd the other one. I can't get the type of a component at runtime
21:15:29CodeVanceSo I do it with a method
21:16:15CodeVanceIt's like boilerplate but I'm the one that owns the boiler plate factory
21:25:04FromGitter<Vindaar> > It's like boilerplate but I'm the one that owns the boiler plate factory ⏎ haha, I like that :D
21:45:04FromGitter<mratsim> @CodeVance, don’t forget about “using” as a this: self comanion
21:45:07FromGitter<mratsim> companion
21:46:06CodeVanceI know of using
21:46:33*Jesin joined #nim
21:46:45CodeVancebut if I want to use using self:Type in more than one place....
21:47:11CodeVanceI can't be sure that the procs won't get mixed up
21:48:02CodeVanceplus its a small macro
21:48:12CodeVancemaybe 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:59FromGitter<Quelklef> wow, til of NIm's `using` statement
22:26:21FromGitter<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:35FromGitter<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:43FromGitter<rayman22201> lol... That's why I still think Nim needs better Docs... They are good, but they could be better.
22:31:05FromGitter<rayman22201> The secret project I want to work on but can't find the time to do...
22:34:44CodeVanceusing isn't used much in the stdlib
22:35:00CodeVanceor examples
22:35:03CodeVanceor anywhere
22:35:07CodeVanceBut its useful
22:35:17CodeVanceJust remember to not use commas, use semicolons
22:35:32CodeVanceor 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