00:21:57 | * | couven92 quit (Quit: Client Disconnecting) |
00:40:28 | * | m712 quit (Ping timeout: 260 seconds) |
00:47:00 | * | brson quit (Quit: leaving) |
01:12:30 | * | chemist69 quit (Ping timeout: 260 seconds) |
01:26:05 | * | chemist69 joined #nim |
01:45:18 | * | dddddd quit (Remote host closed the connection) |
02:06:48 | * | def-pri-pub joined #nim |
03:01:14 | * | zachcarter quit (Read error: Connection reset by peer) |
03:01:35 | * | zachcarter joined #nim |
03:15:19 | * | def-pri-pub quit (Quit: leaving) |
03:35:01 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:13:08 | * | perturbation joined #nim |
04:14:42 | * | perturbation quit (Client Quit) |
04:18:56 | FromGitter | <singularperturbation> @andreaferretti : you looking for contributors to https://github.com/unicredit/linear-algebra/ ? I've really enjoyed using it for a clustering project and would love to contribute. |
04:22:07 | FromGitter | <singularperturbation> The best feature (that would also probably be hardest to implement) would be arbitrary-dimension matrices (tensors) like in Numpy. Had to do something like a `seq[seq[Vector64[N]]]` for a collection of word2vec vectors. :) |
04:23:35 | FromGitter | <singularperturbation> if you have some suggestions for BLAS functions that you'd like to see added to nimblas, I could try working on that - otherwise, i might try adding webblas as a backend. Then the Nim JS backend can have the linalg library, too. :) |
04:32:43 | * | ofelas quit (Quit: shutdown -h now) |
05:02:22 | * | adeohluwa joined #nim |
05:07:04 | * | m712 joined #nim |
06:12:56 | * | rauss quit (Quit: WeeChat 1.7.1) |
06:18:01 | * | zachcarter quit (Quit: zachcarter) |
06:25:46 | * | xet7 quit (Ping timeout: 276 seconds) |
06:29:50 | * | rokups joined #nim |
06:32:37 | * | nsf joined #nim |
06:36:35 | * | Vladar joined #nim |
06:55:12 | * | Andris_zbx joined #nim |
07:44:47 | FromGitter | <andreaferretti> @singularperturbation I would be very happy to get contributions! |
07:45:12 | FromGitter | <andreaferretti> @mratsim has started the (separate) project https://github.com/mratsim/Arraymancer to support higher dimensional tensors |
07:45:45 | FromGitter | <andreaferretti> that said, I chose the API like it is because I do not really like numpy-like interfaces |
07:46:04 | FromGitter | <andreaferretti> I feel they are too removed from the mathematical literature |
07:46:18 | FromGitter | <andreaferretti> (and the word "tensor" is abused) |
07:47:05 | FromGitter | <andreaferretti> still, it is sometimes convenient to work with batch of matrices or something like that, and in that case the formalism is useful |
07:47:47 | FromGitter | <andreaferretti> I would really like NIm to have a solid base for machine learning algorithms, whether this is https://github.com/unicredit/linear-algebra/ or another library |
07:48:15 | FromGitter | <andreaferretti> supporting webblas would be really neat, although it is not a priority for me |
07:50:36 | FromGitter | <andreaferretti> I am toying with a neural network implementation here https://github.com/unicredit/neurotic (still undocumented) |
07:51:03 | FromGitter | <andreaferretti> and this is useful for me to figure out what things are missing |
07:59:20 | * | xet7 joined #nim |
08:10:57 | * | arnetheduck joined #nim |
08:13:50 | * | kier_ is now known as kier |
08:28:16 | * | yeeve joined #nim |
08:41:39 | * | Arrrr joined #nim |
08:41:39 | * | Arrrr quit (Changing host) |
08:41:39 | * | Arrrr joined #nim |
08:45:48 | * | xet7 quit (Ping timeout: 260 seconds) |
08:46:24 | * | xet7 joined #nim |
08:50:04 | * | Sentreen quit (Ping timeout: 276 seconds) |
08:58:37 | * | Vladar quit (Remote host closed the connection) |
09:02:46 | * | Sentreen joined #nim |
09:11:59 | * | couven92 joined #nim |
09:16:51 | * | bjz joined #nim |
09:43:42 | * | adeohluwa quit (Remote host closed the connection) |
09:43:42 | * | sz0 quit (Read error: Connection reset by peer) |
09:47:35 | * | krux02 joined #nim |
10:04:17 | * | Tiberium joined #nim |
10:05:21 | * | zachcarter joined #nim |
10:14:12 | * | sz0 joined #nim |
10:15:18 | * | BennyElg joined #nim |
10:18:14 | * | adeohluwa joined #nim |
10:18:16 | Tiberium | wow, nimsuggest with new vscode-nim is so fast! |
10:18:16 | Tiberium | https://github.com/pragmagic/vscode-nim/pull/48 |
10:18:22 | Tiberium | literally instant suggestinons |
10:18:26 | Tiberium | *suggestions |
10:25:04 | euantor | Nice, I need to give that a go |
10:28:50 | Tiberium | and also nimsuggest is so smart! how it can be possible to use "go to definition" inside two macros, and if the thing you're trying to go to is a template itself? :D |
10:29:15 | Tiberium | does it use parts of the compiler heavily? |
10:45:05 | * | branduardi joined #nim |
10:45:34 | * | branduardi left #nim (#nim) |
10:50:51 | Araq | Tiberium: nimsuggest is just a server frontend to the compiler really |
10:51:21 | Araq | the whole compiler has to be written with this feature in mind though |
10:51:50 | Araq | so some old code in it is still not good at it ;-) |
10:53:06 | Tiberium | Araq, but anyway this is very cool feature |
10:53:23 | Tiberium | is there any other languages with feature like this ? |
10:54:05 | Araq | I think many newer languages do it this way, C# is particularly strong at it, IMO |
10:58:37 | krux02 | nimsuggest in emacs is so slow, that I always turn it off |
10:58:46 | krux02 | because it blocks editing |
10:59:21 | zachcarter | krux02: http://fragworks.io |
11:01:17 | krux02 | yes i have already seen it, but I just gave it a star |
11:01:46 | zachcarter | thanks! :D |
11:01:57 | zachcarter | I didn’t know if you had seen the new website or not |
11:02:31 | * | Snircle joined #nim |
11:03:42 | krux02 | I think it is even linked from the Nim homepage |
11:03:46 | krux02 | gave you a lot of stars |
11:03:52 | krux02 | many more than my project |
11:04:12 | krux02 | no wonder, I suck at supporting Apple |
11:04:31 | krux02 | and others also had problems trying that project |
11:06:24 | krux02 | someone wants to use my phone number to validate a VK profile |
11:09:06 | FromGitter | <Varriount> zachcarter: regarding the api, are you going to try to abstract away some of the backend details (such as the SDL data types used In the examples) |
11:09:58 | zachcarter | yup |
11:10:21 | zachcarter | this has to happen with pretty much every integration |
11:10:28 | zachcarter | it’s already happened with some of the nuklear stuff |
11:10:29 | krux02 | Well you can do that not sure if you should. |
11:10:31 | zachcarter | less with the bgfx / sdl code |
11:10:56 | krux02 | Nim allows you to add any methods to already existing types, and using known types from SDL can be an advantage |
11:11:02 | zachcarter | it would make the framework easier to use I imagine, but might add an extra layer of indirection to the code |
11:11:40 | krux02 | but if you want to hide it I wont stop you. But in my project I will not do it for that reason. |
11:12:09 | krux02 | easier to use is realative |
11:12:17 | zachcarter | true |
11:12:28 | FromGitter | <Varriount> I ask, because you might find that, at somepoint in the future, you need to support a platform or situation in which a particular library won't work |
11:12:28 | krux02 | SDL types might already be known types and the documentation is already written |
11:13:26 | krux02 | Varriount: that is true, but SDL? I doubt it. |
11:13:35 | zachcarter | yeah i’m hoping I won’t run into that situation with sdl |
11:13:39 | zachcarter | or bgfx for that matter |
11:13:42 | zachcarter | they’re very core to the framework |
11:13:49 | zachcarter | the imgui solution i can see |
11:14:24 | krux02 | well you can still submit a patch for SDL in case something really doesn't work |
11:16:30 | dom96 | Wow. I just managed to create a fork bomb using staticExec + an import in Nim. |
11:19:49 | * | PMunch joined #nim |
11:20:34 | zachcarter | :D |
11:29:58 | dom96 | I got choosenim to work on Windows XP yesterday :D |
11:31:01 | FromGitter | <Varriount> choosenim? |
11:31:05 | zachcarter | yesssss dom96 |
11:31:21 | dom96 | Varriount: rustup for Nim |
11:31:46 | FromGitter | <Varriount> And what's rustup? |
11:32:16 | dom96 | look it up |
11:51:57 | Tiberium | hmm, can I use nim queues to collect requests to api and send them at once? so different modules in my app are calling one proc called "callMethod" which calls an api method |
11:53:03 | Tiberium | Maybe not queues, but I want to have something to collect up to 25 requests to API in 0.35 seconds, send them at once, and return results |
11:53:25 | Tiberium | (at the time I can collect them and send every 0.35 seconds, but I don't know how to send the result back to callMethod) |
11:54:41 | Tiberium | currently I have a queue and an async proc which takes all requests from queue and sends them to API |
11:55:25 | Tiberium | (every 350ms) |
11:56:22 | Tiberium | maybe I can define a queue like initQueue[tuple[myCall: string, result: string]](32) and then in callMethod wait until "result" will fill up? |
12:05:16 | * | bjz_ joined #nim |
12:05:43 | * | bjz quit (Ping timeout: 276 seconds) |
12:14:55 | FromGitter | <andreaferretti> @dom96 is choosenim yet available somewhere? |
12:23:11 | dom96 | andreaferretti: not yet. Should be available soon though. |
12:23:12 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
12:23:33 | dom96 | Once it is I would really appreciate it if you guys could test it :) |
12:26:52 | Tiberium | dom96, I will test it on my PC - Manjaro distro (based on Arch Linux) :) |
12:33:00 | * | bjz_ quit (Ping timeout: 240 seconds) |
12:34:21 | * | bjz joined #nim |
12:36:31 | * | zachcarter quit (Quit: zachcarter) |
12:41:19 | FromGitter | <andreaferretti> I can test it on Ubuntu and ask @evacchi to test it on MacOS |
12:43:56 | FromGitter | <Varriount> @dom96 I can test it on OSX and Windows 10 |
12:44:16 | dom96 | Great :) |
12:44:26 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:45:01 | FromGitter | <Varriount> Though, for OSX users, it's probably better just to recommend using homebrew |
12:45:41 | krux02 | isn't the default package manager always the best when available? |
12:46:11 | krux02 | apt-get/yast/pacman etc |
12:46:21 | FromGitter | <Varriount> Chocolatey too |
12:46:41 | FromGitter | <Varriount> (Windows package manager) |
12:46:49 | krux02 | didn't know that |
12:47:02 | krux02 | I thought because of ubuntu shell it would become apt-get |
12:47:09 | PMunch | Yeah, I really dislike it when programs try to make their own update system in a package management environment.. |
12:47:27 | PMunch | The only exception is compiled programming languages |
12:47:33 | krux02 | I am not a windows user anymore since windows 7, but I did use it from Windows 3.11 onwards |
12:47:42 | FromGitter | <Varriount> krux02: apt-get is used for the subsystem |
12:47:59 | FromGitter | <Varriount> But it can only install Linux applications inside the Linux environment |
12:48:11 | FromGitter | <Varriount> Chocolatey works on the Windows side. |
12:48:11 | Tiberium | krux02, also you can install other distros in WSL |
12:48:17 | Tiberium | but it's not official :) |
12:48:50 | Tiberium | So I didn't come to solution for my problem yet. |
12:49:01 | * | Vladar joined #nim |
12:49:04 | krux02 | interesting that windows finally has what Linux has since at lest 2006 (even much earlier, but that is when I started with it) |
12:49:42 | dom96 | Varriount: Homebrew won't let you easily switch Nim versions. |
12:50:27 | Tiberium | in python's asyncio there is "wait_for", queues, "Task" for doing async queue stuff |
12:50:38 | krux02 | my version of choosenim is called git checkout |
12:50:49 | Tiberium | and you can set the result of task |
12:50:51 | FromGitter | <Varriount> krux02: Windows isn't targeted towards programmers. |
12:51:17 | krux02 | I know yet it is the main operating system for game developers |
12:51:47 | krux02 | They hate it, but still don't build the foundation to make Linux the foundation of game development |
12:52:20 | krux02 | anyway not diving into that discussion |
12:52:49 | FromGitter | <Varriount> Probably for the best. |
12:52:56 | * | devted joined #nim |
12:53:24 | Tiberium | Is there something like that in Nim? https://docs.python.org/3/library/asyncio-task.html#task |
12:53:34 | krux02 | Araq: I challenged your statement on grep: https://forum.nim-lang.org/t/2925/2 |
12:55:17 | krux02 | there is FlowVar |
12:55:38 | Tiberium | krux02, can I use it with async? |
12:56:53 | * | devted quit (Ping timeout: 240 seconds) |
12:57:08 | Tiberium | ah, it seems that no |
12:57:22 | Tiberium | because async macro is generally not thread-safe |
12:57:56 | FromGitter | <Varriount> I'd ask dom96 |
12:58:13 | Tiberium | I really need something like FlowVar, but for async |
12:58:22 | dom96 | What are you trying to do Tiberium ? |
12:58:56 | dom96 | You can use FlowVar with async but currently it's not very efficient |
12:59:12 | Tiberium | dom96, my app doesn't require millions of them :) |
12:59:36 | Tiberium | 75 is the most theoretically possible value of them in 1 second |
13:00:42 | dom96 | hrm? |
13:00:50 | dom96 | what's "them"? |
13:01:11 | Tiberium | dom96, number of FlowVar instances :) |
13:01:42 | Tiberium | (I'm optimizing my API calls to social network - there's a special api call for which you can make a js-like script using up to 25 api calls and then return value of all of them). So you theoretically can have 75 API calls per second instead just 3 |
13:02:22 | dom96 | I don't think you need threads for that. Just multiple instances of AsyncHttpClient. |
13:03:20 | Tiberium | dom96, oh, I mean that currently I have one proc (which is started via asyncCheck) and a queue, so every api call is being added to queue, and every 350 ms all items in queue are sent as one api call |
13:03:49 | Tiberium | so I can't figure out how to receive them. I'll show you part of my code responsible for that |
13:07:21 | Tiberium | dom96, https://gist.github.com/TiberiumN/e1d719cf58721b59a19c3b51efd0bf8d, but sadly you can't run it |
13:09:25 | Tiberium | probably my approach is very wrong |
13:10:03 | dom96 | So when you call the api call |
13:10:07 | dom96 | add its result to another queue |
13:10:17 | dom96 | and then process the results somewhere |
13:10:48 | Tiberium | dom96, ok |
13:17:38 | Tiberium | dom96, oh, so I can't wait for result in callMethod itself? |
13:18:18 | dom96 | You can if you have access to the Futures |
13:22:19 | Tiberium | dom96, oh, and can you give me an advice on how to do it? |
13:22:41 | * | zachcarter joined #nim |
13:22:43 | FromGitter | <andreaferretti> @Varriount if I understand correctly, choosenim will be useful to keep multiple Nim versions and switch between them |
13:22:55 | chemist69 | ... that moment when you write `echo xyz` in your PYTHON program to print something... |
13:23:00 | FromGitter | <andreaferretti> something that would be more cumbersome with homebrew, apt-get and so on |
13:23:29 | Tiberium | chemist69, happens with me too |
13:24:34 | dom96 | Tiberium: Store a resultsQueue in your VkAPI object (hopefully it's a ref) |
13:24:50 | dom96 | then go through each future in the resultsQueue and await it |
13:25:26 | PMunch | http://ix.io/stM Araq, please tell me how this is a really bad idea :P |
13:30:35 | * | PMunch-mobile joined #nim |
13:31:17 | Araq | PMunch: never said it's a bad idea, it's what concepts eventually will give us |
13:31:29 | Araq | but right now a concept is only a generic constraint |
13:31:51 | PMunch | Ah, so the idea is to push them in the direction og Go interfaces. Just better |
13:32:19 | Araq | yeah |
13:32:30 | couven92 | Araq, so the concepts are basically just a very much more powerful C# where clause? |
13:32:46 | Araq | that is correct, couven92 |
13:33:30 | couven92 | But PMunch's implementation basically gives us interfaces in Nim, right? I mean, this is how interfaces work in e.g. C# |
13:37:40 | PMunch | http://ix.io/stQ Is there a better way to specify in the concept that the procedure takes a float? |
13:43:16 | demi- | i have a library suggestion, if anyone feels up to undertaking it: there is currently a cassowary constraint solver library in nimble, someone should take that and combine it with a curses library to create a UI layout system for the console. |
13:50:08 | krux02 | demi-: really? |
13:50:26 | demi- | krux02: what? |
13:51:15 | krux02 | you just asked that somebody can make you a console UI system |
13:52:22 | Tiberium | dom96, yay, it works! |
13:52:37 | demi- | no, i suggested putting two existing libraries together |
13:52:59 | krux02 | I think it is very unlike that someone will do it for you. I think if you want it, you need to build it. |
13:53:32 | demi- | krux02: that's ok, i don't need it; i thought it was an interesting idea |
13:53:47 | Araq | demi-: I had the idea of using that library to create an CSS alternative for karax ;-) |
13:54:06 | Araq | but I don't need it immediately either |
13:54:10 | demi- | cool! |
13:54:27 | krux02 | I heared css is not very suitable to layout text. |
13:55:23 | demi- | krux02: i think my point is, out of all the libraries that are available for nim, someone built a cassowary constraint solver. and that kind of thing as some very unique uses that would be cool to see implemented |
13:55:23 | krux02 | It's the web, here it is not asked what tool is the best, but what can you use from the browser |
13:56:26 | Araq | krux02: I think these days CSS wastes more billions than C buffer overflows |
13:57:08 | Araq | I've yet to meet a single person who is productive with it. |
13:57:31 | demi- | it is really awful tbh |
13:57:44 | dom96 | okay, what's better? |
13:58:02 | krux02 | latex :P |
13:58:22 | demi- | dom96: that is the no-so-funny punchline |
13:58:48 | Araq | most WYSIWYG tools would be better. |
13:59:08 | * | AndChat-635481 joined #nim |
14:00:21 | dom96 | haha |
14:00:29 | krux02 | Well I don't work with CSS so I can't compare it to anything. But latex is pretty horrible to use, too. |
14:00:37 | * | AndChat-635481 quit (Client Quit) |
14:00:44 | Araq | VisualBasic is better |
14:01:04 | krux02 | I don't dislike the distinction of data (document with text and chapters and so on) and the layout declaration somewhere else |
14:01:27 | Araq | here is a form, put some buttons on it, define the anchors, done |
14:02:12 | krux02 | in WYSIWYG editors people often mix up layout with structure but that doesn't necessarily make it worse. |
14:02:23 | * | PMunch-mobile quit (Ping timeout: 240 seconds) |
14:02:27 | dom96 | WYSIWYG is horrible for websites. |
14:02:29 | * | AndChat-635481 joined #nim |
14:02:47 | dom96 | It's akin to editing Word documents. |
14:03:34 | krux02 | Well I think basic HTML isn't too bad |
14:03:38 | krux02 | it's ugly |
14:03:50 | krux02 | but it is nice to write the document :P |
14:04:21 | Araq | dom96: CSS doesn't allow for decent WYSIWYG tooling so of course the current tools are bad |
14:04:38 | dom96 | hah |
14:05:10 | dom96 | "WYSIWYG is better!" ... "Well, it's bad because CSS is bad!" |
14:06:18 | krux02 | WYSIWYG plus some visual stuff that shows the structure of the document that are only visible when editing |
14:06:26 | krux02 | I don't think that is bad at all |
14:06:51 | Araq | I made my points clear and I gave an example of tool which offers a much more productive workflow. |
14:06:57 | krux02 | I think word is bad, because it is still paper oriented |
14:07:35 | krux02 | who cares about paper? Things a shown on either a 16:9 monitor or a small mobile screen |
14:07:44 | krux02 | a minority of text is actually printed |
14:08:24 | krux02 | with latex it's the same |
14:11:06 | Araq | dynamic positing via JS code (or code that compiles to JS ;-) ) is also likely better but I'm about to try it out. |
14:12:12 | Araq | that would be the solution that avoids CSS, it could be done with WYSIWYG too, but WYSIWYGs that target CSS are doomed. |
14:12:25 | * | AndChat-635481 quit (Ping timeout: 260 seconds) |
14:13:36 | Araq | see? It's a perfectly consistent opinion here, no contradictions, no need for childish "hah"s. |
14:22:20 | * | PMunch-mobile joined #nim |
14:22:33 | * | PMunch-mobile quit (Client Quit) |
14:23:00 | * | PMunch-mobile joined #nim |
14:24:08 | * | AndChat-635481 joined #nim |
14:24:53 | * | AndChat-635481 quit (Client Quit) |
14:25:14 | * | PMunch-mobile quit (Read error: Connection reset by peer) |
14:25:28 | * | PMunch-mobile joined #nim |
14:25:40 | * | PMunch-mobile quit (Client Quit) |
14:30:47 | PMunch | http://ix.io/su7 any idea why the compiler is so ungodly slow when compiling this? |
14:33:16 | * | arnetheduck quit (Ping timeout: 268 seconds) |
14:39:33 | * | fredrik92 joined #nim |
14:40:00 | * | fredrik92 quit (Client Quit) |
14:41:25 | couven92 | it looks like the processing of concepts.nim is taking very long time in PMunch's code... |
14:41:40 | * | Tiberium quit (Remote host closed the connection) |
14:41:55 | PMunch | concepts.nim is the script |
14:41:57 | * | Tiberium joined #nim |
14:42:00 | PMunch | Or snippet |
14:42:25 | couven92 | and I can confirm that it is the same on my computer as well (though that admittedly is the same hardware as PMunch has right now) |
14:42:39 | PMunch | So it is the compilation of the tiny 38 line snippet which takes a really long time.. |
14:44:05 | * | Arrrr quit (Quit: Leaving.) |
14:44:58 | * | rokups quit (Ping timeout: 276 seconds) |
14:44:59 | couven92 | 6 seconds is long? Right... I live together with 3 geologists, they recently watched a documentary on the earth's creation and there they talked about some rock formation process that took ONLY 15 million years... |
14:45:10 | couven92 | I guess it's all about perspective! :P |
14:45:22 | PMunch | Hmm, tried to change the "x.move(0.0)" in the concept to "let f:float; x.move(f)" which works fine in the compiler but nimsuggest complains.. |
14:45:36 | * | Sentreen quit (Ping timeout: 260 seconds) |
14:45:36 | * | FromGitter quit (Ping timeout: 260 seconds) |
14:45:54 | * | jmkr quit (Ping timeout: 264 seconds) |
14:49:35 | PMunch | Well, NimLine complains |
14:52:18 | * | cspar_ joined #nim |
14:53:44 | Araq | PMunch: proc ToICanMove and explicit calls to it make it fast again |
14:54:04 | Araq | it's not the concept, it's the converter that slows it down by a factor of 10 |
14:54:14 | PMunch | Really? |
14:54:19 | Araq | try it. |
14:54:27 | PMunch | Hold on |
14:55:13 | * | cspar__ quit (Ping timeout: 255 seconds) |
14:55:29 | * | rokups joined #nim |
14:55:59 | PMunch | Hmm, yeah that was a lot faster |
14:56:04 | PMunch | Why is that? |
14:57:50 | * | jmkr joined #nim |
15:00:41 | Araq | converters suck |
15:00:52 | Araq | (I don't know) |
15:01:50 | * | yglukhov joined #nim |
15:04:38 | PMunch | Hmm, that sucks.. |
15:04:49 | PMunch | I've used them before but haven't noticed this kind of a slowdown.. |
15:05:26 | PMunch | But that was a larger project so it could just be that it didn't add all that much comparatively.. |
15:05:36 | * | PMunch quit (Quit: leaving) |
15:09:04 | couven92 | I don't really see why converter should be soo slow... Isn't it *just* a matter of filtering all defined converter procs and choosing a matching one? :O Although, I can see why the matching can be difficult, especiallt in this case where the converter is also generic |
15:10:06 | * | PMunch joined #nim |
15:10:49 | * | stisa_ joined #nim |
15:11:51 | PMunch | Why are converters so bad though? Is it a fundamental flaw or just implementation? |
15:12:32 | * | Sentreen joined #nim |
15:12:46 | * | zevlg quit (Remote host closed the connection) |
15:12:58 | * | stisa_ quit (Client Quit) |
15:16:37 | Araq | I don't know. I don't like converters because they weaken the type system too much. I can always imagine how to convert from A to B but that doesn't make it a good idea |
15:17:42 | * | Arrrr joined #nim |
15:17:42 | * | Arrrr quit (Changing host) |
15:17:42 | * | Arrrr joined #nim |
15:22:55 | * | krux02 quit (Remote host closed the connection) |
15:24:57 | PMunch | Well, I can see that. But sometimes they are pretty useful (as in this case) |
15:32:40 | * | PMunch quit (Quit: Bye) |
15:52:12 | * | Vladar quit (Quit: Leaving) |
16:31:18 | * | Trustable joined #nim |
16:34:34 | * | Andris_zbx quit (Remote host closed the connection) |
16:37:14 | * | couven92 quit (Quit: Client disconnecting) |
16:39:07 | * | nsf quit (Quit: WeeChat 1.7.1) |
16:42:50 | * | BennyElg_ joined #nim |
16:43:00 | * | BennyElg quit (Ping timeout: 260 seconds) |
16:54:11 | * | brson joined #nim |
16:57:36 | * | gokr joined #nim |
17:02:06 | * | gokr quit (Ping timeout: 264 seconds) |
17:04:03 | * | yglukhov quit (Remote host closed the connection) |
17:08:03 | * | yglukhov joined #nim |
17:12:19 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:12:36 | * | Tiberium quit (Remote host closed the connection) |
17:48:28 | dom96 | hrm, are try statements not allowed in a finally? |
17:51:12 | * | Trustable quit (Remote host closed the connection) |
17:52:18 | * | rokups quit (Quit: Connection closed for inactivity) |
18:03:09 | * | krux02 joined #nim |
18:03:19 | * | zachcarter_ joined #nim |
18:05:25 | * | zachcarter quit (Ping timeout: 268 seconds) |
18:07:31 | * | zachcarter_ quit (Ping timeout: 240 seconds) |
18:07:38 | * | zachcarter joined #nim |
18:20:30 | * | PMunch joined #nim |
18:31:54 | PMunch | Hmm, I've got to ask again. In a concept, is there a better way than "CanMove = concept x; x.move(0.0)" to ensure that x has a procedure that takes a float? |
18:41:01 | stisa | dom96 looks like the gitter bridge is down |
18:53:05 | * | zachcarter quit (Quit: zachcarter) |
18:59:47 | dom96 | stisa: I don't maintain it. oprypin does. |
19:01:11 | stisa | oh sorry, I'll try to contact him then |
19:02:06 | oprypin | hi... |
19:02:52 | PMunch | Uhm, what does "Error: internal error: genTypeInfo(tyUserTypeClass)" mean? |
19:07:34 | * | brson quit (Ping timeout: 276 seconds) |
19:22:19 | * | yglukhov joined #nim |
19:22:55 | oprypin | whelp someoone decided to hijack the FromGitter nickname |
19:23:07 | oprypin | how's that even possible |
19:23:16 | * | Tiberium joined #nim |
19:23:28 | PMunch | Haha, you didn't register it? |
19:23:43 | * | FromGitter joined #nim |
19:23:54 | oprypin | I did, that's the stupid part |
19:24:02 | PMunch | Huh, that's strange |
19:24:29 | oprypin | someone can actually join while you're not connected and take your nickname, and you have to actively kick them out via msg nickserv ghost |
19:24:41 | PMunch | Ah right |
19:24:52 | FromGitter | <Varriount> Yay, IRC link is back. |
19:24:59 | PMunch | Guess you should configure the bot to auto do that :P |
19:26:08 | oprypin | that was some kind of [email protected] (nodeJS IRC client) which was not connected to any room... |
19:26:24 | * | yglukhov quit (Ping timeout: 240 seconds) |
19:26:58 | FromGitter | <Varriount> oprypin: You can set chanserv to auto-disconnect people with your nickname if they don't identify within a minute |
19:27:09 | FromGitter | <Varriount> Or nickserv. One of the service bots |
19:28:01 | * | couven92 joined #nim |
19:29:27 | oprypin | Varriount, can't find it. |
19:30:44 | oprypin | ok. /msg nickserv help set enforce |
19:32:51 | * | FromGitter quit (Remote host closed the connection) |
19:32:59 | * | FromGitter joined #nim |
19:33:51 | * | brson joined #nim |
19:38:25 | * | Ven joined #nim |
19:38:49 | * | Ven is now known as Guest85489 |
19:39:04 | * | gokr joined #nim |
19:39:45 | * | Arrrr quit (Quit: Leaving.) |
19:42:10 | * | yglukhov joined #nim |
19:45:55 | * | BennyElg_ quit (Ping timeout: 276 seconds) |
19:47:26 | PMunch | Hmm, I'm trying to write a better concept |
19:47:38 | PMunch | Currently I have concept x; x.move(0.0) |
19:48:07 | PMunch | So there must exist a proc that is move(x, <any float>) |
19:48:19 | PMunch | Is there a nicer way to specify that move takes a float? |
19:48:43 | FromGitter | <Varriount> Can't you just put `concept x; x.move(float)`? |
19:49:10 | PMunch | Huh, apparently I can :P |
19:49:19 | PMunch | I didn't think that would be possible |
19:49:58 | PMunch | Wouldn't that be a proc (x: typeofX, f: typedef) or something? |
19:51:02 | FromGitter | <Varriount> No. If you want such a procedure, you would do `concept x; x.move(typedesc[float])` |
19:51:45 | PMunch | Ah right |
19:55:26 | Araq | PMunch: that's a special rule for concept matching |
19:55:29 | * | BennyElg joined #nim |
19:55:45 | PMunch | Evidently |
19:56:12 | Araq | and I don't like it, I argued proc move(self; x: float) should be used instead of this "write how it can be used" syntax |
19:57:52 | PMunch | Yeah, it's a bit confusing |
19:58:23 | PMunch | But it does have some benefits |
19:58:34 | PMunch | For example what if move isn't a proc but a template |
19:59:35 | PMunch | It's still callable like x.move(0.5) but it's no longer a proc move(self; x: float) |
20:00:28 | Araq | in my proposal 'proc move(self; x: float)' would match a template too :P |
20:00:54 | PMunch | Ugh, that's not nice :P |
20:00:59 | PMunch | http://ix.io/sw0 |
20:01:00 | Araq | we could also leave out the 'proc' keyword to make it less confusing :P |
20:01:09 | PMunch | That works fine by the way for what I was doing |
20:01:32 | PMunch | With a template and no converter :) |
20:02:23 | PMunch | Hmm, that would look a bit weird though |
20:03:02 | PMunch | I mean the usage thing is neat. But a bit confusing at first. I think simply adding more documentation and examples would work fine. |
20:03:14 | FromGitter | <Varriount> Araq: So we would have `concept x; move(x: ?, y: float)`? |
20:03:43 | PMunch | Unless it stands in the way for other features |
20:04:42 | PMunch | How do you plan to do the interfaces for example. Could potentially make everything more confusing :P |
20:05:31 | FromGitter | <Varriount> Hm. The benefits of Araq's syntax is that you could potentially reference the parameters of a procedure in another part of the body. |
20:05:44 | FromGitter | <Varriount> Which I suppose could be useful for generics. |
20:06:06 | Araq | both syntaxes are on par featurewise |
20:06:33 | Araq | it's just that mine is Nim-like by definition and zahary's is more alien |
20:08:06 | * | BennyElg quit (Ping timeout: 264 seconds) |
20:08:22 | * | BennyElg joined #nim |
20:08:25 | FromGitter | <Varriount> Concepts in general are weird. |
20:08:46 | * | Tiberium quit (Remote host closed the connection) |
20:09:00 | FromGitter | <Varriount> Meshing what resembles a procedure body with a type definition... it's odd. |
20:12:30 | dom96 | I prefer Araq's version as well. |
20:13:24 | FromGitter | <Varriount> I think I prefer zahary's version |
20:13:50 | couven92 | sorry I was to the party... Anyone nice enough to paste me the link of the discussion? :O |
20:13:55 | couven92 | *late |
20:14:42 | demi- | hmmm, i'm using `execProcesses` in `osproc`. the documentation says that it executes the commands in parallel, but the time i'm seeing it take is as if they are being run in serial, not parallel. |
20:14:42 | couven92 | of the two concept versions I mean? |
20:15:13 | PMunch | couven92, were talking about the syntax of concepts |
20:15:28 | PMunch | zahary's version is the current version |
20:15:41 | couven92 | PMunch, yeah I got that... okay where's Araq's version? |
20:15:43 | dom96 | couven92: http://irclogs.nim-lang.org |
20:15:56 | couven92 | ah... okay... sorry |
20:16:01 | PMunch | Araq proposed to change it to something like `concept x; move(x: ?, y: float)` |
20:16:10 | * | rauss joined #nim |
20:16:17 | couven92 | I though we were referencing GitHub or the forums... my bad... :P |
20:20:02 | PMunch | couven92, rewrote the code to this by the way: http://ix.io/sw0 |
20:20:11 | couven92 | Araq, why's the ? in your proposal more Nim-like? I agree though that the define by usage style is very alien... |
20:20:51 | couven92 | PMunch, yeah, I saw that... to show off both procs and templates |
20:21:08 | Araq | couven92: my examples don't use ? |
20:21:18 | Araq | they use 'self' |
20:21:37 | couven92 | Ah... okay... self as a new Nim keyword to use in concepts? |
20:21:40 | PMunch | couven92, this version doesn't have the converter, but rather an explicit add procedure for the Mover which does the conversion |
20:21:50 | couven92 | I noticed |
20:22:17 | couven92 | PMunch, maybe also introduce Fish and a macro, just to be sure? |
20:22:48 | couven92 | The text should obviosly there reflect that Fish move by swimming or sth like that! :P |
20:28:18 | couven92 | might I suggest: `CanMove[T] = concept; move(x: T, ticks: float)` (replace ; by newline) |
20:28:44 | couven92 | basically work with the generic marker instead of introducing a new keyword? |
20:32:31 | couven92 | See https://gist.github.com/couven92/f9db741b5cf5bbf9ea09efd5ae296096 for reference |
20:32:57 | FromGitter | <Varriount> Actually, how would one currently write mutually recursive procedures? That's be biggest benefit I can see from such syntax |
20:33:44 | couven92 | I argue that this would make the AST easier, since the structure of a concept type decl is very similar to an object of ref type decl (as it contains the same elements) |
20:35:25 | PMunch | But how would you specify something like m.len is Ordinal |
20:37:44 | couven92 | PMunch: by doing `len(m: T): int` |
20:38:04 | PMunch | But with the old syntax len could also be a field of m |
20:38:31 | couven92 | ouch... okay, I see.. |
20:39:25 | FromGitter | <Varriount> There's no reason you can't keep the body syntax the same |
20:40:25 | couven92 | @Varriount that's actually true... I only changed the first line and moved the concept variables to the generic declaration instead |
20:40:48 | FromGitter | <Varriount> Or you could do something like `len(m: T) or len` |
20:41:05 | FromGitter | <Varriount> Sorry, `len(m: T) or len: T` |
20:41:41 | FromGitter | <Varriount> Though, that expression sounds like an AST nightmare |
20:41:42 | couven92 | @Varriount, actually: `(len(m: T): int) or (len: int)` |
20:42:12 | PMunch | Yeah, but then you would have to expect writers to do that. |
20:43:00 | FromGitter | <Varriount> Hm. Isn't the current syntax going to make the whole 'vref/vptr' feature hard though? |
20:43:02 | couven92 | yeah... well, there's a reason that interfaces can **either** declare gettable anr/or settable properties **or** methods |
20:43:06 | couven92 | in C# |
20:43:33 | PMunch | The thing with the current syntax is that "as long as this compiles it's matching" which means that whoever tries to match with it can choose any way to make those available as long as the syntax compiles. So if you write the syntax you need in the concept and then use just that then you're fine. |
20:43:41 | * | Matthias247 joined #nim |
20:44:28 | couven92 | In C#, you can do both even with the same name, but not in the same interface. But a class can implement both a interface delacring `a` as a method, as well as `a` as a property |
20:44:54 | FromGitter | <Varriount> True. The syntax a concept body accepts is pretty much like standard Nim code. |
20:46:45 | * | nsf joined #nim |
20:51:43 | PMunch | One problem with concepts |
20:52:24 | PMunch | Since it has the whole "as long as it compiles" thing it just grabs all compile-errors. Including things that can't change between types.. |
20:53:06 | * | Guest85489 quit (Ping timeout: 264 seconds) |
20:53:57 | * | Ven joined #nim |
20:54:21 | * | Ven is now known as Guest35405 |
21:01:17 | * | rauss quit (Quit: WeeChat 1.7.1) |
21:05:28 | FromGitter | <Varriount> PMunch: What do you mean? |
21:06:33 | PMunch | "Test = concept x; x is flot" no complaints |
21:06:57 | PMunch | I don't have anything that is flot, and nothing I can put in x will make a flot available |
21:07:07 | PMunch | Because it's just a sad little misspelled float :( |
21:07:28 | FromGitter | <Varriount> Huh. I always assumed that the compiler would throw an error in such case, as the symbol needs to be closed. |
21:07:39 | PMunch | So the entire concept just never matches. Which could be hard to debug.. |
21:08:11 | FromGitter | <Varriount> @Araq What's the reasoning for the above behavior? |
21:09:27 | Araq | I didn't write the concepts implementation |
21:09:38 | couven92 | PMunch, maybe it's because it supposed to be "flott" (i.e. Norwegian for 'brilliant') ;-) |
21:11:13 | PMunch | Well, reading the docs it seams like concepts are just evaluated by compiling it whenever you try to pass something to a proc that accepts a concept. If the concept compiles (and all boolean statements are true) it okays the passed statement |
21:11:49 | couven92 | Araq, what do you think about putting the concept variables in the 'generic' rectangular brackets? And not having self, but instead the symbol as declared inside the rectangular brackets? |
21:12:00 | PMunch | The problem is that the above snippet would never compile, since flot doesn't exist anywhere. But it's just silently mangled and ends with the concept never matching.. |
21:15:37 | FromGitter | <Varriount> PMunch: I'd file an issue and tag zahary in it for that. In my mind, the symbol binding rules in concepts should follow the symbol binding rules in generic bodies |
21:16:11 | FromGitter | <Varriount> Things are complicated enough without adding in a third symbol binding mode. |
21:17:05 | Araq | yeah, I agree with varriount. |
21:18:01 | Araq | PMunch: see? this is also solved by my syntax, here it is obvious that 'proc foo(x: int)' means 'int' from system.nim with a potentially not yet visible 'foo' operation |
21:18:59 | Araq | couven92: generic concepts are also already in the works, better discuss these things where zahary can read it too (--> github) |
21:19:37 | FromGitter | <Varriount> Best to discuss them now, while things can still be (at least somewhat) changed and modified |
21:22:57 | Araq | yeah I agree |
21:24:28 | couven92 | maybe we could also write up some extensive sample code to evaluate use-cases where one solution is obviously better than others... |
21:27:16 | couven92 | e.g. in the case where `someMagicSymbolDeclaredInAConcept` can match both agains a proc, template and field. What do we gain by doing that? We still need to implement a type that matches the concept anyways, so what is the problem with restricting it to just proc? |
21:28:30 | Araq | couven92: no, many concepts just describe Nim's conventions |
21:28:46 | Araq | so flexibility in matching e.g. 'len' is nice to have |
21:28:56 | * | Guest35405 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:29:23 | couven92 | Yeah, but in some cases it might even be dangerous if a field declaration in the concept also might be matched by a long running function, that might have unintended side-effects |
21:31:00 | couven92 | I get why we have it elsewhere... But since a Concept is more a structural declaration of what I should be able to with a type, there might be things to be said in favor for a *structured* declaration... |
21:32:46 | couven92 | This also works the other way round: I can declare a concept that only matches agains procs annotated with thread-safe pragmas. |
21:33:12 | * | bjz joined #nim |
21:34:17 | FromGitter | <Varriount> couven92: There's a problem with the whole 'can match a procedure, template, or attribute' - how is the upcoming vptr/vref feature going to handle such cases? |
21:35:07 | FromGitter | <Varriount> I guess thunks could be generated for attributes, but I have no idea how templates would work. |
21:35:44 | Araq | the same way, via thunks |
21:35:46 | couven92 | I have actually no idea on what vptr/vref is, so I'll have to read up on that. But I'm arguing for a more restricted type-declaration like syntax |
21:36:18 | dom96 | omg, the extensions param's type in findExe differs based on the OS |
21:36:42 | Araq | dom96: that's documented behaviour and makes sense |
21:36:54 | Araq | oh I misread |
21:37:05 | Araq | you mean the *type* differs? that's bad |
21:37:09 | dom96 | yes |
21:37:12 | FromGitter | <Varriount> O_o |
21:37:16 | dom96 | https://github.com/nim-lang/Nim/blob/devel/lib/pure/ospaths.nim#L571 |
21:37:34 | dom96 | It's array[3, string] on Windows and array[1, string] on Posix |
21:38:02 | Araq | ah lol, that's my fault :-) |
21:38:05 | FromGitter | <Varriount> Needs to be an openarray type |
21:38:09 | Araq | yeah |
21:38:30 | * | icebattle joined #nim |
21:38:36 | FromGitter | <Varriount> @Araq By the way, openarray is a really neat feature |
21:38:41 | dom96 | yep, going to fix it now |
21:38:47 | Araq | thanks |
21:45:15 | couven92 | Araq, regarding the "better discuss these things on GitHub": Should I open a new issue "Concepts syntax changes" or what? I don't see any immediately obvious candidates among the issues that would fit for a revision of the concept syntax... |
21:45:34 | Araq | or post it on the forum |
21:47:36 | couven92 | I actually haven't got an account on forum yet :O So I was about to compile a longer issue text instead :P |
21:48:58 | FromGitter | <Varriount> or make an issue and post on the forum |
21:50:48 | couven92 | Araq, @Varriount, PMunch, will do... I'll summarize the discussions on this from today and tag you all, if that's okay? And also zahary so that he get's notified |
21:51:16 | Araq | sure, thanks |
21:54:04 | dom96 | You can also link to timestamps in the irclogs btw :) |
21:54:18 | couven92 | dom96, yeah, I'm doing that :) |
21:54:46 | demi- | can i import js code into nim and use it when not targeting JS as my compile-to langauge? |
21:58:38 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:01:52 | * | nsf quit (Quit: WeeChat 1.7.1) |
22:03:46 | PMunch | demi-, wait what? |
22:03:53 | PMunch | How would you expect that to work? |
22:04:48 | demi- | i would expect it to be able to work if there was a javacscript engine available to run the code in |
22:06:45 | PMunch | But how would the C -> JS bridge work? |
22:07:04 | demi- | ¯\_(ツ)_/¯ node does it |
22:14:22 | * | Jesin quit (Quit: Leaving) |
22:20:08 | * | kunev quit (Ping timeout: 260 seconds) |
22:22:25 | * | kunev joined #nim |
22:29:45 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:34:58 | * | zachcarter joined #nim |
22:35:39 | FromGitter | <Varriount> demi-: You can... if you wrap libcef or some other javascript runtime |
22:36:51 | FromGitter | <Varriount> demi-: http://duktape.org/ |
22:38:31 | demi- | interesting |
22:39:19 | FromGitter | <Varriount> Doesn't have a JIT compiler, but it's designed for small memory footprints |
22:40:27 | FromGitter | <Varriount> demi-: You could also try V8 (Chrome's javascript engine) although that one is in C++, and likely much more complex. |
22:41:49 | demi- | yeah that is pretty cool -- seems that using node to run a small javascript application locally is a lot simplier than i was expecting, so i might give that a shot first |
22:42:38 | demi- | yeah if i was going to use a full javascript engine i would use webkit's stuff as i'm already familiar with some of the APIs but it is indeed vastly more complicated than i would like |
22:43:43 | demi- | at first glance i don't see many decent C libraries for parsing vcard files, but there are a couple nice JS ones |
22:44:03 | FromGitter | <Varriount> How complex is the vcard format? |
22:44:15 | demi- | so i might end up writing this in Nim and then compiling to javascript or C, depending on how tedious it is |
22:44:38 | demi- | not terribly, it is all plaintext, but i have written far too many parsers to want to write another one myself |
22:45:13 | FromGitter | <Varriount> You could write a parser generator. We need a good one that supports more than simple expressions |
22:45:21 | demi- | |
22:45:47 | demi- | https://datatracker.ietf.org/doc/rfc6350/?include_text=1 |
22:50:36 | * | brson quit (Ping timeout: 240 seconds) |
22:50:39 | FromGitter | <Varriount> Once the mythical Python-to-Nim and Javascript-To-Nim tools come out, all our packaging problems will be solved. |
22:51:51 | * | brson joined #nim |
22:51:59 | couven92 | okay... I just opened https://github.com/nim-lang/Nim/issues/5770 (sorry for the length :P ) Did I forget sth.? |
22:54:08 | FromGitter | <Varriount> Seems good. I like the length. |
22:55:18 | couven92 | Okay, do we need it in the forums as well? I can link it in a forum post, but the whole idea is to keep the discussion at **ONE** place :P |
22:55:54 | FromGitter | <Varriount> Well, the forums get visited by more people than issues do. |
22:56:01 | FromGitter | <Varriount> So, I would say yes. |
22:56:13 | couven92 | Ah, okay... sorry for being a GitHub person then :D |
22:56:47 | FromGitter | <Varriount> couven92: The issue should be on GitHub, however those who read only the forums should be notified. |
22:57:07 | couven92 | yeah, I regestring for a forum account now |
22:57:10 | couven92 | two sec |
22:59:37 | FromGitter | <Varriount> @Araq This might interest you https://github.com/google/clif |
23:06:07 | * | brson quit (Ping timeout: 276 seconds) |
23:07:06 | * | krux02 quit (Remote host closed the connection) |
23:07:24 | * | adeohluwa joined #nim |
23:09:42 | couven92 | @Varriount done: https://forum.nim-lang.org/t/2936 |
23:10:18 | zachcarter | o/ |
23:11:02 | * | PMunch quit (Quit: leaving) |
23:16:46 | * | brson joined #nim |
23:19:30 | * | yglukhov quit (Remote host closed the connection) |
23:21:12 | FromGitter | <Varriount> Hey zachcarter |
23:21:26 | zachcarter | Hi Varriount! |
23:21:47 | FromGitter | <Varriount> couven92: I believe your first post must be approved. |
23:22:04 | FromGitter | <Varriount> It's how we filter out the human spammers |
23:22:36 | couven92 | really? oh, okay... well, let's hope the Nim moderators are looking kindly on me, then! :D |
23:22:53 | * | couven92 winks |
23:24:27 | FromGitter | <Varriount> couven92: I'm not an administrator to the forum - only @araq and @dom96 are |
23:25:01 | FromGitter | <Varriount> The most access I have is to the main repository |
23:38:43 | couven92 | I guess they'll sort it out later... Anyways, it's time to go to bed... Good night everybody! |
23:39:34 | * | couven92 quit (Quit: Client Disconnecting) |
23:39:39 | FromGitter | <Varriount> zachcarter: Any resources on animation for 2d sprites? |
23:40:00 | zachcarter | do you mean like creating them/ |
23:40:01 | zachcarter | ? |
23:47:32 | * | Jesin joined #nim |
23:50:29 | FromGitter | <Varriount> zachcarter: yes |
23:50:35 | zachcarter | hrm |
23:50:50 | zachcarter | not really :/ I generally buy them when I need them or use kenny’s stuff |
23:55:15 | FromGitter | <Varriount> zachcarter: Apparently Spine isn't the only tool of its kind: https://brashmonkey.com/spriter-features/ |
23:56:46 | FromGitter | <Varriount> And there's a C++ library too: https://github.com/lucidspriter/SpriterPlusPlus |
23:58:49 | * | Jesin quit (Quit: Leaving) |
23:59:51 | * | yglukhov joined #nim |