00:06:34 | * | deech joined #nim |
00:07:49 | deech | Hi all, I was hacking up a simple factorial function using the bigint library but when I tried to evaluate the same function at compile time it didn't work. Is there any documentation on what parts of the language are off-limits at compile time? |
00:09:04 | deech | OTOH, versions of factorial that used int32,int64,float etc. worked fine both at compile and runtime. |
00:10:40 | * | mwbrown quit (Quit: Exiting) |
00:11:25 | * | yglukhov quit (Remote host closed the connection) |
00:19:26 | * | Nobabs27 joined #nim |
00:22:12 | * | Nobabs27 quit (Client Quit) |
00:36:37 | * | mwbrown joined #nim |
00:44:01 | * | gokr quit (Ping timeout: 252 seconds) |
00:49:12 | * | BennyElg quit (Ping timeout: 268 seconds) |
00:49:32 | * | BennyElg joined #nim |
00:57:33 | FromGitter | <Varriount> deech: There's some limited mentions of what's not allowed - casting, etc |
00:58:29 | * | BennyElg quit (Ping timeout: 240 seconds) |
00:58:56 | * | BennyElg joined #nim |
01:13:20 | * | chemist69 quit (Disconnected by services) |
01:13:25 | * | chemist69_ joined #nim |
01:30:20 | FromGitter | <Varriount> Hrm, I don't quite get the whole deal with React and immutability. |
01:37:00 | * | rauss joined #nim |
01:51:06 | * | ftsf joined #nim |
01:52:43 | FromGitter | <Varriount> zachcarter: CSS on play.nim-lang.org broke. :( |
01:52:56 | zachcarter | try clearing cache |
01:55:08 | zachcarter | I did a front end up date Varriount |
01:55:13 | FromGitter | <Varriount> Wow, I see. |
01:55:25 | zachcarter | what do you think? |
01:55:48 | FromGitter | <Varriount> zachcarter: Mostly great, however the height of the editor appears to be attached to the height of the output boxes |
01:55:55 | zachcarter | it is |
01:56:12 | zachcarter | but the editor supports scrolling |
01:56:32 | zachcarter | I don’t really want to hardcode the editor height |
01:56:53 | FromGitter | <Varriount> I would expect the editor height to be close to that of the browser's viewport. |
01:57:17 | FromGitter | <Varriount> So that the compile button is always near the bottom of the viewport. |
01:57:20 | zachcarter | hrm I’m not sure if bulma has some way of doing that |
01:57:31 | zachcarter | oh I think I know |
01:58:34 | zachcarter | hrm I don’t know but I’ll figure it out |
02:00:22 | FromGitter | <Varriount> zachcarter: And if you want nitpicky suggestions, I feel like there's too much space between the logo and "playground" |
02:00:40 | * | BennyElg_ joined #nim |
02:00:48 | zachcarter | hmm okay I can try to adjust that too |
02:00:53 | * | BennyElg quit (Ping timeout: 240 seconds) |
02:00:58 | FromGitter | <Varriount> Perhaps "Playground" should be beside the logo, with a bar separator? Or the space could just be reduced. |
02:01:52 | FromGitter | <Varriount> ♕ Nim | Playground |
02:02:05 | zachcarter | I’ll try both and upload images |
02:04:44 | * | deech quit (Ping timeout: 255 seconds) |
02:12:32 | FromGitter | <Varriount> zachcarter: Is there any difference between bulma and bootstrap? I mean, they are both CSS frameworks? |
02:12:47 | zachcarter | bulma is flex grid based |
02:12:49 | zachcarter | bootstrap is not |
02:13:36 | rauss | zachcarter: It's really coming along |
02:13:41 | rauss | nice job! |
02:13:42 | zachcarter | thanks |
02:14:08 | rauss | zachcarter: Did you add ctrl+enter? |
02:14:13 | zachcarter | not yet |
02:14:19 | zachcarter | been working on front end stuff mostly |
02:14:27 | zachcarter | css I guess |
02:15:00 | rauss | I agree with Varriount that the editor height should be about the size of the window. And the log and output boxes should probably split that same height |
02:15:07 | rauss | Lemme know if you need any help with the CSS |
02:15:30 | FromGitter | <Varriount> I'm currently working through the React tutorial. |
02:16:00 | zachcarter | I don’t know how to get the editor to be full height |
02:16:06 | zachcarter | I’m applying height 100% everywhere lol |
02:16:07 | zachcarter | not working |
02:17:19 | FromGitter | <Varriount> zachcarter: Try '100vh' |
02:18:06 | zachcarter | nope |
02:21:03 | FromGitter | <Varriount> rauss ^ |
02:21:38 | rauss | Oh, kk |
02:22:08 | rauss | Do you want an answer for bootstrap or vanilla CSS? |
02:22:49 | zachcarter | bulma |
02:23:24 | rauss | Dunno what bulma is, but you said it uses flex-grid. So you get to benefit from that |
02:25:26 | zachcarter | bulma.io |
02:25:29 | rauss | Lemme play around with the site through dev tools and tell you what you need to do |
02:25:30 | zachcarter | http://bulma.io |
02:25:37 | zachcarter | awesome than you |
02:25:40 | zachcarter | thank you* |
02:30:35 | FromGitter | <zetashift> I've used bulma and bootstrap; I preferred bulma because it was a lot simpler and not has hefty as bootstrap |
02:31:11 | zachcarter | bulma is nice so far, just can’t figure out how to make a full height element |
02:31:14 | zachcarter | that isn’t a hero |
02:33:40 | rauss | zachcarter: It's a bit of an invasive change, but you can make .container or body a flex grid, with flex-direction column |
02:33:55 | zachcarter | hrm |
02:33:56 | rauss | and make that .content div take up most of the space |
02:34:20 | rauss | The .container I'm referring to is #ROOT |
02:34:30 | zachcarter | I think I have anotherh way |
02:34:57 | zachcarter | just going to make it a hero |
02:36:01 | FromGitter | <Varriount> zachcarter: Setting "min-height: 100vh" on the parent of the boxes does something |
02:36:24 | zachcarter | I saw that too Varirount |
02:37:22 | zachcarter | I think I got it |
02:37:23 | zachcarter | one sec |
02:43:03 | zachcarter | yup got it |
02:43:13 | zachcarter | gotta fix a lot of stuff though :/ |
02:46:05 | rauss | vh didn't exist back in my day =\ |
02:46:34 | FromGitter | <Varriount> zachcarter: Don't forget to test on phone/mobile sizes too |
02:54:03 | zachcarter | will do Varriount |
02:59:53 | FromGitter | <Varriount> zachcarter: By the way, if you have a donation site/account, I'd be more than happy to make a donation. |
03:00:07 | FromGitter | <Varriount> You're doing a lot of great work! |
03:00:22 | zachcarter | :D thank you! I don’t but I’ll consider setting up something maybe |
03:00:40 | zachcarter | I’m just very happy so far to have Nim at my disposal |
03:07:45 | zachcarter | how’s it look now Varriount / rauss / zetashift ? |
03:08:25 | * | brson quit (Quit: leaving) |
03:08:50 | rauss | <3 |
03:09:13 | rauss | Looks great. Love the colors btw |
03:09:28 | zachcarter | thanks! |
03:09:50 | rauss | You should probably save the editor contents to localstorage every so often, or on every "compile". Or add an explicit "save" button |
03:09:58 | rauss | that'd be nice for people |
03:10:10 | zachcarter | yeah there’s so much we can do with this thing :D |
03:10:12 | FromGitter | <zetashift> zachcarter : link? I've missed about 75% if this conversation |
03:10:13 | zachcarter | sharing snippets |
03:10:18 | zachcarter | https://play.nim-lang.org/ |
03:10:44 | zachcarter | Varriount: I tried lining up the logo with Playground but it did NOT look good |
03:13:36 | zachcarter | also - the ace editor doesn’t seem to work for mobile |
03:13:38 | pydsigner | Jumping in now, I'd say that the dark grey on dark blue isn't the best necessarily. |
03:13:42 | zachcarter | at least not in my growser emulation |
03:13:54 | pydsigner | From my perspective anyways. |
03:14:11 | zachcarter | I could go with a different editor theme |
03:14:36 | pydsigner | I'm not talking about the editor theme |
03:14:55 | FromGitter | <zetashift> @zacharycarter currently looks like this for me: http://imgur.com/a/7kNDD |
03:14:57 | zachcarter | I know but I made the dark gray background because of the editor theme |
03:15:19 | zachcarter | zetashift: what browser? |
03:15:39 | FromGitter | <zetashift> firefox 52.0 windows10 |
03:15:57 | zachcarter | hrm |
03:16:13 | FromGitter | <zetashift> cross browser compatibility is FUN isn't it hehe |
03:16:22 | zachcarter | hellll no :P |
03:16:47 | zachcarter | def doesn’t work on safari atm |
03:17:22 | FromGitter | <zetashift> I get the same on Edge btw |
03:17:31 | zachcarter | okay |
03:17:32 | FromGitter | <zetashift> not that anyone I know would care about it but hey |
03:17:36 | zachcarter | :P |
03:17:43 | zachcarter | thx for checking |
03:19:17 | zachcarter | brb |
03:19:32 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:19:40 | pydsigner | zachcarter: try #777981 for the primary bg maybe? |
03:19:54 | pydsigner | Oh bother |
03:20:05 | pydsigner | That's the primary website color, can't change that |
03:20:06 | zachcarter | pydsigner: I was trying to match the nim website bg color |
03:20:12 | pydsigner | Yeah |
03:21:01 | * | zachcarter quit (Quit: zachcarter) |
03:25:33 | * | zachcarter joined #nim |
03:27:10 | zachcarter | hrm I get different results on windows ie edge |
03:27:41 | pydsigner | zachcarter: how much control over the editor theme do you have? |
03:27:53 | zachcarter | mm I can probably pick from a bunch |
03:27:55 | zachcarter | let me find them |
03:28:12 | zachcarter | https://ace.c9.io/build/kitchen-sink.html |
03:28:13 | pydsigner | By that I mean, using the theme that's on the front page would be cool. |
03:28:15 | zachcarter | all the themes are there |
03:28:25 | pydsigner | Oh this is C9 nice |
03:29:46 | pydsigner | Hmm so. You can custom style C9 |
03:29:58 | pydsigner | I wonder if you can custom style C9 Ace |
03:30:12 | rauss | I think the background color is fine, it's just the dark grey boxes that need to change |
03:30:14 | FromGitter | <zetashift> Maybe related to my screen size then? http://imgur.com/a/KT5JY |
03:30:20 | rauss | I also think the editor is fine |
03:30:32 | rauss | maybe make the boxes the color nim-lang.org uses for code blocks? |
03:30:52 | pydsigner | rauss: right, that's my suggestion |
03:31:10 | rauss | Haha sorry, just skimming |
03:31:24 | pydsigner | @zetashift, I think I know what's happening there |
03:32:15 | pydsigner | Well then again.... |
03:32:36 | pydsigner | @zetashift, try clearing your cache |
03:32:43 | zachcarter | I’m guessing it’s the wide screen format |
03:33:24 | pydsigner | @zetashift, you don't even have the <hr> that should be in there somewhere |
03:33:44 | zachcarter | try clearing your browser cache zetashift? |
03:33:46 | rauss | zachcarter: #282a36 https://www.dropbox.com/s/1nauql74krl8mxc/2017-04-26-23%3A32%3A58.png?dl=0 |
03:34:13 | FromGitter | <zetashift> on it! |
03:34:16 | zachcarter | thank you |
03:35:07 | zachcarter | rauss: that’s what mine looks like as well |
03:35:31 | pydsigner | zachcarter: he's trying to show you a color tweak |
03:35:36 | zachcarter | oh |
03:35:44 | rauss | zachcarter: I changed the dark grey box backgrounds to #282a36, which is what nim-lang.org uses for code blocks |
03:35:57 | zachcarter | I see |
03:36:17 | zachcarter | I can do that |
03:36:30 | pydsigner | I think my preference would be to just use that color for the content blocks and just skip the wrappers |
03:38:30 | FromGitter | <zetashift> didn't work on firefox :worried: gonna try on edge now |
03:38:39 | zachcarter | very weird |
03:38:46 | zachcarter | I’ll try to emulate widescreen |
03:39:48 | FromGitter | <zetashift> even on Edge it stays the same blegh |
03:40:12 | zachcarter | strange |
03:43:03 | FromGitter | <zetashift> but yea I don't see a <hr> tag in the body CSS |
03:44:05 | zachcarter | should be in the html |
03:44:50 | zachcarter | you may have cached html |
03:44:54 | zachcarter | from cloudflare |
03:47:45 | pydsigner | Thoughts? http://i.imgur.com/pyN94a6.png |
03:48:29 | Calinou | use a font that's not too small for the code editor, it looks pretty small judging at the line height and line number font size |
03:48:34 | * | zachcarter quit (Quit: zachcarter) |
03:48:53 | Calinou | (note that other people may not see the page at the same physical size as you, because of different DPI) |
03:49:10 | * | yglukhov joined #nim |
03:49:32 | pydsigner | Calinou: I'd agree that the font size should be larger, I was just tweaking colors though |
03:50:54 | Calinou | right |
03:53:05 | FromGitter | <zetashift> Make the 'Compile' text same yellow as the playground, maybe? |
03:53:43 | * | yglukhov quit (Ping timeout: 255 seconds) |
03:55:01 | pydsigner | On the buttons? |
03:55:10 | pydsigner | They change to that color when you hover, it seems |
03:55:43 | pydsigner | My biggest concern with this mockup is the legibility of that white on light blue tbh |
04:09:06 | FromGitter | <zetashift> yea I found that funky too but I can't come up with a better color |
04:11:42 | FromGitter | <TiberiumPY> https://play.nim-lang.org. It's broken on the phone thought |
04:22:00 | FromGitter | <Varriount> Ideally, for a mobile device on portrait mode, the result and compile logs should be on the bottom (or perhaps they should always be on the bottom? |
04:45:34 | * | BennyElg_ quit (Remote host closed the connection) |
05:12:50 | * | yglukhov joined #nim |
05:17:22 | * | yglukhov quit (Ping timeout: 252 seconds) |
05:32:07 | * | SusWombat quit (Remote host closed the connection) |
05:32:33 | * | gokr joined #nim |
05:37:30 | * | SusWombat joined #nim |
05:46:22 | * | Vladar joined #nim |
06:08:55 | * | rauss quit (Quit: WeeChat 1.7.1) |
06:27:15 | * | BennyElg joined #nim |
06:32:51 | * | BennyElg quit (Ping timeout: 260 seconds) |
06:40:33 | SusWombat | Hey all |
06:41:05 | FromGitter | <TiberiumPY> Is it more preferred to use standard object rather than "ref object" for object which will be created many times? |
06:43:07 | * | willprice94 joined #nim |
06:47:45 | * | BennyElg joined #nim |
06:48:22 | Araq | tiberiumPy: depends on the size of the object and the usage |
06:55:16 | * | nsf joined #nim |
07:06:02 | * | Arrrr joined #nim |
07:06:02 | * | Arrrr quit (Changing host) |
07:06:02 | * | Arrrr joined #nim |
07:07:14 | FromGitter | <Varriount> @TiberiumPY You still there? |
07:14:59 | * | yglukhov joined #nim |
07:18:42 | FromGitter | <Varriount> So Araq, what are you working on at the moment? |
07:20:41 | * | yglukhov quit (Ping timeout: 260 seconds) |
07:26:29 | gokr | Morning folks |
07:31:12 | * | rokups joined #nim |
07:37:42 | * | yglukhov joined #nim |
07:43:03 | FromGitter | <TiberiumPY> @Varriount I'm here now |
07:43:56 | FromGitter | <TiberiumPY> I have a message object, which I create for every message passed to my bot from social network |
07:44:14 | FromGitter | <TiberiumPY> It contains a sub object to |
07:44:17 | FromGitter | <TiberiumPY> Too |
07:44:37 | BennyElg | nim playground looks nice |
07:45:22 | * | willprice94 quit (Ping timeout: 255 seconds) |
07:56:12 | * | willprice94 joined #nim |
07:58:23 | euantor | Playground does indeed look nice, but getting this warning in the Firefox console: `The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or |
07:58:23 | euantor | in the transfer protocol.` |
07:58:29 | euantor | That's an easy fix at least |
07:59:52 | * | chemist69_ quit (Ping timeout: 260 seconds) |
08:02:07 | euantor | I've submitted a PR that should fix that anyway |
08:02:18 | * | Trustable joined #nim |
08:04:10 | * | chemist69 joined #nim |
08:08:58 | * | chemist69 quit (Client Quit) |
08:25:02 | * | cspar__ joined #nim |
08:28:01 | * | cspar_ quit (Ping timeout: 240 seconds) |
08:28:31 | * | starmix_ joined #nim |
08:29:42 | * | starmix_ is now known as starmix |
08:31:04 | * | willprice joined #nim |
08:31:49 | * | hlt joined #nim |
08:32:37 | * | willprice94 quit (Ping timeout: 255 seconds) |
08:32:46 | hlt | what does the proc type look like? say, i want to have a proc pointer that takes 2 ints and returns a bool as an argument, how do I express that? |
08:34:44 | Araq | type Foo = proc (x, y: int): bool |
08:37:01 | * | yglukhov quit (Remote host closed the connection) |
08:37:12 | hlt | got it |
08:37:31 | hlt | can i inline this inside a function declaration? |
08:38:12 | Araq | proc takesCallback(callback: proc (x, y: int): bool) |
08:38:36 | Araq | proc returnsCallback(): (proc (x, y: int): bool) |
08:39:06 | hlt | thanks |
08:42:48 | * | Arrrr quit (Ping timeout: 260 seconds) |
08:45:25 | * | chemist69 joined #nim |
08:48:56 | dom96 | zachcarter: that does look nice :) |
08:49:38 | dom96 | There is no need to emulate the Nim site too much though. |
08:56:59 | FromGitter | <Varriount> @TiberiumPY It might make sense to have a `ref seq[MessageObj] then. |
08:57:51 | FromGitter | <Varriount> Objects are either allocated on the stack, or as part of a reference type. |
09:00:33 | FromGitter | <TiberiumPY> But after I process the message I don't need it |
09:01:35 | dom96 | seq[] is already a reference type |
09:02:36 | FromGitter | <andreaferretti> (https://files.gitter.im/nim-lang/Nim/azBI/Schermata-da-2017-04-27-11-06-27.png) |
09:02:50 | FromGitter | <andreaferretti> doesn't look very good on my wide screen |
09:02:57 | FromGitter | <TiberiumPY> Wait a sec |
09:03:01 | FromGitter | <andreaferretti> the editor window is extremely small |
09:03:06 | FromGitter | <TiberiumPY> I will post how it looks on my phone |
09:03:24 | FromGitter | <andreaferretti> Also, I would much prefer a lighter theme |
09:03:37 | euantor | I get that same look on Firefox on my screen too |
09:03:46 | Araq | same for me, looks wrong |
09:04:09 | Araq | but it's CSS, so *shrug*, I already know it never works ;-) |
09:04:33 | FromGitter | <Varriount> @dom96 `ref seq` doesn't have copying semantics |
09:05:37 | dom96 | Varriount: And why does Tiberium need to avoid copying semantics? |
09:06:10 | FromGitter | <Varriount> @TiberiumPY If only one message is in existence, it probably doesn't matter wether it's an object or reference type. |
09:06:29 | FromGitter | <TiberiumPY> There |
09:07:17 | FromGitter | <TiberiumPY> http://i.imgur.com/tcM8ZTP.png |
09:07:21 | FromGitter | <TiberiumPY> It's his |
09:07:42 | FromGitter | <TiberiumPY> It is how playground looks on my phone |
09:08:39 | FromGitter | <andreaferretti> Defintely the title needs to be on top on itw own line |
09:09:10 | FromGitter | <andreaferretti> also, please, even you you prefer a dark theme don't make everything so black |
09:09:35 | FromGitter | <andreaferretti> look at all the white there is in the new nim site |
09:12:18 | FromGitter | <Varriount> @andreaferretti Perhaps you could submit a PR for multiple themes? |
09:12:44 | FromGitter | <andreaferretti> I really do not have time for that, sorry |
09:12:59 | FromGitter | <andreaferretti> there's nothing wrong with a dark theme |
09:13:11 | FromGitter | <andreaferretti> but it doesn't need to be so black |
09:13:40 | FromGitter | <andreaferretti> maybe some white here and there |
09:13:44 | FromGitter | <andreaferretti> some touch of color |
09:15:59 | dom96 | I agree, and to be honest I wouldn't like to see every Nim-related website to copy the nim-lang.org colours. |
09:25:04 | * | krux02 joined #nim |
09:25:50 | * | yglukhov joined #nim |
09:30:11 | FromGitter | <Varriount> dom96: But, isn't this site going to be part of nim-lang.org? |
09:32:31 | dom96 | Sure |
09:38:00 | * | Matthias247 joined #nim |
09:42:39 | * | Trustable quit (Remote host closed the connection) |
09:49:39 | * | gokr quit (Quit: Leaving.) |
09:52:16 | * | willprice quit (Ping timeout: 245 seconds) |
09:56:18 | federico3 | how about having a consistent style across *.nim-lang.org except nim-lang.org itself? |
09:57:47 | FromGitter | <andreaferretti> ugh.. that would mean copying the forum style? |
09:59:03 | * | _dirt joined #nim |
09:59:10 | * | girvo joined #nim |
09:59:12 | * | _dirt left #nim ("Textual IRC Client: www.textualapp.com") |
09:59:51 | girvo | Hey all. Is it possible to have a proc _remove_ a tag that it gets from a previous proc call? Sort of like how a try/except block can allow for {.raises: [].} |
10:00:00 | girvo | By tag, I mean in the Effects system |
10:01:08 | girvo | I'm using to seperate safe and unsafe code within a codebase, but am unsure how to cross the boundary between them the way I would with exceptions. Worst case I'll go take a look at the code for try/except! |
10:01:42 | federico3 | andreaferretti, not necessarily |
10:03:05 | * | willprice joined #nim |
10:03:57 | Araq | girvo: unsafe code can call safe code, safe code must be able to call unsafe code. where is the gain? |
10:04:45 | Araq | you can remove tags by proc type casting though |
10:04:48 | FromGitter | <Varriount> girvo: Wouldn't it be better to use exception tracking? |
10:05:09 | Araq | cast[proc () {.tags: [].}](hasTags)() |
10:07:06 | girvo | Araq: It's more about drawing a clear boundary between the two with the compilers help; even if it's not 100% enforcable. I'll give that a try, cheers! |
10:10:40 | vivus | how does 1 set a channel status on a IRC channel? |
10:10:56 | girvo | Varriount, yeah that's what we've been doing at the moment; was more seeing whether using tags instead would allow for a clearer semantic seperation between the safe/unsafe boundary and actual exceptions heh |
10:11:47 | Araq | yeah but that's my point. I never understood that "clear" boundary really. Since you need at least a notion of reallySafe that can call only safe code |
10:11:51 | FromGitter | <Varriount> vivus: Via chanserv, I believe |
10:12:57 | dom96 | vivus: #freenode should be able to help with that |
10:13:01 | FromGitter | <Varriount> girvo: perhaps it would make more sense to have a procedure A that calls safe procedure B and unsafe procedure C? |
10:14:14 | girvo | Varriount: that's exactly my plan :) |
10:14:58 | yglukhov | Araq: do you know anything about the state of zahary branch? |
10:15:46 | FromGitter | <Varriount> girvo: By the way, if you have a blog, a post about development while using the effects system would be nice |
10:16:41 | girvo | I will :) I've been looking for a reason to play with it for a bit |
10:16:43 | yglukhov | Araq: fyi we're stuck with a month-old nim because of the regressions |
10:17:02 | * | vlad1777d joined #nim |
10:18:00 | Araq | yglukhov: there is a good chance we'll finally merge it tomorrow/Saturday |
10:36:03 | FromGitter | <Varriount> yglukhov: What do you use Nim for? |
10:36:54 | yglukhov | Varriount: a game that has not been fully released yet =) |
10:40:15 | FromGitter | <Varriount> Anyone have thoughts on the whole "immutable containers for application state" paradigm? |
10:41:59 | Araq | yes, it's stupid. |
10:42:25 | Araq | ;-) |
10:43:36 | * | willprice quit (Ping timeout: 240 seconds) |
10:50:17 | girvo | Varriount, I use it successfully in Javascript regularly (React Native + Redux mostly) |
10:52:23 | FromGitter | <Varriount> girvo: It just seems rather wasteful to me (even if copies are shallow). Java's approach (using a marker attribute to invalidate objects in the hierarchy) seems so much more efficient. |
10:53:10 | * | vlad1777d quit (Quit: Leaving) |
10:53:58 | girvo | Yeah you definitely trade off effeciency, but you do get really easy to reason about data flow, which is the main reason its useful in React etc. |
10:54:44 | girvo | Some reckon that it can be "more effecient" but that's pretty bogus, unless the language itself has optimisation for it built in that basically convert it to mutable under the hood |
10:55:13 | * | vlad1777d joined #nim |
10:55:52 | Araq | dunno, the point of React is to have a single source of truth, there is no "data flow" you need to reason about, you mutate your model, the UI updates accordingly |
10:56:24 | Araq | otherwise you might as well use Haskell, compile it to JS and call it a day. |
10:57:35 | girvo | Araq, that works well (esp. when one understands state/props properly) for smaller react apps/components, but eventually becomes difficult as the code-base grows. MobX is a great in-between; mutable data containers, but really cute features to cause re-renders only where needed via dependency tracking in your models itself |
10:57:52 | girvo | And yeah, which is why I like Purescript haha |
10:58:11 | * | zachcarter joined #nim |
10:59:27 | zachcarter | morning |
11:02:38 | * | Snircle joined #nim |
11:11:17 | * | Tiberium joined #nim |
11:11:36 | * | Tiberium quit (Max SendQ exceeded) |
11:11:55 | * | Tiberium joined #nim |
11:13:17 | vivus | can I create SHA256 hashes with nim ? |
11:14:38 | dom96 | yes, there is a nimble package for that |
11:14:46 | dom96 | hey zachcarter! |
11:14:52 | zachcarter | hey dom96! |
11:14:56 | zachcarter | working on some updates for the front end right now |
11:14:57 | Araq | it's also broken, don't use it before fixing it |
11:15:25 | dom96 | zachcarter: great, be sure to read the IRC logs if you haven't already |
11:15:29 | zachcarter | will do |
11:16:21 | zachcarter | okay so everyone hates the black theme |
11:16:25 | zachcarter | or dark theme |
11:16:35 | zachcarter | and I need to fix the title not being on top of the editor |
11:16:40 | Tiberium | zachcarter, sadly new design is fully broken on mobile devices :( yes |
11:17:02 | zachcarter | yeah it’s not working in safari eitther :/ I’ll fix it all today |
11:17:04 | dom96 | Tiberium: it's broken on desktop too |
11:21:13 | krux02 | zachcarter: I noticed that you always use the single quote: ’, instead of the apastrophe: ' is this intentional, or is it your irc client? |
11:21:26 | zachcarter | must be my irc client |
11:21:34 | krux02 | ok |
11:23:05 | girvo | macOS with "smart quotes" will also change 'em to real "quotes" |
11:23:14 | girvo | I don't know why I just quoted quotes then lol |
11:24:04 | * | Arrrr joined #nim |
11:25:46 | krux02 | well I noticed, I have keys for all types of quotes ‚‘’„“”»«›‹ |
11:26:21 | krux02 | not that is matters though |
11:28:29 | demi- | i would really like a wrapper around xapian, as long as i don't have to write it; which also sums up my opinions on C++ |
11:28:41 | zachcarter | are there any svgs of the nim logo with the text in a darker color? |
11:28:51 | zachcarter | this is why I originally went with the dark theme as the only logo I could find has white text |
11:28:55 | zachcarter | and white on white doesn’t show so well :P |
11:31:50 | euantor | You could combine the text from here https://github.com/nim-lang/assets/blob/master/Art/logo-monochrome-black.png with the crown https://github.com/nim-lang/assets/blob/master/Art/logo-crown.svg |
11:32:12 | dom96 | https://github.com/nim-lang/website/blob/master/jekyll/assets/img/logo_bw.svg |
11:32:26 | dom96 | The one euantor linked is old |
11:32:32 | zachcarter | thanks |
11:32:54 | zachcarter | oh the bw one still has white text haha |
11:33:03 | dom96 | You can easily change that |
11:33:09 | zachcarter | okay |
11:33:15 | dom96 | You could also do what the Nim website does and have a dark banner |
11:33:21 | dom96 | and the rest of the page white |
11:33:31 | zachcarter | yeah I’ll probably just do that |
11:33:34 | demi- | github does that too, it isn't uncommon |
11:35:19 | zachcarter | bulma makes this difficult grrr |
11:43:36 | hlt | is there an offline version of the vim reference? my internet is unstable and i'd like to look up things on the stdlib while offline |
11:43:57 | hlt | (not to mention the javascript on the stdlib index is hanging my browser for around 90 seconds) |
11:46:00 | FromGitter | <andreaferretti> you can generate them using this script https://github.com/wicast/nim-docset |
11:46:14 | * | couven92 joined #nim |
11:46:51 | * | willprice joined #nim |
11:51:49 | * | dddddd joined #nim |
11:53:43 | hlt | andreaferretti: thanks |
12:12:58 | * | Arrrr quit (Quit: Leaving.) |
12:19:37 | * | devted joined #nim |
12:20:42 | Tiberium | hmm, "Connection was closed before full request has been made" maybe it can be solved by closing all http connections held by this client? |
12:20:51 | Tiberium | I'll try that (I can't get rid of this error) |
12:20:51 | zachcarter | dom96: if you have a sec : mind clearing cloudflare cache? |
12:21:59 | dom96 | zachcarter: done |
12:22:04 | zachcarter | thanks |
12:22:14 | zachcarter | alright playground should at least be functional again |
12:25:23 | FromGitter | <andreaferretti> better now, but I see a scrollbar on the nav |
12:25:49 | zachcarter | hrm okay |
12:25:59 | FromGitter | <andreaferretti> also for some reason the buttons are on the bottom |
12:26:18 | zachcarter | the buttons have always been on the bottom :P |
12:26:29 | zachcarter | what browser are you using andreaferretti? |
12:26:44 | FromGitter | <andreaferretti> firefox on linux |
12:26:52 | FromGitter | <andreaferretti> yeah, but they are really on the bottom |
12:26:57 | zachcarter | hrm okay |
12:26:58 | FromGitter | <andreaferretti> no spacing whatsoever |
12:27:35 | Tiberium | what's wrong with this code? "echo $round(72.73999999999999, 2)" |
12:27:44 | Tiberium | it outputs 72.73999999999999 |
12:27:47 | Tiberium | (round from math) |
12:28:35 | FromGitter | <andreaferretti> makes sense, if you think about it :-) |
12:28:46 | FromGitter | <andreaferretti> the rounding is 72.74 |
12:28:52 | * | bjz joined #nim |
12:28:59 | FromGitter | <andreaferretti> and the closest floating point number that represents it is |
12:29:04 | dom96 | zachcarter: why not use the logo I linked? |
12:29:06 | FromGitter | <andreaferretti> 1) 73999999999999 |
12:29:15 | dom96 | The yellow one is too bright |
12:29:22 | zachcarter | dom96 okay |
12:29:31 | Tiberium | but how to round this number? |
12:29:38 | FromGitter | <andreaferretti> if you want to use a fixed number of digits, you will need to get a string |
12:29:54 | Tiberium | ok |
12:30:18 | * | adeohluwa joined #nim |
12:30:40 | FromGitter | <andreaferretti> you can use format strings |
12:30:46 | dom96 | andreaferretti: huh, it seems to me that it should output 72.74. |
12:31:12 | dom96 | oh, it's because the $ does something else |
12:31:12 | FromGitter | <andreaferretti> I guess that this number cannot be represented exactly in floating points arithmetic |
12:32:05 | dom96 | Perhaps we need a floatToStr proc (similar to the intToStr proc in strutils) |
12:32:18 | FromGitter | <andreaferretti> there are already format strings for that |
12:33:05 | FromGitter | <andreaferretti> also, https://nim-lang.org/docs/strutils.html#formatFloat,float,FloatFormatMode,range[],Char |
12:33:26 | dom96 | oh cool |
12:36:03 | Tiberium | nice, thanks for pointing it out |
12:46:26 | Tiberium | What's the default timeout of httpclient http requests? |
12:48:14 | zachcarter | alright one more cache reset should fix things |
12:48:42 | dom96 | zachcarter: done |
12:48:46 | zachcarter | thanks |
12:49:23 | dom96 | Maybe it would be better if I disabled cloudflare for now while you're developing? |
12:49:38 | dom96 | Issues that I see now: "Playground" has a scroll bar |
12:49:47 | dom96 | I dislike the hover colours on the buttons (sorry) |
12:50:00 | dom96 | Doesn't your CSS framework give a good default for the buttons? |
12:50:11 | FromGitter | <TiberiumPY> That's how it looks for me now: |
12:50:17 | FromGitter | <TiberiumPY> (https://files.gitter.im/nim-lang/Nim/pkc4/image.png) |
12:50:28 | dom96 | oh and the buttons could use moving down a bit, they're too close to the banner |
12:50:41 | zachcarter | dom96: that might help |
12:51:03 | dom96 | TiberiumPY: Ctrl+Shift+F5 |
12:51:26 | dom96 | ok, changed to not use cloudflare |
12:51:32 | zachcarter | awesome thank you dom96 |
12:51:40 | dom96 | This might take longer to propagate though |
12:51:57 | zachcarter | all good |
12:52:13 | FromGitter | <Varriount> dom96: On nim-lang.org , shouldn't the tutorial portion be near the top? |
12:52:16 | dom96 | ooh, I like how the colors change on success |
12:52:32 | FromGitter | <Varriount> Currently it's on the very bottom |
12:52:45 | FromGitter | <andreaferretti> I suggest |
12:52:46 | FromGitter | <andreaferretti> ===playground-logo {=== ⏎ ⏎ ```line-height: 1.5;``` ⏎ ⏎ } [https://gitter.im/nim-lang/Nim?at=5901e9a212d2409935a387ed] |
12:52:49 | FromGitter | <andreaferretti> ops |
12:52:54 | FromGitter | <andreaferretti> ```#playground-logo { ⏎ line-height: 1.5; ⏎ }``` [https://gitter.im/nim-lang/Nim?at=5901e9aacfec9192727ddb73] |
12:53:01 | Tiberium | dom96, what can be the reason of "Connection was closed before full request has been made" ? |
12:53:13 | dom96 | Varriount: Perhaps. People looking for the tutorial will hopefully go to the documentation tab anyway. |
12:53:13 | Tiberium | i'm sending "long" http requests |
12:53:17 | Tiberium | it's called "long polling" |
12:53:29 | Tiberium | and after 20-30 minutes of good work it crashes |
12:53:32 | zachcarter | andreaferetti: I think adding overflow hidden to the parent container should fix it |
12:53:47 | FromGitter | <Varriount> Tiberium: You exceeded the long polling limit and the other side cut you off |
12:54:02 | FromGitter | <Varriount> Tiberium: Would this happen to be for AWS? |
12:54:07 | Tiberium | Varriount: oh, and how to fix that? it only happens with Nim. |
12:54:24 | Tiberium | it's social network long polling |
12:54:47 | FromGitter | <Varriount> Tiberium: You might need to send a heartbeat (bits) down the connection to keep it alive. |
12:54:52 | dom96 | zachcarter: also, I think you should just get rid of the "tile is-child box" divs |
12:54:57 | FromGitter | <Varriount> I'd see what other clients are doing |
12:55:05 | zachcarter | okay |
12:55:36 | * | vlad1777d quit (Ping timeout: 240 seconds) |
12:55:41 | hlt | should I abuse generic operators |
12:55:42 | FromGitter | <andreaferretti> also, I don't now how your css framework works, but I think the main content should have two rows, one below the other - the first one with the editor and results, and the second one, just below, with the buttons |
12:55:54 | Tiberium | Varriount: so it means that library I'm using in Python just handles this automatically? |
12:56:13 | dom96 | zachcarter: all in all though, it's coming together and looking good :) |
12:56:15 | FromGitter | <Varriount> Tiberium: Probably. |
12:56:22 | Tiberium | and how do I send those "bits", because this long polling documentation doesn't say anything about that |
12:56:22 | zachcarter | thanks :D |
12:56:28 | Tiberium | I'm using AsyncHttpClient |
12:56:29 | FromGitter | <andreaferretti> yeah, it has much improved! |
12:56:31 | FromGitter | <Varriount> Tiberium: Could you send me the library link? |
12:56:39 | Tiberium | Varriount: it's rather big - aiohttp |
12:56:48 | Tiberium | https://github.com/aio-libs/aiohttp |
12:56:50 | hlt | i've made this: proc `|`[T1, T2](a: T1, b: proc(x: T1): T2): T2 = return b(a) |
12:57:01 | hlt | which acts like a shell pipe |
12:57:27 | FromGitter | <Varriount> Tiberium: But this is for a social network? |
12:57:49 | Tiberium | in Python everyone uses 3-rd party packages, almost as in node.js |
12:58:09 | Tiberium | standart library is not good for http requests, especially async |
12:58:34 | FromGitter | <Varriount> I know. I use Python daily |
12:59:10 | FromGitter | <Varriount> Do you have a link to the Python code that was interfacing with this social network? |
12:59:54 | euantor | Does the core httpclient send keepalives? |
13:00:04 | Tiberium | Varriount: yeah, but comments are in Russian - https://github.com/VKBots/VBot/blob/master/vbot.py#L215 |
13:00:06 | euantor | (or does the core asyncnet/net send them)? |
13:00:13 | euantor | That may be the problem if not |
13:00:36 | FromGitter | <Varriount> euantor: No. Python doesn't even do that by default. It's a protocol specific trait |
13:00:37 | yglukhov | Araq: can i constfold a nimnode tree in a macro? |
13:00:56 | euantor | ah, I wonder if that's the problem then |
13:01:02 | Tiberium | maybe as a workaround I can down default long polling timeout to 5 seconds (i'm using 20 right now) |
13:01:16 | euantor | In .net I'd just set `KeepAlive` to true on the socket and it works |
13:02:50 | Tiberium | In httpclient.nim there's only one "Keep-Alive": in generation of headers it adds "Connection: Keep-Alive\c\L" if there's no "Connection" header in headers |
13:04:19 | FromGitter | <Varriount> Tiberium: How many seconds until you get disconnected? |
13:04:58 | Tiberium | basically I'm handling timeouts properly: after a timeout, long polling server answers with new timestamp, and in next requests I need to use this new timestamp |
13:05:08 | Tiberium | It works like 20-30 minutes, and then fails. |
13:05:26 | Tiberium | but default long polling timeout is 20 seconds |
13:05:31 | dom96 | AFAIK long polling isn't part of the HTTP spec |
13:05:37 | dom96 | So I'm not sure how this works. |
13:05:47 | Tiberium | it's just a long http request |
13:06:10 | dom96 | Is there a spec for their protocol somewhere? |
13:06:15 | FromGitter | <Varriount> https://github.com/VKBots/VBot/blob/master/vbot.py#L143 |
13:06:31 | FromGitter | <Varriount> ^ What does that comment say? |
13:06:38 | Tiberium | about wait? |
13:06:40 | Tiberium | request timeout |
13:07:01 | Tiberium | (so how many seconds long polling will wait before answering with no events) |
13:07:26 | FromGitter | <Varriount> That's being passed to the polling action parameters |
13:07:37 | Tiberium | yes, social network also has an API |
13:08:04 | Tiberium | but you need to pass those parameters usually very rarely - every 24 hours |
13:08:14 | Tiberium | I mean to use those parameters |
13:08:25 | FromGitter | <Varriount> It will leave a connection open that long? You're sure? |
13:08:46 | Tiberium | yes |
13:08:48 | Tiberium | ah |
13:08:56 | FromGitter | <Varriount> I thought maybe the Python version was just handling the timeouts |
13:09:00 | Tiberium | I mean you need to send request to API every 24 hours |
13:09:08 | Tiberium | but you need to send HTTP requests every 25 seconds |
13:09:44 | FromGitter | <Varriount> Is the Nim client doing that? |
13:09:47 | Tiberium | ah I found english docs on this social network long polling |
13:09:47 | Tiberium | https://vk.com/dev/using_longpoll |
13:09:57 | Tiberium | Varriount: in nim client I'm sending new request every 20 seconds |
13:10:04 | Tiberium | this works for a while, and then fails |
13:10:21 | FromGitter | <Varriount> Huh. |
13:10:25 | Tiberium | (in bottom right of the page you can change the language) |
13:11:31 | FromGitter | <Varriount> I'm on a phone at the moment, but I would use a proxy program to monitor the HTTP data sent front both versions, and compare |
13:11:48 | zachcarter | going to head to work |
13:11:50 | zachcarter | but lmk what you think http://play.nim-lang.org/ |
13:12:09 | Tiberium | but the strangest thing is that nim client works for a while |
13:12:37 | Tiberium | I would try another work-around: recreate http client instance if this error happens |
13:12:40 | Tiberium | *will |
13:12:53 | euantor | Looks good zachcarter, though the compile log is all on one line rather than each line being on its own |
13:13:07 | zachcarter | I’ll work on that |
13:13:25 | dom96 | huh, the DNS doesn't resolve for me |
13:13:30 | Tiberium | for me too |
13:13:36 | zachcarter | I think it’s the cloudflare thing |
13:13:38 | zachcarter | it works in firefox for me |
13:13:41 | Tiberium | "GET https://play.nim-lang.org/ net::ERR_CONNECTION_REFUSED" |
13:13:42 | zachcarter | but not in chrome |
13:13:45 | zachcarter | try http |
13:13:52 | Tiberium | works |
13:14:55 | BennyElg | Anyone know what's the ETA for the printed version of the Nim-in-action to be ready to ship? |
13:15:00 | demi- | i cannot reach it over https in safari and it takes some time to load over http |
13:15:02 | dom96 | Better, but why did you move the buttons to the top? |
13:15:15 | dom96 | BennyElg: A month or so |
13:15:54 | zachcarter | dom96: easiest way I could get them to not stick to the bottom of the page and cause scrolling |
13:16:20 | FromGitter | <andreaferretti> what css framework are you using? |
13:16:26 | zachcarter | bulma.io |
13:17:00 | dom96 | You should switch to bulma's primary buttons |
13:17:02 | * | gokr joined #nim |
13:17:05 | dom96 | button is-primary |
13:17:21 | zachcarter | okay |
13:17:24 | BennyElg | I'm currently trying to talk with my head of software enginnering college to enter this language in some course sylbus at least for practices. |
13:17:32 | FromGitter | <andreaferretti> I think you can just stack up two tiles then |
13:17:43 | FromGitter | <andreaferretti> to have the buttons below the main content |
13:17:48 | BennyElg | I'm a lecturer there in python so I'm hoping we could manage to do so with Nim soon. |
13:17:51 | dom96 | yes, or perhaps two "columns" divs |
13:17:59 | zachcarter | okay I’ll give both those a shot |
13:18:06 | zachcarter | going to hop in the car but I’ll check logs when Ig et to work |
13:18:08 | * | zachcarter quit (Quit: zachcarter) |
13:18:15 | BennyElg | with the course of "Princepels of programming" |
13:18:21 | dom96 | BennyElg: ooh, that would be awesome. Would you be interested in using the book for the course? |
13:18:41 | BennyElg | Ya I already buy it ;) I'm waiting to get it |
13:18:50 | BennyElg | bought it * |
13:19:34 | dom96 | BennyElg: I wish I could speed up the process but it's now in Manning's hands. |
13:19:49 | dom96 | BennyElg: What college/uni are you with? |
13:19:49 | BennyElg | No problem, I got the online copy for now. |
13:19:52 | hlt | does nim have a hashmap implementation in the stdlib? |
13:19:59 | dom96 | hlt: tables module |
13:20:00 | * | sz0 joined #nim |
13:20:03 | BennyElg | I started to create the lectures ppt |
13:20:04 | BennyElg | s |
13:20:10 | hlt | thanks |
13:20:17 | BennyElg | SCE college of enginnering based in ISRAEL. |
13:20:51 | dom96 | BennyElg: nice, let me know if there is anything I can do to help :) |
13:20:57 | BennyElg | http://www.sce.ac.il/eng/ |
13:21:03 | BennyElg | Of course ;) thanks. |
13:21:15 | hlt | dom96: can i use this table without GC? if so, how? |
13:21:48 | dom96 | hlt: You can allocate it on the stack, just don't use TableRef but Table |
13:22:12 | hlt | okay |
13:22:25 | FromGitter | <Varriount> dom96: Parts of the table will have to be allocated on the stack |
13:22:41 | FromGitter | <Varriount> I mean, on the heap |
13:22:57 | hlt | i see in the docs that it's calling toTable on something like {1: "one", 2: "two"}. what is this initial argument? |
13:23:14 | FromGitter | <Varriount> A sequence. |
13:23:24 | dom96 | it's actually an array IIRC |
13:23:29 | dom96 | An array of tuples |
13:23:39 | dom96 | [(1, "one"), (2, "two")] |
13:23:41 | euantor | BennyElg: Some of those buildings look mighty impressive! I really like the design of the one in the slider at the top of the page with the street lights taken at evening/night |
13:24:14 | hlt | so {1: "one", 2: "two"} is converted into an array of tuples? is this a languag3e feature? |
13:24:19 | BennyElg | Yea, this campus is located in the city of "Beer Sheva" |
13:24:33 | FromGitter | <stisa> zachcarter: I think you are missing ``<meta name="viewport" content="width=device-width, initial-scale=1.0">`` in the header? It looks really tiny on my phone |
13:24:36 | dom96 | euantor: indeed, wow. |
13:24:43 | FromGitter | <Varriount> hlt: Yes. It's just an alternate array literal |
13:24:54 | hlt | okay |
13:25:10 | euantor | stisa I opened a PR for that earlier ;) |
13:25:17 | hlt | the docs only show a int -> string table, i am assuming i can create string -> string table just as well? |
13:25:17 | FromGitter | <Varriount> @rosado And conversely, just right on mine |
13:25:27 | FromGitter | <Varriount> Yes |
13:25:30 | dom96 | The virtual tour is pretty nice |
13:25:48 | hlt | okay, thanks |
13:26:05 | euantor | I was just about to go through the virtual tour dom96 |
13:26:18 | euantor | But it needs Flash |
13:26:26 | euantor | WHich I refuse to install on my system ;) |
13:26:45 | dom96 | heh :) |
13:26:52 | hlt | i'm trying to build a small example of a web framework |
13:26:56 | hlt | as a PoC |
13:27:09 | hlt | using templates and whatnot |
13:27:30 | FromGitter | <stisa> euantor : oh good, didn't check the repo |
13:30:17 | hlt | is there a way to create a "class method"? like in python |
13:31:02 | dom96 | 'method' |
13:31:08 | hlt | in python you can create a method with a @classmethod decoration and you can call the method statically and it will supply the method with a newly created class instance |
13:31:11 | euantor | I added some other stuff like a meta description and `x-ua-compatible` |
13:31:18 | FromGitter | <andreaferretti> just create a function? |
13:31:29 | FromGitter | <andreaferretti> and store any necessary state in a var? |
13:31:36 | euantor | but the PR now has conflicts, so I need to fix that |
13:32:33 | hlt | andreaferretti: I want to do something like HttpResponse.OK(response) and it will return a newly created HttpResponse with code: 200 and resp: response (HttpResponse is an object) |
13:32:44 | Tiberium | you can do that with a proc I think |
13:32:55 | Tiberium | because of UFCS |
13:33:07 | hlt | but afaik i cannot supply a type to a function? |
13:33:12 | dom96 | You can create a proc that takes a 'typedesc' or something similar IIRC |
13:33:28 | dom96 | typedesc[HttpResponse] maybe |
13:33:29 | hlt | it would be pointless anyway, i already know what type to create |
13:33:40 | hlt | dom96: oh maybe i can do something like that |
13:34:03 | hlt | typedesc = "type descriptor"? |
13:34:04 | euantor | Yeah, typedesc[HttpResponse] will work |
13:34:10 | dom96 | yeah |
13:34:17 | hlt | okay, very nice |
13:34:30 | FromGitter | <andreaferretti> but really, just call it `ok` and put it in a httpresponse module or something |
13:34:33 | hlt | i am very impressed with nim's meta programming capabilities so far |
13:34:47 | FromGitter | <andreaferretti> people can just call `ok(response)` |
13:34:57 | FromGitter | <andreaferretti> if ever the this is ambiguous |
13:35:06 | FromGitter | <andreaferretti> then `httpresponse.ok(response)` |
13:35:10 | Tiberium | hlt, you're creating some http library?? |
13:35:14 | hlt | FromGitter: yeah it's ambiguous |
13:35:14 | FromGitter | hlt, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
13:35:26 | FromGitter | <andreaferretti> you are just using types for namespacing, and modules are better suited for that |
13:35:27 | hlt | Tiberium: as a PoC |
13:35:34 | Tiberium | hlt, ok, nice |
13:35:44 | hlt | FromGitter: modules can have namespaces? |
13:35:44 | FromGitter | hlt, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
13:35:55 | FromGitter | <andreaferretti> modules *are* namespaces |
13:36:31 | hlt | so i do something like "include myFramework.HttpResponse" and then "HttpResponse.OK"? |
13:36:41 | FromGitter | <andreaferretti> nope |
13:36:50 | hlt | how so then? |
13:36:56 | FromGitter | <andreaferretti> you put your response functions in a module called - say - `httpresponse` |
13:36:59 | * | devted quit (Quit: Sleeping.) |
13:37:04 | hlt | okay |
13:37:10 | FromGitter | <andreaferretti> then you just `import httpresponse` and have all these functions in scope |
13:37:18 | Tiberium | and if you're using your framework outside of your framework, then you can use "import myFramework/httpresponse" |
13:37:22 | FromGitter | <andreaferretti> if this is ambiguous |
13:37:23 | Tiberium | (if it's installed via nimble) |
13:37:32 | FromGitter | <andreaferretti> (and it rarely is, because of overloading) |
13:37:43 | FromGitter | <andreaferretti> then you prefix them with the name of the module |
13:37:46 | hlt | ah it's / |
13:37:56 | FromGitter | <andreaferretti> like `httpresponse.ok(response)` |
13:38:01 | hlt | okay |
13:38:06 | hlt | it's case sensitive? |
13:38:24 | hlt | i mean the modules |
13:38:30 | dom96 | the first letter is |
13:38:37 | FromGitter | <andreaferretti> I think only the first letter, as everything else |
13:38:43 | FromGitter | <andreaferretti> but usually modules are lowercase |
13:38:45 | FromGitter | <Varriount> Which is odd, but works fairly well |
13:38:55 | hlt | very weird |
13:39:02 | dom96 | I'm curious if the typedesc works though |
13:39:07 | dom96 | Were you able to successfully use it? |
13:39:16 | hlt | i see this is the "correct way" of doing it, but typedesc is also a valid option right? |
13:39:23 | dom96 | if it works then sure |
13:39:24 | hlt | dom96: gonna try now |
13:39:32 | hlt | also gonna try to implement a template for it |
13:39:39 | dom96 | it would be a good way to enforce this prefix |
13:39:50 | FromGitter | <andreaferretti> I would use typedesc if you actually need to discriminate different types |
13:40:03 | hlt | can we have variadic templates? like a template that creates a function with arbitrary number of arguments |
13:40:28 | FromGitter | <andreaferretti> like `HttpResponse.ok(response)` and `Logger.ok(response)` |
13:40:30 | dom96 | You would need to use a macro for that |
13:40:32 | hlt | and get the arguments from template definition |
13:40:35 | FromGitter | <andreaferretti> or something |
13:40:37 | hlt | dom96: oh |
13:40:39 | hlt | okay then |
13:40:48 | hlt | i still can't wrap my head around macros tho |
13:40:55 | hlt | especially the AST stuff |
13:41:00 | hlt | uber metaprogramming |
13:41:04 | FromGitter | <andreaferretti> in any case, it is redundant if HttpResponse is the only choice that will ever be called |
13:41:18 | dom96 | yeah, they are a bit advanced. |
13:41:35 | * | Vladar quit (Remote host closed the connection) |
13:41:44 | hlt | also what's the equalivent of #define in Nim? |
13:41:44 | FromGitter | <Varriount> Macros are just procedures that execute at compile time, and output a syntax tree |
13:41:48 | hlt | cons |
13:41:51 | hlt | t? |
13:41:59 | dom96 | yeah, or template |
13:42:30 | hlt | templates are like |
13:42:31 | hlt | C macros |
13:42:31 | hlt | as i see it |
13:43:39 | FromGitter | <andreaferretti> C macros are textual |
13:43:43 | FromGitter | <andreaferretti> templates are not |
13:43:59 | FromGitter | <andreaferretti> there is no risk to mess up because, say, you forgot a parethesis |
13:44:21 | FromGitter | <stisa> dom96 : I think it would be nice to have zah's work reports ( https://github.com/nim-lang/Nim/issues/5672 ) in the blog, if they become a monthly or so thing, what do you think? |
13:52:07 | hlt | i get Table is not a concrete type when trying to use it in a object definition |
13:54:07 | FromGitter | <andreaferretti> it is parametric in its key and value |
13:54:23 | FromGitter | <andreaferretti> `Table[string, string]` is a concrete type |
13:54:44 | hlt | ah |
13:55:05 | hlt | like how java defines HashMap<String, String> |
13:55:07 | hlt | gotcha |
13:55:27 | dom96 | stisa: sure, I will feature them in BountySource updates which I will probably just cross-post to nim-lang.org |
13:57:43 | hlt | error| 'result' cannot be assigned to |
13:57:45 | hlt | ? |
13:57:52 | hlt | should I post my code? |
13:58:03 | Araq | hlt: don't declare 'result' |
13:58:16 | Araq | it's implicitly declared for you to reflect the return value |
13:58:46 | hlt | what do you mean? result is already a HttpResponse object you mean? |
13:58:55 | hlt | does it automatically instantiated? |
13:58:58 | hlt | is it* |
13:59:23 | FromGitter | <andreaferretti> yup |
13:59:31 | Tiberium | hlt, it is instantiated, but with all nil values |
13:59:41 | Tiberium | or just with empty, I don't remember |
13:59:43 | hlt | does the same thing happen with GC off? |
13:59:49 | Tiberium | yes |
13:59:54 | Tiberium | ah |
13:59:55 | * | vlad1777d joined #nim |
13:59:58 | Tiberium | I don't know :) |
14:00:08 | * | zachcarter joined #nim |
14:00:46 | hlt | okay, it's now saying "error| undeclared identifier: 'result'" |
14:01:04 | Tiberium | hlt, show your code |
14:01:06 | hlt | it was declared but now not declared..? |
14:01:15 | Tiberium | "result" is available only inside of proc |
14:01:33 | hlt | http://termbin.com/fw29 |
14:01:36 | hlt | yes |
14:01:39 | hlt | i'm inside the proc |
14:02:31 | Tiberium | hlt, you need new(result) probably |
14:02:48 | hlt | just that statement? |
14:02:54 | hlt | or result = new(result) |
14:03:07 | Tiberium | just that statement |
14:03:14 | hlt | okay then |
14:03:20 | Tiberium | at the start of the proc |
14:04:00 | euantor | You're missing the `=` |
14:04:26 | euantor | https://www.irccloud.com/pastebin/sDGQdmvD/ |
14:04:46 | Tiberium | ah lol |
14:04:48 | * | zachcarter quit (Ping timeout: 260 seconds) |
14:04:49 | Tiberium | didn't notice it |
14:05:12 | hlt | crap |
14:05:15 | hlt | didn't notice |
14:05:39 | hlt | about 20 errors from nvim just went away with one char |
14:05:45 | * | devted joined #nim |
14:05:53 | hlt | really gotta improve the error messages guys |
14:06:55 | euantor | I would have expected a totally different error. Usually you would get an error about invalid indentation in that case |
14:07:06 | hlt | i did get such an error |
14:07:09 | FromGitter | <stisa> hlt: I get an ``implementation of OK .... expected`` |
14:07:18 | hlt | but i thought it was because something else |
14:07:35 | hlt | stisa: i got that, euantor's error and like 20 others |
14:07:57 | hlt | it compiles and runs fine now |
14:13:21 | hlt | how do i compile code to javascript? |
14:13:54 | Tiberium | hlt, using "nim js file.nim" |
14:13:58 | hlt | okay |
14:14:01 | Tiberium | so "c" is actually a language |
14:14:06 | hlt | nim's default output says nothing about it tho |
14:14:08 | hlt | only c |
14:14:18 | * | zachcarter joined #nim |
14:14:24 | Tiberium | hlt, even more: there's hidden PHP :D |
14:14:32 | hlt | seriously? |
14:14:35 | Tiberium | yep |
14:14:38 | Tiberium | "nim php file.nim" |
14:14:46 | Tiberium | and look in file.php in nimcache |
14:15:12 | Tiberium | but you will have to import many functions from PHP |
14:15:19 | Tiberium | because you will not able to use "os" module |
14:16:04 | hlt | dear god the js code generated from nim is so ugly |
14:16:12 | FromGitter | <stisa> also node.js with `nim js -d:nodejs` . Most of the commands are listed in `nim --advanced I think` |
14:17:05 | Tiberium | hlt, because it's not generated, it's compiled from Nim :) |
14:17:10 | Tiberium | why it should be looking good? |
14:17:15 | Tiberium | it's not a thing like typescript |
14:17:20 | Tiberium | it's entirely different language |
14:17:23 | hlt | so it doesn't make eyes bleed |
14:17:35 | Araq | oh if you use the PHP backend, you have to pay me $1000 for every day you use it |
14:17:47 | Tiberium | Araq, dafuq? |
14:17:51 | Araq | :D |
14:17:57 | demi- | seems legit |
14:18:07 | hlt | the C++ is even worse |
14:18:17 | hlt | then again it's just transpiled |
14:18:21 | hlt | so i don't expect much |
14:18:23 | Araq | hlt: use -d:release and then the code looks better |
14:18:32 | Tiberium | (because less code) |
14:18:38 | Araq | and no, it is not transpiled because there is no such thing :P |
14:19:06 | hlt | Araq: yeah |
14:19:29 | Tiberium | C++ to asm - compilation; then why Nim to C++ is not compilation? |
14:20:14 | hlt | Httpresponse_pzwTMH9aj9an79cF9cT4QFSggQ LOC1; beautiful |
14:20:27 | hlt | i get why it's like this tho |
14:20:37 | Tiberium | hlt, because of name mangling |
14:20:43 | hlt | yes |
14:20:46 | hlt | i know |
14:21:05 | demi- | not sure why you care about the "prettiness" of the C++ code, do you apply the same standards to how ASM looks like after you run it through your C compiler? |
14:21:20 | demi- | not like C++ was winning any awards for looking good in the first place |
14:21:22 | hlt | when i'm handtuning |
14:21:54 | demi- | if you need to hand-tune, you can emit and embed C++/C/ASM in your nim code |
14:23:13 | hlt | oh that's good |
14:23:20 | hlt | C++ and C too? nice |
14:23:41 | demi- | please have a look at the nim language manual, it goes into detail about all of these things. |
14:24:10 | Araq | I never use C for handtuning, I tune the Nim code instead |
14:24:23 | Araq | a subset of Nim maps 1 to 1 to C anyway. |
14:24:44 | demi- | yeah, i'm trying to think of a case that would require such a thing and i think the vast majority of it would be nim runtime stuff |
14:26:06 | hlt | demi-: i can't really look at the manual because the javascript search functionality hangs my web browser for about 90 seconds everytime i visit it |
14:26:48 | hlt | (i'm trying nim on an android chroot, sue me) |
14:27:13 | demi- | hlt: https://nim-lang.org/docs/manual.html if you curl it you should be able to grep for most things. |
14:27:18 | Araq | Tiberium: if you depend on the PHP codegen, add some tests for it please |
14:27:21 | FromGitter | <stisa> hlt you can build a pdf from latex with Koch I think |
14:27:22 | hlt | okay, thanks |
14:27:29 | hlt | FromGitter: oh? |
14:27:30 | FromGitter | hlt, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
14:27:34 | hlt | dammit |
14:27:59 | Tiberium | Araq, I don't, I just found info about secret PHP codegen. (I only tested simple things like importing sequtils and strutils, and converting user input to sequence of integers) |
14:28:15 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:28:39 | Araq | Tiberium: because otherwise it'll bitrot and I'd like to remove it again |
14:32:25 | Tiberium | Araq, again? you did remove it in the past? |
14:35:17 | Araq | no I mean 'again' because it used to not exist |
14:35:42 | Tiberium | Araq, also looking at js tests I think some of the tests can be just copied? |
14:36:42 | Araq | sure or just patch the tester so that every test in 'JS' is also tested with php |
14:37:12 | Tiberium | Araq, some of JS tests are also bound to JS (using {.importc.} to import console, or emitting JS code) |
14:39:27 | * | BennyElg quit (Remote host closed the connection) |
14:42:07 | Tiberium | *cough* I was a bit optimistic |
14:42:51 | yglukhov | Araq: can i eval/constfold nodes inside a macro? |
14:45:24 | * | gokr quit (Ping timeout: 260 seconds) |
14:46:34 | * | girvo quit (Quit: leaving) |
14:49:03 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
14:51:01 | jrenner0001 | why is {.importc.} not called importjs when using JS? |
15:00:21 | ftsf | maybe it should be called {.importffi.} or something |
15:05:37 | demi- | well we have importobjc as well |
15:06:44 | Araq | yglukhov: krux02 might be able to do that with a helper macro. I used to think it's impossible. |
15:07:51 | * | gokr joined #nim |
15:11:27 | * | gokr quit (Read error: Connection reset by peer) |
15:14:42 | Araq | jrenner0001: laziness but if we come up with better names, we need to keep in mind that the JS backend supports 'importcpp' too |
15:15:40 | Tiberium | Araq, how? |
15:15:45 | Tiberium | node.js magic? |
15:16:24 | Araq | no, it's "Import from JS, using this pattern" |
15:24:44 | * | PMunch joined #nim |
15:27:27 | * | Arrrr joined #nim |
15:31:57 | * | zachcarter quit (Quit: zachcarter) |
15:40:26 | * | nsf quit (Quit: WeeChat 1.7) |
15:45:05 | * | brson joined #nim |
15:48:06 | Tiberium | honestly, I love nim macros now, even if I'm not very experienced in Nim, I'm able to create something like this: https://github.com/VKBots/Nickel/blob/master/src/modules/example.nim |
15:52:59 | * | Tiberium quit (Read error: Connection reset by peer) |
15:54:45 | * | Tiberium joined #nim |
15:56:29 | * | zachcarter joined #nim |
16:03:42 | Araq | пожалуйста |
16:04:10 | Tiberium | Araq, wow :) |
16:05:45 | Araq | Я люблю рисовать женщин |
16:06:32 | FromGitter | <Varriount> Araq: Do you actually know russian? |
16:06:48 | Araq | ... and that's pretty much all I know -.- |
16:06:58 | Tiberium | Araq, oh, I am impressed |
16:07:26 | Araq | plus I had to lookup the case of женщин |
16:08:17 | Araq | XD |
16:08:36 | Araq | Varriount: I'm learning it. |
16:09:28 | Tiberium | Araq, now I am 110% sure that I need to use Nim |
16:10:42 | Araq | it's fun. different letters, sounds, words and grammar. the ultimate challenge |
16:11:05 | * | Jesin quit (Quit: Leaving) |
16:14:28 | * | Jesin joined #nim |
16:17:04 | * | Arrrr quit (Quit: Leaving.) |
16:23:42 | * | PMunch quit (Quit: leaving) |
16:30:53 | FromGitter | <Varriount> I just wish I didn't have to learn German to graduate. |
16:31:07 | FromGitter | <Varriount> I'd love to learn it without this pressure. |
16:32:10 | * | Vladar joined #nim |
16:34:51 | chemist69 | Du schaffst das schon! |
16:35:01 | euantor | I had to learn German and French during high school, but can remember very little of either language |
16:35:13 | euantor | I struggle enough with English, never mind foreign languages |
16:37:36 | Tiberium | And in Russia in the most cases we learn English at school |
16:37:44 | Tiberium | (as I do) |
16:40:38 | * | krux02 quit (Remote host closed the connection) |
16:41:01 | couven92 | just noticed that Nim has no entry at the bottom of http://json.org/ |
16:41:21 | couven92 | Shouldn't we try to get a link to Nim's JSON module there? |
16:41:38 | def- | couven92: sure, go ahead |
16:41:47 | couven92 | (Anyone know who to call for that? :P ) |
16:42:40 | couven92 | i.e. who's resposible for the json.org page? |
16:44:02 | FromGitter | <Varriount> euantor: I get to learn it at University, while working a full time job. :D |
16:44:19 | FromGitter | <Varriount> I suspect it might be easier if I was able to use it in everyday life. |
16:46:41 | euantor | Nice, sounds like fun. I didn't have to learn too much of it, I only learned German for 2 years and French for 4, with fairly basic exams. I did spend 2 weeks in germany and 2 weeks in France which really helped at the time |
16:49:06 | yglukhov | Araq: afair there was some way to hook onto thread setup/teardown events? |
16:51:27 | Araq | yglukhov: we removed setup hook again, it was impossible to use without logical races |
16:51:36 | Araq | teardown hook still exists |
16:57:36 | hlt | is there a possibility of a nim-shell in the future? |
16:58:03 | hlt | since nim can compile down to js, i assume it would be able to make a repl for it |
16:58:19 | hlt | it would be possible* |
16:58:35 | Tiberium | hlt, why do you want to have it? there's "nim secret" |
16:59:22 | Tiberium | hlt, but don't forget that nim is a compiled language :) |
17:00:26 | hlt | nim secret? |
17:00:28 | hlt | whoa |
17:00:30 | hlt | why is it a secret tho |
17:00:43 | Tiberium | because you can't run every code |
17:00:58 | Tiberium | try, for example, "import os" |
17:01:54 | hlt | wew |
17:02:13 | hlt | it needs to use gettext |
17:02:23 | hlt | i can't move the cursor and get history :/ |
17:02:31 | hlt | erm, realine* not gettext |
17:02:34 | hlt | i got confused |
17:03:49 | def- | hlt: ./koch boot -d:release -d:useLinenoise |
17:04:13 | euantor | nim secret is still a work in progress too as far as I know |
17:04:59 | hlt | is there a way to do threaded compiling? like make -jX |
17:05:05 | hlt | with nim |
17:05:23 | hlt | def-: thanks |
17:07:05 | Tiberium | btw, what options from nim --advanced are turned "on" by default? is there a list of it? |
17:07:25 | def- | Tiberium: see config/nim.cfg |
17:08:04 | Tiberium | def-, I'm asking about things like "--implicitStatic:on|off" |
17:10:06 | hlt | is there a text-replace funtion like C's #define X Y? |
17:10:49 | def- | hlt: we use templates for that and they operate on AST, not text level |
17:11:04 | * | adeohluwa joined #nim |
17:11:20 | couven92 | hlt, you can of course also alias any type and proc if you want |
17:11:33 | * | tigerfinch joined #nim |
17:11:50 | hlt | okay |
17:12:03 | couven92 | that's also a lot safer than being able to do `#define if sthElse` |
17:12:40 | tigerfinch | Hey! Does anyone here know who I can contact about signing up for the forum? I have not received the email to confirm it (signed up yesterday, checked spam etc.) |
17:12:48 | * | rauss joined #nim |
17:13:28 | def- | tigerfinch: dom96 was doing forum stuff I think |
17:15:40 | FromGitter | <Varriount> hlt: https://nim-lang.org/docs/filters.html |
17:16:10 | tigerfinch | def-: thanks |
17:16:29 | tigerfinch | dom96: any thoughts? |
17:17:13 | Tiberium | hlt, you want https://nim-lang.org/docs/filters.html#available-filters-replace-filter |
17:17:22 | Tiberium | but instead, use something more high-level :) |
17:27:46 | dom96 | tigerfinch: what's your username? |
17:28:04 | tigerfinch | dom96: tigerchops |
17:28:32 | dom96 | tigerfinch: I activated it for you |
17:28:38 | tigerfinch | dom96: thanks so much! |
17:29:11 | tigerfinch | dom96: can login now, thanks again!~ |
17:29:19 | dom96 | np |
17:35:52 | Tiberium | dom96, also, I have a question - why "nimcache" is not prefixed with "_" like "_nimcache" ? |
17:36:24 | Tiberium | ah sorry |
17:36:29 | Tiberium | I mean ".nimcache" |
17:36:31 | Tiberium | with a dot |
17:37:14 | yglukhov | Tiberium: you can override nimcache path with nim cmdline option |
17:37:48 | Tiberium | yglukhov, just curious why it's not ".nimcache" by default :) |
17:38:13 | Tiberium | yglukhov, thanks for info though |
17:43:56 | jrenner0001 | .nimcache sounds nice, then I wouldn't accidentally add it to a fresh git repo |
17:45:17 | dom96 | Tiberium: Ask Araq :) |
17:50:44 | * | BennyElg joined #nim |
17:51:05 | jrenner0001 | just signed up monthly contribution for Nim at bountysource :) |
17:51:53 | * | rauss quit (Ping timeout: 240 seconds) |
17:51:56 | * | arnetheduck quit (Remote host closed the connection) |
17:53:16 | * | BennyElg_ joined #nim |
17:53:16 | * | BennyElg quit (Read error: Connection reset by peer) |
17:54:10 | * | rauss joined #nim |
17:54:21 | dom96 | jrenner0001: awesome, thanks! :D |
17:55:07 | * | couven92 quit (Ping timeout: 255 seconds) |
18:16:05 | FromGitter | <TiberiumPY> zachcarter: http://i.imgur.com/oaO0IPi.jpg |
18:16:30 | jrenner0001 | FromGitter: haha |
18:16:30 | FromGitter | jrenner0001, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/nim-lang/Nim |
18:20:44 | FromGitter | <stisa> @TiberiumPY I think this https://github.com/zacharycarter/nim-playground-frontend/pull/1 should fix it |
18:21:36 | Araq | Tiberium: because I hate dirs starting with a dot. hiding directories never hides the implementation complexities. and more often than not I need to dig into a dot dir to fix something |
18:22:26 | Araq | .bashrc, .git/config, etc etc |
18:22:55 | * | yglukhov quit (Remote host closed the connection) |
18:24:09 | jrenner0001 | for what it's worth python doesn't put it's cache behind a dot either |
18:28:08 | * | yglukhov joined #nim |
18:28:10 | * | yglukhov quit (Remote host closed the connection) |
18:28:43 | * | yglukhov joined #nim |
18:30:00 | Tiberium | jrenner0001, but it does put it under __pycache__ |
18:33:14 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:33:48 | jrenner0001 | right but 'ls' will still see __pycache__ |
18:34:04 | * | SusWombat quit (Remote host closed the connection) |
18:34:13 | * | SusWombat joined #nim |
18:34:33 | * | libman joined #nim |
18:34:39 | * | libman quit (Changing host) |
18:34:39 | * | libman joined #nim |
18:38:54 | * | Snircle quit (Excess Flood) |
18:41:35 | * | nsf joined #nim |
18:50:47 | zachcarter | TiberiumPY: Working on that one |
18:57:29 | dom96 | wow, so many RTs for your tweet ftsf :) |
19:03:22 | Tiberium | eh, time to actually find out how to change nickname on gitter after I changed it on github. I'm no longer "py" but "n" |
19:04:34 | FromGitter | <TiberiumN> test |
19:04:36 | Tiberium | yay |
19:09:07 | * | vivus quit (Quit: Leaving) |
19:15:43 | jrenner0001 | what tweet is this |
19:19:05 | dom96 | https://twitter.com/impbox/status/857500978131619840 |
19:19:17 | zachcarter | TiberiumPY: shoudl be fixed now |
19:20:44 | * | BennyElg_ quit (Ping timeout: 260 seconds) |
19:20:58 | Tiberium | zachcarter, yes, nice! |
19:21:05 | zachcarter | thanks :D |
19:22:41 | * | BennyElg joined #nim |
19:26:15 | * | yglukhov joined #nim |
19:26:31 | * | Ven joined #nim |
19:26:42 | * | BennyElg_ joined #nim |
19:26:44 | dom96 | zachcarter: nice. |
19:26:55 | * | Ven is now known as Guest68828 |
19:27:00 | dom96 | Still some things that I would fix, but maybe I'm just too picky :) |
19:27:18 | zachcarter | dom96 lay em on me |
19:27:39 | dom96 | the compile log should have a scroll bar (it grows to show all its output) |
19:27:45 | zachcarter | okay |
19:28:05 | dom96 | I would align the compile log box to the ace editor :) |
19:28:06 | * | BennyElg quit (Ping timeout: 260 seconds) |
19:28:15 | dom96 | it's slightly lower down |
19:28:30 | zachcarter | okay cool |
19:28:30 | dom96 | The "compile" text is also out of alignment, should be moved to the right |
19:28:41 | dom96 | and there is too much spacing above and below it |
19:28:58 | zachcarter | okay |
19:29:09 | zachcarter | I think i can manage all those |
19:34:35 | * | Vladar quit (Quit: Leaving) |
19:36:36 | * | captain-adequate quit (Ping timeout: 240 seconds) |
19:39:03 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
19:42:18 | * | rokups quit (Quit: Connection closed for inactivity) |
19:43:51 | Tiberium | ehh, probably tomorrow will need to debug "Connection was closed before full request has been made" using gdb or something like that |
19:43:56 | Tiberium | will *try* to debug |
19:51:29 | ldlework | /spam dom96 and I are in a channel called #techgems which is all about appreciating technology to have a place to get away from continuous pessimism you can find in any other channel on this network. Come join us if that sounds pleasant. |
19:57:51 | Tiberium | oh, it seems that gdb doesn't help much |
19:58:13 | jrenner0001 | does the json module only convert from object to JSON? looks like I need to code the deserialization myself, right? |
19:58:42 | Tiberium | jrenner0001, no, you can use it to parse JSON |
19:59:02 | Tiberium | jrenner0001, but if you want to convert it to object, use nimyaml or (not recommended) marshal |
19:59:04 | * | rauss quit (Quit: WeeChat 1.7.1) |
20:00:06 | jrenner0001 | right, I can parse the json, but it's not automatically the type I want |
20:00:27 | jrenner0001 | let's say a typical Person object with age: int and name:string, I can just automatically get a Person from a string using the json module I assume |
20:00:34 | jrenner0001 | *can't |
20:00:54 | Tiberium | jrenner0001, you can via marshal, but it's not recommended :) |
20:01:00 | Tiberium | because marshal internal format can change |
20:01:04 | Tiberium | look at "nimyaml" in nimble |
20:01:17 | jrenner0001 | ok |
20:01:44 | Araq | the new json module can do that too. right, dom96? |
20:02:06 | Tiberium | wow |
20:02:08 | dom96 | yes, on devel we have a new 'to' macro that can do this |
20:02:10 | Tiberium | really? |
20:02:13 | Tiberium | NEAT! |
20:02:16 | dom96 | I implemented it recently |
20:02:19 | jrenner0001 | hmm maybe I should try it |
20:02:22 | dom96 | So you might run into bugs |
20:02:58 | Tiberium | dom96, any suggestions how to debug my problem (I'll try to debug it tomorrow)? With "connection was closed before full request was made". |
20:03:05 | Tiberium | ah, nevermind, firstly I'll try proxy |
20:03:24 | dom96 | https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#L1723 |
20:03:26 | Tiberium | to see there my http requests differ from python app... |
20:03:31 | Tiberium | *where |
20:03:44 | dom96 | yes, best thing is to see what the python app sends |
20:04:34 | jrenner0001 | oh, the version of nim I'm using already has that commit, how convient, now I'll try it |
20:04:42 | Tiberium | dom96, does it support object variants? I mean "to" macro. |
20:05:07 | dom96 | yep |
20:05:34 | Tiberium | dom96, nice! because for now I have things like this: https://github.com/VKBots/Nickel/blob/master/src/vkbot.nim#L80 |
20:06:03 | * | Tiberium quit (Remote host closed the connection) |
20:09:13 | jrenner0001 | it worked for a simple object but failed for a more complicated one |
20:10:04 | jrenner0001 | I'll enjoy it when it's stable |
20:10:34 | dom96 | jrenner0001: please report that as a bug |
20:11:56 | jrenner0001 | ok |
20:17:26 | jrenner0001 | https://github.com/nim-lang/Nim/issues/5761 |
20:24:13 | FromGitter | <TiberiumN> Oh, I used imgur for sharing screenshots, and now in my imgur profile I have "-25 points". Nice lol |
20:28:37 | * | couven92 joined #nim |
20:34:24 | * | yglukhov quit (Remote host closed the connection) |
20:43:05 | * | yglukhov joined #nim |
20:49:15 | * | yglukhov quit (Remote host closed the connection) |
20:51:47 | * | Guest68828 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:52:30 | * | yglukhov joined #nim |
20:52:56 | * | yglukhov quit (Read error: Connection reset by peer) |
20:53:25 | * | yglukhov joined #nim |
20:57:03 | FromGitter | <Varriount> Likely because Araq hates following Unixisms |
20:57:48 | * | yglukhov quit (Ping timeout: 260 seconds) |
21:01:34 | * | zachcarter quit (Ping timeout: 268 seconds) |
21:05:48 | Araq | huh? I've already explained why. |
21:06:30 | Araq | but yeah, if you want to create a good tool, avoiding Unixisms like the plague is a very good start. |
21:11:19 | FromGitter | <Varriount> Araq: We should probably stop using dike extensions too |
21:11:24 | FromGitter | <Varriount> *file |
21:12:06 | Araq | yeah, let's get rid of the type system for filenames. smart move. |
21:14:32 | Araq | https://www.dwheeler.com/essays/fixing-unix-linux-filenames.html |
21:15:38 | * | willprice quit (Quit: Leaving) |
21:16:02 | FromGitter | <ZDZero_twitter> so, uhm, hello. a proc that can throw an exception is considered to have a side effect? Or is that a bit too exceptional? |
21:16:25 | FromGitter | <ZDZero_twitter> (reaaaally new to Nim) |
21:22:12 | Araq | no, raising an exception is not a sideeffect |
21:22:26 | couven92 | Hmm... I am considering to write a Windows package manager... I am a bit torn whether to do it in C# (my main language) or to do it in Nim... :P |
21:23:00 | Araq | Nim. C# won't run well on Windows XP |
21:23:09 | FromGitter | <TiberiumN> Windows XP? |
21:23:18 | couven92 | Araq, nice argument! :) |
21:23:22 | Araq | or reactOS (?) |
21:23:51 | couven92 | But Araq, I think we could get .NET Core to run on XP... (although I haven't actually tried it...) |
21:24:13 | * | bjz joined #nim |
21:24:16 | FromGitter | <TiberiumN> Oh, yes, reactos |
21:24:24 | FromGitter | <TiberiumN> But it's hard to run on real hardware |
21:24:33 | Araq | ok, so your package manager requires to mess with package management to be installed |
21:24:40 | dom96 | couven92: any news on SChannel? |
21:24:57 | Araq | dom96: we don't want SChannel. |
21:25:18 | dom96 | Araq: Why not? |
21:25:30 | couven92 | dom96, working on it, but I have a hand-in tomorrow... so right now I am battling with JavaScript... :/ |
21:25:36 | Araq | read the IRC logs, it doesn't work on Win XP |
21:25:37 | dom96 | I do, so that already refutes your statement :P |
21:26:23 | dom96 | So? Windows Vista+ already covers a vast majority. |
21:26:23 | Araq | couven92: Nim can generate JS code :P |
21:26:52 | Araq | win xp support is one of Nim's strengths and there are more Win XP users out there than there are Linux users. |
21:26:54 | couven92 | Araq, I was actually thinking about sth lik karax! :D |
21:27:15 | dom96 | Araq: When was the last time you tested Nim on Win XP? |
21:27:26 | Araq | I know you did recently. |
21:27:37 | Araq | I know Arrr does it. |
21:27:42 | dom96 | That doesn't matter though. |
21:27:55 | dom96 | I want to have dependency-free SSL on Windows Vista+ |
21:28:07 | dom96 | Win XP can use openssl. |
21:28:13 | dom96 | What's the problem with that? |
21:28:32 | Araq | we can get that by other means. |
21:28:42 | Araq | this has all been discussed. |
21:28:52 | Araq | and I won't repeat it here. |
21:28:54 | couven92 | Araq, by bundling OpenSSL in Nim? |
21:28:56 | * | captain-adequate joined #nim |
21:29:02 | dom96 | It was never resolved. |
21:29:19 | dom96 | And I do remember that conversation. |
21:29:30 | Araq | it was. I am the BDFL. |
21:30:38 | dom96 | That doesn't give you authority over Nimble packages. |
21:31:02 | Araq | it gives me the final say when we cannot agree. |
21:31:14 | Araq | it also means discussions can end. |
21:31:37 | dom96 | In all due respect, this is up to couven92 to decide. |
21:32:06 | Araq | it's up to us if it makes it into the core. |
21:33:31 | dom96 | We aren't arguing about this. |
21:33:35 | couven92 | yeah, I am doing it as a nimble package now... And it's taking it's time, because I haven't really used Nim much before (just on code-bases where I worked together with PMunch) |
21:33:48 | dom96 | ^^ |
21:34:54 | dom96 | I'm happy with a Nimble package. |
21:34:56 | couven92 | So I am really learning a lot about Nim right now, and loving it BTW! So since I agree with dom96 on the dependency-stuff, I think this is a nice oppurtunity to do some good |
21:35:28 | Araq | hmm, couven92 aren't you the developer of the vccexe tool? |
21:36:03 | couven92 | yeah, and you told me my code is awful to read, when I did my first PR last year! :D |
21:36:06 | dom96 | couven92: Glad to hear it. I'm also glad that you haven't been discouraged from this project. |
21:37:17 | Araq | couven92: aww, I thought you use Nim extensively with VCC already ;-) |
21:37:25 | * | yglukhov joined #nim |
21:37:52 | couven92 | Araq, I do! :D Whenever PMunch pitches some project to me! :D |
21:38:16 | couven92 | That's how I ended up in wxWidgets for example |
21:39:19 | couven92 | PMunch and I also used Nim as a very simple 30-lines code generator tool for a big commercial project we worked on |
21:39:34 | dom96 | Araq: Do you also have something against implementing Secure Transport? |
21:40:29 | dom96 | (macOS' SSL implementation) |
21:40:46 | couven92 | BTW, PMunch and I are thinking about doing a Nim-Talk or Workshop at our University. We haven't planned anything yet, but we agreed that it would be nice-to-have... So we'll probably start planning that soon, when we need distraction form our MSc. |
21:41:24 | Araq | dom96: I doubt it since I suspect Apple will make it requirement for its app store, if it hasn't done that already |
21:41:40 | dom96 | Honestly, preventing hassle free SSL on Windows Vista+ for the sake of Windows XP is ridiculous. |
21:42:08 | * | yglukhov quit (Ping timeout: 260 seconds) |
21:42:15 | Araq | if there were no other means to get "hassle free", perhaps |
21:42:48 | Araq | I think it's more ridiculous we don't ship some .c files just because Linux packagers then wouldn't package Nim anymore |
21:43:14 | Araq | (as if Linux packaging would work in the first place) |
21:43:22 | dom96 | It's not as if this will break Windows XP |
21:43:31 | dom96 | We can provide a binary that works with openssl for Windows XP |
21:43:53 | Araq | that's true but it requires 2x the testing effort |
21:44:14 | Araq | a Win XP testing machine would be nice |
21:44:30 | * | PMunch joined #nim |
21:45:21 | dom96 | We should test Win XP anyway |
21:45:29 | dom96 | if support for it is that important |
21:45:44 | Araq | agreed. any ideas how to do it? |
21:47:59 | dom96 | We would need a dedicated server machine for this |
21:48:01 | couven92 | Araq, I can have it arranged to obtain free computing power on a Windows XP machine on our University servers for Nim testing purposes if you like |
21:49:23 | couven92 | I have a server that currently is idling in our server room and waits for a new OS and sth to do :P |
21:50:11 | Araq | couven92: thanks, we can try that |
21:50:17 | couven92 | and being a student I have Windows XP licenses I don't use (since I don't use WinXP for anything anymore) |
21:50:53 | couven92 | ok, I can set it up tomorrow afternoon (after I have delivered the project I am currently working on) |
21:51:17 | couven92 | So, that would be a standard Nim distribution with MinGW on Win XP, right? |
21:51:42 | couven92 | Or shall I maybe also try it with VCC? :P |
21:52:16 | dom96 | Might be better to focus on MinGW for XP |
21:52:22 | dom96 | Unless MinGW has poor XP support |
21:52:23 | couven92 | agreed |
21:53:55 | couven92 | BTW, I just got invited to the JSON Yahoo group... I have started a new thread there to get Nim and the json module to be listed on http://json.org/ (at the bottom) |
21:54:36 | dom96 | nice :) |
21:54:44 | FromGitter | <TiberiumN> Also nimyaml maybe? |
21:55:01 | FromGitter | <TiberiumN> Because on this site there's more than one library for a language |
21:55:25 | * | yglukhov joined #nim |
21:55:51 | couven92 | @TiberiumN, I think nimyaml isn't for JSON, right? |
21:56:20 | couven92 | on json.org (which is the documentation page for JSON) we should limit ourselves to the json module |
21:56:29 | FromGitter | <TiberiumN> It can serializ and deserialize it |
21:58:10 | FromGitter | <TiberiumN> But anyway, stdlib module needs to be there first |
22:06:25 | Araq | Yaml is a superset of JSON |
22:12:04 | * | StarBrilliant quit (Ping timeout: 255 seconds) |
22:13:52 | jrenner0001 | I did not know that |
22:13:56 | jrenner0001 | http://stackoverflow.com/questions/1726802/what-is-the-difference-between-yaml-and-json-when-to-prefer-one-over-the-other |
22:13:59 | * | nsf quit (Quit: WeeChat 1.7) |
22:14:04 | * | jtremback_____ joined #nim |
22:14:18 | * | StarBrilliant joined #nim |
22:14:54 | * | jtremback____ quit (Ping timeout: 240 seconds) |
22:14:54 | * | RushPL quit (Remote host closed the connection) |
22:14:55 | * | Xe quit (Ping timeout: 240 seconds) |
22:15:47 | * | RushPL joined #nim |
22:16:12 | * | jackv quit (Ping timeout: 268 seconds) |
22:17:07 | * | benoliver999 quit (Ping timeout: 240 seconds) |
22:17:07 | * | kunev quit (Ping timeout: 240 seconds) |
22:17:08 | * | zielmicha_ quit (Ping timeout: 240 seconds) |
22:17:30 | * | benoliver999_ joined #nim |
22:17:39 | * | kunev joined #nim |
22:18:33 | * | benoliver999_ is now known as benoliver999 |
22:18:40 | * | Xe` joined #nim |
22:18:44 | * | devted quit (Quit: Sleeping.) |
22:18:44 | * | niv quit (Ping timeout: 240 seconds) |
22:21:19 | * | jackv joined #nim |
22:23:21 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:27:16 | * | zielmicha_ joined #nim |
22:28:28 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:34:28 | * | sz0 quit (Quit: Connection closed for inactivity) |
22:41:55 | * | zachcarter joined #nim |
22:42:22 | * | yglukhov quit (Remote host closed the connection) |
22:59:39 | * | cspar joined #nim |
23:02:33 | * | cspar__ quit (Ping timeout: 258 seconds) |
23:08:17 | * | jrenner0001 quit (Quit: WeeChat 1.4) |
23:09:39 | * | Xe` is now known as Xe |
23:12:21 | zachcarter | can anyone help me with css on : http://play.nim-lang.org/ |
23:12:27 | zachcarter | I need to prevent the logs from resizing |
23:12:38 | zachcarter | if you type in : |
23:12:39 | zachcarter | for i in 0..<100: |
23:12:39 | zachcarter | echo i |
23:12:52 | zachcarter | to the editor, and click compile - you’ll see what I mean |
23:14:52 | pydsigner | zachcarter: did you see my mod? |
23:15:04 | zachcarter | I did, but everyone hated the dark theme :/ |
23:15:15 | zachcarter | not yours I mean, but mine haha |
23:15:59 | PMunch | overflow:scroll? |
23:16:06 | zachcarter | I tried that PMunch |
23:16:07 | zachcarter | doesn’t work |
23:16:16 | pydsigner | zachcarter: combine it with a max-height |
23:16:25 | zachcarter | I don’t want to hardcode a height :/ |
23:16:39 | couven92 | set it to 100%? |
23:16:42 | zachcarter | tried that |
23:16:53 | zachcarter | I’m hoping someone can get it working in dev tools and then tell me what they did |
23:17:04 | zachcarter | because I’ve tried quite a bit |
23:17:06 | couven92 | ah! :) |
23:17:22 | PMunch | Ah, probably because it is 100% |
23:17:22 | zachcarter | it’s a challenge! haha |
23:17:24 | PMunch | Hold on |
23:17:49 | pydsigner | Doesn't work |
23:18:12 | pydsigner | zachcarter: use flexbox |
23:18:19 | pydsigner | It's made for this sort of thing |
23:18:26 | zachcarter | I am using flexbox to my knowledge |
23:18:35 | zachcarter | but I am a flexbox noob pydsigner |
23:18:43 | * | couven92 is performing a drum roll is suspense of PMunch's ingenious CSS solution! |
23:18:57 | pydsigner | zachcarter: you're using bootstrap or something, right? |
23:19:02 | zachcarter | bulma.io |
23:19:10 | zachcarter | which is flexbox based |
23:20:22 | pydsigner | Oh ok |
23:20:59 | zachcarter | also if anyone can get the compile logs the right size in safari - bonus points :P |
23:21:15 | PMunch | http://jsfiddle.net/TUwej/2/ |
23:22:09 | zachcarter | PMunch I’m not sure I can adapt this to bulma |
23:22:22 | pydsigner | zachcarter: figured it out |
23:22:25 | zachcarter | :D |
23:22:34 | pydsigner | set a min height along with overflow: scroll |
23:22:44 | zachcarter | on the pre? |
23:23:58 | pydsigner | Yes. |
23:24:10 | pydsigner | It can be 0 or whatever, it just has to be set |
23:24:12 | zachcarter | okay |
23:24:26 | * | krux02 joined #nim |
23:25:07 | pydsigner | bulma.io is interesting but I imagine it'd cause pain trying to do responsive |
23:25:32 | zachcarter | hrm it’s not working for me, I’ll keep trying |
23:27:36 | pydsigner | Hmm yeah ok |
23:27:52 | pydsigner | You want the min-height on the tile.is-child and the overflow on the pre |
23:27:57 | zachcarter | ah okay |
23:29:35 | zachcarter | hrm not working either :/ |
23:29:46 | zachcarter | oh I know why I think |
23:29:57 | zachcarter | nope nevermind |
23:31:06 | zachcarter | okay |
23:31:09 | zachcarter | I got it working in dev tools |
23:32:51 | zachcarter | thank you pydsigner! |
23:33:28 | pydsigner | np :) |
23:42:54 | * | BennyElg_ quit (Read error: Connection reset by peer) |
23:44:32 | * | BennyElg joined #nim |
23:44:59 | zachcarter | okay http://play.nim-lang.org/ is updated please poke holes / critique |
23:49:06 | * | BennyElg quit (Ping timeout: 240 seconds) |
23:50:58 | * | cspar_ joined #nim |
23:52:24 | * | cspar quit (Ping timeout: 240 seconds) |
23:52:50 | bozaloshtsh | zachcarter: how is stdin handled? |
23:52:56 | zachcarter | it’s not |
23:53:52 | bozaloshtsh | whenever I run stdin.readline() it takes a very long time |
23:54:21 | zachcarter | yeah the program is sitting waiting for input |
23:54:27 | zachcarter | and eventually the docker image times out |
23:54:35 | bozaloshtsh | ah |
23:54:55 | zachcarter | I didn’t really think about input |
23:55:25 | zachcarter | my next move is to get this off docker |
23:55:30 | zachcarter | and move it to something like lambda |
23:55:43 | zachcarter | but I need to pay more attention to frag first |
23:55:50 | zachcarter | frag is languishing in this things dust :P |
23:56:44 | zachcarter | bozaloshtsh: we should figure out whether the golang / rust web solutions offer input and if so mimic that |
23:58:26 | zachcarter | okay so golang simply exits as soon as the prompt comes up |
23:58:34 | zachcarter | https://play.golang.org/p/K85s6e-F7- |
23:59:03 | zachcarter | not sure how we’d do that…. |
23:59:52 | * | BennyElg joined #nim |