00:10:32 | * | arnetheduck joined #nim |
00:35:12 | * | rauss joined #nim |
00:55:17 | * | demi- quit (Ping timeout: 252 seconds) |
00:55:36 | * | demi- joined #nim |
01:02:06 | * | sdw joined #nim |
01:22:54 | * | vlad1777d quit (Remote host closed the connection) |
01:25:37 | * | zachcarter_ joined #nim |
01:40:38 | * | zachcarter joined #nim |
01:42:18 | * | zachcarter_ quit (Ping timeout: 258 seconds) |
01:44:33 | * | zachcarter_ joined #nim |
01:44:54 | * | zachcarter quit (Ping timeout: 240 seconds) |
01:44:54 | * | zachcarter_ is now known as zachcarter |
01:46:50 | * | Jesin quit (Quit: Leaving) |
01:50:16 | * | zachcarter_ joined #nim |
01:50:17 | * | chemist69 quit (Ping timeout: 252 seconds) |
01:51:36 | * | zachcarter quit (Ping timeout: 260 seconds) |
01:51:37 | * | zachcarter_ is now known as zachcarter |
01:52:35 | * | tigerfinch quit (Ping timeout: 255 seconds) |
02:04:12 | * | chemist69 joined #nim |
02:10:18 | * | tigerfinch joined #nim |
02:16:07 | * | tigerfinch quit (Ping timeout: 240 seconds) |
02:16:56 | * | zachcarter quit (Quit: zachcarter) |
02:21:24 | * | tigerfinch joined #nim |
02:24:32 | tigerfinch | Hey everyone! I was wondering if anyone can tell me - is there a way to pass a varargs of procedural types to a proc? |
02:25:34 | FromGitter | <Varriount> tigerfinch: Yes. You just need to make sure the procedures have the same calling convention. |
02:30:11 | tigerfinch | FromGitter: Hmm - so I hoped that was the case! I have an example which I can't get to work - mind seeing if anything jumps out at you? I had a proc working *without* the varargs, so I thought I had the calling convention sorted, but in the varargs case it's complaining.... https://gist.github.com/anthonyfinch/48e7bddae9408f651fdf58a9d5003872 |
02:30:12 | FromGitter | tigerfinch, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
02:31:53 | FromGitter | <anthonyfinch> Hi - this was me^ came here for convenience :) |
02:32:03 | FromGitter | <anthonyfinch> the compiler error is below the fold on that gist |
02:34:58 | * | Jesin joined #nim |
02:46:08 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:47:25 | FromGitter | <anthonyfinch> It seems to just be the proc annotations that are differing? |
02:50:50 | * | chemist69 joined #nim |
02:53:24 | FromGitter | <Varriount> @anthonyfinch Sorry, was working |
02:53:43 | FromGitter | <anthonyfinch> That's quite alright :D |
02:54:13 | * | tigerfinch left #nim (#nim) |
02:58:31 | FromGitter | <Varriount> @anthonyfinch I can't get it to work at the moment. I have my hands full with something else. |
03:03:51 | * | Calinou quit (Remote host closed the connection) |
03:06:16 | FromGitter | <anthonyfinch> That's ok! |
03:12:55 | FromGitter | <Varriount> @anthonyfinch I know it should work, and it's probably some small type incompatibility. |
03:13:13 | * | chemist69 quit (Ping timeout: 260 seconds) |
03:24:45 | FromGitter | <anthonyfinch> @Varriount thanks - well I'm glad to know it should be possible :) I'll keep fiddling with the types or maybe someone else will have a suggestion |
03:39:31 | * | rauss quit (Quit: WeeChat 1.7) |
03:40:27 | * | chemist69 joined #nim |
04:33:20 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:03:30 | * | kier joined #nim |
06:02:54 | adeohluwa | favourite parts of the new website https://nim-lang.org/features.html, featured frameworks, learn nim today description... |
06:03:43 | adeohluwa | great work, messages are clearer & more visual |
06:07:32 | bbl__ | New website on mobile +1 |
06:15:41 | * | gangstacat quit (Quit: Ĝis!) |
06:19:26 | * | yglukhov joined #nim |
06:21:57 | * | gangstacat joined #nim |
06:24:01 | * | yglukhov quit (Ping timeout: 260 seconds) |
06:45:55 | * | nsf joined #nim |
07:00:39 | FromGitter | <TiberiumPY> Yay new website |
07:00:40 | FromGitter | <TiberiumPY> Cool |
07:00:45 | FromGitter | <TiberiumPY> Works good on mobile |
07:00:52 | FromGitter | <TiberiumPY> Chrome + android |
07:02:53 | ftsf | much nicer! |
07:03:13 | * | gokr joined #nim |
07:12:38 | * | TheLemonMan joined #nim |
07:20:35 | * | xet7 joined #nim |
07:31:08 | * | Andris_zbx joined #nim |
07:41:44 | * | Arrrr joined #nim |
07:41:44 | * | Arrrr quit (Changing host) |
07:41:44 | * | Arrrr joined #nim |
07:44:36 | FromGitter | <andreaferretti> I think the old website had a list of external blog posts that I cannot find anymore |
07:44:54 | FromGitter | <andreaferretti> Moreover, I think the first thing to mention in documentation should be the tutorial |
07:45:17 | FromGitter | <andreaferretti> Which is not linked anywhere as far as I can tell |
07:45:46 | FromGitter | <andreaferretti> Finally, I think that in community section, there should be a place for http://nimble-explorer.com/ and https://glot.io/new/nim |
07:46:02 | FromGitter | <andreaferretti> Other than these comments: great! |
07:46:06 | Araq | all very good points :-) |
07:46:21 | FromGitter | <andreaferretti> I am really happy to see a revamped website :-) |
07:48:27 | ftsf | hmm you're also using https (good) but loading gravatars over http which results in secure fail on chrome |
07:49:19 | Arrrr | Speaking of which, https://nim-lang.org/docs/lib.html always freezes my browser because of the nimble packages retrieving, but i never use them. |
07:53:10 | Arrrr | Mmm glot.io is finally using nim 0.16 |
08:01:52 | * | yglukhov joined #nim |
08:02:32 | euantor | ftsf: If you're talking about on the forum, that's been patched but obviously the old version is still running: https://github.com/nim-lang/nimforum/commit/720f38b3d45064cd8b0fd5e1e6cf6295ce600709 |
08:03:00 | euantor | I echo the sentiments of everybody else: The new website does look great, it's a vast improvement - great work to all those involved! |
08:04:21 | euantor | A minor nitpick is that on this page in the very first code sample I'd add a blank line between the improt and type declaration: https://nim-lang.org/features.html |
08:06:10 | * | Arrrr quit (Ping timeout: 255 seconds) |
08:09:13 | * | Matthias247 joined #nim |
08:10:22 | ftsf | euantor, no, the main site |
08:11:30 | euantor | Ah, should be an easy patch then. I'll try to submit a PR this morning for that |
08:18:37 | euantor | PR created |
08:20:35 | * | bjz joined #nim |
08:37:50 | gokr | Araq: For some odd reason I now don't remember I started peeking at the hash function for string. It seems to be Jenkins one-at-a-time. |
08:38:29 | gokr | And... AFAICT there have been some new algorithms since then, found this blog article that was interesting to read: http://blog.reverberate.org/2012/01/state-of-hash-functions-2012.html |
08:43:53 | Araq | gokr: I know, thanks. if I touch hash tables again, I'll likely also copy Python's dict implementation that keeps insertion order. |
08:44:41 | gokr | oki |
08:44:48 | Araq | I now consider this arbitrary iteration order a thing of the "dark ages of computing" ;-) |
08:46:23 | * | Calinou joined #nim |
08:46:36 | gokr | Also interesting link, scroll down to table: https://github.com/markokr/pghashlib |
08:49:50 | Calinou | hmm, I see the new site has been deployed, nice |
08:50:27 | ftsf | one thing for the site that would be good, more examples on the front page! |
08:50:40 | ftsf | maybe just a button to show another random example |
08:50:45 | Calinou | there could be a carousel for the examples on the frontpage, but that requires JavaScript |
08:50:52 | Calinou | (CSS-only carousels do exist, but you can't interact with them at all) |
08:52:21 | ftsf | very anti js? |
08:52:48 | ftsf | i think it's fine as long as it's not required |
08:54:36 | Calinou | ftsf: yeah, if we fallback gracefully it should be possible |
08:54:47 | Calinou | the problem is that fallbacks can sometimes cause issues to users that do enable JavaScript |
08:54:56 | Calinou | mostly because the browser thinks you have JavaScript off during loading |
08:55:04 | Calinou | so it flickers in and out |
08:55:26 | FromGitter | <Bennyelg> WordCount program banchmark for file size = 736K ⏎ Python: 0.1 seconds. ⏎ Nim: 16 seconds :/ |
08:56:16 | ftsf | -d:release ? |
08:56:53 | FromGitter | <Bennyelg> Never tried -d:release |
08:56:56 | FromGitter | <Bennyelg> what is this mean |
08:57:10 | ftsf | you use that when you want a release build instead of a debug build |
08:57:26 | ftsf | for benchmarking/performance you'd want to use a release build |
08:57:49 | zielmicha_ | e.g. compile with "nim c -d:release wordcount.nim" |
08:57:51 | FromGitter | <Bennyelg> still 15 seconds |
08:57:55 | FromGitter | <Bennyelg> aa |
08:57:56 | FromGitter | <Bennyelg> ok |
08:59:08 | FromGitter | <Bennyelg> 3 seconds now |
08:59:15 | FromGitter | <Bennyelg> but still Donnu how it's possible |
08:59:30 | FromGitter | <andreaferretti> maybe post it here |
08:59:38 | FromGitter | <Bennyelg> Im pretty sure My code is shitty |
08:59:47 | ftsf | in a gist or something ;) |
08:59:47 | FromGitter | <Bennyelg> but I thought I will break it at the first round. |
09:00:02 | FromGitter | <andreaferretti> or just in gitter |
09:02:57 | FromGitter | <Bennyelg> no need.~ python code ⏎ Alert shitty code head. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58f727c33e27cac331a1b702] |
09:03:53 | FromGitter | <andreaferretti> and the nin one? |
09:07:42 | FromGitter | <Bennyelg> just a sec |
09:09:10 | FromGitter | <Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58f729398fcce56b20170080] |
09:09:39 | FromGitter | <Bennyelg> the implementation is bad |
09:09:43 | FromGitter | <Bennyelg> but take a look |
09:10:06 | ftsf | supposed to return a count of each word in the document? |
09:12:16 | ldlework | woot https://www.youtube.com/watch?v=09BQklZnXKI |
09:12:56 | FromGitter | <andreaferretti> why is the Nim implementation so much more complex than the python one? |
09:13:05 | FromGitter | <andreaferretti> they don't seem very comparable |
09:13:22 | FromGitter | <andreaferretti> for instance, you are calling sort in a while loop |
09:13:43 | FromGitter | <andreaferretti> and deleting from the table each time, which is O(n) |
09:14:37 | FromGitter | <andreaferretti> I think the simplest thing would be to just accumulate counts in a table in the most straightforward way |
09:14:49 | FromGitter | <andreaferretti> and finally create an ordered table out of it |
09:15:21 | * | byte512 quit (Ping timeout: 260 seconds) |
09:22:12 | ftsf | there's also CountTable, not sure how useful that is |
09:23:42 | FromGitter | <andreaferretti> also, read the file line by line instead of a single string |
09:27:31 | Calinou | dom96: on the website, https://nim-lang.org/assets/img/nim_in_action_cover.png should be reduced in size, it's huge, it's 1.5 MB |
09:35:33 | * | krux02 joined #nim |
09:35:57 | * | Vladar joined #nim |
09:37:14 | * | krux02 quit (Remote host closed the connection) |
09:44:59 | euantor | Calinou: Regarding carousels in pure CSS< have you seen this? https://picturepan2.github.io/spectre/experimentals.html#carousels |
09:45:17 | * | byte512 joined #nim |
09:45:20 | euantor | It is pure CSS and has interaction, but IDK if it works with anything other than pictures |
09:45:31 | Calinou | euantor: yeah, it might not work on non-image content |
09:45:32 | * | bjz quit (Ping timeout: 240 seconds) |
09:45:36 | Calinou | also, I'd like touch events to work (for mobile) |
09:45:44 | Calinou | this one seems to work only by clicking buttons at the bottom |
09:45:50 | Calinou | (touch events can be good on desktop too) |
09:45:52 | euantor | Ah, I haven't tried that on mobile |
09:45:53 | * | bjz_ joined #nim |
09:46:02 | euantor | It does have arrows at the sides that work |
09:47:05 | Calinou | accessibility is often a concern with CSS-only things, too |
09:49:21 | * | krux02 joined #nim |
09:50:50 | * | krux02 quit (Remote host closed the connection) |
09:51:02 | * | krux02 joined #nim |
09:51:09 | * | krux02 quit (Remote host closed the connection) |
09:51:22 | * | krux02 joined #nim |
09:52:44 | * | krux02 quit (Remote host closed the connection) |
09:52:55 | * | krux02 joined #nim |
09:53:11 | * | krux02 quit (Remote host closed the connection) |
09:53:22 | * | krux02 joined #nim |
10:17:43 | sdw | link to sponsor "Xored Software, Inc" is broken on the website |
10:28:44 | * | Vladar quit (Quit: Leaving) |
10:50:01 | * | zachcarter joined #nim |
10:52:05 | FromGitter | <Bennyelg> @andreaferretti how do you read linebyline its not what I do now? |
11:02:25 | * | Snircle joined #nim |
11:05:28 | zachcarter | new website is awesome dom96 / araq |
11:05:51 | Calinou | zachcarter: I made the design too :P |
11:05:58 | zachcarter | ooo Calinou: great job! |
11:06:02 | zachcarter | very clean |
11:06:19 | ftsf | \o/ |
11:06:25 | zachcarter | the featured projects section was a nice surprise last night too :P |
11:07:40 | FromGitter | <Bennyelg> ```code paste, see link``` ⏎ ⏎ bad? [https://gitter.im/nim-lang/Nim?at=58f744ffa0e48562421b8643] |
11:07:58 | Calinou | I just tried the Snake game in features page :P |
11:20:02 | * | zachcarter quit (Read error: Connection reset by peer) |
11:20:21 | * | zachcarter joined #nim |
11:21:48 | FromGitter | <stisa> @Bennyelg define bad? You are still reading the file all at once with readFile, but you are not considering the time it takes to do so. Outputs 0.198 on a 6.2MB file for me |
11:24:12 | FromGitter | <Bennyelg> wow thats far worse for me. (1.7sec) |
11:24:22 | FromGitter | <Bennyelg> how do I read "stream" way line by line |
11:26:03 | FromGitter | <stisa> @Bennyelg I think it's https://nim-lang.org/docs/streams.html#newFileStream,string,FileMode and then use ``myfilestream.readLine`` |
11:26:15 | * | Arrrr joined #nim |
11:26:15 | * | Arrrr quit (Changing host) |
11:26:15 | * | Arrrr joined #nim |
11:27:14 | Arrrr | I guess iterators cannot yield static values |
11:28:09 | krux02 | I think they can yield whatever you want |
11:28:32 | krux02 | imho static values are just not there anymore at runtime |
11:28:39 | krux02 | so you should assign them to constants |
11:28:56 | Arrrr | I did that, yet https://glot.io/snippets/ep2zkzeglv |
11:30:42 | krux02 | I don't even know what you mean to return a static value |
11:31:27 | krux02 | just remove the static around the return value, and it should work |
11:32:20 | krux02 | http://ix.io/r85 |
11:32:21 | Arrrr | It complains about not being able to evaluate b at compile time |
11:32:49 | krux02 | it doesn't really make sense to have one return value as static and the other not not static |
11:33:15 | Arrrr | It makes if the iterator yields values from more than one source, for example |
11:34:20 | krux02 | I disagree |
11:34:44 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:35:04 | krux02 | either you have ass sources known at compile time, then you can execute the iterator at compile time, or you don't but then it just iterates at runtime |
11:35:31 | Arrrr | You have two seqs which requires similar operations, but in one of the two you need a different thing |
11:35:58 | krux02 | well I don't get your problem |
11:37:35 | krux02 | you cannot say, haft of a function get's evaluated at compile time, the other one at runtime |
11:37:50 | krux02 | you can split the iterator in two iterators |
11:38:10 | krux02 | one only returs you the static value and the other one returns the runtime value |
11:38:17 | Arrrr | consider procs where an arg can be of type int | string for example. To the int you want to transform it to string and reuse the rest of the proc. But in practice two procs are generated |
11:38:35 | krux02 | then you can execute the iterater that returns the static value at compile time, you just don't call it static |
11:38:44 | Arrrr | That's right, the point would be that i don't have to duplicate the iterator. |
11:39:35 | * | zachcarter quit (Quit: zachcarter) |
11:39:38 | krux02 | well I guess you have to |
11:40:17 | Arrrr | That's seems to be the case. And i guess nim would not know how to duplicate it. |
11:40:56 | krux02 | well for your example you could also consider converter procs |
11:41:06 | krux02 | then the arguments gats converted before it is applied to the function |
11:41:29 | krux02 | it wouldn't recomment to write a converter int->string |
11:41:57 | krux02 | but when you have other non standard types, it might me a good choice |
11:44:27 | Arrrr | Yes, and probably it is right that this is not the best way to handle the issue. I'll think about it. |
11:50:48 | FromGitter | <Bennyelg> @stisa The same result: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58f74f1bf22385553d566cba] |
11:56:00 | FromGitter | <stisa> mmh, I tried running your python version but I get an error, what difference in time do you get? |
11:56:33 | * | nsf quit (Quit: WeeChat 1.7) |
11:56:49 | FromGitter | <Bennyelg> 1) 5 seconds |
11:59:35 | FromGitter | <stisa> Looking at python code, why are you calling time after calling wordcount? Wouldn't that only count the time needed to create the OrderedDict? |
12:01:15 | chemist69 | Bennyelg: BTW, looping over a file line by line in Nim is just: `for line in "filename".lines:` It doesn't get any simpler. |
12:06:42 | FromGitter | <mratsim> There is no “count words in a file” task on Rosetta Code |
12:06:48 | FromGitter | <mratsim> :/ |
12:08:41 | FromGitter | <Bennyelg> @silvio correct i CHANGED IT |
12:09:03 | FromGitter | <Bennyelg> @stisa still it takes 0.221739053726 sec |
12:09:10 | FromGitter | <Bennyelg> nim version 1.7 seconds |
12:11:58 | euantor | Bennyelg: what is it you're trying to achieve? Count the number of words in a file? |
12:13:07 | FromGitter | <mratsim> benchmark that I think and comparing Nim vs Python |
12:14:00 | FromGitter | <andreaferretti> @Bennyelg https://nim-lang.org/docs/system.html#lines.i,string |
12:14:46 | FromGitter | <stisa> ```code paste, see link``` ⏎ ⏎ This gives me 0.23 in nim, 0.233 in python [https://gitter.im/nim-lang/Nim?at=58f754b9bdf4acc11273ec96] |
12:16:48 | FromGitter | <andreaferretti> I think it could be even faster by using a normal table |
12:16:58 | FromGitter | <andreaferretti> and then copying the result into an ordered table at the end |
12:17:19 | chemist69 | I guess the use of `re` made the original version slow. |
12:17:47 | euantor | yes, and creating a new regex every loop iteration would hurt too |
12:17:50 | FromGitter | <mratsim> I would just use `wc` :P |
12:18:08 | * | PMunch joined #nim |
12:22:10 | ftsf | maybe CountTable and sort? |
12:22:34 | ftsf | might not be faster but that's what it's designed for by the looks of it |
12:28:09 | FromGitter | <Bennyelg> Great now Its 100% more faster than python according to my test |
12:30:29 | krux02 | more faster? |
12:30:49 | FromGitter | <Bennyelg> ya |
12:31:11 | krux02 | how about "it needs now 50% of the time" |
12:31:19 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:33:11 | krux02 | when you compare word counting, you should compare it to `wc' too |
12:33:38 | ftsf | krux02, this is counting the number of times a word appears |
12:33:47 | ftsf | wc counts number of words |
12:34:12 | krux02 | ok |
12:34:12 | ftsf | or can wc can do that too? |
12:34:31 | * | bjz joined #nim |
12:35:15 | krux02 | no |
12:52:21 | FromGitter | <stisa> anyone tried building the forum recently? I get an error ```utils.nim(108, 144) template/generic instantiation from here ⏎ utils.nim(113, 28) Error: type mismatch: got (string, Port) ⏎ but expected one of: ⏎ proc newAsyncSmtp(useSsl = false; debug = false; sslContext = defaultSslContext): AsyncSmtp``` [https://gitter.im/nim-lang/Nim?at=58f75d88bdf4acc11274162d] |
12:56:47 | euantor | Haven't since March, no. WHich version of Nim are you on? |
12:57:38 | FromGitter | <stisa> built today from devel |
12:58:14 | FromGitter | <stisa> oh SMTP changed, you have to pass adress and port to `connect` rather than `newAsyncSmtp` |
13:07:49 | euantor | Oh, yeah that would do it |
13:10:00 | * | Matthias247 joined #nim |
13:12:35 | * | vlad1777d joined #nim |
13:16:23 | * | krux02- joined #nim |
13:16:23 | * | krux02 quit (Disconnected by services) |
13:16:26 | * | krux02- is now known as krux02 |
13:16:38 | * | krux02 quit (Disconnected by services) |
13:16:38 | * | krux02- joined #nim |
13:16:41 | * | krux02- is now known as krux02 |
13:16:41 | * | krux02 is now known as 18WAAS0DX |
13:16:47 | * | krux02 joined #nim |
13:20:23 | * | krux02 quit (Remote host closed the connection) |
13:33:41 | * | chemist69 quit (Ping timeout: 255 seconds) |
13:38:14 | * | chemist69 joined #nim |
13:46:21 | arnetheduck | Araq, any thoughts on https://github.com/nim-lang/Nim/pull/5698? |
13:48:38 | Araq | I'm not a fan of reproducing C's include file partitioning |
13:50:20 | Araq | posix is really not that big and the interesting stuff is missing or broken |
13:51:09 | yglukhov | Araq: what do you whink of adding min/max functions for uints? |
13:51:46 | Araq | add back min/max for generic T it was only my intention to disallow min(singleElement), max(singleElement) |
13:52:14 | * | ftsf quit (Quit: Leaving) |
13:52:20 | yglukhov | like so: min/max[T](a, b: T): T |
13:52:21 | yglukhov | ? |
13:52:34 | * | ftsf joined #nim |
13:54:06 | arnetheduck | it's not so much about posix as about offering the full c library.. posix comes out as crippled - it's too little because many things are system-specific and differ between platform (you can see that in posix itself where some parts are already in separate files, like termios, epoll), and too much, because something like windows supports large parts of the c standard (string.h with memcpy and friends etc) but calling that posix is.. confusing |
13:55:30 | arnetheduck | so what happens instead is that the lib spreads out those wrappers with subtle differences, like the one I just fixed where there time() is imported both with int and cint return types |
13:55:42 | yglukhov | Araq: why are min/max procs magic? |
14:00:29 | * | gokr quit (Ping timeout: 260 seconds) |
14:02:12 | * | yglukhov quit (Remote host closed the connection) |
14:03:09 | * | yglukhov joined #nim |
14:04:10 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:12:08 | * | yglukhov quit (Remote host closed the connection) |
14:24:14 | * | Tiberium joined #nim |
14:24:29 | * | yglukhov joined #nim |
14:27:24 | * | yglukhov quit (Remote host closed the connection) |
14:32:31 | Araq | yglukhov: yes |
14:37:05 | * | joshbapt1 quit (Ping timeout: 240 seconds) |
14:38:43 | * | joshbapt1 joined #nim |
14:42:53 | FromGitter | <grumblygibson> I'm guessing there were emails or forum posts at some point about deactivating users and I missed them. Any chance I could get my acct reactivated, or do I have to make a new username? user:grumbly |
14:43:24 | FromGitter | <grumblygibson> In other news, the new site looks great! Only thing I found I was looking for pretending to be a new user was the github link somewhere on the first screen/box. |
14:43:44 | * | yglukhov joined #nim |
14:43:47 | * | yglukhov quit (Remote host closed the connection) |
14:44:34 | * | yglukhov joined #nim |
14:44:37 | * | yglukhov quit (Remote host closed the connection) |
14:44:54 | * | yglukhov joined #nim |
14:44:54 | * | yglukhov quit (Remote host closed the connection) |
14:47:33 | * | nsf joined #nim |
14:48:07 | * | yglukhov joined #nim |
14:51:22 | * | yglukhov quit (Remote host closed the connection) |
14:51:37 | * | chemist69 quit (Ping timeout: 255 seconds) |
14:59:14 | * | yglukhov joined #nim |
15:01:49 | Tiberium | oh, new website looks very good :) |
15:03:35 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:13:26 | * | Jesin quit (Quit: Leaving) |
15:17:31 | * | Jesin joined #nim |
15:30:45 | PMunch | Tiberium, yeah it looks real good |
15:31:49 | * | chemist69 joined #nim |
15:36:10 | Tiberium | I hope forum will get new design too |
15:36:29 | 18WAAS0DX | forum notifications would be enough for me |
15:36:34 | Tiberium | because if you go to https://forum.nim-lang.org/ half of the links are broken |
15:36:41 | Tiberium | and designs are different :) |
15:40:51 | PMunch | Hmm, is the "Game Framework" text also split over two lines for you? |
15:41:37 | FromGitter | <grumblygibson> PMunch, the text is split for me too. |
15:42:53 | Tiberium | on what page? |
15:43:51 | FromGitter | <grumblygibson> Front page, featured projects. |
15:45:51 | Tiberium | for me it's on one line |
15:45:56 | Tiberium | Chrome + linux |
15:46:00 | dom96 | Yeah, CSS is annoying :) |
15:46:09 | dom96 | Thank you all for the nice comments :D |
15:46:26 | PMunch | Tiberium, Vivaldi + linux here. Probably a screen size thing |
15:46:31 | dom96 | grumblygibson: we don't deactivate users, maybe you deactivated yourself? |
15:46:37 | PMunch | dom96, CSS can be such a pain :P |
15:46:37 | Tiberium | i have 1366x768 on my main screen |
15:47:01 | Tiberium | but luckily I'll get a new display on friday |
15:47:06 | FromGitter | <mratsim> Oh vivaldi, I tried it, especially for the tabs on the left. But in the end I switched back to Opera |
15:47:17 | Tiberium | basically vivaldi is still webkit |
15:47:19 | dom96 | grumblygibson: I activated you in any case. |
15:47:21 | PMunch | Wow, that's a small screen Tiberium |
15:47:30 | Tiberium | PMunch, yeah |
15:47:39 | FromGitter | <grumblygibson> @dom96 Yay! Thank you. Not sure how I would have deactivated myself. |
15:47:42 | Tiberium | dom96, also, Mixed Content: The page at 'https://nim-lang.org/' was loaded over HTTPS, but requested an insecure image 'http://www.gravatar.com/avatar/6275fdd7f48ec9184c5d6511d525c563?s=100&d=identicon'. This content should also be served over HTTPS. |
15:47:44 | dom96 | and yeah, it seems that a lot of issues happen on larger screens. |
15:47:49 | PMunch | mratsim, I used to use Opera. But nowadays it's basically a reskin of Chrome.. |
15:47:51 | dom96 | Tiberium: Already fixed in a PR |
15:47:54 | Tiberium | ok :) |
15:47:55 | dom96 | Which I will get to soon |
15:47:57 | dom96 | for now bbl |
15:48:14 | PMunch | Mine isn't all that big 1680x1050.. |
15:49:07 | FromGitter | <mratsim> Btw, with so much people working on games in Nim, it may be time to bring Nim support to Codingame (a website with gaming challenges between 2 people) https://www.codingame.com/start |
15:49:37 | Tiberium | dom96, also, you can look at https://developers.google.com/speed/pagespeed/insights/?hl=ru&url=https%3A%2F%2Fnim-lang.org |
15:49:48 | Tiberium | mratsim: they emailed to dom96 |
15:49:57 | Tiberium | but he didn't got any reply to his email |
15:50:04 | FromGitter | <mratsim> oh really? interesting |
15:50:14 | Tiberium | dom96, sorry, https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fnim-lang.org |
15:50:37 | * | gokr joined #nim |
15:51:47 | PMunch | dom96, to fix that one specific thing you can do "white-space: nowrap;" in the CSS |
15:52:13 | FromGitter | <mratsim> CSS is harder than every other programming language >_> |
15:52:36 | PMunch | The problem is that it isn't very standardised |
15:52:56 | PMunch | So all your CSS becomes more of a suggestion than a rule :P |
16:02:08 | * | arnetheduck quit (Ping timeout: 240 seconds) |
16:08:40 | * | rokups joined #nim |
16:09:06 | FromGitter | <mratsim> The precendence rules are incomprehensible as well. If you use a framework like Bootstrap you spend your time fighting it … |
16:13:39 | 18WAAS0DX | I have a weird bug |
16:16:50 | FromGitter | <mratsim> I find the names sort (inplace) - sorted (copy), reverse (inplace) - reversed (copy) in the `algorithm`module unintuitive. Not sur how to improve that though |
16:17:26 | 18WAAS0DX | I have a horrible bug |
16:17:35 | 18WAAS0DX | I return a tuple with size and align |
16:17:54 | 18WAAS0DX | I check if size and align have the correct value |
16:17:57 | 18WAAS0DX | they do |
16:18:01 | 18WAAS0DX | then I return |
16:18:12 | 18WAAS0DX | and from the calling context, size is wrong |
16:18:17 | 18WAAS0DX | WFT |
16:18:21 | 18WAAS0DX | WTF |
16:22:20 | FromGitter | <mratsim> You should put together a minimal test case so people can reproduce |
16:23:38 | 18WAAS0DX | mratsim: well that is quite the problem |
16:28:11 | FromGitter | <mratsim> Btw, is it possible to do use iterator like that (somewhat Rust like): ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ I’ve implemented items for my type then I’m extracting the value to build a sequence of tuple like so (val1, 1), (val2, 2), (val3, 1), (val4, 2), (val5, 1), (val3, 2) ... [https://gitter.im/nim-lang/Nim?at=58f7901ead849bcf429d0f54] |
16:29:00 | FromGitter | <mratsim> the last val3 should be val6 of course, copy-pasting ... |
16:30:30 | FromGitter | <mratsim> (Also I understand that I loop once with toSeq, and once with mapIt, and once with zip but I’m trying to just get together a quick proof of concept before optimizing) |
16:31:34 | * | Trustable joined #nim |
16:35:46 | * | Mighty_Warthog joined #nim |
16:40:03 | FromGitter | <barcharcraz> the new website is nice |
16:40:05 | FromGitter | <barcharcraz> very snappy |
16:41:34 | zielmicha_ | @18WAAS0DX it's possible to get forum notifications, by subscribing to [email protected] |
16:43:21 | dom96 | TIberium: PRs welcome ;) |
16:43:39 | dom96 | zielmicha_: not quite, this has been down for a while. |
16:44:11 | dom96 | PMunch: Ahh yes, then i'll probably have them overlapping :) |
16:45:02 | * | chemist69 quit (Ping timeout: 255 seconds) |
16:45:27 | * | chemist69 joined #nim |
16:46:25 | * | Mighty_Warthog quit (Quit: AtomicIRC: The nuclear option.) |
16:52:38 | * | yglukhov quit (Remote host closed the connection) |
16:54:03 | * | yglukhov joined #nim |
16:55:39 | * | Mighty_Warthog joined #nim |
16:55:48 | * | Mighty_Warthog quit (Client Quit) |
16:57:15 | * | sz0 joined #nim |
16:57:24 | * | yglukhov quit (Read error: Connection reset by peer) |
16:57:44 | * | yglukhov joined #nim |
16:59:05 | * | libman joined #nim |
17:01:23 | * | 18WAAS0DX quit (Remote host closed the connection) |
17:01:38 | * | krux02 joined #nim |
17:02:02 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:02:59 | * | gokr quit (Quit: Leaving.) |
17:03:32 | FromGitter | <krux02> can someone take a look at the last comment in this pull request: https://github.com/nim-lang/Nim/pull/5664 |
17:04:18 | FromGitter | <krux02> I simply have no single clue how the value for size could have changed between return and reading the result in the calling function |
17:06:29 | federico3 | zielmicha_: the mlist is dead :( |
17:06:55 | * | xmonader joined #nim |
17:07:29 | PMunch | krux02, that is very weird.. |
17:08:38 | FromGitter | <krux02> the result value can be changed, when there is a `defer`, but there is no defer |
17:09:54 | * | Mighty_Warthog joined #nim |
17:11:28 | * | PMunch quit (Quit: leaving) |
17:17:52 | Tiberium | can I use some one-file C library without making a dynlib? |
17:18:26 | Tiberium | ah, compile pragma |
17:18:27 | krux02 | yes |
17:18:34 | Tiberium | but how to make bindings to it after that? |
17:18:42 | * | Mighty_Warthog quit (Ping timeout: 255 seconds) |
17:18:45 | krux02 | importc |
17:19:02 | * | xmonader quit (Ping timeout: 240 seconds) |
17:19:18 | Tiberium | ah ok! |
17:19:19 | krux02 | proc foobar(a,b: cint): cint {.importc.} |
17:19:32 | Tiberium | so foobar must be defined in this C library? |
17:19:38 | krux02 | yes |
17:19:39 | Tiberium | ok then! thanks! |
17:20:12 | krux02 | you basically have to port the header to nim. |
17:20:24 | krux02 | c2nim can help you there |
17:21:51 | * | Mighty_Warthog joined #nim |
17:21:51 | * | Mighty_Warthog quit (Client Quit) |
17:22:01 | * | Mighty_Warthog joined #nim |
17:22:01 | * | Mighty_Warthog quit (Client Quit) |
17:22:20 | * | Trustable quit (Remote host closed the connection) |
17:22:22 | * | Mighty_Warthog joined #nim |
17:22:22 | * | Mighty_Warthog quit (Client Quit) |
17:22:33 | * | Mighty_Warthog joined #nim |
17:22:33 | * | Mighty_Warthog quit (Client Quit) |
17:22:43 | * | Mighty_Warthog joined #nim |
17:22:43 | * | Mighty_Warthog quit (Client Quit) |
17:28:19 | Tiberium | krux02, yay c2nim generated binding without any errors |
17:33:01 | Tiberium | krux02, but I still need to use tinyexpr c module, so I'll have to compile it, but it can't find it's own header |
17:33:39 | Tiberium | I mean header pragma |
17:33:45 | Tiberium | {.header:"tinyexpr.h"} |
17:34:03 | krux02 | what is tinyexpr? |
17:34:24 | Tiberium | tinyexpr is a library that I want to use in my app without making dynlib |
17:34:29 | Tiberium | so compile it at compile-time |
17:34:35 | Tiberium | https://github.com/codeplea/tinyexpr |
17:34:43 | Tiberium | TinyExpr is self-contained in two files: tinyexpr.c and tinyexpr.h. |
17:35:28 | * | xmonader joined #nim |
17:37:04 | krux02 | can you tell me what you have? |
17:37:40 | krux02 | as far as I know you only need for a nim library the c file and a ported version of the header |
17:37:56 | Tiberium | I have a calc.nim and a folder tinyexpr, where I have generated by c2nim tinyexpr.nim, also tinyexpr.c and tinyexpr.h. In calc.nim I'm importing "tinyexpr/tinyexpr" |
17:38:09 | FromGitter | <mratsim> Trying to create my `.nimble`package information. How do I know the minimum nim version required? I always built against him |
17:38:15 | krux02 | put it on a github repo then I can take a look at it |
17:38:18 | FromGitter | <mratsim> nim latest commit |
17:38:32 | FromGitter | <mratsim> https://github.com/mratsim/Arraymancer |
17:38:43 | Tiberium | krux02, ok |
17:41:29 | * | yglukhov joined #nim |
17:41:51 | * | Vladar joined #nim |
17:45:13 | Tiberium | krux02, https://github.com/TiberiumN/test |
17:45:37 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:47:31 | krux02 | I don't think you need tho header pragma afaik you only need it, when you define the function in the header |
17:48:10 | krux02 | so when it is header only |
17:49:05 | * | throwaway2834 joined #nim |
17:50:31 | Tiberium | krux02, I remove header from tinyexpr.nim, so I'm trying to compile calc.nim, and gcc hanged. zero cpu usage |
17:50:33 | Tiberium | but it doesnt end |
17:50:49 | Tiberium | (it fails at compiling tinyexpr.nim) |
17:50:49 | krux02 | hmm |
17:51:05 | * | vivus joined #nim |
17:51:30 | Tiberium | it doesn't fail exactly, it just doesn't end |
17:55:18 | Tiberium | krux02, it hangs for me with this code: https://github.com/TiberiumN/test/commit/98a8fccb23b5b227d780c3b97bea2b153db02c4f |
17:55:24 | * | nsf quit (Quit: WeeChat 1.7) |
17:57:29 | krux02 | Tiberium: well I tried to compile tinyexpr |
17:57:32 | krux02 | it just fails |
17:57:36 | krux02 | I mean the c library |
17:57:41 | Tiberium | ah shame |
17:57:50 | Tiberium | I forgot to re-add tinyexpr.h |
17:58:00 | Tiberium | I deleted it when I was experimenting (deleted from tinyexpr.c) |
17:58:00 | throwaway2834 | Is `./koch install /usr` supposed to omit installing nimble? |
17:58:40 | Tiberium | krux02, so now it fails again that it can't find "tinyexpr.h" |
17:58:48 | Tiberium | krux02, I have "#include <tinyexpr.h>" in tinyexpr.c |
17:59:23 | Tiberium | so it has different current working dir |
17:59:34 | Tiberium | ah no?? |
17:59:42 | Tiberium | ah yes |
18:00:10 | Tiberium | tinyexpr/tinyexpr.c:61:22: fatal error: tinyexpr.h: No such file or directory |
18:01:06 | throwaway2834 | Which build system should i use? |
18:01:29 | Tiberium | throwaway2834, ./koch nimble will build nimble |
18:01:43 | Tiberium | IIRC |
18:02:17 | krux02 | you may not change tinyexpr.c |
18:02:28 | krux02 | that will destroy any future update of tinyexpr |
18:02:43 | Tiberium | krux02, no, no, I restored it by adding "tinyexpr.h" |
18:02:49 | Tiberium | I removed it accidentally by myself |
18:02:54 | krux02 | ok |
18:03:01 | Tiberium | krux02, https://github.com/codeplea/tinyexpr/blob/master/tinyexpr.c |
18:03:23 | Tiberium | krux02, again it's my fault |
18:03:29 | Tiberium | krux02, ok, now gcc fails |
18:03:45 | krux02 | nope it's not there |
18:03:47 | krux02 | I just pulled |
18:04:58 | Tiberium | krux02, I'll push it, wait a sec |
18:05:01 | krux02 | btw are you serices about this: cast[ptr cint](err) |
18:05:43 | Tiberium | krux02, I don't know the proper way :) |
18:05:51 | Tiberium | krux02, ok, I've pushed it (sorry for nimcache) |
18:06:19 | throwaway2834 | Tiberium: imo its confusing to have `./koch boot` not build all the tools :S |
18:08:52 | Tiberium | krux02, ah, I have to add "-lm" to C compiler |
18:09:04 | Tiberium | no |
18:09:33 | Tiberium | krux02, yay it works |
18:09:40 | Tiberium | but I have to --passL:"-lm" manually |
18:10:17 | krux02 | cool |
18:10:43 | krux02 | but that thing with cast is just wrong |
18:11:30 | Tiberium | krux02, ok, I removed --passL (just added "import math" in my calc.nim) and it works. how I need to pass "ptr cint" to function?) |
18:11:35 | krux02 | error is very likely a parameter you pass to the c function that is used as a return value to write an error code into |
18:11:57 | krux02 | you just need this: |
18:12:00 | krux02 | var err: cint |
18:12:03 | krux02 | err.addr |
18:12:07 | krux02 | there you have a pointer |
18:12:13 | Tiberium | krux02, thanks! |
18:12:40 | krux02 | same for all other types |
18:13:02 | krux02 | you can write a wripper that does this for you |
18:13:52 | Tiberium | libman, hi. Can I include a C library with Zlib license in my MIT application? (all licenses are in source code) |
18:13:57 | Tiberium | ? |
18:14:03 | krux02 | eg: proc free(n: var te_expr) = te_free(n.addr) |
18:14:13 | Tiberium | krux02, wow, looks nice |
18:15:08 | throwaway2834 | Tiberium: yes, the zlib license is very permissive |
18:15:10 | libman | I'm not a licensing expert. I just know that Zlib falls a bit short of copyfree.org's definition (see bottom of http://copyfree.org/standard/rejected ) |
18:15:21 | Tiberium | throwaway2834, ok, nice then |
18:17:40 | krux02 | does anyone know where the nimcache of the compiler is located when I compile with `./koch temp`? |
18:18:01 | libman | So if choosing a license, use MIT (or equivalent, as whitelisted on copyfree.org) over Zlib. If you have a choice between two C libraries to use, all things being equal, choose one with copyfree license over Zlib license. |
18:18:56 | libman | But if the only available library is Zlib, don't let license puritanism keep you from getting things done. ;-) |
18:19:41 | throwaway2834 | i mean, libSDL uses zlib and is everywhere |
18:19:50 | libman | Tiberium: which C library is it? |
18:20:01 | krux02 | well I have never heared of any legal issues of "ind want to share this library with as many people as possible" licenses |
18:20:20 | libman | Yeah. An ideal "pure copyfree userland" wouldn't use SDL for this reason. |
18:20:29 | Tiberium | libman, https://github.com/codeplea/tinyexpr/ simple math expression parser |
18:21:02 | throwaway2834 | Tiberium: don't worry, just use it. |
18:21:48 | krux02 | most licenses are: "Don't sue me, don't pretend it's yours, do whatever you want" |
18:21:53 | krux02 | gpl is different |
18:22:14 | krux02 | so as long as you are not in gpl land, don't worry too much about licenses |
18:22:38 | libman | Tiberium: Is is better than https://fastmathparser.codeplex.com/ (MIT license) ? |
18:22:42 | throwaway2834 | if you become sucessfull, you will be sued for the most dumb stuff, like violating patents on double linked lists or some other bs. |
18:23:01 | Tiberium | libman, I don't want a big library |
18:23:05 | throwaway2834 | is there any tutorial on how to structure+build a project larger than hello world? Should i use nim, nimble, koch or just plain makefiles? |
18:23:14 | krux02 | well that is indeed a problem |
18:23:28 | def- | throwaway2834: http://howistart.org/posts/nim/1/ |
18:23:39 | def- | not big, but bigger than hello world |
18:24:03 | krux02 | throwaway2834: There are companies that make a lot of money, by only suing other companies about legal stuff |
18:24:11 | krux02 | those companies are like cancer |
18:24:18 | libman | krux02: Some non-GPL licenses have more restrictions (ex. Apache, MPL, Zlib, Python, PHP, etc) than just "don't sue me, don't pretend it's yours". Use copyfree.org lists. |
18:24:19 | throwaway2834 | krux02: patent trolls? |
18:24:44 | krux02 | yes I think that is their name |
18:24:51 | throwaway2834 | def-: im confused, cause nimble is supposed to be bundled with nim, but your example shows seperate installation. |
18:25:39 | krux02 | throwaway2834: nimble was once separate |
18:25:50 | krux02 | caused problems |
18:26:24 | throwaway2834 | i don't grok why the gentoo ebuild doesn't install nimble and the other tools :S |
18:26:44 | libman | No license info on https://github.com/shd101wyy/math-expression-parser-c ... |
18:28:41 | throwaway2834 | def-: if this is your blog, do me a favor and add the writing date to each post :P |
18:28:51 | libman | Tiberium: https://github.com/beltoforion/muparser/ |
18:29:34 | Tiberium | libman, ah, sorry, I meant math parser and evaluation engine |
18:29:59 | Tiberium | libman, thanks for your suggestions, but for now I'll stick with tinyexpr, maybe I'll find another library in future |
18:30:08 | Tiberium | for now I just want to make features to my main application |
18:31:09 | krux02 | I want to do that, too |
18:31:23 | krux02 | but my pull request for the compiler is not finished |
18:31:43 | krux02 | and it has a "I have no idea what is going on here" bug |
18:31:55 | throwaway2834 | i see plain old `nim compile foo.c` builds the entire project. |
18:32:17 | throwaway2834 | when i import the rest |
18:32:36 | krux02 | https://github.com/nim-lang/Nim/pull/5664 |
18:36:34 | * | icebattle joined #nim |
18:37:27 | dom96 | Made some small improvements to nim-lang.org. Can't believe I forgot to include the tutorial and similar links in documentation. |
18:37:56 | dom96 | Can anyone test whether the sponsor tags are still wrapping for them? |
18:39:00 | throwaway2834 | the sponsor tags work. Does the blog support atom/rss nowadays? |
18:43:31 | * | GustavoLapasta joined #nim |
18:47:56 | dom96 | yep: https://nim-lang.org/feed.xml |
18:50:19 | throwaway2834 | dom96: the last time i subscribed to it, the text was cluttered with partial html code like <p>foo</p> |
18:52:41 | * | Arrrr quit (Read error: Connection reset by peer) |
18:57:30 | FromGitter | <Bennyelg> Guys on the new site, the code example template & font can anyone tell me ? :D |
18:57:50 | * | Nobabs27 joined #nim |
18:59:44 | FromGitter | <stisa> what would you guys think of something like this for the forum layout? desktop https://ibin.co/3JdEsVfmvxLa.png and mobile: https://ibin.co/3JdFDjz5UHPi.png |
19:00:02 | * | Sentreen quit (Quit: WeeChat 1.4) |
19:00:28 | * | Sentreen joined #nim |
19:00:30 | FromGitter | <Bennyelg> I have notice something. ⏎ I tried to register the forum I was told to check my email and confirm but I never got any message. |
19:00:59 | euantor | Forum on desktop looks a little too empty in the above I reckon |
19:01:18 | FromGitter | <mratsim> ask @dom96 @Bennyelg |
19:02:17 | * | rokups quit (Quit: Connection closed for inactivity) |
19:02:41 | FromGitter | <mratsim> agree with euantor. Also the yellow is too much in contrast with the Digital Ocean logo in my opinion |
19:02:55 | dom96 | the yellow is too much |
19:03:01 | dom96 | I already have some ideas for how to design the forum |
19:03:31 | dom96 | Basically semantic UI |
19:03:38 | dom96 | + a banner in the same style as the nim-lang one |
19:03:45 | dom96 | but no website links |
19:03:54 | dom96 | It's better to use that space for forum specific stuff |
19:04:01 | dom96 | like whether you're logged in or not |
19:04:04 | krux02 | dom96: I need to run the compiler in a debugger |
19:04:06 | FromGitter | <Bennyelg> @dom96 can you please provide me the theme name of the example in the new site? + the font ? |
19:04:07 | krux02 | can you help me? |
19:04:21 | dom96 | bennyelg: which example? |
19:04:44 | krux02 | I have a very weird bug, and I need to know why that behaviour is like it is |
19:04:58 | krux02 | so I would like to compile the nim files in realease mode (no source mapping) |
19:05:11 | krux02 | but then compile the c code with debug information (-g) |
19:05:12 | FromGitter | <Bennyelg> the Nim example of the average line length |
19:05:24 | FromGitter | <Bennyelg> @dom96 average line length nim example |
19:05:25 | krux02 | so that I can debug the generated C code |
19:05:36 | FromGitter | <mratsim> (I thought your issue was regarding the forum mails Benny :?) |
19:05:47 | FromGitter | <Bennyelg> This is another issue |
19:05:56 | FromGitter | <Bennyelg> I cant get the confirmation email |
19:09:54 | FromGitter | <stisa> @Bennyelg looking at css, it should be https://github.com/zenorocha/dracula-theme |
19:10:35 | dom96 | ^ |
19:10:53 | dom96 | bennyelg: what nick did you use on the forum? |
19:12:27 | krux02 | well funny I use dracula theme right now |
19:12:38 | dom96 | krux02: maybe you could compile the C sources from the nimcache manually? |
19:13:10 | FromGitter | <stisa> dom96 do you mean https://semantic-ui.com/ ? Interesting, I'll wait for your redesign then |
19:13:37 | dom96 | yeah, it's very easy to work with |
19:13:50 | dom96 | I found spectre css recently too, that might be a good alternative |
19:14:37 | FromGitter | <stisa> I was just trying to use the same base framework for both site and forum, to make transitions as smooth as possible |
19:16:47 | Calinou | Semantic UI looks good |
19:16:50 | FromGitter | <stisa> dom96 I'd go with the least css possible, in my (very limited) experience it's a pain to get right for multiple browsers |
19:16:54 | Calinou | it's probably not usable without JavaScript though |
19:17:04 | Calinou | stisa: if you only care about IE 10 and later (or better, iE 11 and later), it's not that bad |
19:17:10 | FromGitter | <Bennyelg> guys any web crawling packages on nim? |
19:17:13 | Calinou | browser-specific quirks do exist outside of IE, but they aren't *that* common |
19:17:29 | FromGitter | <barcharcraz> safari is the bad one these days |
19:17:45 | FromGitter | <mratsim> basically there is Firefox, Safari, Webkit and IE11/Edge |
19:17:50 | FromGitter | <barcharcraz> and IE's javascript engine having very different perf characteristics than Mozilla/Chrome's |
19:17:56 | Calinou | yeah, Safari is the new IE |
19:18:53 | krux02 | ./koch csource -d:release seems to be in a long loop is that normal? |
19:19:10 | Tiberium | can I convert 1.2e-5 to something like 1.2*10^(-5) |
19:19:32 | Tiberium | so I think I need to use string operations? |
19:20:10 | krux02 | well I really need some help here, and I feel a bit lost :( |
19:21:44 | FromGitter | <Varriount> krux02: Generating csources takes a bit. It generates sources for ~6 different platforms |
19:22:07 | krux02 | Varriount, I need to debug the compiler |
19:22:44 | FromGitter | <Varriount> Then why are you generating csources? |
19:23:05 | krux02 | well I want the c sources to not have the source mapping |
19:23:18 | krux02 | and then compile those C files with debug information |
19:23:29 | krux02 | the source mapping just makes the c files unreadable |
19:23:45 | krux02 | https://forum.nim-lang.org/t/2920 |
19:26:06 | * | GustavoLapasta quit (Quit: Leaving) |
19:26:51 | FromGitter | <krux02> @Varriount I reached the limits of printf debugging |
19:27:07 | FromGitter | <krux02> within no operation at all the value changes |
19:27:10 | Tiberium | how can I pass pointer of Nim proc to C function? |
19:27:18 | Tiberium | const void *address; |
19:27:36 | demi- | Tiberium: how do you mean? |
19:27:51 | Tiberium | demi-, I mean I have a C library, and wrapper around it |
19:27:57 | demi- | yeah |
19:28:05 | krux02 | Tiberium: nim procs (lambdas) are a tuple of a function pointer and a context pointer |
19:28:13 | Tiberium | krux02, ok! |
19:28:14 | krux02 | the function pointer is something you could actually call from C |
19:28:16 | FromGitter | <Varriount> @krux02 Try `nim c --lineDir:off ./compiler/nim.nim` |
19:28:31 | FromGitter | <v3ss0n> hi guys ! how is nim going! |
19:28:32 | Tiberium | krux02, only lambdas? |
19:29:00 | demi- | Tiberium: are you defining a callback in nim that gets taken by a C function (or something) |
19:29:07 | Tiberium | demi-, yeah, like that |
19:29:13 | krux02 | well to level functions are just functions |
19:29:19 | krux02 | they don't need a context pointer |
19:29:27 | Tiberium | and in c2nim generated wrapper function is " address*: pointer" |
19:29:43 | Tiberium | so I need to convert my function to "pointer" and send it to C |
19:29:45 | demi- | ah i see |
19:30:07 | krux02 | when they are converted to a function object (lambda) then the environment pointer is set to 0 |
19:30:17 | krux02 | (no guarantee of correctness) |
19:30:30 | FromGitter | <Varriount> @v3ss0n Same old, same old. |
19:30:37 | krux02 | the fact is that there are different ways a function can be stored |
19:30:39 | FromGitter | <Varriount> @v3ss0n The website was updated. |
19:30:48 | krux02 | therefore there is no general way of converting a function to a c pointer |
19:31:09 | demi- | Tiberium: i believe by using `cast[pointer](func_ptr)` |
19:31:10 | krux02 | especially when you want to call the function from the C side |
19:31:13 | Tiberium | I will try https://forum.nim-lang.org/t/1801 |
19:31:14 | FromGitter | <Varriount> krux02: Don't you mean there's no general way of converting a closure? |
19:31:23 | krux02 | yes |
19:31:48 | FromGitter | <Varriount> Regular, non-closure procedures can be turning into C function pointers by casting. |
19:31:59 | demi- | ^ |
19:32:19 | FromGitter | <krux02> I have written enough wrappers to know that wrapping closures is a bit tricky and needs different approaches and some cases don't work sufficient and you just have to live with it |
19:33:36 | FromGitter | <krux02> @Varriount what do you mean by ``nim c --lineDir:off ./compiler/nim.nim`` |
19:33:57 | FromGitter | <Varriount> nim.nim is the actual main compiler file. |
19:34:09 | FromGitter | <krux02> ah ok |
19:34:14 | FromGitter | <Varriount> lineDir controls the output of line directives |
19:34:37 | FromGitter | <krux02> that means that compiler/nim will be my new temp compiler |
19:36:37 | throwaway2834 | can i build nimble packages without nimble? |
19:36:57 | FromGitter | <krux02> @Varriount well that did not work |
19:36:59 | demi- | no? |
19:37:06 | FromGitter | <krux02> that did turn off all debug information |
19:37:51 | Tiberium | yay it works! thanks everyone |
19:37:55 | Tiberium | a bit noisy but works |
19:38:26 | krux02 | Tiberium: congratulation |
19:38:51 | Tiberium | also can I create an array which will be filled with information at compile time? |
19:39:07 | throwaway2834 | yes, see const expressions |
19:39:23 | demi- | using the static Exec/read methods, yeah |
19:39:29 | * | throwaway2834 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:39:39 | * | nsf joined #nim |
19:40:00 | Tiberium | ah, I mean I would append some types to my array at compile time from different places |
19:40:03 | Tiberium | but all at compile time |
19:40:12 | Tiberium | (because arrays are more efficient than sequences) |
19:40:22 | Tiberium | ah no this wouldn't work |
19:40:24 | krux02 | well there are statick blocks, const values, and macros |
19:40:29 | krux02 | all evaluate at compile time |
19:40:29 | demi- | yeah |
19:42:34 | dom96 | Calinou: indeed, semantic UI also has a dependency on jquery which sucks |
19:43:22 | krux02 | nim c --lineDir:off --debuginfo compiler/nim |
19:43:25 | dom96 | That said, I haven't heard a single person say "I love NimForum because it doesn't depend on any JavaScript" |
19:43:28 | krux02 | that is what I needed |
19:43:30 | krux02 | yay |
19:43:33 | dom96 | So I don't think this goal of "no javascript" is needed. |
19:43:58 | dom96 | krux02: But you said you wanted release mode? |
19:44:02 | krux02 | well I use noscript in my browser |
19:44:18 | krux02 | and things that use javascript are generally suspicious |
19:44:36 | krux02 | javascript is mostly used to harm the user |
19:44:51 | krux02 | just saying I do care that the forum doesn't need javascript |
19:45:20 | Tiberium | what is vars here? https://gist.github.com/TiberiumN/78c98948ef40dc4fbac8156eab7b124f |
19:45:22 | krux02 | not meaning that javascript shouldn't be used for things like notifications and some other realtime stuff |
19:45:25 | Tiberium | an array? |
19:45:36 | Tiberium | because it can contain multiple types |
19:45:37 | Tiberium | ah |
19:45:42 | Tiberium | I mean multiple entries |
19:45:58 | Tiberium | te_variable is a struct |
19:47:01 | dom96 | Also regarding JS performance. Firefox, to me, seems the slowest nowadays. |
19:47:04 | dom96 | Not that I've used Edge much |
19:47:12 | dom96 | But my god is it slow for me lately |
19:47:18 | FromGitter | <krux02> it is an array |
19:47:29 | Tiberium | and how can I do the same in Nim? |
19:47:31 | FromGitter | <krux02> it is an array of te_variable |
19:47:35 | FromGitter | <krux02> array of struct |
19:47:38 | Tiberium | ah ok |
19:47:39 | Tiberium | nvm |
19:47:56 | Tiberium | but there's no size specified |
19:47:58 | FromGitter | <krux02> you can use array or seq |
19:48:14 | FromGitter | <krux02> but for te_compile, you need to pass the pointer to the first element |
19:48:24 | * | Nobabs27 quit (Quit: Leaving) |
19:48:30 | dom96 | This is by the way the best way to shut down the stupid "Nim doesn't produce binaries, it transpiles to C!" "argument" https://www.reddit.com/r/programming/comments/66672e/new_nim_programming_language_website_is_live/dgh9hea/ :P |
19:48:58 | Tiberium | krux02, yeah, I know, you also need to pass number of functions to te_compile |
19:49:01 | dom96 | Varriount: thanks for holding down the fort yesterday btw :) |
19:49:05 | Tiberium | (how many of them are in array) |
19:49:09 | FromGitter | <krux02> then you can again write a wrapper that takes an openarray[te_variables] and fills the length parameter for you |
19:51:08 | Tiberium | yep |
19:52:25 | FromGitter | <krux02> openarray has a length |
19:52:48 | krux02 | sorry just ignore that |
19:53:32 | dom96 | In other news, here is an excerpt from my book http://freecontent.manning.com/delving-into-nim/?utm_source=twitter&utm_medium=social&utm_campaign=article&utm_term=nim_in_action&utm_content=article_apr_2017 |
20:05:42 | * | Tiberium quit (Remote host closed the connection) |
20:08:39 | FromGitter | <YandongZhang> Hello, everyone. I just tried to use the Emacs org-mode together with Nim and met an issue. Does anybody have experience of ob-nim for Emacs? |
20:09:13 | FromGitter | <YandongZhang> The Emacs nim-mode itself looks OK. |
20:10:40 | dyce[m] | i am curious if concepts could be used as a way to make interfaces? similar to this example https://gist.github.com/PhilipWitte/33819b40112a18c30b43 |
20:10:48 | dyce[m] | or would that be abusing concepts |
20:11:43 | FromGitter | <Varriount> dyc[m]: They can't be used to make runtime interfaces (yet, zahary is working on that). |
20:12:28 | ldlework | Varriount, ah good to know someone is actually working on it |
20:12:31 | ldlework | I thought it was just an idea |
20:13:36 | dyce[m] | but generally interfaces are caught during compile time? what does catching at runtime do? allow for some sort of duck typing? |
20:15:09 | FromGitter | <Varriount> dyce[m]: Yes. Allows for types. |
20:17:53 | dom96 | in fact, it might already be implemented |
20:18:07 | dom96 | see the devel manual for details |
20:23:31 | ldlework | Its totally not implemented... |
20:23:44 | ldlework | Varriount, right? |
20:23:55 | ldlework | Also, constraining generic types is what concepts already do. |
20:24:09 | FromGitter | <Varriount> I haven't tested anything. All I know is what is in the manual |
20:24:12 | ldlework | remind me what adding the vtable does again? |
20:24:26 | FromGitter | <Varriount> (The version of the manual in the development branch) |
20:24:37 | ldlework | I know I had an issue where I required thi kind of thing just days ago but I'm dumb and have memory problems. |
20:25:01 | ldlework | Something like |
20:25:13 | FromGitter | <Varriount> It's supposed to make common procedures (and possibly attributes?) outlined in the concept accessible at runtime. |
20:25:19 | FromGitter | <Varriount> Like an interface |
20:25:37 | ldlework | Varriount ah right so you can like get the correct implementation |
20:25:42 | ldlework | Kinda like methods? |
20:25:46 | * | PMunch joined #nim |
20:28:11 | PMunch | Ey dom96 you fixed the wrapping :) |
20:28:51 | dom96 | PMunch: yay, glad it works :) |
20:29:16 | * | Vladar quit (Quit: Leaving) |
20:31:13 | * | shashlick quit (Ping timeout: 258 seconds) |
20:32:49 | * | shashlick joined #nim |
20:38:33 | * | rauss joined #nim |
20:43:15 | FromGitter | <Varriount> ldlework: Yes, like methods |
20:46:13 | * | deciduously joined #nim |
20:47:00 | * | deciduously quit (Client Quit) |
20:47:41 | FromGitter | <Varriount> Except instead of an inheritance tree, you have a behavior tree. |
20:48:24 | FromGitter | <Varriount> From what I gather, the compiler will generate wrappers/adapters |
20:48:35 | * | bjz joined #nim |
20:49:37 | * | rauss quit (Quit: WeeChat 1.7) |
21:07:00 | FromGitter | <PDelak> hi. how can I escape backtics in macros? |
21:07:20 | FromGitter | <krux02> well that is something I don't do |
21:07:58 | FromGitter | <krux02> there is this @ operator I think |
21:08:46 | ldlework | hi krux02 |
21:09:10 | krux02 | ldlework: hi ldlework |
21:13:03 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
21:18:21 | * | Mighty_Warthog2 joined #nim |
21:19:50 | * | Mighty_Warthog3 joined #nim |
21:21:22 | FromGitter | <mratsim> vote for me: https://www.reddit.com/r/programming/comments/66672e/new_nim_programming_language_website_is_live/dghjiyf/ |
21:21:35 | euantor | Going back to the earlier discussion about Firefox's JS performance, I'm glad it's not just me who noticed it was super slow recently |
21:22:44 | * | gokr joined #nim |
21:24:29 | * | Snircle joined #nim |
21:24:38 | * | throwaway8137 joined #nim |
21:24:45 | krux02 | euantor: nope ;) |
21:25:05 | throwaway8137 | Building nimble fails with: compiler/commands.nim(59, 16) Error: cannot open '../doc/basicopt.txt' |
21:25:13 | throwaway8137 | why does it need to access ../ |
21:25:27 | euantor | At this point I'm almost thinking of giving Edge a chance |
21:25:34 | throwaway8137 | it fails both on master and on 0.8.4 |
21:26:45 | FromGitter | <Varriount> @mratsim It's odd how much more critical reddit users tend to be, compared to those on hacker news |
21:27:14 | * | nsf quit (Quit: WeeChat 1.7) |
21:27:21 | ldlework | haha the competiition to minimize the book cover is hilarious |
21:30:09 | FromGitter | <Varriount> Well, it was rather large. |
21:30:36 | ldlework | Just spitballin', here, but it seems like a lot of web browsers are hopping on this newfangled JS train these days. |
21:30:38 | ldlework | hahahaha |
21:31:41 | FromGitter | <Varriount> ldlework: is that a quote? |
21:31:46 | ldlework | yeah |
21:31:56 | ldlework | https://www.reddit.com/r/programming/comments/66672e/new_nim_programming_language_website_is_live/dggpb90/ |
21:32:06 | ldlework | Someone asked why you'd ever want to compile to JS |
21:32:08 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:33:31 | FromGitter | <Varriount> :/ |
21:33:35 | FromGitter | <krux02> well you wouldn't want to, but maybe you need to |
21:34:37 | FromGitter | <krux02> 5 years from now in the future, webassembly will be pretty widespread I guess |
21:35:46 | dom96 | throwaway8137: how are you compiling it? |
21:38:50 | throwaway8137 | dom96: i git-cloned the nimble repository, cd-ed into it and running `nim c src/nimble` like in the manual. |
21:38:51 | * | bjz joined #nim |
21:39:56 | dom96 | throwaway8137: you're better off using 'koch tools' (or koch nimble as the Nimble readme shows) |
21:40:34 | FromGitter | <mratsim> @Varriount I don’t knoww reddit programming sub that well but I guess there are some turf wars and when a new kid comes, everyone picks on it ;) |
21:41:15 | dom96 | throwaway8137: The Nim archives come with Nimble and that is how you set it up. |
21:42:24 | * | Mighty_Warthog3 quit (Ping timeout: 255 seconds) |
21:42:43 | throwaway8137 | dom96: the nim archive also comes with koch. But the ebuild in the official gentoo package repository doesn't seem to care :S |
21:43:17 | * | Mighty_Warthog2 quit (Ping timeout: 258 seconds) |
21:43:21 | dom96 | the gentoo package should include Nimble :\ |
21:43:44 | throwaway8137 | it dosen't. I tought its one of you guys here that maintains it :S |
21:44:05 | dom96 | Perhaps, but none of the core devs that I know of. |
21:44:34 | dom96 | You might be better off just downloading Nim from the website |
21:45:07 | throwaway8137 | i could roll my own or install it manually, but after trashing my system by "trying out" so many languages im kinda tired |
21:46:54 | throwaway8137 | and kinda got the feeling that whats not in the repos, isnt mature/relevant enough |
21:47:06 | throwaway8137 | especially after doying with languages like d and its ecosystem |
21:47:22 | throwaway8137 | toying* |
21:48:22 | FromGitter | <mratsim> How is D? |
21:49:01 | * | gokr notes some really nice informative posts on that reddit - seems we have some more Nimmers on board |
21:49:31 | throwaway8137 | on paper its brilliant. But it feels unfinished and changes to quickly. |
21:50:03 | gokr | throwaway8137: One nice bit with Nim is that you don't need to "install" it. Just clone, build and point your PATH to the bin dir in there. |
21:50:52 | gokr | In fact, I have several Nim clones - and just change my PATH if I want to use a different version of Nim. |
21:51:16 | demi- | no nimenv? |
21:51:54 | gokr | I have no idea if there is such a thingy - but 2 lines of bash works for me to switch around. |
21:53:36 | krux02 | yayayayay it works |
21:53:40 | krux02 | finally |
21:54:13 | FromGitter | <mratsim> btw, in the “features” page, I really like the `source`link everytime |
22:02:06 | * | throwaway8137 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
22:02:39 | gokr | dom96: I think... you are kinda lying on the binary size thing. |
22:03:10 | gokr | AFAICT you are not compiling statically. I experimented earlier with this for Spry, so.. |
22:03:28 | gokr | ... to compare with say Go - you need to statically link and strip. |
22:03:55 | gokr | Like: nim c -d:release --opt:size --passL:-static hello.nim |
22:04:02 | demi- | i don't think it is wholly inaccurate to compare to go, since all of the stdlib that you use is linked |
22:04:13 | gokr | And then: strip -s hello_nim |
22:04:26 | gokr | demi-: Come again? |
22:04:47 | dom96 | https://github.com/dom96/binary_size/blob/master/compile.sh#L8 |
22:05:09 | demi- | when you build nim code, you are building and linking statically the code from the stdlib, only code you don't link statically is external deps that are dynamically linked |
22:05:59 | gokr | eh... not sure what you mean. If you just do regular nim c - then you end up with a dynamically linked executable. |
22:06:12 | gokr | Just check it with "file hello_nim" or "ldd hello_nim" and you will see. |
22:06:14 | dom96 | The idea is primarily to test defaults. |
22:06:23 | gokr | Ok, but.... it's misleading. |
22:06:45 | demi- | gokr: sure the executable is dynamic, but that doesn't mean the contents are linked dynamically. |
22:06:55 | krux02 | well all modules in nim are compiled to c files, they are compiled to .o files and they are all compiled together into a binary |
22:07:01 | krux02 | that is static linking |
22:07:09 | demi- | yeah, exactly |
22:07:26 | krux02 | a static library is nothing more than an archive of .o files |
22:07:45 | dom96 | All benchmarks are misleading in some way |
22:07:51 | krux02 | at least on linux |
22:07:54 | gokr | demi-: I have no idea what you are saying. If I compile it statically it will end up as 853 kb. |
22:07:55 | dom96 | def- managed to get a 150 byte Nim hello world |
22:08:12 | demi- | krux02: the same is true on OS X |
22:08:27 | dom96 | To be more fair I would need to compare how easy it is to achieve the same thing in other languages |
22:09:40 | demi- | gokr: when you build a nim executable, the compiler generates .c files for each module you import, regardless if they are from the standard library or from external dependencies via nimble. All of these .c files are run through your C compiler to generate .o files, which together, are linked to create your executable binary. |
22:09:43 | FromGitter | <mratsim> Does “fair” benchmark even exists >_>, everytime someone does a benchmark he gets flayed alive |
22:10:14 | gokr | demi-: Yes. And? |
22:10:30 | demi- | all of the modules you import, all of that code gets put into your executable binary, that is static linking of libraries |
22:10:48 | demi- | that follows the same pattern as Go |
22:10:50 | krux02 | well maybe glibc is linked dynamically, but I don't know |
22:11:18 | gokr | demi-: No, Go will link fully statically. Nim will not. |
22:11:30 | gokr | Unless you use the switches I showed you above. |
22:11:34 | demi- | gokr: not on all platform |
22:12:02 | gokr | Perhaps not, but on my Linux for sure. And thus, comparing to Go is not "fair" as that graph looks right now. |
22:12:12 | gokr | Because that difference is dynamically linked vs statically linked. |
22:12:32 | gokr | As I just explained - if I make hello_nim also statically linked it goes up to 853 kb. |
22:12:35 | demi- | no, but it isn't wholly inaccurate, because the only difference there is deferral of loading code to runtime instead of at startup |
22:12:48 | * | zachcarter joined #nim |
22:13:03 | gokr | demi-: I humbly disagree. |
22:13:06 | zachcarter | I have a couple of suggestions for the new website |
22:13:18 | ldlework | hi zachcarter. hope you're well. |
22:13:25 | zachcarter | hey Idlework - likewise |
22:13:41 | demi- | gokr: ok, but the amount of work that goes info that process is trivial at best when you are talking about execution time and perf |
22:13:44 | zachcarter | busy past few days at work :/ |
22:14:27 | zachcarter | I was thinking (not sure how easy this would be to implement) some type of Nim playground akin to the Go playground, would be super nice |
22:14:29 | gokr | demi-: I am just saying - don't compare apples with oranges. Right now we are misleading folks with that graph. |
22:14:42 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:14:50 | ldlework | zachcarter: hehe it seems like every few days we talk about that |
22:15:00 | krux02 | well there are a lot of misleading things on the internet |
22:15:03 | demi- | if you say so |
22:15:23 | zachcarter | haha I figured it may have already been brought up |
22:15:29 | demi- | i hardly think that is misleading because you aren't writing Go code for exec perf, lol |
22:15:29 | zachcarter | another thing I think the new site is missing is a simple web server example |
22:15:40 | gokr | In other words - let's say I am programming for Arduino or similar. Then the binary size is actually very important. |
22:15:44 | zachcarter | the old site had one I think, on a carousel |
22:16:15 | demi- | gokr: now who is comparing apples and oranges tho |
22:16:16 | krux02 | demi-: it's funny that on irc I see chinese and on gitter I see a smilie |
22:16:27 | gokr | demi-: What do you mean? |
22:16:40 | demi- | krux02: sounds like your irc client doesn't handle unicode correctly |
22:17:01 | krux02 | well i can type äöü ß ẞ |
22:17:09 | krux02 | no problem |
22:17:25 | krux02 | Ξ√Λℂ⊂∫∀∃∪∩ℵΠξλχιαεϵϵηπ |
22:17:28 | krux02 | all fine |
22:17:29 | demi- | i'm guessing your client doesn't support certain planes |
22:17:37 | demi- | or joiners |
22:17:50 | krux02 | well it doesn't really matter |
22:18:18 | demi- | ¯\_(ツ)_/¯ |
22:20:06 | dom96 | zachcarter: play.nim-lang.org is waiting :) |
22:20:16 | dom96 | or try.nim-lang.org |
22:20:35 | zachcarter | someone just needs to build it? |
22:20:40 | dom96 | indeed |
22:21:03 | zachcarter | hmm |
22:21:14 | dom96 | it shouldn't even be that difficult |
22:21:31 | dom96 | I'm here to help if you want :) |
22:21:36 | zachcarter | okay how would you run the compiler |
22:21:50 | dom96 | osproc |
22:21:58 | zachcarter | ah okay I see |
22:22:09 | dom96 | you might need to fiddle with threads though |
22:22:09 | demi- | zachcarter: are you familiar with swift playgrounds? |
22:22:14 | zachcarter | I am not |
22:22:40 | zachcarter | googling now |
22:22:49 | zachcarter | ah this is nice |
22:23:02 | krux02 | my compiletime offsetof alignof sizeof seems to be almost finished |
22:23:13 | krux02 | I just got all my tests passed today |
22:23:23 | krux02 | that was a headache |
22:23:25 | demi- | the basic principle is an interactive repl, but what it does is runs the compiler over a source file at timed intervals to simulate a repl/responsive programming environment |
22:23:28 | dom96 | krux02: awesome! Wanna write an article on how you accomplished this? |
22:23:55 | krux02 | Well I can sum it up it a few words. |
22:23:58 | demi- | it should be pretty easy to setup a timer to run over the given input on a loop and provide "live" feedback like that |
22:24:06 | dom96 | nim-lang.org is now ready for guest posts |
22:24:27 | krux02 | A lot of head scratching running around, yelling at the screen and then eventually I got it |
22:24:45 | dom96 | so let me know if you want to write one or have written one |
22:24:45 | krux02 | the key to success is to document everything that causes headache |
22:24:53 | krux02 | and use good names for everything |
22:24:53 | zachcarter | demi-: gotcha |
22:25:08 | dom96 | krux02: there is far more to it, most don't know where to start. |
22:25:09 | zachcarter | I’m going to finish this space invaders demo I’m working on then play around with a nim playground |
22:25:12 | krux02 | arguments like p and n are not very nice |
22:26:05 | dom96 | Anyway, good night. |
22:26:18 | krux02 | Well there is some completely undocumented compiler stuff that required Araq to answer my questions otherwise I am screwed |
22:26:29 | zachcarter | good night |
22:26:30 | krux02 | but I am passed that |
22:27:44 | krux02 | Well to say it shortly, I am not really interested to write an article about how I struggled to implement something in the compiler. |
22:27:46 | FromGitter | <Varriount> Am I the only one afraid of what will happen if @Araq gets run over by a bus? |
22:28:03 | krux02 | I think there is a lot where we need documentation |
22:28:09 | krux02 | but no blog posts |
22:28:33 | krux02 | Varriount: nope |
22:28:58 | krux02 | I think the language as such will have a big problems to develop further |
22:29:33 | krux02 | I mean I already did two things in the compiler, that is by far not a lot, but it is much more than most people did |
22:30:06 | krux02 | so if at some point things depend on me to continue, well I don't know |
22:30:24 | FromGitter | <mratsim> We trust in you Lord Krux :P |
22:32:10 | krux02 | I think I would drop a lot of crufty backwards compatibility and remove everything that says depricated and was already deprecated before I started with the langage |
22:32:46 | krux02 | make things manageable |
22:34:26 | Araq | https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Constants.h#L191 |
22:34:57 | Araq | was the first file I looked at. |
22:35:07 | demi- | documentation is always the correct thing to do :) |
22:36:27 | Araq | https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Function.h#L693 |
22:42:21 | Araq | but we all know LLVM is a bad codebase and soon about to die because nobody can maintain it, so let's instead look at GCC perhaps |
22:42:32 | Araq | https://github.com/gcc-mirror/gcc/blob/master/gcc/go/go-lang.c#L534 |
22:42:35 | Araq | oops. |
22:43:57 | Araq | stupid Nim with its one letter character parameters that's somehow actually really quite common among compiler writers. |
22:47:19 | Araq | https://github.com/python/cpython/blob/master/Objects/floatobject.c#L167 |
22:47:52 | demi- | a terribly habit |
22:48:34 | gokr | dom96: Just to ... try to convince you again that the binary size graph is misleading... You compile hello.nim to a dynamically linked binary, gives 74kb on my machine. But then you compile hello.rs to a partially statically linked binary (if I grok Rust properly, it links C libs dynamically, but Rust stdlib statically), turns pretty large. But if I tell it to "prefer dynamic" it will turn silly small - about 9kb. |
22:49:02 | Araq | https://github.com/LuaDist/luajit/blob/master/src/lj_ccallback.c#L107 |
22:49:29 | Araq | I cannot even find a language implementation where it is NOT used ... |
22:49:35 | demi- | gokr: except the stdlib isn't dynamically linked |
22:49:50 | demi- | which is exactly what we were saying earlier |
22:50:05 | gokr | I am talking about Rust now. |
22:50:44 | gokr | My point is that this is a game of "linking options" - and misleading in many ways. |
22:51:00 | demi- | except based on your example, nim and rust get linked the same way |
22:51:01 | gokr | The go executable is stripped, but no other are. Not sure why. |
22:51:20 | krux02 | Araq: well the problem was that there were function arguments that were a single letter only, and no comment string of what the actually were |
22:51:30 | Araq | https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L2037 |
22:51:45 | krux02 | normally when documentation is missing function names are at least some help to know what the argument is used for |
22:51:47 | demi- | go executables are probably stripped because they realize they have a bad dependency problem due to statically linking the world |
22:52:16 | gokr | demi-: It was dom96 who added the "-s" in compile.sh, not "they". |
22:52:17 | krux02 | but when then the function names are also just a single letter, I am pretty clueless of what the argument is acutally supposed to be |
22:52:29 | * | xmonader quit (Ping timeout: 260 seconds) |
22:54:39 | demi- | if you are so suspicious about the nim binary size i'm sure you can examine that actual footprint of compiled code by looking at it in a decompiler |
22:55:09 | gokr | demi-: Mmmm, you may have some kind of point in that yes, Rust seems to statically link its stdlib (but the rest dynamically) - and Nim "obviously" links its stdlib statically since it kinda is included on a C source level into the app. But... this means that if this is a game of "who can be the smallest dynamically linked binary" - then rust easily wins by adding "-C prefer-dynamic". |
22:56:22 | demi- | that wouldn't be a fair or equal evaluation would it, as then rust would dynamically link its stdlib |
22:56:28 | gokr | demi-: I am not suspicious. I think I know what is going on. AFAIK the bulk of the Nim binary - about 70kb - is the Nim GC etc. |
22:57:22 | Araq | nim c -d:useNimRtl ? |
22:58:03 | Araq | but the platforms where binary sizes matter usually have no OS that can do dynamic linking |
22:58:14 | gokr | demi-: Well, my point all along is that comparing sizes of dynamically linked binaries isn't very fair at all. Especially not when we also include a statically linked Go binary. |
22:58:42 | gokr | Araq: Exactly. Which is why I mentioned Arduino. |
22:59:05 | Araq | it's perfectly fair to compare "binaries as required to be runnable on a particular OS" |
22:59:09 | gokr | So that brings me full circle - wouldn't fully statically linked be a more interesting comparison? Or perhaps I am missing something. |
22:59:37 | gokr | Araq: Ok, but then we can add "-C prefer-dynamic" to rust and boom - we lost big time. |
22:59:58 | gokr | Unless we then do the useNimRtl etc |
23:00:05 | Araq | how can you distribute a "prefer-dynamic" Rust binary? |
23:00:08 | * | gokr trying that... |
23:00:23 | Araq | you need to ship some librust.so with it |
23:00:29 | gokr | Araq: I suppose it requires the installed rust stdlib, yep. |
23:00:36 | Araq | defeating the size advantage. |
23:00:37 | demi- | presumably if you put it on a system with the same versions of the stdlib |
23:01:04 | pydsigner | But we all know how that works |
23:01:11 | gokr | yes, etc, etc etc. Which again, is the reason I find statically linked binaries more interesting to compare. Unless I miss some grand point. |
23:01:22 | demi- | which goes back to my point of it being a deferrence to when you are loading code, which is not really that important |
23:01:42 | Araq | the point is to compare "binaries as required to be runnable on a particular OS" |
23:02:05 | gokr | Let me just finish by saying this: The Rust guys will bang on this like a drum. Don't worry about me - I am not anyone in need of convincing. |
23:02:13 | Araq | with libc being the obvious unfair advantage because it's essentially part of the OS |
23:02:20 | demi- | I think the same still should hold true of nim coming out on top if you are assuming rust and nim are using the same lib c |
23:03:10 | demi- | since that applies to both of them, if not Go as well |
23:03:15 | gokr | My only concern is ensuring we don't come off as "cheaters". |
23:03:31 | gokr | Which IMHO it looks like we do right now. But again, don't mind me. |
23:03:36 | demi- | i think that someone that is going to pick a fight over this is going to do it anyway |
23:04:48 | Araq | we don't cheat. we have a clear problem statement, clear rules and clear results. |
23:06:12 | gokr | Araq: Ok, so ... why do we strip go? And no other binaries? |
23:06:25 | gokr | (that's negative cheating, but anyway) |
23:06:35 | demi- | because that is such an unfair advantage |
23:06:47 | Araq | I wasn't aware we strip Go. |
23:06:54 | gokr | And yeah, if I use -d:useNimRtl hello_nim goes to 10kb. |
23:07:02 | gokr | We do. |
23:07:15 | Araq | well we should strip Rust too then I guess. |
23:07:20 | gokr | And Nim. |
23:07:42 | Araq | why does it even make a difference, we have whole program dead code removal? |
23:08:08 | gokr | I am just pointing out "differences" |
23:08:43 | gokr | Btw, curious about Rust there... why does it include so much of its stdlib? |
23:08:49 | gokr | Anyone knows? |
23:09:05 | gokr | Also, it links pthread etc |
23:09:11 | Araq | because it lacks dead code removal? |
23:11:25 | demi- | doesn't nim kinda pre-empt that by only linking in modules that are directly included anyway |
23:11:33 | Araq | not sure Golang can do that properly, its "interfaces everywhere" approach kind of nukes the whole optimization |
23:12:05 | Araq | demi-: exactly. |
23:12:17 | ldlework | Araq: any concern for vtable-backed concepts in that regard? |
23:13:53 | * | PMunch quit (Quit: leaving) |
23:13:55 | Araq | ldlework: yeah, but the vtable is seen as a "backup" solution, most of the time concepts embrace static binding |
23:14:48 | ldlework | Araq: is that feature in devel? No one seems to know its status beyond the documentation. |
23:15:29 | Araq | no, it's not. we're paying zahary to implement it though. |
23:15:56 | ldlework | Araq: It seems like it will be a very powerful feature indeed. |
23:38:50 | krux02 | Araq: when you have any complicated types where you think offsetof could be hard to implement, new it would be the right time to show them |
23:39:18 | krux02 | I was a bit surprised to see, that enums have an alignment of 2 no matter what the size is |
23:40:39 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:46:58 | * | arnetheduck joined #nim |
23:56:07 | * | alectic joined #nim |
23:58:19 | * | alectic is now known as alexdreptu |
23:58:36 | * | vlad1777d quit (Remote host closed the connection) |
23:58:45 | * | alexdreptu is now known as alectic |
23:59:27 | * | vlad1777d joined #nim |