<< 08-06-2018 >>

00:01:06*ehmry joined #nim
00:19:09*cornfeedhobo joined #nim
00:24:22*ehmry quit (Ping timeout: 245 seconds)
00:24:47*cornfeedhobo quit (Ping timeout: 245 seconds)
00:28:36*ehmry joined #nim
00:36:52*thomasross joined #nim
00:37:34*durandu joined #nim
00:39:05*cornfeedhobo joined #nim
01:04:20*so joined #nim
01:08:43*Snircle joined #nim
01:13:49*Electrux joined #nim
01:18:07*Electrux quit (Ping timeout: 245 seconds)
01:40:41*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:41:37*krux02 quit (Remote host closed the connection)
01:58:20*durandu quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/)
02:21:08*find0x90 joined #nim
02:21:40*sclee joined #nim
02:21:58*sclee left #nim (#nim)
02:22:10*sclee joined #nim
02:22:32*sclee quit (Client Quit)
02:33:25*find0x90 quit (Quit: find0x90)
02:58:43skrylarwell. putting arraymancer to the acid test soon :)
03:01:31*Electrux joined #nim
03:02:30skrylarforward/backward passes are made, have to figure out how voiceloop finds when its stopping and then put in the actual iteration/training.. with any luck, text-to-speech in nim :o
03:14:13skrylarit's not obvious from the python versions of these things, although i guess you should be able to check the attention vectors for a stop condition; if they aren't paying attention to "anything" anymore, then you're probably done
03:42:31*Electrux quit (Read error: Connection reset by peer)
03:43:52*Electrux joined #nim
04:03:50*xkapastel quit (Quit: Connection closed for inactivity)
04:30:25*skrylar quit (Remote host closed the connection)
04:45:32*miran joined #nim
04:46:57*Electrux quit (Ping timeout: 248 seconds)
05:05:31*sz0 joined #nim
05:07:30*Electrux joined #nim
05:25:04*xet7 joined #nim
05:34:59*nsf joined #nim
05:58:13*cspar joined #nim
06:17:42Araqhttps://github.com/nim-lang/Nim/issues/7874
06:17:46*miran quit (Ping timeout: 264 seconds)
06:18:01Araqplease try to read it all, understand it, and tell me if your crazy DSLs would work with it
06:32:19*PMunch joined #nim
06:35:45PMunchzahary, I saw you created a langserver repo under nim-lang
06:36:53PMunchIs it something you've just had lying around, or did you write it all yesterday? Seeing how there's only a single commit
06:37:00zaharyyes, I had some preliminary code for it and saw your work and decided to progress a bit more and publish it
06:38:01zaharyI want to write a design doc today, come and collaborate in this new "official" repo :)
06:38:09PMunchNice, I like how what you've done and what I've done has about 0% overlap :)
06:39:04*FromGitter quit (Read error: Connection reset by peer)
06:39:39zaharyAt Status, we'll be publishing a general purpose JSON-RPC library (it's almost done) - I think we can use it for the LSP protocol
06:39:50zaharyThis issue tracks the last remaining bits: https://github.com/status-im/nim-eth-rpc/issues/15
06:42:51PMunchYeah I had a look at dom's json-rpc repo, but it also lacked the ability to take in other sources
06:43:04PMunchIt worked over TCP
06:43:36zaharyOur library is quite nice, because it can build the marshaling logic autmatically from a protocol description like this:
06:43:37zaharyhttps://github.com/status-im/nim-eth-rpc/blob/master/tests/ethcallsigs.nim
06:43:41*xkapastel joined #nim
06:46:16PMunchAh, kinda like what I'm doing here: https://github.com/PMunch/nimlsp/blob/master/src/nimlsppkg/jsonschema.nim#L185
06:46:29PMunchBasically a DSL for creating JSON schemas
06:47:07*Vladar joined #nim
06:47:16PMunchBut it doesn't actually marshal the types, so you don't get the overhead of copying in things you don't need
06:49:10PMunchI'm planning on adding an option to the isValid procedure to allow you to traverse the messages by yourself
06:51:03Araqyou need to base it all on my packedjson ideas, the best thing since sliced bread, create a tree structure with one allocation
06:51:22Araq:P
06:53:56PMunchIt is actually using packedjson under the hood
06:54:35PMunchThe only thing the isValid procedure is doing is traversing the tree and checking that only the expected keys are found and that they all have the correct types
06:56:27Araqreally? cool
06:57:36PMunchOh wait, it is using the regular json module..
06:57:47PMunchHmm, I thought I had set it up to use packedjson
06:59:32PMunchHmm, it complains here https://github.com/Araq/packedjson/blob/master/packedjson.nim#L44
06:59:36PMunchUnable to open parsejson
07:00:17Araqit requires Nim devel...
07:00:45Araqhad to split Nim's json module in order to reuse the JSON parser
07:00:45PMunchAh
07:01:06Araqit sucks so much depends on devel but code duplication would have sucked more
07:01:32PMunchI ran into similar problems on my home computer, forgot I had changed them both to stable when I was working on the benchmark thingy
07:01:57PMunchI feel like a lot of things depend on devel, for better or worse
07:03:16PMunchDamn it, it requires a newer devel than the one I have. And choosenim is broken for me on this machine..
07:03:39PMunchhttp://ix.io/1amF/
07:03:46PMunchSSL issues..
07:04:25PMunchBut since they use the same parser it should work just as well :)
07:07:07Araqif tree construction takes a single allocation there is little reason to avoid it and the parser generator can always produce one, simplifying the API
07:07:51Araqwe need to derive the AST structure from the grammar then though
07:07:59Araqwhich seems to be too inflexible
07:08:44Araqon the other hand, if it's simple enough we can make people write the grammar in a particular style to compensate for it
07:10:51Araqsome tokens produce terminal symbols, some grammar rules produce non-terminal symbols
07:11:00Araqthere is actually quite little going on here
07:11:39Araqyou can in fact cover it by a simple rule like "Uppercased symbols end up in the AST, lowercased get thrown away"
07:16:20PMunchI'm not sure if I follow
07:21:59*donlzx joined #nim
07:24:08PMunchAre you talking about a general purpose parser generator?
07:26:06Araqyeah
07:29:15Araqproblem with parser generators is that I don't need one and I don't really know what others need ;-)
07:30:13Araqbut I could write one that's good enough to parse Nim.
07:30:44PMunchBased on what input?
07:30:53PMunchLike how would you specify the grammar?
07:31:02Araqexactly. I don't know.
07:31:11Araqprobably
07:31:14Araqgrammar"""
07:31:36Araq ifStmt = 'if' expr ':' expr ['else' ':' expr]
07:31:39Araq"""
07:32:29Araqor based on PEGs
07:33:19Araqmaybe I'll do it as another weekend project
07:34:16Araqa rule starting with a token causes an AST node to be created, else the rule is just embedded in the outer AST
07:34:43Araqbut that fails for binary operators, not sure
07:35:30Araqthe existing solutions require manual AST building and so they don't save enough boilerplate for my taste
07:36:41Araqparser.nim: addSon is used 174 times
07:36:52AraqgetTok is used 156 times
07:37:18Araq--> a parser generator solves the wrong problem :P
07:45:54PMunchHaha
07:46:07PMunchYeah it would be cool to have something like that
07:47:24PMunchHmm, I remember seeing something like that
07:47:32PMunchIt had a DSL for the node structure
07:47:44PMunchI thought it was glossolalia, but that wasn't it
07:51:12Araqa DSL for the node structure plus a DSL for the parser generator doesn't sound it would fly
07:51:39Araqyou can derive the node structure from the grammar but you need some override mechanisms
07:51:57*couven92 joined #nim
07:52:50Araqbut maybe I'm also over-thinking things and generating some AST from the pegs module would be good enough
08:03:05*gmpreussner_ quit (Ping timeout: 276 seconds)
08:03:57*gmpreussner joined #nim
08:07:39PMunchUgh, I hate it when I create something that works really well, but I forgot to add one seemingly minor feature that just breaks the entire logic..
08:11:32*xet7 quit (Ping timeout: 276 seconds)
08:11:38Araqso ... you hate programming? ;-)
08:12:47PMunchHaha, no I just hate myself for not thinking of every corner case before I begin programming :P
08:14:57Araqthat's a good practice. it means that you actually start with something.
08:15:10Araqinstead of throwing the towel immediately ;-)
08:15:36Araqall progress depends on the unreasonable.
08:20:14PMunchProblem is that I seldom care to do a proper rewrite, so I just tack an the extra functionality and end up with something that's quite unmaintainable
08:20:59*floppydh joined #nim
08:22:11PMunchSo they end up like this: https://i.pinimg.com/736x/d5/1e/12/d51e122a32504005e5f7a6e610b3bd32--cliff-house-lemony-snicket.jpg
08:22:22AraqI prefer the wording "harder to maintain", unmaintainable is usually quite far away :P
08:22:37PMunchEverything looks good and works fine on the surface, but move one piece of furniture and the whole thing collapses
08:22:47PMunchHaha, fair enough
08:24:31*xet7 joined #nim
08:32:43zaharyBack to the topic of the day: https://github.com/nim-lang/Nim/issues/7874 - I've left some thought in the issue
08:37:26Araqzahary, I don't understand your point (4)
08:37:32PMunchHmm, is there a oneliner to check if a JArray is homogenous?
08:37:49Araqsequtils.allIt ?
08:38:39Araqzahary, the VM tracks every call to the new .magics
08:38:55Araqand these operations are replayed when the module is loaded from the cache
08:39:00zaharyAraq, we've disscussde point 4 before. It's an implementation detail and I've added it only because you are discussing such details above, but without mention this problem
08:39:21Araqwhether this comes from an instantiated static within a generic doesn't matter
08:39:32Araqit's a runtime tracking mechanism
08:39:52Araqonly if the VM actually runs such an instruction, its effects are recorded
08:40:04Araqit's a vm.nim, thing, not a vmgen.nim thing.
08:40:07Araqdoes that clear it up?
08:40:14zaharyThe Nim language bridge description is a relevant example. The side effect is introduced by using a certain type with a generic dot operator. This operator can be instantiated from multiple modules, but you need a single global variable mutation
08:40:32*floppydh quit (Remote host closed the connection)
08:40:52zaharySo, you need to keep track of the client instantiations in order to know when the generic is no longer instnatiated from anywhere
08:41:23*floppydh joined #nim
08:41:58AraqI don't see it this way.
08:42:12Araqwe have no "sealing" step, it's currently an explicit call
08:42:24Araqand this call uses 'static' which is tracked
08:42:33Araqand so in the replay it will be run again
08:43:09Araqside-stepping this whole issue, no?
08:43:10zaharywell, if this is all implemented I can probably play with it and file an issue that demostrantes what I mean
08:43:32Araqit's implemented, but needs way more testing
08:44:01Araqbut please explain it again now. :-)
08:44:14zaharyso far, I don't think what you described side-steps the issue
08:44:30Araqbut it does since we don't have a sealing step.
08:44:59zaharythere is a generic proc and it has a `static:` block inside. When I instantiate this generic proc from other modules, the static block will be executed exactly once, so far so good?
08:45:16zaharythat is, once per instantiation
08:45:26Araqwell yes
08:46:39zaharyok, these instantiations modify a compile-time var stored inside the module of the generic proc. Your first claim is that if I put `static:` block at the bottom of the module, it will see the modifications coming from generic instantiations (which happen only due to other modules using the generic proc)
08:47:15zaharyI'm not sure the above holds true under your current ideas, but let's assume it holds
08:47:15Araqno, I'm not claiming that
08:47:58Araqthe "bottom of the module" will see what has been added to the seq by the time Nim executes this statement
08:48:25Araqthere is no sealing step, not in today's Nim without the cache, not when the caching works
08:48:36zaharyOK, just to get to the end of it, let's now start imagining what happens when, one by one, these other modules are modified in a way that no longer instantiates the generic proc
08:49:07zaharyI'm saying that you would want to pull back the side effect of the generic only after the very last instantiation is removed, hence you need to keep a "refernce count" for the generic
08:50:03Araqbut that's not how it works, if you lose an entry in the seq due to recompilations, the static block gets executed with a changed seq
08:51:05zaharyso, to sum up, I believe we need something like the "sealing" step to implement such generative algorithms and we need the generic ref counting thing to make it work correctly. you can convince me otherwise by providing a working counter-example
08:51:33Araqwhat makes this more complex is that the static block itself gets recompiled because one of its depending modules got recompiled
08:51:56Araqif A depends on module B and B is changed, A is recompiled too.
08:52:21AraqI know you can do better than this by splitting it into conceptual interface/implementation sections
08:52:28Araqbut that's not yet part of my proposal.
08:52:33*xkapastel quit (Quit: Connection closed for inactivity)
08:52:56Araqso again, module B changes, module A contains the sealing, module A gets recompiled anyway
08:53:26Araqhowever, let's say module A depends on B and C and C didn't change.
08:53:42Araqthen we recorded C's entries to the CacheSeq and re-add them
08:55:53Araqalternatively, you have multiple sealings, A does seal but then B imports it and calls seal again. then the partial sealing would be overwritten without the chache and with the cache.
08:56:38zaharyyes, but aren't you missing the fact that the generic instantiation logic acts as a "memoization" guard. Under which module execution will you record the side-effect from the generic?
08:56:51PMunchAraq, ohh allIt seems to be it
09:00:34Araqwell iirc the instantation cache is attached to the PSym, it gets saved after the module has been compiled, then stuff is added that we miss in the cache but it is used from something and so eventually it ends up in the cache too and maybe this means the caching is less effective than before
09:01:31Araqwhich means I got the logic wrong for generics, but not for statics per se
09:02:21zaharyotherwise, as far as I can tell your suggestion is that I can put `static:` blocks at the bottom of my main that will act as "sealing" procs. this might work, I'll have to think about it, but I think we still need the notion of placeholder/partial symbols that I've described
09:02:56Araqyou can argue for an explicit sealing step but currently we don't have it
09:03:15zaharythis "sealing" from another module is not quite nice for libraries too - the library must export a proc that the users must call from their main module
09:03:22Araqand the cache cannot be affected by missing language features.
09:04:56Araq"as far as I can tell your suggestion is that I can put `static:` blocks at the bottom of my main that will act as "sealing" procs" this is not my suggestion, this is how Nim works today.
09:05:45Araqit's a messy API and it's why I like the 'stuff: long_block_here' solution better
09:05:59Araqas it's clear where 'stuff' ends
09:06:33Araqbut it means you have to have the full block in a single modul
09:06:37zaharyI keep coming up with problems with this approach. All placeholder symbols will have to be public in order to be sealed from another module
09:08:20Araqthat's just the old argument "macros are not as powerful as compiler plugins"
09:09:08Araqwhich I agree with but it also doesn't bother me much, sooner or later we will get there.
09:09:23zaharyit could be as simple as const foo = CacheCounter(seal = proc ...)
09:11:36Araqhow is that simple? I have no idea when to run the sealing step
09:11:56Araqafter the main module?
09:12:19zaharyat the end of sem, before transf
09:12:38*donlzx quit (Remote host closed the connection)
09:12:39zaharyas if it sits at the bottom of main, yes
09:14:10Araqwell the end of sem of the main module means plenty of transf / codegen steps have been executed
09:14:36zaharyyes, we need to introduce the whole program staged compilation as well
09:16:31Araqwell so much then for "it could be as simple as ..."
09:16:43Araq;-)
09:17:26zaharyYou are overestimating the complexity of this particular refactoring I think - I'm quite optimistic that it can be done quite quickly
09:18:04AraqI don't know why it has to run after sem but before transf
09:18:05zaharyit will unlock many other benefits - fix a number of bugs with the global pragma, enable parallel transf and codegen in the future, etc
09:18:34zaharywell, because transf is turning the code into lower-level AST and the seal step will produce higher-level AST
09:18:49Araqwe run method dispatcher generation after transf and nobody noticed
09:19:03zaharybecause the AST it produces is very simple
09:19:22zaharythe users would want to just produce anything they want
09:22:35*SenasOzys quit (Ping timeout: 240 seconds)
09:29:28*SenasOzys joined #nim
09:39:05*Electrux quit (Ping timeout: 260 seconds)
09:39:21*dddddd joined #nim
09:41:34*Electrux joined #nim
09:45:09Araqdifferent question, what do we do with .compileTime globals?
09:45:39Araqdeprecate them?
09:46:08Araqproduce a warning with if --incremental:on ?
09:46:29Araqchange them to only have module-wide lifetimes?
09:49:34yglukhovproduce a warning with if --incremental:on ? at least for transition period.
09:50:27yglukhovDoes anyone think that 80-chars/line in NEP-1 is a good idea?
09:51:26AraqI don't adhere to this rule :-)
09:51:44Araqbut some limit is ok as long as word wrapping continues to suck
09:52:15Araqmy limit is at 100 or something.
09:52:32PMunchDidn't realise what a monster this had become before I split it up, I think it might be time to create a type for this: http://ix.io/1cIN/
09:52:38Araqit continues to be practical when you have multiple windows side by side
09:53:18PMunchyglukhov, I like the 80-chars/line rule, but if it were to enter NEP-1 we need some rules on how to split
09:53:35nc-x[m]Is gitter-irc bridge not working? I don't see many of these messages on gitter.
09:53:51PMunchTake that tuple I just posted for example, should the ending brackets be on separate lines?
09:53:59yglukhovPMunch: it is in NEP-1 now
09:54:31PMunchWhen you have too many arguments to fit in one line, should you split just one argument off, or create a list out of them?
09:54:36PMunchOh it is?
09:55:03yglukhovok. does anyone think removing 80 chars rule from NEP-1 is a good idea?
09:56:30PMunchWell as I said, I like it
09:57:01PMunchIf for nothing else it makes splitting the monitor in two easier
09:57:09PMunchFor example for doing a vimdiff
09:57:41PMunchOr just opening the same code in two views to look at your types while you program
10:01:35yglukhovWell, yes, but 80chars limit makes your code even less readable when 80 chars don't fit and soft wrapping kicks in.
10:06:58*SenasOzys quit (Ping timeout: 264 seconds)
10:09:22PMunchOf course, but that's soft-wraps fault..
10:10:03PMunchIf we have 80 chars/line in NEP-1 people will want to write shorter lines, meaning that soft-wrapping should be unnecessary
10:12:29*crem quit (Ping timeout: 256 seconds)
10:13:18*crem joined #nim
10:21:32*Electrux quit (Ping timeout: 276 seconds)
10:22:59*Electrux joined #nim
10:26:12yglukhovPMunch: unfortunately 80 chars limit tells people not to write shorter lines, but to hard-wrap longer lines
10:38:35*cspar quit (Ping timeout: 265 seconds)
10:45:11PMunchWell hard-wrapping is better than soft wrapping
10:45:29PMunchWith a hard wrap a human decides where the breaks are, making them probably read better than soft-wrap lines
10:45:47PMunchWhich is why I mentioned that we should have guidelines for wrapping
10:50:49yglukhovYes, so my point is. When there's a 80-chars hard-wrapped text and it doesn't fit (have 3 splits on 13" monitor), then the soft wrap kicks in, and makes it a total disaster. Much worse than if the lines weren't hard-wrapped in the first place. If that makes sense.
10:52:44Araqwell sure but the assumption is that 80 chars means no tool wrapping kicks in
10:53:26yglukhovOn the other hand, reading soft-wrapped code is a useful skill worth learning. I personally don't find soft-wrapping a lot worse than hard-wrapping.
10:54:01*endragor_ joined #nim
11:06:20federico3https://forum.nim-lang.org/t/3897 huh? compilation should not be faster using ramfs unless there are unnecessary disk flush being done.
11:07:04*SenasOzys joined #nim
11:13:45PMunchyglukhov, ah. You were talking about hard and soft wrapping at the same time.. Well yeah that's going to be a pain. But at that point an all soft-wrapped text probably wouldn't read much better if you had really long lines.
11:19:00zaharyFromGitter is not here, does it need to be invited back somehow?
11:29:05Araqdunno
11:32:16couven92can we generate C++ for LLVM? (Does LLVM support C++?) :O
11:36:01PMunchThis might be worth looking at couven92 https://github.com/arnetheduck/nlvm
11:46:07*ftsf joined #nim
11:55:07Araqcouven92, sure, see also https://github.com/nim-lang/Nim/issues/7870
11:55:43couven92Araq, cool... was just curious :P
11:55:50*ftsf quit (Quit: Leaving)
11:56:19*endragor_ quit (Remote host closed the connection)
11:59:20*endragor joined #nim
12:02:47Yardanicooprypin, if you have some time, can you please see why FromGitter isn't working?
12:03:58*endragor quit (Ping timeout: 264 seconds)
12:15:13*endragor joined #nim
12:19:29*endragor quit (Ping timeout: 255 seconds)
12:26:02*endragor joined #nim
12:30:12*elrood joined #nim
12:30:27*endragor quit (Ping timeout: 240 seconds)
12:36:50*endragor joined #nim
12:41:56*endragor quit (Ping timeout: 276 seconds)
12:44:11*endragor joined #nim
12:58:38*endragor quit (Ping timeout: 260 seconds)
13:00:27*Electrux quit (Quit: WeeChat 2.1)
13:13:43*nsf quit (Quit: WeeChat 2.1)
13:25:49*endragor joined #nim
13:28:34*noonien joined #nim
13:39:50*couven92 quit (Quit: Client disconnecting)
13:41:36YardanicoWe're at https://github.com/nim-lang/Nim/issues/7999, waiting for /8000 :P (count is shared between pulls and issues on GitHub)
13:42:15*endragor quit (Ping timeout: 265 seconds)
13:43:35*yglukhov_ joined #nim
13:46:56*yglukhov[i] quit (Ping timeout: 276 seconds)
13:52:08*floppydh quit (Quit: WeeChat 2.1)
14:02:56*endragor joined #nim
14:07:36*sz0 quit (Quit: Connection closed for inactivity)
14:08:10*miran joined #nim
14:24:15*xkapastel joined #nim
15:00:21*rockcavera quit (Ping timeout: 264 seconds)
15:03:08*rockcavera joined #nim
15:09:48*kinkinkijkin joined #nim
15:13:10*SenasOzys quit (Ping timeout: 245 seconds)
15:15:36*TechAspirer joined #nim
15:15:50TechAspirerJust here because the Gitter bridge is down
15:16:08*rockcavera quit (Remote host closed the connection)
15:17:00TechAspirerYardanico: I'm already here
15:17:03TechAspirerI started on IRC
15:17:09YardanicoTechAspirer, this IRC is a bit dead today
15:17:16TechAspirerI've just... grown out of it as more stuff has come up
15:17:21Yardanicono conversations in 3 hours :)
15:17:24TechAspirerI've tolerated Gitter because it's better
15:17:28TechAspirerI prefer Discord
15:17:37TechAspirerAnd then most of my circles are on Slack
15:17:55YardanicoIt's not really better because Gitter is only for GitHub projects (maybe GitLab too, idk)
15:18:05Yardanicoand there's tons of channels on IRC
15:20:54TechAspirerGitter isn't just GitHub
15:21:06TechAspirerYou can create an Org/Rooms with no repo
15:21:15TechAspirerBut its login is GitHub/Twitter only
15:21:34TechAspirerAnd my complaint isn't with channels, it's with the chat service
15:21:56TechAspirerIRC is text only, no multi-room. Gitter is text/images/video/code with rooms (poorly done)
15:22:50TechAspirerDiscord is text/voice, with video and screen sharing in private calls, text/images/video, no GitHub formatting but yes to code highlighting (via ```js ``` or whatever language)
15:23:07Yardanicobut IRC is more popular than Gitter I would say
15:23:17Yardanicoand I don't think that Discord is really the best choice for programming communities :)
15:23:23AraqTechAspirer, IRC is what Nim began with and so we have these bridges
15:24:02TechAspirerAraq: I'm not complaining at all! Or suggesting we change it up. I'm saying I don't use IRC anymore because I personally have found better solutions.
15:24:30TechAspirerYardanico Gitter wasn't really better so I was just explaining myself
15:24:44TechAspirerBTW. KayabaNerve from Gitter here.
15:24:54TechAspirerI think Yardanico got that...
15:28:34*rockcavera joined #nim
15:31:51*nsf joined #nim
15:35:49AraqTechAspirer, yeah I figured
15:42:50*SenasOzys joined #nim
15:52:37*Trustable joined #nim
16:32:42*PMunch quit (Quit: Leaving)
16:40:04*icebattle quit (Quit: leaving)
16:41:02*icebattle joined #nim
16:50:11kinkinkijkinwhat again is the tuple constructor? just ()?
16:53:15oprypinYardanico, I will look into gitter bridge in around 1 hr 30 min
17:02:47*endragor quit (Remote host closed the connection)
17:12:05yglukhovmatrix seems to have native integration for gitter and irc. how about switching to it?
17:16:00TechAspirerIt's not native
17:16:01TechAspirerhttps://github.com/matrix-org/matrix-appservice-gitter
17:16:11TechAspirerIt's selfhosted but offered directly from Matrix
17:16:16TechAspirerUnless you mean a different one
17:31:06yglukhovTechAspirer: i'm currently writing this through matrix client. I'm not sure how it works.
17:32:20yglukhovIn the same client i've got gitter channel.
17:32:57yglukhovSo I'm guessing matrix.org has publicly available gitter/irc bridges. I might be missing something ofc.
17:33:14shashlickya i've used riot.im and it is pretty cool. off late i'm quite happy with my weechat setup
17:33:55shashlickTechAspirer: you can log into #nim or through gitter with riot.im so it's a great client to do that
17:35:10yglukhovIs it just riot? Or any matrix client?
17:42:51TechAspirerBut is it bridging to Matrix or just logging under Matrix?
17:43:03Yardanicobridging to Matrix, yglukhov is on Matrix
17:43:17TechAspirerBut that's an IRC username
17:43:39TechAspirer<yglukhov> Not <MatrixBridge> yglukhov:
17:43:43Yardanicomatrix allows that
17:43:53TechAspirerYeah
17:43:59YardanicoYou can communicate via freenode's NickServ
17:44:03TechAspirerIt's not bridged to a Matrix/Riot channel
17:44:05*endragor joined #nim
17:44:13Yardanicobut matrix is bridged to IRC :)
17:44:15TechAspirerHe's just logging into freenode via the Riot client
17:44:25Yardaniconot really
17:44:35Yardanicothe matrix-freenode bridge server does this
17:44:39yglukhovi'm everywhere, actually :) but yeah, you can change your irc name through matrix service.
17:44:42Yardanicohe doesn't *directly* connect to vscode
17:45:00TechAspirerIs there a Matrix Nim channel
17:45:08TechAspirerDo my messages here appear there
17:45:13TechAspirerThat's a bridge
17:45:36kinkinkijkinnot necessarily
17:45:43TechAspirerCan I connect to Gitter from within my IRC client and talk on both Gitter and IRC, even though talking on 1 doesn't cause my messages to be forwarded to the other?
17:45:48TechAspirerThat's just connecting with the same app
17:45:53kinkinkijkina bridge can be anything that connects two services
17:46:12TechAspirerAnd then if only your messages are forwarded... I'll call it 50/50
17:46:30TechAspirerI know
17:46:37TechAspirerBut it sounds like he's connected to both
17:46:44TechAspirerBut both aren't connected to each other
17:47:02TechAspirerSounds like a Multi-Client, not a bridge
17:47:45kinkinkijkinnah, matrix can connect to irc and gitter
17:47:51kinkinkijkinafaiu
17:47:52Yardanicoyeah, you only need one client
17:48:00yglukhovTechAspirer. Well Riot is not a multiclient. It's a matrix-only client, as far as i understand.
17:48:17YardanicoYeah, it is, and you can actually join to IRC/gitter channels via other matrix clients too
17:48:31shashlickTechAspirer: join here - https://matrix.to/#/#freenode_#nim:matrix.org
17:48:59TechAspirerThats a proxy though
17:49:00TechAspirerNot a bridge
17:49:06TechAspirerA bridge REQUIRES two entities
17:49:10TechAspirerAs in two channels
17:49:24TechAspirerThat's just a connection to the channel available via Matrix
17:49:34shashlickyes, so what are you trying to accomplish?
17:49:38Yardanicook, let's stop discussing that here :)
17:49:43Yardanicolet's move to #nim-offtopic maybe
17:49:53kinkinkijkinwhat again is the tuple constructor?
17:50:44Araq()
17:50:49kinkinkijkinthank
17:51:55Yardanico!eval import typetraits; let a = (1, 2, 3); echo type(a)
17:51:58NimBot(int, int, int)
18:16:02*MatrixBridge joined #nim
18:16:05*MatrixBridge left #nim ("User left")
18:26:52*icebattle quit (Ping timeout: 256 seconds)
18:34:54*FromGitter joined #nim
18:34:54FromGitter<matrixbot> `yglukhov` hello from matrix...
18:35:00Yardanicohi :D
18:36:15FromGitter<matrixbot> `yglukhov` well... looks like it works :)
18:37:13oprypinHi people,
18:37:14oprypinduring this day the Gitter <-> IRC bridge was not working, so your messages were not relayed.
18:37:33FromGitter<oprypin> Now it is back
18:37:57FromGitter<kayabaNerve> Thanks @oprypin
18:38:05FromDiscord<Kayaba> And now Discord is back!
18:38:14FromDiscord<Kayaba> Celebrate the Discord!
18:41:10Yardanicowhat do you mean "it's back"? it was online the whole time :)
18:41:15Yardanico@oprypin thanks a lot
18:41:20FromDiscord<Kayaba> Not to Gitter
18:41:23Yardanicoah
18:41:26FromDiscord<Kayaba> I use Gitter/Discord
18:41:41FromDiscord<Kayaba> And I only joined IRC because I'm using it for Tomu and Gitter's Bridge collaprsed
18:41:43FromDiscord<Kayaba> And I only joined IRC because I'm using it for Tomu and Gitter's Bridge collapsed
18:43:20*gangstacat quit (Ping timeout: 276 seconds)
18:45:50*kinkinkijkin left #nim ("Leaving")
18:48:59*gangstacat joined #nim
18:50:01TechAspirerTomu would work on an embedded ARM board, right?
18:50:01*yglukhov_ quit (Read error: Connection reset by peer)
18:50:13TechAspirerIf I use the tactics from nimkernel?
18:50:21*endragor quit (Remote host closed the connection)
18:50:23TechAspirerWe're talking a M3 board with no OS btw.
18:50:30TechAspirerNot an RPi
18:51:28TechAspirer*Nim would work on
18:51:39TechAspirerSorry. Name of the board is Tomu. Freudian slip.
18:52:54FromGitter<kinkinkijkin> I mean, you'd need to use some asm but I don't see why not
18:53:10TechAspirerIt supports C
18:53:11FromGitter<kinkinkijkin> it compiles through c/c++ and both support ARM embedded explicitly
18:53:28TechAspirerhttps://github.com/kayabaNerve/LTE/blob/master/samples/fruitGuesser/main.c
18:53:44TechAspirerHere's what I'm working with right now. I'm just trying to see if I'm missing anything
18:54:13FromGitter<kinkinkijkin> I don't know embedded, I do userland software only
18:54:58FromGitter<kinkinkijkin> well, I do work implementing the userland but I still need the kernel to, like, exist
18:55:00TechAspirerAlright. Thanks anyways. I'll just go run commands until something works or it catches on fire
18:55:17*yglukhov[i] joined #nim
18:55:17FromGitter<kinkinkijkin> nah wait until someone more knowledgable comes around
18:57:39TechAspirer--gc:none --compileOnly
18:58:00TechAspirerThat may be it... kinkinijkin I have the board right in front of me and testing won't harm it
18:58:07*jlhouchin joined #nim
19:01:56Araq--gc:regions is usually more useful because the full stdlib works with it
19:02:05Araqthat's a secret ;-)
19:02:23Araq"omg, does that mean ALL of Nim works without GC?!" yes.
19:02:44Yardanicoyou're doing very crazy things in your secret lab
19:03:24TechAspirerThanks Araq
19:04:02AraqTechAspirer: no OS is more challenging though. we actually have a way to get a heap without an OS
19:05:04TechAspirerIt does have the stdlib
19:05:07TechAspirerAnd a bootloader
19:05:14TechAspirerIt just doesn't have an OS
19:05:19Yardanicodom96, are you around? if so, can you please go into telegram and add a bot to Nim channel?
19:05:28Araqyou mean C's stdlib? does it have malloc()?
19:05:34TechAspirerYeah
19:05:38dom96Yardanico: okay, but how?
19:05:41TechAspirerThe whole stdlib header
19:05:43TechAspirerAnd cstring
19:05:45TechAspirerAnd all that
19:05:54TechAspirerBut no functioning stdio
19:06:02Araqinteresting
19:06:03TechAspirerIt's like an Arduino
19:06:11*CodeVance joined #nim
19:06:12*dom96 wonders who TechAspirer is
19:06:16TechAspirerBut with no standard Arduino headers. Just a horrible M3 lib
19:06:19Yardanicodom96, kayabaNerve from gitter
19:06:21TechAspirerdom96: KayabaNerve
19:06:24TechAspirerThanks Yardanico `
19:06:32dom96Bah, keep your nicks consistent :P
19:06:39Yardanicodom96, just go into personal messages with @matrix_t2bot, click on his name and then you can press "add to group"
19:06:42TechAspirerI'm writing Arduino like libs for it
19:06:46Yardanicobut it may depend on your telegram client
19:06:54TechAspirerNow you don't need to config GPIO! Just call turnGreenLedOn()
19:07:12dom96Yardanico: Why am I adding this?
19:07:31TechAspirerhttps://github.com/im-tomu/tomu-quickstart/blob/master/miniblink/miniblink.c -> https://github.com/kayabaNerve/LTE/blob/master/samples/fruitGuesser/main.c
19:07:32Yardanicodom96, it's a matrix-telegram bridge, and also yglukhov asked for it :)
19:08:01TechAspirerSo now I'm trying to get Nim on it because C is annoying as hell
19:08:23dom96To be honest, I don't think we should be adding more bridges
19:08:35Yardanicodom96, well, it won't be connected to IRC
19:08:35TechAspirerdom96: Bah, I had this nick before I got the other one
19:08:42*CodeVance quit (Read error: Connection reset by peer)
19:08:52TechAspirerAnd I bought your book so I'm pretty sure I now own stock in your life or something
19:08:59Yardanico:D
19:09:12YardanicoTechAspirer, tbh I didn't see this nickname before today
19:09:23TechAspirerYardanico: I haven't used it here
19:09:26Yardanicoah, ok
19:09:26*CodeVance joined #nim
19:09:28TechAspirerBut check the NickServ registration
19:09:31TechAspirerShould be a year ago
19:09:55TechAspirer50.5 weeks
19:09:59TechAspirerI used it with Liberland
19:10:51TechAspirerAnd switched to kayabaNerve when I made my GitHub because I made it primarily to control an org that was a successor to a group called Nerve. I went by kayaba in that group. Kayaba was taken on GitHub.
19:11:16TechAspirerAnd you only see me on Gitter (GitHub)/and the Discord bridge where I am just Kayaba
19:11:54elroodTechAspirer, does your tomu board actually feature an M3 or an M0+ as advertised on its crowdsupply page?
19:12:00Araqbtw v1, v1.1, v2 milestones have arrived
19:12:34TechAspirerelrood: EFM32 IIRC
19:12:37Araqand are reasonably complete afaict
19:12:41TechAspirerWhich is a Cortex M3
19:12:48FromGitter<kaushalmodi> @mratsim FYI https://github.com/nim-lang/Nim/pull/8001, the renewed isUpper/isLower PR is up.
19:12:50TechAspirerBut I wouldn't be surprised if M0+ is an alias to M3
19:13:07TechAspirerARM6 is equivalent to ARMv11 some bs
19:14:15Yardanicohttps://github.com/nim-lang/Nim/pull/8000 :)
19:14:18Yardanico(number)
19:14:48TechAspirerhttps://en.wikipedia.org/wiki/ARM11 ARM11 introduced architectural version 6. ARM11 = ARMv6
19:15:03TechAspirerYardanico: And it wasn't an issue!
19:15:05TechAspirerNice
19:15:06FromGitter<kaushalmodi> yeah, I missed by 1 :)
19:15:42YardanicoTechAspirer, it doesn't matter :)
19:15:52YardanicoGitHub automatically redirects issues to pulls (if they're actually pulls)
19:15:53Yardanicoexample: https://github.com/nim-lang/Nim/issues/8000
19:16:04TechAspirerYardanico: Would you like #8000 to be an issue with the project or the project moving forward?
19:16:14TechAspirerYeah but it was an actual pull
19:16:17TechAspirerNot an actuall issue
19:16:22YardanicoTechAspirer, yeah, I know
19:20:57*endragor joined #nim
19:22:18*icebattle joined #nim
19:22:46TechAspirerQuestion for whoever thinks they can handle it
19:23:35TechAspirerIf a C function is expecting a void function ptr, as such `void (*runArg)()`, how do I declare that when importing it and how do I pass a Nim proc?
19:24:51TechAspirerJust do cast[pointer](addr procName) for passing it?
19:25:00TechAspirerAnd runArg: pointer for declaring the argument?
19:25:38Araqnah, type Callback = proc () {.cdecl.}
19:25:55AraqtakesCallback(myNimProc) # no addr, no casts
19:26:15TechAspirerThanks
19:26:18Araqwhere proc myNimProc() {.cdecl.} = ...
19:26:28TechAspirerCool. Thanks Araq
19:28:30Araqyou can avoid the 'type' declaration but it usually makes code slightly harder to read
19:31:59TechAspirerIt's easy enough to keep it
19:32:37TechAspirerI'm building a proof of concept with all my importcs in the main file versus their own headers. I'm really excited to be able to use Nim's NOT EVERYTHING IS EXPORTED import scheme
19:32:44TechAspirerIt's really pissing me off with C...
19:33:39Araqwell there is 'static' in C but it's a bit verbose :-)
19:35:12elroodyou can instruct your linker on what to export, but that's admittedly a bit more involved than just writing c code
19:35:15TechAspirerThis is valid, right? while (line = cReadSerial()) != nil:
19:35:41TechAspirerAraq: yeah but that can cause high RAM usage
19:37:14Araqnah, assignments produce 'void' so you can't write it this way
19:37:46TechAspirerGot it
19:40:39*endragor quit (Ping timeout: 256 seconds)
19:54:23*jlhouchin1 joined #nim
19:55:02*jlhouchin left #nim (#nim)
19:56:07*jlhouchin1 left #nim (#nim)
19:56:36*jlhouchin1 joined #nim
19:57:07*jlhouchin1 left #nim (#nim)
19:59:03*jlhouchin joined #nim
20:02:06*CodeVance left #nim (#nim)
20:07:36*endragor joined #nim
20:16:11*CodeVance joined #nim
20:20:30CodeVanceIs this behaviour correct? Notice on line 12 how you should skip a [0] This isn't how it used to work (all the old examples didn't use it) And its unclear when this changed
20:20:36CodeVancehttps://gist.github.com/CodeDoes/f9dc5d9fc742743842cdc1a33ee915ab
20:20:42TechAspirerI got Nim up on the Tomu
20:23:10*endragor quit (Ping timeout: 264 seconds)
20:33:26FromGitter<yglukhov> @TechAspirer what's Tomu?
20:33:50FromGitter<kayabaNerve> A small Arm board that fits into your USB port
20:34:22yglukhovnice. is it bare metal?
20:35:38yglukhovor does it have an os?
20:35:53FromGitter<matrixbot> `dom96 on Freenode` what's the gitter?
20:36:24FromGitter<Yardanico> wait what?
20:36:44FromGitter<Yardanico> you're connected to matrix from irc, and to gitter from matrix?
20:38:08FromGitter<matrixbot> `yglukhov[i] on Freenode` sorry guys, i'm now messing with matrix. so the bridges may look a bit crazy...
20:38:10FromGitter<matrixbot> `dom96 on Freenode` hmmmm
20:38:12FromGitter<kayabaNerve> yglukhov: C STDLIB, no OS
20:38:21FromGitter<matrixbot> `dom96 on Freenode` Are you following a guide for this?
20:38:25FromGitter<matrixbot> `dom96 on Freenode` I'm curious how you're achieving this
20:38:59FromGitter<kayabaNerve> dom96: Tomu or Matrix Bridge?
20:39:12dom96I'm not setting this up
20:39:51FromGitter<kayabaNerve> :/ You asked "Are you following a guide" and said you were curious. Which of the 2 conversations are you referring to.
20:39:59*Vladar quit (Quit: Leaving)
20:40:13dom96yglukhov is setting up a bot and I was writing in a different channel
20:40:17FromGitter<kayabaNerve> Got it
20:40:38FromGitter<yglukhov> ok, i'll disconnect matrix for now to avoid the confusion :)
20:49:51*endragor joined #nim
20:53:00AraqCodeVance, what is wrong with it?
20:53:07Araqwhere is the weirdness?
20:54:45CodeVanceAraq: the other examples used typeDecl[0][0][2][0][2] not typeDecl[0][2][0][2]
20:55:04CodeVanceWhich if you look at the first ast is what you'd expect
20:55:10CodeVanceBut something changed
20:58:20dom96nnkStmtList?
20:58:53FromDiscord<tsquar3d> Does anyone use nim for microcontroller programming?
20:59:25*miran quit (Ping timeout: 245 seconds)
21:03:14federico3tsquar3d: yep - what's your question?
21:03:34FromDiscord<tsquar3d> That's literally my question. I didn't know if it was possible -- or done.
21:05:06CodeVancedom96: `var typeDecl: NimNode`
21:05:27CodeVancehttps://gist.github.com/CodeDoes/ba9324de33a0be48195019e3617ec579
21:09:53Araqwell I know we changed that *again* in devel because of reasons
21:10:25Araqso you can 'git log -p compiler/vmdeps.nim'
21:11:03dom96tsquar3d: everything is possible with Nim :)
21:14:51federico3tsquar3d: it works even on tiny micros like attiny85
21:16:34*endragor quit (Ping timeout: 264 seconds)
21:21:12FromGitter<kayabaNerve> Can I have panicoverride in the non-project root directory?
21:21:16FromGitter<kayabaNerve> And can it solve my anxiety?
21:21:52Araqwhat is a non-project root directory?
21:22:57FromGitter<kayabaNerve> project/main.nim
21:23:02FromGitter<kayabaNerve> project/panicoverride.nim
21:23:14FromGitter<kayabaNerve> Can I move panicoverride.nim to ../include ?
21:23:31FromGitter<kayabaNerve> I tried that and used the compiler --include switch and now it can't find my panicovveride
21:24:53FromGitter<kayabaNerve> But I don't want it in my root directory. I want it in my include folder which has the rest of Nim so the root directory is just main.nim.
21:26:10FromGitter<kayabaNerve> The only places I can find any sort of docs is a statement I need it on the compiler page, Dom's nimkernel, and Nim on arduino (which both have it in the root)
21:26:15FromGitter<kayabaNerve> The manual doesn't even cover it
21:28:24Araqthat's not what --include does
21:28:41dom96"When the docs don't cover it, it's time to dive into the source code" -- Dominik Picheta
21:29:33*Shivelight joined #nim
21:30:32FromGitter<kayabaNerve> Oh. Single module. Not folder
21:30:55FromGitter<kayabaNerve> I want --path... I think
21:31:43FromGitter<kayabaNerve> Still doesn't solve panicoverride though
21:32:01FromGitter<kayabaNerve> dom96: Sounds like work but I'm doing it
21:32:49FromGitter<kayabaNerve> `when hostOS == "standalone": ⏎ include "$projectpath/panicoverride"` Guess I'm screwed
21:34:29dom96next step is to create a PR :)
21:35:58FromGitter<kayabaNerve> dom96 yeah yeah... I'll likely do to it. First I'm finishing up my work on porting Nim to Tomu though
21:38:18*jjido joined #nim
21:43:16*yglukhov[i] quit (Ping timeout: 268 seconds)
21:43:18*endragor joined #nim
21:45:05dom96what's Tomu?
21:51:56CodeVancehttps://tomu.im/
21:52:08CodeVanceA tiny arm processor that fits on your usb
21:52:22CodeVanceusb port
21:52:33*yglukhov[i] joined #nim
21:53:31FromGitter<kayabaNerve> Yep
21:56:58*skrylar joined #nim
21:58:25dom96oooh
22:01:39dom96$30 for one of those is a bit steep though
22:03:10FromGitter<kaushalmodi> what is the more correct way of writing `case` statements? I found that the syntax is strangely loose for this specific *case* :) All of the below work: ⏎ ⏎ ```case true ⏎ of true: ⏎ echo "1" ⏎ else: ⏎ echo "0"``` ⏎ ⏎ {colon at end of case} x {indented of} [https://gitter.im/nim-lang/Nim?at=5b1afd1d6077c67d3edc29cd]
22:04:40FromGitter<kayabaNerve> dom96: I paid $60 for 5
22:05:02dom96kayabaNerve: what are your plans for them?
22:05:08FromGitter<kayabaNerve> Is there a way to stop my main.c generated file from including headers the imported Nim modules include?
22:05:23FromGitter<kayabaNerve> Because I have header guards but the linking on this is... messy
22:05:43dom96kaushalmodi: the first is the one-true-way
22:06:07FromGitter<kayabaNerve> And because my Nim modules include the headers, and the generated versions do, but also the generated main.c, I'm getting errors
22:06:17dom96All of these permutations are possible because somebody once complained that it's inconsistent to not be able to indent the 'of' branches
22:06:17FromGitter<kayabaNerve> dom96: No idea. I'm keeping at least 3, giving 1 to a friend
22:06:27dom96so Araq made it possible to have a ':' after the 'case'
22:06:33FromGitter<kayabaNerve> Building up a standard lib. Getting Nim up on it.
22:06:35dom96and now we have people wondering how to write it
22:06:37dom96yay
22:08:34FromGitter<kaushalmodi> hehe, may be that person was like me.. I find the the second way correct. But I will add that first style in my notes.
22:08:54FromGitter<kayabaNerve> dom96 Any idea on those headers btw?
22:09:36*NimBot joined #nim
22:10:21dom96kayabaNerve: Not aware of any ways to do that.
22:10:35*rockcavera quit (Remote host closed the connection)
22:10:40FromGitter<kayabaNerve> Yeah. It's the linking of this...
22:10:46FromGitter<kayabaNerve> Thanks anyways
22:10:53FromGitter<kayabaNerve> I'll go yell in the Tomu channels
22:11:35*endragor quit (Ping timeout: 240 seconds)
22:14:33*elrood quit (Quit: Leaving)
22:16:07*Trustable quit (Remote host closed the connection)
22:27:18*noonien quit (Quit: Connection closed for inactivity)
22:30:28*rockcavera joined #nim
22:38:49*endragor joined #nim
22:39:56FromGitter<kinkinkijkin> I have an idea to implement an arbitrary looping and loop-nesting system in minimum resources for my music compiler but I don't know how to do it
22:40:39FromGitter<kinkinkijkin> the idea is to make a type that can contain a list of tuples of arbitrary types and can include a tuple containing its own type
22:41:19FromGitter<kinkinkijkin> then just feed that into the compiler
22:41:27*CodeVance quit (Ping timeout: 240 seconds)
22:41:52FromGitter<kinkinkijkin> instead of doing what I was doing before (unrolling loops)
22:43:38FromGitter<kinkinkijkin> but I have no idea how to do it
22:58:02FromGitter<kayabaNerve> ASTs?
22:59:54*nsf quit (Quit: WeeChat 2.1)
23:03:35*yglukhov[i] quit (Ping timeout: 240 seconds)
23:06:40FromGitter<kinkinkijkin> I'm not quite sure
23:06:44FromGitter<kinkinkijkin> that seems like what I want
23:07:52*CodeVance joined #nim
23:08:27*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:08:57*endragor quit (Ping timeout: 245 seconds)
23:13:39*dddddd quit (Remote host closed the connection)
23:22:17*jjido joined #nim
23:28:37*yglukhov[i] joined #nim
23:32:30*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:33:43*xkapastel quit (Quit: Connection closed for inactivity)
23:34:35*Snircle joined #nim
23:34:37*kinkinkijkin joined #nim
23:36:19*endragor joined #nim
23:38:33*Snircle quit (Client Quit)
23:39:18*Shivelight quit (Quit: Connection closed for inactivity)
23:44:30FromGitter<Varriount> @kinkinkijkin are the number of arbitrary types limited?
23:44:44FromGitter<Varriount> What are you going to do with them?
23:45:33kinkinkijkinit will contain an ordering pointer, a repeat counter, and the actual data being interpreted
23:46:00kinkinkijkinthe data being interpreted can be a single piece of data or another one of these objects, signifying a nested loop
23:47:05kinkinkijkinthe amount of tokens in each piece of interpreted data can be any amount
23:55:13*cspar joined #nim
23:58:25*krux02 joined #nim
23:58:56*yglukhov[i] quit (Ping timeout: 256 seconds)
23:58:58*jlhouchin1 joined #nim