00:03:49 | FromGitter | <arnetheduck> ok, must be something about my setup then.. installed choosenim recently, might have messed things up |
00:04:10 | FromGitter | <arnetheduck> zachcarter, thanks for checking! |
00:04:43 | zachcarter | arnetheduck: sure thing |
00:10:12 | * | PrimHelios quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
00:10:37 | * | PrimHelios joined #nim |
00:14:24 | FromGitter | <metasyn> is there a good portable way of downloading something to a temporary directory? ⏎ ⏎ I found https://nim-lang.org/docs/ospaths.html#getTempDir, but it says to not use it |
00:14:56 | zachcarter | honewatson: https://github.com/dom96/httpbeast/issues/11 |
00:19:53 | FromGitter | <honewatson> thanks @zacharycarter briefly looking through the httpbeast code base I don't think it has support |
00:24:53 | zachcarter | yeah - will be interesting to see dom's response |
00:27:54 | zachcarter | metasyn: it says only not to use on android |
00:28:09 | zachcarter | so if you're not on android - https://nim-lang.org/docs/ospaths.html#getTempDir, - should work fine |
00:28:40 | FromGitter | <metasyn> > and on other Unix based systems it can cause security problems too ⏎ ^ that sounds... interesting haha |
00:28:51 | zachcarter | well then provide the compiler flag? |
00:29:14 | FromGitter | <metasyn> its for a larger project, so i'd rather not make ever person using it as a downstream project require said flag |
00:29:43 | zachcarter | so put it in your project |
00:29:50 | zachcarter | and figure out what OS the user is running on |
00:29:53 | zachcarter | and set it |
00:30:15 | FromGitter | <metasyn> that is true, i could do it |
00:30:21 | FromGitter | <metasyn> but then why use it to begin with :p |
00:30:28 | FromGitter | <metasyn> since i'm already doing all the work |
00:31:11 | zachcarter | well A) it's not that much work - it's probably like 4 or 5 lines to support all the most likely OS's that will be using your bin / lib |
00:31:14 | FromGitter | <metasyn> adding a switch for C:\temp and /tmp doesn't seem very hard. it *feels* like that would cover the main scenarios |
00:31:14 | FromGitter | <metasyn> yeah |
00:31:29 | FromGitter | <metasyn> i guess that is what i would expect a getTempDir thing to do itself |
00:31:43 | FromGitter | <metasyn> but if the suggestion is to re-write it, that might be the "nim" way in this case |
00:31:52 | zachcarter | I think the problem is that not every linux distro is guaranteed to implement it the same way |
00:32:05 | zachcarter | and the OS's have built in tooling for this |
00:32:16 | zachcarter | like - https://www.gnu.org/software/autogen/mktemp.html |
00:32:52 | zachcarter | so you really can't guarantee if a user is going to be using the OS default impl or some other impl |
00:33:06 | zachcarter | it's best to provide sensible defaults and allow them to be overridden |
00:33:24 | zachcarter | which I think is what `getTempDir` does - but it warns you about this fact |
00:38:11 | zachcarter | metasyn: pretty easy to see what it's doing here - https://github.com/nim-lang/Nim/blob/master/lib/pure/ospaths.nim#L525 - it's not actually provisioning a temporary directory for you |
00:38:50 | zachcarter | it's just suggesting /tmp for non-windows OS's and C:\temp for windows |
00:44:57 | * | cmk_zzz quit (Quit: leaving) |
00:46:10 | FromGitter | <metasyn> hmm that is simple. the docs are a little misleading, as its not obvious that the warning only applies to the context of android (to me) |
00:46:32 | FromGitter | <metasyn> I should've just read the source to begin with haha |
00:48:01 | zachcarter | always read the code :) - it clarifies everything :D |
00:48:17 | zachcarter | unless it's compiler magic and then you're digging :Po |
01:02:40 | * | noonien quit (Quit: Connection closed for inactivity) |
01:05:58 | * | abm quit (Ping timeout: 246 seconds) |
01:08:17 | * | PrimHelios quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
01:08:43 | * | PrimHelios joined #nim |
01:34:30 | * | brainpro1 quit (Ping timeout: 272 seconds) |
01:35:52 | * | ftsf joined #nim |
02:01:22 | * | brainpro1 joined #nim |
02:35:43 | * | PrimHelios quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
02:36:07 | * | PrimHelios joined #nim |
02:36:30 | * | PrimHelios quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
02:36:52 | * | PrimHelios joined #nim |
02:38:18 | * | PrimHelios quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
02:38:41 | * | PrimHelios joined #nim |
02:44:55 | * | krux02 quit (Remote host closed the connection) |
02:47:55 | * | endragor joined #nim |
02:51:38 | * | PrimHelios quit (Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number) |
02:52:00 | * | PrimHelios joined #nim |
02:54:48 | * | captainkraft quit (Ping timeout: 244 seconds) |
02:55:26 | * | captainkraft joined #nim |
03:00:15 | FromDiscord | <libman> https://github.com/c-blake/cligen is nice. Had to fix a dozen nil comparisons and the like to get it working on latest nim. Too bad I can't submit changes due to git(hub)phobia. |
03:03:50 | * | cspar joined #nim |
03:09:10 | * | CcxWrk quit (Remote host closed the connection) |
03:09:24 | * | CcxWrk joined #nim |
03:30:17 | * | kapil___ joined #nim |
03:32:57 | * | Jesin joined #nim |
03:36:46 | * | nurupo19 joined #nim |
03:39:35 | * | nurupo19 quit (Remote host closed the connection) |
03:46:06 | FromGitter | <kaushalmodi> libman: The cligen author has already fixed that on the master HEAD last week. He just hasn't tagged a release. He's waiting for the next Nim release to be cut before tagging cligen. |
03:47:01 | FromGitter | <kaushalmodi> So just git clone the cligen repo, cd to it and nimble install. |
03:51:50 | * | Jesin quit (Quit: Leaving) |
03:55:53 | * | Jesin joined #nim |
03:59:01 | * | Jesin quit (Remote host closed the connection) |
04:03:58 | FromGitter | <kayabaNerve> Something from the last month broke my build... Aug 2nd's build is valid, Aug 31st's has a Table error. `lib/pure/collections/tables.nim(299, 7) Error: internal error: expr: param not init src_529637` |
04:04:20 | * | Jesin joined #nim |
04:05:44 | FromGitter | <kayabaNerve> Trying to get Koch output now... |
04:06:38 | * | dddddd quit (Remote host closed the connection) |
04:20:57 | * | stefanos82 joined #nim |
04:24:35 | * | PrimHelios quit (Quit: Leaving) |
04:28:59 | FromGitter | <kayabaNerve> Created a GitHub issue. It's weird as hell. I have no idea what caused it/what to do lol |
04:59:20 | * | nortoh1 joined #nim |
05:04:05 | * | nortoh1 quit (Remote host closed the connection) |
05:15:33 | * | nsf joined #nim |
05:16:40 | * | vivus quit (Remote host closed the connection) |
05:39:08 | * | kapil___ quit (Quit: Connection closed for inactivity) |
05:48:51 | * | vegax87 quit (Ping timeout: 260 seconds) |
05:49:26 | * | petersjt014[m] quit (Ping timeout: 260 seconds) |
05:49:26 | * | sg-james[m] quit (Ping timeout: 260 seconds) |
05:49:37 | * | RushPL quit (Remote host closed the connection) |
05:49:49 | * | sg-james[m] joined #nim |
05:49:49 | * | petersjt014[m] joined #nim |
05:49:50 | * | derlafff quit (Remote host closed the connection) |
05:50:02 | * | Miguelngel[m] quit (Ping timeout: 260 seconds) |
05:50:02 | * | Connor[m]1 quit (Ping timeout: 260 seconds) |
05:50:02 | * | macsek1911[m] quit (Ping timeout: 260 seconds) |
05:50:02 | * | sendell[m] quit (Ping timeout: 260 seconds) |
05:50:02 | * | gh0st[m] quit (Ping timeout: 260 seconds) |
05:50:03 | * | dyce[m] quit (Ping timeout: 260 seconds) |
05:50:25 | * | macsek1911[m] joined #nim |
05:50:25 | * | Connor[m]1 joined #nim |
05:50:46 | * | dyce[m] joined #nim |
05:50:48 | * | Miguelngel[m] joined #nim |
05:50:48 | * | sendell[m] joined #nim |
05:50:53 | * | RushPL joined #nim |
05:50:56 | * | derlafff joined #nim |
05:50:58 | * | gh0st[m] joined #nim |
05:54:53 | * | vegax87 joined #nim |
06:07:14 | FromGitter | <mratsim> @arnetheduck Exception and NewSeqOfCap are not exactly “new” :/ |
06:11:53 | * | kapil___ joined #nim |
06:12:22 | * | skrylar quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
06:27:05 | * | purrdeta6 joined #nim |
06:29:02 | * | purrdeta6 quit (Remote host closed the connection) |
06:50:33 | yglukhov[m] | Araq: pls ping me in closureiter issues in case i miss those |
06:50:54 | yglukhov[m] | or just assign them |
06:51:32 | * | cyraxjoe joined #nim |
06:55:29 | FromGitter | <codem4ster> Hi all, is there any way telling to net module's recv proc; try to take 4096 bytes but if you reach to the last byte of the current stream return what you get (or put it on my buffer). Socket would have 4 bytes buffered and waiting for an input. When I try to receive that 4 bytes with a 4096 byte buffer it hangs forever. If I give timeout to recv it throws an exception without getting data. |
06:56:17 | * | xet7 joined #nim |
07:10:24 | Araq | codem4ster: dunno, I gave up on sockets programming a long time ago because of this :-) |
07:11:08 | Araq | the OS refuses to get any size information. though to be fair, it wouldn't be reliable, I think |
07:11:15 | Araq | *to give |
07:12:28 | * | Vladar joined #nim |
07:20:43 | * | dadabidet joined #nim |
07:34:03 | FromGitter | <codem4ster> I made it work with unbuffered asyncsocket. But I will need to work this on threads. Are these {.async.} procs capable working in a thread. If so how? Just spawning them with threadpool? |
07:36:55 | Araq | don't use the threadpool, it's unreliable |
07:37:43 | FromGitter | <mratsim> @codem4ster see here: https://github.com/dom96/nim-in-action-code/blob/master/Chapter3/ChatApp/src/client.nim#L39 |
07:37:51 | FromGitter | <mratsim> but you can use CreateThread otherwise |
07:39:10 | FromGitter | <mratsim> you can mix and match async and multithreading, however nim doesn’t have M-N threading similar to goroutines (you can spawn M lightweight threads that will be multiplexed on N hardware threads) |
07:53:25 | * | fredrik92 is now known as couven92 |
08:03:42 | * | gmpreussner_ joined #nim |
08:03:52 | * | gmpreussner quit (Ping timeout: 246 seconds) |
08:19:07 | FromGitter | <codem4ster> I'm getting semaphore timeout errors on windows (without threads). |
08:19:42 | FromGitter | <codem4ster> is this because of asyncdispatch? |
08:21:42 | FromGitter | <codem4ster> if I do this with net module, then I couldn't create a unbuffered socket. |
08:21:58 | FromGitter | <codem4ster> I'm totally lost now :( |
08:23:15 | FromDiscord | <2vg> codem4ster: Do you want to do something with a multithreaded TCP server? |
08:24:47 | FromGitter | <codem4ster> I'm trying to make a multithreaded socks5 proxy server. |
08:25:27 | FromGitter | <codem4ster> in nature socks5 proxies must be multithreaded already. |
08:25:59 | FromDiscord | <2vg> using asyncdispatch or asyncnet. |
08:26:38 | FromGitter | <codem4ster> I used them already. I'm getting semaphore timeout error. |
08:27:00 | FromGitter | <codem4ster> It works but sometimes it gives this error on windows. |
08:27:08 | FromDiscord | <2vg> semaphore timeout error...? wtf |
08:27:13 | FromGitter | <codem4ster> this is a windows specific error |
08:27:53 | FromDiscord | <2vg> oh |
08:27:58 | FromGitter | <codem4ster> https://answers.microsoft.com/en-us/windows/forum/windows_10-files-winpc/windows-10-error-message-the-semaphore-timeout/25c39ece-39f9-4326-b2ee-436bf52306d8 |
08:29:01 | FromGitter | <codem4ster> I suspect this is because of async module |
08:30:56 | FromDiscord | <2vg> f*ckin windows :x |
08:31:11 | Tanger | XD |
08:31:48 | FromGitter | <codem4ster> :D |
08:32:15 | FromGitter | <codem4ster> yeah F*ck it but I need this proxy server multiplatform :P |
08:32:16 | FromGitter | <mratsim> I love the screenshot on that thread |
08:32:43 | FromGitter | <mratsim> “Disney Film006 is not accessible. The semaphore timeout period has expired." |
08:32:44 | FromGitter | <codem4ster> at least I need it's clients multiplatform |
08:33:18 | FromGitter | <codem4ster> ahahah :D |
08:33:44 | FromGitter | <mratsim> Maybe try https://github.com/status-im/nim-asyncdispatch2, documentation is very sparse but we don’t have issue on windows in our projects |
08:35:37 | FromGitter | <codem4ster> I give up :) |
08:35:54 | FromGitter | <codem4ster> I spent 4 days |
08:37:42 | FromGitter | <codem4ster> Nim needs non-blocking sockets also use for this job. |
08:38:20 | FromGitter | <codem4ster> I could write this without async module. |
08:39:26 | FromGitter | <codem4ster> At least I can write in crystal, ruby, rust :( |
08:39:39 | FromDiscord | <2vg> can also use Selectros to create new asynchronous modules |
08:49:56 | FromGitter | <codem4ster> this is the working version with semaphore errors: https://paste.ofcode.org/8htc6JQcdvjWvAiJM4Qe2r |
08:52:05 | FromGitter | <codem4ster> may be you can tell smt to improve it |
08:55:11 | FromGitter | <codem4ster> you can test it by creating a socks5 proxy server on your firefox on to Port 90 |
08:55:43 | * | Senketsu joined #nim |
09:01:18 | * | abm joined #nim |
09:04:18 | * | PMunch joined #nim |
09:13:13 | * | Senketsu quit (Quit: WeeChat 2.1) |
09:15:52 | * | Senketsu joined #nim |
09:20:43 | FromGitter | <dom96> If you're using threads maybe you should just use blocking sockets? |
09:26:11 | FromGitter | <mratsim> Does Crystal work in Windows? |
09:28:11 | FromGitter | <narimiran> @mratsim i've seen your mention of nim in the 'speed up python with rust' reddit post, so i did a quick comparision. hopefully we won't get downvoted for "nim brigading" or whatever it is called usually :) |
09:28:39 | FromGitter | <mratsim> my comparison is that there is only little overhead ;) |
09:29:21 | FromGitter | <narimiran> i didn't write it explicitly, but i hope people will see how nim's syntax is much simpler and more familiar to python users |
09:29:28 | livcd | mratsim: crystal does not work on windows atm |
09:30:43 | * | ftsf quit (Quit: Leaving) |
09:31:47 | * | seni joined #nim |
09:32:44 | livcd | codem4ster: how do i trigger the error ? |
09:36:15 | * | ven473 quit (Quit: ven473) |
09:37:20 | livcd | codem4ster: i compiled it with c -d:release and ran it, then socks5 localhost:90 |
09:55:21 | * | dadabidet quit (Quit: Leaving) |
09:56:56 | * | dddddd joined #nim |
09:57:07 | FromGitter | <mratsim> @livcd, on windows? |
10:20:13 | FromGitter | <codem4ster> @mratsim not for now. But work in progress. |
10:20:52 | FromGitter | <codem4ster> @livcd you must be on windows and try to use proxy a bit |
10:21:16 | FromGitter | <codem4ster> it gives error on 3rd or 4th site you open |
10:22:09 | * | Senketsu quit (Quit: WeeChat 2.2) |
10:22:15 | FromGitter | <codem4ster> I must say without a powerful socket api, Nim cannot go further in the arena. :( |
10:22:41 | FromGitter | <codem4ster> socket is the mother of all web things. |
10:24:27 | * | Senketsu joined #nim |
10:25:42 | FromGitter | <codem4ster> @mratsim if crystal support parallelism and windows it will become a must know multipurpose language. |
10:26:39 | FromGitter | <codem4ster> and I think it needs a faster GC |
10:27:30 | FromGitter | <codem4ster> on the Nim side I fell in love with compile capabilities, speed and syntax |
10:27:31 | FromGitter | <mratsim> I’m not too sure what’s happening between https://github.com/crystal-lang/crystal/projects/6 and https://github.com/crystal-lang/crystal/issues/5430 |
10:28:30 | FromGitter | <mratsim> Seems like they are at the Fiber stage which might trigger semaphores issues as well (or was it threads?) |
10:28:52 | FromGitter | <codem4ster> fibers aren't threads |
10:29:22 | FromGitter | <mratsim> they are lightweight userland threads, similar to coroutines/green threads |
10:29:53 | FromGitter | <codem4ster> it works in single core like async |
10:30:03 | FromGitter | <mratsim> those are still threads |
10:30:16 | FromGitter | <mratsim> you can have multiple threads on a single core |
10:30:44 | FromGitter | <mratsim> async is doing multiple threads on a single core |
10:31:00 | FromGitter | <codem4ster> not exactly, it uses scheduler, you don't have visible threads in crystal |
10:31:19 | FromGitter | <mratsim> multithreading as used nowadays is w.r.t. to hardware kernel scheduled threads |
10:31:29 | FromGitter | <codem4ster> oh ok then :) |
10:31:42 | * | LuK13377 joined #nim |
10:31:58 | FromGitter | <codem4ster> I'm always looking for multicore threads :P |
10:32:14 | FromGitter | <mratsim> but coroutines/fibers/green threading is also thread even though it’s software |
10:32:24 | FromGitter | <codem4ster> ok I got it |
10:32:45 | FromGitter | <mratsim> well if you really want to go into this rabbit hole just have a look there: https://github.com/status-im/nimbus/wiki/Interpreter-optimization-resources |
10:32:47 | FromGitter | <vivekimsit> ok, I am very new and all these aync, coroutines etc are scaring me :) |
10:33:18 | FromGitter | <vivekimsit> any good resource to understand these things in depth? |
10:33:25 | FromGitter | <mratsim> For itnerpreter optimization you have various threading techniques (indirect threading, direct threading, call threading, switch threading) |
10:33:44 | FromGitter | <mratsim> but those are not about multithreading or even async/coroutines |
10:34:06 | FromGitter | <mratsim> but that was what threading meant 20 years ago |
10:34:39 | FromGitter | <mratsim> @vivekimsit you can use any Python or C# tutorial on async/await to understand Nim implementation |
10:34:59 | FromGitter | <codem4ster> I just want to use my cpu's full power :) Not interested in technical details. These days Nim can do this but Crystal cannot. |
10:35:42 | FromGitter | <codem4ster> I'm not a language designer although nor I'm not qualified to write a threading low level code :( |
10:35:43 | FromGitter | <vivekimsit> ok, but I am more into JS nowadays |
10:36:15 | FromGitter | <mratsim> Look into JS Promises then, they are equivalent to Nim Future’s AFAIK |
10:36:23 | * | LuK13377 quit (Remote host closed the connection) |
10:36:35 | FromGitter | <codem4ster> NodeJS also hasn't support for parallelism |
10:37:47 | FromGitter | <mratsim> @vivekimsit maybe that will help: https://translate.google.com/translate?hl=en&sl=fr&tl=en&u=https%3A%2F%2Fblog.xebia.fr%2F2017%2F11%2F14%2Fasyncawait-une-meilleure-facon-de-faire-de-lasynchronisme-en-javascript%2F |
10:38:34 | FromGitter | <vivekimsit> @mratsim thanks will check that for sure |
10:38:55 | FromGitter | <mratsim> @codem4ster: `for i in 0||100: foo()` <— OpenMP parallel loop using all your cores |
10:39:31 | FromGitter | <mratsim> just make sure to not allocate inside the loop (push/pop stackTraces: off) as well |
10:39:32 | FromGitter | <codem4ster> @vivekimsit that was old news. NodeJS now can support parallelism as this post: https://stackoverflow.com/questions/39584439/does-node-js-support-parallelism |
10:39:33 | FromGitter | <vivekimsit> also, if anyone is writing libraries for Nim, please do let me know. I want to contribute as much as I can but reading only docs can be a bit boring |
10:39:46 | FromGitter | <vivekimsit> @codem4ster nice |
10:40:44 | FromGitter | <codem4ster> I hear OpenMP but didn't use before |
10:41:18 | FromGitter | <alehander42> @vivekimsit you can always take a look at https://github.com/nim-lang/needed-libraries |
10:41:27 | FromGitter | <alehander42> what kind of libs would you like to work on? |
10:43:41 | FromGitter | <vivekimsit> @alehander42 in the long run I would like to have a good testing library like: ⏎ https://github.com/avajs/ava |
10:43:59 | FromGitter | <vivekimsit> but I can start with some small tasks first |
10:44:13 | FromGitter | <vivekimsit> let me have a look at link you sent |
10:46:09 | FromGitter | <alehander42> look at the issues in that repo |
10:46:52 | FromGitter | <vivekimsit> sure, thanks |
10:47:04 | FromGitter | <alehander42> testing libs are always welcome, I maintain quicktest, but it's specialized in property testing and based on `unittest` |
10:47:53 | FromGitter | <vivekimsit> yes, I think lot of people need a good testing library, you can see how popular that library got within few months of release |
10:47:53 | FromGitter | <matrixbot> `ehmry` vivek poddar (Gitter): the blake2 package is broken for me with nim/devel, it needs some type fixes in proc signatures |
10:47:54 | FromGitter | <narimiran> @mratsim does that `for i in 0||100` work out of the box? are some compile flags needed? i've seen a mention of `||` maybe a year ago, but i have never seen it "in the wild" |
10:48:20 | FromGitter | <mratsim> it’s everywhere in Arraymancer |
10:49:06 | FromGitter | <mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/tensor/backend/openmp.nim#L40 |
10:49:19 | FromGitter | <matrixbot> `ehmry` vivek poddar (Gitter): also, SHAKE256 in nimcrypto needs tests for hashes of uncommon lengths |
10:49:40 | FromGitter | <mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/nn_primitives/fallback/conv.nim#L40 |
10:53:32 | * | krux02 joined #nim |
10:55:21 | * | r4vi quit () |
10:55:35 | * | r4vi joined #nim |
10:57:19 | livcd | codem4ster: i left it open and was browsing around and did not hit any issues |
10:57:38 | FromGitter | <narimiran> thanks for the example, will try to write some of my own to see if/how it works |
10:58:20 | * | Yardanico quit (Quit: Quitting) |
11:02:29 | * | Yardanico joined #nim |
11:05:46 | * | zachcarter quit (Ping timeout: 272 seconds) |
11:06:26 | * | Senketsu quit (Quit: WeeChat 2.2) |
11:07:05 | * | xeroks10 joined #nim |
11:07:17 | FromGitter | <matrixbot> `ehmry` anyone know of an easy way for nimble tasks to introspect the package name? |
11:08:58 | * | Senketsu joined #nim |
11:09:29 | * | Senketsu quit (Client Quit) |
11:10:03 | FromGitter | <narimiran> hmmm, i've tried a simple example of naive prime finding, and i get no difference between `..` and `||` version out of the box |
11:10:08 | * | xeroks10 quit (Read error: Connection reset by peer) |
11:12:37 | * | Senketsu joined #nim |
11:14:42 | * | rokups joined #nim |
11:20:14 | FromGitter | <mratsim> @narimiran there are dependencies for primes, I tried and it didn’t help for a basic sieve of Erathostenes |
11:20:55 | FromGitter | <mratsim> you might even have false sharing/cache invalidation |
11:22:08 | FromGitter | <narimiran> it uses only one core!? |
11:22:34 | FromGitter | <narimiran> now i've created a version with `parallel` and `spawn` which uses all cores and it is noticeably faster |
11:23:08 | FromGitter | <mratsim> no it should use all cores |
11:27:42 | FromGitter | <codem4ster> @livcd what is your operating system is that <windows10? This issue is on windows 10 |
11:27:50 | * | pwntus joined #nim |
11:32:56 | FromGitter | <mratsim> Tried to configure stuff in Windows 10 the past weekend, I got "The application has failed to start because the side by side configuration is incorrect please see the application event log or use the command line sxstrace.exe tool for more detail.” all over the place. ⏎ ⏎ Plenty of websites including Microsoft’s recommended to reinstall Visual C++. I tried to run the installer, and guess what "The application |
11:32:56 | FromGitter | ... has failed to start because the side by side configuration is incorrect please see the application event log or use the command line sxstrace.exe tool for more detail.” on Visual C++ installer ... |
11:36:03 | * | pwntus quit (Changing host) |
11:36:03 | * | pwntus joined #nim |
11:44:57 | livcd | codem4ster: yes w10 |
12:06:39 | FromGitter | <codem4ster> are you using devel version of nim? |
12:06:45 | FromGitter | <codem4ster> or 0.18.0 |
12:16:53 | livcd | Nim Compiler Version 0.18.1 |
12:21:05 | FromGitter | <codem4ster> did you compile from source, cannot find the binary. |
12:22:48 | livcd | yes! |
12:23:18 | FromGitter | <codem4ster> ah got it |
12:23:32 | FromGitter | <codem4ster> I will try the code with 0.18.1 |
12:37:06 | FromGitter | <codem4ster> I stuck at this: cd csources && sh build.sh # or .bat for Windows in csources |
12:37:37 | FromGitter | <codem4ster> cd csources && sh build.bat ⏎ 'sh' is not recognized as an internal or external command, ⏎ operable program or batch file. |
12:37:44 | FromGitter | <codem4ster> ahh |
12:37:48 | FromGitter | <codem4ster> my mistake sorry |
12:37:57 | shashlick | sh is Linux |
12:38:14 | FromGitter | <codem4ster> I didn't see that in front of build.bat |
12:43:31 | FromGitter | <codem4ster> I'm getting this: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5b8e7df3d8d36815e5d4f49c] |
12:45:01 | FromGitter | <codem4ster> I'm getting this ⏎ ⏎ ```gcc version 6.3.0 (x86_64-win32-seh-rev1, Built by MinGW-W64 project)``` [https://gitter.im/nim-lang/Nim?at=5b8e7e4d94f8164c17db84bb] |
12:47:16 | * | ven473 joined #nim |
12:47:51 | shashlick | Use build64.bat |
12:49:05 | FromGitter | <codem4ster> thanks it started compiling now |
12:49:37 | shashlick | Are you using head |
12:59:56 | * | noonien joined #nim |
13:04:32 | FromGitter | <codem4ster> I compiled successfully. Thanks for help. |
13:04:53 | FromGitter | <codem4ster> and in this version it seems working correctly. |
13:14:13 | * | endragor quit (Remote host closed the connection) |
13:16:58 | * | zacharycarter joined #nim |
13:21:39 | * | arecaceae quit (Remote host closed the connection) |
13:21:57 | * | arecaceae joined #nim |
13:24:46 | zacharycarter | blah - I don't want to do work today (fixing bugs in our Jenkins pipeline) - I want to work more on the ES6 class macro I started last night :( |
13:28:23 | * | cspar quit (Ping timeout: 245 seconds) |
13:45:47 | FromGitter | <mratsim> @codem4ster so no semaphores issue anymore? |
13:49:40 | FromGitter | <mratsim> 5399 stars in the repo |
13:51:27 | * | abm quit (Ping timeout: 240 seconds) |
13:52:23 | * | dadabidet joined #nim |
13:56:56 | zacharycarter | pretty good!~ |
13:57:07 | * | cspar joined #nim |
13:58:29 | FromGitter | <narimiran> and i'm the 5400th :) |
13:58:55 | FromGitter | <narimiran> (don't know how/why i didn't star it before) |
14:03:44 | zacharycarter | yay! :D |
14:10:37 | * | abm joined #nim |
14:14:29 | FromGitter | <codem4ster> yes @mratsim no semaphore issues |
14:15:11 | FromGitter | <mratsim> cool |
14:28:38 | zacharycarter | https://eli.thegreenplace.net/2018/measuring-context-switching-and-memory-overheads-for-linux-threads/ |
14:30:32 | * | dadabidet left #nim ("Leaving") |
15:04:16 | * | rokups quit (Quit: Connection closed for inactivity) |
15:12:37 | * | brainpro1 quit (Ping timeout: 246 seconds) |
15:20:16 | * | PMunch quit (Quit: Leaving) |
15:22:41 | FromGitter | <Bennyelg> hello friends how I can do something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8ea341c9500b4bab7fab54] |
15:22:48 | FromGitter | <Bennyelg> but return true false |
15:23:00 | FromGitter | <Bennyelg> if the function successed and false otherwise |
15:24:00 | leorize | `try: do something; result = true; except: result = false`? |
15:25:21 | FromGitter | <Bennyelg> thanks |
15:35:05 | * | endragor joined #nim |
15:39:08 | * | kapil___ quit (Quit: Connection closed for inactivity) |
15:44:26 | * | Trustable joined #nim |
15:44:49 | * | endragor quit (Remote host closed the connection) |
16:03:30 | * | flyx joined #nim |
16:25:52 | * | PrimHelios joined #nim |
16:27:38 | * | nsf quit (Quit: WeeChat 2.2) |
16:30:51 | FromGitter | <mratsim> Exceptions should be use for exceptional stuff, not for control flow. |
16:39:35 | * | Trustable quit (Remote host closed the connection) |
16:49:08 | * | cyraxjoe quit (Quit: I'm out!) |
16:49:28 | * | cyraxjoe joined #nim |
16:57:25 | * | brainpro1 joined #nim |
17:08:41 | * | PrimHelios quit (Remote host closed the connection) |
17:09:01 | * | PrimHelios joined #nim |
17:13:41 | * | PrimHelios quit (Remote host closed the connection) |
17:14:31 | * | PrimHelios joined #nim |
17:18:11 | zacharycarter | Love hearing co-workers discuss what version of NPM they're using because their Node project is broken |
17:18:21 | zacharycarter | very happy we don't have that issue w/ Nimble |
17:20:01 | * | TheLemonMan joined #nim |
17:24:11 | * | PrimHelios quit (Remote host closed the connection) |
17:25:14 | * | PrimHelios joined #nim |
17:26:11 | * | PrimHelios quit (Remote host closed the connection) |
17:27:41 | * | PrimHelios joined #nim |
17:40:22 | * | brainpro1 quit (Ping timeout: 244 seconds) |
17:41:50 | * | brainpro1 joined #nim |
17:42:41 | * | PrimHelios quit (Remote host closed the connection) |
17:43:55 | * | PrimHelios joined #nim |
17:53:56 | * | zacharycarter quit (Quit: Page closed) |
17:56:09 | FromGitter | <ephja> good old node_modules directory |
17:56:45 | * | PrimHelios quit (Quit: Leaving) |
17:57:44 | * | PMunch joined #nim |
18:03:18 | * | zacharycarter joined #nim |
18:26:07 | * | cspar quit (Ping timeout: 240 seconds) |
18:27:45 | FromGitter | <kayabaNerve> I have an idea |
18:27:58 | FromGitter | <kayabaNerve> Why don't we write code so the Nim compiler never crashes |
18:28:14 | FromGitter | <kayabaNerve> Or just write in the main function |
18:28:19 | FromGitter | <kayabaNerve> #Plz don't crash |
18:28:36 | FromGitter | <kayabaNerve> I think I solved Nim 🤔 and every program every |
18:29:51 | Araq | almost. You also need more emojis. |
18:29:58 | FromGitter | <kayabaNerve> 🤔🤔🤔🤔 |
18:30:30 | TheLemonMan | less snark and more test cases |
18:30:38 | stefanos82 | personally I don't see any emojis with hexchat |
18:30:46 | stefanos82 | unless they are UTF-8 |
18:31:05 | FromGitter | <kayabaNerve> :P Nah. Most of the time, it's my fault (I once tried using files with standard public functions in [T]). It actually made it past what the compiler checks and caused a crash... |
18:31:17 | FromGitter | <kayabaNerve> stefanos82: :thinking: :thinking: :thinking: |
18:31:36 | Araq | more test cases? I think we have plenty. |
18:31:43 | FromGitter | <kayabaNerve> Neither Gitter not IRC show those but you can understand it. |
18:32:02 | Araq | the fact that they are never good enough hints to me that the language is too complex |
18:32:07 | stefanos82 | @kayabaNerve: lol think as much as you like, but IRC does not interprets Gitter's emojis |
18:32:24 | FromGitter | <kayabaNerve> That doesn't even work with Gitter though |
18:32:31 | FromGitter | <kayabaNerve> (the :thinking:) |
18:32:51 | * | nsf joined #nim |
18:32:53 | stefanos82 | it doesn't matter; it's the effort that counts ;) |
18:32:57 | FromGitter | <kayabaNerve> Well, last I checked (60 days ago), you can use files as variables without causing a Nim error yet while still causing a crash |
18:33:24 | FromGitter | <rayman22201> https://www.emojicode.org/ 😝 |
18:33:56 | FromGitter | <rayman22201> Sorry guys. Nim isn't good enough. I'm moving to emojicode |
18:34:23 | FromGitter | <kayabaNerve> @rayman22201 I hear it's actually a decent language if you ignore the annoyance of emoojis |
18:39:50 | FromGitter | <kayabaNerve> Can I not select a commit using choosenim? :( |
18:40:07 | zacharycarter | question - does anyone know a good way to benchmark HTML page rendering speeds? |
18:40:25 | zacharycarter | I want to benchmark an example using the library I ported over the weekend vs react |
18:41:10 | FromGitter | <Vindaar> Hey guys! I'm trying to write a macro, which takes a proc as an argument and creates a modified version of it. Using `.getImpl.body` I get the AST alright. So I replace the symbols by new idents. Problem is that generic calls, e.g. `newSeq[int]` are already resolved, so the AST I get isn't valid without the symbols. How do I deal with this? |
18:41:22 | FromGitter | <Bennyelg> anyway to acquire index when mapIt ? |
18:41:42 | Araq | no, use a for loop. |
18:41:53 | FromGitter | <Bennyelg> thanks |
18:41:57 | * | cspar joined #nim |
18:41:58 | Araq | Vindaar: use 'untyped' for the macro parameter's type |
18:42:23 | FromGitter | <Vindaar> But how do I get the proc body then? |
18:42:24 | Araq | zacharycarter, honestly, who cares. |
18:42:53 | zacharycarter | Araq: all the stupid people who worry about SEO at my company |
18:42:56 | Araq | nobody will notice it either way unless you re-render too much |
18:43:27 | zacharycarter | I get that but I'm trying to prove a point to co-workers that tagged template literals and direct dom manipulation are going to be speedier than react and VDOM |
18:43:35 | seni | can nimgen be used for C++11 ? |
18:44:01 | Araq | yeah, SEO, right. just provide good content/ a useful app. |
18:44:06 | zacharycarter | co-workers don't like to listen / regard my suggestions so I have to have demonstrable evidence to convince them |
18:44:30 | zacharycarter | I don't disagree with you - but the amount of time that gets spent optimizing react apps is something I'd like to not have to spend when our app's turn comes |
18:45:05 | zacharycarter | one of our teams spent several months on optimizations for the crawling changes Google made a few months back |
18:45:12 | Araq | a VDOM is indeed not fast, it's used for productivity. |
18:45:14 | zacharycarter | I don't want to have to do that |
18:45:45 | zacharycarter | well - I'm just trying to prove to co-workers - that you don't need to use a framework like react in every frontend web project |
18:45:49 | Araq | the point is to ensure by construction that your UI state is not out of sync with your app's state |
18:46:07 | zacharycarter | that you can get by with a small library and a sane method for handling state |
18:46:10 | Araq | and you do that by nuking the UI state. |
18:46:34 | Araq | and that's it. Using a VDOM lib for "speed" is stupid. |
18:47:41 | zacharycarter | well the company switched to react because they were using Angular one and Angular two was still in beta |
18:48:11 | * | brainpro1 quit (Ping timeout: 260 seconds) |
18:48:12 | zacharycarter | now they've built a UI component library using React - and it's been enforced lately that every project needs to use this library and thusly React |
18:48:56 | zacharycarter | but we're pulling down 1.14mb of JS with our app |
18:49:01 | Araq | oh yeah, I forgot, React doesn't understand its own ideas. |
18:49:25 | Araq | "components" are against the VDOM ideas. |
18:50:23 | zacharycarter | well - all I know is - I don't want to be asked to spend months "optimizing" for SEO because I'm using react and the crawler can't deal with that fact / our JS bundle is over a meg in size |
18:51:41 | FromGitter | <kayabaNerve> So I found where my crash is happening |
18:51:59 | FromGitter | <kayabaNerve> It's happening at least before a compiler update on August 10th |
18:52:30 | FromGitter | <kayabaNerve> The very commit I tested is the one that changed the exception system |
18:52:42 | FromGitter | <kayabaNerve> Araq Why did you have to go and improve Nim? You broke my code :( |
19:17:30 | seni | so I take it nimgen does not work with C++11 ? |
19:20:10 | FromGitter | <Araq> C++11 is Ok'ish |
19:20:26 | FromGitter | <Araq> better update c2nim to understand move semantics though |
19:25:43 | * | justsomequestion joined #nim |
19:28:57 | * | brainpro1 joined #nim |
19:30:19 | FromGitter | <Vindaar> @Araq when using `untyped`, I guess I'll have to hand the whole proc implementation as the argument to the macro, no? So there's no way to just hand the proc name and use `bindSym` to get the actual implementation? |
19:34:36 | * | zacharycarter quit (Ping timeout: 252 seconds) |
19:47:21 | stefanos82 | @Araq: C++11 is really cool, but C++14 got cooler and C++17 so far has been even cooler lol. Now, C++20 features are also going to simplify lots of metaprogramming libraries, thanks to Concepts and hopefully modules |
19:50:49 | * | anzuof3 joined #nim |
19:53:43 | * | anzuof3 quit (Remote host closed the connection) |
19:54:37 | FromGitter | <Bennyelg> using regex to take only the characters from a string. |
19:54:45 | FromGitter | <Bennyelg> the opposite of replace |
20:00:03 | * | justsomequestion quit (Ping timeout: 245 seconds) |
20:02:47 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
20:02:56 | * | kungtotte quit (Remote host closed the connection) |
20:08:48 | FromGitter | <tim-st> the following crashes, shouldnt this work? `import uri; echo decodeUrl("%")` |
20:21:55 | FromGitter | <Bennyelg> getting annoying ``` index out of bounds [IndexError]``` when executing insert to sqlite but when taking the query generated and insert it directly its working |
20:22:05 | FromGitter | <Bennyelg> donnu where to look |
20:25:21 | krux02 | I never did Nim in web programming, what is the overhead? How big is it to make the frontend in Nim? |
20:26:10 | krux02 | Is it a lazy code generator that only generates what is necessary, or is there a big blob of code that code needs in order to run Nim generated javascript? |
20:27:23 | krux02 | I recently saw a talk about a guy who wanted to do web development in python and he showed the different alternatives and how big the overhead is. |
20:29:01 | FromDiscord | <has1> hi all |
20:31:11 | krux02 | hi has1 |
20:34:27 | krux02 | I found it out, hello world in Nim generates 2244 byts javascript |
20:35:38 | FromDiscord | <has1> 2KB?? |
20:35:46 | krux02 | yes |
20:35:57 | krux02 | could still be minified |
20:36:01 | krux02 | I guess that is ok |
20:36:41 | FromDiscord | <has1> "Compiles to C, C++ or JavaScript" is this a new feature? compile to js? |
20:36:50 | FromDiscord | <has1> i dont know if i saw that before |
20:36:57 | krux02 | no it is not new |
20:37:44 | FromDiscord | <has1> how viable is this? And will it be able to compile to wasm? |
20:37:55 | FromDiscord | <has1> and how is this so small if it has a Garbage collector? |
20:38:52 | krux02 | there is no wasm support at the moment, but there is also no reason why the generated C code from Nim can't be compiled to wasm |
20:39:10 | krux02 | the toolchain just hasn't been built |
20:42:49 | FromDiscord | <has1> does nim have generics? |
20:44:17 | FromDiscord | <Generic> yes and imho one of the best generics of all modern programming languages |
20:45:19 | FromDiscord | <has1> could you point me to it? i cant see it in the docs |
20:45:59 | FromDiscord | <Generic> https://nim-lang.org/docs/manual.html#generics |
20:49:42 | * | cyraxjoe quit (Remote host closed the connection) |
20:50:28 | * | nsf quit (Quit: WeeChat 2.2) |
20:51:26 | FromDiscord | <has1> thank you |
21:00:09 | * | cyraxjoe joined #nim |
21:06:45 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8ef3e5cff55e5617a9a469] |
21:07:14 | FromGitter | <Bennyelg> going nuts , running it directly from sqlite works when execute it with nim, i got the index out of bound error |
21:07:19 | FromGitter | <Bennyelg> this is unbelivable |
21:08:31 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b8ef44ff86b741b050cfd2b] |
21:11:57 | FromGitter | <alehander42> ok, what happens in dbFormat? it tells you where the error is |
21:22:08 | * | seni quit (Quit: Leaving) |
21:23:27 | * | arecaceae quit (Remote host closed the connection) |
21:23:46 | * | arecaceae joined #nim |
21:29:41 | FromGitter | <Bennyelg> this is line 120 in the db format |
21:29:42 | FromGitter | <Bennyelg> add(result, dbQuote(args[a])) |
21:29:49 | FromGitter | <Bennyelg> but it don't tell me sh1t |
21:30:04 | FromGitter | <Bennyelg> because I am not adding any args |
21:31:05 | FromGitter | <Bennyelg> done! thank you ALEXANDER |
21:31:08 | * | endragor joined #nim |
21:31:14 | FromGitter | <Bennyelg> I had a freaking `?` in my code. |
21:31:25 | * | MyMind quit (Quit: WeeChat 2.3-dev) |
21:33:47 | * | stefanos82 quit (Quit: Quitting for now...) |
21:34:39 | * | Sembei joined #nim |
21:35:19 | FromGitter | <alehander42> ahh, isn't is escaped somehow |
21:35:27 | * | endragor quit (Ping timeout: 252 seconds) |
21:35:31 | FromGitter | <alehander42> i see, frustrating haha |
21:35:34 | FromGitter | <alehander42> good |
21:41:07 | * | cspar quit (Ping timeout: 246 seconds) |
22:02:55 | FromGitter | <mratsim> @Vindaar welcome to macro + generics, you can find my rants there: https://github.com/nim-lang/Nim/issues/8677, https://github.com/nim-lang/Nim/issues/7719 |
22:03:58 | FromGitter | <mratsim> This might help you avoid certain pitfalls in macro + generics: https://github.com/numforge/loop-fusion |
22:04:39 | FromGitter | <mratsim> and remember, mixin and bindSym might be your friends |
22:11:09 | FromGitter | <Vindaar> Ah, @mratsim thanks! #7719 I found earlier today and was helpful. #8677 I saw when you opened it 2 weeks ago, it didn't pop up in my search today. Need some time to digest it |
22:13:37 | FromGitter | <Vindaar> And `bindSym` I thought would allow me to do what I wanted, but it just tells me it can't evaluate my `untyped` parameter at compile time :| |
22:13:52 | FromGitter | <Vindaar> `mixin` I still don't quite know what it actually does |
22:20:36 | FromGitter | <mratsim> mixin tells the compiler, consider this symbol open for now, I will do magic (or you will find it) later |
22:26:30 | FromGitter | <Vindaar> Hmm, thanks. I keep reading the manual entry about open and closed symbol, but I haven't quite grasped it yet |
22:28:09 | FromGitter | <mratsim> open symbol: visible, closed: undeclared identifier/routine |
22:28:33 | FromGitter | <mratsim> with generics, Nim tries to resolve openness early |
22:28:57 | FromGitter | <Vindaar> oh, I see |
22:29:02 | FromGitter | <mratsim> which causes issue in untyped macro that are supposed to modify the AST earlier than anything else |
22:29:21 | FromGitter | <mratsim> when you have generics, the generics pass is done before your AST manipulation |
22:30:07 | FromGitter | <Vindaar> which obviously breaks modifying generics properly with macros, makes sense |
22:30:17 | FromGitter | <mratsim> An example is this: https://github.com/nim-lang/Nim/issues/6387 |
22:30:43 | FromGitter | <mratsim> following that I had to do declare `const _* = Foo()` |
22:30:53 | FromGitter | <mratsim> so that there was a visible _ symbol |
22:31:14 | FromGitter | <mratsim> I couldn’t replace it in the `[]` macro |
22:31:31 | FromGitter | <mratsim> well it works for normal proc but not if the macro was used in generic procs |
22:34:18 | FromGitter | <Vindaar> interesting, that helps explain it! |
22:38:32 | * | brainproxy joined #nim |
22:39:00 | * | brainpro1 quit (Ping timeout: 244 seconds) |
22:40:59 | FromGitter | <Vindaar> ok, off to bed. Good night :) |
22:42:09 | * | smt` joined #nim |
22:42:18 | * | PMunch quit (Remote host closed the connection) |
22:45:53 | * | smt quit (Ping timeout: 245 seconds) |
22:47:16 | FromGitter | <zetashift> gnight |
23:06:08 | * | zachcarter joined #nim |
23:34:59 | * | xet7 quit (Quit: Leaving) |
23:41:46 | * | noonien quit (Quit: Connection closed for inactivity) |
23:42:41 | * | mww113 joined #nim |
23:47:30 | * | krux02 quit (Remote host closed the connection) |
23:47:39 | * | mww113 quit (Read error: Connection reset by peer) |
23:53:38 | AlexMax | zachcarter: Do you intend to update the nuklear submodule |
23:53:47 | AlexMax | in your nuklear bindings? |