00:22:39 | * | owl_000 joined #nim |
00:42:13 | * | abm quit (Quit: Leaving) |
01:02:20 | FromGitter | <deech> `nim-mode` still freezes `emacs` for 10s of seconds while waiting for a suggestion from `nimsuggest`. I can confirm that `nimsuggest` is running. |
01:02:35 | FromGitter | <deech> This is the most recent version of `nim-mode` from Git. |
01:30:44 | * | wildtrees quit (Quit: Leaving) |
01:38:54 | FromGitter | <deech> Hmm. Apparently the README for `nim-mode` warns of this as `nimsuggest-mode` is still considered alpha. What does the VSCode Nim plugin use? Apparently it works better. |
01:41:20 | * | ng0_ joined #nim |
01:43:56 | * | ng0 quit (Ping timeout: 260 seconds) |
01:58:02 | FromDiscord_ | <Shield> @exelotl I played a bit with your snippet and I'm still amazed that it works, but isn't that wasteful especially on GBA? |
02:00:38 | FromDiscord_ | <Shield> I tested it with objects bigger than bytes array and it indeed truncates |
02:03:28 | FromDiscord_ | <Shield> I'm not sure if it's still writing past the array tho |
02:04:04 | FromGitter | <iffy> Can I define a generic where the general thing has to conform to a concept? For instance: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d648f944b1189084e6e93bf] |
02:04:15 | FromGitter | <iffy> I feel like I read about combining generics and concepts somewhere, but now I can't find it |
02:54:42 | * | fjellfras joined #nim |
02:59:32 | FromGitter | <brentp> does anyone know where this sort alg comes from: https://rosettacode.org/wiki/Sorting_algorithms/Quicksort#Nim ? it has a weird pivot. but it is 3x faster than algorithm.sort. I assume that's because it's avoiding function calls? |
03:02:08 | FromGitter | <mratsim> I'm pretty sure most of those stuff were written by def |
03:03:57 | FromGitter | <mratsim> mmmh, I wonder why algorithm.sort is a closure ... |
03:04:26 | FromGitter | <mratsim> can't help you, I'm not a sort specialist but it seems like in algorithm it's using merge sort and not quicksort? |
03:07:37 | FromGitter | <brentp> ok. thanks. yes. docs indicate mergesort. |
03:28:23 | * | rockcavera quit (Remote host closed the connection) |
03:35:36 | * | dddddd quit (Read error: Connection reset by peer) |
03:37:23 | * | darithorn quit (Read error: Connection reset by peer) |
03:47:13 | * | chemist69 quit (Ping timeout: 276 seconds) |
03:48:44 | * | chemist69 joined #nim |
03:56:50 | FromGitter | <Obround> How do you call a `type`'s method in another `type` method? For example, like in python: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d64aa02a080d70ab589e3d5] |
04:03:27 | * | nsf joined #nim |
04:06:50 | * | ng0_ quit (Remote host closed the connection) |
04:06:50 | * | laaron quit (Remote host closed the connection) |
04:07:37 | * | laaron joined #nim |
04:08:17 | * | ng0_ joined #nim |
04:08:22 | * | alexander92 quit (Ping timeout: 245 seconds) |
04:25:13 | FromGitter | <mratsim> I don't understand, in your example there is no other type |
04:27:20 | FromGitter | <mratsim> ```code paste, see link``` ⏎ ⏎ ^ @Obround [https://gitter.im/nim-lang/Nim?at=5d64b128e403470ab6e2ce11] |
04:27:54 | FromGitter | <mratsim> pro tip, calling your methods meth might bring the law enforcement to your door ;) |
04:29:50 | owl_000 | maybe he is trying to say calling other method, in meth_one he called add_x_y() |
04:32:21 | * | leorize quit (Quit: WeeChat 2.5) |
04:37:19 | FromGitter | <Varriount> @mratsim Have you tried the new runtime at all? How is it? |
04:43:15 | * | endragor joined #nim |
04:44:52 | FromGitter | <mratsim> I did but it was dead on arrival for me: https://github.com/nim-lang/Nim/issues/11882 https://github.com/nim-lang/Nim/issues/11844 |
04:44:57 | FromGitter | <mratsim> didn't retry yet |
04:46:38 | FromGitter | <mratsim> next would be implementing the Project Picasso in proper Nim (and not just raw C port) - https://github.com/mratsim/weave/tree/master/e04_channel_based_work_stealing |
04:46:51 | owl_000 | how to insert value in seq, though i guessed it correctly seq.insert do the work. but where is the documentation. the contents about seq in tut1, nim by example and nim manual are exetremly short. it should be brief. |
04:47:46 | FromGitter | <mratsim> I would have a couple of nice self contained data structure to test new runtime with: a generic object pool for channels, tasks, and 2 kinds of queues |
04:47:59 | FromGitter | <mratsim> and also those data structure |
04:48:22 | FromGitter | <mratsim> and futures, which should only be moved but never copied. |
04:48:29 | FromGitter | <mratsim> so also interesting use case |
04:49:16 | FromGitter | <mratsim> owl_000, assuming you have a seq @[1, 2, 3] and a value 4, what do you mean by inserting 4 in a seq? |
04:49:47 | FromGitter | <mratsim> appending at the end, overwriting an existing value, or inserting in-between 2 values? |
04:50:29 | FromGitter | <mratsim> the doc is here: https://nim-lang.org/docs/system.html#system-module-seqs |
04:51:21 | owl_000 | thanks for the link. insert insert value at given index |
04:59:36 | owl_000 | as a new nim user i can't find that because it is inside docs>core>system (i have to know it before). i used search in the docs, but the search result is quite irrelevent. there are some rooms for improvement. atleast the search system. |
05:00:35 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
05:01:00 | * | laaron joined #nim |
05:04:25 | * | narimiran_ joined #nim |
05:11:06 | FromGitter | <mratsim> The index of all nim proc is here: https://nim-lang.org/docs/theindex.html |
05:11:37 | FromGitter | <mratsim> Complain to @narimiran for docs improvement. |
05:12:36 | FromGitter | <mratsim> Ideally we should have something like Algolia for search across the whole Nim docs + tutos + forum I think |
05:15:20 | FromDiscord_ | <DeltaPHC> What would be really handy is if you could list procedures by type |
05:15:43 | FromDiscord_ | <DeltaPHC> The first param that is |
05:16:52 | FromDiscord_ | <DeltaPHC> Because Nim uses overloading a lot, and it doesn't help to have a billion things with the same name in the docs |
05:19:37 | owl_000 | one idea is to display search result catagorically. suppose seq search result can be catagorize in something like this core>system> ... , other>... |
05:19:52 | owl_000 | tut1>...., nim by example>... |
05:21:40 | FromDiscord_ | <DeltaPHC> Yeah, something like that. Just some way where you can ask "okay, which procedures can I use with *this* type specifically?" |
05:22:01 | * | narimiran_ is now known as narimiran |
05:22:36 | narimiran | like you type `mySeq.` in your editor and then read the provided suggestions? ;) |
05:23:01 | FromDiscord_ | <DeltaPHC> Well duh. But I'm taking docs |
05:23:17 | FromDiscord_ | <DeltaPHC> talking* |
05:26:57 | FromDiscord_ | <DeltaPHC> Sometimes I don't want to rely solely on the IDE to know what I'm doing :P |
05:27:31 | FromDiscord_ | <DeltaPHC> Like maybe I just want to read and explore and plan |
05:35:29 | owl_000 | yes. hope to see better documentation, atleast convenient way to find existing docs. |
05:39:33 | narimiran | oh, if only you have seen the documentation 9 months ago. what you have now is the deluxe package |
05:40:14 | narimiran | and yeah, it always can be better, but imo currently it is 'good enough' |
05:40:54 | owl_000 | lol, thanks for all the hard work. |
05:42:32 | FromDiscord_ | <DeltaPHC> Likewise. The current docs are workable, certainly |
05:43:22 | FromDiscord_ | <DeltaPHC> I mostly just desire proc grouping by first param type |
05:45:14 | FromDiscord_ | <DeltaPHC> Or maybe a new set of generated pages that lists procs for each type. A page per type. Idk, I'm just throwing out ideas |
05:45:37 | narimiran | it would be nice to have, agreed |
05:55:03 | * | actuallybatman quit (Quit: leaving) |
06:14:47 | * | solitudesf- joined #nim |
06:26:01 | * | LargeEpsilon joined #nim |
06:41:53 | Araq | "Group by Type" is a feature of the docs |
06:45:47 | * | Vladar joined #nim |
06:46:57 | * | alexander92 joined #nim |
06:49:06 | alexander92 | We can have type search similar to hoogle |
06:49:30 | alexander92 | You can even type (int, int):int |
06:49:37 | alexander92 | And find out the functions that match |
06:50:42 | alexander92 | The more cool thing would be to somehow pass input and out and generate a valid sequence of calls that would lead to that type |
06:50:49 | alexander92 | But probably too niche |
06:51:09 | alexander92 | Input type* |
06:54:43 | Araq | if you don't want to use dot-completion, why would you want a type search? |
06:54:56 | Araq | the argument seemed to be "I wanna read the docs" |
06:56:31 | alexander92 | Because it's cool lol |
06:57:45 | alexander92 | Which reminds me, I need to setup code completion in my ide |
06:59:53 | narimiran | leorize[m]: i'm noticing that sometimes `*` (search for word under cursor) doesn't work anymore while on the refactor branch :/ Zevv, have you maybe noticed it too? |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:35 | * | krux02 joined #nim |
07:00:39 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
07:00:56 | * | laaron joined #nim |
07:01:20 | Zevv | Hm I guess, but not consistently |
07:01:52 | narimiran | here is a way to reproduce one of the wrong behaviours (searching for wrong words): |
07:02:48 | narimiran | pick any proc definiton, e.g. `proc hash*(x: float): Hash {.inline.} =` and press `*` while on `x` - it searches for `float`, not for `x` |
07:05:01 | * | gmpreussner joined #nim |
07:15:19 | * | LargeEpsilon quit (Read error: Connection reset by peer) |
07:30:29 | * | NimBot joined #nim |
07:35:37 | FromDiscord_ | <exelotl> @Shield#9926 yeah it's somewhat wasteful, but the alternative is having a separate static array for each kind of object (also wasteful if you don't use every object in every level), or using malloc, but I really want guarantees about how much memory my game uses |
07:37:52 | Zevv | @araq: "You will be able to mark the module as ``{.used.}``". What is the syntax for this then? |
07:43:38 | FromDiscord_ | <Shield> I guess memory matters more than cache hits in your case, although nothing says that you can't group multiple small actors in one actor, I'm curious to see your end result |
07:43:38 | FromDiscord_ | <Shield> I'm going over multiple implementations of ECS and I keep going back to simple arrays of components |
07:45:28 | * | alexander92 quit (Remote host closed the connection) |
07:51:20 | Araq | Zevv, inside the module you write |
07:51:26 | Araq | {.used.} |
07:51:31 | Araq | as a top level statement |
07:51:39 | Zevv | ah, right! |
07:56:34 | * | noonien joined #nim |
07:56:53 | noonien | hello folks! |
07:57:13 | noonien | i'm getting a weird error when trying to compile some async code that has unit tests |
07:57:25 | noonien | https://www.irccloud.com/pastebin/Vj6KyFiC/ |
07:57:37 | noonien | i'm not really sure what's wrong |
07:58:17 | noonien | the file has ~500 lines of code that sadly i cannot share :( |
07:58:32 | noonien | i'll try to make a minimal reproducible example |
07:58:39 | noonien | i'm running the latest nightly |
08:00:40 | noonien | i'm calling a function called `setup` in my unit tests, that's defined outside of the unit tests |
08:16:09 | * | floppydh joined #nim |
08:17:53 | Araq | there is a reason why I don't use unittest.nim ;-) |
08:18:33 | Araq | unittests is not where I want to have triple nested templates and usually I don't mind templates. |
08:25:31 | noonien | hmm, what should i use? |
08:27:25 | Araq | when isMainModule + doAssert or a testament-like tool |
08:29:25 | noonien | i see |
08:33:15 | noonien | hmm, what is testament? |
08:34:08 | noonien | i can't find any relevant documentation |
08:34:13 | noonien | is it a tool in some other language? |
08:35:28 | Zevv | "Error: cannot attach a custom pragma to 'core'" |
08:35:38 | Zevv | when I try the top level {.used.} |
08:35:52 | Zevv | ('core' is the modules name) |
08:37:37 | Araq | told you it's not yet implemented |
08:38:35 | * | leorize joined #nim |
08:41:05 | Zevv | oh, I missed that, sorry :/ |
08:41:37 | Zevv | eh, you did? Well, nevermind, thanks! |
08:42:15 | Araq | just give me an hour |
08:42:38 | Zevv | no hurries |
08:45:45 | * | shomodj joined #nim |
08:47:05 | * | ng0_ is now known as ng0 |
08:57:49 | * | vlad1777d_ joined #nim |
08:57:52 | * | vlad1777d quit (Ping timeout: 272 seconds) |
09:02:12 | dom96 | Anyone else think these definitions feel a little flimsy? https://www.reddit.com/r/rust/comments/cw0kyd/is_the_order_of_evaluation_of_function_arguments/ey7nzj1/ |
09:02:29 | dom96 | Also, we might want to specify this in Nim :) |
09:02:38 | Araq | we do. |
09:03:01 | Araq | https://nim-lang.org/docs/manual.html#order-of-evaluation |
09:03:30 | Araq | I need to add the exceptions though :-) |
09:03:41 | Araq | of which there are two: |
09:04:01 | Araq | - templates cannot be used to introduce a different order |
09:04:11 | Araq | - named parameters cannot be used to introduce a different order |
09:04:42 | dom96 | cool |
09:04:50 | * | vlad1777d__ joined #nim |
09:05:34 | * | vlad1777d_ quit (Ping timeout: 268 seconds) |
09:05:36 | dom96 | Can I mark this as high pri? It's a bit of a showstopper for me and I dislike the workarounds I had to use https://github.com/nim-lang/Nim/issues/12042 |
09:06:08 | Araq | did it for you |
09:06:16 | Araq | tbh I thought it was fixed 6 months ago... |
09:06:24 | dom96 | yay |
09:06:29 | dom96 | now you've got a nice test case too |
09:19:19 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:23:09 | * | alexander92 joined #nim |
09:25:49 | * | abm joined #nim |
09:29:06 | FromGitter | <alehander42> dom96 from this discussion https://feross.org/gcc-ownage/ |
09:29:08 | FromGitter | <alehander42> is the most amusing |
09:29:09 | FromGitter | <alehander42> part |
09:41:08 | Araq | Zevv, https://github.com/nim-lang/Nim/pull/12064 |
09:43:02 | Zevv | thanks araq. Is there a simple way to test if this is valid in a Nim version so I can add this to my code without breaking for older versions? |
09:43:53 | Araq | read the PR |
09:44:24 | Araq | when defined(nimHasUsed): {.used.} |
09:44:32 | Zevv | sweet, thanks |
09:50:52 | * | shomodj joined #nim |
09:51:26 | * | shomodj_ joined #nim |
09:55:10 | * | shomodj quit (Ping timeout: 246 seconds) |
09:57:51 | * | laaron quit (Remote host closed the connection) |
10:00:15 | * | laaron joined #nim |
10:33:47 | * | alexander92 quit (Ping timeout: 245 seconds) |
10:39:21 | * | sealmove joined #nim |
10:42:15 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
10:42:54 | * | theelous3 joined #nim |
10:49:48 | * | shomodj joined #nim |
10:50:09 | * | fjellfras quit (Quit: Leaving) |
10:53:08 | * | shomodj_ quit (Ping timeout: 272 seconds) |
10:54:34 | * | arecaceae quit (Remote host closed the connection) |
10:55:00 | * | arecaceae joined #nim |
10:55:09 | * | ng0 joined #nim |
10:55:12 | * | alexander92 joined #nim |
11:05:00 | FromGitter | <francescoalemanno> Hi everyone! I just came across Nim two days ago, at the moment i am a Julia user, but i would like to start experimenting with Nim, currently i must develop a MCMC simulation, in order to do so, i need: a n-dim array library, good support for random ndarray generation (gaussian and discrete), ⏎ ⏎ Do you guys have something to recommend? |
11:05:21 | * | absolutejam joined #nim |
11:05:57 | alexander92 | i can recommend you @mratsim |
11:09:57 | lqdev[m] | kind of offtopic, but what does an n-dimensional array library provide? I'm not really experienced in scientific fields |
11:23:09 | alexander92 | disclaimer, my project will probably switch to chronos next month so i am not taking sides |
11:24:08 | alexander92 | but something like https://github.com/status-im/nim-chronos/commit/e3cb0d1a96e5161a626e1363d4dd3db17ee7f474 is a high priority issue for asyncdispatch imo |
11:24:26 | alexander92 | it seems impossible to write templates which `await` otherwise |
11:24:43 | alexander92 | and this is a dealbreaker for some usecases |
11:27:06 | alexander92 | @yglukhov , i'll try to adapt your implementation to an asyncdispatch PR: i hope that's ok (this feature comes to chronos as a consequence of one of my asyncdispatch feature requests ) |
11:28:01 | FromGitter | <yglukhov> alexander92 |
11:28:55 | FromGitter | <yglukhov> thankfully chronos doesn't have multisync :) |
11:30:11 | alexander92 | hm, multysync sounded like a good idea to me, what's bad about it : ) |
11:34:54 | Zevv | https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ |
11:36:08 | alexander92 | yes, but that's what multisync is trying to solve |
11:37:19 | * | noonien quit (Quit: Connection closed for inactivity) |
11:43:01 | * | nif quit (Quit: ...) |
11:43:10 | * | nif joined #nim |
11:48:11 | FromGitter | <yglukhov> Meh, I don't think multisync solves it though :). The functions are still colored. That's bad. Myltisync allows sync io. That's just awfully terrible. |
11:49:23 | FromGitter | <yglukhov> I'm not aware of a solution cleaner than in go-lang so far. |
11:52:27 | Zevv | or lua coroutines |
11:55:32 | FromDiscord_ | <exelotl> Lua coroutines are gorgeous |
11:55:53 | FromDiscord_ | <exelotl> Would use those over async await any day |
11:56:00 | alexander92 | yglukhov, please, dont change your gitter messages, the change isn't sent to irc :D |
11:56:20 | Zevv | I do miss those yes. |
11:56:37 | alexander92 | yeah, i see what you mean: but i think multisync can be fixed to work with template-await |
11:56:52 | alexander92 | otherwise, async/await overally has the color problem indeed |
11:58:51 | alexander92 | but it makes me wonder, why so many modern languages : rust, c#, nim, zig adopted async/await then |
11:58:56 | * | laaron quit (Remote host closed the connection) |
11:59:37 | FromGitter | <yglukhov> I would gladly vote for removing multsync altogether. I find it plain useless if not harmful. I mean what's the real use case for it? Who would want to run sync code written in async manner? |
12:00:50 | FromGitter | <yglukhov> await template would have to be completely untyped for multisync to work. `template awaitT (v: T): T = v`. And I don't like it because it's a road to name collisions. |
12:01:03 | alexander92 | well, the point is obvious: instead of writing a `x` and `xSync` function, you just write one implementation |
12:01:43 | * | laaron joined #nim |
12:02:18 | FromGitter | <yglukhov> I get it, but why run sync code if there's async variant? Wanna block? just do waitFor and that will work better without suspending the rest of the runloop. |
12:02:55 | dom96 | because async is a huge dependency |
12:02:57 | alexander92 | i don't get why one should always assume an event loop |
12:03:14 | alexander92 | or using asynclib at runtime at all |
12:03:16 | dom96 | if you're running synchronous IO then having an event loop is a big waste of resources |
12:04:44 | FromGitter | <yglukhov> "waste of resources" sounds like a concern for a serious application. "synchronous IO" doesn't sound like anything a serious application would even consider. Where am I wrong? |
12:05:25 | FromGitter | <yglukhov> I must be missing something obvious here. |
12:05:47 | Zevv | You might choose to to your sync IO in threads |
12:05:52 | Zevv | blocking |
12:07:12 | dom96 | alexander92, you're going to switch to chronos because you can't `await` in a template? |
12:07:13 | FromGitter | <yglukhov> Well I know how to use sync IO. Question is - why? "sync IO in threads" is not the way you do IO when performance matters, no? |
12:07:52 | alexander92 | @dom96 actually i implemented locally a patch based on yglukhov's one and it seems to work, that's not the reason, as i said |
12:08:00 | dom96 | yglukhov: it's not just about performance, what about embedded devices? |
12:09:15 | alexander92 | yglukhov a lot of "serious" apps don't do so much IO that it matters, so they can just use sync |
12:09:23 | FromGitter | <yglukhov> How embedded are we talking about? Raspberry/beaglebone do not care. Arduino - good luck running even sync io :) |
12:09:53 | dom96 | alexander92, what is the reason then? |
12:10:12 | FromGitter | <yglukhov> alexander92: So if it doesn't matter why not use waitFor then? |
12:10:51 | alexander92 | but why use it, if i can just use a sync call |
12:11:06 | alexander92 | there is nothing really complicated about multisync |
12:12:03 | * | lritter joined #nim |
12:12:12 | dom96 | multisync is just a quick and easy way to avoid these function "colours" |
12:12:33 | FromDiscord_ | <Shield> why did coroutine lib and green threads got dropped in favor of async? |
12:13:46 | dom96 | honestly, when I implemented async await I didn't even consider green threads |
12:13:55 | FromGitter | <yglukhov> dom96: The colors are there and it's worse because there's more colors now. |
12:13:55 | alexander92 | in a long term, i kinda like one of the zah's proposals: to do the opposite |
12:14:10 | alexander92 | https://github.com/status-im/nim-chronos/issues/2 a safeasync that *inserts* await where it is needed |
12:14:55 | FromGitter | <yglukhov> Multisync adds more colors. You can't call async from sync. You can't call blocking-multisync from async. |
12:15:20 | alexander92 | i *think* a green thread lib can be written in userspace |
12:15:37 | dom96 | multisync creates both sync and async procs so that doesn't matter |
12:15:50 | alexander92 | but it might prove impossible to make it optimal without compiler changes, dunno |
12:16:09 | FromGitter | <mratsim> green thread = fiber = coroutine |
12:16:45 | FromGitter | <mratsim> std/coro is implemented in userspace. though I'm not sure how it works with exceptions |
12:18:12 | alexander92 | btw there was a guy asking for ndarray lib/generation , @mratsim do your libs support that |
12:18:30 | FromGitter | <yglukhov> dom96: it does, because it allows/encourages sync io. So if you get a sync impl of a db driver which is based on top of multisync sockets, it will be just useless in async app. |
12:18:36 | FromGitter | <mratsim> a tensor is an ndarray |
12:19:44 | dom96 | yglukhov: it encourages both, that is it's point. If you get a sync impl of a db driver then it's not multisync, is it? |
12:21:20 | * | rockcavera joined #nim |
12:22:49 | FromDiscord_ | <Shield> is there really no way to add green threads? it's a really attractive feature |
12:23:04 | * | LargeEpsilon joined #nim |
12:24:30 | FromGitter | <mratsim> Those are green threads: https://nim-lang.org/docs/coro.html |
12:24:36 | dom96 | Of course there is. You can implement anything given the will |
12:25:13 | FromGitter | <mratsim> Or you can lift that code that combines ucontext + setjmp/longjmp for even faster speed. less than 100 lines of codes: http://www.1024cores.net/home/lock-free-algorithms/tricks/fibers |
12:25:15 | dom96 | mratsim: that won't handle IO for you though |
12:25:26 | FromGitter | <alehander42> you can also wrap a c green thread library like http://libdill.org/ |
12:25:36 | FromDiscord_ | <Shield> araq said to not use coro lib and stick to async... |
12:25:49 | FromGitter | <mratsim> well because coro is unmaintained |
12:27:13 | FromGitter | <mratsim> The main advantages of green threads are probably cleaner separation of execution contexts and maybe speed as well. |
12:27:33 | FromGitter | <mratsim> but in terms of high-level features, I don't think there is any difference with async |
12:27:48 | disruptek | exceptions. |
12:28:41 | dom96 | async supports exceptions nowadays |
12:28:57 | FromGitter | <mratsim> actually regarding speed, I'm not even sure if there is an advantage on platforms with a large number of registers |
12:29:08 | FromDiscord_ | <Shield> it's definitely speed and the lightweight, most benchmarks talk about running millions of them with ease |
12:29:18 | FromGitter | <yglukhov> Right. So what do we have. We write the code in async manner anyway. We have to mess with type duality, because sync-ness is now a part of the driving type. How simple is that? We have to do occasional `when isAsync(v)` in the code. In the end a user can write a sync function using our lib. And his function will not work in async environment (not composable). Oh, and we also get this "efficiency" for the use cases |
12:29:18 | FromGitter | ... that by definition do not care about this kind of efficiency. And sure, there is nothing really complicated about multisync (c) alexander92 :P |
12:29:39 | FromGitter | <mratsim> with AVX512, CPU now have 32 registers 512-bit wide, saving/restoring them is probably super slow |
12:30:42 | disruptek | there's a nim port of golib, too. |
12:31:06 | Zevv | mratsim: if you squeeze very hard they might fit all in a L1 cache line |
12:31:41 | dom96 | yglukhov: it's very simple, you're right that sometimes you need a `when` but the more people use `multisync` the less this will be required. |
12:32:18 | FromGitter | <alehander42> @yglukhov i can't understand, why are you surprised that people would be able to write sync functions using such a lib |
12:33:06 | FromGitter | <alehander42> those users would've just used a synchronous api otherwise |
12:33:21 | FromGitter | <alehander42> why does it matter what would they write |
12:34:34 | FromGitter | <alehander42> and as i said, i'd even prefer something like safeasync : https://github.com/status-im/nim-chronos/issues/2 which still can generate a sync version |
12:34:57 | dom96 | btw what is `awaitne` in chronos? |
12:35:37 | FromGitter | <alehander42> which erases the first point (writing in async manner) |
12:36:05 | dom96 | explicitly writing `await` is a good thing IMO |
12:36:25 | FromGitter | <alehander42> the only remaining point: dual types and when isAsync is just a matter of tradeoffs: yes, if you write more "generic" in some sense code, you can use it more different ways, but you sometimes need a bit more complexity: if you dont want, you can still use pure async |
12:36:59 | disruptek | pure async? |
12:37:09 | FromGitter | <alehander42> async-only implementation, sorry |
12:37:42 | disruptek | i think it's the `what color is your function?` argument. |
12:38:02 | FromGitter | <mratsim> It's turquoise with a shade of grey |
12:38:12 | FromGitter | <alehander42> but i don't get the color is function argument |
12:38:32 | FromGitter | <alehander42> we all work with async/await libs: we all suffer from that problem anyway |
12:38:44 | disruptek | http://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/ |
12:39:11 | FromGitter | <alehander42> no, i mean, i dont get why is it used here, as its still remaining a problem for both asyncdispatch and chronos with or without multisync |
12:39:31 | FromDiscord_ | <Shield> "Starts main coroutine scheduler loop which exits when all coroutines exit." |
12:39:31 | FromDiscord_ | <Shield> I think this was my problem with the coro lib, it assumes that you won't be doing anything else besides running the coroutine loop |
12:39:38 | FromGitter | <alehander42> if it was really such a problem, people would've designed a actor or green thread library indeed and use that |
12:39:51 | disruptek | they have. |
12:39:52 | * | dddddd joined #nim |
12:40:00 | FromGitter | <alehander42> i mean, the people in this discussion |
12:40:02 | FromGitter | <alehander42> (us) |
12:42:04 | disruptek | i think use of async is widely motivated by needs that go beyond its technical merits; support, stdlib inclusion, ease of use, portability, and lack of other impediments like an event loop. |
12:42:06 | FromGitter | <alehander42> 1) neither chronos, or asyncdispatch still solve the stdlib/os syscall problem: they're still inherently sync, and you either need async versions for some of those primitives, or you need a mechanism to offload them in another thread/something |
12:43:22 | FromGitter | <mratsim> but arent kqueue/epoll or whatever they are called supposed to address that? |
12:43:28 | FromGitter | <alehander42> so i think those are questions that need to be fixed before ridiculing all programs requiring sync IO @yglukhov |
12:48:18 | FromGitter | <alehander42> @mratsim well, i guess so: maybe they are already used inside? is it possible to do most io-related or syscall-invoking operations in the stdlib safely/non-blockingly in an event loop? |
12:48:57 | FromGitter | <alehander42> i am sorry, i admit i am not well versed at all in this area ^ |
12:51:11 | Araq | "what color is your function?" is quite silly in a statically typed environment |
12:51:37 | Araq | so, uhm, my proc returns 'int' and you needed a string, "wrong colors!" |
12:52:39 | dom96 | no matter what you use, fibers/async await/whatever, you still need to integrated with the OS and more importantly with external C libs too |
12:53:00 | dom96 | if the event loop is obvious like in the case of async await it's much easier to do that, than with fibers |
12:53:24 | dom96 | Go can get away with this since most of its libs are written in Go |
12:53:28 | * | cgfuh joined #nim |
12:53:30 | dom96 | but Nim relies a lot on external C libs |
12:53:35 | * | laaron quit (Remote host closed the connection) |
12:57:57 | * | laaron joined #nim |
13:02:36 | FromDiscord_ | <Shield> wouldn't it still be useful for cases where you're not using C libs |
13:04:13 | * | abm quit (Ping timeout: 245 seconds) |
13:07:19 | * | laaron quit (Remote host closed the connection) |
13:09:53 | * | laaron joined #nim |
13:56:34 | FromGitter | <mratsim> I think "what color is your function" is basically Monad without using Monad |
13:59:30 | * | clyybber joined #nim |
14:00:09 | FromGitter | <mratsim> Seems like Appveyor is broken for all PRs since yesterday |
14:01:11 | narimiran | i just disabled 'norm' package, so it should be ok from now on |
14:03:40 | alexander92 | hm, but isn't it maintained |
14:03:48 | alexander92 | i use it in my web framework |
14:03:55 | * | laaron quit (Remote host closed the connection) |
14:04:09 | alexander92 | (which is not maintained currently .. ) |
14:04:36 | Araq | 'norm' broke because it's developed afaict |
14:04:37 | narimiran | i'll investigate why is it failing, but in the mean time it is disabled so we can better see which PR breaks stuff |
14:05:55 | * | laaron joined #nim |
14:12:09 | clyybber | Araq: Some unrelated CI failure on https://github.com/nim-lang/Nim/pull/11926 |
14:12:16 | clyybber | Seems to happen on every PR no? |
14:12:35 | narimiran | heh, we were just talking about it :) |
14:12:48 | clyybber | Oh, I see lol |
14:20:45 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
14:21:05 | * | laaron- joined #nim |
14:22:44 | * | gangstacat quit (Quit: Ĝis!) |
14:28:54 | * | endragor quit (Remote host closed the connection) |
14:30:00 | lqdev[m] | https://nim-lang.org/docs/manual.html#importcpp-pragma-importcpp-for-procs I'm just reading through this, shouldn't the first generated code example use `.` instead of `->`? |
14:30:20 | lqdev[m] | note how the pointer is dereferenced here |
14:30:27 | lqdev[m] | in the first parameter |
14:31:30 | * | laaron- quit (Remote host closed the connection) |
14:34:14 | * | laaron joined #nim |
14:34:38 | * | gangstacat joined #nim |
14:41:41 | * | dddddd quit (Quit: Hasta otra..) |
14:42:28 | * | dddddd joined #nim |
14:48:36 | * | nsf quit (Quit: WeeChat 2.5) |
14:53:48 | * | abm joined #nim |
14:57:31 | * | ng0 quit (Remote host closed the connection) |
14:58:05 | * | laaron- joined #nim |
14:58:07 | * | laaron quit (Remote host closed the connection) |
14:58:48 | * | ng0 joined #nim |
15:00:36 | * | ng0 quit (Remote host closed the connection) |
15:01:25 | * | ng0 joined #nim |
15:03:21 | * | clyybber quit (Quit: WeeChat 2.5) |
15:08:47 | * | sealmove quit (Quit: WeeChat 2.5) |
15:11:34 | * | absolutejam quit (Ping timeout: 246 seconds) |
15:13:27 | * | darithorn joined #nim |
15:19:41 | * | laaron- quit (Remote host closed the connection) |
15:20:46 | Araq | lqdev[m]: huh? '#.' is correct |
15:21:02 | * | LargeEpsilon quit (Ping timeout: 272 seconds) |
15:21:08 | Araq | „A dot following the hash #. indicates that the call should use C++'s dot or arrow notation.“ |
15:21:37 | Araq | ah well... |
15:21:57 | Araq | it could also produce (*x).CppMethod(1, 2, 3) |
15:22:33 | * | laaron joined #nim |
15:25:11 | * | tiorock joined #nim |
15:25:11 | * | rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services))) |
15:25:11 | * | tiorock is now known as rockcavera |
15:25:11 | * | rockcavera quit (Changing host) |
15:25:11 | * | rockcavera joined #nim |
15:41:54 | * | endragor_ joined #nim |
15:43:07 | * | shadowbane quit (Quit: Konversation terminated!) |
15:47:17 | * | shadowbane joined #nim |
15:50:02 | * | owl_000 quit (Ping timeout: 245 seconds) |
15:52:30 | * | nc-x joined #nim |
15:52:47 | * | LargeEpsilon joined #nim |
15:54:22 | nc-x | Araq: I think he means that in the call to cppMethod, x is being dereferenced. So for a simple CppObj (and not a pointer) why is `->` being generated? (Because objects use `.` in c++, pointers dereferencing uses `->` in objects.) |
15:56:47 | * | nc-x quit (Remote host closed the connection) |
15:58:01 | * | wildtrees joined #nim |
15:58:51 | * | wildtrees quit (Max SendQ exceeded) |
16:13:12 | * | endragor_ quit (Remote host closed the connection) |
16:16:04 | * | rec joined #nim |
16:19:03 | rec | anyone have problem with building nim from devel? |
16:19:36 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
16:20:30 | * | laaron joined #nim |
16:21:10 | narimiran | rec: wild guess: try first `nim c -d:danger koch`, and then do `./koch boot` |
16:21:48 | rec | did this: `./csources/bin/nim.exe c Nim/koch.nim` |
16:22:07 | leorize | to build Nim you need Nim |
16:22:12 | leorize | copy that nim.exe to Nim/bin |
16:22:54 | rec | doh! |
16:23:19 | rec | I followed the readme on the Nim github |
16:23:46 | * | laaron quit (Remote host closed the connection) |
16:24:14 | narimiran | i don't see `./csources/bin/nim.exe c Nim/koch.nim` in the readme :P |
16:25:26 | rec | my bad, i cloned csources into wrong dir :D |
16:25:42 | * | Trustable joined #nim |
16:30:57 | Araq | nc-x the example uses pointers |
16:39:03 | * | nc-x joined #nim |
16:39:16 | nc-x | Araq: no it doesn't. |
16:39:51 | nc-x | unless CppObj is a pointer |
16:40:52 | nc-x | or unless i am misunderstanding the code because i have never used ffi |
16:41:16 | * | nc-x quit (Remote host closed the connection) |
16:44:20 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:01:34 | * | sealmove joined #nim |
17:05:25 | FromDiscord_ | <treeform> Can this get reverted? https://github.com/nim-lang/Nim/commit/3cf038027b1df0455f5c6cd2bc47b61377c49761 This patch breaks all exceptions with vc++ causing them to segfault. What is more important some "setTerminate" or entire vc++ backend? |
17:05:56 | FromDiscord_ | <treeform> more info: https://github.com/nim-lang/Nim/issues/11846 |
17:10:27 | * | LargeEpsilon quit (Ping timeout: 245 seconds) |
17:13:07 | * | nsf joined #nim |
17:17:38 | * | shomodj joined #nim |
17:20:38 | * | nif quit (Quit: ...) |
17:20:48 | * | nif joined #nim |
17:27:10 | * | rec quit (Remote host closed the connection) |
17:29:37 | * | Ven`` joined #nim |
17:51:27 | * | alexander92 quit (Ping timeout: 258 seconds) |
17:53:46 | * | Senketsu joined #nim |
18:01:32 | FromGitter | <mratsim> AFAIK here it's GCC vs VCC backend |
18:06:04 | disruptek | why does strutils.IdentStartChars include '_'? |
18:07:41 | FromGitter | <mratsim> because "const _ = 1" is valid |
18:07:45 | FromGitter | <mratsim> I guess |
18:09:27 | disruptek | is there any easy way to determine if an identifier clashes with a keyword? |
18:09:56 | disruptek | it's a shame validIdentifier doesn't fail for "_foo" or "while", etc. |
18:12:08 | Zevv | when(compiles) let while = 0: |
18:12:56 | disruptek | yeah, i guess i have to build a macro to do that. |
18:17:13 | leorize | well when you backtick quote them they can clash however they like |
18:17:23 | leorize | so validIdentifier is correct |
18:17:39 | disruptek | i know, but i don't want to generate code that backticks every single identifier just in case. |
18:18:09 | Zevv | how is backticking tifferent then wrapping it in Xes, for example? |
18:18:18 | Zevv | `while` vs XwhileX |
18:18:32 | disruptek | it preserves the value "while". |
18:18:37 | Zevv | does the same happen in the compiler, or is stropping really something different? |
18:18:53 | disruptek | the compiler remaps the symbols, of course. |
18:18:55 | leorize | to be fair you can just `genSym` |
18:20:16 | disruptek | here's the use-case: i want to generate procs with named parameters from arbitrary string inputs, but i want to ensure that the named params are stropped only when necessary. |
18:22:01 | FromGitter | <alehander42> there is a list of keywords in the compiler |
18:22:20 | disruptek | i figured. :-P |
18:23:00 | FromGitter | <alehander42> doc/keywords.txt |
18:23:51 | * | alexander92 joined #nim |
18:23:53 | * | arecaceae quit (Remote host closed the connection) |
18:24:17 | disruptek | hardcoding them is probably the right solution given these alternatives. |
18:24:17 | * | arecaceae joined #nim |
18:25:15 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:25:25 | Zevv | const keywords = readFile("doc/keywords.txt").split() |
18:25:28 | disruptek | alehander42: thanks for the url |
18:26:01 | disruptek | yeah, i'm just gonna include it in my dist so i don't need to worry about trying to find the compiler source. 🙄 |
18:26:26 | LyndsySimon | I have a fairly small random project I'm considering building - a way to build process flow diagrams in text, and generate graphical output (SVG, most likely). I don't see an easy way to output SVG with Nim in the standard library. Is there somewhere else I should look? |
18:26:44 | LyndsySimon | Here's the first draft of the spec I'm working on when I'm frustrated with "real work", if you're interested: https://gitlab.com/lyndsysimon/graffito/blob/primary/draft.md |
18:27:33 | disruptek | LyndsySimon: seen this? http://nomnoml.com/ |
18:27:39 | Zevv | svg is fairly trivial to generate from scratch, id did this in several projects |
18:27:56 | Zevv | just make some procs for primitives like line, box, text, and youre set |
18:28:06 | LyndsySimon | Huh. That URl is blocked where I am (public AP). One sec. |
18:28:15 | disruptek | you can use zevv's npeg to write the parser. |
18:28:24 | LyndsySimon | Hmm. Yeah, I might just do that then. |
18:28:32 | FromGitter | <Vindaar> LyndsySimon: there's https://github.com/bluenote10/NimSvg |
18:29:21 | Zevv | oh that would be tricky to parse, i dont think you can get there with a CFG only |
18:29:55 | disruptek | why is that? |
18:30:05 | LyndsySimon | It's just a very rough draft. I basically sat down and thought how I'd like the language to look. |
18:30:08 | Zevv | LyndsySimon: how is this different from things like ditaa? |
18:30:16 | LyndsySimon | Lots of missing features, and everything subject to change. |
18:30:36 | LyndsySimon | It's mine, lol. It's for personal fulfillment only, basically. |
18:30:48 | Zevv | best reason always :) |
18:30:52 | * | leorize quit (Quit: WeeChat 2.5) |
18:31:17 | LyndsySimon | ditaa, though, is sort of like a "Markdown" for charts as best I can tell. I want this to be more like a compiler for charts. |
18:31:22 | Zevv | oh no, its easy to parse, i read the md wrong |
18:31:30 | Zevv | trival, use npeg indeed! :) |
18:31:47 | Zevv | yeah, and if it works I'll use the hell out of your tool! |
18:31:57 | LyndsySimon | The output sections are representative, too. I expect to have multiple output options with text being one, but primarily expect to use SVG. |
18:32:26 | Zevv | check graphviz for inspiration. its great in layouting, but the grammar is sucky |
18:32:44 | LyndsySimon | Nomnoml looks like the idea of what I'm trying to accomplish. |
18:32:54 | disruptek | it's pretty awesome. |
18:33:11 | Zevv | id love a tool for creating railway diagrams from text |
18:33:37 | LyndsySimon | "railway"? |
18:33:47 | LyndsySimon | I'm familiar with lots of diagram types, but not that name. |
18:34:00 | LyndsySimon | Like a subway map, or like a "swim lane" diagram? |
18:34:10 | disruptek | you can generate and regenerate your svg on the fly to display object relationships as they change in realtime, and because it's svg, you get the benefits of the web render. |
18:34:28 | Zevv | LyndsySimon: https://json.org/ |
18:34:30 | LyndsySimon | Ah |
18:34:31 | LyndsySimon | https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fg_H7OIfcrA8%2Fhqdefault.jpg&f=1 |
18:35:28 | * | alexander92 quit (Quit: WeeChat 2.4) |
18:35:29 | LyndsySimon | Yeah, I figured it out. I'll have to think about architecture a bit, but at a high level that's just a different set of entity shapes and formatting rules. |
18:35:43 | * | alexander92 joined #nim |
18:35:46 | LyndsySimon | The relationship definitions aren't any different from a generic flow chart. |
18:36:32 | Zevv | I'd love a compact generated graph for representing grammars. I now have this, but I don't particularry like the flow: https://raw.githubusercontent.com/zevv/npeg/master/doc/example-graph.png |
18:36:39 | LyndsySimon | I don't know if it's reasonable, but I'd like to allow as little direct modification of the output as possible. The barrier I've encountered to using all the various tools out there is that they include a ton of options to position and configure every possible option. |
18:37:18 | LyndsySimon | The way I see it, there are "rules" for every diagram type. Get those rules right in the output generator, and you shouldn't *have* to muck around with things in your source. |
18:37:42 | Zevv | good philosophe, but then there is users and practice |
18:38:03 | LyndsySimon | The awesome thing about a "personal fulfillment" project is that the only user I have to care about is me :) |
18:38:14 | disruptek | Zevv: i guess you want force-directed layout, or...? |
18:38:22 | Zevv | yeah I started a few projects like that :/ |
18:38:24 | LyndsySimon | That said, I'll build in some method of extending it. |
18:38:30 | LyndsySimon | LOL |
18:38:31 | LyndsySimon | Yeah. |
18:39:13 | Zevv | disruptek: not sure actually, Id have to think about that |
18:39:19 | * | kungtotte joined #nim |
18:39:44 | Zevv | graphviz does proper layouting, but doesnt support branching of edges |
18:39:44 | LyndsySimon | Speaking of "community", how is Nim doing these days? I dove in a while about a year ago I think (when Dom's book came out), but let it languish in my mind while dealing with work. Is the community growing? Any positive or negative signs of commercial adoption ? |
18:40:01 | Zevv | "there are dozens of us!" |
18:40:30 | LyndsySimon | I'm a Python diehard, and have been for the past decade or so. I'm getting to the point where I'm liking the community less and less, and am at least open to moving to identify with a new one. |
18:40:38 | LyndsySimon | *literally* dozens!? |
18:40:42 | disruptek | you can do auto-layout stuff with graphviz, iirc. i know i have a moderate graph modelled somewhere. |
18:41:11 | LyndsySimon | If that's the case, then we're probably doubled in size! |
18:41:16 | Zevv | LyndsySimon: no, but that was the answer I got some time ago when I asked something similar :) |
18:41:32 | LyndsySimon | Seriously, though. I think Nim has a lot of potential. It feels like Python felt to me circa 2005-ish. |
18:41:39 | LyndsySimon | The community I mean. |
18:41:49 | * | floppydh quit (Quit: WeeChat 2.5) |
18:42:05 | LyndsySimon | Before Django rose and ate Ruby. |
18:42:26 | Zevv | I just hanag around here because all my other irc channels died out over the last few years but I refuse to use whatsapp or facebook. |
18:42:54 | Zevv | and people also talk about dogs sometimes, which is nice |
18:44:03 | Zevv | joking aside, the community is pretty open and friendly, lot of very smart people here |
18:46:13 | disruptek | i think i have about 20 years of python now, but i'm not writing too many new projects in it. |
18:46:52 | disruptek | i just got tired of not having the "headroom" that nim affords, and the performance was just becoming a liability. the interop nim promises makes it a better proposition for the future, imo. |
18:47:42 | FromGitter | <awr1> @LyndsySimon fwiw I have seen Nim mentioned on HN more frequently, dunno how useful of a metric that is |
18:48:12 | shashlick | Same boat @disruptek |
18:48:55 | shashlick | I am too bored to use python and my older projects aren't getting attention anymore |
18:49:42 | disruptek | here's a largish directed graph i made with graphviz iirc: https://www.dropbox.com/s/mxje14sn8xschlg/map.svg?dl=0 |
18:49:53 | LyndsySimon | I love Python the language. I've definitely run into its limitations, but am generally comfortable within them. The community is the problem. It's just... toxic. |
18:50:46 | shashlick | I almost never interacted with the python community |
18:50:56 | shashlick | With Nim, that's been part of the attraction |
18:51:10 | shashlick | Like @Zevv I just idle here |
18:52:23 | LyndsySimon | I idle here, too, I've just not been summoned back in a long time :) |
18:52:51 | * | clyybber joined #nim |
18:52:52 | * | abm quit (Quit: Leaving) |
18:52:55 | LyndsySimon | I will say, Nim (well, Npeg) syntax looks like gibberish after not using it for a while. |
18:53:19 | LyndsySimon | Then again, writing a lexer/parser isn't a typical "get your feet wet" activity I guess. |
18:54:37 | FromGitter | <awr1> npeg is a breath of fresh air for me after writing recursive descent parsers |
18:58:49 | * | rayman22201 joined #nim |
19:01:57 | alexander92 | dsl-s look more strange |
19:01:59 | alexander92 | usually |
19:02:16 | LyndsySimon | Holy crap. |
19:02:32 | LyndsySimon | I've never written a lexer/parser, and I've not used Nim in at least a year. |
19:03:02 | LyndsySimon | I just wrote the first steps of my parser in five minutes, while responding to stuff on Slack for work, with only three compile errors - all of which were syntax-related because I'm rusty. |
19:05:38 | Zevv | disruptek: how should one view this largish svg? |
19:05:59 | disruptek | browser? |
19:06:08 | disruptek | oh, i think i have a render of it, too. |
19:06:47 | disruptek | https://www.dropbox.com/s/aesojhhz6zjwu4v/map.png?dl=0 |
19:07:27 | Zevv | well you just killed my notebook |
19:07:37 | Zevv | its still figuring how to recover from that |
19:07:47 | disruptek | lol my bad. 😉 |
19:08:04 | Zevv | i'll share at at slack at work tomorrow and see what happens |
19:08:10 | disruptek | evil. |
19:09:01 | Zevv | LyndsySimon: I'd be glad to help you get started if you want to look into npeg |
19:09:39 | Zevv | disruptek: yep, 16G eaten up |
19:09:46 | disruptek | how? |
19:09:55 | Zevv | firefox trying to render that svg |
19:10:26 | Zevv | lets see what chromium makes of it |
19:12:06 | Zevv | funny, it is'nt even that complex |
19:12:15 | Zevv | about a thousand nodes I guess |
19:12:37 | LyndsySimon | Yeah, it froze IRCCloud (Electon client) for me on macOS. |
19:12:56 | disruptek | jeeze. you guys are on weak boxen. |
19:12:57 | LyndsySimon | Zevv: Thanks, I'll let you know if I run into any issues or make significant progress. |
19:13:01 | FromGitter | <awr1> 1) 74 MB |
19:13:07 | FromGitter | <awr1> hmmmm rather not |
19:13:07 | LyndsySimon | Here's like five whole minutes of work: https://gitlab.com/lyndsysimon/graffito/blob/nim/src/parser.nim |
19:13:47 | LyndsySimon | It's not *that* weak. Work provides it, so I'm not complaining. |
19:13:49 | LyndsySimon | https://usercontent.irccloud-cdn.com/file/CCY5L6Zh/image.png |
19:13:52 | Zevv | looks like a good start |
19:13:55 | alexander92 | disruptek i am opening it |
19:14:07 | alexander92 | bye, guys if my laptop stops working |
19:14:13 | alexander92 | it was a nice ride |
19:14:14 | disruptek | lol |
19:14:25 | Zevv | firefox totally ate 16G of ram |
19:14:41 | alexander92 | hm my firefox |
19:14:43 | alexander92 | just said ".png files are supported but something went wrong." |
19:14:50 | Zevv | you need to download and open manually |
19:15:42 | disruptek | gonna be a pretty big let down once you actually open it. 🙄 |
19:16:10 | * | Senketsu quit (Ping timeout: 258 seconds) |
19:19:41 | disruptek | weird thing is, i cannot find the code that actually generated it. it looks like it's python and it might use matplotlib and/or graphtool, but somehow the source is awol. |
19:22:44 | alexander92 | ok, i think i got to 12 gb ram |
19:22:49 | alexander92 | but using my other tty |
19:22:53 | alexander92 | i managed to kill the process |
19:23:01 | Zevv | yeah I had to switch to my phone to continue typing here :) |
19:23:02 | alexander92 | survive another hour |
19:23:06 | alexander92 | in this scary png world |
19:23:22 | alexander92 | dont send us fork bombs pls |
19:23:40 | Zevv | I once fork bombed nimbot and it went down for 4 months :/ |
19:23:47 | disruptek | it renders for me in like ~5 seconds in chrome. |
19:23:57 | alexander92 | hm, i have chromoium |
19:24:24 | disruptek | mine is ungoogled-chromium, a custom from-source build. shouldn't really matter though. |
19:25:44 | disruptek | it's 530mb for the svg tab on my machine. go figure. |
19:30:37 | rayman22201 | Lol "Did you hear about the new disruptek exploit?", "Is it a new 0 day, buffer overflow, dos?"... "Nope, just a huge png" |
19:31:06 | disruptek | lol it's like 10meg. i don't understand what's going on. |
19:31:48 | disruptek | actually, the png is ~36meg. still... why are your browsers consuming gigs and gigs of memory? |
19:32:43 | disruptek | it's 20480x20480px though. 😢 |
19:32:50 | Zevv | good question. They're probably trying to render at a resultion of 25.000 x 25.000 at 32BPP |
19:32:53 | Zevv | that adds up |
19:33:09 | disruptek | rendering the png is only 570mb on my machine. |
19:33:19 | Zevv | right, there you have it 20480^2*4 |
19:34:01 | disruptek | !eval echo 20480*20480*4 |
19:34:04 | NimBot | 1677721600 |
19:34:15 | disruptek | hardly 12gig |
19:35:23 | Zevv | LyndsySimon: what algorithm do you plan to use for layouting? |
19:37:10 | disruptek | maybe svg isn't such a great output format after all. 😁 |
19:39:05 | * | birdspider joined #nim |
19:39:38 | FromGitter | <dom96> Zevv: you fork bombed the playground, not NimBot. NimBot is invincible :P |
19:40:07 | Zevv | if you can't eval you're dead to me |
19:40:58 | * | nsf quit (Quit: WeeChat 2.5) |
19:43:57 | disruptek | come to think of it, why doesn't the compiler automagically strop identifiers that match keywords? |
19:45:26 | * | Ven`` quit (Quit: Textual IRC Client: www.textualapp.com) |
19:45:51 | * | Ven`` joined #nim |
19:48:31 | disruptek | seems like there's code to do this but it's not working. |
19:48:43 | Zevv | let let = true? |
19:49:35 | disruptek | imagine that you built that statement in ast and wanted to render it as source. |
19:55:16 | * | alexander92 quit (Ping timeout: 248 seconds) |
20:11:59 | * | clyybber quit (Quit: WeeChat 2.5) |
20:16:35 | Zevv | why would you even want to do such a thing, disgusting! |
20:17:17 | FromGitter | <awr1> so like PL/1? |
20:17:26 | FromGitter | <awr1> *PL/I |
20:17:43 | FromGitter | <awr1> https://en.wikipedia.org/wiki/PL/I#Goals_and_principles |
20:17:57 | disruptek | i admit that this openapi effort has proven to be more challenging than i expected, and for all the wrong reasons. |
20:18:52 | Zevv | elaborate |
20:20:25 | disruptek | there's a large repo of openapi inputs available for testing, and i thought they'd be well-validated and well-formed, but i was wrong. |
20:20:51 | Zevv | well, that's a better reason then Nim not being up to the task, is it |
20:21:34 | disruptek | so instead of building your api as a 1:1 nim-types-to-the-web-and-back, i keep regressing to the mean, which is json in this case. |
20:33:19 | * | birdspider quit (Remote host closed the connection) |
20:33:42 | * | birdspider joined #nim |
20:35:09 | disruptek | nim's auto-stropping looks like an easily-fixed bug, so i guess that's one positive to the experience. ;-) |
20:36:43 | * | lmariscal quit (Quit: I'm out!) |
20:40:53 | * | lmariscal joined #nim |
20:42:02 | * | narimiran quit (Ping timeout: 258 seconds) |
20:45:07 | * | Senketsu joined #nim |
20:45:44 | * | shomodj joined #nim |
20:46:27 | FromGitter | <iffy> I have a concept `Transport` defined in onefile.nim: ⏎ ⏎ ```type ⏎ Transport* = concept t ⏎ t.send(string)``` [https://gitter.im/nim-lang/Nim?at=5d6596a3be3a8a311af9f731] |
20:47:20 | FromGitter | <iffy> Then I have a thing in test_onefile.nim that implements/adheres to `Transport` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d6596d835f914538d97e6cf] |
20:47:49 | FromGitter | <iffy> When I run my tests without `--threads:on`, it works fine. But if I add `--threads:on` it complains thus: |
20:48:07 | FromGitter | <iffy> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d6597079b381b084f05cf71] |
20:48:42 | FromGitter | <iffy> Why does this have anything to do with threads? |
20:49:00 | * | absolutejam joined #nim |
20:51:24 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:02:19 | lqdev[m] | @iffy --threads:on enables the channels module, which is imported by system and thus imported in every module |
21:02:31 | lqdev[m] | sounds like a bug |
21:02:42 | lqdev[m] | that error, I mean |
21:03:01 | FromGitter | <iffy> Am I conflicting with something else named `Transport`? |
21:03:21 | FromGitter | <iffy> (let me answer my own question :) ) |
21:03:30 | * | Senketsu quit (Quit: WeeChat 2.5) |
21:03:55 | FromGitter | <iffy> Nope, not a name conflict |
21:11:32 | * | ng0 quit (Ping timeout: 260 seconds) |
21:13:28 | * | Senketsu joined #nim |
21:14:54 | * | LargeEpsilon joined #nim |
21:17:51 | FromGitter | <awr1> i'm lazy and can't figure this out |
21:18:06 | * | Senketsu quit (Client Quit) |
21:18:17 | FromGitter | <awr1> how do you stringify a given type's implentation |
21:18:26 | FromGitter | <awr1> it's like getTypeImpl() in macros right |
21:19:14 | FromGitter | <mratsim> myType.getTypeImpl().toStrLit() |
21:20:35 | FromGitter | <mratsim> @iffy, I think it's a concept bug, raise it on the tracker |
21:20:42 | rayman22201 | @iffy looks like a concept bug. The name conflict is the send proc. The compiler is using the send proc from channels and not your impl |
21:20:53 | * | Trustable quit (Remote host closed the connection) |
21:21:02 | rayman22201 | @mratsim beat me to it |
21:23:31 | * | Senketsu joined #nim |
21:23:46 | FromGitter | <awr1> thanks |
21:24:18 | * | birdspider quit (Remote host closed the connection) |
21:24:35 | * | ng0 joined #nim |
21:30:06 | * | Jesin quit (Quit: Leaving) |
21:30:33 | FromGitter | <awr1> i'm not getting why CI is breaking here |
21:30:34 | FromGitter | <awr1> https://travis-ci.org/nim-lang/Nim/builds/577494623?utm_source=github_status&utm_medium=notification |
21:31:09 | FromGitter | <arnetheduck> bad news btw, we'll continue bothering ya'all with nim stuff as we checked off a milestone on the ethereum foundation grants with Nimbus and our libp2p effort (https://libp2p.io/) - https://blog.ethereum.org/2019/08/26/announcing-ethereum-foundation-and-co-funded-grants/ |
21:31:59 | disruptek | grats! |
21:33:35 | * | solitudesf- quit (Ping timeout: 268 seconds) |
21:33:59 | FromGitter | <arnetheduck> in case you want to say you've interacted with the blockchain, you can now also try a friendly game of king-of-the-hill using nim as a smart contract language for a future wasm-based ethereum version: https://jacqueswww.github.io/kingplay/king.html |
21:35:21 | disruptek | you're blowing my mind right now. |
21:36:51 | FromGitter | <arnetheduck> do let @jacqueswww know as he did all the hard work ;) |
21:40:22 | * | absolutejam quit (Ping timeout: 268 seconds) |
21:41:17 | rayman22201 | Looks like the biggest single project grant pay out. Nice! Congratulations indeed 🎉 |
21:41:37 | FromGitter | <awr1> congrats! |
21:41:46 | rayman22201 | I guess Nim is working out alright for Status 😛 |
21:55:30 | * | Jesin joined #nim |
22:07:09 | FromDiscord_ | <treeform> I like seeing big $ and nim together. |
22:13:15 | * | Vladar quit (Remote host closed the connection) |
22:17:59 | * | theelous3 quit (Ping timeout: 268 seconds) |
22:28:58 | * | Senketsu quit (Quit: WeeChat 2.5) |
22:29:42 | * | shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:39:14 | FromGitter | <zetashift> @arnetheduck so 2 nim project's are getting grants? |
22:41:49 | * | Lullius[m] left #nim ("User left") |
22:43:21 | disruptek | is it possible to make nim generate the same C output if given identical nim input? ie. no random symbols? because then tests could be accelerated by ccache... |
22:44:03 | * | krux02 quit (Remote host closed the connection) |
22:45:00 | FromGitter | <mratsim> mangling is deterministic |
22:45:35 | disruptek | hmm, maybe it's me, then. |
22:47:12 | FromGitter | <mratsim> and I don't think the generated C code includes the time of generation or something non-deterministic but it should be easy to check |
22:53:42 | * | abm joined #nim |
22:54:45 | * | Kaivo quit (Quit: WeeChat 2.5) |
22:55:17 | disruptek | i rebuilt the compiler after setting the CC env and i guess that fixed it. |
23:13:39 | * | macsek1911[m] quit (Ping timeout: 252 seconds) |
23:13:40 | * | GitterIntegratio quit (Ping timeout: 252 seconds) |
23:14:25 | * | macsek1911[m] joined #nim |
23:15:06 | * | GitterIntegratio joined #nim |
23:18:45 | * | snooptek quit (Remote host closed the connection) |
23:35:23 | * | owl_000 joined #nim |
23:47:50 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
23:55:04 | * | abm quit (Quit: Leaving) |