00:00:40 | FromGitter | <mratsim> ```result = newSeq[T](input.len) ⏎ for i in 0||result.high: ⏎ result[i] = your_operation[i]``` [https://gitter.im/nim-lang/Nim?at=59f90ea8f7299e8f53582ee8] |
00:05:32 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
00:09:15 | federico3 | mratsim thanks but I was looking for something to use with async and threads |
00:20:29 | vivus | Can anyone explain to me why most dynamic languages choose OOP? |
00:22:26 | FromGitter | <mratsim> Dynamic languages require reference types. OOP works well (requires) with ref types. |
00:23:23 | FromGitter | <mratsim> obviously there was a fashion effect as well |
00:24:06 | FromGitter | <mratsim> There s only so much programming paradigm: Lisp, procedural, aspect-oriented, logic, functional and OOP ... |
00:24:33 | vivus | doesn't procedural fall under OOP? |
00:24:49 | FromGitter | <mratsim> C is procedural but not OOP |
00:24:56 | vivus | and so is Nim? |
00:25:22 | FromGitter | <mratsim> procedural means you have control structure like for loop, while, if/then, etc |
00:25:41 | vivus | what other static, compiled languages are just procedural without OOP? |
00:25:52 | FromGitter | <data-man> A task lists in the GitHub is very useful for a issues and PRs. It is necessary that all users use them. :) |
00:26:07 | FromGitter | <mratsim> Fortran |
00:26:35 | FromGitter | <mratsim> and you have of course procedures/functions |
00:26:52 | vivus | someone mentioned here (not too long ago) that Nim shares a lot less with Python than people assume. is this true? |
00:27:08 | vivus | (or was it HN) |
00:27:13 | vivus | (can't recall exactly) |
00:27:50 | FromGitter | <mratsim> It shares the syntax. But besides you will find more similarities with Pascal than Python |
00:28:37 | vivus | I wrote some Nim not too long ago that looked almost like Python. However, seeing other peoples Nim code is sometimes confusing. |
00:31:50 | FromGitter | <mratsim> I think this happen in all languages. Code that is written by you (or that you wrote 6 months ago) is harder to read |
00:32:33 | vivus | I can understand when a function is written and it does 1 thing well. but there are some exotic edge-cases used that make the code confusing |
00:32:44 | FromGitter | <mratsim> And Nim has lots of powerful features, if you’re at the beginning of your learning curve some things are “wow I can do that” or “what the hell does that do" |
00:33:27 | FromGitter | <mratsim> But thankfully, since Nim uses keywords instead of symbols you should be able to easily find any advanced feature in the manual |
00:34:23 | vivus | I was just looking at some crystal code and I know what you mean about symbols. `x-controller::y-something` |
00:34:56 | * | arnetheduck joined #nim |
00:38:50 | * | m712 quit (Ping timeout: 255 seconds) |
00:38:58 | Calinou | this is why you should always comment your code liberally |
00:39:02 | Calinou | ~~or even comunistically~~ |
00:39:40 | FromGitter | <data-man> @vivus: You may look at C++ templates! :) |
00:40:14 | vivus | I can't say I am a fan of verbose symbols as syntax. that is a barrier to entry |
00:43:16 | Calinou | yeah, C++ is not the pinacle of conciseness |
00:43:21 | Calinou | pinnacle* |
00:45:03 | vivus | Calinou: when did you join the FSF? :O |
00:45:14 | Calinou | vivus: this month |
00:45:18 | Calinou | :-) |
00:45:19 | vivus | congrats :) |
00:46:23 | * | rauss quit (Read error: Connection reset by peer) |
00:48:01 | * | gokr quit (Ping timeout: 248 seconds) |
00:48:09 | FromGitter | <data-man> And what about the D language templates? :) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f919c9976e63937e103746] |
00:48:20 | * | rauss joined #nim |
00:49:07 | FromGitter | <mratsim> The `~` operator is concatenation? |
00:49:30 | FromGitter | <data-man> Yes |
00:50:29 | FromGitter | <mratsim> I don’t like the `!` and the noisy static but otherwise It’s pretty good |
00:52:06 | FromGitter | <data-man> I chose not the worst example :) |
00:52:15 | vivus | this is Crystal code: https://www.zerobin.net/?ea0aec794e502a50#u0MdDXWmcJD/EPySShyhM20IxooBaWlB2DeJX3CTxok= |
00:55:42 | vivus | oh wow, that confusing code auto-generated an entire website with authentication for me |
00:56:29 | Calinou | Crystal code usually looks more terse than Nim for me |
00:56:35 | Calinou | it can look a bit *too* terse, too |
00:57:20 | vivus | apparently Rubyists can understand this code quite easily |
01:00:14 | * | sz0 joined #nim |
01:13:25 | * | arecaceae quit (Remote host closed the connection) |
01:13:43 | * | arecaceae joined #nim |
01:58:17 | * | vivus quit (Quit: Leaving) |
02:05:47 | * | darkn0de quit (Ping timeout: 258 seconds) |
02:07:53 | FromGitter | <gogolxdong> How to import karax? I have nimble installed and it is present in the .nimble/pkg path but can't open. |
02:10:58 | hogeland | dom96: nim in action arrived today! :o) |
02:19:28 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:26:57 | * | darkn0de joined #nim |
02:29:20 | * | couven92 quit (Quit: Client Disconnecting) |
02:33:26 | * | chemist69 joined #nim |
02:45:19 | FromGitter | <brentp> @zetashift R is popular for RNA-Seq and some types of analyses (and among some groups). I've done enough R to try to stay away when possible. |
02:53:28 | * | libman quit (Quit: Connection closed for inactivity) |
03:06:41 | * | NimBot joined #nim |
03:09:45 | Xe | c2nim isn't building on nim 0.17.2: https://gist.github.com/Xe/ff541c2c4cf6ba791bfd3c9d69cc8b87 |
03:11:32 | Xe | oh, known issue, fixing |
03:13:35 | * | rauss quit (Ping timeout: 240 seconds) |
03:18:35 | * | dddddd quit (Remote host closed the connection) |
03:20:39 | * | JappleAck quit (Quit: Leaving) |
03:21:17 | * | def-pri-pub quit (Quit: Leaving.) |
03:46:21 | * | awal is now known as awalloween |
03:47:15 | * | awalloween is now known as awal |
04:06:24 | * | def-pri-pub joined #nim |
04:08:17 | * | skrylar joined #nim |
04:08:26 | skrylar | yardanico: couple more headers and the fltk stuff will be ready for testing |
04:09:20 | FromGitter | <gogolxdong> Is it possible to partially import like from jsffi import jsnew? |
04:27:14 | * | def-pri-pub quit (Quit: Leaving.) |
05:29:11 | FromGitter | <Varriount> @gogolxdong You mean https://nim-lang.org/docs/manual.html#modules-from-import-statement ? |
05:54:26 | FromGitter | <gogolxdong> yeah, I have figured it out, it's implemented like python. Now I am having question about karax, one is how to import it from another project the other is it seems overlayed with jsffi, cannot import both at the same time, though I used from jsffi import jsnew,JsObject , it caused undeclared routine of libvirtual module `attempting to call undeclared routine: 'Hypervisor' ` which works well when only imports jsffi. |
06:11:41 | * | vlad1777d joined #nim |
06:12:42 | * | miran__ joined #nim |
06:14:39 | * | Vladar joined #nim |
06:29:37 | * | m712 joined #nim |
06:40:31 | * | nsf joined #nim |
06:46:46 | * | pwntus quit (Ping timeout: 258 seconds) |
06:59:15 | * | pwntus joined #nim |
07:17:05 | FromGitter | <gogolxdong> I have conceived two crossing platform solutions : one is sdl2 but got problems of integrating tcp through SDL2_net.dll in windows ,the other is web GUI through karax+nodejs libvirt module but got stuck too, cannot get a balance,what's your opinion? |
07:19:44 | * | sz0 quit (Quit: Connection closed for inactivity) |
07:26:41 | * | vlad1777d quit (Remote host closed the connection) |
07:43:26 | * | Arrrr joined #nim |
07:47:11 | * | PMunch joined #nim |
08:19:24 | * | claudiuinberlin joined #nim |
08:19:26 | * | tdc joined #nim |
08:20:14 | * | yglukhov joined #nim |
08:20:17 | * | miran__ quit (Ping timeout: 246 seconds) |
08:22:34 | Araq | gogolxdong: what's the problem of importing jsffi and karax? karax doesn't use jsffi |
08:28:11 | FromGitter | <gogolxdong> yes , because I wrote a prototype from nim-electron using jsnew and it works well. karax has JDict which is similar with JsObject but can't work. I tried from jsffi import JsObject,jsnew as well as karax as follows :https://gist.github.com/gogolxdong/cedb93aaf7249ec8170243309ee5b3a4 |
08:31:27 | * | yglukhov quit (Ping timeout: 248 seconds) |
08:33:16 | Araq | well jsffi is full of magic you can't only import the symbols you think are required |
08:34:31 | FromGitter | <gogolxdong> yes, import both cause ambigious call `&` |
08:34:33 | Araq | your snippet compiles for me when I do 'import jsffi' |
08:35:37 | * | yglukhov joined #nim |
08:37:00 | Araq | the karax import can just be import karax / [vdom, karaxdsl, karax] |
08:37:22 | Araq | you don't have to use jstrutils, compact or jdict. |
08:37:34 | FromGitter | <alehander42> what are the differences between JDict and stl's JsAssoc ? I've always used the later |
08:37:47 | Araq | stl? |
08:37:55 | FromGitter | <alehander42> standard library* |
08:39:15 | FromGitter | <gogolxdong> yes , ambigiousness comes from jsutils & |
08:39:51 | yglukhov | Araq: hi, can you merge https://github.com/nim-lang/Nim/pull/6662 pls? |
08:39:52 | FromGitter | <gogolxdong> but I still wonder how to import karax from another project since I have nimble installed. |
08:40:31 | Araq | JDict uses JS objects as hash tables, JsAssoc is for interfacing with JS |
08:41:45 | FromGitter | <alehander42> you can use JsAssoc-s as hash tables and use JDict to interface with JS, I don't think a line between the two usages is needed |
08:42:15 | Araq | well I don't use jsffi, I like my type safety too much |
08:44:04 | FromGitter | <alehander42> which is why I've been bugging you people for this js inline object type thing :P |
08:46:55 | FromGitter | <gogolxdong> I like it too, seems lack of alternative of jsnew+JsObject. |
08:49:10 | FromGitter | <gogolxdong> JsObject {.importcpp: "{@}".} ==JDict {.importcpp: "{@}".} ? |
08:50:42 | PMunch | Hmm, this GraphQL is really cool dom96 |
08:51:36 | FromGitter | <gogolxdong> Do you design karax using nims to specify the karax path and cannot be imported from nimble intentionally? |
08:52:28 | FromGitter | <gogolxdong> I am not sure whether there is any magic. |
08:52:43 | Araq | nimble install karax |
08:52:56 | Araq | import karax / [stuff] |
08:53:08 | Araq | is supposed to work :-) |
08:54:14 | FromGitter | <gogolxdong> packages not found. I followed your instructions in readme |
08:54:17 | PMunch | Yeah, that's worked fine for me |
08:56:34 | FromGitter | <gogolxdong> git clone ,cd /karax and nim install works fine ,but nimble install karax end up with`Error: Package not found.` |
08:56:59 | PMunch | nim install? |
08:57:12 | FromGitter | <gogolxdong> nimble install |
08:57:28 | PMunch | git clone; cd karax; nimble install |
08:57:32 | PMunch | That should be all you need |
08:57:39 | PMunch | No "nimble install karax" |
08:57:51 | Araq | ouch, it's still missing from packages.json |
08:58:07 | Araq | because 'nimble publish' fails |
08:58:13 | Araq | but I think that got fixed? |
09:04:43 | PMunch | No idea, I've never used nimble publish :P |
09:20:32 | * | slim_jim_jiss joined #nim |
09:24:25 | * | tdc_ joined #nim |
09:27:53 | * | Ven joined #nim |
09:28:01 | * | tdc quit (Ping timeout: 248 seconds) |
09:28:17 | * | Ven is now known as Guest37250 |
09:29:18 | * | tdc_ quit (Ping timeout: 258 seconds) |
09:33:40 | skrylar | i have a few times. it's ... mmm. |
09:34:31 | PMunch | Haha, I think I tried it once and it didn't work :P |
09:36:08 | * | chemist69 quit (Ping timeout: 240 seconds) |
09:36:32 | * | chemist69 joined #nim |
09:41:01 | * | dddddd joined #nim |
09:41:24 | FromGitter | <mratsim> Same, tried it it created an half-assed PR that I had to edit by hand |
09:42:28 | * | tdc joined #nim |
09:42:38 | skrylar | it kept using localhost repositories i had to fix manually |
09:43:05 | * | endragor joined #nim |
09:57:47 | * | gokr joined #nim |
09:58:02 | * | couven92 joined #nim |
10:01:03 | * | thomasross_ quit (Remote host closed the connection) |
10:01:25 | * | thomasross_ joined #nim |
10:02:56 | * | Trustable joined #nim |
10:15:15 | * | zombiefisch is now known as qwertfisch |
10:16:26 | FromGitter | <sptorin_twitter> How I can sort table by values, not by keys? |
10:21:04 | couven92 | guys? echo without newline? |
10:21:35 | couven92 | or do I have to do `stdout.write` for that? |
10:22:15 | * | sleepyqt joined #nim |
10:22:18 | FromGitter | <mratsim> there might be a special character to “eat” the previous new line |
10:23:35 | couven92 | @mratsim, nope not doing that, but yes it would probably be `echo "\b".repeat("\n".len())` |
10:24:02 | couven92 | at least in C `\b` is the *eating* character |
10:24:16 | * | skrylar quit (Remote host closed the connection) |
10:32:01 | * | gokr quit (Ping timeout: 248 seconds) |
10:38:54 | * | Pisuke joined #nim |
10:41:28 | * | MyMind quit (Ping timeout: 255 seconds) |
10:42:00 | FromGitter | <alehander42> why can't I cast to pointer value of `array[N, char]` |
10:42:19 | FromGitter | <alehander42> (trying to use it in streams writedata) |
10:43:42 | FromGitter | <alehander42> ah I got it nvm |
10:54:00 | * | Vladar quit (Remote host closed the connection) |
11:01:49 | Araq | sptorin: convert the table to a seq and use algorithm.sort with a custom comparator |
11:02:16 | Araq | couven92: you have to use stdout.write and \b doesn't work as you think it does I think |
11:02:26 | Araq | in C or Nim. |
11:02:33 | couven92 | Araq, yes I noticed that :P |
11:02:52 | * | Snircle joined #nim |
11:03:03 | couven92 | Araq, btw, I just about to write up the PR for fixing testament HTML gen |
11:05:33 | couven92 | Araq, https://github.com/nim-lang/Nim/pull/6667 |
11:07:21 | * | zolk3ri joined #nim |
11:08:43 | couven92 | Araq, what do you think about adding `tests\testament\tester --failing html` to the CI builds and exporting the generated `testresults.html` as CI build artifact? |
11:10:16 | * | literal joined #nim |
11:10:19 | couven92 | i.e. as a nice test failure report... With adding `--failing` to the HTML command, the generated HTML is quite small (in constrast to the full log of all test cases) |
11:11:11 | * | yglukhov quit (Remote host closed the connection) |
11:13:04 | * | kunev quit (Ping timeout: 248 seconds) |
11:15:37 | * | kunev joined #nim |
11:22:21 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:23:00 | Araq | couven92: I look at the appveyor results instead, they have a nice UI |
11:23:16 | couven92 | they do? :O |
11:23:24 | Araq | yep. |
11:23:34 | couven92 | travis? |
11:24:33 | Araq | travis is generally kept busy by fixing the bash scripts that make up the core of their infrastructure |
11:24:51 | Araq | and so their UI sucks |
11:25:42 | couven92 | hmm... also doesn't look like they have build artifacts for the build job... |
11:26:52 | couven92 | you cannot see the output and exepected in the appveyor test pane through |
11:27:05 | couven92 | s/through/though/^ |
11:28:18 | Arrrr | ..< first argument should default to zero |
11:30:26 | * | shiro` joined #nim |
11:40:33 | FromGitter | <Yardanico> AppVeyor has build artefacts |
11:41:31 | FromGitter | <Yardanico> https://www.appveyor.com/docs/packaging-artifacts/ |
11:43:25 | * | ibutra joined #nim |
11:44:10 | couven92 | @Yardanico, yes, but Travis CI has not |
11:45:18 | FromGitter | <gogolxdong> Is there anything wrong with this https://gist.github.com/gogolxdong/258e4e051aca7a8468b35e2eefc4b9cd , compile pass while run `node nimcache/horizon.js` comes up error. |
11:45:35 | FromGitter | <Yardanico> couven92: Travis has them too |
11:46:05 | FromGitter | <Yardanico> https://docs.travis-ci.com/user/uploading-artifacts/ |
11:46:24 | couven92 | Araq I want to fix the NaN bug... I gues I have to find $ for float and put in special cases? |
11:46:40 | FromGitter | <Yardanico> https://docs.travis-ci.com/user/deployment/releases/ |
11:46:40 | Araq | couven92: already fixed it |
11:46:49 | couven92 | oh, okay |
11:46:58 | * | Guest37250 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:49:28 | FromGitter | <gogolxdong> https://gist.github.com/gogolxdong/f192c3cd6128efc97cc8ac36fa04c682 |
11:58:57 | * | elrood joined #nim |
12:05:05 | FromGitter | <alehander42> should it be possible for Table hasKey to fail with IndexError ? |
12:07:37 | Araq | if it's a nested table |
12:08:46 | FromGitter | <alehander42> it's a `Table[uint, uint]` but it crashes quite randomly, I'll try to debug it more |
12:08:50 | * | Ven joined #nim |
12:09:14 | * | Ven is now known as Guest67908 |
12:19:25 | * | allan0 joined #nim |
12:20:35 | * | Guest67908 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:26:26 | FromGitter | <alehander42> I somehow manage to get into an endless loop in `rawGetKnownHCImpl` in tables.nim |
12:29:06 | * | claudiuinberlin joined #nim |
12:31:51 | FromGitter | <mratsim> @Araq, all hell broke lose with [^1]: https://github.com/nim-lang/Nim/commit/d52a1061b35bbd2abfbd062b08023d986dbafb3c, the `^^` template should definitely appear in Nim release notes. |
12:32:21 | FromGitter | <mratsim> (even if it’s not exported) |
12:32:45 | Araq | why? |
12:33:47 | FromGitter | <mratsim> Because it’s helpful to quickly fix the change |
12:35:46 | FromGitter | <Yardanico> There is ^ available backwards compatibility |
12:35:52 | FromGitter | <Yardanico> *for |
12:36:10 | Araq | oh I get it |
12:46:32 | * | Ven_ joined #nim |
12:47:16 | * | Jesin quit (Quit: Leaving) |
12:59:04 | * | UxerUospr joined #nim |
13:37:37 | couven92 | Araq, could we merge https://github.com/nim-lang/Nim/pull/6397 (that would make my booting so much quicker, and then I could actually test nim booting against x86 and x64 VCC compiler) |
13:38:00 | couven92 | and maybe find out where the VCC regressions are coming from |
13:43:56 | * | yglukhov joined #nim |
13:44:08 | * | yglukhov quit (Remote host closed the connection) |
13:44:23 | * | yglukhov joined #nim |
13:51:02 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:52:05 | * | joshbaptiste quit (Ping timeout: 240 seconds) |
13:53:53 | * | joshbaptiste joined #nim |
14:04:17 | couven92 | thanks Araq! :) |
14:04:24 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:07:48 | * | vlad1777d joined #nim |
14:14:11 | * | Jesin joined #nim |
14:29:00 | * | ibutra quit (Quit: Textual IRC Client: www.textualapp.com) |
14:36:52 | * | claudiuinberlin joined #nim |
14:39:52 | FromGitter | <gogolxdong> @Araq Would you mind spare sometime to peak my snippet? I made compile passed but can't render html ,use node run compiled js came up with ` window.onload = init_89607; ⏎ ⏎ ``` ^``` ⏎ ⏎ ReferenceError: window is not defined` [https://gitter.im/nim-lang/Nim?at=59f9dcb8976e63937e13d6b0] |
14:40:29 | FromGitter | <gogolxdong> https://gist.github.com/gogolxdong/1d16c2201c4ea3af264830cda527f89c |
14:41:35 | * | Ven joined #nim |
14:41:36 | FromGitter | <Yardanico> karax doesn't know about node.js and electron |
14:41:59 | * | Ven is now known as Guest82369 |
14:46:28 | FromGitter | <Yardanico> so it tries to use default browser functions |
14:50:37 | * | rauss joined #nim |
15:05:29 | * | gokr joined #nim |
15:10:16 | FromGitter | <gogolxdong> It's expected to use default browser functions like window,I think problem doesn't lie in js because I tried `node` run the todoapp.js file of karax example ,also gave `window is not defined` error , problem is it didn't render the html, I think there is something I didn't get quite well,vnodeToDom probably. karax is a little difficult to study because it requires a solid understanding of js. |
15:11:20 | * | miran__ joined #nim |
15:11:26 | FromGitter | <Yardanico> Araq: https://github.com/nim-lang/Nim/blob/286f89528028fc3ae9e441a18be2be11cf499174/tests/range/tn8vsint16.nim#L2 should this be -9 instead? |
15:11:34 | FromGitter | <Yardanico> because 0 - 9 is -9 |
15:11:54 | FromGitter | <Yardanico> also, what's the reason of AppVeyor being actually FASTER than travis? |
15:12:06 | Araq | gogolxdong: I'm not familiar with electron's API |
15:12:22 | Araq | yardanico: oh yeah, -9 |
15:12:51 | FromGitter | <Yardanico> ok, I'll change it :P |
15:13:29 | FromGitter | <SitiSchu> Nim doesnt have `or` for if statements right ? (I searched around for a while but couldnt find anythingn, yes I just started with nim ^^) |
15:13:36 | FromGitter | <Yardanico> @SitiSchu it does |
15:13:50 | FromGitter | <Yardanico> "if a == 4 or b == 5: do stuff" |
15:14:03 | FromGitter | <gogolxdong> no business of electron, it's pure karax and some jsffi |
15:14:05 | FromGitter | <SitiSchu> ok then the error is something else, thanks |
15:14:08 | FromGitter | <alehander42> @gogolxdong how are you trying to run it? it doesn't make a lot of sense to run karax directly on the node backend |
15:14:27 | FromGitter | <Yardanico> !eval let a = 5; let b = 3; if a == 4 or b == 3: echo " a = 4 or b = 3" |
15:14:29 | NimBot | a = 4 or b = 3 |
15:14:35 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:15:03 | FromGitter | <SitiSchu> I did `a == 3 or == 4` instead of `or a == 4`, my bad ^^ |
15:15:13 | FromGitter | <Yardanico> ah, you can't do that |
15:15:21 | FromGitter | <Yardanico> you can however use built-in sets :) |
15:15:26 | FromGitter | <Yardanico> or arrays |
15:15:29 | FromGitter | <alehander42> is there any limitation on size of static arrays ? I am having gcc errors on a nim program creating >2gb array |
15:15:30 | FromGitter | <Yardanico> e.g. a in [3, 4] |
15:15:50 | FromGitter | <Yardanico> if a in [3, 4]: echo "a is 3 or 4" |
15:16:59 | FromGitter | <Yardanico> travis takes 40 minutes to complete, but appveyor only takes 26 |
15:16:59 | FromGitter | <Yardanico> :D |
15:17:17 | FromGitter | <Yardanico> so it seems that travis is slower than appveyor |
15:18:18 | FromGitter | <SitiSchu> Ok so the I can use `in` similar to python,t but I cant do `not in` ? |
15:18:27 | FromGitter | <Yardanico> you can |
15:18:29 | Araq | to be fair, the travis build also performs more tests |
15:18:34 | FromGitter | <Yardanico> but it's "notin" instead of "in" |
15:18:39 | FromGitter | <Yardanico> *instead of "not in" |
15:18:46 | FromGitter | <SitiSchu> ahh ok |
15:18:52 | FromGitter | <Yardanico> if a notin [3, 4]: echo "a is not 3 or 4" |
15:18:55 | FromGitter | <SitiSchu> Thanks a lot :) |
15:19:37 | * | Vladar joined #nim |
15:21:12 | * | nsf quit (Quit: WeeChat 1.9.1) |
15:22:24 | FromGitter | <Yardanico> and if you need fast performance and your items can be stored in built-in sets, you can do: ⏎ if a notin {3, 4}: echo "a is not 3 or 4" |
15:22:29 | FromGitter | <Yardanico> this would be *slightly* faster |
15:22:43 | FromGitter | <Yardanico> but I may be wrong, maybe Nim can inline arrays here |
15:22:45 | * | libman joined #nim |
15:23:31 | FromGitter | <alehander42> ah I need to pass -mcmodel=medium to gcc |
15:24:09 | FromGitter | <Yardanico> Generate code for the medium model: The program is linked in the lower 2 GB of the address space. Small symbols are also placed there. Symbols with sizes larger than -mlarge-data-threshold are put into large data or bss sections and can be located above 2GB. Programs can be statically or dynamically linked. |
15:24:45 | * | claudiuinberlin joined #nim |
15:31:45 | * | cspar joined #nim |
15:33:58 | * | cspar_ quit (Ping timeout: 264 seconds) |
15:35:50 | FromGitter | <Yardanico> btw, @dom96, maybe we should remove "beta-grade" here? "Nimble is a beta-grade package manager for the Nim programming language." |
15:39:41 | FromGitter | <gogolxdong> Prototype was made through nim-electron at first, and it runs with npm start.I found my demands could also be met without electron as I understand better .Then I remove d electron parts and leave jsffi to make js client against libvirt server ,test it by `node` call. Now I use karax to provide dom elements and jsffi JsObject to establish connection with tcp server though run js in a reflex action. Problem is html |
15:39:41 | FromGitter | ... is not rendered correctly. |
15:43:31 | FromGitter | <Yardanico> @dom96: https://github.com/nim-lang/nimble/pull/420 |
15:43:43 | FromGitter | <Yardanico> (deprecated `<` warnings) |
15:46:09 | * | Arrrr quit (Ping timeout: 248 seconds) |
15:46:28 | * | ibutra joined #nim |
15:47:01 | * | couven92 quit (Quit: Client disconnecting) |
15:47:42 | Araq | gogolxdong: tools/karun can run karax code |
15:48:14 | Araq | not sure what else to say, if you target the browser without electron you cannot use node.js which runs server-side |
15:49:40 | Araq | karax runs inside a DOM implementation, it doesn't provide DOM elements, it assumes they exist |
16:00:56 | FromGitter | <gogolxdong> what you said makes better sense.no doubt it targets browser,but not through the embedded chrome of electron.I am trying event bound to DOM to make tcp request. |
16:01:49 | FromGitter | <gogolxdong> as my snippet above. |
16:07:34 | * | Jesin quit (Quit: Leaving) |
16:07:47 | FromGitter | <couven92> @Araq I finished my work on fixing the testament HTML gen, it's now quite fast and I had no trouble opening the generated html in neither chrome nor in edge. |
16:08:45 | Araq | ok thanks, will review later |
16:09:02 | FromGitter | <couven92> Meanwhile I have been thinking about re-design of the vccexe tool. I think I know how to make it *much* faster |
16:09:34 | miran__ | guys, one stupid question... how does your .gitignore file look like when you're working on a nim project? |
16:09:37 | FromGitter | <couven92> With that I will obviously also add support for VS2017 |
16:09:55 | FromGitter | <gogolxdong> |
16:10:19 | * | Jesin joined #nim |
16:10:33 | FromGitter | <couven92> miran__, I oftentimes just copy the one for the main nim repo |
16:11:15 | FromGitter | <couven92> And because of that I have multiple PRs adding stuff to the nim .gitignore :P |
16:12:29 | FromGitter | <couven92> But mostly you'll want nimcache and all the usual binary extensions (exe, lib, so, dylib) etc. |
16:12:35 | miran__ | couven92: :D |
16:12:52 | miran__ | just looking at that .gitignore |
16:13:18 | Araq | when you create a github repo you can select a .gitignore tied to Nim iirc |
16:13:32 | miran__ | basically you first ignore everything, then un-ingnore the extensions you want |
16:13:53 | miran__ | ...and then ignore some more :) |
16:14:07 | FromGitter | <couven92> miran__ I avoid using git add . |
16:15:02 | FromGitter | <couven92> That way my gitignore grows whenever git status returns sth I am not interested in having in my index |
16:15:13 | * | adeohluwa joined #nim |
16:15:20 | adeohluwa | I'm back like spinal cord |
16:15:28 | adeohluwa | Teaser Teaser Teaser |
16:15:53 | adeohluwa | how would u scrape http://directory.io with Nim Lang |
16:16:34 | adeohluwa | https://usercontent.irccloud-cdn.com/file/jjvoOj1w/Screenshot_20171101-181604.png |
16:16:48 | * | ibutra quit (Ping timeout: 240 seconds) |
16:16:53 | miran__ | thanks couven92 |
16:17:56 | FromGitter | <couven92> adeohluwa, read the FAQ, there is an API description there |
16:18:50 | FromGitter | <couven92> iirc |
16:19:25 | * | zolk3ri quit (Ping timeout: 255 seconds) |
16:19:37 | * | Jesin quit (Quit: Leaving) |
16:21:10 | * | zolk3ri joined #nim |
16:21:39 | adeohluwa | @<couven92> does an API make that any easier? |
16:21:56 | adeohluwa | |
16:22:14 | adeohluwa | the sheer volume is the issue right? |
16:22:31 | * | Jesin joined #nim |
16:24:13 | * | alpha joined #nim |
16:24:37 | * | alpha is now known as Guest90253 |
16:25:41 | FromGitter | <UrKr> Is there a syntax or a built-in macro for immutably updating an object type's field? So that the expression returns a new object with the same fields as the previous object except for the specified fields? ⏎ Basically, javascript object spread syntax? ⏎ let p = Person(name: "Tom", age: 27) |
16:26:42 | Araq | you can write such a macro... |
16:27:17 | * | Guest82369 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:27:21 | FromGitter | <UrKr> Right, I suppose I'll do that. Was just wondering if it already existed |
16:27:41 | Araq | or you update the object in place, it's easy if you have a single owner and not a shared ownership soup |
16:31:51 | FromGitter | <couven92> adeohluwa, an API is always easier than dealing with human readable HTML |
16:32:03 | Guest90253 | How do I get and set Cookies using get() on a HttpClient? (Sorry, I am new to nim) |
16:33:04 | adeohluwa | with that volume with an API it might take a year |
16:33:04 | adeohluwa | https://usercontent.irccloud-cdn.com/file/4C8iejL1/Screenshot_20171101-183232.png |
16:33:15 | FromGitter | <couven92> HTML is a markup language made for a browser to display stuff pretty for a human reader, if you can it's always easier to parse data formats that are machine readable instead |
16:33:44 | * | Ven joined #nim |
16:34:07 | FromGitter | <couven92> so don't do searches, read page by page? There is an API for getting a page |
16:34:07 | * | Ven is now known as Guest47329 |
16:34:23 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:36:22 | adeohluwa | the pages are about 72 *digits* |
16:36:35 | adeohluwa | 0000000000000000000000000000000000000 in 72 places |
16:39:43 | * | claudiuinberlin joined #nim |
16:39:43 | * | claudiuinberlin quit (Client Quit) |
16:41:25 | FromGitter | <mratsim> There is a subtle bug somewhere in the closure type matching. Nim compiler accepts but generates wrong code: |
16:42:01 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/1HM4/2017-11-01_17-40-35.png) |
16:42:20 | FromGitter | <Yardanico> Make an issue on github |
16:44:12 | * | claudiuinberlin joined #nim |
16:45:10 | * | PMunch quit (Quit: Leaving) |
16:47:29 | Guest90253 | `How do I get and set Cookies using get() on a HttpClient? (Sorry, I am new to nim)` Or is the cookies persistent for a session? |
16:50:50 | federico3 | Guest90253: if you are looking for a cookie jar: https://github.com/FedericoCeratto/nim-httpauth/blob/master/httpauthpkg/cookiejar.nim |
16:51:02 | * | endragor quit (Remote host closed the connection) |
16:51:35 | * | endragor joined #nim |
16:52:01 | * | xcombelle1 joined #nim |
16:55:59 | * | endragor quit (Ping timeout: 248 seconds) |
16:57:17 | * | Jesin quit (Quit: Leaving) |
16:58:16 | FromGitter | <mratsim> @yardanico would love to but it’s super complicated to reproduce in a small test case :/ |
16:59:21 | * | xcombelle1 quit (Quit: WeeChat 1.4) |
16:59:24 | * | Guest90253 quit (Ping timeout: 260 seconds) |
17:02:57 | * | miran__ quit (Ping timeout: 248 seconds) |
17:07:09 | FromGitter | <mratsim> found it, it’s something to do with float32 matching float in Nim, if I force convert to float it compiles |
17:07:12 | * | vlad1777d quit (Ping timeout: 260 seconds) |
17:10:37 | FromGitter | <Yardanico> Guest90253: using Set-Cookie and Cookie keys in http headers |
17:17:07 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:21:44 | * | yglukhov quit (Remote host closed the connection) |
17:23:47 | * | Jesin joined #nim |
17:31:35 | * | nsf joined #nim |
17:33:33 | * | yglukhov joined #nim |
17:35:15 | FromGitter | <data-man> What is the biggest project written on Nim? ⏎ Is the Nim compiler? :) |
17:35:41 | * | yglukhov quit (Remote host closed the connection) |
17:41:20 | * | vlad1777d joined #nim |
17:42:24 | FromGitter | <Yardanico> @data-man I think no, there are some large code bases in nim AFAIK |
17:42:33 | FromGitter | <Yardanico> Ask Araq, he knows for sure :) |
17:42:43 | FromGitter | <Yardanico> but yeah, nim compiler is probably one of the largest projects |
17:43:19 | * | claudiuinberlin joined #nim |
17:46:17 | * | claudiuinberlin quit (Client Quit) |
17:46:40 | Araq | there are bigger ones but they are mostly closed source |
17:52:36 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
17:54:47 | FromGitter | <Yardanico> well yeah, I know that because of github issues :P |
17:55:13 | FromGitter | <Yardanico> or forum |
17:58:25 | * | gokr quit (Ping timeout: 255 seconds) |
18:01:44 | FromGitter | <Yardanico> @data-man btw, you can add your avatar to your nim forum profile (and not only to it) by registering at gravatar with your e-mail and adding your own avatar :) |
18:01:49 | FromGitter | <Yardanico> https://ru.gravatar.com/ |
18:07:23 | FromGitter | <data-man> @Yardanico: Thanks I know. But I'm too lazy for that. ⏎ Than you do not like my avatar ?! :) |
18:07:59 | FromGitter | <Yardanico> @data-man well I mean nim forum uses automatic gravatar generation for default avatars :) |
18:08:59 | * | Guest47329 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:10:37 | FromGitter | <Yardanico> how to port your compiler to another platform - nim style: https://github.com/nim-lang/Nim/commit/0af85846bbd8d02ce7d5b4863b643af2140b7490 |
18:10:38 | FromGitter | <Yardanico> :D |
18:11:39 | federico3 | Yardanico you just spotted my comment :D |
18:11:46 | FromGitter | <Yardanico> yes |
18:11:57 | FromGitter | <Yardanico> github notifications FTW |
18:13:01 | FromGitter | <data-man> @Yardanico: I do not see any practical benefit from avatars :) |
18:13:08 | federico3 | speaking of which, I have access to porter boxes to run tests against more architectures if someone is interested |
18:14:27 | * | JappleAck joined #nim |
18:14:36 | * | endragor joined #nim |
18:15:02 | * | Ven joined #nim |
18:15:26 | * | Ven is now known as Guest11104 |
18:16:31 | * | Trustable quit (Remote host closed the connection) |
18:20:12 | FromGitter | <data-man> Chipmunk and Rust https://github.com/slembcke/Chipmunk2D/issues/156 ⏎ I'm trying to bring him to the light side. |
18:21:13 | FromGitter | <Yardanico> @data-man he wants a "neat bindings" |
18:21:15 | FromGitter | <Yardanico> *binding |
18:21:23 | FromGitter | <Yardanico> or a complete rewrite |
18:23:15 | * | nsf quit (Quit: WeeChat 1.9.1) |
18:25:26 | * | Xe quit (Ping timeout: 246 seconds) |
18:27:16 | FromGitter | <data-man> Attempt is not torture :) |
18:28:04 | * | yglukhov joined #nim |
18:32:05 | * | yglukhov quit (Ping timeout: 240 seconds) |
18:34:32 | FromGitter | <data-man> Maybe he will be the one who will ported the Chipmunk in the Nim? :) ⏎ The Chipmunk's author replied :) |
18:35:24 | * | yglukhov joined #nim |
18:35:30 | FromGitter | <SitiSchu> Are there any command line argument parser besides parseopt and docopt ? |
18:37:36 | FromGitter | <data-man> https://github.com/fenekku/commandeer |
18:40:32 | * | Guest11104 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:41:16 | * | yglukhov quit (Read error: Connection reset by peer) |
18:41:48 | FromGitter | <Yardanico> btw, araq, IDK if this can be closed: https://github.com/nim-lang/Nim/issues/1151 |
18:41:52 | * | yglukhov joined #nim |
18:42:40 | * | claudiuinberlin joined #nim |
18:43:02 | FromGitter | <SitiSchu> @data-man thanks, looks good |
18:43:58 | * | endragor quit (Remote host closed the connection) |
18:44:04 | * | endragor joined #nim |
18:45:58 | FromGitter | <data-man> Anybody tried it? https://github.com/Xe/Vardene - (A simple tool to manage multiple installs of Nim.) |
18:48:56 | FromGitter | <data-man> @SitiSchu: https://github.com/c-blake/cligen |
18:49:34 | FromGitter | <SitiSchu> I need to step up my google game ^^ |
18:49:44 | FromGitter | <Yardanico> @data-man nah, everyone is using choosenim nowadays :P |
18:51:16 | * | Xe joined #nim |
18:54:59 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
18:55:50 | FromGitter | <data-man> Not true, I do not using. |
18:56:06 | federico3 | neither do I |
18:56:42 | FromGitter | <Yardanico> well I'm not using it too, because I always use nim devel, and choosenim downloads nim repo every time you update nim |
18:56:44 | FromGitter | <Yardanico> (with devel) |
18:57:10 | FromGitter | <Gooseus> I'm not using it... didnt' realize it was a thing until I had already installed and started messing around |
18:57:24 | FromGitter | <Yardanico> so I'm waiting for https://github.com/dom96/choosenim/issues/12 :P |
18:59:10 | * | libman quit (Quit: Connection closed for inactivity) |
19:03:33 | * | sleepyqt quit (Quit: Leaving) |
19:20:24 | federico3 | this is spot on https://blog.toggl.com/wp-content/uploads/2017/10/toggl-if-the-world-was-created-by-a-programmer.jpg |
19:24:08 | * | Ven joined #nim |
19:24:31 | * | Ven is now known as Guest15573 |
19:26:00 | dom96 | data-man: Why aren't you using it? |
19:31:20 | * | endragor quit (Remote host closed the connection) |
19:38:46 | FromGitter | <data-man> @dom96: Only hardcore, only handmade. :) ⏎ I do not using Nimble too. |
19:39:17 | dom96 | You mean you only use software you yourself have written? |
19:49:34 | FromGitter | <data-man> It's in my distant plans, I'll just share an idea. ⏎ Instead of "learning" c2nim to parse C/C ++ code, we can write a wrapper for the GCC-Plugin API. ⏎ Or to write a Lua-plugin for https://colberg.org/gcc-lua/index.html |
20:02:59 | dom96 | if Nimble/choosenim is missing something then please let me know, I want to fix it so that it's useful to you :) |
20:04:51 | * | libman joined #nim |
20:14:46 | * | miran__ joined #nim |
20:16:30 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:22:07 | FromGitter | <Yardanico> @data-man it wouldn't be portable |
20:22:28 | shashlick | dom96: I opened that issue for proxy support, was looking into the code to see how it could be implemented |
20:22:31 | FromGitter | <Yardanico> nim aims to be compatible with gcc/vcc/icc/clang/tcc/some other C compilers |
20:22:36 | shashlick | how do I know whether you are using curl or http.client? |
20:22:51 | FromGitter | <Yardanico> shashlick: nim's httpclient doesn't use curl |
20:24:56 | shashlick | no in choosenim, download.nim, there's code for curl and http.client |
20:25:32 | * | tdc quit (Ping timeout: 260 seconds) |
20:25:49 | FromGitter | <Yardanico> https://github.com/dom96/choosenim/blob/master/src/choosenim/download.nim#L4 |
20:26:05 | FromGitter | <Yardanico> https://github.com/dom96/choosenim/blob/9731196bb7a87d69d3ac6018fff92c1990a49c4d/src/choosenim.nims#L1 |
20:26:13 | FromGitter | <Yardanico> so it uses curl only for macOS |
20:27:05 | FromGitter | <Yardanico> I just think that http proxy support should be added to httpclient, not to choosenim |
20:27:24 | FromGitter | <Yardanico> but my opinion might be wrong :) |
20:28:12 | federico3 | +1 |
20:28:36 | FromGitter | <Yardanico> if it will be done, it should be made optional, but enabled by default :) |
20:28:39 | shashlick | yardanico: looks like proxy is already supported by httpclient |
20:28:40 | * | TjYoco joined #nim |
20:28:53 | FromGitter | <Yardanico> well I mean proxy from environment variables |
20:28:59 | FromGitter | <Yardanico> I know that proxies are supported by httpclient |
20:29:17 | * | claudiuinberlin joined #nim |
20:29:56 | shashlick | I see what you mean |
20:30:15 | * | tj_yoco joined #nim |
20:30:20 | FromGitter | <Yardanico> we really need someone to make requests- like library :P |
20:30:38 | federico3 | and the socks proxy variable applies to more than httpclient |
20:31:33 | FromGitter | <data-man> @Yardanico: What will not be portabled? GCC-plugins, are written in nim? ⏎ I assume that GCC is better parses c/c++ code, and write a complete c/c++ parser is a very hard task. ⏎ And using the GCC-plugin API you get access to a AST. |
20:31:36 | * | tj_yoco quit (Client Quit) |
20:31:48 | * | tj_yoco joined #nim |
20:32:25 | FromGitter | <Yardanico> @data-man I mean that c2nim can work anywhere |
20:32:28 | FromGitter | <Yardanico> you don't need GCC for it |
20:32:37 | FromGitter | <Yardanico> and it would be better to use clang API |
20:32:45 | FromGitter | <Yardanico> since it's more modern and easier to use :) |
20:32:55 | FromGitter | <Yardanico> but still, c2nim can be compiled with any C compiler Nim suports |
20:34:07 | * | TjYoco quit (Ping timeout: 255 seconds) |
20:37:12 | FromGitter | <Yardanico> for C you only need to port https://github.com/eliben/pycparser to Nim :P |
20:37:32 | FromGitter | <Yardanico> I think that C is much easier to parse than C++ |
20:40:04 | FromGitter | <data-man> No matter , what api, it's just an idea about converting c ++ code to Nim. :) |
20:42:21 | FromGitter | <Yardanico> I think that in future nim should really use LLVM :) |
20:42:35 | * | endragor joined #nim |
20:42:38 | FromGitter | <Yardanico> for nim 2.0 :P |
20:44:13 | FromGitter | <alehander42> oh no :( :D |
20:45:23 | FromGitter | <Yardanico> well there's already a LLVM backend for nim |
20:45:29 | FromGitter | <alehander42> if nim gets popular enough, inevitably somebody will write a llvm backend, but I like how simpler is the current one |
20:45:33 | FromGitter | <Yardanico> but it's done by only one person and it's not official |
20:45:37 | FromGitter | <alehander42> I thought the current llvm one is not maintained |
20:45:41 | FromGitter | <Yardanico> it is |
20:45:47 | FromGitter | <Yardanico> well it's still *maintained* |
20:46:05 | FromGitter | <Yardanico> e.g. I asked @arnetheduck about GCC 7 + nlvm, and he fixed the issue |
20:46:43 | FromGitter | <alehander42> but is it keeping up with newer features/changes ? |
20:46:49 | FromGitter | <alehander42> great , I should try it sometimes |
20:46:58 | FromGitter | <Yardanico> it's not |
20:47:05 | FromGitter | <Yardanico> since nim internals are changing sometimes |
20:48:56 | FromGitter | <data-man> Nim 5.0 - codegen written on pure Nim ! |
20:49:13 | FromGitter | <Yardanico> it would recurse then |
20:49:20 | FromGitter | <alehander42> :D nim machines like the old lisp machines |
20:49:48 | FromGitter | <alehander42> I think in nim 7 |
20:50:13 | FromGitter | <alehander42> araq will have evolved to a giant cloud and be able to compile and run most stuff parallelly in his head |
20:50:19 | * | sz0 joined #nim |
20:50:32 | * | smt joined #nim |
20:50:34 | FromGitter | <Yardanico> well Nim 2.0 vs Nim 1.0 will be something like Python 3 vs Python 2, but changes will be even bigger |
20:52:04 | FromGitter | <Yardanico> IIRC Araq wants to remove GC for Nim 2.0 :) |
20:52:29 | * | UxerUospr quit (Quit: Lost terminal) |
20:56:58 | FromGitter | <Yardanico> also I found that Araq was talking about some native backend for Nim (on the forum) |
20:57:02 | FromGitter | <Yardanico> in 2014-2015 |
21:00:09 | FromGitter | <alehander42> what do you mean by native ? (the current one sounds as native as it can get ) |
21:00:19 | FromGitter | <Yardanico> @alehander42 I don't know |
21:00:39 | FromGitter | <Yardanico> https://forum.nim-lang.org/t/480#2544 |
21:00:46 | FromGitter | <Yardanico> "We have a native backend in the works but it's not based on LLVM." |
21:02:48 | FromGitter | <alehander42> hmm directly generating assembler/machine code? |
21:02:57 | FromGitter | <Yardanico> it was probably abandoned in favour of C and C++ |
21:02:57 | elrood | alehander42: some people say currently nim only is a transpiler, transforming one language (nim) into another (c) and requiring a real compiler to generate native code. you wouldn't want to be caught saying that too loud in here.. ;) |
21:04:02 | FromGitter | <alehander42> if only writing a c to asm compiler wasn't actually way easier :D (do I receive a candy now!) |
21:06:08 | FromGitter | <Yardanico> it seems that forum is not moderated sometimes :D https://forum.nim-lang.org/t/3081 |
21:13:50 | FromGitter | <data-man> Then any compiler is a transpiler, transforming one language (any) into machine code. :) |
21:14:27 | FromGitter | <Yardanico> yes, that's why everyone should use "compiler" |
21:16:14 | elrood | nim's bdfl would like your argumentation, data-man ;) the distinction is the transformation from one high-level language to another instead of native code generation |
21:16:42 | FromGitter | <mratsim> Is there a way to get the Nim version in a package? seems like to make CI happy I need one codepath for devel and one for master with the [^1] changes |
21:17:11 | FromGitter | <Yardanico> @mratsim try to use NimVersion constant |
21:17:49 | elrood | and while calling nim's current implementation just a transpiler doesn't do it justice, it certainly dodges some complexity by utilizing other compilers for native code generation, and the dependency on other toolchains is an itch for some users |
21:19:11 | * | Trustable joined #nim |
21:24:19 | FromGitter | <data-man> @elrood: We can assume that machine code is a language that the processor understands. ⏎ All programming languages are invented only for human convenience. |
21:25:15 | * | tj_yoco quit (Ping timeout: 246 seconds) |
21:25:28 | FromGitter | <mratsim> Well, many languages depends on LLVM, and most of the complains due to that is that compilation is slow and LLVM lacks exotic targets |
21:26:44 | * | Vladar quit (Quit: Leaving) |
21:27:40 | * | Guest15573 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:27:41 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
21:33:31 | * | tj_yoco joined #nim |
21:49:53 | * | Ven joined #nim |
21:50:16 | * | Ven is now known as Guest26819 |
21:55:01 | shodan45 | nim won't be complete until it can output JVM bytecode ;) |
21:56:29 | * | miran__ quit (Ping timeout: 246 seconds) |
21:56:48 | federico3 | wat? |
21:56:49 | Araq | elrood: producing C code is more complex than producing ASM. ok, producing *optimized* asm is much much harder |
21:57:23 | Araq | but nobody argues for efficient asm code for this compiler vs transpiler question |
21:59:41 | elrood | i know, you don't have to convince me. and nim works quite fine as it is. the point is nim's implementation isn't a full-blown independent compiler. whether this is an issue, an implementation detail or completely irrelevant lies in the eye of the beholder |
21:59:42 | Araq | transpiler is an ugly word with no real meaning. |
22:00:29 | Araq | nlvm targets LLVM, is that a "real" compiler then? are people aware of how close LLVM bitcode is to C? |
22:02:40 | FromGitter | <data-man> Haha, to a point! :) |
22:05:15 | shodan45 | Araq: if it's that close, then it shouldn't be hard to generate it directly.... :P |
22:05:39 | Araq | shodan45: it is not hard, nlvm does that |
22:05:51 | * | shodan45 googles nlvm |
22:06:04 | * | Trustable quit (Remote host closed the connection) |
22:06:11 | Araq | it's the Nim frontend and the C backend was adapted to produce LLVM |
22:07:49 | shodan45 | oh hah... all this time I was assuming that such a thing didn't exist |
22:08:33 | FromGitter | <Yardanico> It's *only* 3k lines |
22:08:39 | FromGitter | <Yardanico> But without comments :) |
22:08:44 | elrood | Araq, we've had this discussion a few times already, it's moot. we all know nim how well nim and its multi-step compilation process works in practice. for pretty much every nim user the additional steps and dependencies aren't really an issue |
22:09:26 | FromGitter | <Yardanico> You don't need to manage them by yourself |
22:09:29 | Araq | elrood: well it keeps coming up and I'm not talking to you only, but fair enough |
22:09:43 | FromGitter | <Yardanico> For example choosenim downloads all needed stuff |
22:09:54 | FromGitter | <Yardanico> Including C compiler |
22:10:38 | federico3 | thanks to gcc Nim generates fast code and for more architectures than Go and Rust. Generating C is a feature, not a bug. |
22:10:47 | elrood | for some potential users nim's reliance on a completely independent toolchain is a turn-off though, and an argument not to consider nim seriously |
22:14:08 | shodan45 | might be fun to have a competition to see who can make the most pointless nim backend |
22:14:41 | FromGitter | <data-man> There's also TinyCC backend, and I'm sure that someday it will work. |
22:14:49 | federico3 | elrood: nothing wrong with having multiple backends including a native one |
22:14:57 | FromGitter | <Yardanico> @data-man hmm no |
22:15:21 | FromGitter | <Yardanico> I think that C backend already supports TCC |
22:15:25 | FromGitter | <mratsim> Sim Nim “optimizations” are intriguing: |
22:15:30 | FromGitter | <Yardanico> Toy can try it yourself |
22:15:34 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/EIoj/2017-11-01_23-14-48.png) |
22:15:45 | shodan45 | http://beza1e1.tuxen.de/articles/accidentally_turing_complete.html |
22:15:55 | FromGitter | <Yardanico> @mratsim what's bad here? |
22:16:00 | shodan45 | (potential new nim backends) |
22:16:19 | FromGitter | <mratsim> double “no” when comparing to 0 |
22:16:24 | FromGitter | <mratsim> not* |
22:16:56 | FromGitter | <Yardanico> Well it will be optimized by a C compiler |
22:16:56 | * | nsf joined #nim |
22:17:25 | FromGitter | <mratsim> yes I know (unless it’s TCC ;) ) |
22:17:26 | FromGitter | <Yardanico> It's not really an issue |
22:17:34 | elrood | federico3, of course not, the more the merrier, and the js backend is a good step in that regard. my only worry in this context is that nim's implementation and some decisions in its design might rely to heavily on being compiled via c |
22:17:40 | FromGitter | <Yardanico> Well you don't use TCC if you need speed :) |
22:18:10 | FromGitter | <Yardanico> elrood: nlvm already works |
22:18:23 | FromGitter | <Yardanico> So it means that LLVM can be used for Nim too |
22:20:16 | shodan45 | what about http://sdcc.sourceforge.net/ ? |
22:20:43 | shodan45 | IIRC that's the only open source C compiler that targets PIC microcontrollers |
22:21:06 | shodan45 | (I don't use PICs for just that reason) |
22:22:51 | federico3 | Nim runs on AVRs. Never tried PICs |
22:25:17 | Araq | mratsim: !! can also be produced by hand written C code via #defines |
22:25:37 | Araq | and so C compilers can handle it, maybe even TCC |
22:26:51 | Araq | Nim optimizes things that matter instead and yes sometimes fails (genericReset) |
22:27:17 | Araq | and now tell me what happened with the baby |
22:27:33 | Araq | they used to have one, right? |
22:28:23 | Araq | did it die? now it's about Rick vs Negan and the baby just disappeared |
22:31:09 | elrood | Yardanico: https://forum.nim-lang.org/t/1955/3 haven't tried nlvm lately, if the mentioned issues have been solved, great. i do have some doubts still though |
22:34:26 | * | libman quit (Quit: Connection closed for inactivity) |
22:34:56 | FromGitter | <data-man> @Yardanico: TCC is currently used as an external C-compiler. But libtcc can be used as a built-in C-scripting engine without a obj-files generation. |
22:37:50 | * | couven92 joined #nim |
22:47:55 | FromGitter | <i64> hello. c2nim seems to skip forward type declarations. Does nim support it? |
22:51:57 | * | Amun_Ra quit (Ping timeout: 260 seconds) |
22:53:17 | FromGitter | <i64> perhaps i'm in the wrong timezone :) |
22:54:29 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:54:52 | couven92 | i64, probably :D I'd like to help, but I honestly don't know how to forward declare |
22:55:33 | couven92 | And here it's nearing midnight, so I don't dare to speculate anymore, I'm about 2 minutes away from collapsing into my bed :P |
22:56:08 | FromGitter | <i64> the doc mention forward declare for procs but not types |
22:56:31 | couven92 | forward declare types? |
22:56:34 | couven92 | why? |
22:56:51 | couven92 | ah! put all types you're declaring into one big type section |
22:57:06 | couven92 | then the order does not matter |
22:57:22 | FromGitter | <i64> ah. will try it. how did you find that out? |
22:57:29 | * | Guest26819 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:57:37 | couven92 | i64 I ran into that some weeks ago |
22:57:56 | FromGitter | <i64> have a couple of structs in c header that refers to each other |
22:57:58 | couven92 | and someone here told me that one type section works |
22:58:04 | * | Jesin quit (Quit: Leaving) |
22:58:13 | FromGitter | <i64> nice. ok thanks |
22:58:29 | couven92 | i64 yeah, that was my use-case as well... trying to importc Windows COM interfaces to Nim |
22:58:37 | * | couven92 shudders |
23:01:04 | * | couven92 quit (Quit: Client Disconnecting) |
23:04:42 | * | Amun_Ra joined #nim |
23:21:16 | * | zolk3ri quit (Remote host closed the connection) |
23:22:55 | * | gokr joined #nim |
23:43:29 | * | JappleAck quit (Quit: Leaving) |
23:43:59 | * | gokr quit (Ping timeout: 248 seconds) |
23:50:20 | * | tj_yoco quit (Quit: Leaving) |