00:09:01 | * | Serenitor quit (Quit: Leaving) |
00:26:07 | * | arnetheduck quit (Ping timeout: 248 seconds) |
00:26:28 | * | MJCaley joined #nim |
00:46:16 | * | yglukhov joined #nim |
00:51:06 | * | yglukhov quit (Ping timeout: 268 seconds) |
01:22:57 | * | MJCaley quit (Quit: MJCaley) |
01:23:54 | * | MJCaley joined #nim |
01:34:12 | * | PMunch quit (Quit: leaving) |
01:36:34 | * | dddddd quit (Remote host closed the connection) |
02:05:05 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:11:02 | * | vlad1777d quit (Ping timeout: 276 seconds) |
02:18:43 | * | chemist69 joined #nim |
02:19:14 | * | MJCaley quit (Quit: MJCaley) |
02:37:28 | * | Kingsquee joined #nim |
02:49:05 | * | arecaceae quit (Remote host closed the connection) |
02:52:23 | * | arecaceae joined #nim |
03:03:08 | * | chemist69 quit (Ping timeout: 255 seconds) |
03:07:59 | * | endragor joined #nim |
03:08:20 | * | endragor quit (Remote host closed the connection) |
03:10:53 | * | endragor joined #nim |
03:16:45 | * | chemist69 joined #nim |
03:21:49 | * | endragor quit (Remote host closed the connection) |
03:22:16 | * | endragor joined #nim |
03:35:58 | * | sz0 quit (Quit: Connection closed for inactivity) |
04:24:53 | FromGitter | <data-man> I have the brilliant idea (as always): to reopen my old PR #6630 and to add everything that is fixed in devel to the issue template . :-) |
04:29:10 | FromGitter | <gogolxdong> How to span a long string over multi-lines? |
04:29:27 | FromGitter | <Quelklef> """ ⏎ mutliline ⏎ string ⏎ """ [https://gitter.im/nim-lang/Nim?at=5a5c2e275ade18be3977d493] |
04:30:22 | FromGitter | <gogolxdong> Is it continuous? |
04:30:26 | FromGitter | <Quelklef> ? |
04:30:37 | FromGitter | <Quelklef> that becomes "\nmultiline\nstring\n" |
04:31:30 | FromGitter | <gogolxdong> a very long string ,like `http://ecs.aliyuncs.com/?AccessKeyId=TMP.AQG3fHzS2bwnu1i-jxjYHWPqowQ8MXt_rNy75zFzLPrSwt7IiaqLSy2Kg7jPADAtAhQ-fIECC99A0CTTEG087Xs2KKJfoAIVAJud_i-8rBS7TWWLwtX81x0_E7MT&Action=DescribeInstances&Format=JSON&RegionId=cn-shenzhen&SecureTransport=true&SignatureMethod=HMAC-SHA1&SignatureNonce=1efbd9761c6577e6165d66ae3e05e267&SignatureVersion=1.0&SourceIp=14.215 |
04:31:30 | FromGitter | ... .128.135&Timestamp=2018-01-15T04%3A23%3A43Z&Version=2014-05-26&Signature=o8HEu2Dou62KtHbNW5DbQC6eF34%3D` |
04:34:11 | FromGitter | <gogolxdong> post in vscode makes scrolling. |
04:34:24 | FromGitter | <Quelklef> ahhhhhh i see |
04:34:29 | FromGitter | <Quelklef> lemme try somth |
04:34:48 | FromGitter | <Quelklef> Wait, just do """ ⏎ http:// .... ⏎ more stuff ⏎ more stuff ⏎ """.join("\n") [https://gitter.im/nim-lang/Nim?at=5a5c2f685a9ebe4f7589681f] |
04:35:54 | FromGitter | <Quelklef> er, .split("\n").join("") |
04:36:01 | FromGitter | <Quelklef> w/ sequtils |
04:58:56 | * | darithorn quit (Quit: Leaving) |
05:15:46 | FromGitter | <gogolxdong> Does it work? |
05:15:58 | FromGitter | <Quelklef> try it my man |
05:16:13 | FromGitter | <gogolxdong> seems not. |
05:16:23 | FromGitter | <Quelklef> Hm. On what input? |
05:16:45 | FromGitter | <gogolxdong> `expression: join(split("""http://ecs.aliyuncs.com/?AccessKeyId= ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a5c393c5a9ebe4f75898b6c] |
05:18:59 | FromGitter | <Quelklef> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a5c39c21dcb91f1774f4c9e] |
05:19:21 | FromGitter | <Quelklef> I dunno what "\x0A" is but seems sus tbh |
05:19:53 | FromGitter | <Quelklef> Wait, what? We're doing different things. Just try what I put |
05:28:33 | FromGitter | <Quelklef> Oh, you know, '\r' is carriage return and '\l' is linefeed iirc. You don't have to use escaped hex codes |
05:29:58 | FromGitter | <data-man> @gogolxdong: Maybe you need to use the maxsplit parameter? |
05:30:43 | FromGitter | <Quelklef> The code he sent isn't even multilined |
05:40:07 | FromGitter | <data-man> let s = "http://ecs.aliyuncs.com/?AccessKeyId=TMP.AQG3fHzS2bwnu1i-jxjYHWPqowQ8MXt_rNy75zFzLPrSwt7IiaqLSy2Kg7jPADAtAhQ-fIECC99A0CTTEG087Xs2KKJfoAIVAJud_i-8rBS7TWWLwtX81x0_E7MT&Action=DescribeInstances&Format=JSON&RegionId=cn-shenzhen&SecureTransport=true&SignatureMethod=HMAC-SHA1&SignatureNonce=1efbd9761c6577e6165d66ae3e05e267&SignatureVersion=1.0&SourceIp=14.215.128.135&Timestamp= |
05:40:07 | FromGitter | ... 2018-01-15T04%3A23%3A43Z&Version=2014-05-26&Signature=o8HEu2Dou62KtHbNW5DbQC6eF34%3D" ⏎ echo wordWrap(s, 25) |
05:40:51 | FromGitter | <Quelklef> oh, was he wanting to *display* a long line split by linebreaks? mb |
05:43:26 | FromGitter | <data-man> I understood exactly so :-) |
06:14:19 | * | nsf joined #nim |
06:21:22 | * | def-pri-pub left #nim (#nim) |
06:47:14 | * | yglukhov joined #nim |
06:51:43 | * | yglukhov quit (Ping timeout: 248 seconds) |
06:52:46 | livcd | uh what is ref object or when do I use it instead of plain object ? :O |
07:05:29 | * | endragor quit (Remote host closed the connection) |
07:07:52 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
07:10:41 | * | chemist69 quit (Ping timeout: 276 seconds) |
07:14:35 | * | stevenfx joined #nim |
07:23:14 | * | earenndil quit (Quit: ZNC 1.6.3+deb1 - http://znc.in) |
07:24:19 | * | chemist69 joined #nim |
07:25:16 | * | earenndil joined #nim |
07:30:46 | * | endragor joined #nim |
07:36:08 | * | endragor quit (Ping timeout: 276 seconds) |
07:40:19 | * | benoliver999 quit (Quit: ZNC - http://znc.in) |
07:42:17 | * | SenasOzys joined #nim |
07:44:04 | * | pwntus joined #nim |
07:44:40 | * | miran joined #nim |
07:46:00 | * | endragor joined #nim |
07:46:06 | * | pwntus quit (Changing host) |
07:46:06 | * | pwntus joined #nim |
07:46:32 | * | benoliver999 joined #nim |
07:47:19 | FromGitter | <mratsim> You use plain object except when you need a reference (senantics, inheritance, expensive copy, ...) |
07:47:29 | * | benoliver999 quit (Client Quit) |
07:48:52 | * | couven92 joined #nim |
07:49:04 | miran | livcd: see if this PMunch's post helps: https://www.reddit.com/r/nim/comments/7dm3le/tutorial_for_types_having_a_hard_time/ |
07:49:38 | FromGitter | <mratsim> A ref object is similar to objects in Python/Java/Ruby (garbage collected) |
07:49:54 | FromGitter | <mratsim> An plain object is similar to struct in C |
07:51:50 | miran | mratsim: what would be preferred to use generally? or: when to use which type? |
07:53:40 | * | benoliver999 joined #nim |
07:54:49 | * | benoliver999 quit (Excess Flood) |
07:55:54 | livcd | i'll check it out in a minute or two :) |
08:09:41 | * | benoliver999 joined #nim |
08:17:03 | FromGitter | <alehander42> @mratsim why do you have to explain it to french people :D does array mean something bad in french |
08:24:03 | * | PMunch joined #nim |
08:24:19 | * | couven92 quit (Quit: Client Disconnecting) |
08:27:51 | * | Serenitor joined #nim |
08:27:55 | * | Vladar joined #nim |
08:28:07 | FromGitter | <mratsim> too hard to pronounce/retain |
08:28:22 | FromGitter | <alehander42> I like how in the lang distribution graph in github, Nim has " Prolog 0.1% " :D wrongly matcher perl file ? |
08:28:29 | FromGitter | <alehander42> matched* |
08:29:00 | FromGitter | <alehander42> ah, interesting |
08:48:52 | * | Yardanico joined #nim |
08:49:28 | * | zahary joined #nim |
08:50:24 | FromGitter | <survivorm> @alehander42 Care to share a link? As collection page on github doesn't show distribution, and githut doesn't count nim at all as it's not in top 30 by repo activity |
08:52:18 | FromGitter | <survivorm> And it's outdated, as latest data at githut is 14Q4 |
08:54:27 | * | floppydh joined #nim |
08:55:03 | FromGitter | <alehander42> nah, I mean https://i.imgur.com/2hxLGfq.png |
08:55:27 | FromGitter | <survivorm> ah, ok |
08:56:16 | FromGitter | <alehander42> ah I see, I thought it's updated often, there was a time when trending repo-s seemed old tho |
08:56:24 | * | Yardanico quit (Read error: Connection reset by peer) |
09:08:42 | * | yglukhov joined #nim |
09:13:22 | * | yglukhov quit (Ping timeout: 265 seconds) |
09:13:25 | * | yglukhov_ joined #nim |
09:14:30 | * | yglukhov_ quit (Remote host closed the connection) |
09:14:45 | * | yglukhov joined #nim |
09:33:07 | PMunch | How would one interface Nim with C#? Has anyone done it? |
09:34:20 | PMunch | I want to create a DLL to be loaded by existing C# code that I can't edit |
09:39:59 | FromGitter | <data-man> @mratsim: Are you still interested in viewing a images in a console? |
09:41:49 | FromGitter | <data-man> I found https://github.com/orangeduck/imgcurses Maybe helpful. :-) |
09:42:14 | PMunch | I also made a png loader for drawille :) |
09:47:27 | FromGitter | <data-man> @PMunch: I guess that drawille has more grain. :-) |
09:49:47 | * | PMunch_ joined #nim |
09:50:14 | PMunch_ | Well yeah, but colours are still in a 2x4 grid since it can only be applied per character |
09:51:27 | * | SenasOzys quit (Remote host closed the connection) |
09:52:29 | PMunch_ | https://i.imgur.com/Iw3kdJ9.png |
09:52:49 | PMunch_ | That's the house from the thing you sent |
09:53:08 | PMunch_ | It might look better with a slightly lighter background though |
09:56:11 | * | endragor quit (Remote host closed the connection) |
09:58:43 | * | endragor joined #nim |
09:59:49 | FromGitter | <data-man> When (and if) my truecolored PR will be merged, maybe will look better. :) |
10:02:26 | PMunch_ | Well, truecolor might help a bit |
10:02:48 | PMunch_ | But the real problem is that only every 2x4 grid can be coloured.. |
10:04:27 | FromGitter | <data-man> Maybe to mix a drawille and imgcurses? |
10:04:42 | PMunch_ | You can make it look a bit better though by pre-processing it to remove some of the details that get's removed anyways: https://i.imgur.com/ieVcf3q.png |
10:04:53 | PMunch_ | That's with GIMPs "cartoon" filter |
10:04:58 | PMunch_ | Which enhances edges |
10:05:32 | PMunch_ | Yeah it seems like imgcurses does something like that pre-processing |
10:05:36 | FromGitter | <survivorm> much better, but still bad :) |
10:06:01 | FromGitter | <survivorm> If you're not offended by a side opinion |
10:06:37 | livcd | how can i print an object's type ? https://glot.io/snippets/exdpqinlsc |
10:07:46 | FromGitter | <survivorm> make a proc, maybe? |
10:11:08 | FromGitter | <data-man> echo $name(type(a)) |
10:14:30 | FromGitter | <survivorm> @data-man You know, why it doesn't work as dot syntax? type() isn't a function? |
10:14:58 | FromGitter | <data-man> No :) |
10:15:05 | FromGitter | <survivorm> because this is not UCS-lika :) |
10:16:46 | livcd | thanks! |
10:17:33 | FromGitter | <survivorm> Is there a way to do similar in dot notation? Just curious |
10:17:47 | * | stevenfx quit (Read error: Connection reset by peer) |
10:18:06 | * | stevenfx joined #nim |
10:20:48 | FromGitter | <data-man> proc `.name`T (a: auto) = name(type(a)) |
10:21:21 | * | yglukhov quit (Ping timeout: 248 seconds) |
10:21:46 | livcd | what is this object proc field ? https://glot.io/snippets/exdq5geczc |
10:22:02 | FromGitter | <data-man> ```proc `.name`(a: auto) = name(type(a))``` |
10:22:24 | crem | So, there will be no breaking changes before 1.0 because of book, and no breaking changes after 1.0 because it's 1.0? :-( I like when it breaks. |
10:22:54 | * | Serenit0r joined #nim |
10:23:04 | FromGitter | <survivorm> Is it really necessary? |
10:23:14 | FromGitter | <survivorm> To break, i mean |
10:24:20 | FromGitter | <survivorm> You may still wait for improvements, new functional and even new paradigms. |
10:24:31 | * | Serenitor quit (Ping timeout: 248 seconds) |
10:24:58 | FromGitter | <survivorm> AND be shure that programm You written 2(3-4-5...) years ago still works |
10:25:14 | FromGitter | <survivorm> That's a bonus, i think |
10:26:37 | FromGitter | <survivorm> BTW, @data-man, you shadowed object's name attr :) |
10:28:20 | FromGitter | <survivorm> @livcd It's ability to pass to object a proc with no parameters, if that's what you there asking |
10:28:41 | FromGitter | <survivorm> as an attribute, of cource |
10:33:38 | * | yglukhov joined #nim |
10:34:23 | livcd | survivorm: i guess. Could not find it in documentation |
10:34:23 | dom96 | crem: no, there will be no breaking changes to things documented in the book before 1.0 |
10:34:27 | livcd | saw it in the code somewhere |
10:34:30 | * | arnetheduck joined #nim |
10:35:17 | crem | Too bad finalizer parameter for new() was documented there. :) |
10:35:29 | dom96 | was it? |
10:35:38 | dom96 | I don't think so |
10:36:16 | crem | Maybe it wasn't, then it's ok. :) I don't really remember, read that book in August. |
10:36:38 | FromGitter | <survivorm> @livcd As i understand it, it's like forward declaration, like: I would like to pass proc with such params to this object, and work with it (in future) |
10:37:00 | livcd | survivorm: not sure i understand though...how do i pass it to the object ? |
10:37:42 | FromGitter | <survivorm> A minute. I'll compose example |
10:42:50 | dom96 | It's a field that stores a reference to a procedure |
10:43:30 | dom96 | PMunch: C# can load C DLLs, so just look up how to interface with C from C# |
10:48:13 | FromGitter | <survivorm> @livcd https://glot.io/snippets/exdqvrbxhh |
10:48:25 | FromGitter | <survivorm> something like this |
10:48:48 | FromGitter | <survivorm> and usage like a.calc(...) |
10:50:08 | dom96 | btw please use https://play.nim-lang.org instead of glot.io :) |
10:52:48 | * | couven92 joined #nim |
10:58:36 | FromGitter | <survivorm> @dom96 ok :) |
11:00:03 | FromGitter | <survivorm> @alehander42 Did you try py2nim on something real? Like jinja2 for example? (I think it's clone/port will be very velcome under nim :) ) |
11:01:18 | FromGitter | <survivorm> And i'm not telling it should be ready out-of-box. But how much needs fixing in reality? |
11:01:52 | * | Serenitor joined #nim |
11:04:17 | * | Serenit0r quit (Ping timeout: 256 seconds) |
11:08:19 | FromGitter | <andreaferretti> @survivorm |
11:08:24 | FromGitter | <andreaferretti> DO you know about https://nim-lang.org/docs/filters.html ? |
11:08:34 | FromGitter | <andreaferretti> Not quite jinja |
11:08:43 | FromGitter | <andreaferretti> But nicely integrated into nim and works at compile time |
11:13:20 | dom96 | yeah, filters are great, definitely could use some improvements to make them even better though |
11:18:56 | Araq | can't be improved, they are in your book :-) |
11:19:11 | dom96 | They can |
11:19:57 | dom96 | we can easily make a better version behind a different shebang |
11:23:34 | FromGitter | <alehander42> I admire the goal to not break anything in the book, but isn't that why books have second, third edition etc? technologies inevitably change a bit |
11:24:46 | Araq | the book is about Nim v1. so we better release v1. |
11:25:10 | Araq | once that is done, we can change things in a hopefully civilized manner |
11:26:41 | FromGitter | <alehander42> @survivorm I've applied py2nim for some ethereum py libs, and some modules of the ethereum virtual machine only. I hope eventually it would be useful for stuff like jinja2 but it all depends on the particular codebase etc. as a whole I think it would shine mostly to speed up porting smaller libraries implementing all kinds of api wrappers/parser/config stuff/algorithms/protocols etc |
11:28:11 | FromGitter | <alehander42> bigger projects often need architectural changes in your port and some of them are deeply based on very dynamic stuff(metaclasses etc) which would be recreated in a better way from scratch with Nim-ish tools (macros etc) |
11:29:08 | FromGitter | <alehander42> @Araq I agree, so 2018 is v1 year, right : ) |
11:31:52 | * | Yardanico joined #nim |
11:34:35 | miran | i've read some articles from 2014 claiming 2014 is v1 year :D |
11:35:01 | miran | ...and some comments from 2015, 2016, .... :D |
11:35:02 | * | yglukhov quit (Read error: Connection reset by peer) |
11:35:15 | arnetheduck | that means there's still a chance to get rid of the weird platform-dependent/indeterministic newlines |
11:35:26 | * | yglukhov joined #nim |
11:36:36 | Araq | miran, yeah that's how professional software development looks like. 4 years too late already but v1 will be awesome ... with all the features we already had, but now with fewer or different bugs |
11:37:47 | FromGitter | <alehander42> @miran Nim is langdev's Liverpool |
11:38:39 | miran | alehander: nim is linux? :) |
11:38:57 | livcd | survivorm: thanks. Ill check it out |
11:39:08 | miran | Araq: 4 years too late IF it comes out this year :D |
11:40:06 | miran | i guess it should either come out soon, or we should add a section to FAQ about it, because that is definitely the most asked question about nim |
11:41:00 | FromGitter | <survivorm> I think it scares some people away |
11:41:12 | FromGitter | <survivorm> Newbies, mostly |
11:42:09 | FromGitter | <survivorm> They think: "Ah, the project is not yet v 1.x, probably it is lacking most basic things" |
11:42:13 | miran | i would say those are experienced people who don't want to get into something until they think it is here to stay |
11:42:30 | FromGitter | <survivorm> But it doesn't |
11:42:38 | miran | v1.0 has some psychological impact, you cannot deny it |
11:42:51 | miran | btw, you know the story about python 2? |
11:43:03 | FromGitter | <survivorm> Which one? |
11:43:16 | * | Yardanico quit (Read error: Connection reset by peer) |
11:43:57 | FromGitter | <survivorm> @alehander42 imagine porting sqlalchemy to nim :))) |
11:44:04 | miran | they decided to release python 2, because seeing number 2 there felt like a more professional (and older) language than 1.x |
11:44:11 | dom96 | I'm expecting to see hordes of people suddenly using Nim when we release v1 |
11:44:16 | dom96 | Immediately, otherwise I'll be disappointed :P |
11:44:35 | livcd | dom96: convince FB to invest 500m$ |
11:44:37 | livcd | :D |
11:44:48 | miran | dom96: yup, all those "i will wait until v1.0 is out" people will suddenly start to use nim |
11:45:10 | FromGitter | <survivorm> Dom, looks like you're a bit in illusion :) |
11:45:14 | dom96 | arnetheduck: you mean \n? |
11:45:17 | crem | You should have started from 1.0. :) |
11:45:26 | miran | dom96: but i really do feel it will make nim more attractive to (some of) those people |
11:45:32 | FromGitter | <survivorm> "That doesn't work that way " (C) |
11:46:30 | dom96 | IMO the fact that Nim has been active for so long should be enough to convince people of its viability |
11:46:46 | dom96 | Many languages came and went during Nim's lifetime :) |
11:47:26 | FromGitter | <survivorm> But the fact is, nim SHOUD get v 1.0 ASAP. I'll say then everyday code is stable, but it's more of the @Araq 's knowlege |
11:47:29 | miran | if there are no more big/breaking stuff coming before v1.0, then let's fix those high priority bugs and let's enjoy the millions of new users coming because of v1.0 |
11:48:26 | FromGitter | <survivorm> @dom96 The fact is - people are lazy. Many even wouldn't look if they se version below 1.0 |
11:48:28 | miran | survivorm: there is some stuff introduced in 0.17.3 which is buggy, this should be fixed before releasing v1.0 |
11:48:52 | miran | but generally, i agree with you |
11:48:59 | crem | Is there 17.3? |
11:49:03 | FromGitter | <survivorm> I'm not telling to say "Now we are v.1" |
11:49:07 | dom96 | After v1 we'll have people coming in, finding things that they dislike which can no longer be changed and leaving because "well, you guys should have fixed it before v1" |
11:49:11 | dom96 | that's my main worry |
11:49:30 | dom96 | crem: all odd minor releases refer to 'devel' |
11:49:40 | FromGitter | <survivorm> But too early is as bad as too late |
11:49:41 | miran | dom96: this will happen even if we wait for 20 more years |
11:49:41 | crem | ah |
11:49:51 | dom96 | miran: true |
11:49:57 | dom96 | In any case, we've waited long enough |
11:50:12 | miran | dom96: those things can be fixed in v1.1 if they're minor, or in v2.0 |
11:50:12 | dom96 | But I'm not making any promises (yet) :P |
11:50:20 | * | dddddd joined #nim |
11:50:53 | miran | dom96: because of all the promises made in 2017, 2016, ....? :P |
11:50:58 | FromGitter | <survivorm> So i agree about the bugs. Fix major, release, then fix minor |
11:50:59 | crem | There are indeed some things I don't like which I hope to be fixed (pre or post 1.0). Namely, the destructors. Other things (like missing constructors) I can live with. |
11:51:05 | dom96 | miran: hrm? By whom? and where? |
11:51:29 | FromGitter | <krux02> What about the features that are not documented and forgotten but still there |
11:51:29 | * | Kingsquee quit (Ping timeout: 276 seconds) |
11:51:40 | FromGitter | <krux02> will they also be frozen with Version 1.0 |
11:51:46 | miran | dom96: sorry i don't keep the archive ready, but i know i've read a lot of "coming soon" comments on reddit and HN |
11:51:47 | FromGitter | <survivorm> Why? |
11:51:56 | dom96 | krux02: yes |
11:51:57 | * | gokr joined #nim |
11:52:07 | dom96 | miran: Did I ever say "v1 is coming this year?" :P |
11:52:16 | miran | :D |
11:52:27 | dom96 | You can't hold "coming soon" against me |
11:52:40 | dom96 | But of course, v1 is coming soon :P |
11:52:44 | miran | :D :D |
11:52:49 | miran | this year? |
11:52:49 | FromGitter | <survivorm> @dom96 Why? Why save the outdated stuff? Or are you talfing about deprecated only? |
11:52:52 | dom96 | Much sooner than it was the last time I said this |
11:53:09 | dom96 | survivorm: not sure what you mean |
11:53:44 | FromGitter | <survivorm> Your answer to krux02 if I understood it correctly |
11:54:00 | miran | dom96: so, now that fmt/% story is over, you and Araq are concentrated on high priority bugs and that's it? :) |
11:54:13 | * | stevenfx quit (Read error: Connection reset by peer) |
11:54:24 | * | stevenfx joined #nim |
11:54:34 | livcd | I think poeple want to see shiny things that can be done in Nim. I think few similar projects and videos about building something like Reel Valley would raise Nim's popularity |
11:54:43 | dom96 | survivorm: no, I'm talking about features which are not documented |
11:54:58 | FromGitter | <survivorm> Ah |
11:54:59 | dom96 | There is plenty of stuff used every day which isn't documented, for example: except Exception as err: |
11:55:22 | miran | livcd: agreed. unfortunately, i'm not experienced enough to make shiny stuff.... :( |
11:55:26 | dom96 | miran: Right now I'm concentrated on FOSDEM |
11:55:46 | FromGitter | <survivorm> Yeah, some stuff in nim is pretty badly documented :) |
11:55:51 | FromGitter | <mratsim> So Php will be in v1? @data-man thanks for imgcurses! |
11:55:53 | miran | ...where you will release v1.0? :D |
11:56:34 | miran | survivorm: write it better and submit a PR? |
11:57:00 | livcd | miran: so gotta start with something simple...flappy bird ? :) |
11:57:17 | FromGitter | <survivorm> @miran If i'm using it and not lazy enough - shure |
11:57:52 | miran | livcd: well, i managed to solve two years of 'advent of code' in nim, but that's probably not shiny enough |
11:57:53 | FromGitter | <survivorm> And if I'm able to understand the code, of cource |
11:58:48 | arnetheduck | dom96, yes. |
11:59:13 | Araq | mratsim: Php backend is not part of Nim. |
11:59:14 | FromGitter | <alehander42> @survivorm I think exactly libs like sqlalchemy are best used only as inspiration for Nim libraries: in Nim you'll build your whole DSL in a different (maybe more powerful) way, a lof of stuff will happend and will be checked in compile time and just translating a dynamic lang lib would miss a lot of the power of a well designed Nim lib |
11:59:28 | dom96 | arnetheduck: That's documented in my book I'm afraid |
11:59:31 | Araq | see Ormin :-) |
11:59:45 | arnetheduck | books can have errata |
12:00:31 | dom96 | Why do you want this changed? |
12:04:08 | Araq | arnetheduck, book version X corresponds to Nim version 1.x is still a nice thing to have |
12:04:10 | arnetheduck | because it changes a well-established meaning of an escape to random sequence that the person writing the code has no control over, leading to less reliable software. it's a solved problem, go with the flow and move on instead of introducing a useless unique snowflake solution that was only began to be remotely reasonable in a dated world where applications ran on a single platform without internet access |
12:04:36 | Araq | ? |
12:04:44 | Araq | that came out of nowhere |
12:04:55 | Araq | what do you mean? version 1 is for suckers? |
12:04:58 | arnetheduck | haha, it's been bugging me since day 1 with nim ;) |
12:05:52 | arnetheduck | imagine the amounts of useless code people have had to write because some smartass thought \ is so much better that / for path separators - this is the same thing |
12:06:02 | Araq | no idea what you mean. |
12:06:11 | livcd | probably windows unc paths |
12:06:56 | arnetheduck | I mean that when I write \n, I want a newline, and not a carriage return+linefeed sometimes |
12:07:31 | livcd | yes! |
12:08:39 | PMunch_ | arnetheduck, so use \l? |
12:08:41 | arnetheduck | (and by newline, I mean a single line feed which all apps except notepad handle in 2018) |
12:09:02 | Araq | oh so it's about \n, I don't care |
12:09:10 | PMunch_ | Which in Nim produces a linefeed |
12:09:18 | euantor | I find `\n` extremely useful personally |
12:09:31 | arnetheduck | PMunch_, I don't want to have to remember that for one language in the world, only |
12:09:59 | PMunch_ | arnetheduck, it's not that hard to remember :P Linefeed -> \l |
12:10:05 | PMunch_ | Newline -> \n |
12:10:24 | PMunch_ | Carriage return -> \c |
12:12:03 | Araq | protocols are full of \c\l, *shrug*, it's not only a Windows/Nim problem |
12:12:29 | Araq | ok, if you never care about "internet access" ... oh wait |
12:13:10 | arnetheduck | every protocol spec out there will use \r\n, as will every example of any kind of escaped string that I'm reading and copypasting from. |
12:14:07 | arnetheduck | except nim, that is. why not do \N for non-deterministic newlines and leave the rest as is, in c? |
12:14:43 | Araq | ok, copy&paste is broken, too bad, what else can you copy&paste from a protocol spec? nothing whatsoever? |
12:15:47 | crem | I'm not really fond of nim's \n either. It would be better that if something useful like that is introduced, some new sequence (like \l) would be assigned to it. |
12:16:07 | crem | Different meaning of \n will surprise people a lot! |
12:16:18 | crem | But it's fine, I can live with that. |
12:16:26 | FromGitter | <krux02> how is "\n" in Nim different? |
12:16:36 | Araq | there were good reasons for why \n is the way it is. |
12:16:46 | FromGitter | <krux02> I just use it in strings for echo and it works in that context as expected |
12:16:47 | Araq | I agree we should change it. |
12:17:10 | Araq | but it's not an evil conspiracy by Araq. |
12:20:25 | dom96 | I understand the opposition but I don't think it's that difficult to learn what \n means in Nim |
12:20:55 | livcd | and what does it mean ? I did not get to that section in your book :D |
12:21:00 | arnetheduck | krux02, in nim, \n gives you either one or two byte depending on the compiler options that the person compiling your code is using. it's quite a surprise when you work with many kinds of cross-platform code, and you won't notice it until it's too late and your app is out there. |
12:21:40 | PMunch_ | Yeah, I'd argue that for those this will cause a problem for it's better to have \n be platform specific. People who implement protocols and the like will quickly learn that they have to use \l |
12:21:56 | PMunch_ | It's one of the first thing I remember learning about Nim :P |
12:23:16 | crem | The problem will be for people who develop on linux (for example), and use '\n' everywhere they should have used \l, and then when they compile on windows, they have bugs. |
12:23:24 | * | PMunch quit (Disconnected by services) |
12:23:28 | * | PMunch_ is now known as PMunch |
12:23:42 | * | PMunch_ joined #nim |
12:23:46 | Araq | well hardly since they cannot compare to '\n' |
12:23:48 | arnetheduck | there's surprising unity on what the escapes mean (more so than anything else) - can't think of any language that does this differently - and it looks like it works when your on mac/osx, only to have weird failures on win |
12:24:24 | Araq | you can only compare to "\n" and that should have made people suspicious |
12:25:10 | FromGitter | <alehander42> @dom96 "I don't think it's that difficult to learn what \n means in Nim" many users wouldn't even suspect that they have to "learn" something like that |
12:25:34 | Araq | fwiw I want to change \n because it's "too correct". I write programs that generate Nim source code and the source code has CRLF endings on Windows and then 'git diff' fucks around |
12:25:42 | crem | Hm, let me check if I used \n in my code.. |
12:25:59 | arnetheduck | I'm not saying that it's impossible or even hard to learn. it's just a source of useless bugs that could be avoided.. |
12:26:34 | crem | Hm, I don't have it in bitbucket, will check at home. |
12:26:37 | arnetheduck | Araq, I actually agree with that ;) but there's a strong pragmatic argument at play |
12:27:59 | arnetheduck | alehander42 +1 |
12:28:35 | Araq | arnetheduck, that's not true either though \u00ff are hardly handled the same across languages |
12:29:36 | * | Serenit0r joined #nim |
12:30:01 | crem | Btw if there were agreement that that meaning of "\n" has to be changed, would it be better to do pre-v1.0 or post-v1.0? Just hypothetical question to understand the breaking changes introduction strategy. |
12:30:37 | arnetheduck | unicode indeed - those came after - but the dozen or so regularly used ascii codes before whitespace - yes (\n,\t,\r, a few more that are practically unused these days) |
12:31:57 | Araq | crem, post-v1.0 since it's in the book :-) |
12:32:05 | crem | ok :) |
12:32:09 | * | Serenitor quit (Ping timeout: 264 seconds) |
12:32:23 | Araq | we can give you switch --saneNewlines earlier than that though |
12:32:57 | arnetheduck | thought of introducing source headers a la haskell btw? |
12:33:21 | crem | I personally didn't have any inconveniences because of that. |
12:34:45 | dom96 | This is mentioned in my book, but AFAICS none of the examples depend on this definition of '\n' |
12:34:55 | Araq | arnetheduck, not sure how Haskell does it but I thought about {.nimversion: "1.0".} |
12:35:02 | dom96 | In fact, one of them might be broken because of this behaviour :P |
12:38:23 | arnetheduck | no shit, the books gets it wrong? |
12:40:32 | dom96 | oh, no, it doesn't |
12:40:33 | arnetheduck | Araq, haskell does something like, but has granularity for individual features instead.. something like {.saneNewLines, experimentalConcepts.}.. then the "default" feature set you get depends I think on the haskell version you supply to the compiler |
12:40:57 | dom96 | thankfully I use splitLines instead of split("\n") |
12:41:21 | FromGitter | <andreaferretti> ugh... this is probably the major source of complaint against Haskell |
12:41:25 | FromGitter | <andreaferretti> let's not copy from that |
12:41:27 | dom96 | yeah |
12:41:34 | dom96 | that's a horrible thing to take from Haskell |
12:41:51 | * | dom96 has flashbacks of the 50 million different string options Haskell offers |
12:43:45 | Araq | dom96, I like the idea |
12:45:05 | Araq | oh come on. non deterministic thread IDs? |
12:45:20 | dom96 | I like the idea of an ``epoch`` that Rust is using http://words.steveklabnik.com/looking-back-at-rust-in-2018 |
12:45:26 | Araq | do I have to count everything on my own here... |
12:46:13 | * | Snircle joined #nim |
12:49:20 | Araq | what does "epoch" do? same as std=C99 ? |
12:51:24 | dom96 | read the post |
12:51:31 | Araq | I did. |
12:52:31 | dom96 | well that's the extent of my knowledge on it |
13:04:57 | * | gokr left #nim (#nim) |
13:24:54 | * | PMunch_ quit (Quit: Leaving) |
13:25:04 | * | craigger quit (Quit: bye) |
13:26:07 | * | zahary quit (Quit: Leaving.) |
13:27:19 | * | craigger joined #nim |
13:28:26 | * | zahary joined #nim |
13:32:00 | * | wastedone_ joined #nim |
13:40:26 | * | zahary quit (Quit: Leaving.) |
13:46:22 | * | craigger quit (Quit: bye) |
13:47:24 | * | zahary joined #nim |
13:48:27 | * | craigger joined #nim |
14:02:34 | dom96 | but the general idea I think is that we shouldn't have so much granularity with new features |
14:02:44 | dom96 | or with breaking changes |
14:02:57 | dom96 | because people will never adopt all of them |
14:03:19 | Araq | so like nim-2018, nim-2020? |
14:03:49 | dom96 | yeah |
14:03:53 | FromGitter | <survivorm> Yes. But if people think some functional is... not good, why not change it? |
14:04:14 | crem | Because of the book! |
14:04:26 | FromGitter | <survivorm> The example with "\n" is one of them |
14:04:47 | FromGitter | <survivorm> I'm not talking about v.1.0 |
14:05:03 | FromGitter | <survivorm> the idea is "in general" |
14:05:16 | dom96 | in general we will change it |
14:05:24 | dom96 | and if there is something wrong tell us |
14:05:33 | dom96 | this "\n" feature has been in the language for a long time |
14:05:43 | dom96 | telling us now is better than after v1 |
14:05:50 | Araq | it also did bite people for a long time |
14:05:52 | dom96 | but would have been better two years ago |
14:05:59 | Araq | however not in catastrophic ways |
14:06:07 | Araq | as '\n' doesn't even compile |
14:06:19 | FromGitter | <survivorm> but i doubt many people stumble on it |
14:06:44 | FromGitter | <survivorm> but if they do, they get confused |
14:07:02 | FromGitter | <survivorm> and upset, i think |
14:07:34 | Araq | it's better to change it but let's also not overblow its importance |
14:07:36 | crem | https://forum.nim-lang.org/t/2666 that seems to be one example :) |
14:07:51 | FromGitter | <survivorm> It's complication, a unneded one, even if "the right thing" |
14:07:57 | crem | Yeah, \n thing is not that severe. |
14:08:09 | FromGitter | <survivorm> Just an example |
14:08:21 | FromGitter | <survivorm> A strategy to deal with things |
14:08:41 | crem | What worries me is that it'll be harder to make "courageous" changes in the language. |
14:08:59 | FromGitter | <survivorm> Language is not set in stone, i hope |
14:09:01 | dom96 | Araq: I guess your {.nimversion.} idea is similar |
14:09:21 | FromGitter | <survivorm> @crem I doubt |
14:09:23 | Araq | well we have a strategy, the problem is that I'm not gonna change things immediately, I collect feedback and then eventually change my mind :P |
14:09:40 | Araq | and then you can say "2 years too late" :P |
14:10:12 | FromGitter | <andreaferretti> I think the only issue when working with Nim is that too many new ideas are tried before the previous ones are settled |
14:10:19 | FromGitter | <survivorm> The idea is not about not doing, more like - tried, f@cked, changed |
14:10:24 | * | stevenfx quit (Ping timeout: 256 seconds) |
14:10:40 | Araq | but we cannot nillywilly change the language just because somebody somewhere had a bug, that's true for everything |
14:10:52 | FromGitter | <survivorm> yeah |
14:10:54 | FromGitter | <survivorm> sure |
14:11:05 | FromGitter | <andreaferretti> for instance when I started static[T] and concepts where deemed unstable |
14:11:32 | FromGitter | <andreaferretti> but since then other things were attempted, like destructors or region based memory management |
14:11:34 | Araq | and now they are ... ? |
14:11:48 | FromGitter | <andreaferretti> while static[T] and concepts still have issues |
14:11:48 | FromGitter | <survivorm> more like we'd better say some syntax is experimental |
14:12:03 | FromGitter | <survivorm> and may be changed in future |
14:12:03 | crem | destructors? Are they still planned? |
14:12:14 | * | stevenfx joined #nim |
14:12:17 | FromGitter | <survivorm> as it is now (afaik) |
14:12:22 | * | alexday quit (Quit: ZNC 1.6.5 - http://znc.in) |
14:12:26 | Araq | andreaferretti: well that's more the split of work than anything else |
14:12:36 | FromGitter | <andreaferretti> Yeah I understand |
14:12:48 | FromGitter | <andreaferretti> I am still here after all :-) |
14:13:08 | FromGitter | <andreaferretti> but I fear this may hurt Nim popularity |
14:13:30 | FromGitter | <andreaferretti> people are afraid to try some features because they kind of work until they don't |
14:13:52 | Araq | yeah no idea how to introduce new features :-) |
14:14:12 | FromGitter | <andreaferretti> ideally, one at a time :-D |
14:14:52 | Araq | ok but then it's not used in the wild so it lacks feedback |
14:14:55 | FromGitter | <andreaferretti> otherwise there is a split between basic Nim (guaranteed to work) and the rest (use at your own risk) |
14:15:05 | FromGitter | <andreaferretti> that's true as well |
14:15:19 | FromGitter | <andreaferretti> I don't claim to have a solution |
14:15:25 | * | Zevv left #nim (#nim) |
14:15:29 | miran | "it's better to change it but let's also not overblow its importance" --> so it is ok if this is changed and the book is slightly wrong on this one? |
14:15:43 | Araq | crem, destructors are like Game of thrones dragons |
14:15:57 | Araq | miran, that's dom96's decision, I'm fine with either solution |
14:16:16 | Araq | crem, "they are coming" and then eventually they come and blow everything away |
14:17:01 | crem | Actually, development multiple features and then releasing as a bundle is not nice in terms of keeping feature developer's enthusiasm. Having constant feedback for small features is more motivating. |
14:17:27 | crem | Waiting for destructors, then. :) |
14:18:23 | miran | Araq: well, dom96 said "This is mentioned in my book, but AFAICS none of the examples depend on this definition of '\n'" --> sounds to me like this could be changed/corrected for v1.0 |
14:18:38 | Araq | agreed. |
14:19:15 | dom96 | IMO we should ask for more people's opinion i.e. someone create an issue for this |
14:20:33 | miran | arnetheduck: you started this, you open the issue :) |
14:21:00 | dom96 | also, I'm not sure whether this qualifies as an 'errata' entry for my book |
14:21:06 | FromGitter | <survivorm> Personally, i vote for the \n - as in other langs. |
14:21:16 | dom96 | if we do decide to change it that is |
14:21:17 | * | stevenfx quit (Ping timeout: 256 seconds) |
14:21:59 | FromGitter | <survivorm> Much the same thing, as almost everythere people count 1kb = 1000 bytes. |
14:22:17 | miran | survivorm: +1, do it as in other languages, don't surprise user where (s)he least expects it! |
14:22:43 | dom96 | well |
14:22:53 | FromGitter | <survivorm> yeah, @miran, the surprise is the most horrible point |
14:22:58 | dom96 | there is a lot of features of Nim that are surprising |
14:23:06 | FromGitter | <survivorm> no-no |
14:23:06 | dom96 | Does that mean we should change them as well? |
14:23:15 | FromGitter | <survivorm> they are EXPECTED |
14:23:24 | FromGitter | <survivorm> suprises, yeah |
14:23:37 | FromGitter | <survivorm> but you're avare of them |
14:23:42 | miran | dom96: there is something called nice surprise, and something called $^!$*!)(*$)!(*( is this sh*!? |
14:23:45 | FromGitter | <survivorm> and \n is not |
14:23:47 | dom96 | if we change all the surprise then we'll end up with an existing language :) |
14:23:58 | dom96 | *surprises |
14:24:13 | FromGitter | <survivorm> dom, don't be a troll |
14:24:29 | FromGitter | <survivorm> You understand the case and the meaning |
14:24:31 | FromGitter | <andreaferretti> maybe it would be worth to add a `newline` template or something to use in string interpolation like `\n` is used today |
14:25:03 | FromGitter | <andreaferretti> defined with `when defined(windows): "\c\l" else: "\l"` |
14:25:14 | FromGitter | <andreaferretti> or whatever `\n` is today |
14:25:27 | dom96 | yes, this feature is still nice, we should have a different escape character for it |
14:25:30 | * | couven92 quit (Read error: Connection reset by peer) |
14:25:38 | FromGitter | <survivorm> @andreaferretti more like carretReturn and linebreak |
14:26:04 | FromGitter | <survivorm> let the \n be expected :) |
14:27:04 | miran | whatever the method of fixing this is - let the end result be what 99.9% people would expect it to be |
14:27:29 | Araq | \o OS specific newline? |
14:27:40 | PMunch | o/ |
14:27:42 | FromGitter | <survivorm> btw, nim have much pleasant and expected surprises, some pleasant and unexpected (friendly community :) ) and only a few bad ones. And let's hope the situation will only get better |
14:27:52 | Araq | \m # like 'n', but better since m<n ? |
14:27:57 | * | gokr joined #nim |
14:28:20 | Araq | \p platform specific newline? |
14:28:22 | miran | u/ --> just like upside down \n |
14:28:40 | Araq | no idea what's already taken... |
14:28:48 | miran | (ok ok, it is u\) |
14:29:06 | FromGitter | <survivorm> no, miran, THAT's not that i'd expect |
14:29:10 | FromGitter | <survivorm> :) |
14:29:31 | Araq | omp seem ok |
14:29:37 | miran | u\ for going up |
14:30:16 | Araq | \pABC\pDEF |
14:30:23 | Araq | \oABC\oDEF |
14:30:34 | Araq | \p seems to be slightly more readable |
14:30:37 | dom96 | create an issue |
14:30:42 | dom96 | there will be plenty bikeshedding room there |
14:31:16 | FromGitter | <survivorm> let's settle with \n = \r\b, and the \r an \b respectively |
14:31:18 | FromGitter | <krux02> is there in issue that sums up the problem with \n |
14:32:05 | dom96 | krux02: it's platform-dependent. |
14:32:26 | FromGitter | <krux02> yea but isn't that known that line endings are two bytes on windows? |
14:32:53 | dom96 | yes, but that's not how it works in all other programming languages |
14:32:57 | dom96 | \n is line feed everywhere else |
14:33:00 | crem | It's two bytes in files. But for example if I want to keep text in memory, I don't necessary want it to be \r\n |
14:33:07 | crem | even on windows. |
14:33:58 | dom96 | btw the errata for my book is strangely empty, if you've found an issue in the book please let me know: https://forums.manning.com/posts/list/41366.page |
14:34:30 | crem | I told one about confusing UTF-8 with Unicode. :) |
14:34:58 | FromGitter | <krux02> create an issue to Microsoft and tell them that newlines are accidentially encoded with two byets and that this conflicts with everything else in the world and that they should fix it. |
14:35:24 | dom96 | crem: Could you write about it in that forum thread? |
14:35:33 | crem | Sure, will do. |
14:36:12 | Araq | krux02: that's not how it works, I get the blame for everything that $SHITTY_OS does ;-) |
14:36:20 | Araq | "Nim does not detect OOM reliably" |
14:36:34 | Araq | "Nim's open happily opens directories" |
14:36:54 | euantor | > create an issue to Microsoft and tell them that newlines are accidentially encoded with two byets and that this conflicts with everything else in the world and that they should fix it. |
14:37:09 | crem | nim's open opens directories? Everywhere, or only on weird freeBSD and alike? |
14:37:15 | euantor | as if. There's so much shitty software that would break in spectacular ways if MS changed such a thing |
14:37:53 | FromGitter | <krux02> yea of course it would |
14:38:00 | Araq | crem, on Poonix, where else? |
14:38:23 | Araq | the OS known as "we don't need APIs we can copy bytes around instead" |
14:38:35 | crem | Maybe it was indeed on macos. |
14:38:45 | FromGitter | <krux02> but breaking things from the past is something Microsoft does all the time. And not just microsoft. |
14:38:46 | crem | Some of "other" UNIXes surely do. |
14:38:53 | crem | AIX or whatever. |
14:39:09 | Araq | it was on Linux and I'm pretty sure C's fopen still has the same bug. |
14:41:44 | FromGitter | <krux02> "General Data Protection Regulation" also breaks a lot of companies. But that doesn't mean it shouldn't be done. |
14:44:28 | euantor | Try telling enterprise customers that their software doesn't work anymore because MS have decided to change the new line character. it won't go down well, and they'll simply never "upgrade" to the new version that broke their stuff |
14:48:29 | miran | the time to change stuff like that? before v1.0 is out. (not just nim, generally) |
14:50:02 | * | kivyion quit (Read error: Connection reset by peer) |
14:57:53 | FromGitter | <krux02> euantor: Well yea Microsoft can simply sneak in upgrades when the user is inactive for a certain about of time (maybe because he started a rendering process and went home). Then the system is upgraded and can't be downgreaded. In case the user deconnects from the internet and tries to escape the inevitable update, they have to live without internet. Or chango to another operationg system where they have to support single |
14:57:53 | FromGitter | ... byte line endings anyway. |
14:58:25 | FromGitter | <krux02> euantor: In other words Mircosoft could simply change that. Piss off a lot of people, but nobody could really do anything about it. |
14:59:00 | arnetheduck | funny, the nim manual doesn't even describe this behavior: https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals |
14:59:09 | arnetheduck | it just says "newline" |
14:59:42 | livcd | can't wait to try nim on AIX :) |
15:00:06 | Araq | read on |
15:00:07 | Araq | "Character literals are enclosed in single quotes '' and can contain the same escape sequences as strings - with one exception: newline (\n) is not allowed as it may be wider than one character (often it is the pair CR/LF for example)." |
15:00:48 | livcd | i bet nim is the only one from the newer languages that will actually work on things like aix/hpux/solaris etc |
15:02:03 | Araq | or QNX? that one is a hard realtime OS |
15:03:09 | livcd | well do not see QNX anywhere here |
15:03:26 | livcd | we have 30k solaris instances, 15k aix instances and about 8k hpux instances |
15:03:49 | Araq | really? where is that? |
15:04:21 | livcd | large telco |
15:04:43 | * | Snircle_ joined #nim |
15:05:01 | livcd | if nim crashes this t5-8 super cluster i'll blame Araq from the internet |
15:05:11 | Araq | why not replace it with Linux? :P |
15:05:11 | * | Snircle quit (Ping timeout: 276 seconds) |
15:05:38 | livcd | they do |
15:05:49 | livcd | 50k linux instances |
15:05:59 | livcd | mixed openstack (ubuntu) with rhel+sles |
15:06:35 | FromGitter | <alehander42> reading the manual "--warning[NAME]:on|off " I tried 500 things until I see that [] does not mean a placeholder: you actually need to write '[' and ']' :D |
15:07:13 | livcd | everything is wired together with perl scripts |
15:07:17 | livcd | perl ain't going anywhere |
15:08:38 | Araq | it's Unix, C and Perl which make me believe in progress. |
15:09:32 | livcd | but it's really amazing that nim might probably work on aix :O |
15:10:24 | crem | nim working in aix is less surprising than nim working in dos. |
15:10:36 | * | Yardanico joined #nim |
15:11:46 | arnetheduck | ok, to set the record straight, C does not actually require \n to be a line feed specifically - it just has to be a single character |
15:14:53 | PMunch | arnetheduck, yeah but in C everything is just a recommendation :P |
15:16:51 | crem | In C++ standard, \n is said to be new-line. |
15:17:27 | crem | "conditionally-supported, with implementation-defined semantics. An escape sequence specifies a single character." |
15:19:47 | * | endragor quit (Remote host closed the connection) |
15:24:25 | Araq | here is a story to tell your children |
15:25:01 | Araq | https://github.com/nim-lang/Nim/blob/devel/lib/system/gc.nim#L315 |
15:25:26 | Araq | initGC is called for every thread local heap ... so every GC thinks it's the main thread :-( |
15:25:49 | Araq | took me hours to figure this one out, I'm such an idiot |
15:26:22 | Araq | ridiculous, I shouldn't be allowed to write GCs ... |
15:26:25 | Yardanico | what did this affect? |
15:26:49 | Araq | nothing I think. |
15:26:56 | Yardanico | well ok :) |
15:27:59 | Araq | and yeah, that one fixed it |
15:28:14 | Araq | now global root tracking is clean |
15:31:48 | Yardanico | 12 thousand commits coming :) |
15:33:15 | arnetheduck | https://github.com/nim-lang/Nim/issues/7089 |
15:34:21 | Araq | aww, not \p ? |
15:34:55 | Araq | I think these are not case sensitive so \N should do what \n does |
15:35:07 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
15:35:23 | * | Snircle joined #nim |
15:35:58 | crem | I like \N more. They are not case sensitive? I think in C they are. |
15:36:02 | crem | Or maybe they are not.. |
15:36:05 | crem | Hmmmm. |
15:36:40 | crem | \X surely is not, then why \x wouldn't be.. |
15:38:07 | arnetheduck | \U and \u are case sensitive in C++ at least, to denote different utf sizes |
15:38:13 | * | endragor joined #nim |
15:38:14 | crem | My quotation from the standard was wrong. "conditionally-supported, with implementation-defined semantics." was about non-standard escape sequences. |
15:38:42 | crem | \U and \u are not listed in standard (as of C++11) |
15:38:50 | Calinou | hi, what's the de-facto library for downloading files via HTTP in Nim? I see a libcurl binding, but it requires libcurl to be linked dynamically (may be a problem for Windows in my case) |
15:39:13 | arnetheduck | and .. x86-64 gcc 7.1 #1] warning: unknown escape sequence: '\X' |
15:39:36 | arnetheduck | http://en.cppreference.com/w/cpp/language/escape |
15:39:39 | * | UxerUospr joined #nim |
15:39:47 | crem | Yeah, it seems they are not case sensitive. |
15:39:54 | crem | \N is nice then. |
15:39:57 | euantor | Calinou: the httpclient should be able to do it: https://nim-lang.org/docs/httpclient.html |
15:40:04 | crem | But nim is case-insensitive language! |
15:40:08 | arnetheduck | https://godbolt.org/g/dygkwR |
15:40:14 | euantor | Specifically `downloadFile` |
15:40:23 | Calinou | euantor: thanks :) I'll still need libssl on Windows |
15:40:25 | Araq | er, if they are *not* case sensitive, then surely \N is Not fine? |
15:40:28 | Calinou | not sure if it can be linked statically |
15:40:49 | crem | Ah! I meant they are case sensitive. |
15:41:20 | * | Jesin joined #nim |
15:41:59 | arnetheduck | https://play.nim-lang.org?gist=b8b9dea06a02196595642e1bf446d700 |
15:42:32 | Calinou | (I could bundle libraries in a ZIP anyway, it's not a huge problem) |
15:42:44 | arnetheduck | nim accepts \N but the code highlighter on play does not ;) |
15:42:51 | Yardanico | Calinou, you can get openssl dlls from nim website |
15:42:57 | Calinou | yeah |
15:43:32 | * | endragor quit (Ping timeout: 276 seconds) |
15:49:41 | * | Jesin quit (Quit: Leaving) |
15:50:00 | Araq | ok, the GC just a tiny bit faster |
15:51:01 | * | zahary quit (Quit: Leaving.) |
15:51:22 | crem | Why would "hello\nworld" break on windows? On windows, the \n -> \n\r replacement is usually done in file output library. Does nim bypass standard library and goes directly to system calls? |
15:51:49 | Araq | kind of, we open every file as "binary" file |
15:51:57 | * | miran_ joined #nim |
15:52:07 | Araq | and we will replace the C IO libraries by native Nim ones eventually. |
15:52:38 | Araq | that Nim's IO doesn't distinguish between "text" and "binary" is a good feature, ymmv. |
15:53:16 | Araq | at least it's a feature that avoids bloat... |
15:58:53 | * | stevenfx joined #nim |
16:10:27 | * | Stevenfx_ joined #nim |
16:11:58 | dom96 | Please not \N |
16:14:09 | FromGitter | <krux02> \p for paragraph |
16:14:49 | * | stevenfx quit (Ping timeout: 256 seconds) |
16:15:16 | * | miran_ quit (Remote host closed the connection) |
16:16:17 | Yardanico | Araq, I like that it doesn't |
16:16:40 | * | miran_ joined #nim |
16:20:44 | * | miran_ quit (Client Quit) |
16:24:14 | FromGitter | <krux02> Araq: Is it bad that every GC thread thinks it is the main thread? |
16:24:57 | FromGitter | <krux02> Araq: Ok I think I was off in the chat, ignore it. It doesn't really matter |
16:28:43 | * | zahary joined #nim |
16:30:32 | * | gokr left #nim (#nim) |
16:32:01 | PMunch | Hmm, is there a way to get the strutils tokenizer to not combine the separators? |
16:34:44 | * | vivus joined #nim |
16:39:59 | vivus | Does this channel use a bot that bridges chat between IRC, gitter, discord and telegram? |
16:40:32 | crem | Several bots, I guess, but yes. |
16:41:14 | FromGitter | <data-man> @PMunch: Try pegs.split :-) |
16:41:28 | vivus | who is hosting these bots? |
16:43:26 | crem | Probably dom96. |
16:43:57 | dom96 | Nope |
16:44:02 | FromGitter | <Varriount> The bots host other bots |
16:44:03 | dom96 | FromGitter is hosted by oprypin |
16:44:12 | dom96 | GitDisc by Yardanico |
16:44:24 | FromGitter | <Varriount> Which in turn are hosted by more bots. |
16:44:49 | FromGitter | <Varriount> It's bots all the way down. :p |
16:46:04 | * | miran_ joined #nim |
16:47:03 | PMunch | Varriount, damn it you beat me to it :P |
16:47:38 | miran_ | hey PMunch, you're using manjaro iirc? |
16:52:37 | Yardanico | vivus, FromGitter (bot written in crystal) for gitter, GitDisc (bot written in Go - matterbridge), FromTwitch (used on #nim-offtopic when dom96 or araq streams - written in nim (it's very simple though)) |
16:52:38 | FromGitter | Yardanico, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
16:52:45 | Yardanico | I know that :P |
16:52:51 | PMunch | miran_, yup .) |
16:53:17 | Yardanico | miran_, I'm on arch if you need that (I was using antegros and manjaro before) |
16:53:19 | miran_ | any chance you're on 4.14 kernel and using nvidia drivers? :) |
16:53:35 | vivus | and the telegram bot? |
16:54:14 | Yardanico | vivus, there's none that I know of |
16:54:17 | miran_ | the newest nvidia driver and vscode are producing some ugly crashes! (and i deleted the previous version) |
16:54:19 | Yardanico | but matterbridge supports telegram |
16:54:22 | Yardanico | so I can just add that |
16:55:08 | Yardanico | in fact matterbridge supports almost every major chat platform |
16:55:11 | * | zahary quit (Quit: Leaving.) |
16:55:28 | dom96 | Let's not get crazy |
16:55:34 | Yardanico | :P |
16:55:48 | Yardanico | but having 3 bots for 3 chat platforms is not very good, is it ? :) |
16:56:37 | Yardanico | miran_, I am |
16:56:43 | PMunch | miran_, sorry.. I don't have an Nvidia card |
16:56:51 | Yardanico | miran_, 4.14.13 kernel and gtx 750 |
16:56:55 | dom96 | Also Telegram isn't really built for large chat rooms AFAIK |
16:58:21 | Yardanico | dom96, 50 thousand people maximum |
16:58:48 | miran_ | PMunch, Yardanico: i just managed to find some outdated repo with the previous version of the drivers. lets hope this will work.... |
16:58:55 | dom96 | okay, but traditionally it's not used for chat rooms like Slack/Gitter/Discord |
16:59:20 | FromGitter | <alehander42> is `with` removed or something :? |
16:59:22 | Yardanico | miran_, are you sure that's nvidia driver fault? |
16:59:22 | * | zahary joined #nim |
16:59:28 | Yardanico | alehander42: what "with" ? |
16:59:39 | Yardanico | ah, you mean keyword |
16:59:49 | Yardanico | yeah, it was removed because it hasn't been used |
16:59:55 | FromGitter | <alehander42> yeah I think it worked like A* = distinct int with +, - |
16:59:57 | FromGitter | <alehander42> ahhhhh |
17:00:05 | FromGitter | <alehander42> it seemed very useful for some cases |
17:00:10 | Yardanico | ah, this usage |
17:00:11 | miran_ | Yardanico: i'm not the only one experiencing the same symptoms |
17:00:15 | Yardanico | IDK about this one, maybe it works |
17:00:21 | miran_ | and it started since last update |
17:00:34 | Yardanico | miran_, that's unfortunate :/ |
17:00:46 | * | azur_kind joined #nim |
17:00:56 | dom96 | miran_: #archlinux? :) |
17:00:59 | Yardanico | dom96, no |
17:01:21 | Yardanico | you can't ask for help if you don't use archlinux, so even if you use arch-based distro - that doesn't count |
17:01:36 | Yardanico | other arch-based distros have some differences (manjaro has its own repos for example) |
17:01:38 | miran_ | Yardanico: the unfortunate thing is that i deleted previous version without realizing |
17:01:54 | miran_ | dom96: no, manjaro - user friendly arch :) |
17:02:10 | Yardanico | miran_, btw, I've used manjaro/antergos/and then installed arch linux |
17:02:10 | dom96 | miran_: #manjaro then? |
17:02:21 | Yardanico | since after installation there's almost no difference |
17:02:29 | Yardanico | (i mean there's none at all) |
17:02:40 | miran_ | dom96: that's quite dead. but i asked on manjaro forum.... |
17:03:00 | miran_ | and it seems this will be even more complicated than i thought.... |
17:03:22 | dom96 | miran_: they surely have a more active IRC channel on some other network or something |
17:03:38 | Yardanico | dom96, nothing more popular than manjaro forum |
17:04:00 | Yardanico | miran_, yes, downgrading packages is always harder with rolling distros |
17:04:14 | Yardanico | but the strange thing is that I don't have any problems here on arch (which should be more unstable than manjaro lol) |
17:04:23 | miran_ | Yardanico: the bonus problem here it that nvidia is dependand on kernel |
17:04:47 | Yardanico | miran_, not really |
17:04:52 | Yardanico | you can use dkms version |
17:04:56 | Yardanico | so it will build for your kernel |
17:05:23 | FromGitter | <mratsim> I’ve been using Arch for 8~9 years and it’s been really solid (except systemd, pulseaudio, and the removal of /var/run iirc) |
17:05:31 | miran_ | i didn't have any problems until now. i guess i won't use vs code until this gets patched in some future version.... :( |
17:05:36 | * | zahary quit (Quit: Leaving.) |
17:05:44 | Yardanico | mratsim: what's bad with systemd? it's easy to use for me |
17:05:48 | Yardanico | enable/start/stop services |
17:06:09 | FromGitter | <mratsim> the transition was difficult |
17:06:11 | Yardanico | ah |
17:06:26 | * | PMunch quit (Quit: Leaving) |
17:06:39 | FromGitter | <mratsim> I mean, instead of pacman -Su I add to do stuff manually |
17:06:57 | FromGitter | <mratsim> And I think at one point I had to but from a USB key because it dodn’t start |
17:07:02 | FromGitter | <mratsim> boot* |
17:07:13 | Yardanico | the only thing - I tried to use i3, but it feels very weird after using typical desktop environments and windows for all my life |
17:07:32 | Yardanico | maybe fullhd screen is too small for it? :P |
17:10:37 | * | floppydh quit (Quit: WeeChat 2.0.1) |
17:12:10 | FromGitter | <mratsim> Wow I need to build a website to showcase my portfolio but the web world is moving so fast. Right now I’m looking into Gatsby (static website compiler) + Contentful (Headless CMS) + Netlify (Hosting + Continuous Deployment) |
17:12:11 | miran_ | i'll try open source drivers. hopefully they won't resolve this issue while creating 3 others :D |
17:12:27 | Yardanico | miran_, they're much slower though |
17:12:35 | Yardanico | (especially for new graphic cards) |
17:12:41 | miran_ | gtx 660 |
17:13:39 | FromGitter | <mratsim> Nouveau should be fine, but you can probably find your old driver in mirrors that went out of sync. And I remember there is a Archlinux archive mirror that keeps older version of packages |
17:13:46 | FromGitter | <data-man> Arch Linux, GTX 1050. I win! :-) |
17:14:01 | FromGitter | <mratsim> Arch Linux GTX 1070, I win ;) |
17:14:12 | FromGitter | <data-man> lol |
17:14:19 | Yardanico | Arch Linux GTX 750, I lose ;) |
17:14:36 | miran_ | mratsim - i found it in out of sync mirrors, but even still downgrading wasn't working |
17:14:48 | Yardanico | I actually want to try nouveau, but I have GTX 750 with GM206 chip (the same as in GTX 950) |
17:14:58 | Yardanico | I don't know if nouveau will provide comparable performance to nvidia driver |
17:15:01 | miran_ | i'll rather put open source drivers and move on, than spend more time oh this |
17:15:16 | miran_ | my nerves are already thin from all these crashes |
17:15:33 | FromGitter | <mratsim> issue with nvidia is usually there is a custom libgl + mesa and xorg must be rollbacked and a bunch of other stuff |
17:15:57 | miran_ | i don't need any extra performance - just a desktop use (browsing, using vscode) + waching movies |
17:16:58 | miran_ | two hd screens |
17:22:03 | Yardanico | hmm, I'll try nouveau then |
17:23:05 | * | miran_ quit (Quit: Konversation terminated!) |
17:23:21 | shashlick | what's the state of the nim repl? I see there's 3 options (4 if you count the playground) |
17:23:31 | * | Trustable joined #nim |
17:25:04 | shashlick | nim secret, nrpl and tnim - is this a solved problem? https://github.com/nim-lang/Nim/wiki/GSoC-2016-Ideas |
17:25:16 | * | miran_ joined #nim |
17:26:37 | * | miran_ quit (Client Quit) |
17:27:10 | FromGitter | <mratsim> limbo state |
17:27:25 | FromGitter | <mratsim> aka “Here be dragons" |
17:27:59 | dom96 | Nope. The state hasn't changed |
17:29:08 | shashlick | I somehow feel a repl is overrated, it's fine to do super simple things but might as well have a mini-editor text box + compiler backend that makes it super simple to test code |
17:29:25 | vivus | dom96: telegram is used for large chatrooms. all the shitcoin crypto companies use it |
17:30:38 | dom96 | shashlick: It is in some ways. But having a proper REPL certainly wouldn't hurt adoption. |
17:30:59 | dom96 | It's pretty annoying that I still have to use Aporia for my quick experiments |
17:32:01 | shashlick | but quick experiments for an experienced nim dev. will definitely be 5-10+ lines of code - reproducing bugs, etc. |
17:32:24 | shashlick | using a repl isn't really that useful |
17:32:27 | * | Yardanico quit (Remote host closed the connection) |
17:32:28 | FromGitter | <data-man> telegram still collecting a phone numbers? |
17:33:02 | * | yglukhov quit (Remote host closed the connection) |
17:33:59 | shashlick | so what is lacking in tnim (more recent) or nrpl (3+ years old) |
17:35:14 | Araq | a REPL is very useful |
17:35:46 | Araq | if done properly |
17:39:16 | shashlick | in all my time using Python, I only used the repl to check if a module was installed, to get help on a module / function, typing out few lines to verify a few lines of code are correct. I rarely ever typed out a full function and called it |
17:39:40 | shashlick | so i'm kind of missing the use cases being considered as valuable |
17:40:02 | Araq | yeah but that's because of "who wants to program in the terminal?" |
17:40:10 | * | yglukhov joined #nim |
17:40:49 | Araq | imagine to develop the game and never having to restart the level you're designing |
17:41:23 | Araq | a REPL done right enables live coding |
17:41:35 | shashlick | okay so that is purely in the Nim VM territory |
17:42:00 | Araq | well it's more about hot code reloading I guess |
17:42:46 | * | Stevenfx_ quit (Remote host closed the connection) |
17:42:47 | Araq | which can be done with DLLs |
17:43:00 | Araq | https://github.com/nim-lang/Nim/issues/6886 |
17:43:04 | Araq | https://github.com/nim-lang/Nim/issues/6887 |
17:43:19 | Araq | these are blocking hot code reloading afaik |
17:43:23 | * | Stevenfx_ joined #nim |
17:43:27 | shashlick | cause even if we take the Python REPL, it's not really hot code reloading friendly - the interface itself is a pain as you mentioned |
17:43:44 | dom96 | that'd be nice for web frameworks too |
17:44:07 | dom96 | I have a slightly crazy and hacky idea of how one might get FFI support in the VM |
17:44:12 | dom96 | Might play around with that |
17:44:31 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:45:16 | * | Yardanico joined #nim |
17:45:37 | shashlick | so I totally appreciate the hot reloading capability but I fail to see the link with a REPL as it is traditionally defined |
17:52:14 | FromGitter | <data-man> REPL is simple with embedded TinyCC. Left "a little bit" to finish. |
17:58:36 | * | gokr joined #nim |
17:59:14 | * | azur_kind quit (Remote host closed the connection) |
17:59:15 | shashlick | that's why I'm asking what nim secret, nrpl or tnim are missing to check it off from the todo list |
17:59:44 | shashlick | i'm asking what's the definition of REPL that we want to achieve, what what remains to be achieved from these efforts |
18:00:59 | dom96 | nim secret with fast FFI support |
18:10:50 | FromGitter | <mratsim> no REPL means no go for data science research. Data scientists have been spoiled by Matlab, R studio and Jupyter |
18:11:34 | FromGitter | <alehander42> i think a jupiter kernel might for nim would be very cool too for data scientists |
18:11:58 | dom96 | a jupyter kernel already exists for NIm |
18:12:26 | FromGitter | <mratsim> heh, how come I didn’t hear about that :O |
18:12:27 | FromGitter | <alehander42> very cool, I should play with it |
18:12:32 | FromGitter | <alehander42> this one https://github.com/stisa/INim ? |
18:12:57 | * | yglukhov joined #nim |
18:13:14 | Yardanico | there's two of them |
18:13:42 | Yardanico | https://github.com/stisa/INim and https://github.com/stisa/jupyter-nim-kernel |
18:13:56 | Yardanico | but "NOTE: Context is NOT shared between blocks!! I'll try working on it when I have time." |
18:14:32 | Yardanico | well it's ok in INim thought |
18:14:35 | Yardanico | though* |
18:16:51 | * | Yardanico quit (Remote host closed the connection) |
18:17:35 | * | Stevenfx_ quit (Ping timeout: 248 seconds) |
18:17:45 | * | yglukhov quit (Ping timeout: 264 seconds) |
18:18:04 | * | Yardanico joined #nim |
18:28:36 | FromGitter | <alehander42> is there a good way to convert between seq[byte] and cstring |
18:28:50 | FromGitter | <alehander42> or just using seq[byte] is preferable in those cases |
18:41:28 | Araq | I know of no good way |
18:44:47 | dom96 | how did you end up with seq[byte]? |
18:52:21 | * | Yardanico quit (Remote host closed the connection) |
18:56:34 | * | chemist69 quit (Ping timeout: 256 seconds) |
19:01:45 | FromGitter | <Quelklef> How can I convert Table[A, B] to TableRef[A, B] ? |
19:03:38 | FromGitter | <Quelklef> Wait, does that even make sense? I'm not 100% with ref types |
19:07:11 | FromGitter | <Quelklef> Apparently ⏎ ⏎ ```var tr: TableRef[A, B] ⏎ new(tr) ⏎ tr[] = table``` ⏎ ⏎ does it. I think I need to read up on ref... [https://gitter.im/nim-lang/Nim?at=5a5cfbdf5a9ebe4f758de2db] |
19:10:25 | * | chemist69 joined #nim |
19:13:34 | * | Yardanico joined #nim |
19:18:10 | dom96 | Just create a TableRef in the first place |
19:18:14 | dom96 | Why do you need to convert it? |
19:18:25 | FromGitter | <Quelklef> I was refactoring something that I needed to be mutable |
19:18:33 | FromGitter | <Quelklef> so the constructors were of type Table |
19:18:47 | FromGitter | <Quelklef> turns out, that particular constructor was never used, so I was fine :P |
19:22:36 | * | yglukhov joined #nim |
19:23:38 | * | yglukhov quit (Read error: Connection reset by peer) |
19:24:10 | * | yglukhov joined #nim |
19:36:57 | * | PMunch joined #nim |
19:42:24 | * | Yardanico quit (Remote host closed the connection) |
19:42:43 | * | Yardanico joined #nim |
19:55:01 | * | MJCaley joined #nim |
19:59:59 | * | Trustable quit (Remote host closed the connection) |
20:01:12 | PMunch | Is there a shortcut to initialise a 2D seq in Nim? |
20:01:47 | FromGitter | <Quelklef> var s: seq[seq[A]] = @[] ...? |
20:02:17 | PMunch | Well I need to initialize the inner ones as well |
20:02:40 | PMunch | So currently I have http://ix.io/EaY |
20:02:52 | FromGitter | <Quelklef> ah |
20:03:01 | FromGitter | <Quelklef> I think there's newSeqWith or somth |
20:03:21 | FromGitter | <Quelklef> yeah try https://nim-lang.org/docs/sequtils.html#newSeqWith.t,int,untyped |
20:03:29 | PMunch | I'm porting a Java thing and it just does int[][] td = new int[i+1][j+1] |
20:04:05 | PMunch | Ooh nice |
20:04:09 | PMunch | Is that new? |
20:04:27 | FromGitter | <Quelklef> it's been there ever since I started Nim |
20:04:38 | FromGitter | <Quelklef> which, I'll admit, was not that long ago |
20:04:44 | FromGitter | <Quelklef> point being idk |
20:05:46 | PMunch | Huh, apparently added 2 years ago |
20:11:48 | PMunch | Not quite as clean as the new int[i+1][j+1] thing but better than nothing :) |
20:12:13 | FromGitter | <Quelklef> /shrug oh well |
20:13:46 | PMunch | How long have you been using Nim by the way? Haven't seen your nick around before |
20:17:08 | FromGitter | <Quelklef> not long |
20:17:12 | * | zahary joined #nim |
20:17:14 | FromGitter | <Quelklef> since probably around dec 15 |
20:17:22 | FromGitter | <Quelklef> because my nim project was started on dec 23 |
20:17:42 | PMunch | Ah right, how do you like it so far :) |
20:17:51 | FromGitter | <Quelklef> It's f***ing amazing |
20:18:24 | FromGitter | <Quelklef> Coming from Python/Java, I love how it's not as verbose as Java and how it's not incredibly unsafe like Python |
20:18:47 | FromGitter | <Quelklef> also I've always been interested in metaprogramming and, bam, templates! macros! screw your boilerplate! |
20:18:55 | * | zahary left #nim (#nim) |
20:19:26 | FromGitter | <Quelklef> Also user-defined operators are A+ |
20:20:17 | PMunch | I think you just listed all the things I like about Nim :P |
20:20:21 | FromGitter | <Quelklef> I think my favorite thing, though, is the type system |
20:20:36 | PMunch | But I come from a Java/C/Python background so I guess it makes sense |
20:20:39 | * | endragor joined #nim |
20:20:44 | FromGitter | <Quelklef> yeah |
20:20:47 | FromGitter | <Quelklef> we're being enlightened |
20:20:54 | PMunch | Haha |
20:21:11 | PMunch | But yeah, the type system is great as well |
20:21:27 | FromGitter | <Quelklef> I found out about Nim's algebraic data types and I just |
20:21:30 | FromGitter | <Quelklef> god bless |
20:22:00 | FromGitter | <Quelklef> the typeclasses are a little underpowered for how I'd like to use them but that's probably because I want to use them like interfaces |
20:23:01 | PMunch | Yeah, Nim is missing interfaces which I sometimes miss |
20:23:07 | PMunch | That and do..while loops.. |
20:23:29 | FromGitter | <Quelklef> macros tho |
20:23:34 | FromGitter | <Quelklef> can prolly write something that will allow |
20:23:59 | PMunch | Oh yeah, I have my trusty http://ix.io/Eb1 |
20:25:20 | * | endragor quit (Ping timeout: 255 seconds) |
20:25:38 | FromGitter | <Quelklef> yeah so it's kinda whatever |
20:25:58 | FromGitter | <Quelklef> alternatively, fork + pr the nim repo ;) |
20:29:19 | * | MJCaley quit (Quit: MJCaley) |
20:30:47 | PMunch | I don't think they want it in the repo :( |
20:32:03 | FromGitter | <Quelklef> it'd probably make parsing a royal pain because `do:` is already syntax |
20:32:33 | FromGitter | <Quelklef> could ask if a `dow:`/`while:` loop is ok to implement! |
20:33:00 | * | Ven`` joined #nim |
20:42:10 | * | yglukhov quit (Remote host closed the connection) |
20:44:11 | * | Yardanico quit (Quit: Leaving) |
20:49:18 | * | darithorn joined #nim |
20:50:38 | * | darithorn quit (Client Quit) |
21:00:29 | PMunch | Hmm, seems it's been a bit too long since I've used Java |
21:00:49 | PMunch | Can't for the life of me figure out how to build and run this: https://github.com/ijkilchenko/ZhangShasha |
21:03:08 | PMunch | Ah, never mind |
21:03:11 | PMunch | Figured it out |
21:07:04 | FromGitter | <Quelklef> good work |
21:12:57 | * | xkapastel joined #nim |
21:14:17 | PMunch | Nice, now I've got Zhang-Shasha tree edit distance in Nim :) |
21:15:39 | FromGitter | <Quelklef> but why |
21:15:48 | PMunch | Not really sure tbh |
21:15:58 | FromGitter | <Quelklef> lol |
21:16:10 | FromGitter | <Quelklef> well, maybe someone will make use of it |
21:17:18 | PMunch | I was thinking about writing a mod for Kerbal Space Program that added a "design cost" based on how dissimilar the current ship was to anything you had previously built. And it stores all crafts as a graph internally, so that's how I started looking at tree edit distance algorithms. |
21:18:08 | PMunch | Then I realized that there are very few implementations of these algorithms out there, so I decided to create one for Nim. |
21:18:24 | PMunch | Now I've got to do it over again in C# though if I want to create the mod :P |
21:18:39 | livcd | ~that sounds interesting |
21:18:39 | PMunch | Or find a way to get KSP to load a DLL written in Nim.. |
21:18:52 | PMunch | Which part? :P |
21:18:56 | livcd | all of it |
21:19:00 | PMunch | Haha |
21:19:18 | livcd | though i lack the brain capacity to even look at the algorithm implementation |
21:19:19 | livcd | zzz |
21:20:14 | PMunch | Haha, tbh I just copied it over from the Java implementation. I only have a slight idea on what it actually does |
21:20:45 | PMunch | Something about splitting the tree into subtrees and then calculating some matrices for these subtrees and finding the shortest path through those matrices |
21:23:07 | FromGitter | <Quelklef> "matrix magic" |
21:23:08 | Calinou | which data file format would you recommend in Nim (the one with the best implementation), JSON, YAML or TOML? |
21:23:11 | FromGitter | <Quelklef> it's how the world runs |
21:23:18 | Calinou | (any of these should work for my use case) |
21:23:58 | PMunch | Well the JSON implementation is pretty great. Haven't really tried any of the others though. But it really depends on your use-case |
21:24:17 | PMunch | If you want more easily written config files I'd say definitely go with TOML |
21:24:28 | Calinou | it's not a configuration file here, it's more of a manifest file |
21:24:31 | Calinou | (for updating stuff) |
21:24:35 | Calinou | so JSON is fine for this :) |
21:24:44 | Calinou | is JSON built-in, or do I need to install a Nimble package? |
21:24:56 | PMunch | Built in I think |
21:25:34 | Calinou | O_o DuckDuckGo returns instant answers about Nimble packages |
21:25:35 | Calinou | wow :P |
21:25:42 | Calinou | (I searched "nim json" and it did that automatically) |
21:26:57 | * | gokr quit (Quit: Leaving.) |
21:27:55 | flyx | Calinou: NimYAML can deserialise a YAML file automatically to native Nim types. if that'd help you, it may be preferable to JSON. |
21:31:39 | dom96 | json can do that too now |
21:33:03 | flyx | ah, did I miss some new features? |
21:33:28 | Araq | any ideas why travis is mocking me? |
21:33:40 | dom96 | possibly https://nim-lang.org/docs/json.html#to.m,JsonNode,typedesc |
21:33:43 | Araq | since yesterday the builds are failing, appveyor is green though |
21:34:43 | Araq | oh it's my GC test under Boehm |
21:34:45 | Araq | hmmm |
21:35:40 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:47:19 | * | UxerUospr quit (Quit: Lost terminal) |
21:47:44 | * | arthurz joined #nim |
21:48:25 | * | arthurz quit (Client Quit) |
21:57:23 | Calinou | flyx: it doesn't compile here :( (I'm on self-compiled Nim master branch) should I create an issue with the log? |
22:01:01 | PMunch | Are tags in nimble single-word? |
22:03:48 | Calinou | flyx: log is here: https://paste.ee/p/MbaeI |
22:04:06 | PMunch | https://github.com/nim-lang/packages/pull/643 |
22:04:08 | Calinou | Nim commit: git hash: bba6d624205fbfe695b146fb63c00a2854199ee8 |
22:04:35 | PMunch | Woop woop, now anyone can use the tree edit distance algorithm in Nim :) |
22:04:49 | PMunch | Maybe someone else can actually find a use for it :P |
22:05:20 | * | PMunch quit (Quit: leaving) |
22:18:33 | * | Vladar quit (Quit: Leaving) |
22:24:06 | * | Ven`` quit (Ping timeout: 265 seconds) |
22:26:41 | * | Ven`` joined #nim |
22:32:38 | * | sz0 joined #nim |
22:38:45 | * | Ven`` quit (Ping timeout: 264 seconds) |
22:39:09 | * | Ven`` joined #nim |
22:42:44 | * | yglukhov joined #nim |
22:45:21 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:47:31 | * | yglukhov quit (Ping timeout: 256 seconds) |
22:49:00 | * | marenz__ joined #nim |
23:04:02 | FromGitter | <honewatson> Hi Nim folks |
23:05:18 | * | vlad1777d joined #nim |
23:05:25 | FromGitter | <honewatson> @mratsim I just wanted to say I think Arraymancer is such a great name |
23:16:14 | FromGitter | <mratsim> Hi honewatson, thanks! |
23:17:35 | FromGitter | <mratsim> Still too hard for French though and since I will have to showcase my projects to find freelance work, I need a marketable name here :/ |
23:21:17 | Araq | arraymanceur? |
23:21:28 | FromGitter | <mratsim> lol |
23:21:51 | FromGitter | <mratsim> nice try ;) |
23:22:33 | Araq | Je parle aussi français |
23:28:58 | FromGitter | <mratsim> Ich spreche auch Deutsch ;) |
23:30:16 | * | arnetheduck quit (Ping timeout: 256 seconds) |
23:30:22 | FromGitter | <mratsim> aber es war viele Jahre seit ich gelernt habe. Es ist schwierig um Deutsch zu erinnern |
23:36:43 | * | wastedone_ quit (Quit: wastedone_) |
23:39:15 | * | CcxWrk quit (Ping timeout: 260 seconds) |
23:40:12 | FromGitter | <Quelklef> @Varriount NimLine is giving me lots of "not GC-Safe" warnings, but the command line Nim compiler isn't. Is this a problem on my end, or yours? |
23:43:27 | * | CcxWrk joined #nim |