00:00:10 | shashlick | you could just echo seq.join(", ") |
00:13:41 | * | matti joined #nim |
00:23:06 | FromGitter | <xmonader> @dom96 is that what you meant? https://gist.github.com/xmonader/b021b5d2f0b0300bec292ec5d8e3905f it hangs |
00:30:53 | * | deech_ quit (Ping timeout: 245 seconds) |
00:32:47 | skrylar[m] | leorize: azure pipes are getting popular in Rack because of mac support |
00:46:01 | * | olliver joined #nim |
01:13:58 | * | abm quit (Quit: Leaving) |
01:19:59 | * | olliver quit (Ping timeout: 256 seconds) |
01:25:07 | FromGitter | <brentp> anyone else getting these: https://travis-ci.org/brentp/hts-nim/builds/539469598#L2903 on recent devel? |
01:38:44 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
01:39:41 | shashlick | What's Rack |
01:49:47 | FromGitter | <jrfondren> @xmonader, it doesn't hang for me. run `nc -l 6379` in one window, start that router, then run `nc localhost 11000` in another window. "hi\nthere" <ctrl-D> is forwarded successfully to the listener on 6379. (and then the router crashes, but it doesn't hang) |
01:54:27 | FromGitter | <Varriount> skrylar: What's Rack? |
02:05:16 | * | rnrwashere joined #nim |
02:12:03 | * | dddddd quit (Remote host closed the connection) |
02:20:11 | FromGitter | <xmonader> @jrfondren why do I've to press ctrl+D ? |
02:20:40 | FromGitter | <xmonader> I've example scripts (server, client) for python they hang until i terminate the client file somehow |
02:22:43 | FromGitter | <xmonader> another example to try is using redis-cli hence the port 6379. the redis-cli should be able to connect and communicate with actual redis server behind that tcp proxy without problems |
02:23:50 | * | rnrwashere quit (Remote host closed the connection) |
02:24:35 | * | theelous3_ quit (Ping timeout: 258 seconds) |
02:24:56 | * | vlad1777d joined #nim |
02:25:49 | FromGitter | <jrfondren> @xmonader, you don't have to. That's how I did it. |
02:27:41 | FromGitter | <jrfondren> hm it looks like netcat should have sent the "hi" and "there" in separate syscalls though, before I terminated input. |
02:27:42 | FromGitter | <xmonader> @jrfondren can you try it against redis server? just redis-cli -p 11000 |
02:27:58 | FromGitter | <jrfondren> sorry, I won't run redis. |
02:28:33 | FromGitter | <jrfondren> I've had to clean up servers that were rooted because the bastard developer thinks that software can be massively insecure by default and that his user should know better. |
02:29:03 | FromGitter | <jrfondren> if I myself were to come up with some kind of service that was superficially useful but with the secret purpose of compromising servers, I'd have his exact attitude and use his exact justifications. |
02:29:47 | FromGitter | <jrfondren> anyway, try stracing your router to see if it's behaving as you expect. |
02:30:05 | FromGitter | <xmonader> redis isn't secure by default xD ⏎ np :) also i use these scripts to reproduce https://gist.github.com/xmonader/cc33000404f691a20360eb64db0cd64c ⏎ ⏎ https://gist.github.com/xmonader/c30f7255421a2231d35e321163b034b9 [https://gitter.im/nim-lang/Nim?at=5cf091ade41fe15e75e816fa] |
02:30:45 | FromGitter | <jrfondren> and using netcat to interact with it. if you're surprised that "hi\nthere\n" doesn't immediately echo, that's something you can resolve. |
02:31:33 | FromGitter | <jrfondren> asyncnet.recv does say that it behaves normally though, "It will return as much data as the operating system gives it." |
02:32:07 | FromGitter | <xmonader> but that's not the case, i implemented the router in go |
02:32:14 | FromGitter | <xmonader> but i found a very interesting output with strace |
02:32:36 | FromGitter | <jrfondren> what's not the case? |
02:35:12 | FromGitter | <xmonader> https://gist.github.com/xmonader/a6b694605f2e93beac33efec8ab2fffd#file-gistfile1-txt-L54 the data is there but recv never returned |
02:36:28 | FromGitter | <jrfondren> where do you see that? |
02:36:49 | FromGitter | <jrfondren> oh you're saying that the asyncnet.recv never returned, so you didn't get some output. |
02:37:03 | FromGitter | <xmonader> yes |
02:37:14 | FromGitter | <jrfondren> epoll_ctl plainly has EPOLLIN after that though, so the event machine got the event |
02:37:34 | FromGitter | <jrfondren> er, rather |
02:37:47 | FromGitter | <jrfondren> that's it adding something that it wants to get notifications about |
02:39:07 | FromGitter | <jrfondren> that reads to me as the event machine never getting the event because it destroyed/recreated the epollfd after the event happened |
02:39:18 | FromGitter | <xmonader> not sure but i clearly get the output after killing the client ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf093d6bf4cbd167c05706e] |
02:40:04 | FromGitter | <jrfondren> this is probably a bug in async. I can't look into it atm though. |
02:40:38 | FromGitter | <xmonader> i'll update my nim to the latest i'm 0.19.4 and then file a bug if it still exists |
02:40:42 | FromGitter | <xmonader> thanks a lot |
03:01:13 | gearshift | the latest nim is v0.19.6 |
03:18:49 | * | chemist69 quit (Ping timeout: 252 seconds) |
03:20:46 | * | chemist69 joined #nim |
03:54:32 | * | rnrwashere joined #nim |
03:55:43 | * | noonien quit (Quit: Connection closed for inactivity) |
03:59:27 | * | rnrwashere quit (Ping timeout: 264 seconds) |
04:02:05 | FromGitter | <Varriount> Zevv: Looking at the npeg code, it looks like the strings for captures are only created when the captures are actually used (either by a code block, or at the end of the match). |
04:02:38 | FromGitter | <Varriount> However I'm confused about https://github.com/zevv/npeg/blob/master/src/npeg/capture.nim#L53 - why the `$s`? Why not just use `s`? |
04:05:27 | FromGitter | <kdheepak> I have some pascal files that I want to convert to nim. I know `pas2nim` hasn't been updated in a while. When I try to compile it I get the following error: ⏎ ⏎ `paslex.nim(108, 31) Error: undeclared identifier: 'TLineInfo'` ⏎ ⏎ Anyone know what this means? [https://gitter.im/nim-lang/Nim?at=5cf0a80765392c3b6093fc63] |
04:05:58 | FromGitter | <kdheepak> I'm willing to work through these to update pas2nim since it could help me on a side project. |
04:13:53 | FromGitter | <kdheepak> I added `import macros, lineinfos` and now a new error: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ What is `ConfigRef`? [https://gitter.im/nim-lang/Nim?at=5cf0aa01481ef4167ba57b92] |
04:21:05 | FromGitter | <Varriount> @kdheepak If I had to guess, a reference to the Nim compiler's configuration object. |
04:21:38 | FromGitter | <Varriount> Once upon a time, all the compiler state was global. Now it's been put into objects. |
04:27:03 | FromGitter | <kdheepak> Thanks @Varriount I'm going to look at the current nim implementation now to see if I have any leads. |
04:29:45 | * | nsf joined #nim |
04:34:57 | FromGitter | <kdheepak> ```paslex.nim(171, 11) Error: undeclared identifier: 'binaryStrSearch'``` |
04:35:15 | FromGitter | <kdheepak> Did binaryStrSearch use to be part of nim? |
04:36:08 | FromGitter | <kdheepak> Maybe this is going to be easier if I just use an old nim compiler. |
04:36:48 | leorize | just look in the commit log |
04:36:55 | leorize | stuff that are removed usually can be found there |
05:01:53 | FromGitter | <kdheepak> What is the recommended fix for this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5cf0b541ff3f016baa7cd15e] |
05:02:20 | FromGitter | <kdheepak> thanks leorize, I've been searching logs, commit messages, issues, and PRs. I think I've made some progress. |
05:05:32 | Zevv | Varriount: the ($s)[..] is a leftover from when the subject string was a cstring, well spotted |
05:07:22 | Zevv | the .len on #55 also can go out |
05:09:00 | Zevv | no, not true, nevermind the last comment |
05:17:24 | * | Zevv quit (Quit: leaving) |
05:18:04 | * | Zevv joined #nim |
05:20:37 | * | Zevv quit (Client Quit) |
05:21:02 | * | Zevv joined #nim |
05:24:55 | * | narimiran joined #nim |
05:25:07 | * | leorize quit (Quit: WeeChat 2.3) |
05:30:45 | FromDiscord_ | <nothing to no one> Does Nim have runtime polymorphism? |
05:32:39 | leorize[m] | do you have any examples? |
05:33:08 | leorize[m] | as for the polymorphism I know, see the streams module |
05:34:42 | FromDiscord_ | <nothing to no one> Will do, thanks. I think a variant type is what I want though |
05:42:19 | FromGitter | <kdheepak> How do I import `compiler/idents`? |
05:42:22 | FromGitter | <kdheepak> ```pas2nim.nim(14, 16) Error: cannot open file: compiler/idents``` |
05:46:36 | * | dddddd joined #nim |
05:47:18 | FromGitter | <kdheepak> `import idents` seems to do the trick. |
05:53:31 | FromGitter | <kdheepak> oof I seem to have broken something. It's reading the input as a string instead of the input from the file provided to the command line as a string. |
05:53:57 | FromGitter | <kdheepak> But atleast it compiles |
05:54:29 | FromGitter | <kdheepak> I had to comment a couple of `fixexpr` functions since I didn't know what to do to get that to compile. |
05:59:15 | * | leorize joined #nim |
06:05:08 | FromGitter | <Varriount> Zevv: What values are the name fields of regular captures? |
06:06:10 | Zevv | only used for json object fields. I guess that could be made into an variant type |
06:06:33 | * | rnrwashere joined #nim |
06:10:47 | * | rnrwashere quit (Ping timeout: 252 seconds) |
06:10:52 | * | solitudesf joined #nim |
06:22:13 | * | stefanos82 joined #nim |
06:23:02 | * | hoijui joined #nim |
06:36:29 | FromGitter | <kdheepak> I converted a significant portion of the codebase! Thanks for the help! |
06:44:06 | FromGitter | <Varriount> Zevv: Is https://github.com/zevv/npeg/blob/master/src/npeg/capture.nim#L68 correct? Wouldn't it be more efficient to just access the last element in the sequence? |
06:49:10 | * | leorize quit (Remote host closed the connection) |
06:55:34 | * | leorize joined #nim |
06:55:56 | Zevv | true. I have been doing some experimentation there: a ref caputure could in theory result in multiple captures inside the pattern, and my earlier implementation concatenated those. I think it would make sense to limit this to one capture only, and throw an error when the user tries to make multiple captures there, as that just doesnt make sense for a ref |
06:57:33 | * | hoijui quit (Remote host closed the connection) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:29 | * | gmpreussner joined #nim |
07:06:59 | Zevv | anyway, nice to have my code reviewed! |
07:29:23 | FromGitter | <xmonader> @Zevv npeg looks amazing, i wanted to tinker with pegs module in nim but it didn't support captures AFAIK |
07:43:23 | Zevv | I believe it does, but thanks :) |
07:47:04 | * | solitudesf quit (Ping timeout: 272 seconds) |
08:05:50 | * | Senketsu quit (Quit: WeeChat 2.4) |
08:13:49 | leorize | narimiran: still rough, but here's how it looks like: https://dev.azure.com/alaviss/Nim/_build/results?buildId=32&view=ms.vss-test-web.build-test-results-tab |
08:16:30 | * | floppydh joined #nim |
08:17:04 | narimiran | leorize: when i switch to 'logs' view, i see lots of "Error: unhandled exception: Server returned: .....", but 'tests' view shows that everything is passing :/ |
08:17:18 | leorize | oh, those are testament stuff |
08:17:50 | leorize | I'll need to fix that one |
08:19:40 | leorize | ugh, microsoft said you can pass any string into that test outcome field |
08:19:44 | leorize | but obviously you can't |
08:40:24 | leorize | narimiran: azure have integration with github checks, which can show annotation on failed test(s) |
08:41:07 | leorize | except that you'd have to have the build passed |
08:41:20 | leorize | or else the failed tests annotation won't show up |
08:41:36 | leorize | which is just stupid design at best |
08:41:47 | narimiran | :) |
08:56:26 | * | ftsf joined #nim |
09:01:17 | * | elrood joined #nim |
09:02:17 | Zevv | what's the copyright stats on the Nim-logo, is it reusable? |
09:04:58 | FromDiscord_ | <nothing to no one> any good tutorials on nim macro programming? just got my first taste and i love it |
09:05:37 | Zevv | tutorial III |
09:05:52 | Zevv | https://nim-lang.github.io/Nim/tut3.html |
09:06:27 | FromDiscord_ | <nothing to no one> ahh, thank you |
09:07:00 | Zevv | also fetch a copy of dom's book |
09:07:29 | ftsf | i have a proc named A (I'll refer to it as A prime) and in proc B i want to override the name A with a new proc called A which modifies the arguments and calls A prime, however I can't figure out a way to specify A prime in new the A proc as it just causes recursion |
09:07:40 | ftsf | is there any way to refer to the outer scope? |
09:08:18 | leorize | try <modulename>.A |
09:09:47 | leorize | narimiran: look at this: https://github.com/dotnet/arcade/pull/2925/checks?check_run_id=139085235 |
09:10:00 | leorize | ^ got success, but tests failed |
09:10:20 | leorize | I guess this is why MS products are full of bugs |
09:10:26 | narimiran | hahah |
09:10:36 | narimiran | successfully failed :D |
09:10:40 | ftsf | leorize, thanks i'll try that |
09:11:58 | leorize | narimiran: guess I'm gonna make you all go to azure to look for errors rather than dealing with this kind of "failures" |
09:12:38 | narimiran | we don't have 'checks' currently, so it's not like we're gonna miss that |
09:12:59 | narimiran | if it is similar to current appveyor stuff, it will be enough |
09:13:34 | leorize | appveyor have a github app which supports checks :p |
09:24:31 | * | leorize quit (Remote host closed the connection) |
09:25:04 | * | leorize joined #nim |
09:29:05 | * | leorize quit (Client Quit) |
09:30:15 | * | leorize joined #nim |
09:47:31 | * | matt-m joined #nim |
10:03:14 | dom96 | xmonader: perhaps you're getting caught out by `recv`'s behaviour: https://nim-lang.org/docs/asyncnet.html#recv%2CAsyncSocket%2Cint |
10:03:24 | dom96 | It will read all the data you request |
10:03:35 | dom96 | unless your socket is unbuffered (which it isn't by default) |
10:14:11 | * | stefanos82 quit (Remote host closed the connection) |
10:18:49 | * | leorize quit (Ping timeout: 256 seconds) |
10:22:45 | * | dsuch joined #nim |
10:25:56 | dsuch | Hello, I am not a Nim user but I have a theoretical question out of curiosity. My understanding is that the compiler emits C which is then compiled by lower-level compiler, this is clear and understood. |
10:25:59 | * | couven92 joined #nim |
10:26:00 | dsuch | But I just wonder if source-level debugging is possible in these circumstances - reading the page below I am not sure if one debugs a program as it was written in Nim or as it was output to C? |
10:26:04 | dsuch | https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html |
10:27:33 | * | solitudesf joined #nim |
10:28:39 | Zevv | that's supported. Nim makes sure to put proper lineinfo debugging hints in the C code |
10:28:53 | Zevv | in practice you can break and single step on the Nim-level in gdb |
10:29:17 | Zevv | There is also some glue provided by a gdb wrapper script that is shipped with nim (nim-gdb) in order for pretty printing of Nim data in gdb |
10:29:39 | dsuch | Zevv: That is interesting, in essence, it intructs the C compiler to embed debugging info in the resulting binary with references to the Nim source code? (on a high-level, that is) |
10:29:57 | Zevv | the only remaining issue is that Nim-mangled names end up unmangled in gdb. In practice this is not a big problem as long as you use tab-completion, as the mangling is always appended on the end |
10:30:08 | Zevv | dsuch: right |
10:30:23 | Zevv | one moment, I think there's a small demo somewhere on youtube |
10:30:32 | dsuch | Great, thanks Zevv |
10:31:26 | Zevv | somewhere in https://www.youtube.com/watch?v=Ni9ywA0KvrE |
10:31:57 | Zevv | I believe some things have improved since, I think krux02 is the man you need for details |
10:32:50 | dsuch | Zevv: Thanks again, I will check it out |
10:39:18 | leorize[m] | narimiran: https://dev.azure.com/alaviss/Nim/_build/results?buildId=36&view=ms.vss-test-web.build-test-results-tab |
10:39:28 | leorize[m] | ^ w latest improvement |
10:39:36 | leorize[m] | now you can sort by file |
10:40:13 | leorize[m] | ignore the debug prints in logs though |
10:46:15 | * | sentreen quit (Quit: sentreen) |
10:46:24 | * | sentreen joined #nim |
10:47:57 | * | abm joined #nim |
10:49:07 | * | solitudesf quit (Ping timeout: 246 seconds) |
10:53:11 | Mister_Magister | hello i have problem with nimble (that i compiled myself) http://paste.opensuse.org/view//23671433 |
11:05:58 | leorize[m] | Mister_Magister: seems to be a problem w that package requires line |
11:06:18 | leorize[m] | try splitting them into individual requires statement |
11:11:31 | Mister_Magister | well that's not my package, but on pc it seems to work |
11:13:58 | * | stefanos82 joined #nim |
11:15:45 | narimiran | Mister_Magister: you should report it to https://github.com/ba0f3/telebot.nim that they use wrong syntax |
11:16:22 | narimiran | the correct syntax, if you want to do PR, is: `"nim >= 0.19.4", "sam >= 0.1.8"` |
11:17:58 | Mister_Magister | oh okay |
11:18:11 | Mister_Magister | thought it's problem with me |
11:18:27 | Mister_Magister | can i install package using nimble from specific github repo? |
11:21:40 | * | deech_ joined #nim |
11:24:48 | leorize[m] | <Mister_Magister "can i install package using nimb"> yes, just use the url in place of the package name |
11:25:33 | leorize[m] | narimiran: have you looked through that test result? any wanted features? |
11:26:46 | Mister_Magister | @leorize[m] tho it requires hg in path for some reason |
11:28:12 | Mister_Magister | @leorize nevermind |
11:28:45 | Mister_Magister | hmm installed package telebot but nim says "Error: cannot open file: telebot" (tho it works on pc again [on pc aka nim installed from choosenim]) |
11:36:40 | Mister_Magister | also imprt tables doesn't work |
11:44:28 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
11:44:38 | narimiran | Mister_Magister: did you make the same typo (imprt) in your file? ;) |
11:45:01 | * | laaron joined #nim |
11:45:09 | Mister_Magister | narimiran: import tables, httpclient |
11:45:24 | Mister_Magister | it's from lib and it's working on nim from choosenim |
11:45:27 | Mister_Magister | but not from compiled |
11:46:05 | narimiran | does it work if you do `choosenim update devel`, `choosenim devel` ? |
11:46:19 | Mister_Magister | i'm not using choosenim |
11:46:26 | Mister_Magister | i want to compile it using nim i compiled |
11:46:30 | narimiran | "it's working on nim from choosenim" |
11:46:35 | Mister_Magister | yes |
11:46:40 | Mister_Magister | but not on compiled nim |
11:47:03 | narimiran | so are you using choosenim or not? (generally) |
11:47:05 | Mister_Magister | the problem exists on compiled nim, not on nim from choosenim |
11:47:09 | Mister_Magister | no |
11:47:14 | Mister_Magister | i can't |
11:48:37 | narimiran | then what is "nim from choosenim" for you? stable nim, v0.19.6? |
11:48:45 | Mister_Magister | stable |
11:48:51 | Mister_Magister | well 19.6 also works |
11:49:18 | narimiran | you keep on repeating that |
11:49:22 | narimiran | oops |
11:49:27 | narimiran | ignore |
11:49:42 | Mister_Magister | because you can't seem to understand what i'm saying |
11:49:52 | Mister_Magister | choosenim doesn't matter here |
11:50:06 | narimiran | so, the problem is: "telebot works with nim stable, v0.19.6, but it doesn't work on nim devel, v0.19.9"? |
11:50:55 | Mister_Magister | no |
11:51:05 | leorize[m] | how are you using your self-compiled Nim? |
11:51:25 | Mister_Magister | @leorize normally like nim c app.nim |
11:51:40 | Mister_Magister | same way with the nim from choosenim |
11:51:46 | leorize[m] | ok, how did you "install" that version? |
11:51:52 | Mister_Magister | yes |
11:52:06 | Mister_Magister | do you want build log? |
11:52:17 | leorize[m] | I need the steps only |
11:52:21 | narimiran | "same way with the nim from choosenim" - so you DO have 'nim from choosenim'? |
11:52:33 | leorize[m] | how did you build & install it? |
11:52:40 | Mister_Magister | narimiran: try to read what i said and understand please |
11:52:41 | FromGitter | <alehander42> you compiled it from devel or from a tag? |
11:52:44 | Mister_Magister | leorize[m]: https://build.merproject.org/package/view_file/home:mister/nim/nim.spec?expand=1 |
11:52:54 | Mister_Magister | @alehander42 from release tag |
11:53:45 | leorize[m] | Mister_Magister: what's the finalized package structure? |
11:54:12 | leorize[m] | also, nice, nim on sailfish :) |
11:54:23 | narimiran | "try to read what i said" - that's exactly what i'm trying to do, and that's why i'm asking for clarifications. you keep on mentioning 'nim from choosenim', and claim you don't use it, but you somehow know it works on it |
11:54:27 | Mister_Magister | leorize[m]: trying to get it working tho |
11:54:50 | leorize[m] | I need to know how's Nim laid out on the disk |
11:54:55 | Mister_Magister | leorize[m]: i *cough*stole*cough* package from opensuse obs which is working fine so build should be fine aswell |
11:55:47 | leorize[m] | the compiler requires a rather precise placement on disk, but I'm not familiar with how sailfish handle fhs |
11:56:03 | narimiran | leorize[m]: re azure: it looks good to me as far as i can navigate around the UI |
11:56:05 | Mister_Magister | narimiran: i have pc with nim from choose nim where i created app. Now i build nim for my phone packaged it into rpm and installed it on the phone (phone is arm so choosenim doesn't work) and i'm trying to compile my app on the phone that is using telebot |
11:56:40 | narimiran | ok, that's important information to know |
11:56:52 | Mister_Magister | leorize[m]: /usr/bin/nim is rather standard path |
11:57:18 | leorize[m] | how about the other files? |
11:57:27 | leorize[m] | can I have the entire tree? |
11:57:28 | narimiran | Mister_Magister: can you go to your computer and to `choosenim update devel`, `choosenim devel`, and then see if it works or not |
11:57:35 | Mister_Magister | leorize[m]: http://susepaste.org/43293067 |
11:57:43 | Mister_Magister | narimiran: for what |
11:57:46 | Mister_Magister | it works fine on pc |
11:57:51 | * | narimiran quits |
11:58:04 | Mister_Magister | i'm saying that from the beginning that choosenim is not a problem |
11:58:15 | Mister_Magister | leorize[m]: seems to understand |
11:59:06 | narimiran | i know choosenim isn't a problem, i never said that, did i? i know what and why i'm asking you to do, but you keep on ignoring |
11:59:07 | Mister_Magister | leorize[m]: seems pretty normal to me |
11:59:15 | leorize[m] | Mister_Magister: found your prob |
11:59:22 | Mister_Magister | ohhh |
11:59:24 | Mister_Magister | i'm interested |
11:59:53 | leorize[m] | you need to bring the stuff in /usr/lib/nim/lib to /usr/lib/nim |
12:00:18 | Mister_Magister | oh like ln -s it? |
12:00:47 | leorize[m] | no, copy the contents out then delete the folder |
12:00:59 | Mister_Magister | delete usr/lib/nim/lib? |
12:01:16 | leorize[m] | cp -r /usr/lib/nim/lib/* /usr/lib/nim |
12:01:21 | leorize[m] | yea |
12:01:32 | federico3 | (why not mv?) |
12:02:12 | leorize[m] | that works also :p |
12:02:19 | * | hoijui joined #nim |
12:02:22 | Mister_Magister | ah from nim/lib to nim |
12:02:58 | Mister_Magister | leorize[m]: well Error: cannot open '/usr/lib/nim/lib/system.nim' |
12:03:00 | Mister_Magister | erm |
12:03:02 | Mister_Magister | yeah |
12:03:50 | leorize[m] | weird |
12:04:10 | leorize[m] | federico3: can you take a look at Mister_Magister issue? |
12:04:35 | * | Snircle joined #nim |
12:04:56 | narimiran | lib/nim/lib ;) |
12:06:55 | federico3 | leorize[m]: yup |
12:08:26 | Mister_Magister | leorize[m]: btw latest nim is in opensuse thanks to me :3 |
12:10:26 | * | PMunch joined #nim |
12:10:36 | federico3 | leorize[m]: by the way I left SUSE last Friday |
12:10:54 | PMunch | Left SUSE? |
12:12:00 | Mister_Magister | whaat |
12:15:02 | federico3 | yup |
12:15:13 | PMunch | What are you switching to? |
12:15:40 | federico3 | Tor, to work on OONI |
12:17:25 | FromGitter | <alehander42> tell me, it's the pizza oven company |
12:17:39 | FromGitter | <alehander42> i want pizza right now |
12:17:57 | PMunch | Haha alehander42, I'm pretty sure it's this OONI: https://ooni.torproject.org/ |
12:18:45 | FromGitter | <alehander42> ah very cool! |
12:20:18 | federico3 | that one |
12:21:32 | Zevv | sweet stuff federico3, keep up the good work! |
12:21:33 | federico3 | it's part of https://www.torproject.org/about/history/ |
12:21:39 | federico3 | thanks Zevv |
12:22:36 | Zevv | stuff like this really matters in 2019 - who can you trust |
12:22:52 | * | LyndsySimon quit (Ping timeout: 264 seconds) |
12:23:39 | * | zielmicha___ joined #nim |
12:23:43 | * | laaron- joined #nim |
12:24:09 | * | GaveUp quit (Ping timeout: 244 seconds) |
12:24:31 | * | JStoker quit (Ping timeout: 276 seconds) |
12:24:37 | * | laaron quit (Ping timeout: 256 seconds) |
12:25:09 | * | GaveUp joined #nim |
12:25:47 | * | qwertfisch quit (Ping timeout: 252 seconds) |
12:25:51 | * | zielmicha__ quit (Ping timeout: 252 seconds) |
12:25:56 | * | lqdev[m] quit (Ping timeout: 252 seconds) |
12:25:56 | * | TheManiac[m] quit (Ping timeout: 252 seconds) |
12:26:00 | * | Miguelngel[m] quit (Ping timeout: 252 seconds) |
12:26:06 | * | zielmicha___ is now known as zielmicha__ |
12:26:08 | * | go|dfish quit (Ping timeout: 252 seconds) |
12:26:25 | * | LyndsySimon joined #nim |
12:26:27 | * | JStoker joined #nim |
12:26:38 | * | qwertfisch joined #nim |
12:26:40 | * | deech_ quit (Ping timeout: 248 seconds) |
12:26:47 | * | TheManiac[m] joined #nim |
12:27:14 | * | lqdev[m] joined #nim |
12:27:27 | * | Miguelngel[m] joined #nim |
12:32:25 | * | envoyt joined #nim |
12:34:31 | PMunch | federico3, by the way, got some time at the moment so I wanted to try Nim on the DigiSpark (attiny85) |
12:34:43 | Zevv | newruntime! |
12:34:59 | PMunch | newruntime? |
12:35:07 | Zevv | --newruntime |
12:36:27 | * | ng0 joined #nim |
12:36:42 | PMunch | But what is it? |
12:36:54 | federico3 | newruntime on a microcontroller instead of --gc:none ? \o/ |
12:36:55 | Zevv | Araq's new memory management runtime. |
12:37:19 | PMunch | Hmm, would that work? |
12:37:19 | * | rnrwashere joined #nim |
12:37:25 | Zevv | I did some work to get Nim running in the linux kernel a few days ago. Which is basically the same as running without a libc. That worked quite ok, but the I wanted to use more of the stdlib. |
12:37:36 | PMunch | I mean the complexity of the programs I'm going to run on these chips is very limited |
12:37:58 | Zevv | For that you need basic memory management, but pulling in the GC is a bit overkill. So I implemented only basic malloc()/free() on top of linux and using --newrunime I'm able to do basic string, seq, ref operations. |
12:38:03 | PMunch | I mostly want to use Nim so I can create some nice DSL to more easily be able to deploy new sensors with them |
12:38:19 | PMunch | Huh, that sounds cool |
12:38:27 | Zevv | yeah, it was a bit tongue-in-cheek, but still :) |
12:38:35 | Zevv | you only get 512 bytes of RAM, right? :) |
12:39:02 | Zevv | there's a small problem that Nim starts allocating blocks of 512Kb as soon as you allocate one byte. That might be a bit problematic on that platform. |
12:39:40 | Zevv | PMunch: Did you get Nim to run before on a small atmel? |
12:39:45 | PMunch | With the 6k memory this thing has after the bootloader is installed it's a bit limited how much can actually be managed :P |
12:39:57 | PMunch | I haven't actually tried it before |
12:40:06 | PMunch | But federico3 has run it on these Attiny85 chips |
12:41:07 | Zevv | should not be too hard. --os:standalone --gc:none should bring you a long way |
12:43:32 | PMunch | Yup |
12:45:16 | * | rnrwashere quit (Remote host closed the connection) |
12:46:50 | FromGitter | <alehander42> but i think zevv's approach is better |
12:47:04 | FromGitter | <alehander42> as indeed, having at least some stdlib support is pretty nice |
12:47:13 | Zevv | yeah but there's simply no enough memory on these chips |
12:47:18 | FromGitter | <alehander42> zevv, can't you do heuristics in your own malloc |
12:47:28 | FromGitter | <alehander42> so you dont really give 512 kb to nim |
12:47:34 | FromGitter | <alehander42> even if it wants it in this env |
12:47:42 | Zevv | bwah! |
12:48:04 | FromGitter | <alehander42> like, it just preallocates a reasonable amount |
12:48:10 | FromGitter | <alehander42> so just this amount should be different for this env |
12:48:17 | federico3 | Zevv: that what 80 cents gives you on aliexpress |
12:48:34 | Zevv | I guess if we really want to target tiny devices it would be easier to hook eariler in the nim memory management so that its internal allocator is left out and allocs are passed to the os layer straight away. |
12:48:47 | FromGitter | <alehander42> yes, this makes sense |
12:48:55 | FromGitter | <alehander42> so basically, custom allocs |
12:48:58 | Zevv | federico3: yeah, not complaining, I know the restrictions. But Nim targets different scale of systems as soon as you want dynamic memory management |
12:49:13 | FromGitter | <alehander42> Araq, can we have overridable allocators anytime soon |
12:53:23 | * | go|dfish joined #nim |
13:00:43 | * | envoyt quit (Ping timeout: 246 seconds) |
13:01:01 | * | envoyt joined #nim |
13:04:51 | * | envoyt quit (Read error: Connection reset by peer) |
13:05:54 | * | envoyt joined #nim |
13:06:19 | * | envoyt quit (Read error: Connection reset by peer) |
13:11:01 | * | apodo joined #nim |
13:19:58 | FromGitter | <xmonader> @dom96 I see, i can do newAsyncSocket(buffering=false) but what about the accepted socket? how can i tell the listener to return unbuffered client socket? |
13:20:31 | dom96 | IIRC the server will return unbuffered sockets if it itself is unbuffered |
13:20:34 | * | rnrwashere joined #nim |
13:22:50 | FromGitter | <xmonader> @dom96 works like a charm THANK YOU |
13:23:28 | FromGitter | <xmonader> i'll quickly try now thanks |
13:23:46 | * | Senketsu joined #nim |
13:24:03 | dom96 | yay :) |
13:24:15 | FromGitter | <xmonader> I guess I found a topic for a new Nim day! |
13:24:49 | * | rnrwashere quit (Ping timeout: 250 seconds) |
13:25:06 | * | hoijui quit (Remote host closed the connection) |
13:31:14 | * | leorize joined #nim |
13:32:22 | PMunch | federico3, do you have your attiny85 Nim code on GitHub? |
13:33:02 | federico3 | not yet |
13:33:16 | PMunch | Ah.. |
13:34:09 | * | nsf quit (Quit: WeeChat 2.4) |
13:34:36 | federico3 | maintaining a repo for micros & sensors is quite a bit of work |
13:34:52 | PMunch | Yeah, I'd imagine |
13:35:10 | PMunch | I just wanted to see how you put something on the thing |
13:35:40 | PMunch | So far I've only used it with the Arduino IDE |
13:35:52 | federico3 | I use gcc-avr |
13:36:27 | Zevv | avrdude, avrlibc and gcc-avr is the usual trio |
13:37:06 | * | al_ joined #nim |
13:37:31 | * | rnrwashere joined #nim |
13:41:58 | * | rnrwashere quit (Ping timeout: 252 seconds) |
13:45:26 | * | narimiran quit (Read error: Connection reset by peer) |
13:46:26 | * | rnrwashere joined #nim |
13:48:17 | * | rnrwashere quit (Remote host closed the connection) |
13:50:38 | * | narimiran joined #nim |
13:51:44 | * | lritter joined #nim |
13:53:50 | * | vivus joined #nim |
13:53:57 | * | Vladar joined #nim |
13:55:19 | vivus | Hi all. I don't know if there is a bug with the JSON library, but no matter what I do, when I export my table to JSON (even using 2 languages that are using the English letters) I am getting empty JSON fields |
14:10:36 | * | rnrwashere joined #nim |
14:10:55 | xace | vivus could you provide a minimal working example of your problem? |
14:28:45 | * | rnrwashere quit (Remote host closed the connection) |
14:34:08 | vivus | xace: sure. |
14:36:41 | * | hoijui joined #nim |
14:52:53 | vivus | xace: here is the program: https://dpaste.de/cFsL ... Here is the sen.csv file(need to save it locally): https://dpaste.de/Aerj ... Here is the link.csv file(need to save it locally): https://dpaste.de/dadE ... I tried to remove as much data as possible to make these files small. |
15:00:08 | * | hoijui quit (Ping timeout: 259 seconds) |
15:01:57 | xace | vivus: that paste site is terrible, i advise you to never use it again... anyhow, what's the trouble? on my machine it prints out without any errors |
15:02:16 | * | enthus1ast quit (Ping timeout: 252 seconds) |
15:02:22 | narimiran | xace: i was about to say that - what an awful paste site |
15:02:44 | narimiran | vivus: here is your file, without extra empty lines, so you can follow along: http://ix.io/1Kyk/Nim |
15:03:00 | narimiran | look at lines 22-26 and what they do |
15:03:05 | vivus | xace: does the generated JSON export with null values? |
15:03:18 | narimiran | vivus: yes |
15:03:47 | narimiran | lines 22-26, you read from `p`, which is `sen.csv`. now open that wile and look at the values |
15:04:04 | vivus | narimiran: for me the output JSON shows null values |
15:04:35 | narimiran | ah, my bad, ignore the above, i downloaded link.csv twice |
15:05:14 | xace | vivus: there are occurances of null, but i cant trust i correctly downloaded the *.csv files considering how difficult it was to even copy your code... |
15:05:40 | vivus | xace: which site can I use to send you the CSV> |
15:05:43 | vivus | ? |
15:05:49 | narimiran | lines 32-24 won't compile on devel, because you're changing the length of the table while iterating over it |
15:06:11 | vivus | narimiran: yeah we discussed this, I will fix that later. for now I want to address the null values in the JSON |
15:06:26 | narimiran | well, for now, i cannot compile your file |
15:06:50 | vivus | :/ |
15:07:11 | narimiran | and that is already buggy code, even if it "works" on your nim version |
15:09:50 | narimiran | vivus: now, let us all go back a step or two. first question: what exactly are you trying to do, what is the final goal of this code? second: are those csv files something that you created from some other original input? |
15:10:28 | * | dddddd quit (Ping timeout: 245 seconds) |
15:15:47 | * | enthus1ast joined #nim |
15:17:19 | FromGitter | <jrfondren> write some code to check and see if you've inserted something unacceptable. run that code every time you insert something. when that code says you have, print out the csv you'd look at. troubleshoot. |
15:20:26 | * | nsf joined #nim |
15:20:49 | * | dddddd joined #nim |
15:29:03 | * | floppydh quit (Quit: WeeChat 2.4) |
15:30:42 | shashlick | @dom96 - you there? |
15:38:33 | dom96 | yes |
15:38:44 | shashlick | okay so the problem code is here: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptapi.nim#L48 |
15:39:32 | shashlick | so what's happening in your case is that there's already a "server" file compiled so it uses that as the projectFile instead of the nims file |
15:39:44 | shashlick | so i need to use projectPath() from nimscript |
15:39:54 | shashlick | but that means no more 0.19.x support |
15:40:09 | dom96 | Why do you need the project path though? |
15:40:56 | narimiran | vivus: take http://ix.io/1Kym as sen.csv, http://ix.io/1Kyn as link.csv, and then run http://ix.io/1Kyo -- see the difference in size when you convert `my_table` to `myjs` |
15:41:57 | shashlick | cause i need to generate an out file for that nim e execution to get the returned data in json format |
15:42:13 | shashlick | i am creating a projectPath().out file so it is known by the calling nimble process |
15:42:34 | shashlick | admittedly it isn't pretty - alternative is to pass the out file path as part of the invocation command line |
15:42:50 | shashlick | so the nim e call knows where to put the output instead of using some predefined location |
15:48:19 | vivus | narimiran: I took a look. Why is that happening? |
15:49:28 | * | laaron- quit (Quit: ZNC 1.7.1 - https://znc.in) |
15:49:49 | shashlick | @dom96 - i'm going to change the code to specify the out file in the command line and make it unique per run so that you can have multiple runs in the same directory in parallel |
15:50:34 | * | laaron joined #nim |
15:50:38 | dom96 | shashlick: Does this file get cached? |
15:50:39 | * | abm quit (Ping timeout: 268 seconds) |
15:51:00 | shashlick | no it is just for that run then gets deleted |
15:51:03 | shashlick | since it is a return value |
15:51:05 | vivus | narimiran: to answer your 2 questions: 1) the final goal is to extract language-pairs from these giant files, which dump all the languages into 1 file. 2) no, these were probably auto-generated as exports and I downloaded them. I didn't create them, just downloaded them |
15:52:25 | shashlick | this issue only happens when the task name is the same as a file name on the file system |
15:58:03 | * | nuxdie joined #nim |
16:05:37 | narimiran | vivus: read the documentation for `$$`: https://nim-lang.github.io/Nim/marshal.html#%24%24%2CT - "Note: to serialize x to JSON use $(%x) from the json module" |
16:06:25 | narimiran | vivus: so change your line to: `var myjs = $(%my_table)` and you'll see much nicer output (don't forget to `import json`) |
16:19:25 | * | al_ quit (Quit: al_) |
16:23:22 | * | rnrwashere joined #nim |
16:27:35 | * | jjido joined #nim |
16:27:41 | * | rnrwashere quit (Ping timeout: 250 seconds) |
16:33:23 | dom96 | shashlick: why does it get saved to a file? |
16:33:30 | dom96 | oh, because you don't want to read stdout |
16:33:39 | dom96 | You should put the file in /tmp |
16:33:52 | dom96 | Seeing files appear and disappear in VS Code isn't great |
16:34:05 | shashlick | i agree with that, no choice with the actual nims file since imports could be relative |
16:34:11 | shashlick | but this out file could be moved out of there |
16:37:00 | shashlick | what's the best random filename generator |
16:37:14 | dom96 | Nimble has functions for this |
16:37:16 | dom96 | reuse them |
16:40:19 | shashlick | there's getNimbleTempDir() but i need a file - don't want to create a dir and file for every run |
16:41:11 | shashlick | should i make a variation of that proc? |
16:42:39 | shashlick | well, actually i can reuse it since it just returns a string - i can just use it as a filename by adding an extension |
16:42:56 | vivus | narimiran: Doing that is throwing the error: template/generic instantiation from here ... Error: undeclared field: 'data' |
16:43:18 | narimiran | huh, it works on my end |
16:45:20 | vivus | narimiran: must be a bug-fix in devel that allows it to work now |
16:47:17 | vivus | let me try going to devel |
16:49:54 | * | envoyt joined #nim |
16:53:24 | shashlick | @dom96 - i have a tentative fix - will you be able to test? |
16:58:33 | shashlick | by the way, nimble doesn't work anymore unless you have -d:nimOldCaseObjects |
16:58:35 | dom96 | shashlick you don't need a unique file for each run |
16:58:43 | dom96 | just use `getNimbleTempDir() / "nime-output"` or something |
16:58:59 | shashlick | yes that's what i'm doing pretty much |
17:00:03 | shashlick | getNimbleTempDir() & ".out" |
17:00:44 | shashlick | why do you need -d:nimOldCaseObjects |
17:00:50 | shashlick | otherwise nimble doesn't run at all |
17:01:39 | shashlick | http://ix.io/1KyV |
17:02:14 | Mister_Magister | lol they fixed it https://build.opensuse.org/request/show/706734 |
17:03:33 | vivus | narimiran: yeah some bug in json or something was fixed |
17:03:35 | * | deech_ joined #nim |
17:03:37 | vivus | works for me too now |
17:03:48 | narimiran | vivus: glad to hear :) |
17:03:58 | vivus | ty for the help and you too xace |
17:04:10 | * | vivus quit (Remote host closed the connection) |
17:04:17 | xace | anytime mister |
17:07:39 | * | oz quit (Quit: EOF) |
17:10:40 | FromGitter | <zacharycarter> Vue is pretty nice - I like it better than react. I still haven't really used Karax enough to make a fair comparison to Vue / React |
17:12:15 | * | oz joined #nim |
17:12:56 | FromGitter | <zacharycarter> Situations where I actually need one of these libraries, is pretty rare |
17:13:32 | FromGitter | <alehander42> nimAsgnStrV2: Zevv |
17:13:44 | FromGitter | <alehander42> dont you hit that this is missing in your kernel linux project |
17:14:17 | Zevv | I saw that once I think, I did some stubbing here and there, but not for that one |
17:14:36 | Zevv | do you have my repo? |
17:23:12 | * | deech_ quit (Ping timeout: 248 seconds) |
17:23:19 | * | Trustable joined #nim |
17:28:29 | FromGitter | <alehander42> i looked at it now, but i dont see such a change indeeed |
17:28:36 | FromGitter | <alehander42> my error is |
17:28:56 | FromGitter | <alehander42> for proc `$`(info: InstantiationInfo): string = "" |
17:29:57 | FromGitter | <kayabaNerve> @zacharycarter I might do some work with Vue :thinking: |
17:30:20 | FromGitter | <zacharycarter> I'm using Vue + Vuetify at work for my first project and it's nice |
17:30:25 | FromGitter | <kayabaNerve> I download the Nim devel with choosenim the other day and encountered some pretty nasty bugs, Are the regressions fixed yet> |
17:30:54 | FromGitter | <kayabaNerve> Guess the real way to check is to download it and try it |
17:31:05 | narimiran | kayabaNerve can you be more specific? |
17:31:23 | FromGitter | <alehander42> hm just when hostOs == "standalone": ⏎ include "core/strs" |
17:32:03 | FromGitter | <kayabaNerve> StInt, a Status library for big nums, had a function return a string. It ended with reverse(X). Not result =, or return, just reverse(x). The types were valid. |
17:32:04 | Zevv | alehander42: not sure why you get this; I'm not running 'standalone', so it might be that Nim provides that for me |
17:32:09 | FromGitter | <kayabaNerve> It didn't compile. |
17:32:33 | FromGitter | <kayabaNerve> There's also this issue https://github.com/cheatfate/nimcrypto/issues/27 |
17:32:52 | shashlick | @Araq @narimiran @dom96 - what's with this - http://ix.io/1KyV re: -d:nimOldCaseObjects |
17:33:28 | shashlick | do we need to add that to koch now so that nimble works? |
17:34:13 | narimiran | kayabaNerve why did you close that issue, if it exists on devel? :/ |
17:34:55 | FromGitter | <kayabaNerve> Because it was an issue with Nim and that's the Nimcrypto repo? |
17:35:15 | narimiran | shashlick: it is a fix for https://github.com/nim-lang/Nim/issues/1286; see https://github.com/nim-lang/Nim/commit/49e686ab4e8103173ecb39cc16896eb979ddf9ce |
17:35:57 | FromGitter | <kayabaNerve> IIRC, it was one of these commits https://i.imgur.com/Bo782hc.png |
17:36:09 | narimiran | kayabaNerve: look at the error message. it should be fixed in that repo, no? |
17:36:59 | FromGitter | <kayabaNerve> When the top working crypto lib for Nim breaks, and so does a stable lib from Status, during a period when Nim tests fail for several commits.... |
17:37:04 | FromGitter | <kayabaNerve> No, I wouldn't say so. |
17:37:09 | narimiran | ok |
17:37:40 | shashlick | @narimiran - where should it be fixed in nimble? |
17:37:49 | FromGitter | <kayabaNerve> Especially because of the error when you actually look it. It defines a version for A, B, C, D, E, F. I wanted to use B, yet only A and D were noted. It wasn't even an inherited thing. |
17:38:48 | FromGitter | <alehander42> i run os:standalone yes |
17:39:02 | FromGitter | <alehander42> Zevv, i seem to need to recreate alloc0 and dealloc |
17:39:03 | shashlick | @narimiran - it is failing from here - https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/options.nim#L241 |
17:39:08 | FromGitter | <alehander42> which might help me |
17:39:13 | narimiran | i don't see the issue about that open in nim repo |
17:39:23 | FromGitter | <alehander42> this is where nim wants |
17:39:26 | FromGitter | <alehander42> the huge chunks right |
17:39:33 | Zevv | alehander42: I guess you need to do a tad more, but that is about the right place to start I think |
17:39:41 | narimiran | how can we know it is failing when there's no open issue? |
17:41:01 | FromGitter | <alehander42> can i create a `pointer(<raw number>)` btw |
17:41:05 | FromGitter | <alehander42> Zevv thanks |
17:42:19 | shashlick | @narimiran - it is failing in 3 places in nimble and i don't know what the fix should be so any guidance appreciated |
17:42:33 | narimiran | shashlick: i'm looking at it |
17:42:45 | * | solitudesf joined #nim |
17:43:00 | shashlick | these commands also break - nim c -r src/nimblepkg/version, nim c -r src/nimblepkg/reversedeps |
17:47:11 | FromDiscord_ | <DeltaPHC> alehander42: You can use cast. `var foo = cast[pointer](1234)` |
17:47:35 | FromDiscord_ | <DeltaPHC> Easy way to make segfaults :P |
17:51:29 | Zevv | well, for memory mapped I/O there is now way around |
17:52:53 | narimiran | shashlick: from a quick look, it seems that `VersionRangeObj` is the problem (version.nim, at the top) |
17:53:01 | FromDiscord_ | <DeltaPHC> Does Nim have a way to do volatile reads/writes? Need that for memory-mapped IO too |
17:53:16 | Zevv | pragma for that |
17:53:34 | FromGitter | <alehander42> thank you DeltaHPC |
17:54:43 | Zevv | alehander42: get stuff going and make an Arduino setup for Nim - that'll reach a nice audience |
18:04:05 | FromGitter | <alehander42> hm |
18:04:13 | FromGitter | <alehander42> i ha ent used ardino honestly |
18:04:20 | FromGitter | <alehander42> what are the specs |
18:04:52 | FromGitter | <alehander42> i planned more to target a desktop, have a whole very inefficient filesystem + ui planned |
18:12:41 | * | rnrwashere joined #nim |
18:12:53 | * | rnrwashere quit (Client Quit) |
18:14:37 | * | deech_ joined #nim |
18:25:37 | * | PMunch quit (Remote host closed the connection) |
18:36:58 | * | jjido quit (Quit: Connection closed for inactivity) |
19:08:06 | * | rnrwashere joined #nim |
19:11:25 | * | theelous3_ joined #nim |
19:24:03 | Zevv | I'm adjusting the manual to mention `except x as y'. What would be the preferred way to get an exception message? An 'anynomous' except with `getCurrentExceptionMsg()`, or using `except X as e` and then `e.msg`? |
19:24:20 | Zevv | I personally prefer the latter, more concise |
19:24:44 | lqdev[m] | same here |
19:31:40 | * | nsf quit (Quit: WeeChat 2.4) |
19:36:03 | * | matt-m_ joined #nim |
19:37:58 | * | matt-m quit (Ping timeout: 245 seconds) |
19:54:28 | Zevv | ok, made it like this: https://gist.github.com/zevv/6beac282e48c3e9258eeb245c703db3e |
19:54:36 | shashlick | @dom96 - https://github.com/nim-lang/nimble/pull/659 |
19:56:58 | * | shadowbane quit (Quit: Konversation terminated!) |
19:57:23 | FromDiscord_ | <j$> did something change when accessing pointers like arrays? |
20:00:49 | FromGitter | <xmonader> I can't find a TLS parser in the nimble directory :( |
20:01:26 | * | Trustable quit (Remote host closed the connection) |
20:07:59 | shashlick | someone recently wrapped gnutls |
20:11:22 | * | shashlick quit (Remote host closed the connection) |
20:11:43 | * | shashlick joined #nim |
20:14:37 | shashlick | I think @federico3 was looking into it |
20:15:00 | federico3 | I am |
20:15:17 | federico3 | and it's not straightforward :-/ |
20:15:38 | federico3 | c2nim and nimterop still need to evolve quite a bit |
20:15:54 | * | narimiran_ joined #nim |
20:16:29 | gearshift | whatever happened to Status wrapping libgcrypt? |
20:17:54 | * | Vladar quit (Remote host closed the connection) |
20:18:09 | * | narimiran quit (Ping timeout: 252 seconds) |
20:19:32 | shashlick | @federico3 - what do you have so far? i can look into it, also totally open to improvements |
20:20:01 | federico3 | which one? |
20:20:47 | shashlick | gnutls, assuming @xmonader could use it |
20:20:51 | shashlick | but also in general |
20:21:08 | federico3 | I can publish both |
20:22:38 | * | deech_ quit (Ping timeout: 272 seconds) |
20:25:41 | * | narimiran joined #nim |
20:25:51 | * | narimiran_ quit (Ping timeout: 252 seconds) |
20:26:19 | FromDiscord_ | <Avatarfighter> I have a quick question, what is the range of values an int8 can be in nim and should setting the ccompiler to release versus debug change that range of possible values? |
20:27:21 | FromGitter | <jrfondren> !eval echo [int8.low, int8.high] |
20:27:24 | NimBot | [-128, 127] |
20:27:56 | FromGitter | <jrfondren> release vs. debug shouldn't change it, but release could disable checks that you're relying on in debug. |
20:28:17 | * | deech joined #nim |
20:28:35 | FromGitter | <jrfondren> for example I had some code that segfaulted under -d:release because I was catching the IndexError from an out of bounds access that never happens in -d:release. |
20:29:59 | FromDiscord_ | <Avatarfighter> That's really weird :L |
20:30:08 | FromGitter | <xmonader> @shashlick I'll check it thank you |
20:30:19 | FromDiscord_ | <Avatarfighter> I'm getting a range error when i try to convert a value that is in the int8 range in debug mode but converts to int8 fine in release |
20:30:31 | FromGitter | <jrfondren> well what's the error? |
20:31:04 | FromDiscord_ | <Avatarfighter> One second I'm reproducing it haha |
20:32:57 | deech | I've been bitten multiple times by 'not number == otherNumber' due to 'not' being overloaded on XOR ( I think? ). Is there some way around this? |
20:33:26 | FromGitter | <jrfondren> `not (number == otherNumber)` |
20:33:30 | deech | I know the answer is 'not (number == otherNumber)' but I was hoping there was a better way. |
20:34:09 | FromGitter | <jrfondren> `import intswithoutnot` that makes a distinct int and borrows everything else? |
20:34:17 | FromDiscord_ | <Avatarfighter> huh, not the same error any more, I might be going insane |
20:35:05 | FromDiscord_ | <Avatarfighter> nvm jrfondren It's an issue with an enum with holes |
20:35:05 | deech | Or make XOR work on a distinct 'int'? The current behaviour is going to cause nasty runtime bugs. |
20:35:47 | FromGitter | <jrfondren> it's bitwise negation, it's like xor(-1,n) |
20:36:27 | deech | @jrfondren ah, ok. But my point is still valid I think ... |
20:37:59 | FromGitter | <jrfondren> what Ada does is not even define bitwise ops for signed numbers. A non-breaking way would be to have the compiler warn about this specific construct so that people can write it less confusingly, similar to gcc's extra () around assignment in if. A breaking way I'd prefer is to drop `not` for `invert` for bitwise negation (which is what Forth did since one standard defined NOT as logical and the next standard defined |
20:37:59 | FromGitter | ... it as bitwise, so the third standard had to drop it) |
20:39:13 | FromGitter | <jrfondren> you could also 'fix' it with documentation. there are other caveats to be aware of, like causing and catching deliberate out-of-bounds exceptions maybe not being the thing you want to do if you plan to run in -d:release |
20:40:00 | deech | haha! I do like 'invert'. Why not make 'invert' work on a 'BitwiseInt' type or something like that? |
20:40:15 | Zevv | deech: how do you mean overloaded on XOR? |
20:40:27 | FromGitter | <jrfondren> or just make it work on normal numbers, since it's not going to be as confusing |
20:40:59 | FromGitter | <jrfondren> yet another option is `number != otherNumber` :p |
20:41:03 | deech | 'invert' is a pretty common word, someone is going to come along and overload it and we're back to a similar problem. |
20:41:38 | deech | I like distinct types especially when there's no runtime overhead. FP background I guess ... :P |
20:42:08 | * | matt-m_ quit (Remote host closed the connection) |
20:42:45 | * | rnrwashere quit (Remote host closed the connection) |
20:42:55 | FromGitter | <jrfondren> Zevv, he means that `not` is overloaded for bitwise and logical use. it works on bool and on int. |
20:43:41 | FromGitter | <jrfondren> `or` and `and` are the same way. are there some uses of those that are as confusing to read as `not a == b`? |
20:43:47 | Zevv | ah ok, I thought it was because of 'not' having same precedense as '==' |
20:43:58 | Zevv | not a == b -> (not a) == b |
20:44:30 | FromGitter | <jrfondren> aye, changing precedence is a solution as well. if that parses as `not (a == b)`, then that's more likely what people mean anyway. |
20:44:42 | FromGitter | <jrfondren> I don't know what else that would change. |
20:45:12 | FromGitter | <jrfondren> well `not a == b` is confusing with numbers. with bools you might actually expect the current precedence. |
20:45:48 | Zevv | Well, maybe getting a warning would be a good idea, it's almost ambigious |
20:47:10 | Zevv | gcc and clang can warn about these things |
20:47:52 | FromGitter | <jrfondren> style warnings. |
20:48:04 | Zevv | I'll file an issue; it's more then style |
20:49:02 | FromGitter | <jrfondren> eh, I think it's only more than style in that maybe it's so bad that the language should change for it, not just warned about. |
20:49:49 | FromGitter | <jrfondren> if there's no language change and this is just how it's going to be, then a style warning tells people that this code is confusing even if they're aware of it and understand what they're doing. |
20:49:54 | Zevv | well, usually operators with the same precedence chain well: 1 + 3 + 4 is no problem, neither is 3 * 4 / 5 |
20:50:50 | FromGitter | <jrfondren> I don't think this is necessarily a precedence problem since the current precedence is probably what you'd want if you were working with booleans. |
20:51:40 | Zevv | well, maybe not. Since precedence is equal it is evaluated left to right, but that's not really explicit here. |
20:51:40 | skrylar[m] | precedence woes is why i prefer the left-to-right-in-all-cases doctrine of smalltalk and rebol |
20:55:52 | Zevv | https://github.com/nim-lang/Nim/issues/11372 |
20:56:33 | Zevv | only 1,172 issues, one more can't possibly hurt |
20:57:12 | FromGitter | <jrfondren> I'm only reluctant to add an issue when the issue count gets to some interesting number, like 256 or 666 |
20:57:55 | FromGitter | <jrfondren> at the current rate we'd need to add hundreds of issues to start getting to interesting years, so no worry |
20:58:23 | Zevv | hehe |
21:00:27 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
21:00:53 | * | laaron joined #nim |
21:05:51 | * | rnrwashere joined #nim |
21:06:46 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
21:07:09 | * | rnrwashere quit (Remote host closed the connection) |
21:07:26 | * | laaron joined #nim |
21:07:56 | * | rnrwashere joined #nim |
21:11:43 | * | narimiran quit (Ping timeout: 245 seconds) |
21:24:41 | federico3 | https://screenshotscdn.firefoxusercontent.com/images/7620969e-59c1-4baa-bc15-91c34ec8fc30.png oopsie |
21:25:29 | * | xet7 quit (Quit: Leaving) |
21:27:31 | * | stefanos82 quit (Remote host closed the connection) |
21:33:52 | * | theelous3_ quit (Ping timeout: 248 seconds) |
21:40:52 | * | rnrwashere quit (Remote host closed the connection) |
21:41:22 | * | deech quit (Remote host closed the connection) |
21:41:40 | * | rnrwashere joined #nim |
21:41:47 | * | deech joined #nim |
21:46:05 | * | rnrwashere quit (Ping timeout: 258 seconds) |
21:50:17 | * | Hexeratops joined #nim |
21:54:23 | * | deech_ joined #nim |
21:56:16 | federico3 | xmonader ? |
21:59:46 | xace | federico3: what'd you do to cause that drop? |
22:00:03 | * | laaron quit (Remote host closed the connection) |
22:00:28 | * | solitudesf quit (Ping timeout: 245 seconds) |
22:00:32 | * | laaron joined #nim |
22:08:24 | deech_ | Are 1-tuple bindings on the roadmap? Not that it makes much sense but something like 'let (x) = ...' where '(x)' is a tuple with one element. |
22:08:28 | federico3 | testing gcrypt |
22:08:31 | * | apodo quit (Ping timeout: 248 seconds) |
22:08:57 | xace | federico3: I see, what did you log those values with? |
22:09:20 | federico3 | that's Netdata https://github.com/netdata/netdata |
22:09:22 | dom96 | deech_: don't think so |
22:10:00 | xace | deech_: I guess you could let (x,_) = (1, 2) # but not sure if a singleton-tuple is going to be a thing |
22:11:11 | deech_ | Not that it has any advantage over just 'let x = ...' but it might make sense from a consistency sake since we have one element 'seq'/'openarray' etc. |
22:11:49 | deech_ | If I was generating tuples I'd have to take the one element case into account which I don't have to otherwise. |
22:12:26 | xace | federico3: i see, thanks, seems like a useful tool |
22:12:33 | federico3 | very |
22:21:31 | xace | deech_: yeah, I guess tuples are basically a "finite sequence", so i guess `let x: seq[int] =` # should fulfill your role if you have to keep it in a ordered list... |
22:28:32 | * | Tyresc joined #nim |
22:41:46 | federico3 | shashlick: https://github.com/FedericoCeratto/nim-libgcrypt |
22:48:17 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
22:51:20 | shashlick | Wow nice |
22:57:21 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
23:15:28 | Mister_Magister | lol my nim doesn't have seq.sample |
23:18:50 | * | rockcavera quit (Remote host closed the connection) |
23:19:55 | * | lritter quit (Quit: Leaving) |
23:28:37 | * | deech_ quit (Ping timeout: 246 seconds) |
23:30:14 | * | deech_ joined #nim |
23:30:37 | * | elrood quit (Remote host closed the connection) |
23:40:04 | * | rockcavera joined #nim |
23:48:37 | * | rayman22201 joined #nim |
23:55:25 | * | couven92 quit (Quit: Client Disconnecting) |
23:57:26 | * | oculuxe joined #nim |
23:59:02 | * | oculux quit (Ping timeout: 258 seconds) |
23:59:16 | rockcavera | I'm having problems with newAsyncSocket (), from the asyncnet module. When I open 1019 simultaneous sockets, it works fine. From 1020 gives this error: Error: unhandled exception: Too many open files [OSError]. This error is happening only in linux (debian and kali) |