00:10:14 | * | yglukhov quit (Remote host closed the connection) |
00:35:53 | * | endragor joined #nim |
00:40:33 | * | endragor quit (Ping timeout: 264 seconds) |
01:53:58 | * | Yardanico quit (Ping timeout: 272 seconds) |
01:54:58 | * | Yardanico joined #nim |
01:59:29 | * | Yardanico quit (Ping timeout: 252 seconds) |
02:04:40 | * | radagast quit (Quit: radagast) |
02:10:53 | * | Yardanico joined #nim |
02:14:00 | * | avsej quit (Ping timeout: 268 seconds) |
02:14:07 | * | oprypin quit (Read error: Connection reset by peer) |
02:14:14 | * | FromGitter quit (Ping timeout: 272 seconds) |
02:14:21 | * | vivus quit (Read error: Connection reset by peer) |
02:15:41 | * | avsej joined #nim |
02:15:41 | * | avsej quit (Changing host) |
02:15:41 | * | avsej joined #nim |
02:16:13 | * | oprypin joined #nim |
02:18:30 | * | FromGitter joined #nim |
02:20:35 | * | vlad1777d quit (Ping timeout: 256 seconds) |
02:20:47 | * | Yardanico quit (Ping timeout: 268 seconds) |
02:22:28 | * | chemist69 quit (Ping timeout: 272 seconds) |
02:26:41 | * | Yardanico joined #nim |
02:28:07 | * | noonien quit (Quit: Connection closed for inactivity) |
02:29:26 | * | noonien joined #nim |
02:33:14 | * | avsej quit (Ping timeout: 272 seconds) |
02:35:32 | * | avsej joined #nim |
02:35:32 | * | avsej quit (Changing host) |
02:35:32 | * | avsej joined #nim |
02:35:37 | * | chemist69 joined #nim |
02:55:18 | FromGitter | <Quelklef> on the one hand, cool |
02:55:55 | FromGitter | <Quelklef> on the other, assembly |
02:59:10 | FromGitter | <zacharycarter> a Nim version would definitely be cooler |
03:05:05 | * | acidx quit (Ping timeout: 248 seconds) |
03:05:54 | * | acidx joined #nim |
03:09:53 | * | marenz_ joined #nim |
03:13:37 | * | marenz__ quit (Ping timeout: 248 seconds) |
03:19:22 | * | gangstacat quit (Quit: Ĝis!) |
03:26:05 | * | gangstacat joined #nim |
03:37:15 | * | Jesin joined #nim |
03:47:24 | * | dddddd quit (Remote host closed the connection) |
03:56:42 | * | MJCaley joined #nim |
03:56:43 | * | MJCaley quit (Client Quit) |
03:57:47 | * | MJCaley joined #nim |
04:56:25 | * | Yardanico quit (Ping timeout: 256 seconds) |
05:09:58 | * | MJCaley quit (Quit: MJCaley) |
05:12:21 | * | natrys joined #nim |
05:12:32 | * | endragor joined #nim |
05:35:19 | * | krz joined #nim |
05:35:23 | krz | Hi |
05:35:52 | krz | Any suggestions for 2d engines for game development? |
05:54:22 | FromGitter | <Quelklef> I don't know any but Google seems to :-) |
05:56:15 | FromGitter | <Quelklef> could also write your own if you're feeling adventerous |
06:14:45 | * | krz quit (Ping timeout: 264 seconds) |
06:25:11 | FromGitter | <Quelklef> Question: how dirty is the following: |
06:25:40 | FromGitter | <Quelklef> ```let someTable = { ⏎ "someKey": (proc(text: string): int =``` [https://gitter.im/nim-lang/Nim?at=5a448e64e43a7a150cb2a326] |
06:37:20 | FromGitter | <survivorm> Araq, thanx for the answer |
06:40:42 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
06:57:04 | FromGitter | <survivorm> @Quelklef is code variable global for this fragment? |
06:57:48 | FromGitter | <survivorm> @Quelklef And why do you need text var if you don't use it? |
06:58:17 | FromGitter | <survivorm> Seems a little confusing to me |
07:03:36 | * | nsf joined #nim |
07:04:41 | * | endragor quit (Remote host closed the connection) |
07:05:31 | FromGitter | <Quelklef> @survivorm Sorry, should be `text[0]`. the `text` parameter is there so that it matches a certain type |
07:05:59 | FromGitter | <Quelklef> I was more talking about having proc directly in dict literals by surrounding them with `(),`s |
07:06:26 | FromGitter | <Quelklef> feels kinda dirty to me but if it's the Nim way, then sweet |
07:06:49 | * | endragor joined #nim |
07:07:25 | FromGitter | <survivorm> Why not? Looks like inline to me. If the Table's big, i'd rather pass them by proc names, but it's the tastes question |
07:08:32 | FromGitter | <Quelklef> What do you mean by "looks like inline to me"? |
07:08:46 | * | yglukhov joined #nim |
07:08:48 | FromGitter | <survivorm> Inlining function into table generation |
07:09:29 | FromGitter | <Quelklef> yeah, that's what it's doing. I was just wondering if it follows general style conventions or not |
07:10:17 | FromGitter | <survivorm> I think nim's style convention is a little... little, yeah :) |
07:10:40 | FromGitter | <Quelklef> ? |
07:10:47 | FromGitter | <survivorm> https://nim-lang.org/docs/nep1.html |
07:11:03 | FromGitter | <survivorm> That's all I've found on the topic |
07:11:22 | FromGitter | <Quelklef> Ooh! Fancy! |
07:11:50 | FromGitter | <Quelklef> > Two spaces should be used for indentation of blocks ⏎ OOPS |
07:12:20 | FromGitter | <survivorm> |
07:12:50 | FromGitter | <survivorm> That's perfectly made by editor with nim integration |
07:13:21 | FromGitter | <survivorm> I personally use vim, but that's Your choise |
07:13:39 | FromGitter | <Quelklef> I'm using Atom, which doesn't seem to have any super good Nim packages :/ |
07:13:42 | * | yglukhov quit (Ping timeout: 268 seconds) |
07:13:47 | FromGitter | <Quelklef> means I get to know the language more intimately, though! |
07:14:18 | FromGitter | <survivorm> Yeah, i tried it too, but on my pc nim package is broken |
07:15:20 | FromGitter | <survivorm> and the atom itself is... a little too high-consuming to my tastes, my home notebook has 2GB ram |
07:15:28 | FromGitter | <Quelklef> huh. The package is working for me, but is outdated and minimal |
07:15:39 | FromGitter | <Quelklef> yeaaaaaaaaah probably vim is a good idea then, lol |
07:16:52 | FromGitter | <survivorm> 640K Ought to be Enough for Anyone (c) |
07:17:18 | FromGitter | <Quelklef> © |
07:27:39 | * | xkapastel quit (Quit: Connection closed for inactivity) |
07:31:49 | Araq | Quelklef: I would use a case statement instead |
07:32:50 | * | endragor quit (Remote host closed the connection) |
07:34:10 | FromGitter | <Quelklef> good point, but not applicable here |
07:34:26 | FromGitter | <survivorm> point here. And if you want to pass code somethere else, just wrap it in proc with proc return type |
07:35:03 | FromGitter | <survivorm> But applicable if the code is not dynamic |
07:35:18 | FromGitter | <Quelklef> well, I guess I could do it with a switch, but it'd be weird given the actual context of the code. The procs are builtins for a "language" I'm working on; this table is merged into the globals |
07:35:59 | Araq | use a bytecode interpreter instead, maybe |
07:36:12 | FromGitter | <Quelklef> oh lord |
07:36:20 | Araq | a table of proc pointers is a debugging nightmare, been there, done that. |
07:36:22 | FromGitter | <Quelklef> the issue there is that I don't actually know what I'm doing : -) |
07:36:44 | FromGitter | <Quelklef> it's actually working OK so far |
07:36:48 | FromGitter | <survivorm> common isssue :) |
07:36:53 | Araq | yeah that's why I'm telling you what to do :P |
07:37:28 | FromGitter | <Quelklef> dude I don't think I'm in a state to do bytecode rn |
07:37:31 | FromGitter | <Quelklef> or anything real |
07:37:38 | FromGitter | <Quelklef> my current implementation doesn't even parse into an AST |
07:37:45 | FromGitter | <Quelklef> just directly into Nim constructs |
07:37:46 | FromGitter | <Quelklef> oopsies |
07:37:53 | FromGitter | <survivorm> @Araq thanx in advance, i was going to use such code myself. Good, now i wan't |
07:45:42 | FromGitter | <survivorm> offtop. Who there liked X-com ;) |
07:45:48 | FromGitter | <survivorm> ? |
07:52:35 | * | vlad1777d joined #nim |
07:56:04 | FromGitter | <survivorm> Only serius people here this morning, it seems ^) |
08:06:46 | * | sz0 joined #nim |
08:08:19 | * | endragor joined #nim |
08:12:45 | * | endragor quit (Ping timeout: 246 seconds) |
08:26:53 | * | endragor joined #nim |
08:27:44 | * | natrys quit (Quit: natrys) |
08:37:35 | * | Vladar joined #nim |
08:46:48 | * | Arrrr joined #nim |
08:46:48 | * | Arrrr quit (Changing host) |
08:46:48 | * | Arrrr joined #nim |
08:56:49 | * | claudiuinberlin joined #nim |
09:01:24 | * | gokr joined #nim |
09:03:27 | * | gmpreussner quit (Ping timeout: 248 seconds) |
09:05:27 | * | gmpreussner joined #nim |
09:12:06 | * | marenz_ quit (Ping timeout: 268 seconds) |
09:34:00 | FromGitter | <Yardanico> well there's #nim-offtopic channel on IRC (it's mapped to nim-lang/twitch on gitter) |
09:39:42 | * | Trustable joined #nim |
09:42:23 | FromGitter | <tim-st> btw. I compiled the intellij nim plugin from the master thesis I linked the other day, but unfortunately it doesn't seem to work very good, for now I will stay with sublime. I think the best way would be to implement the language server protocol or to ship nimsuggest as a library |
09:43:05 | FromGitter | <tim-st> (I mean dll, so,... with library) |
09:46:09 | * | vlad1777d quit (Ping timeout: 248 seconds) |
09:49:47 | FromGitter | <Yardanico> it's very old and it's not updated |
09:50:01 | FromGitter | <Yardanico> btw, guys, on 10th of January I'll need to restart GitDisc :) |
09:50:12 | FromGitter | <Yardanico> "A maintenance window has been scheduled starting January 10th 2018 (00:00 UTC) during which, Azure will automatically perform the required VM reboot." |
09:51:22 | FromGitter | <survivorm> btw, which editor support for nim is most complete and up-to-date (as anyone knows)? |
09:52:24 | * | vlad1777d joined #nim |
09:52:24 | Arrrr | i thought offtopic didn't have ears from the outside. Does it mean we cannot rant anymore? |
09:55:25 | Araq | you're always free to rant anywhere |
09:56:10 | Arrrr | what if i want to rant about Yardanico now that he isn't present in body. |
09:56:32 | FromGitter | <survivorm> Freedom of rant, eh? :) (like freedom of speech, if anyone didn't understand) |
09:57:29 | FromGitter | <Yardanico> Arrr: what does "isn't present in body" means? :) ⏎ What I'm not actually a real entity? |
09:57:51 | Arrrr | not at the moment |
10:01:28 | FromGitter | <Yardanico> hmm |
10:08:04 | FromGitter | <mratsim> @krz @zacharycarter is the game engine master. Maybe try his own zengine. |
10:08:36 | FromGitter | <mratsim> Or just use SDL |
10:10:15 | FromGitter | <survivorm> I think too many games were started with the phrase Or just use SDL and were finished with it too.... |
10:11:21 | FromGitter | <survivorm> Did you browsed https://nim-lang.org/docs/lib.html#nimble this list? |
10:11:45 | FromGitter | <survivorm> It contains some interesting entries (at first glance) |
10:13:42 | * | yglukhov joined #nim |
10:15:19 | * | Yardanico joined #nim |
10:17:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
10:33:31 | * | azy joined #nim |
10:34:34 | azy | i can't figure out nim for the life of me. i have a newString variable that has a line string.continuesWith(. i want continuesWith to be case insensitive |
10:35:13 | Yardanico | convert your string to lower-or-upper case then? |
10:35:27 | * | yglukhov joined #nim |
10:38:52 | azy | how can i duplicate a newString() variable and toLower/toLowerAscii it?. just doing .toString or .toStringAscii is giving me nimble build errors. i dont think i want to touch the original string either |
10:39:14 | Yardanico | azy can you upload your code to gist/pastebin ? |
10:40:36 | azy | https://github.com/ehmry/nim-monero/blob/master/monero/monero_vanity.nim |
10:41:16 | azy | it generates addresses, then on line 41 checks if a specific part of the address matches your desired prefix |
10:41:46 | Yardanico | and you don't need to duplicate strings |
10:41:50 | azy | only a segment of it though. line 14, $key.address is the full address, which i'd like to be able to search through |
10:42:19 | Yardanico | toLowerAscii doesn't modify the string it takes |
10:42:21 | azy | but i'd take just being able to case-insensitively search though the first part of it |
10:42:37 | Yardanico | you can check it here - https://github.com/nim-lang/Nim/blob/master/lib/pure/strutils.nim#L214 |
10:42:44 | Yardanico | it doesn't touch "s" variable |
10:42:59 | Yardanico | (I mean it doesn't modify it) |
10:43:23 | azy | yeah i get what youre saying, i just find nim incredibly difficult to understand |
10:43:35 | Yardanico | well maybe because it's different from other languages ? :) |
10:43:36 | * | jsn- quit (Ping timeout: 260 seconds) |
10:43:41 | Yardanico | and also this monero thing is very specific |
10:43:42 | * | jsn- joined #nim |
10:43:45 | Yardanico | with some low-level stuff :) |
10:45:12 | Yardanico | nim is pretty straightforward when you read tutorials + manual + write some code in it |
10:45:50 | azy | yeah im sure |
10:46:18 | azy | i figured i'd be able to guess my way through it because ive coded with c+php for a while. nope |
10:46:42 | FromGitter | <survivorm> It's more like python |
10:46:45 | Yardanico | nim is very different from c or php, it's probably closer to C though |
10:46:53 | * | mitescugd joined #nim |
10:47:15 | Yardanico | and really nim doesn't have a lot of common with python except indentation and some syntax "style" :) |
10:47:15 | FromGitter | <survivorm> from my opinion, as a python programmer ( :) ) |
10:47:36 | Yardanico | I was a python programmer, and firstly I thought that nim is very similar to python, yeah |
10:47:44 | Yardanico | but after learning it it's very different |
10:47:53 | Yardanico | macros/templates/generics/static type system |
10:49:03 | FromGitter | <survivorm> I know it's different "under the carpet". But from the first glance, it's not wery hard to understand it after python, except for the types, of course |
10:49:38 | FromGitter | <survivorm> But sometimes I found it's error messages a little lacking |
10:49:55 | FromGitter | <survivorm> blaming the templates :) |
10:50:41 | FromGitter | <survivorm> I had en error then i forgot to set seq type in the object field definition |
10:50:59 | FromGitter | <survivorm> and got pretty weird errors.... |
10:51:04 | Yardanico | report it on github |
10:51:16 | Yardanico | there's a lot of issues about error messages, but please report it |
10:51:44 | FromGitter | <survivorm> ok, i'll try to find it in my repo history |
10:53:54 | * | willprice joined #nim |
10:57:57 | * | gokr quit (Ping timeout: 264 seconds) |
11:02:26 | * | vlad1777d quit (Ping timeout: 272 seconds) |
11:03:43 | dom96 | azy: continuesWith(b58.toLowerAscii(), prefix.toLowerAscii(), 2) is what you want I guess |
11:03:59 | * | yglukhov_ joined #nim |
11:04:21 | dom96 | Note that UFCS is prevalent in Nim, i.e. b58.toLowerAscii() is the same as toLowerAscii(b58) |
11:04:23 | * | yglukhov quit (Read error: Connection reset by peer) |
11:04:24 | FromGitter | <alehander42> what's the trick to use `"\n"` with strformat :? |
11:04:30 | azy | yeah i got it already :D |
11:04:45 | Yardanico | alehander42: ?? |
11:04:49 | azy | now im trying to figure out how to replace b58 with key.address so it searches the full address |
11:04:52 | dom96 | alehander42: I think there is a PR waiting or already merged to introduce fmtr or something |
11:05:02 | Yardanico | ah |
11:07:20 | Yardanico | azy: try "$key.address" |
11:07:25 | dom96 | Maybe I'm dreaming, all I can find is https://github.com/nim-lang/Nim/issues/6958 |
11:07:32 | FromGitter | <alehander42> hm I can't find it in the nim-lang repo, not a dealbreaker tho |
11:07:35 | Yardanico | there's a proc to convert a secret key to string - https://github.com/ehmry/nim-monero/blob/cb4e7886c4e6dfeab3b4445132e76aa30dcfe0e2/monero/crypto.nim#L21 |
11:07:50 | dom96 | I still believe it should be called 'f' not 'fmt' |
11:07:59 | Yardanico | to really fully match python ? :P |
11:08:22 | dom96 | to bring it closer to Python |
11:09:11 | Yardanico | template f(data: string): string = strformat.fmt(data) |
11:09:25 | Yardanico | or use "bind" to not export fmt to other modules |
11:09:48 | dom96 | Why name it 'fmt'? The implementation follows Python's f-strings closely |
11:09:54 | dom96 | Please read my replies |
11:15:53 | FromGitter | <survivorm> @Yardanico in case you're interested, the weird error and code to reproduce it https://github.com/nim-lang/Nim/issues/6982 |
11:16:12 | Yardanico | can you please reformat this code ? :) |
11:16:19 | FromGitter | <data-man> Why the Nim should be similar to the Python? |
11:16:21 | Yardanico | ah, no, I can do this myself |
11:18:05 | FromGitter | <survivorm> @Yardanico done |
11:18:08 | Yardanico | survivorm: also, github has nim syntax highlighting - use ```nim at the start instead of ``` :) |
11:18:17 | Yardanico | I've already changed that |
11:18:54 | dom96 | Btw, it's convention to start all type names with an uppercase letter |
11:19:29 | Yardanico | survivorm: ah, yeah, error messages are always hard to do in the compiler :) |
11:19:43 | dom96 | seq isn't a concrete type |
11:19:49 | FromGitter | <survivorm> I can imagine |
11:19:53 | Yardanico | dom96 but error message doesn't say that :) |
11:20:11 | Yardanico | it says "Error: invalid type: 'T' in this context: 'Property'" |
11:20:17 | Yardanico | which is VERY confusing |
11:20:34 | dom96 | I agree |
11:20:54 | FromGitter | <survivorm> Yeah, nearly brought me to abandon nim for a while |
11:21:01 | dom96 | Awww :\ |
11:21:38 | FromGitter | <survivorm> spend at least half a day trying to understand what does it mean |
11:23:28 | dom96 | Yeah, sorry about that. |
11:23:42 | FromGitter | <survivorm> Not your fault |
11:24:35 | dom96 | I might have a go at trying to improve that error message. Can't lean on Araq for everything :) |
11:25:11 | Yardanico | I'll try to do it too :P |
11:25:13 | Araq | that error message is probably the most confusing in Nim |
11:25:27 | Araq | it's not hard to fix but it's laborsome |
11:26:14 | Yardanico | lol, google translate doesn't have this word "laborsome" |
11:26:15 | FromGitter | <survivorm> How about making error docs? Standart lib docs are mostly awesome, but the errors are... not |
11:26:28 | dom96 | Araq: I appreciate the honesty, but maybe to get more people into compiler dev it's time to lie? :P |
11:26:37 | dom96 | "Oh this should be easy to fix, go for it!" |
11:26:41 | Yardanico | survivorm: it would be horrible |
11:26:49 | Araq | well it's in one place in the compiler |
11:26:54 | dom96 | Error docs would be great |
11:26:55 | Araq | and I can guide you |
11:27:06 | Araq | and it's not hard, as I said. |
11:27:20 | Araq | that should motivate you already. |
11:27:29 | Araq | most other things are hard :P |
11:27:35 | Yardanico | yeah, nim compiler is very hackable :3 |
11:30:07 | FromGitter | <survivorm> @Yardanico didn't quite understand, which one you consider horrible? |
11:30:59 | Yardanico | survivorm: well error docs are good expect if we have errors like in your code snippet |
11:31:41 | dom96 | error docs would show examples of the error, which might help diagnose the issue |
11:32:00 | Yardanico | dom96, btw is it known that you can't compile devel nim if you have a nim installed via choosenim? |
11:32:14 | dom96 | no? |
11:32:16 | Yardanico | or maybe it's because of koch |
11:32:35 | Yardanico | https://gist.github.com/Yardanico/14b46fb435965d8ddfb88beb9bb9d480 |
11:33:47 | dom96 | huh, I did see that before. |
11:33:55 | dom96 | I guess koch is copying 'nim' from PATH? |
11:34:16 | FromGitter | <survivorm> Btw, maybe it will be good to make semi-automatic error collection mechanism? |
11:34:33 | dom96 | what do you mean by that? |
11:34:35 | Yardanico | survivorm: what do you mean? something like google analytics? |
11:35:21 | dom96 | Araq: Okay, I'm going to get food and then you can guide me and/or Yardanico too :) |
11:35:23 | Arrrr | i think playground is broken |
11:35:43 | FromGitter | <survivorm> I understand that in most cases sending en error report is not needed, but sometimes... yeah. Somthing like a compiler key to send error and details to GH |
11:35:57 | Yardanico | Arrrr yeah, doesn't work for me either |
11:36:05 | dom96 | ping zacharycarter ^ |
11:36:45 | dom96 | I wonder what will happen... |
11:36:48 | dom96 | !eval echo 42 |
11:36:48 | NimBot | Compile failed: <no output> |
11:37:05 | dom96 | Glad it doesn't get stuck heh |
11:37:23 | Yardanico | it returns 502 (code compile request) |
11:38:23 | dom96 | Guess it crashed |
11:38:55 | dom96 | zacharycarter: it would be great if the playground was hosted on the Nim servers so that either of us could give it a kick for misbehaving |
11:39:12 | Yardanico | dom96 if you want I can set up discord bridge on nim servers too |
11:39:27 | dom96 | yes |
11:39:39 | dom96 | I'll make you an account later on |
11:39:39 | Yardanico | it's very simple actually |
11:39:41 | dom96 | for now food |
11:39:54 | Yardanico | I can just give you the config file with all passwords :P |
11:40:00 | FromGitter | <data-man> And do the core developers get paid? :-) |
11:40:02 | Yardanico | (and settings) |
11:40:19 | Yardanico | data-man: zahary does (not much AFAIK) |
11:41:09 | Yardanico | well I mean not much comparing to real full-time salaries |
11:42:09 | Arrrr | Nim is still a small fish |
11:42:21 | dom96 | https://github.com/nim-lang/Nim/issues?q=is%3Aissue+label%3A%22Work+Report%22+is%3Aclosed |
11:42:27 | dom96 | We're transparent :) |
11:42:27 | Yardanico | Also Araq works at Xored |
11:42:53 | dom96 | and yeah koch copies the .exe, which ends up badly for choosenim |
11:42:56 | dom96 | not sure what the solution is |
11:42:58 | dom96 | brb |
11:43:19 | Yardanico | I'm not really sure why, but there's a lot of russian-speaking people in Nim community :) |
11:44:10 | FromGitter | <survivorm> Habrahabr, maybe :) |
11:44:27 | FromGitter | <survivorm> Several posts on nim |
11:44:33 | Yardanico | yeah, only several :) |
11:44:33 | FromGitter | <survivorm> many comments |
11:44:54 | Yardanico | because a lot of people say "why this language is useful?" |
11:45:09 | Yardanico | but for example ZEO Alliance is located in Ukraine |
11:45:27 | FromGitter | <survivorm> I, personnaly came from it's discussion in crystal post |
11:45:27 | Yardanico | Xored is located in several locations including (and AFAIK it's the man one) Russia |
11:45:43 | FromGitter | <survivorm> as far as i remember |
11:47:06 | Arrrr | do you prefer nim to crystal? |
11:47:08 | FromGitter | <data-man> @Yardanico: Do you have an account on the ru-board? I want to open a topic about the Nim in this forum. |
11:47:45 | Yardanico | data-man: no, I didn't heard about that forum until now really:) |
11:47:48 | Yardanico | *hear |
11:47:57 | Yardanico | you can create it yourself, no ? :) |
11:48:57 | FromGitter | <data-man> http://forum.ru-board.com ⏎ Yes, of course I can. :) |
11:49:03 | Yardanico | yeah, I'll register now |
11:49:12 | Yardanico | did you join my group in VK btw? :D |
11:49:29 | FromGitter | <data-man> http://forum.ru-board.com/forum.cgi?forum=33 |
11:50:28 | FromGitter | <survivorm> Wanted to find something new and interesting in new langs (Say no to Go and Rust :) ⏎ D was interesting, but i got afraid of the people say about incompatible changes in core structures, ⏎ Crystal, too, but the syntax was a little off for me, ⏎ Julia was a warm reminder of MathLab, ⏎ And then there was nim. And great page about nim for Python programmers. ... [https:// |
11:50:28 | FromGitter | ... gitter.im/nim-lang/Nim?at=5a44da8403838b2f2a4589a3] |
11:51:28 | FromGitter | <survivorm> @Arrrr hope this answers your question |
11:51:46 | FromGitter | <data-man> @Yardanico: I do not like social networks :) |
11:52:09 | Yardanico | ah, ok then |
11:53:30 | * | yglukhov_ quit (Remote host closed the connection) |
11:54:07 | * | yglukhov joined #nim |
11:54:40 | * | dddddd joined #nim |
11:55:09 | FromGitter | <data-man> How would you translate "Efficient and expressive programming." into Russian? :) |
11:55:40 | FromGitter | <survivorm> Эффективный и выразительный, не? |
11:56:01 | Yardanico | "Эффективное и выразительное программирование", but it doesn't sound that great in russian |
11:56:06 | Yardanico | but it's ok |
11:57:00 | FromGitter | <survivorm> I think it's better to rephrase to speak about a language |
11:57:05 | Yardanico | yeah |
11:57:07 | * | sz0 quit (Quit: Connection closed for inactivity) |
11:57:15 | FromGitter | <survivorm> not about the coding process itself |
11:57:31 | FromGitter | <data-man> http://forum.ru-board.com/topic.cgi?forum=33&topic=14721 Welcome! :) |
11:58:08 | Yardanico | wow |
11:58:12 | Yardanico | your account here is 12 years old |
11:58:16 | Yardanico | I'm only 17 years old |
11:58:17 | Yardanico | :D |
11:58:22 | FromGitter | <survivorm> Post at least a link to the nim home page and documents hom, for a while |
11:58:30 | * | yglukhov quit (Ping timeout: 246 seconds) |
11:59:47 | * | Arrrr quit (Ping timeout: 250 seconds) |
12:02:07 | * | Arrrr joined #nim |
12:02:07 | * | Arrrr quit (Changing host) |
12:02:07 | * | Arrrr joined #nim |
12:03:08 | Yardanico | data-man: it looks a bit weird though (I'm about my post - I've just registered on this forum and posted right away in this thread) |
12:03:09 | Yardanico | :D |
12:06:17 | FromGitter | <data-man> @Yardanico: I edited the first post. |
12:18:18 | Yardanico | still changing my nicknames on all websites: "The request to rename "Tiberiumk" to "Yardanico" has been approved. Once completed, you will be able to log in using your new username with your old password. Thank you for participating on Wikimedia projects." |
12:18:56 | * | yglukhov joined #nim |
12:21:42 | * | benoliver999 quit (Quit: ZNC - http://znc.in) |
12:24:56 | FromGitter | <survivorm> @data-man Может, добавить в шапку пример запуска? ⏎ `nim c --verbosity:0 ./tests/average.nim; cat ~/ttt/setup.py | ./tests/average` |
12:24:57 | * | gokr joined #nim |
12:25:23 | FromGitter | <survivorm> потому что иначе там бесконечный ввод |
12:25:39 | FromGitter | <survivorm> Excuse me |
12:25:47 | Yardanico | Don't worry |
12:25:53 | Yardanico | you can sometimes use another languages here |
12:25:59 | Yardanico | Russian/German/etc |
12:26:02 | FromGitter | <survivorm> forgot to use language understandable to all users |
12:27:44 | * | Snircle joined #nim |
12:28:21 | * | benoliver999 joined #nim |
12:29:38 | FromGitter | <data-man> @survivorm: There are mostly the Windows users. :) |
12:33:11 | FromGitter | <data-man> And the example taken from the Nim main page. :) |
12:47:06 | FromGitter | <data-man> Hmm... the Nim not present in https://github.com/topics/ |
12:47:44 | * | nsf quit (Quit: WeeChat 2.0.1) |
13:04:12 | dom96 | https://github.com/topics/nim |
13:04:38 | Yardanico | dom96 but you can't find it on https://github.com/nim sadly |
13:04:47 | Yardanico | sorry |
13:04:51 | Yardanico | https://github.com/topic |
13:05:01 | dom96 | Seems like you can make PRs to rectify this somewhat https://github.com/github/explore/tree/master/topics |
13:05:40 | FromGitter | <survivorm> @data-man Still, link to the main page on the forum is a must :) If you even give link to rosetta |
13:06:02 | Yardanico | sadly a lot of nim examples on rosetta code are very outdated |
13:06:17 | dom96 | Anybody wanna create a PR to add Nim there? |
13:06:21 | Yardanico | some of them for example use typeless arguments, which were deprecated a (relatively) long time ago |
13:07:16 | dom96 | ewww really? |
13:07:20 | FromGitter | <zacharycarter> morning all |
13:07:20 | Yardanico | yes |
13:07:39 | Yardanico | and rosetta is very laggy |
13:07:43 | dom96 | zacharycarter: read logs regarding playground (TL;DR: it's down) |
13:08:07 | FromGitter | <survivorm> morning :) Nj some of us |
13:08:22 | Yardanico | dom96 a random example - https://rosettacode.org/wiki/Horner%27s_rule_for_polynomial_evaluation#Nim |
13:08:52 | dom96 | fix it :) |
13:09:18 | FromGitter | <data-man> @survivorm: "Домашняя страница" (Home page) :-) |
13:09:51 | FromGitter | <survivorm> @data-man sorry |
13:10:13 | FromGitter | <survivorm> it looks like the part of the forum control itself |
13:10:30 | FromGitter | <survivorm> and got filtered by my brain :) |
13:11:01 | dom96 | This is cool: https://www.rosettacode.org/wiki/Special:MostLinkedCategories |
13:11:22 | Yardanico | nim is at the first page, yay |
13:11:26 | dom96 | We're in the top 50 :) |
13:11:46 | Yardanico | there's no rust on the first page btw |
13:11:48 | dom96 | Above Rust :O |
13:11:55 | Yardanico | really? |
13:11:57 | dom96 | and Swift |
13:12:02 | Yardanico | ah |
13:12:04 | dom96 | Rust is #63 |
13:12:07 | Yardanico | also above crystal |
13:12:08 | dom96 | Swift #74 |
13:12:12 | FromGitter | <survivorm> still, there's much stairs to climb :) |
13:13:32 | dom96 | Crystal has only 27 problems implemented |
13:13:47 | FromGitter | <zacharycarter> @dom96 I read them - I'd be fine with that, just need to know what to do |
13:13:52 | dom96 | Another indicator for language popularity :) |
13:14:05 | Yardanico | well a lot of nim examples were written a long time ago |
13:14:43 | FromGitter | <survivorm> Hey guys, btw, is there a list of projects using nim in production? |
13:14:48 | dom96 | One of these days I'm going to combine all these indicators into one super-popularity-index |
13:14:55 | Yardanico | survivorm: yes |
13:14:59 | Yardanico | but not all companies are here |
13:15:08 | dom96 | https://github.com/nim-lang/Nim/wiki/Companies-using-Nim |
13:15:19 | FromGitter | <survivorm> Thanx |
13:15:28 | dom96 | ooh, some new companies there |
13:15:39 | Yardanico | there's no Xored or ZEO alliance for example :) |
13:15:58 | Yardanico | ah, sorry |
13:16:02 | Yardanico | there's Onset Game |
13:17:22 | FromGitter | <data-man> http://exercism.io/languages/nim/exercises :-( |
13:17:34 | FromGitter | <survivorm> btw, their forum is 502 |
13:18:09 | * | azy left #nim (#nim) |
13:18:11 | FromGitter | <zacharycarter> hrm - I need to figure out how to create a lock free job system over this holiday break I have |
13:18:30 | dom96 | zacharycarter: okay, so I suppose I'll create an account for you on the VPS |
13:19:02 | dom96 | send me your ssh pub key :) |
13:20:20 | FromGitter | <zacharycarter> okay will do |
13:20:29 | FromGitter | <zacharycarter> playground should be back up btw |
13:20:31 | dom96 | also, what username do you prefer? |
13:21:32 | FromGitter | <zacharycarter> ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoS2uRk/ByYlHsWlD7ABE8xlI+ykaDgAo3E5XdHJ1JYlKyD2bNUrEBQNKpmHiz+o9mPFn8LNu+YyFaRZTo5d0G1TOoq/r61FVOM3L+irbrKN7caL3EHgXWKcZ8kM3a/lJhWTYQ7UzwJ4d8iWCGRxzyWHqK0ggWDymLezeVlJXV4ZzErVPOLat0yJPndLRPu8jV2FhQsefmxwAfs+xEroBjUplS/VnPhUMiaLU2H8CdpZ4gmtlJNtEpdug3cu2oyuknQJZfRT3ap1TsnMLerDMsM6qjuR2SddDJuwxK3qziTohWMUN4Cp1HORMv/D7fZPAylag1qp+sJwJpGdC6Hfp9 [email protected] |
13:21:42 | FromGitter | <zacharycarter> zachcarter works for me |
13:22:30 | Yardanico | dom96 maybe we can set up an account for me too? to run discord bridge :) |
13:22:40 | dom96 | Yardanico: sure |
13:22:46 | dom96 | username and pub key as well please |
13:22:54 | Yardanico | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0KEwC1kqhEQPZJPbgWTDPedjz3Q+QVczwAYAKI+wfjsaHJg/3vTrmb4GJMx4QXW9H00cXM9RarA604+5DiLZlWxzs+rkSvH+XkhGFQEXZ5ZnE/9V5ixvm9aCTu/BdfU9QpJj8PBwlHLiOoERLEFzXvSqdcZaGSEYNqxxJ/fmUxMvbJ6flU65mnN3ABA5ZBqkC5X2gLh/FBnXcbjI6oIyD31YpPEo9neVTLHrSl4XPNo2zMcIiMW1rX3bVP0Tp2us0k5+bYnG/r7ZKJOYDPyBxp37Yx4FyHsljMQXByY6sQpBK5oggA7waCvg1veW9ZhV9khcYuhvmRvZOKlnkqoRh tiber@mac |
13:23:04 | Yardanico | just "tiber" as an username :) |
13:23:12 | dom96 | hrm, I should probably try recompiling NimBot |
13:23:17 | dom96 | it's leaking memory like mad |
13:24:21 | * | NimBot joined #nim |
13:29:15 | dom96 | hrm, would be nice if choosenim supported global installs |
13:31:46 | * | miran joined #nim |
13:38:01 | FromGitter | <data-man> @dom96: PR to github's explore requires: "I am: Curating a new Topic page" :-( |
13:38:56 | dom96 | huh? |
13:39:35 | Yardanico | Well you don't really need to "curate" it |
13:39:35 | Yardanico | https://github.com/github/explore/blob/master/CONTRIBUTING.md |
13:40:32 | * | NimBot joined #nim |
13:41:09 | dom96 | !eval echo 42 |
13:41:29 | * | NimBot joined #nim |
13:41:31 | Araq | lol |
13:41:45 | Yardanico | :D |
13:41:56 | Yardanico | universe.exe has stopped working |
13:43:04 | FromGitter | <survivorm> programmers humor... still don't find some things funny even though i'm a programmer too :facepalm: |
13:43:28 | Yardanico | it's a hardcore programmer humour |
13:44:06 | dom96 | new async tracebacks :) https://gist.github.com/dom96/521970087b140c901d164b3da9460b66 |
13:44:08 | Araq | !eval echo 42 |
13:44:24 | * | NimBot joined #nim |
13:44:25 | Araq | NimBot is a stable piece of technology |
13:44:31 | FromGitter | <survivorm> think i'm not hardcore enough. I'm not an oak, as Petyka and Vasiliy Ivanovich :) |
13:44:51 | Yardanico | !eval echo "Answer is 42" |
13:45:10 | * | NimBot joined #nim |
13:45:12 | Yardanico | sorry |
13:46:09 | dom96 | This is due to `[]` now failing with an IndexError when slice is too large |
13:46:10 | FromGitter | <survivorm> nice tb, btw |
13:46:31 | FromGitter | <survivorm> informative enough |
13:47:40 | dom96 | Glad you like it :) |
13:48:07 | * | NimBot1 quit (Remote host closed the connection) |
13:48:17 | FromGitter | <survivorm> and "stable piece of technology" is a myth |
13:48:32 | Araq | no, a joke |
13:48:43 | FromGitter | <survivorm> I think even angband isn't a completely stable |
13:49:10 | FromGitter | <data-man> Where can I get a large Nim icon? 😄 |
13:49:36 | FromGitter | <survivorm> 1600*1200? :) |
13:50:10 | FromGitter | <data-man> I forked github's explore. ⏎ 288x288 |
13:50:27 | Yardanico | there's nim svg icon |
13:52:55 | * | NimBot joined #nim |
13:53:00 | dom96 | !eval echo 42 |
13:53:02 | NimBot | 42 |
13:53:06 | Yardanico | yay |
13:53:22 | dom96 | Now compiled via bleeding edge Nim :) |
13:53:33 | FromGitter | <survivorm> ah, now i understand |
13:53:46 | FromGitter | <data-man> https://github.com/nim-lang/Nim/blob/devel/web/assets/images/nim-logo.svg ? |
13:53:56 | FromGitter | <survivorm> and yes, i remember the catch 42 |
13:54:12 | FromGitter | <survivorm> Or was it 22? |
13:55:47 | FromGitter | <survivorm> o, it was really 22, sorry ^) |
13:59:21 | FromGitter | <RedBeard0531> Why does every image show a different color for the front of the crown? |
13:59:37 | FromGitter | <RedBeard0531> is it supposed to be gold, black, or white? |
14:00:31 | Yardanico | data-man: probably you need to use this one |
14:00:33 | Yardanico | https://github.com/nim-lang/assets/blob/master/Art/logo-crown.svg |
14:02:14 | FromGitter | <RedBeard0531> I had no idea there was a mascot! https://github.com/nim-lang/assets/blob/master/Art/mascot.svg |
14:02:30 | Yardanico | I haven't too! |
14:03:13 | dom96 | Yardanico: zacharycarter: ssh [email protected] and ssh [email protected] should work |
14:03:13 | FromGitter | <survivorm> Me too! |
14:03:37 | FromGitter | <survivorm> Interasting, does Araq knows :) |
14:03:44 | Yardanico | dom96 yeah it works |
14:05:01 | dom96 | we really need to clean up that assets repo |
14:06:41 | Yardanico | Transfering GitDisc to nim VPS, expect a 1-2 minutes of downtime :) |
14:06:46 | Araq | !eval echo "catch 22" |
14:06:46 | * | GitDisc quit (Remote host closed the connection) |
14:06:48 | NimBot | catch 22 |
14:07:33 | Araq | that mascot is not official and similarities with Nim's creator are pure coincidence |
14:07:47 | dom96 | hah |
14:08:06 | FromGitter | <RedBeard0531> I'll take that as evidence that you are an angry badger(?) |
14:08:10 | FromGitter | <survivorm> Don't know it's significant or not, but in PaleMoon is a little broken https://i.imgur.com/yHmlJaV.png |
14:08:14 | * | GitDisc joined #nim |
14:08:48 | GitDisc | <Yardanico> Hi from Nim VPS |
14:09:10 | dom96 | that was quick |
14:09:35 | Yardanico | well it's easy to download a binary file and copy-paste config :) |
14:09:54 | FromGitter | <data-man> (https://files.gitter.im/nim-lang/Nim/MU7x/nim-logo.png) |
14:10:08 | dom96 | Don't use that one |
14:10:32 | Yardanico | maybe https://github.com/nim-lang/assets/blob/master/Art/logo-crown.svg ? |
14:10:34 | FromGitter | <survivorm> Golden-golden is more beautiful |
14:10:41 | FromGitter | <survivorm> in my opinion |
14:10:41 | dom96 | Put this one on a dark background and use it https://github.com/nim-lang/website/blob/master/jekyll/assets/img/logo.svg |
14:11:09 | dom96 | survivorm: I guess Pale Moon doesn't support flexbox properly |
14:11:23 | FromGitter | <survivorm> may be |
14:11:55 | FromGitter | <survivorm> just informing. Other parts of page display differently, but ok |
14:12:07 | FromGitter | <survivorm> but this one's not |
14:13:09 | dom96 | data-man: btw by "dark background" I mean the same dark background colour that's on nim-lang.org |
14:13:41 | * | nsf joined #nim |
14:15:54 | FromGitter | <data-man> (https://files.gitter.im/nim-lang/Nim/xLPc/logo.png) |
14:16:18 | FromGitter | <data-man> Oops :( |
14:16:49 | FromGitter | <survivorm> Ah, great joke :) |
14:17:50 | FromGitter | <data-man> background must be transparent (I saw in a others langs) |
14:18:45 | dom96 | they can't enforce that |
14:22:06 | * | xkapastel joined #nim |
14:23:26 | FromGitter | <data-man> Maybe to write "Nim" under a icon? A which color? |
14:23:37 | dom96 | You can just use the crown |
14:23:51 | dom96 | The name of the language will already be written there |
14:24:22 | FromGitter | <data-man> Ok |
14:28:02 | livcd | how usable is the JS backend in Nim ? Should I rather resort to plain ES6+React ? I know that yglukhov used it for his game but I am afraid I am too dumb to fight the bugs / lack of documentation |
14:29:23 | yglukhov | livcd: it is usable. we're using it actively for internal tools. in any case, don't be afraid. there's community to help you out. |
14:29:24 | FromGitter | <zacharycarter> it's pretty well documented - not sure what bugs you're referring to livcd |
14:30:37 | dom96 | livcd: What are you planning to create if you don't mind me asking? |
14:32:49 | FromGitter | <data-man> (https://files.gitter.im/nim-lang/Nim/KLfQ/logo.png) |
14:34:56 | dom96 | Good, but you need that dark background |
14:43:03 | FromGitter | <zacharycarter> I think another game engine that Nim could potentially be used w/ is http://armory3d.org/ |
14:43:07 | FromGitter | <zacharycarter> via something like |
14:43:11 | FromGitter | <zacharycarter> https://github.com/TomBebbington/hx-ffi/ |
14:45:50 | FromGitter | <data-man> (https://files.gitter.im/nim-lang/Nim/kF3M/logo.png) |
14:46:02 | FromGitter | <survivorm> @zacharycarter interesting |
14:46:54 | dom96 | data-man: good, although I would put the same amount of padding on the left and right as the bottom and top |
14:47:02 | dom96 | otherwise it will look odd on white |
14:47:57 | FromGitter | <survivorm> Proposal: add proposals to nim doc index, like GAMES-> ENGINE -> "Integrate with XXX" with links. So this info doesn't get lost and maybe someone takes this task |
14:48:43 | FromGitter | <survivorm> Cause in messanger such a good idea will be lost in a week, maximum |
14:49:02 | Yardanico | you mean needed-libraries? |
14:49:15 | Yardanico | https://github.com/nim-lang/needed-libraries |
14:50:17 | FromGitter | <survivorm> That's cool (btw, still need link, if it's not in doc index), but i'm not about that |
14:50:35 | FromGitter | <data-man> @dom96: Image must be square. To reduce the size of the crown? |
14:50:40 | FromGitter | <survivorm> But close, yeah |
14:51:13 | dom96 | data-man: make the background larger then I guess |
14:52:40 | FromGitter | <survivorm> there people post what they Need. I'm talking more about situation than you find some cool stuff and make a note - found XXX. Would be cool if someone ports it to nim. (not a need, but just the idea) |
14:56:35 | FromGitter | <survivorm> but still, there's link for the needed libraries repo? |
14:57:13 | FromGitter | <survivorm> I've heared about it first than you said about it, @Yardanico |
14:57:39 | federico3 | https://github.com/nim-lang/needed-libraries/ |
14:57:55 | livcd | dom96: simple agent with a control UI that would be a webpage |
14:58:03 | FromGitter | <survivorm> great. I meant on site |
14:58:14 | livcd | using websockets |
14:59:28 | dom96 | Go for it :) |
15:05:31 | livcd | oh that armory3d looks interesting |
15:07:36 | FromGitter | <data-man> (https://files.gitter.im/nim-lang/Nim/ckW9/logo.png) |
15:08:38 | miran | is there a simple (built-in) way to extract 2d slice of a seq? |
15:08:59 | miran | e.g. s[0 .. 3, 5 .. 7] |
15:14:58 | * | krz joined #nim |
15:19:31 | * | krz quit (Client Quit) |
15:25:05 | FromGitter | <data-man> ⏎ aliases: nim-lang, nimlang, nim-language ⏎ created_by: Andreas Rumpf ⏎ display_name: Nim ⏎ github_url: https://github.com/nim-lang/Nim ... [https://gitter.im/nim-lang/Nim?at=5a450cd00163b02810897944] |
15:25:44 | FromGitter | <alehander42> @survivorm maybe https://github.com/VPashkov/awesome-nim ? |
15:26:30 | dom96 | data-man: I'd add "python" as a related topic |
15:27:05 | FromGitter | <Yardanico> btw, can you link github user profile instead of "Andreas Rumpfs" or this repo doesn't allow that? |
15:27:12 | dom96 | "in the order of priority" -> "in that order of priority" this reads better for me |
15:27:47 | FromGitter | <Yardanico> dom96: btw we have that in repo description |
15:27:50 | FromGitter | <Yardanico> on github |
15:27:57 | FromGitter | <Yardanico> here - https://github.com/nim-lang/Nim |
15:28:06 | FromGitter | <data-man> Yes, taken from the repo? :-) |
15:28:19 | dom96 | Changed. Hopefully Araq won't disagree with me here. |
15:31:09 | FromGitter | <data-man> To add nimrod to the aliases? |
15:31:11 | Araq | did you remove my name from my work again? |
15:32:29 | dom96 | data-man: no |
15:33:10 | Araq | oh I see, I don't mind |
15:33:30 | Araq | miran: [s[0..3], s[5..7]] |
15:34:03 | FromGitter | <data-man> ##``` ⏎ ⏎ aliases: nim-lang, nimlang, nim-language ⏎ created_by: Andreas Rumpf ⏎ display_name: Nim ... [https://gitter.im/nim-lang/Nim?at=5a450eebedd2230811e8faac] |
15:35:56 | FromGitter | <Yardanico> maybe remove "www" from url ? :D |
15:36:07 | FromGitter | <Yardanico> "https://nim-lang.org" |
15:36:14 | dom96 | +1 |
15:36:45 | miran | Araq: i can't make that to work.... |
15:36:53 | FromGitter | <Yardanico> "Statically typed and compiled, it provides unparalleled performance in an elegant package." this may confuse people btw :) |
15:36:59 | FromGitter | <data-man> Oh, copied from Rust :) |
15:36:59 | FromGitter | <Yardanico> I know it's from main page |
15:37:21 | miran | here's an example: var s = @["abc", "def", "ghi"] |
15:37:58 | miran | i want to extract first two rows, and last two characters in each. |
15:38:14 | Yardanico | miran: then I'm afraid there's no builtin operator for that |
15:38:20 | Yardanico | why you don't want to type 2 or 3 lines? :) |
15:38:53 | miran | i'm just asking if there is some way to do that, that i'm not aware of |
15:41:14 | dom96 | data-man: don't worry too much, we can always open more PRs to improve it :) |
15:41:55 | FromGitter | <data-man> ##``` ⏎ ⏎ aliases: nim-lang, nimlang, nim-language ⏎ created_by: Andreas Rumpf ⏎ display_name: Nim ... [https://gitter.im/nim-lang/Nim?at=5a4510c35355812e5727ff08] |
15:42:02 | FromGitter | <data-man> :-) |
15:42:25 | FromGitter | <Yardanico> LGTM :P |
15:42:27 | * | nsf quit (Quit: WeeChat 2.0.1) |
15:42:42 | dom96 | Although I would change the "Statically typed and compiled, it provides unparalleled performance in an elegant package." too :P |
15:42:48 | Yardanico | yeah |
15:42:59 | Yardanico | but it's copied from main page on nim website |
15:43:20 | dom96 | I've read it so many times now it feels cheesy heh |
15:43:35 | dom96 | check what other languages have, like PHP |
15:45:44 | FromGitter | <data-man> ##``` ⏎ ⏎ PHP is a scripting language that's particularly suited for server-side web development. PHP runtime is generally executed by webpage content, and can be added to HTML and HTML5 webpages. PHP was originally developed in 1994 by Rasmus Lerdorf. ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5a4511a8c072deaf0b0ff527] |
15:47:43 | FromGitter | <data-man> ```code paste, see link``` |
15:52:46 | FromGitter | <data-man> Compiles to C, C++ or JavaScript, the Nim compiler produces dependency-free binaries which runs on Windows, macOS, Linux, and more. ⏎ Is it correct? |
15:52:59 | Yardanico | Objective C also |
15:53:00 | dom96 | Some Nim discussion here: https://news.ycombinator.com/item?id=16021965 |
15:54:39 | FromGitter | <data-man> I mean grammar? :-) |
15:55:02 | dom96 | s/runs/run/ :) |
15:55:05 | * | endragor quit (Remote host closed the connection) |
15:55:37 | dom96 | Although I wouldn't focus on that about Nim |
15:55:40 | dom96 | It's an implementation detail |
15:55:44 | dom96 | and many people are put off by it |
15:56:12 | FromGitter | <alehander42> the compile targets? |
15:56:28 | Yardanico | "Nim compiler produces dependency-free binaries for Windows, macOS, Linux" :P |
15:57:10 | FromGitter | <alehander42> I think the JS backend is an important detail |
15:57:35 | Yardanico | but it should be separated from "binaries" :) |
15:58:38 | dom96 | Nim is a general purpose systems programming that's designed to be efficient, expressive and elegant. The Nim compiler produces dependency-free binaries for most platforms as well as JavaScript for the web. |
16:03:04 | * | marenz_ joined #nim |
16:06:00 | FromGitter | <data-man> It's for the short description. ⏎ What a long description? :-) |
16:07:33 | dom96 | is that too long? |
16:07:56 | FromGitter | <data-man> "Statically typed and compiled, it provides unparalleled performance in an elegant package." |
16:09:37 | FromGitter | <data-man> ##``` ⏎ ⏎ aliases: nim-lang, nimlang, nim-language ⏎ created_by: Andreas Rumpf ⏎ display_name: Nim ... [https://gitter.im/nim-lang/Nim?at=5a45174103838b2f2a46bc2f] |
16:10:30 | * | endragor joined #nim |
16:10:32 | dom96 | no, your previous short description was fine |
16:10:36 | Yardanico | just make a PR already :) |
16:10:39 | dom96 | What I sent should be the long description |
16:10:41 | Yardanico | and push changes to it :P |
16:13:40 | FromGitter | <data-man> ##``` ⏎ ⏎ aliases: nim-lang, nimlang, nim-language ⏎ created_by: Andreas Rumpf ⏎ display_name: Nim ... [https://gitter.im/nim-lang/Nim?at=5a451834c072deaf0b1019af] |
16:13:56 | FromGitter | <Yardanico> maybe remove that "Statically typed and compiled, it provides unparalleled performance in an elegant package." ? |
16:14:15 | FromGitter | <Yardanico> or edit it |
16:14:18 | FromGitter | <Yardanico> to remove "unparalleled" |
16:15:07 | FromGitter | <Yardanico> I didn't encounter "unparalleled" having the meaning of "best" until Nim :) |
16:15:21 | * | endragor quit (Ping timeout: 264 seconds) |
16:15:27 | FromGitter | <data-man> People love a statically typed langs. :-) |
16:15:47 | Yardanico | we just need to edit "unparalleled" :) |
16:16:47 | FromGitter | <data-man> ##``` ⏎ ⏎ aliases: nim-lang, nimlang, nim-language ⏎ created_by: Andreas Rumpf ⏎ display_name: Nim ... [https://gitter.im/nim-lang/Nim?at=5a4518ee0163b0281089bc2a] |
16:17:38 | FromGitter | <Yardanico> maybe replace "unparalleled" with "great"? IDK really, I'm not a native english speaker |
16:20:25 | dom96 | huh? |
16:20:34 | dom96 | Why are you making the "long" description so short? |
16:21:14 | dom96 | Your "short_description" is fine now, but use what I've written above for the text below `---` |
16:24:31 | * | Dodgy-Debaser quit (Quit: ZNC 1.7.x-git-876-42939c9 - https://znc.in) |
16:25:07 | * | Dodgy-Debaser joined #nim |
16:27:16 | * | Dodgy-Debaser quit (Remote host closed the connection) |
16:30:48 | FromGitter | <data-man> Too late :) ⏎ https://github.com/github/explore/pull/128 |
16:30:59 | Yardanico | just edit it, no ? :) |
16:31:47 | dom96 | and again... |
16:31:51 | dom96 | dark background on logo |
16:32:02 | dom96 | why did you remove it? |
16:32:39 | FromGitter | <data-man> Oh, not copied file from other dir :-( |
16:33:19 | dom96 | please edit the description too |
16:36:36 | FromGitter | <data-man> "Nim is a general purpose systems programming that's designed to be efficient, expressive and elegant. The Nim compiler produces dependency-free binaries for most platforms as well as JavaScript for the web." ⏎ ? |
16:37:14 | dom96 | sure |
16:39:33 | FromGitter | <data-man> Pushed. ⏎ Thanks to everyone! :-) |
16:39:52 | * | Dodgy-Debaser joined #nim |
16:41:05 | * | Dodgy-Debaser quit (Remote host closed the connection) |
16:45:06 | Yardanico | https://codegolf.stackexchange.com/questions/15860/make-a-scalable-christmas-tree |
17:01:30 | * | yglukhov quit (Remote host closed the connection) |
17:02:58 | * | yglukhov joined #nim |
17:05:22 | * | subsetpark quit () |
17:07:33 | * | yglukhov quit (Ping timeout: 264 seconds) |
17:09:54 | * | yglukhov joined #nim |
17:14:34 | * | yglukhov quit (Ping timeout: 265 seconds) |
17:18:46 | miran | i'm solving AoC and for one day i cannot get the nim solution to scale as good as python.... |
17:19:14 | miran | i've profiled my code and it seems that "assign.nim: genericAssign " takes a lot of time.... |
17:19:21 | Yardanico | 0.17.2 or 0.17.3? |
17:19:59 | Yardanico | your nim |
17:20:14 | miran | currently running devel |
17:20:18 | Yardanico | hmm, IDK then |
17:20:29 | Yardanico | you can create an issue on github (or better create a forum post) |
17:21:08 | miran | i guess the fault is my code, not nim in general, so no issues to open ;) |
17:21:12 | miran | https://www.reddit.com/r/adventofcode/comments/7mlgqv/2017_day_21_part_3_how_many_pixels_stay_on_after/ |
17:22:48 | miran | in nim i get 0.12 sec for 18 iterations, and 7.6 sec for 24 iterations |
17:22:50 | Yardanico | miran and where's your code ? :) |
17:23:24 | miran | python is 0.4 sec and 16 sec |
17:24:05 | miran | Yardanico: let me clean it up a bit and i'll send a link |
17:26:37 | miran | https://gist.github.com/anonymous/bc528ced2cb4faeede915f1f8d0211ee |
17:27:13 | Yardanico | miran can you please share the input file too? |
17:28:00 | miran | https://gist.github.com/narimiran/adf3012170eef88c355b7978f300c404 |
17:28:04 | * | redlegion quit (Quit: Peace, bitches) |
17:28:52 | * | vivus joined #nim |
17:29:42 | miran | my guess is it is because of extensive use of seqs, but i don't have enough nim experience to know for sure and/or to come up with better solution |
17:30:12 | miran | this is what code is doing: http://adventofcode.com/2017/day/21 |
17:30:42 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:33:51 | FromGitter | <Quelklef> miran, are you counting compile time as a part of your benchmark? |
17:33:53 | * | mitescugd quit (Ping timeout: 250 seconds) |
17:33:59 | Yardanico | he isn't of course |
17:34:05 | miran | nope, just execution |
17:34:07 | FromGitter | <Quelklef> hmm |
17:34:16 | FromGitter | <Quelklef> just do the whole thing during compilation problem solved :P |
17:34:27 | Yardanico | generic assign usually is used for memory copying |
17:34:44 | miran | the problem arises when you change `18` to `24` on the line 103 |
17:35:09 | Yardanico | nim profiler results |
17:35:09 | Yardanico | https://gist.github.com/Yardanico/33ac27d190b0c0a56787c4e23a706db3 |
17:35:44 | * | chemist69 quit (Ping timeout: 272 seconds) |
17:36:12 | miran | i would expect it to scale better, as most of the time it should look and find already calculated 9x9 square (in `findNew9x9` proc) |
17:36:33 | FromGitter | <Quelklef> how are you assigning to strings? |
17:36:39 | FromGitter | <Quelklef> in transpose |
17:37:24 | FromGitter | <Quelklef> Also, it looks like you could do this with arrays rather than seqs. I don't think it'd be a huge pain to switch, since there doesn't seem to be any length-changing procedures. |
17:37:59 | miran | transpose takes a really small time, compared to the rest |
17:38:35 | miran | i tried arrays, but it seems i cannot have openarray as return type in proc |
17:38:51 | FromGitter | <Quelklef> you don't have to |
17:39:14 | FromGitter | <Quelklef> instead of doing `proc something(someAr: openarray[string]): openarray[string] =` |
17:39:31 | FromGitter | <Quelklef> iirc you do `proc somethingS (someAr: array[S, string]): array[S, string] =` |
17:39:51 | FromGitter | <Quelklef> also yeah I |
17:40:15 | miran | "there doesn't seem to be any length-changing procedures." -- well, the task is to expand the starting grid, and at each iteration, the grid grows |
17:40:44 | GitDisc | <NopeDK> Couple of questions for the "httpcore" module. Why does the HttpHeaders type not use HttpHeaderValues internally but instead a normal seq[string]? Why even use a seq when headers are normally single strings (though there is a converter which just picks the first value in the seq)? |
17:41:17 | miran | maybe if i have different proc's for different sizes of input/output? |
17:41:32 | FromGitter | <Quelklef> @GitDisc I don't know but I' |
17:41:49 | FromGitter | <Quelklef> sorry, ...m guessing they don't use internal types just so that there's a simpler API |
17:41:56 | Yardanico | pixelsOn takes 10% of time |
17:42:05 | FromGitter | <Quelklef> As for why it's seq[string] rather than string, idk |
17:42:49 | Yardanico | wait |
17:42:54 | Yardanico | how many possible values are there? |
17:42:59 | Yardanico | . / and # ? |
17:43:25 | Yardanico | ah, it also has some => stuff |
17:43:36 | Yardanico | I just mean |
17:43:45 | Yardanico | that if you only have . and # |
17:43:49 | Yardanico | you can store them as a seq of bools |
17:44:18 | miran | bools is how i did it in python/numpy |
17:44:30 | Yardanico | did you try arraymancer? |
17:44:41 | Yardanico | "numpy" is a bit of cheating because it's implemented in cython+ C:) |
17:44:58 | Yardanico | or neo |
17:45:13 | miran | Yardanico: i haven't (yet), but i would try to do this without it/them |
17:45:48 | miran | i would like to explore what are the bottlenecks and how to fix them |
17:46:27 | miran | for some other days i found out how insanely quicker are arrays compared to tables |
17:48:20 | * | yglukhov joined #nim |
17:48:22 | miran | Yardanico: your opinion about arrays vs seqs here? would it make a noticeable difference? |
17:48:43 | Yardanico | well I'm trying to do something with it |
17:49:29 | * | chemist69 joined #nim |
17:51:22 | * | subsetpark joined #nim |
17:52:33 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:54:30 | * | nsf joined #nim |
17:58:27 | Yardanico | hmm, I really suggest you to make a forum post :) |
18:00:31 | FromGitter | <RedBeard0531> Miran: here is how I did it if you want to compare. No claim it is great of course. https://github.com/RedBeard0531/advent_of_code_2017/blob/master/21/a21.nim |
18:01:37 | FromGitter | <RedBeard0531> Also if generic assign perf is the issue try compiling with --gc:merchandiser |
18:01:50 | FromGitter | <RedBeard0531> Err markandsweep |
18:02:03 | FromGitter | <RedBeard0531> Autocorrect... |
18:05:04 | miran | thanks RedBeard! how long does it take you to run part 2? |
18:07:50 | miran | just tried it - about 6x slower than mine.... |
18:08:15 | * | redlegion joined #nim |
18:08:15 | * | redlegion quit (Changing host) |
18:08:15 | * | redlegion joined #nim |
18:09:03 | Yardanico | maybe because it's in debug mode? |
18:09:21 | Yardanico | or wait |
18:09:27 | Yardanico | do you need to actually output the grid or no? |
18:09:31 | miran | nope |
18:09:48 | miran | i changed that part of his code |
18:11:34 | miran | Yardanico: any luck with arrays? |
18:11:41 | Yardanico | no :( |
18:11:58 | miran | ok, i'll make forum post then.... |
18:16:45 | FromGitter | <Varriount> @RedBeard0531 Hm, a merchandiser garbage collector... Does it sell more memory to you when you run out? |
18:18:15 | * | Arrrr quit (Ping timeout: 246 seconds) |
18:21:09 | * | Arrrr joined #nim |
18:23:50 | dom96 | miran: try wrapping in a proc main() = ... |
18:23:57 | Yardanico | oh, yeah |
18:24:02 | Yardanico | this trick sometimes helps a lot :P |
18:24:22 | FromGitter | <mratsim> arrays are good if you have a fixed size known at compile time or at least a max size |
18:24:34 | FromGitter | <Quelklef> why's the main trick help efficiency? |
18:24:40 | Yardanico | because there would be no globals |
18:24:46 | FromGitter | <mratsim> because Nim doesn’t optimize what is in the global scope |
18:24:58 | FromGitter | <Quelklef> a global isn't just a "top-level local"? |
18:25:23 | miran | posted a thread on the forum, now will try dom96's idea with main |
18:25:29 | Yardanico | hmm, this didn't help |
18:26:20 | dom96 | also, this might help https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-your-code |
18:28:05 | miran | dom96: i profiled it but i don't know how to interpret it |
18:28:20 | Yardanico | just see % of all calls |
18:28:40 | miran | here are profile results: https://gist.github.com/anonymous/0a8153491c268dd2fcdb4733fb985d4d |
18:28:53 | dom96 | NopeDK: A single HTTP header key can have multiple values. |
18:29:21 | dom96 | Not sure why HttpHeaderValues isn't used |
18:29:25 | dom96 | Guessing that was added separately |
18:37:09 | FromGitter | <RedBeard0531> I'd |
18:37:45 | * | mitescugd joined #nim |
18:38:25 | FromGitter | <RedBeard0531> I've been pretty happy using perf record/perf report for profiling on linux |
18:39:23 | * | S1t1Schu joined #nim |
18:43:12 | GitDisc | <NopeDK> Ah, didn't know about RFC 2616 for multiple values, thought it was a 1:1 only. And as for HttpHeaderValues, glad I am not the only one slightly confused. Thanks dom96. |
18:43:30 | * | S1tiSchu quit (Ping timeout: 272 seconds) |
18:46:30 | FromGitter | <tim-st> When I have a case .. of .. construct can't I compare it to another var that was declared with let ? --> "Cannot evaluate at compile time" ? |
18:46:36 | * | marenz_ quit (Ping timeout: 246 seconds) |
18:46:41 | Yardanico | code please? :) |
18:48:01 | FromGitter | <tim-st> var test = 0 ⏎ let test1 = 1 ⏎ case test ⏎ of test1: ⏎ echo "here1" ... [https://gitter.im/nim-lang/Nim?at=5a453c6129ec6ac3119390de] |
18:49:21 | FromGitter | <tim-st> when I replace test1 with the actual int value it works. That's strange |
18:50:07 | FromGitter | <Quelklef> `let` variables aren't known at compile time |
18:50:11 | FromGitter | <Quelklef> `const` variables are |
18:50:17 | FromGitter | <Quelklef> try `const test1 = 1` |
18:50:56 | FromGitter | <tim-st> I can't use const there :D it's the len value of a seq |
18:51:14 | FromGitter | <Quelklef> :o |
18:51:44 | FromGitter | <tim-st> But thanks for the answer, didn't know case construct was for const types only |
18:52:15 | FromGitter | <Quelklef> well I'm figuring that from the error "Cannot evaluate at compile time" |
18:52:20 | FromGitter | <Quelklef> on google now to see if it's in the docs... |
18:53:43 | FromGitter | <Quelklef> It's not specified in https://nim-lang.org/docs/tut1.html#control-flow-statements-case-statement |
18:55:11 | Araq | and worse, https://nim-lang.org/docs/manual.html#statements-and-expressions-case-statement is silent about it too |
18:55:38 | Araq | anyway, the values in the 'of' branches must be compile-time values |
18:55:48 | FromGitter | <tim-st> Ok, thanks! |
18:56:03 | subsetpark | Yes, that's something that's quite natural to internalize, but definitely worth mentioning in the manual |
18:56:36 | dom96 | ugh, it annoys me that font awesome doesn't have common things like Discord icons. |
18:57:51 | dom96 | huh, apparently it is there |
18:57:55 | FromGitter | <tim-st> @subsetpark I don't know. I expected in the worst case the compiler would replace it to an if branch which works for non-const vars |
18:58:25 | FromGitter | <Quelklef> case statements do more than if statements |
18:58:33 | FromGitter | <Quelklef> they require all cases to be covered |
18:58:33 | Araq | case is not sugar for 'if', it's about enumerating all the cases. |
18:58:45 | FromGitter | <Quelklef> which is, I assume, why it's compile-time only |
18:58:58 | FromGitter | <Quelklef> yeah what @Araq said |
18:59:00 | Yardanico | tim-st: case statement also ensures that all cases are covered |
18:59:10 | Araq | and also a bit about producing faster code but decent optimizers can do without |
18:59:11 | subsetpark | There's also a significant performance improvement - if I wrote a case assuming the static performance but actually the logic was runtime, I'd be miffed |
18:59:14 | FromGitter | <tim-st> Ok, yes. Now it's obvious :D |
18:59:33 | FromGitter | <tim-st> Thanks for the answers! |
19:07:06 | FromGitter | <data-man> Can be implemented the case macros for runtime values? ;-) |
19:07:22 | Yardanico | but why would you need it then ? :) |
19:07:35 | Yardanico | you can have almost the same syntax with if's |
19:09:08 | FromGitter | <data-man> Syntax honey |
19:15:15 | * | Gertm quit (Quit: ZNC - http://znc.in) |
19:16:06 | * | Gertm joined #nim |
19:23:23 | vivus | dom96: is there anything new/exciting happening in nim-web land? |
19:24:02 | dom96 | karax :) |
19:30:25 | livcd | All things considered which db driver would you consider the most stable / featureful ? |
19:30:29 | GitDisc | <NopeDK> Since pegs is a pure library, can it be used in nimscript? Only docs I could find were from 0.11.3 which does not list it. |
19:30:36 | Yardanico | no |
19:30:40 | Yardanico | because of a VM bug |
19:34:05 | GitDisc | <NopeDK> So it might become available in the future? |
19:34:42 | Araq | it should be but an approach like strscans is superior |
19:37:52 | Araq | livcd: the db_ drivers have problems with NULL that we need to fix for v1 but apart from that are stable |
19:37:57 | FromGitter | <data-man> @Araq: Maybe to add $h, $o and $b for parsing a hex, oct & bin numbers? |
19:38:44 | FromGitter | <data-man> I know about a user defined matchers :-) |
19:39:14 | Araq | PRs are welcome |
19:40:07 | GitDisc | <NopeDK> Why is the strscans approach superior? |
19:42:10 | vivus | Araq: when does nim get nim-dapp/nim-blockchain like Red lang ;) |
19:42:24 | * | nsf quit (Quit: WeeChat 2.0.1) |
19:43:17 | Araq | NopeDK because the parsing is done at compile-time and it produces much more efficient code |
19:43:27 | dom96 | Is that a good idea? I saw a lot of complaints on HN |
19:43:44 | dom96 | (Regarding nim dapp) |
19:43:48 | Araq | vivus: what is 'dapp' and 'blockchain'? |
19:44:43 | vivus | dom96: was mostly a joke :P |
19:44:59 | vivus | dapp = distributed application |
19:45:13 | noonien | what's a distributed application?> |
19:45:15 | Araq | karax+ormin fits the bill |
19:45:32 | vivus | what's a computer? |
19:45:50 | noonien | a computer is a machine that computes |
19:46:18 | dom96 | what's a computes? |
19:47:16 | Araq | oh it's one of these days -- everybody drunk here |
19:48:51 | noonien | i'm genuinely curious what a distributed application is |
19:49:19 | * | dom96 moved nim-lang.org to fontawesome 5 |
19:49:26 | dom96 | Hope this doesn't break anything :) |
19:49:34 | noonien | first result on google: Distributed applications (distributed apps) are applications or software that runs on multiple computers within a network at the same time and can be stored on servers or with cloud computing. |
19:49:52 | noonien | which sounds like retardese |
19:50:19 | dom96 | New article! https://nim-lang.org/blog/2017/12/28/nim-in-2017-a-short-recap.html |
19:51:05 | livcd | Araq: what are the problems with NULL ? |
19:51:09 | dom96 | Time to submit to HN and Reddit :) |
19:51:50 | dom96 | https://news.ycombinator.com/newest |
19:52:04 | GitDisc | <joshi77> @gooro0 |
19:52:16 | GitDisc | <joshi77> uhm |
19:58:09 | * | claudiuinberlin joined #nim |
20:01:39 | GitDisc | <NopeDK> Araq, thanks. Can strscans handle something like the following and split it correctly? |
20:01:39 | GitDisc | <NopeDK> ( -a -b=1 -c:2 -d="3" -e="\"" -f:" \" -a:1 " -g:done -h={y} ) |
20:01:39 | GitDisc | <NopeDK> producing something like |
20:01:39 | GitDisc | <NopeDK> @["-a", "-b=1", ..., "-f:\" \\\" -a:1 \"", "-g:done", "-h={y}] |
20:02:19 | GitDisc | <NopeDK> Damnit, it removed my \ 's |
20:04:16 | GitDisc | <joshi77> Can someone tell me how to fix this |
20:04:18 | GitDisc | <NopeDK> Oh, it worked on the IRC side (and newlines in discord apparently spams IRC, my bad) |
20:04:26 | GitDisc | <joshi77> |
20:04:26 | GitDisc | <joshi77> https://cdn.discordapp.com/attachments/371759389889003532/396030653935910913/image.png |
20:04:51 | GitDisc | <joshi77> or where do you put a downloaded package file |
20:04:54 | Yardanico | you need to install git for windows |
20:05:03 | Yardanico | https://git-scm.com/download/win |
20:05:18 | GitDisc | <joshi77> so it isn't github? |
20:05:24 | Yardanico | what do you mean? |
20:05:35 | GitDisc | <joshi77> nevermind ahm but what does the downloading thing actually do |
20:05:40 | GitDisc | <joshi77> lets say I want to do it manually |
20:05:52 | Yardanico | install git in your path |
20:05:55 | dom96 | https://github.com/nim-lang/sdl2 |
20:05:57 | Yardanico | to be able to clone git projects |
20:05:59 | dom96 | Click download button |
20:06:05 | dom96 | "Download zip" |
20:06:06 | dom96 | unpack |
20:06:10 | dom96 | cd into the directory |
20:06:13 | dom96 | and run `nimble install` |
20:06:19 | dom96 | And you'll have the same result |
20:06:33 | GitDisc | <joshi77> oh |
20:06:42 | GitDisc | <joshi77> |
20:06:42 | GitDisc | <joshi77> https://cdn.discordapp.com/attachments/371759389889003532/396031224818434058/image.png |
20:06:44 | Yardanico | but you will need to do the same for EVERY nimble package |
20:06:45 | GitDisc | <joshi77> It worked thanks |
20:06:56 | dom96 | yeah, you should just install 'git' |
20:09:25 | * | Vladar quit (Quit: Leaving) |
20:10:56 | GitDisc | <joshi77> uh now its missing sdl2.dll |
20:11:01 | Yardanico | yeah |
20:11:02 | GitDisc | <joshi77> for the compiled exe |
20:11:06 | Yardanico | you need to download sdl2 separately |
20:11:15 | GitDisc | <joshi77> uh |
20:11:17 | Yardanico | https://www.libsdl.org/download-2.0.php |
20:11:30 | subsetpark | > myCounter = mySeq.toCountTable() - yesss |
20:11:45 | GitDisc | <joshi77> thx again |
20:14:06 | FromGitter | <tim-st> Has anyone ever compared Hashtable str->str to case .. of .. with the same string semantic or similar types? I have the feeling a could be quicker but I would need some time to implement it for testing :( |
20:14:32 | * | Ven`` joined #nim |
20:14:46 | federico3 | is there a way to import a define from a header file and use it at compile time? |
20:16:13 | federico3 | https://github.com/nim-lang/Nim/issues/4441 aha |
20:17:05 | dom96 | ooh, nice find :) |
20:17:20 | dom96 | Gonna add a doc label to that |
20:17:32 | federico3 | c2nim should do that for us |
20:23:34 | subsetpark | tim-st - the only real use case of associative maps in general is that you don't know all the keys at compile time; otherwise I can't ever think of a circumstance that a case or even if-statement would not be preferable |
20:25:41 | FromGitter | <tim-st> I know all the keys, but it would be nice to have a proc to load K,V from a file; also I thought the performance wasnt to bad with O(1). I cannot have case statement from a file with keys? |
20:25:56 | Yardanico | use marshal? |
20:26:09 | Yardanico | to dump/load variables to/from files |
20:28:19 | FromGitter | <tim-st> Interesting, thanks :D I will try it with case performance first. My first impression is that OrderTable is a minimum faster than Table, but still both of them are much slower than my proc that worked on single words I've written for another use case also in nim |
20:30:40 | FromGitter | <Quelklef> @tim-st I can't imagine a table would be quicker than a case statement |
20:30:42 | FromGitter | <data-man> https://github.com/nim-lang/Nim/pull/6985 - more parsers :) |
20:32:08 | * | Yardanico quit (Quit: Quitting...) |
20:34:28 | GitDisc | <joshi77> and where do I find sdl2 dll 😮 |
20:34:43 | * | Yardanico joined #nim |
20:38:11 | GitDisc | <joshi77> nvm |
20:42:37 | dom96 | heh, so I just saw first-hand that my link didn't get to the front page with 4 upvotes |
20:42:39 | dom96 | whereas another one did |
20:43:04 | dom96 | sucks, but it seems nim-lang.org has a negative penalty on HN |
20:45:52 | GitDisc | <NopeDK> Time to use url shorteners and bypass the wall ;) |
20:48:05 | FromGitter | <tim-st> @Quelklef I've now translated the code to a pure case construct: OrderedTable: 26.0sec, Table 26.2sec, case: 26.6sec; but everything in compiler debug mode |
20:49:41 | FromGitter | <data-man> The one more idea for scanf: if the parameter is tuple, then a parsing results to store into tuple's fields? |
20:49:48 | FromGitter | <Quelklef> Can you send me the code? |
20:51:20 | * | xet7 quit (Quit: Leaving) |
20:52:26 | FromGitter | <tim-st> I didn't plan to publish the code. The first time I used a const table and the second time I wrote a proc lookUp(string)->tuple which does the same. But I will I try it in relase mode again |
20:54:40 | * | xet7 joined #nim |
21:00:38 | FromGitter | <tim-st> The release version is 10 times quicker in both cases, it seems there is no big difference, but of course I like to hear if other people have tested it too and what are their results |
21:02:35 | GitDisc | <NopeDK> Can you embed a .h file with "const resource = staticRead"header.h"" and use something like "{.importc, header: resource.}" to access it? |
21:07:27 | GitDisc | <NopeDK> Or would you need to do the workaround of staticRead -> emit -> importc? |
21:10:21 | FromGitter | <tim-st> I now read that it is "the usual case" in programming languages that map is faster than switch (case), and this seems to be logical too because if there was a way the switch hashing makes it faster, the algorithm could be copied to map. |
21:11:21 | FromGitter | <Quelklef> By that logic, maps should only be as fast as switch statements |
21:11:35 | FromGitter | <Quelklef> where did you read this, too? I'm curious about this whole thing |
21:11:57 | * | nsf joined #nim |
21:12:08 | FromGitter | <tim-st> yes, and that seems to be the case in fact. here is one for golang e.g: https://hashrocket.com/blog/posts/switch-vs-map-which-is-the-better-way-to-branch-in-go |
21:12:49 | FromGitter | <tim-st> or atleast they should be nearly the same |
21:13:22 | FromGitter | <tekjar> Hi. When I'm cross compiling for my microcontroller, `uint32_t` is being typedefed to this ⏎ ⏎ ```typedef unsigned int NU32;``` ⏎ ⏎ Do I need to download nim for arm and use those header files? [https://gitter.im/nim-lang/Nim?at=5a455e7229ec6ac3119434f1] |
21:13:57 | * | Ven`` quit (Ping timeout: 240 seconds) |
21:14:57 | * | avsej quit (Ping timeout: 240 seconds) |
21:15:05 | * | avsej joined #nim |
21:15:05 | * | avsej quit (Changing host) |
21:15:05 | * | avsej joined #nim |
21:15:08 | FromGitter | <Quelklef> @tim-st Wait, I guess map's speed does make sense since it's O(1) to access by probably has bigger overhead than a switch |
21:15:53 | * | xet7 quit (Quit: Leaving) |
21:16:17 | * | miran_ joined #nim |
21:16:31 | * | miran quit (Ping timeout: 260 seconds) |
21:16:41 | FromGitter | <tim-st> Yes, and it's a bad O(1) not something like array access |
21:17:07 | * | Ven`` joined #nim |
21:18:19 | * | xet7 joined #nim |
21:23:03 | * | mitescug1 joined #nim |
21:23:09 | * | mitescugd quit (Ping timeout: 264 seconds) |
21:24:03 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:24:21 | * | xet7 quit (Quit: Leaving) |
21:26:19 | FromGitter | <RedBeard0531> RT you may need to define HAVE_STDINT_H https://github.com/nim-lang/Nim/blob/devel/lib/nimbase.h#L311 |
21:27:12 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:30:02 | FromGitter | <tekjar> @RedBeard0531 How will that make `NU32` `long unsigned int`? |
21:31:32 | FromGitter | <RedBeard0531> RT it will make it an alias for uint32_t |
21:32:33 | FromGitter | <RedBeard0531> Which you say is unsigned long on your system |
21:36:30 | * | xet7 joined #nim |
21:36:41 | FromGitter | <tekjar> @RedBeard0531 Oh yeah sorry. Is this common convention to use -D HAVE_STDINT_H while cross compiling? |
21:39:00 | FromGitter | <RedBeard0531> No idea. So far I've just used nim on amd64 linux. I just noticed that block when reading nimbase.h |
21:39:16 | * | ldlework quit (Ping timeout: 260 seconds) |
21:41:06 | * | claudiuinberlin joined #nim |
21:41:55 | FromGitter | <tekjar> @RedBeard0531 mmm..that works..So my f3discovery led roulette works out of the box..thanks |
21:42:04 | FromGitter | <tekjar> Thaks :) |
21:43:51 | * | ldlework joined #nim |
21:43:51 | * | ldlework quit (Changing host) |
21:43:51 | * | ldlework joined #nim |
21:46:55 | * | yglukhov joined #nim |
21:47:53 | * | miran_ quit (Quit: Konversation terminated!) |
21:50:28 | * | yglukhov quit (Read error: Connection reset by peer) |
21:51:02 | * | yglukhov joined #nim |
21:54:36 | * | xet7 quit (Quit: Leaving) |
21:55:41 | FromGitter | <zacharycarter> does anyone know how to get https://github.com/SFML/CSFML to successfully compile? |
21:56:31 | * | iAmSlow joined #nim |
21:58:06 | iAmSlow | anyone tryed numix |
21:58:07 | iAmSlow | could not load: libSDL2.so |
21:58:36 | iAmSlow | am i missing some libs in my system |
21:58:49 | iAmSlow | i think its probbaly that, duno why i even ask |
22:00:53 | FromGitter | <zacharycarter> what is numix? |
22:01:02 | iAmSlow | libsdl2-2.0-0 is already the newest version (2.0.4+dfsg1-2ubuntu2). |
22:01:14 | iAmSlow | sorry mispeld |
22:01:18 | iAmSlow | https://github.com/yglukhov/nimx/issues |
22:01:21 | iAmSlow | nimx |
22:01:35 | dom96 | zacharycarter: why are you trying to compile it? |
22:01:59 | FromGitter | <zacharycarter> dom96: I want to strip out everything besides the windowing and input code |
22:02:07 | FromGitter | <zacharycarter> and use it for a new project |
22:02:09 | iAmSlow | yey it works now |
22:02:16 | FromGitter | <zacharycarter> \o/ |
22:02:19 | iAmSlow | installed all libsdl2* |
22:02:37 | iAmSlow | tought duno why it depends on it and other gtk stuff dosent |
22:02:46 | FromGitter | <zacharycarter> it shouldn't |
22:03:56 | * | yglukhov quit (Remote host closed the connection) |
22:05:27 | iAmSlow | it dient work unitl i istalled those other libs, shoud i post github issue? |
22:05:32 | iAmSlow | *create |
22:06:31 | FromGitter | <zacharycarter> no |
22:07:11 | dom96 | what other libs did you install? |
22:07:16 | iAmSlow | me? |
22:07:20 | dom96 | yes |
22:07:58 | iAmSlow | i did sudo apt-get install libsdl2* so i have list of 20 |
22:08:05 | iAmSlow | can hastebin |
22:08:41 | dom96 | sure |
22:08:56 | iAmSlow | https://hastebin.com/vamuzivovi.sql |
22:09:18 | iAmSlow | stupit ubuntu void is 10 time better |
22:09:28 | dom96 | you probably just need the -dev packages |
22:09:30 | dom96 | i.e. libsdl2-dev |
22:09:32 | FromGitter | <zacharycarter> you need libsdl2-dev |
22:09:32 | FromGitter | <zacharycarter> yeah |
22:09:34 | FromGitter | <zacharycarter> exactly |
22:10:04 | iAmSlow | oh right |
22:10:06 | iAmSlow | i am tard |
22:10:20 | iAmSlow | frogot i need -dev libs when compiling |
22:10:46 | iAmSlow | my bad sorry |
22:10:59 | iAmSlow | but it dident give me error while i was compiling |
22:11:01 | iAmSlow | hmm |
22:11:16 | iAmSlow | only when i tryed to run |
22:15:13 | * | Trustable quit (Remote host closed the connection) |
22:15:59 | FromGitter | <zacharycarter> what's the error? |
22:16:55 | dom96 | it is odd that the -dev package is needed tbh |
22:16:55 | iAmSlow | hmm i am retard |
22:16:56 | iAmSlow | could not load: libSDL2.so |
22:16:57 | iAmSlow | compile with -d:nimDebugDlOpen for more information |
22:17:14 | iAmSlow | it even told me to "compile with -d:nimDebugDlOpen for more information" |
22:19:33 | dom96 | Don't blame yourself |
22:19:45 | dom96 | That wouldn't give much useful info |
22:25:06 | Araq | mach es wie die Sonnenuhr, zähl die heiteren Stunden nur |
22:26:44 | iAmSlow | sprehezni almond non xD |
22:27:30 | Araq | what language is that? I understood it :P |
22:28:42 | Araq | "do it like the sundial, just count the merry hours" |
22:29:14 | * | Arrrr quit (Read error: Connection reset by peer) |
22:31:09 | * | marenz_ joined #nim |
22:34:50 | FromGitter | <Yardanico> lol, if I type "yard" in google, it gives 'yardanico' at 8th place (instant suggestions) |
22:35:09 | FromGitter | <Yardanico> hard work on changing nicknames everywhere :D |
22:35:28 | FromGitter | <Yardanico> ah, it doesn't work on english google :( |
22:50:30 | * | lukoko joined #nim |
22:55:55 | GitDisc | <NopeDK> Can a "const f = staticRead"file"" be used as a normal file and for stuff like importc? Or is there no way to cast it to something like a virtual filesystem? And for importc, do you then need to "emit" the read contents to import something like a header? |
22:56:15 | * | lukoko left #nim (#nim) |
22:57:52 | * | vlad1777d joined #nim |
22:57:57 | Araq | I think the answer is yes to all of your questions. |
23:06:43 | GitDisc | <NopeDK> To clarify, assume "const f = staticRead"somefile"", first, could functions like system.readBuffer(f) work? What about "{.importc: "somefunc", header: f.}"? Can we do more with staticRead/readFile like have a mutable internal filesystem, basically editable, embedded files? ("open(file.internal("virtualpath")") |
23:08:17 | GitDisc | <NopeDK> How about embedded executables that can actually be run and is not just a binary blob? (Without writing it out, chmod to allow execute, execute and clean up) |
23:09:21 | FromGitter | <data-man> @Yardanico: clear a cookies :) |
23:09:46 | FromGitter | <data-man> And Web storage |
23:17:34 | * | xet7 joined #nim |
23:20:02 | * | nsf quit (Quit: WeeChat 2.0.1) |
23:21:51 | Araq | dunno, NopeDK, I doubt it. |
23:23:31 | GitDisc | <NopeDK> :( Thanks Araq |
23:24:51 | Araq | use getAppDir() / "resource" like the rest of us :P works on all OSes and another benefit is that it drives the /usr/bin neckbeards mad who don't understand software development |
23:25:01 | * | Jesin quit (Quit: Leaving) |
23:27:55 | GitDisc | <NopeDK> The first reason was to embed an autogenerated header file instead of having it external when compiling, then I though about the next step, embedding everything. That would allow all kinds of crazy shenanigans and still only have a single binary when compiled. |
23:29:32 | Yardanico | Yes you can do that |
23:29:51 | Yardanico | I mean you can store file content in constants |
23:33:04 | GitDisc | <NopeDK> Yeah, I was thinking more in line with having a virtual file type so you could act on the consts as if they were the file. This would also allow embedding headers or other files and access them with close to existing code. To embed binaries and actually use them, you currently need to write than back into a separate file and execute. To embed a header file you would need to read it into a const and then emit the content to c and then importc it, |
23:33:04 | GitDisc | <NopeDK> instead of reading it to a const and then just importc the const as if it were a file. |
23:34:19 | Yardanico | You can as well use Enigma VirtualBox :) |
23:34:32 | Yardanico | It's freeware |
23:36:34 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
23:42:14 | GitDisc | <NopeDK> Not really what I was going for, that just embeds stuff but you would be platform locked and have no actual integration with Nim. I was thinking in ways like: |
23:42:14 | GitDisc | <NopeDK> const f = VirtualFile(staticRead("file")) |
23:42:15 | GitDisc | <NopeDK> let c = readBuffer(f) |
23:42:15 | GitDisc | <NopeDK> If endOfFile(f): |
23:42:15 | GitDisc | <NopeDK> Echo "done" |
23:42:15 | GitDisc | <NopeDK> Or something like that. The VirtualFile type would be convertable from and to a normal file for the purpose of normal file procs. |
23:47:47 | GitDisc | <Edoardo La Greca> hey guys, does someone use VS Code? Because I have a problem with the PATH directory. It says: "No 'nim' binary could be found in PATH: '/home/edoardo/bin:/sbin:/bin:/usr/sbin:/usr/bin:/snap/bin' " and actually the nim binary file is in ~/.nimble/bin/nim. I tried to create a syslink of the file inside some of the PATH directories but seems like it's not working. Can someone help me? |
23:50:44 | dom96 | add ~/.nimble/bin/ to your PATH |
23:51:14 | dom96 | You might need to run VS Code from your terminal or restart your machine for the PATH changes to apply |