<< 02-05-2017 >>

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:56FromGitter<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:07FromGitter<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:35FromGitter<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:47FromGitter<andreaferretti> @singularperturbation I would be very happy to get contributions!
07:45:12FromGitter<andreaferretti> @mratsim has started the (separate) project https://github.com/mratsim/Arraymancer to support higher dimensional tensors
07:45:45FromGitter<andreaferretti> that said, I chose the API like it is because I do not really like numpy-like interfaces
07:46:04FromGitter<andreaferretti> I feel they are too removed from the mathematical literature
07:46:18FromGitter<andreaferretti> (and the word "tensor" is abused)
07:47:05FromGitter<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:47FromGitter<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:15FromGitter<andreaferretti> supporting webblas would be really neat, although it is not a priority for me
07:50:36FromGitter<andreaferretti> I am toying with a neural network implementation here https://github.com/unicredit/neurotic (still undocumented)
07:51:03FromGitter<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:16Tiberiumwow, nimsuggest with new vscode-nim is so fast!
10:18:16Tiberiumhttps://github.com/pragmagic/vscode-nim/pull/48
10:18:22Tiberiumliterally instant suggestinons
10:18:26Tiberium*suggestions
10:25:04euantorNice, I need to give that a go
10:28:50Tiberiumand 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:15Tiberiumdoes it use parts of the compiler heavily?
10:45:05*branduardi joined #nim
10:45:34*branduardi left #nim (#nim)
10:50:51AraqTiberium: nimsuggest is just a server frontend to the compiler really
10:51:21Araqthe whole compiler has to be written with this feature in mind though
10:51:50Araqso some old code in it is still not good at it ;-)
10:53:06TiberiumAraq, but anyway this is very cool feature
10:53:23Tiberiumis there any other languages with feature like this ?
10:54:05AraqI think many newer languages do it this way, C# is particularly strong at it, IMO
10:58:37krux02nimsuggest in emacs is so slow, that I always turn it off
10:58:46krux02because it blocks editing
10:59:21zachcarterkrux02: http://fragworks.io
11:01:17krux02yes i have already seen it, but I just gave it a star
11:01:46zachcarterthanks! :D
11:01:57zachcarterI didn’t know if you had seen the new website or not
11:02:31*Snircle joined #nim
11:03:42krux02I think it is even linked from the Nim homepage
11:03:46krux02gave you a lot of stars
11:03:52krux02many more than my project
11:04:12krux02no wonder, I suck at supporting Apple
11:04:31krux02and others also had problems trying that project
11:06:24krux02someone wants to use my phone number to validate a VK profile
11:09:06FromGitter<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:58zachcarteryup
11:10:21zachcarterthis has to happen with pretty much every integration
11:10:28zachcarterit’s already happened with some of the nuklear stuff
11:10:29krux02Well you can do that not sure if you should.
11:10:31zachcarterless with the bgfx / sdl code
11:10:56krux02Nim allows you to add any methods to already existing types, and using known types from SDL can be an advantage
11:11:02zachcarterit would make the framework easier to use I imagine, but might add an extra layer of indirection to the code
11:11:40krux02but if you want to hide it I wont stop you. But in my project I will not do it for that reason.
11:12:09krux02easier to use is realative
11:12:17zachcartertrue
11:12:28FromGitter<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:28krux02SDL types might already be known types and the documentation is already written
11:13:26krux02Varriount: that is true, but SDL? I doubt it.
11:13:35zachcarteryeah i’m hoping I won’t run into that situation with sdl
11:13:39zachcarteror bgfx for that matter
11:13:42zachcarterthey’re very core to the framework
11:13:49zachcarterthe imgui solution i can see
11:14:24krux02well you can still submit a patch for SDL in case something really doesn't work
11:16:30dom96Wow. I just managed to create a fork bomb using staticExec + an import in Nim.
11:19:49*PMunch joined #nim
11:20:34zachcarter:D
11:29:58dom96I got choosenim to work on Windows XP yesterday :D
11:31:01FromGitter<Varriount> choosenim?
11:31:05zachcarteryesssss dom96
11:31:21dom96Varriount: rustup for Nim
11:31:46FromGitter<Varriount> And what's rustup?
11:32:16dom96look it up
11:51:57Tiberiumhmm, 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:03TiberiumMaybe 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:25Tiberium(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:41Tiberiumcurrently I have a queue and an async proc which takes all requests from queue and sends them to API
11:55:25Tiberium(every 350ms)
11:56:22Tiberiummaybe 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:55FromGitter<andreaferretti> @dom96 is choosenim yet available somewhere?
12:23:11dom96andreaferretti: not yet. Should be available soon though.
12:23:12*adeohluwa quit (Quit: Connection closed for inactivity)
12:23:33dom96Once it is I would really appreciate it if you guys could test it :)
12:26:52Tiberiumdom96, 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:19FromGitter<andreaferretti> I can test it on Ubuntu and ask @evacchi to test it on MacOS
12:43:56FromGitter<Varriount> @dom96 I can test it on OSX and Windows 10
12:44:16dom96Great :)
12:44:26*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:45:01FromGitter<Varriount> Though, for OSX users, it's probably better just to recommend using homebrew
12:45:41krux02isn't the default package manager always the best when available?
12:46:11krux02apt-get/yast/pacman etc
12:46:21FromGitter<Varriount> Chocolatey too
12:46:41FromGitter<Varriount> (Windows package manager)
12:46:49krux02didn't know that
12:47:02krux02I thought because of ubuntu shell it would become apt-get
12:47:09PMunchYeah, I really dislike it when programs try to make their own update system in a package management environment..
12:47:27PMunchThe only exception is compiled programming languages
12:47:33krux02I am not a windows user anymore since windows 7, but I did use it from Windows 3.11 onwards
12:47:42FromGitter<Varriount> krux02: apt-get is used for the subsystem
12:47:59FromGitter<Varriount> But it can only install Linux applications inside the Linux environment
12:48:11FromGitter<Varriount> Chocolatey works on the Windows side.
12:48:11Tiberiumkrux02, also you can install other distros in WSL
12:48:17Tiberiumbut it's not official :)
12:48:50TiberiumSo I didn't come to solution for my problem yet.
12:49:01*Vladar joined #nim
12:49:04krux02interesting that windows finally has what Linux has since at lest 2006 (even much earlier, but that is when I started with it)
12:49:42dom96Varriount: Homebrew won't let you easily switch Nim versions.
12:50:27Tiberiumin python's asyncio there is "wait_for", queues, "Task" for doing async queue stuff
12:50:38krux02my version of choosenim is called git checkout
12:50:49Tiberiumand you can set the result of task
12:50:51FromGitter<Varriount> krux02: Windows isn't targeted towards programmers.
12:51:17krux02I know yet it is the main operating system for game developers
12:51:47krux02They hate it, but still don't build the foundation to make Linux the foundation of game development
12:52:20krux02anyway not diving into that discussion
12:52:49FromGitter<Varriount> Probably for the best.
12:52:56*devted joined #nim
12:53:24TiberiumIs there something like that in Nim? https://docs.python.org/3/library/asyncio-task.html#task
12:53:34krux02Araq: I challenged your statement on grep: https://forum.nim-lang.org/t/2925/2
12:55:17krux02there is FlowVar
12:55:38Tiberiumkrux02, can I use it with async?
12:56:53*devted quit (Ping timeout: 240 seconds)
12:57:08Tiberiumah, it seems that no
12:57:22Tiberiumbecause async macro is generally not thread-safe
12:57:56FromGitter<Varriount> I'd ask dom96
12:58:13TiberiumI really need something like FlowVar, but for async
12:58:22dom96What are you trying to do Tiberium ?
12:58:56dom96You can use FlowVar with async but currently it's not very efficient
12:59:12Tiberiumdom96, my app doesn't require millions of them :)
12:59:36Tiberium75 is the most theoretically possible value of them in 1 second
13:00:42dom96hrm?
13:00:50dom96what's "them"?
13:01:11Tiberiumdom96, number of FlowVar instances :)
13:01:42Tiberium(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:22dom96I don't think you need threads for that. Just multiple instances of AsyncHttpClient.
13:03:20Tiberiumdom96, 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:49Tiberiumso I can't figure out how to receive them. I'll show you part of my code responsible for that
13:07:21Tiberiumdom96, https://gist.github.com/TiberiumN/e1d719cf58721b59a19c3b51efd0bf8d, but sadly you can't run it
13:09:25Tiberiumprobably my approach is very wrong
13:10:03dom96So when you call the api call
13:10:07dom96add its result to another queue
13:10:17dom96and then process the results somewhere
13:10:48Tiberiumdom96, ok
13:17:38Tiberiumdom96, oh, so I can't wait for result in callMethod itself?
13:18:18dom96You can if you have access to the Futures
13:22:19Tiberiumdom96, oh, and can you give me an advice on how to do it?
13:22:41*zachcarter joined #nim
13:22:43FromGitter<andreaferretti> @Varriount if I understand correctly, choosenim will be useful to keep multiple Nim versions and switch between them
13:22:55chemist69... that moment when you write `echo xyz` in your PYTHON program to print something...
13:23:00FromGitter<andreaferretti> something that would be more cumbersome with homebrew, apt-get and so on
13:23:29Tiberiumchemist69, happens with me too
13:24:34dom96Tiberium: Store a resultsQueue in your VkAPI object (hopefully it's a ref)
13:24:50dom96then go through each future in the resultsQueue and await it
13:25:26PMunchhttp://ix.io/stM Araq, please tell me how this is a really bad idea :P
13:30:35*PMunch-mobile joined #nim
13:31:17AraqPMunch: never said it's a bad idea, it's what concepts eventually will give us
13:31:29Araqbut right now a concept is only a generic constraint
13:31:51PMunchAh, so the idea is to push them in the direction og Go interfaces. Just better
13:32:19Araqyeah
13:32:30couven92Araq, so the concepts are basically just a very much more powerful C# where clause?
13:32:46Araqthat is correct, couven92
13:33:30couven92But PMunch's implementation basically gives us interfaces in Nim, right? I mean, this is how interfaces work in e.g. C#
13:37:40PMunchhttp://ix.io/stQ Is there a better way to specify in the concept that the procedure takes a float?
13:43:16demi-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:08krux02demi-: really?
13:50:26demi-krux02: what?
13:51:15krux02you just asked that somebody can make you a console UI system
13:52:22Tiberiumdom96, yay, it works!
13:52:37demi-no, i suggested putting two existing libraries together
13:52:59krux02I 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:32demi-krux02: that's ok, i don't need it; i thought it was an interesting idea
13:53:47Araqdemi-: I had the idea of using that library to create an CSS alternative for karax ;-)
13:54:06Araqbut I don't need it immediately either
13:54:10demi-cool!
13:54:27krux02I heared css is not very suitable to layout text.
13:55:23demi-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:23krux02It's the web, here it is not asked what tool is the best, but what can you use from the browser
13:56:26Araqkrux02: I think these days CSS wastes more billions than C buffer overflows
13:57:08AraqI've yet to meet a single person who is productive with it.
13:57:31demi-it is really awful tbh
13:57:44dom96okay, what's better?
13:58:02krux02latex :P
13:58:22demi-dom96: that is the no-so-funny punchline
13:58:48Araqmost WYSIWYG tools would be better.
13:59:08*AndChat-635481 joined #nim
14:00:21dom96haha
14:00:29krux02Well 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:44AraqVisualBasic is better
14:01:04krux02I don't dislike the distinction of data (document with text and chapters and so on) and the layout declaration somewhere else
14:01:27Araqhere is a form, put some buttons on it, define the anchors, done
14:02:12krux02in 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:27dom96WYSIWYG is horrible for websites.
14:02:29*AndChat-635481 joined #nim
14:02:47dom96It's akin to editing Word documents.
14:03:34krux02Well I think basic HTML isn't too bad
14:03:38krux02it's ugly
14:03:50krux02but it is nice to write the document :P
14:04:21Araqdom96: CSS doesn't allow for decent WYSIWYG tooling so of course the current tools are bad
14:04:38dom96hah
14:05:10dom96"WYSIWYG is better!" ... "Well, it's bad because CSS is bad!"
14:06:18krux02WYSIWYG plus some visual stuff that shows the structure of the document that are only visible when editing
14:06:26krux02I don't think that is bad at all
14:06:51AraqI made my points clear and I gave an example of tool which offers a much more productive workflow.
14:06:57krux02I think word is bad, because it is still paper oriented
14:07:35krux02who cares about paper? Things a shown on either a 16:9 monitor or a small mobile screen
14:07:44krux02a minority of text is actually printed
14:08:24krux02with latex it's the same
14:11:06Araqdynamic positing via JS code (or code that compiles to JS ;-) ) is also likely better but I'm about to try it out.
14:12:12Araqthat 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:36Araqsee? 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:47PMunchhttp://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:25couven92it 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:55PMunchconcepts.nim is the script
14:41:57*Tiberium joined #nim
14:42:00PMunchOr snippet
14:42:25couven92and 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:39PMunchSo 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:59couven926 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:10couven92I guess it's all about perspective! :P
14:45:22PMunchHmm, 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:35PMunchWell, NimLine complains
14:52:18*cspar_ joined #nim
14:53:44AraqPMunch: proc ToICanMove and explicit calls to it make it fast again
14:54:04Araqit's not the concept, it's the converter that slows it down by a factor of 10
14:54:14PMunchReally?
14:54:19Araqtry it.
14:54:27PMunchHold on
14:55:13*cspar__ quit (Ping timeout: 255 seconds)
14:55:29*rokups joined #nim
14:55:59PMunchHmm, yeah that was a lot faster
14:56:04PMunchWhy is that?
14:57:50*jmkr joined #nim
15:00:41Araqconverters suck
15:00:52Araq(I don't know)
15:01:50*yglukhov joined #nim
15:04:38PMunchHmm, that sucks..
15:04:49PMunchI've used them before but haven't noticed this kind of a slowdown..
15:05:26PMunchBut 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:04couven92I 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:51PMunchWhy 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:37AraqI 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:57PMunchWell, 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:28dom96hrm, 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:54PMunchHmm, 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:01stisadom96 looks like the gitter bridge is down
18:53:05*zachcarter quit (Quit: zachcarter)
18:59:47dom96stisa: I don't maintain it. oprypin does.
19:01:11stisaoh sorry, I'll try to contact him then
19:02:06oprypinhi...
19:02:52PMunchUhm, 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:55oprypinwhelp someoone decided to hijack the FromGitter nickname
19:23:07oprypinhow's that even possible
19:23:16*Tiberium joined #nim
19:23:28PMunchHaha, you didn't register it?
19:23:43*FromGitter joined #nim
19:23:54oprypinI did, that's the stupid part
19:24:02PMunchHuh, that's strange
19:24:29oprypinsomeone 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:41PMunchAh right
19:24:52FromGitter<Varriount> Yay, IRC link is back.
19:24:59PMunchGuess you should configure the bot to auto do that :P
19:26:08oprypinthat 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:58FromGitter<Varriount> oprypin: You can set chanserv to auto-disconnect people with your nickname if they don't identify within a minute
19:27:09FromGitter<Varriount> Or nickserv. One of the service bots
19:28:01*couven92 joined #nim
19:29:27oprypinVarriount, can't find it.
19:30:44oprypinok. /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:26PMunchHmm, I'm trying to write a better concept
19:47:38PMunchCurrently I have concept x; x.move(0.0)
19:48:07PMunchSo there must exist a proc that is move(x, <any float>)
19:48:19PMunchIs there a nicer way to specify that move takes a float?
19:48:43FromGitter<Varriount> Can't you just put `concept x; x.move(float)`?
19:49:10PMunchHuh, apparently I can :P
19:49:19PMunchI didn't think that would be possible
19:49:58PMunchWouldn't that be a proc (x: typeofX, f: typedef) or something?
19:51:02FromGitter<Varriount> No. If you want such a procedure, you would do `concept x; x.move(typedesc[float])`
19:51:45PMunchAh right
19:55:26AraqPMunch: that's a special rule for concept matching
19:55:29*BennyElg joined #nim
19:55:45PMunchEvidently
19:56:12Araqand 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:52PMunchYeah, it's a bit confusing
19:58:23PMunchBut it does have some benefits
19:58:34PMunchFor example what if move isn't a proc but a template
19:59:35PMunchIt's still callable like x.move(0.5) but it's no longer a proc move(self; x: float)
20:00:28Araqin my proposal 'proc move(self; x: float)' would match a template too :P
20:00:54PMunchUgh, that's not nice :P
20:00:59PMunchhttp://ix.io/sw0
20:01:00Araqwe could also leave out the 'proc' keyword to make it less confusing :P
20:01:09PMunchThat works fine by the way for what I was doing
20:01:32PMunchWith a template and no converter :)
20:02:23PMunchHmm, that would look a bit weird though
20:03:02PMunchI 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:14FromGitter<Varriount> Araq: So we would have `concept x; move(x: ?, y: float)`?
20:03:43PMunchUnless it stands in the way for other features
20:04:42PMunchHow do you plan to do the interfaces for example. Could potentially make everything more confusing :P
20:05:31FromGitter<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:44FromGitter<Varriount> Which I suppose could be useful for generics.
20:06:06Araqboth syntaxes are on par featurewise
20:06:33Araqit'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:25FromGitter<Varriount> Concepts in general are weird.
20:08:46*Tiberium quit (Remote host closed the connection)
20:09:00FromGitter<Varriount> Meshing what resembles a procedure body with a type definition... it's odd.
20:12:30dom96I prefer Araq's version as well.
20:13:24FromGitter<Varriount> I think I prefer zahary's version
20:13:50couven92sorry I was to the party... Anyone nice enough to paste me the link of the discussion? :O
20:13:55couven92*late
20:14:42demi-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:42couven92of the two concept versions I mean?
20:15:13PMunchcouven92, were talking about the syntax of concepts
20:15:28PMunchzahary's version is the current version
20:15:41couven92PMunch, yeah I got that... okay where's Araq's version?
20:15:43dom96couven92: http://irclogs.nim-lang.org
20:15:56couven92ah... okay... sorry
20:16:01PMunchAraq proposed to change it to something like `concept x; move(x: ?, y: float)`
20:16:10*rauss joined #nim
20:16:17couven92I though we were referencing GitHub or the forums... my bad... :P
20:20:02PMunchcouven92, rewrote the code to this by the way: http://ix.io/sw0
20:20:11couven92Araq, why's the ? in your proposal more Nim-like? I agree though that the define by usage style is very alien...
20:20:51couven92PMunch, yeah, I saw that... to show off both procs and templates
20:21:08Araqcouven92: my examples don't use ?
20:21:18Araqthey use 'self'
20:21:37couven92Ah... okay... self as a new Nim keyword to use in concepts?
20:21:40PMunchcouven92, this version doesn't have the converter, but rather an explicit add procedure for the Mover which does the conversion
20:21:50couven92I noticed
20:22:17couven92PMunch, maybe also introduce Fish and a macro, just to be sure?
20:22:48couven92The text should obviosly there reflect that Fish move by swimming or sth like that! :P
20:28:18couven92might I suggest: `CanMove[T] = concept; move(x: T, ticks: float)` (replace ; by newline)
20:28:44couven92basically work with the generic marker instead of introducing a new keyword?
20:32:31couven92See https://gist.github.com/couven92/f9db741b5cf5bbf9ea09efd5ae296096 for reference
20:32:57FromGitter<Varriount> Actually, how would one currently write mutually recursive procedures? That's be biggest benefit I can see from such syntax
20:33:44couven92I 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:25PMunchBut how would you specify something like m.len is Ordinal
20:37:44couven92PMunch: by doing `len(m: T): int`
20:38:04PMunchBut with the old syntax len could also be a field of m
20:38:31couven92ouch... okay, I see..
20:39:25FromGitter<Varriount> There's no reason you can't keep the body syntax the same
20:40:25couven92@Varriount that's actually true... I only changed the first line and moved the concept variables to the generic declaration instead
20:40:48FromGitter<Varriount> Or you could do something like `len(m: T) or len`
20:41:05FromGitter<Varriount> Sorry, `len(m: T) or len: T`
20:41:41FromGitter<Varriount> Though, that expression sounds like an AST nightmare
20:41:42couven92@Varriount, actually: `(len(m: T): int) or (len: int)`
20:42:12PMunchYeah, but then you would have to expect writers to do that.
20:43:00FromGitter<Varriount> Hm. Isn't the current syntax going to make the whole 'vref/vptr' feature hard though?
20:43:02couven92yeah... well, there's a reason that interfaces can **either** declare gettable anr/or settable properties **or** methods
20:43:06couven92in C#
20:43:33PMunchThe 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:28couven92In 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:54FromGitter<Varriount> True. The syntax a concept body accepts is pretty much like standard Nim code.
20:46:45*nsf joined #nim
20:51:43PMunchOne problem with concepts
20:52:24PMunchSince 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:28FromGitter<Varriount> PMunch: What do you mean?
21:06:33PMunch"Test = concept x; x is flot" no complaints
21:06:57PMunchI don't have anything that is flot, and nothing I can put in x will make a flot available
21:07:07PMunchBecause it's just a sad little misspelled float :(
21:07:28FromGitter<Varriount> Huh. I always assumed that the compiler would throw an error in such case, as the symbol needs to be closed.
21:07:39PMunchSo the entire concept just never matches. Which could be hard to debug..
21:08:11FromGitter<Varriount> @Araq What's the reasoning for the above behavior?
21:09:27AraqI didn't write the concepts implementation
21:09:38couven92PMunch, maybe it's because it supposed to be "flott" (i.e. Norwegian for 'brilliant') ;-)
21:11:13PMunchWell, 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:49couven92Araq, 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:00PMunchThe 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:37FromGitter<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:11FromGitter<Varriount> Things are complicated enough without adding in a third symbol binding mode.
21:17:05Araqyeah, I agree with varriount.
21:18:01AraqPMunch: 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:59Araqcouven92: generic concepts are also already in the works, better discuss these things where zahary can read it too (--> github)
21:19:37FromGitter<Varriount> Best to discuss them now, while things can still be (at least somewhat) changed and modified
21:22:57Araqyeah I agree
21:24:28couven92maybe we could also write up some extensive sample code to evaluate use-cases where one solution is obviously better than others...
21:27:16couven92e.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:30Araqcouven92: no, many concepts just describe Nim's conventions
21:28:46Araqso 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:23couven92Yeah, 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:00couven92I 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:46couven92This 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:17FromGitter<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:07FromGitter<Varriount> I guess thunks could be generated for attributes, but I have no idea how templates would work.
21:35:44Araqthe same way, via thunks
21:35:46couven92I 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:18dom96omg, the extensions param's type in findExe differs based on the OS
21:36:42Araqdom96: that's documented behaviour and makes sense
21:36:54Araqoh I misread
21:37:05Araqyou mean the *type* differs? that's bad
21:37:09dom96yes
21:37:12FromGitter<Varriount> O_o
21:37:16dom96https://github.com/nim-lang/Nim/blob/devel/lib/pure/ospaths.nim#L571
21:37:34dom96It's array[3, string] on Windows and array[1, string] on Posix
21:38:02Araqah lol, that's my fault :-)
21:38:05FromGitter<Varriount> Needs to be an openarray type
21:38:09Araqyeah
21:38:30*icebattle joined #nim
21:38:36FromGitter<Varriount> @Araq By the way, openarray is a really neat feature
21:38:41dom96yep, going to fix it now
21:38:47Araqthanks
21:45:15couven92Araq, 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:34Araqor post it on the forum
21:47:36couven92I actually haven't got an account on forum yet :O So I was about to compile a longer issue text instead :P
21:48:58FromGitter<Varriount> or make an issue and post on the forum
21:50:48couven92Araq, @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:16Araqsure, thanks
21:54:04dom96You can also link to timestamps in the irclogs btw :)
21:54:18couven92dom96, yeah, I'm doing that :)
21:54:46demi-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:46PMunchdemi-, wait what?
22:03:53PMunchHow would you expect that to work?
22:04:48demi-i would expect it to be able to work if there was a javacscript engine available to run the code in
22:06:45PMunchBut how would the C -> JS bridge work?
22:07:04demi-¯\_(ツ)_/¯ 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:39FromGitter<Varriount> demi-: You can... if you wrap libcef or some other javascript runtime
22:36:51FromGitter<Varriount> demi-: http://duktape.org/
22:38:31demi-interesting
22:39:19FromGitter<Varriount> Doesn't have a JIT compiler, but it's designed for small memory footprints
22:40:27FromGitter<Varriount> demi-: You could also try V8 (Chrome's javascript engine) although that one is in C++, and likely much more complex.
22:41:49demi-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:38demi-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:43demi-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:03FromGitter<Varriount> How complex is the vcard format?
22:44:15demi-so i might end up writing this in Nim and then compiling to javascript or C, depending on how tedious it is
22:44:38demi-not terribly, it is all plaintext, but i have written far too many parsers to want to write another one myself
22:45:13FromGitter<Varriount> You could write a parser generator. We need a good one that supports more than simple expressions
22:45:21demi-
22:45:47demi-https://datatracker.ietf.org/doc/rfc6350/?include_text=1
22:50:36*brson quit (Ping timeout: 240 seconds)
22:50:39FromGitter<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:59couven92okay... I just opened https://github.com/nim-lang/Nim/issues/5770 (sorry for the length :P ) Did I forget sth.?
22:54:08FromGitter<Varriount> Seems good. I like the length.
22:55:18couven92Okay, 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:54FromGitter<Varriount> Well, the forums get visited by more people than issues do.
22:56:01FromGitter<Varriount> So, I would say yes.
22:56:13couven92Ah, okay... sorry for being a GitHub person then :D
22:56:47FromGitter<Varriount> couven92: The issue should be on GitHub, however those who read only the forums should be notified.
22:57:07couven92yeah, I regestring for a forum account now
22:57:10couven92two sec
22:59:37FromGitter<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:42couven92@Varriount done: https://forum.nim-lang.org/t/2936
23:10:18zachcartero/
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:12FromGitter<Varriount> Hey zachcarter
23:21:26zachcarterHi Varriount!
23:21:47FromGitter<Varriount> couven92: I believe your first post must be approved.
23:22:04FromGitter<Varriount> It's how we filter out the human spammers
23:22:36couven92really? oh, okay... well, let's hope the Nim moderators are looking kindly on me, then! :D
23:22:53*couven92 winks
23:24:27FromGitter<Varriount> couven92: I'm not an administrator to the forum - only @araq and @dom96 are
23:25:01FromGitter<Varriount> The most access I have is to the main repository
23:38:43couven92I 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:39FromGitter<Varriount> zachcarter: Any resources on animation for 2d sprites?
23:40:00zachcarterdo you mean like creating them/
23:40:01zachcarter?
23:47:32*Jesin joined #nim
23:50:29FromGitter<Varriount> zachcarter: yes
23:50:35zachcarterhrm
23:50:50zachcarternot really :/ I generally buy them when I need them or use kenny’s stuff
23:55:15FromGitter<Varriount> zachcarter: Apparently Spine isn't the only tool of its kind: https://brashmonkey.com/spriter-features/
23:56:46FromGitter<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