<< 28-12-2017 >>

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:18FromGitter<Quelklef> on the one hand, cool
02:55:55FromGitter<Quelklef> on the other, assembly
02:59:10FromGitter<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:23krzHi
05:35:52krzAny suggestions for 2d engines for game development?
05:54:22FromGitter<Quelklef> I don't know any but Google seems to :-)
05:56:15FromGitter<Quelklef> could also write your own if you're feeling adventerous
06:14:45*krz quit (Ping timeout: 264 seconds)
06:25:11FromGitter<Quelklef> Question: how dirty is the following:
06:25:40FromGitter<Quelklef> ```let someTable = { ⏎ "someKey": (proc(text: string): int =``` [https://gitter.im/nim-lang/Nim?at=5a448e64e43a7a150cb2a326]
06:37:20FromGitter<survivorm> Araq, thanx for the answer
06:40:42*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
06:57:04FromGitter<survivorm> @Quelklef is code variable global for this fragment?
06:57:48FromGitter<survivorm> @Quelklef And why do you need text var if you don't use it?
06:58:17FromGitter<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:31FromGitter<Quelklef> @survivorm Sorry, should be `text[0]`. the `text` parameter is there so that it matches a certain type
07:05:59FromGitter<Quelklef> I was more talking about having proc directly in dict literals by surrounding them with `(),`s
07:06:26FromGitter<Quelklef> feels kinda dirty to me but if it's the Nim way, then sweet
07:06:49*endragor joined #nim
07:07:25FromGitter<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:32FromGitter<Quelklef> What do you mean by "looks like inline to me"?
07:08:46*yglukhov joined #nim
07:08:48FromGitter<survivorm> Inlining function into table generation
07:09:29FromGitter<Quelklef> yeah, that's what it's doing. I was just wondering if it follows general style conventions or not
07:10:17FromGitter<survivorm> I think nim's style convention is a little... little, yeah :)
07:10:40FromGitter<Quelklef> ?
07:10:47FromGitter<survivorm> https://nim-lang.org/docs/nep1.html
07:11:03FromGitter<survivorm> That's all I've found on the topic
07:11:22FromGitter<Quelklef> Ooh! Fancy!
07:11:50FromGitter<Quelklef> > Two spaces should be used for indentation of blocks ⏎ OOPS
07:12:20FromGitter<survivorm>
07:12:50FromGitter<survivorm> That's perfectly made by editor with nim integration
07:13:21FromGitter<survivorm> I personally use vim, but that's Your choise
07:13:39FromGitter<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:47FromGitter<Quelklef> means I get to know the language more intimately, though!
07:14:18FromGitter<survivorm> Yeah, i tried it too, but on my pc nim package is broken
07:15:20FromGitter<survivorm> and the atom itself is... a little too high-consuming to my tastes, my home notebook has 2GB ram
07:15:28FromGitter<Quelklef> huh. The package is working for me, but is outdated and minimal
07:15:39FromGitter<Quelklef> yeaaaaaaaaah probably vim is a good idea then, lol
07:16:52FromGitter<survivorm> 640K Ought to be Enough for Anyone (c)
07:17:18FromGitter<Quelklef> ©
07:27:39*xkapastel quit (Quit: Connection closed for inactivity)
07:31:49AraqQuelklef: I would use a case statement instead
07:32:50*endragor quit (Remote host closed the connection)
07:34:10FromGitter<Quelklef> good point, but not applicable here
07:34:26FromGitter<survivorm> point here. And if you want to pass code somethere else, just wrap it in proc with proc return type
07:35:03FromGitter<survivorm> But applicable if the code is not dynamic
07:35:18FromGitter<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:59Araquse a bytecode interpreter instead, maybe
07:36:12FromGitter<Quelklef> oh lord
07:36:20Araqa table of proc pointers is a debugging nightmare, been there, done that.
07:36:22FromGitter<Quelklef> the issue there is that I don't actually know what I'm doing : -)
07:36:44FromGitter<Quelklef> it's actually working OK so far
07:36:48FromGitter<survivorm> common isssue :)
07:36:53Araqyeah that's why I'm telling you what to do :P
07:37:28FromGitter<Quelklef> dude I don't think I'm in a state to do bytecode rn
07:37:31FromGitter<Quelklef> or anything real
07:37:38FromGitter<Quelklef> my current implementation doesn't even parse into an AST
07:37:45FromGitter<Quelklef> just directly into Nim constructs
07:37:46FromGitter<Quelklef> oopsies
07:37:53FromGitter<survivorm> @Araq thanx in advance, i was going to use such code myself. Good, now i wan't
07:45:42FromGitter<survivorm> offtop. Who there liked X-com ;)
07:45:48FromGitter<survivorm> ?
07:52:35*vlad1777d joined #nim
07:56:04FromGitter<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:00FromGitter<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:23FromGitter<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:05FromGitter<tim-st> (I mean dll, so,... with library)
09:46:09*vlad1777d quit (Ping timeout: 248 seconds)
09:49:47FromGitter<Yardanico> it's very old and it's not updated
09:50:01FromGitter<Yardanico> btw, guys, on 10th of January I'll need to restart GitDisc :)
09:50:12FromGitter<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:22FromGitter<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:24Arrrri thought offtopic didn't have ears from the outside. Does it mean we cannot rant anymore?
09:55:25Araqyou're always free to rant anywhere
09:56:10Arrrrwhat if i want to rant about Yardanico now that he isn't present in body.
09:56:32FromGitter<survivorm> Freedom of rant, eh? :) (like freedom of speech, if anyone didn't understand)
09:57:29FromGitter<Yardanico> Arrr: what does "isn't present in body" means? :) ⏎ What I'm not actually a real entity?
09:57:51Arrrrnot at the moment
10:01:28FromGitter<Yardanico> hmm
10:08:04FromGitter<mratsim> @krz @zacharycarter is the game engine master. Maybe try his own zengine.
10:08:36FromGitter<mratsim> Or just use SDL
10:10:15FromGitter<survivorm> I think too many games were started with the phrase Or just use SDL and were finished with it too....
10:11:21FromGitter<survivorm> Did you browsed https://nim-lang.org/docs/lib.html#nimble this list?
10:11:45FromGitter<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:34azyi 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:13Yardanicoconvert your string to lower-or-upper case then?
10:35:27*yglukhov joined #nim
10:38:52azyhow 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:14Yardanicoazy can you upload your code to gist/pastebin ?
10:40:36azyhttps://github.com/ehmry/nim-monero/blob/master/monero/monero_vanity.nim
10:41:16azyit generates addresses, then on line 41 checks if a specific part of the address matches your desired prefix
10:41:46Yardanicoand you don't need to duplicate strings
10:41:50azyonly 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:19YardanicotoLowerAscii doesn't modify the string it takes
10:42:21azybut i'd take just being able to case-insensitively search though the first part of it
10:42:37Yardanicoyou can check it here - https://github.com/nim-lang/Nim/blob/master/lib/pure/strutils.nim#L214
10:42:44Yardanicoit doesn't touch "s" variable
10:42:59Yardanico(I mean it doesn't modify it)
10:43:23azyyeah i get what youre saying, i just find nim incredibly difficult to understand
10:43:35Yardanicowell maybe because it's different from other languages ? :)
10:43:36*jsn- quit (Ping timeout: 260 seconds)
10:43:41Yardanicoand also this monero thing is very specific
10:43:42*jsn- joined #nim
10:43:45Yardanicowith some low-level stuff :)
10:45:12Yardaniconim is pretty straightforward when you read tutorials + manual + write some code in it
10:45:50azyyeah im sure
10:46:18azyi figured i'd be able to guess my way through it because ive coded with c+php for a while. nope
10:46:42FromGitter<survivorm> It's more like python
10:46:45Yardaniconim is very different from c or php, it's probably closer to C though
10:46:53*mitescugd joined #nim
10:47:15Yardanicoand really nim doesn't have a lot of common with python except indentation and some syntax "style" :)
10:47:15FromGitter<survivorm> from my opinion, as a python programmer ( :) )
10:47:36YardanicoI was a python programmer, and firstly I thought that nim is very similar to python, yeah
10:47:44Yardanicobut after learning it it's very different
10:47:53Yardanicomacros/templates/generics/static type system
10:49:03FromGitter<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:38FromGitter<survivorm> But sometimes I found it's error messages a little lacking
10:49:55FromGitter<survivorm> blaming the templates :)
10:50:41FromGitter<survivorm> I had en error then i forgot to set seq type in the object field definition
10:50:59FromGitter<survivorm> and got pretty weird errors....
10:51:04Yardanicoreport it on github
10:51:16Yardanicothere's a lot of issues about error messages, but please report it
10:51:44FromGitter<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:43dom96azy: continuesWith(b58.toLowerAscii(), prefix.toLowerAscii(), 2) is what you want I guess
11:03:59*yglukhov_ joined #nim
11:04:21dom96Note 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:24FromGitter<alehander42> what's the trick to use `"\n"` with strformat :?
11:04:30azyyeah i got it already :D
11:04:45Yardanicoalehander42: ??
11:04:49azynow im trying to figure out how to replace b58 with key.address so it searches the full address
11:04:52dom96alehander42: I think there is a PR waiting or already merged to introduce fmtr or something
11:05:02Yardanicoah
11:07:20Yardanicoazy: try "$key.address"
11:07:25dom96Maybe I'm dreaming, all I can find is https://github.com/nim-lang/Nim/issues/6958
11:07:32FromGitter<alehander42> hm I can't find it in the nim-lang repo, not a dealbreaker tho
11:07:35Yardanicothere's a proc to convert a secret key to string - https://github.com/ehmry/nim-monero/blob/cb4e7886c4e6dfeab3b4445132e76aa30dcfe0e2/monero/crypto.nim#L21
11:07:50dom96I still believe it should be called 'f' not 'fmt'
11:07:59Yardanicoto really fully match python ? :P
11:08:22dom96to bring it closer to Python
11:09:11Yardanicotemplate f(data: string): string = strformat.fmt(data)
11:09:25Yardanicoor use "bind" to not export fmt to other modules
11:09:48dom96Why name it 'fmt'? The implementation follows Python's f-strings closely
11:09:54dom96Please read my replies
11:15:53FromGitter<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:12Yardanicocan you please reformat this code ? :)
11:16:19FromGitter<data-man> Why the Nim should be similar to the Python?
11:16:21Yardanicoah, no, I can do this myself
11:18:05FromGitter<survivorm> @Yardanico done
11:18:08Yardanicosurvivorm: also, github has nim syntax highlighting - use ```nim at the start instead of ``` :)
11:18:17YardanicoI've already changed that
11:18:54dom96Btw, it's convention to start all type names with an uppercase letter
11:19:29Yardanicosurvivorm: ah, yeah, error messages are always hard to do in the compiler :)
11:19:43dom96seq isn't a concrete type
11:19:49FromGitter<survivorm> I can imagine
11:19:53Yardanicodom96 but error message doesn't say that :)
11:20:11Yardanicoit says "Error: invalid type: 'T' in this context: 'Property'"
11:20:17Yardanicowhich is VERY confusing
11:20:34dom96I agree
11:20:54FromGitter<survivorm> Yeah, nearly brought me to abandon nim for a while
11:21:01dom96Awww :\
11:21:38FromGitter<survivorm> spend at least half a day trying to understand what does it mean
11:23:28dom96Yeah, sorry about that.
11:23:42FromGitter<survivorm> Not your fault
11:24:35dom96I might have a go at trying to improve that error message. Can't lean on Araq for everything :)
11:25:11YardanicoI'll try to do it too :P
11:25:13Araqthat error message is probably the most confusing in Nim
11:25:27Araqit's not hard to fix but it's laborsome
11:26:14Yardanicolol, google translate doesn't have this word "laborsome"
11:26:15FromGitter<survivorm> How about making error docs? Standart lib docs are mostly awesome, but the errors are... not
11:26:28dom96Araq: I appreciate the honesty, but maybe to get more people into compiler dev it's time to lie? :P
11:26:37dom96"Oh this should be easy to fix, go for it!"
11:26:41Yardanicosurvivorm: it would be horrible
11:26:49Araqwell it's in one place in the compiler
11:26:54dom96Error docs would be great
11:26:55Araqand I can guide you
11:27:06Araqand it's not hard, as I said.
11:27:20Araqthat should motivate you already.
11:27:29Araqmost other things are hard :P
11:27:35Yardanicoyeah, nim compiler is very hackable :3
11:30:07FromGitter<survivorm> @Yardanico didn't quite understand, which one you consider horrible?
11:30:59Yardanicosurvivorm: well error docs are good expect if we have errors like in your code snippet
11:31:41dom96error docs would show examples of the error, which might help diagnose the issue
11:32:00Yardanicodom96, btw is it known that you can't compile devel nim if you have a nim installed via choosenim?
11:32:14dom96no?
11:32:16Yardanicoor maybe it's because of koch
11:32:35Yardanicohttps://gist.github.com/Yardanico/14b46fb435965d8ddfb88beb9bb9d480
11:33:47dom96huh, I did see that before.
11:33:55dom96I guess koch is copying 'nim' from PATH?
11:34:16FromGitter<survivorm> Btw, maybe it will be good to make semi-automatic error collection mechanism?
11:34:33dom96what do you mean by that?
11:34:35Yardanicosurvivorm: what do you mean? something like google analytics?
11:35:21dom96Araq: Okay, I'm going to get food and then you can guide me and/or Yardanico too :)
11:35:23Arrrri think playground is broken
11:35:43FromGitter<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:57YardanicoArrrr yeah, doesn't work for me either
11:36:05dom96ping zacharycarter ^
11:36:45dom96I wonder what will happen...
11:36:48dom96!eval echo 42
11:36:48NimBotCompile failed: <no output>
11:37:05dom96Glad it doesn't get stuck heh
11:37:23Yardanicoit returns 502 (code compile request)
11:38:23dom96Guess it crashed
11:38:55dom96zacharycarter: 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:12Yardanicodom96 if you want I can set up discord bridge on nim servers too
11:39:27dom96yes
11:39:39dom96I'll make you an account later on
11:39:39Yardanicoit's very simple actually
11:39:41dom96for now food
11:39:54YardanicoI can just give you the config file with all passwords :P
11:40:00FromGitter<data-man> And do the core developers get paid? :-)
11:40:02Yardanico(and settings)
11:40:19Yardanicodata-man: zahary does (not much AFAIK)
11:41:09Yardanicowell I mean not much comparing to real full-time salaries
11:42:09ArrrrNim is still a small fish
11:42:21dom96https://github.com/nim-lang/Nim/issues?q=is%3Aissue+label%3A%22Work+Report%22+is%3Aclosed
11:42:27dom96We're transparent :)
11:42:27YardanicoAlso Araq works at Xored
11:42:53dom96and yeah koch copies the .exe, which ends up badly for choosenim
11:42:56dom96not sure what the solution is
11:42:58dom96brb
11:43:19YardanicoI'm not really sure why, but there's a lot of russian-speaking people in Nim community :)
11:44:10FromGitter<survivorm> Habrahabr, maybe :)
11:44:27FromGitter<survivorm> Several posts on nim
11:44:33Yardanicoyeah, only several :)
11:44:33FromGitter<survivorm> many comments
11:44:54Yardanicobecause a lot of people say "why this language is useful?"
11:45:09Yardanicobut for example ZEO Alliance is located in Ukraine
11:45:27FromGitter<survivorm> I, personnaly came from it's discussion in crystal post
11:45:27YardanicoXored is located in several locations including (and AFAIK it's the man one) Russia
11:45:43FromGitter<survivorm> as far as i remember
11:47:06Arrrrdo you prefer nim to crystal?
11:47:08FromGitter<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:45Yardanicodata-man: no, I didn't heard about that forum until now really:)
11:47:48Yardanico*hear
11:47:57Yardanicoyou can create it yourself, no ? :)
11:48:57FromGitter<data-man> http://forum.ru-board.com ⏎ Yes, of course I can. :)
11:49:03Yardanicoyeah, I'll register now
11:49:12Yardanicodid you join my group in VK btw? :D
11:49:29FromGitter<data-man> http://forum.ru-board.com/forum.cgi?forum=33
11:50:28FromGitter<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:28FromGitter... gitter.im/nim-lang/Nim?at=5a44da8403838b2f2a4589a3]
11:51:28FromGitter<survivorm> @Arrrr hope this answers your question
11:51:46FromGitter<data-man> @Yardanico: I do not like social networks :)
11:52:09Yardanicoah, 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:09FromGitter<data-man> How would you translate "Efficient and expressive programming." into Russian? :)
11:55:40FromGitter<survivorm> Эффективный и выразительный, не?
11:56:01Yardanico"Эффективное и выразительное программирование", but it doesn't sound that great in russian
11:56:06Yardanicobut it's ok
11:57:00FromGitter<survivorm> I think it's better to rephrase to speak about a language
11:57:05Yardanicoyeah
11:57:07*sz0 quit (Quit: Connection closed for inactivity)
11:57:15FromGitter<survivorm> not about the coding process itself
11:57:31FromGitter<data-man> http://forum.ru-board.com/topic.cgi?forum=33&topic=14721 Welcome! :)
11:58:08Yardanicowow
11:58:12Yardanicoyour account here is 12 years old
11:58:16YardanicoI'm only 17 years old
11:58:17Yardanico:D
11:58:22FromGitter<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:08Yardanicodata-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:09Yardanico:D
12:06:17FromGitter<data-man> @Yardanico: I edited the first post.
12:18:18Yardanicostill 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:56FromGitter<survivorm> @data-man Может, добавить в шапку пример запуска? ⏎ `nim c --verbosity:0 ./tests/average.nim; cat ~/ttt/setup.py | ./tests/average`
12:24:57*gokr joined #nim
12:25:23FromGitter<survivorm> потому что иначе там бесконечный ввод
12:25:39FromGitter<survivorm> Excuse me
12:25:47YardanicoDon't worry
12:25:53Yardanicoyou can sometimes use another languages here
12:25:59YardanicoRussian/German/etc
12:26:02FromGitter<survivorm> forgot to use language understandable to all users
12:27:44*Snircle joined #nim
12:28:21*benoliver999 joined #nim
12:29:38FromGitter<data-man> @survivorm: There are mostly the Windows users. :)
12:33:11FromGitter<data-man> And the example taken from the Nim main page. :)
12:47:06FromGitter<data-man> Hmm... the Nim not present in https://github.com/topics/
12:47:44*nsf quit (Quit: WeeChat 2.0.1)
13:04:12dom96https://github.com/topics/nim
13:04:38Yardanicodom96 but you can't find it on https://github.com/nim sadly
13:04:47Yardanicosorry
13:04:51Yardanicohttps://github.com/topic
13:05:01dom96Seems like you can make PRs to rectify this somewhat https://github.com/github/explore/tree/master/topics
13:05:40FromGitter<survivorm> @data-man Still, link to the main page on the forum is a must :) If you even give link to rosetta
13:06:02Yardanicosadly a lot of nim examples on rosetta code are very outdated
13:06:17dom96Anybody wanna create a PR to add Nim there?
13:06:21Yardanicosome of them for example use typeless arguments, which were deprecated a (relatively) long time ago
13:07:16dom96ewww really?
13:07:20FromGitter<zacharycarter> morning all
13:07:20Yardanicoyes
13:07:39Yardanicoand rosetta is very laggy
13:07:43dom96zacharycarter: read logs regarding playground (TL;DR: it's down)
13:08:07FromGitter<survivorm> morning :) Nj some of us
13:08:22Yardanicodom96 a random example - https://rosettacode.org/wiki/Horner%27s_rule_for_polynomial_evaluation#Nim
13:08:52dom96fix it :)
13:09:18FromGitter<data-man> @survivorm: "Домашняя страница" (Home page) :-)
13:09:51FromGitter<survivorm> @data-man sorry
13:10:13FromGitter<survivorm> it looks like the part of the forum control itself
13:10:30FromGitter<survivorm> and got filtered by my brain :)
13:11:01dom96This is cool: https://www.rosettacode.org/wiki/Special:MostLinkedCategories
13:11:22Yardaniconim is at the first page, yay
13:11:26dom96We're in the top 50 :)
13:11:46Yardanicothere's no rust on the first page btw
13:11:48dom96Above Rust :O
13:11:55Yardanicoreally?
13:11:57dom96and Swift
13:12:02Yardanicoah
13:12:04dom96Rust is #63
13:12:07Yardanicoalso above crystal
13:12:08dom96Swift #74
13:12:12FromGitter<survivorm> still, there's much stairs to climb :)
13:13:32dom96Crystal has only 27 problems implemented
13:13:47FromGitter<zacharycarter> @dom96 I read them - I'd be fine with that, just need to know what to do
13:13:52dom96Another indicator for language popularity :)
13:14:05Yardanicowell a lot of nim examples were written a long time ago
13:14:43FromGitter<survivorm> Hey guys, btw, is there a list of projects using nim in production?
13:14:48dom96One of these days I'm going to combine all these indicators into one super-popularity-index
13:14:55Yardanicosurvivorm: yes
13:14:59Yardanicobut not all companies are here
13:15:08dom96https://github.com/nim-lang/Nim/wiki/Companies-using-Nim
13:15:19FromGitter<survivorm> Thanx
13:15:28dom96ooh, some new companies there
13:15:39Yardanicothere's no Xored or ZEO alliance for example :)
13:15:58Yardanicoah, sorry
13:16:02Yardanicothere's Onset Game
13:17:22FromGitter<data-man> http://exercism.io/languages/nim/exercises :-(
13:17:34FromGitter<survivorm> btw, their forum is 502
13:18:09*azy left #nim (#nim)
13:18:11FromGitter<zacharycarter> hrm - I need to figure out how to create a lock free job system over this holiday break I have
13:18:30dom96zacharycarter: okay, so I suppose I'll create an account for you on the VPS
13:19:02dom96send me your ssh pub key :)
13:20:20FromGitter<zacharycarter> okay will do
13:20:29FromGitter<zacharycarter> playground should be back up btw
13:20:31dom96also, what username do you prefer?
13:21:32FromGitter<zacharycarter> ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoS2uRk/ByYlHsWlD7ABE8xlI+ykaDgAo3E5XdHJ1JYlKyD2bNUrEBQNKpmHiz+o9mPFn8LNu+YyFaRZTo5d0G1TOoq/r61FVOM3L+irbrKN7caL3EHgXWKcZ8kM3a/lJhWTYQ7UzwJ4d8iWCGRxzyWHqK0ggWDymLezeVlJXV4ZzErVPOLat0yJPndLRPu8jV2FhQsefmxwAfs+xEroBjUplS/VnPhUMiaLU2H8CdpZ4gmtlJNtEpdug3cu2oyuknQJZfRT3ap1TsnMLerDMsM6qjuR2SddDJuwxK3qziTohWMUN4Cp1HORMv/D7fZPAylag1qp+sJwJpGdC6Hfp9 [email protected]
13:21:42FromGitter<zacharycarter> zachcarter works for me
13:22:30Yardanicodom96 maybe we can set up an account for me too? to run discord bridge :)
13:22:40dom96Yardanico: sure
13:22:46dom96username and pub key as well please
13:22:54Yardanicossh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0KEwC1kqhEQPZJPbgWTDPedjz3Q+QVczwAYAKI+wfjsaHJg/3vTrmb4GJMx4QXW9H00cXM9RarA604+5DiLZlWxzs+rkSvH+XkhGFQEXZ5ZnE/9V5ixvm9aCTu/BdfU9QpJj8PBwlHLiOoERLEFzXvSqdcZaGSEYNqxxJ/fmUxMvbJ6flU65mnN3ABA5ZBqkC5X2gLh/FBnXcbjI6oIyD31YpPEo9neVTLHrSl4XPNo2zMcIiMW1rX3bVP0Tp2us0k5+bYnG/r7ZKJOYDPyBxp37Yx4FyHsljMQXByY6sQpBK5oggA7waCvg1veW9ZhV9khcYuhvmRvZOKlnkqoRh tiber@mac
13:23:04Yardanicojust "tiber" as an username :)
13:23:12dom96hrm, I should probably try recompiling NimBot
13:23:17dom96it's leaking memory like mad
13:24:21*NimBot joined #nim
13:29:15dom96hrm, would be nice if choosenim supported global installs
13:31:46*miran joined #nim
13:38:01FromGitter<data-man> @dom96: PR to github's explore requires: "I am: Curating a new Topic page" :-(
13:38:56dom96huh?
13:39:35YardanicoWell you don't really need to "curate" it
13:39:35Yardanicohttps://github.com/github/explore/blob/master/CONTRIBUTING.md
13:40:32*NimBot joined #nim
13:41:09dom96!eval echo 42
13:41:29*NimBot joined #nim
13:41:31Araqlol
13:41:45Yardanico:D
13:41:56Yardanicouniverse.exe has stopped working
13:43:04FromGitter<survivorm> programmers humor... still don't find some things funny even though i'm a programmer too :facepalm:
13:43:28Yardanicoit's a hardcore programmer humour
13:44:06dom96new async tracebacks :) https://gist.github.com/dom96/521970087b140c901d164b3da9460b66
13:44:08Araq!eval echo 42
13:44:24*NimBot joined #nim
13:44:25AraqNimBot is a stable piece of technology
13:44:31FromGitter<survivorm> think i'm not hardcore enough. I'm not an oak, as Petyka and Vasiliy Ivanovich :)
13:44:51Yardanico!eval echo "Answer is 42"
13:45:10*NimBot joined #nim
13:45:12Yardanicosorry
13:46:09dom96This is due to `[]` now failing with an IndexError when slice is too large
13:46:10FromGitter<survivorm> nice tb, btw
13:46:31FromGitter<survivorm> informative enough
13:47:40dom96Glad you like it :)
13:48:07*NimBot1 quit (Remote host closed the connection)
13:48:17FromGitter<survivorm> and "stable piece of technology" is a myth
13:48:32Araqno, a joke
13:48:43FromGitter<survivorm> I think even angband isn't a completely stable
13:49:10FromGitter<data-man> Where can I get a large Nim icon? 😄
13:49:36FromGitter<survivorm> 1600*1200? :)
13:50:10FromGitter<data-man> I forked github's explore. ⏎ 288x288
13:50:27Yardanicothere's nim svg icon
13:52:55*NimBot joined #nim
13:53:00dom96!eval echo 42
13:53:02NimBot42
13:53:06Yardanicoyay
13:53:22dom96Now compiled via bleeding edge Nim :)
13:53:33FromGitter<survivorm> ah, now i understand
13:53:46FromGitter<data-man> https://github.com/nim-lang/Nim/blob/devel/web/assets/images/nim-logo.svg ?
13:53:56FromGitter<survivorm> and yes, i remember the catch 42
13:54:12FromGitter<survivorm> Or was it 22?
13:55:47FromGitter<survivorm> o, it was really 22, sorry ^)
13:59:21FromGitter<RedBeard0531> Why does every image show a different color for the front of the crown?
13:59:37FromGitter<RedBeard0531> is it supposed to be gold, black, or white?
14:00:31Yardanicodata-man: probably you need to use this one
14:00:33Yardanicohttps://github.com/nim-lang/assets/blob/master/Art/logo-crown.svg
14:02:14FromGitter<RedBeard0531> I had no idea there was a mascot! https://github.com/nim-lang/assets/blob/master/Art/mascot.svg
14:02:30YardanicoI haven't too!
14:03:13dom96Yardanico: zacharycarter: ssh [email protected] and ssh [email protected] should work
14:03:13FromGitter<survivorm> Me too!
14:03:37FromGitter<survivorm> Interasting, does Araq knows :)
14:03:44Yardanicodom96 yeah it works
14:05:01dom96we really need to clean up that assets repo
14:06:41YardanicoTransfering GitDisc to nim VPS, expect a 1-2 minutes of downtime :)
14:06:46Araq!eval echo "catch 22"
14:06:46*GitDisc quit (Remote host closed the connection)
14:06:48NimBotcatch 22
14:07:33Araqthat mascot is not official and similarities with Nim's creator are pure coincidence
14:07:47dom96hah
14:08:06FromGitter<RedBeard0531> I'll take that as evidence that you are an angry badger(?)
14:08:10FromGitter<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:48GitDisc<Yardanico> Hi from Nim VPS
14:09:10dom96that was quick
14:09:35Yardanicowell it's easy to download a binary file and copy-paste config :)
14:09:54FromGitter<data-man> (https://files.gitter.im/nim-lang/Nim/MU7x/nim-logo.png)
14:10:08dom96Don't use that one
14:10:32Yardanicomaybe https://github.com/nim-lang/assets/blob/master/Art/logo-crown.svg ?
14:10:34FromGitter<survivorm> Golden-golden is more beautiful
14:10:41FromGitter<survivorm> in my opinion
14:10:41dom96Put this one on a dark background and use it https://github.com/nim-lang/website/blob/master/jekyll/assets/img/logo.svg
14:11:09dom96survivorm: I guess Pale Moon doesn't support flexbox properly
14:11:23FromGitter<survivorm> may be
14:11:55FromGitter<survivorm> just informing. Other parts of page display differently, but ok
14:12:07FromGitter<survivorm> but this one's not
14:13:09dom96data-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:54FromGitter<data-man> (https://files.gitter.im/nim-lang/Nim/xLPc/logo.png)
14:16:18FromGitter<data-man> Oops :(
14:16:49FromGitter<survivorm> Ah, great joke :)
14:17:50FromGitter<data-man> background must be transparent (I saw in a others langs)
14:18:45dom96they can't enforce that
14:22:06*xkapastel joined #nim
14:23:26FromGitter<data-man> Maybe to write "Nim" under a icon? A which color?
14:23:37dom96You can just use the crown
14:23:51dom96The name of the language will already be written there
14:24:22FromGitter<data-man> Ok
14:28:02livcdhow 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:23yglukhovlivcd: 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:24FromGitter<zacharycarter> it's pretty well documented - not sure what bugs you're referring to livcd
14:30:37dom96livcd: What are you planning to create if you don't mind me asking?
14:32:49FromGitter<data-man> (https://files.gitter.im/nim-lang/Nim/KLfQ/logo.png)
14:34:56dom96Good, but you need that dark background
14:43:03FromGitter<zacharycarter> I think another game engine that Nim could potentially be used w/ is http://armory3d.org/
14:43:07FromGitter<zacharycarter> via something like
14:43:11FromGitter<zacharycarter> https://github.com/TomBebbington/hx-ffi/
14:45:50FromGitter<data-man> (https://files.gitter.im/nim-lang/Nim/kF3M/logo.png)
14:46:02FromGitter<survivorm> @zacharycarter interesting
14:46:54dom96data-man: good, although I would put the same amount of padding on the left and right as the bottom and top
14:47:02dom96otherwise it will look odd on white
14:47:57FromGitter<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:43FromGitter<survivorm> Cause in messanger such a good idea will be lost in a week, maximum
14:49:02Yardanicoyou mean needed-libraries?
14:49:15Yardanicohttps://github.com/nim-lang/needed-libraries
14:50:17FromGitter<survivorm> That's cool (btw, still need link, if it's not in doc index), but i'm not about that
14:50:35FromGitter<data-man> @dom96: Image must be square. To reduce the size of the crown?
14:50:40FromGitter<survivorm> But close, yeah
14:51:13dom96data-man: make the background larger then I guess
14:52:40FromGitter<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:35FromGitter<survivorm> but still, there's link for the needed libraries repo?
14:57:13FromGitter<survivorm> I've heared about it first than you said about it, @Yardanico
14:57:39federico3https://github.com/nim-lang/needed-libraries/
14:57:55livcddom96: simple agent with a control UI that would be a webpage
14:58:03FromGitter<survivorm> great. I meant on site
14:58:14livcdusing websockets
14:59:28dom96Go for it :)
15:05:31livcdoh that armory3d looks interesting
15:07:36FromGitter<data-man> (https://files.gitter.im/nim-lang/Nim/ckW9/logo.png)
15:08:38miranis there a simple (built-in) way to extract 2d slice of a seq?
15:08:59mirane.g. s[0 .. 3, 5 .. 7]
15:14:58*krz joined #nim
15:19:31*krz quit (Client Quit)
15:25:05FromGitter<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:44FromGitter<alehander42> @survivorm maybe https://github.com/VPashkov/awesome-nim ?
15:26:30dom96data-man: I'd add "python" as a related topic
15:27:05FromGitter<Yardanico> btw, can you link github user profile instead of "Andreas Rumpfs" or this repo doesn't allow that?
15:27:12dom96"in the order of priority" -> "in that order of priority" this reads better for me
15:27:47FromGitter<Yardanico> dom96: btw we have that in repo description
15:27:50FromGitter<Yardanico> on github
15:27:57FromGitter<Yardanico> here - https://github.com/nim-lang/Nim
15:28:06FromGitter<data-man> Yes, taken from the repo? :-)
15:28:19dom96Changed. Hopefully Araq won't disagree with me here.
15:31:09FromGitter<data-man> To add nimrod to the aliases?
15:31:11Araqdid you remove my name from my work again?
15:32:29dom96data-man: no
15:33:10Araqoh I see, I don't mind
15:33:30Araqmiran: [s[0..3], s[5..7]]
15:34:03FromGitter<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:56FromGitter<Yardanico> maybe remove "www" from url ? :D
15:36:07FromGitter<Yardanico> "https://nim-lang.org"
15:36:14dom96+1
15:36:45miranAraq: i can't make that to work....
15:36:53FromGitter<Yardanico> "Statically typed and compiled, it provides unparalleled performance in an elegant package." this may confuse people btw :)
15:36:59FromGitter<data-man> Oh, copied from Rust :)
15:36:59FromGitter<Yardanico> I know it's from main page
15:37:21miranhere's an example: var s = @["abc", "def", "ghi"]
15:37:58mirani want to extract first two rows, and last two characters in each.
15:38:14Yardanicomiran: then I'm afraid there's no builtin operator for that
15:38:20Yardanicowhy you don't want to type 2 or 3 lines? :)
15:38:53mirani'm just asking if there is some way to do that, that i'm not aware of
15:41:14dom96data-man: don't worry too much, we can always open more PRs to improve it :)
15:41:55FromGitter<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:02FromGitter<data-man> :-)
15:42:25FromGitter<Yardanico> LGTM :P
15:42:27*nsf quit (Quit: WeeChat 2.0.1)
15:42:42dom96Although I would change the "Statically typed and compiled, it provides unparalleled performance in an elegant package." too :P
15:42:48Yardanicoyeah
15:42:59Yardanicobut it's copied from main page on nim website
15:43:20dom96I've read it so many times now it feels cheesy heh
15:43:35dom96check what other languages have, like PHP
15:45:44FromGitter<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:43FromGitter<data-man> ```code paste, see link```
15:52:46FromGitter<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:59YardanicoObjective C also
15:53:00dom96Some Nim discussion here: https://news.ycombinator.com/item?id=16021965
15:54:39FromGitter<data-man> I mean grammar? :-)
15:55:02dom96s/runs/run/ :)
15:55:05*endragor quit (Remote host closed the connection)
15:55:37dom96Although I wouldn't focus on that about Nim
15:55:40dom96It's an implementation detail
15:55:44dom96and many people are put off by it
15:56:12FromGitter<alehander42> the compile targets?
15:56:28Yardanico"Nim compiler produces dependency-free binaries for Windows, macOS, Linux" :P
15:57:10FromGitter<alehander42> I think the JS backend is an important detail
15:57:35Yardanicobut it should be separated from "binaries" :)
15:58:38dom96Nim 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:00FromGitter<data-man> It's for the short description. ⏎ What a long description? :-)
16:07:33dom96is that too long?
16:07:56FromGitter<data-man> "Statically typed and compiled, it provides unparalleled performance in an elegant package."
16:09:37FromGitter<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:32dom96no, your previous short description was fine
16:10:36Yardanicojust make a PR already :)
16:10:39dom96What I sent should be the long description
16:10:41Yardanicoand push changes to it :P
16:13:40FromGitter<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:56FromGitter<Yardanico> maybe remove that "Statically typed and compiled, it provides unparalleled performance in an elegant package." ?
16:14:15FromGitter<Yardanico> or edit it
16:14:18FromGitter<Yardanico> to remove "unparalleled"
16:15:07FromGitter<Yardanico> I didn't encounter "unparalleled" having the meaning of "best" until Nim :)
16:15:21*endragor quit (Ping timeout: 264 seconds)
16:15:27FromGitter<data-man> People love a statically typed langs. :-)
16:15:47Yardanicowe just need to edit "unparalleled" :)
16:16:47FromGitter<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:38FromGitter<Yardanico> maybe replace "unparalleled" with "great"? IDK really, I'm not a native english speaker
16:20:25dom96huh?
16:20:34dom96Why are you making the "long" description so short?
16:21:14dom96Your "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:48FromGitter<data-man> Too late :) ⏎ https://github.com/github/explore/pull/128
16:30:59Yardanicojust edit it, no ? :)
16:31:47dom96and again...
16:31:51dom96dark background on logo
16:32:02dom96why did you remove it?
16:32:39FromGitter<data-man> Oh, not copied file from other dir :-(
16:33:19dom96please edit the description too
16:36:36FromGitter<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:14dom96sure
16:39:33FromGitter<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:06Yardanicohttps://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:46mirani'm solving AoC and for one day i cannot get the nim solution to scale as good as python....
17:19:14mirani've profiled my code and it seems that "assign.nim: genericAssign " takes a lot of time....
17:19:21Yardanico0.17.2 or 0.17.3?
17:19:59Yardanicoyour nim
17:20:14mirancurrently running devel
17:20:18Yardanicohmm, IDK then
17:20:29Yardanicoyou can create an issue on github (or better create a forum post)
17:21:08mirani guess the fault is my code, not nim in general, so no issues to open ;)
17:21:12miranhttps://www.reddit.com/r/adventofcode/comments/7mlgqv/2017_day_21_part_3_how_many_pixels_stay_on_after/
17:22:48miranin nim i get 0.12 sec for 18 iterations, and 7.6 sec for 24 iterations
17:22:50Yardanicomiran and where's your code ? :)
17:23:24miranpython is 0.4 sec and 16 sec
17:24:05miranYardanico: let me clean it up a bit and i'll send a link
17:26:37miranhttps://gist.github.com/anonymous/bc528ced2cb4faeede915f1f8d0211ee
17:27:13Yardanicomiran can you please share the input file too?
17:28:00miranhttps://gist.github.com/narimiran/adf3012170eef88c355b7978f300c404
17:28:04*redlegion quit (Quit: Peace, bitches)
17:28:52*vivus joined #nim
17:29:42miranmy 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:12miranthis 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:51FromGitter<Quelklef> miran, are you counting compile time as a part of your benchmark?
17:33:53*mitescugd quit (Ping timeout: 250 seconds)
17:33:59Yardanicohe isn't of course
17:34:05mirannope, just execution
17:34:07FromGitter<Quelklef> hmm
17:34:16FromGitter<Quelklef> just do the whole thing during compilation problem solved :P
17:34:27Yardanicogeneric assign usually is used for memory copying
17:34:44miranthe problem arises when you change `18` to `24` on the line 103
17:35:09Yardaniconim profiler results
17:35:09Yardanicohttps://gist.github.com/Yardanico/33ac27d190b0c0a56787c4e23a706db3
17:35:44*chemist69 quit (Ping timeout: 272 seconds)
17:36:12mirani 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:33FromGitter<Quelklef> how are you assigning to strings?
17:36:39FromGitter<Quelklef> in transpose
17:37:24FromGitter<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:59mirantranspose takes a really small time, compared to the rest
17:38:35mirani tried arrays, but it seems i cannot have openarray as return type in proc
17:38:51FromGitter<Quelklef> you don't have to
17:39:14FromGitter<Quelklef> instead of doing `proc something(someAr: openarray[string]): openarray[string] =`
17:39:31FromGitter<Quelklef> iirc you do `proc somethingS (someAr: array[S, string]): array[S, string] =`
17:39:51FromGitter<Quelklef> also yeah I
17:40:15miran"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:44GitDisc<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:17miranmaybe if i have different proc's for different sizes of input/output?
17:41:32FromGitter<Quelklef> @GitDisc I don't know but I'
17:41:49FromGitter<Quelklef> sorry, ...m guessing they don't use internal types just so that there's a simpler API
17:41:56YardanicopixelsOn takes 10% of time
17:42:05FromGitter<Quelklef> As for why it's seq[string] rather than string, idk
17:42:49Yardanicowait
17:42:54Yardanicohow many possible values are there?
17:42:59Yardanico. / and # ?
17:43:25Yardanicoah, it also has some => stuff
17:43:36YardanicoI just mean
17:43:45Yardanicothat if you only have . and #
17:43:49Yardanicoyou can store them as a seq of bools
17:44:18miranbools is how i did it in python/numpy
17:44:30Yardanicodid you try arraymancer?
17:44:41Yardanico"numpy" is a bit of cheating because it's implemented in cython+ C:)
17:44:58Yardanicoor neo
17:45:13miranYardanico: i haven't (yet), but i would try to do this without it/them
17:45:48mirani would like to explore what are the bottlenecks and how to fix them
17:46:27miranfor some other days i found out how insanely quicker are arrays compared to tables
17:48:20*yglukhov joined #nim
17:48:22miranYardanico: your opinion about arrays vs seqs here? would it make a noticeable difference?
17:48:43Yardanicowell 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:27Yardanicohmm, I really suggest you to make a forum post :)
18:00:31FromGitter<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:37FromGitter<RedBeard0531> Also if generic assign perf is the issue try compiling with --gc:merchandiser
18:01:50FromGitter<RedBeard0531> Err markandsweep
18:02:03FromGitter<RedBeard0531> Autocorrect...
18:05:04miranthanks RedBeard! how long does it take you to run part 2?
18:07:50miranjust 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:03Yardanicomaybe because it's in debug mode?
18:09:21Yardanicoor wait
18:09:27Yardanicodo you need to actually output the grid or no?
18:09:31mirannope
18:09:48mirani changed that part of his code
18:11:34miranYardanico: any luck with arrays?
18:11:41Yardanicono :(
18:11:58miranok, i'll make forum post then....
18:16:45FromGitter<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:50dom96miran: try wrapping in a proc main() = ...
18:23:57Yardanicooh, yeah
18:24:02Yardanicothis trick sometimes helps a lot :P
18:24:22FromGitter<mratsim> arrays are good if you have a fixed size known at compile time or at least a max size
18:24:34FromGitter<Quelklef> why's the main trick help efficiency?
18:24:40Yardanicobecause there would be no globals
18:24:46FromGitter<mratsim> because Nim doesn’t optimize what is in the global scope
18:24:58FromGitter<Quelklef> a global isn't just a "top-level local"?
18:25:23miranposted a thread on the forum, now will try dom96's idea with main
18:25:29Yardanicohmm, this didn't help
18:26:20dom96also, this might help https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#profiling-your-code
18:28:05mirandom96: i profiled it but i don't know how to interpret it
18:28:20Yardanicojust see % of all calls
18:28:40miranhere are profile results: https://gist.github.com/anonymous/0a8153491c268dd2fcdb4733fb985d4d
18:28:53dom96NopeDK: A single HTTP header key can have multiple values.
18:29:21dom96Not sure why HttpHeaderValues isn't used
18:29:25dom96Guessing that was added separately
18:37:09FromGitter<RedBeard0531> I'd
18:37:45*mitescugd joined #nim
18:38:25FromGitter<RedBeard0531> I've been pretty happy using perf record/perf report for profiling on linux
18:39:23*S1t1Schu joined #nim
18:43:12GitDisc<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:30FromGitter<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:41Yardanicocode please? :)
18:48:01FromGitter<tim-st> var test = 0 ⏎ let test1 = 1 ⏎ case test ⏎ of test1: ⏎ echo "here1" ... [https://gitter.im/nim-lang/Nim?at=5a453c6129ec6ac3119390de]
18:49:21FromGitter<tim-st> when I replace test1 with the actual int value it works. That's strange
18:50:07FromGitter<Quelklef> `let` variables aren't known at compile time
18:50:11FromGitter<Quelklef> `const` variables are
18:50:17FromGitter<Quelklef> try `const test1 = 1`
18:50:56FromGitter<tim-st> I can't use const there :D it's the len value of a seq
18:51:14FromGitter<Quelklef> :o
18:51:44FromGitter<tim-st> But thanks for the answer, didn't know case construct was for const types only
18:52:15FromGitter<Quelklef> well I'm figuring that from the error "Cannot evaluate at compile time"
18:52:20FromGitter<Quelklef> on google now to see if it's in the docs...
18:53:43FromGitter<Quelklef> It's not specified in https://nim-lang.org/docs/tut1.html#control-flow-statements-case-statement
18:55:11Araqand worse, https://nim-lang.org/docs/manual.html#statements-and-expressions-case-statement is silent about it too
18:55:38Araqanyway, the values in the 'of' branches must be compile-time values
18:55:48FromGitter<tim-st> Ok, thanks!
18:56:03subsetparkYes, that's something that's quite natural to internalize, but definitely worth mentioning in the manual
18:56:36dom96ugh, it annoys me that font awesome doesn't have common things like Discord icons.
18:57:51dom96huh, apparently it is there
18:57:55FromGitter<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:25FromGitter<Quelklef> case statements do more than if statements
18:58:33FromGitter<Quelklef> they require all cases to be covered
18:58:33Araqcase is not sugar for 'if', it's about enumerating all the cases.
18:58:45FromGitter<Quelklef> which is, I assume, why it's compile-time only
18:58:58FromGitter<Quelklef> yeah what @Araq said
18:59:00Yardanicotim-st: case statement also ensures that all cases are covered
18:59:10Araqand also a bit about producing faster code but decent optimizers can do without
18:59:11subsetparkThere'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:14FromGitter<tim-st> Ok, yes. Now it's obvious :D
18:59:33FromGitter<tim-st> Thanks for the answers!
19:07:06FromGitter<data-man> Can be implemented the case macros for runtime values? ;-)
19:07:22Yardanicobut why would you need it then ? :)
19:07:35Yardanicoyou can have almost the same syntax with if's
19:09:08FromGitter<data-man> Syntax honey
19:15:15*Gertm quit (Quit: ZNC - http://znc.in)
19:16:06*Gertm joined #nim
19:23:23vivusdom96: is there anything new/exciting happening in nim-web land?
19:24:02dom96karax :)
19:30:25livcdAll things considered which db driver would you consider the most stable / featureful ?
19:30:29GitDisc<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:36Yardanicono
19:30:40Yardanicobecause of a VM bug
19:34:05GitDisc<NopeDK> So it might become available in the future?
19:34:42Araqit should be but an approach like strscans is superior
19:37:52Araqlivcd: the db_ drivers have problems with NULL that we need to fix for v1 but apart from that are stable
19:37:57FromGitter<data-man> @Araq: Maybe to add $h, $o and $b for parsing a hex, oct & bin numbers?
19:38:44FromGitter<data-man> I know about a user defined matchers :-)
19:39:14AraqPRs are welcome
19:40:07GitDisc<NopeDK> Why is the strscans approach superior?
19:42:10vivusAraq: when does nim get nim-dapp/nim-blockchain like Red lang ;)
19:42:24*nsf quit (Quit: WeeChat 2.0.1)
19:43:17AraqNopeDK because the parsing is done at compile-time and it produces much more efficient code
19:43:27dom96Is that a good idea? I saw a lot of complaints on HN
19:43:44dom96(Regarding nim dapp)
19:43:48Araqvivus: what is 'dapp' and 'blockchain'?
19:44:43vivusdom96: was mostly a joke :P
19:44:59vivusdapp = distributed application
19:45:13noonienwhat's a distributed application?>
19:45:15Araqkarax+ormin fits the bill
19:45:32vivuswhat's a computer?
19:45:50nooniena computer is a machine that computes
19:46:18dom96what's a computes?
19:47:16Araqoh it's one of these days -- everybody drunk here
19:48:51noonieni'm genuinely curious what a distributed application is
19:49:19*dom96 moved nim-lang.org to fontawesome 5
19:49:26dom96Hope this doesn't break anything :)
19:49:34noonienfirst 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:52noonienwhich sounds like retardese
19:50:19dom96New article! https://nim-lang.org/blog/2017/12/28/nim-in-2017-a-short-recap.html
19:51:05livcdAraq: what are the problems with NULL ?
19:51:09dom96Time to submit to HN and Reddit :)
19:51:50dom96https://news.ycombinator.com/newest
19:52:04GitDisc<joshi77> @gooro0
19:52:16GitDisc<joshi77> uhm
19:58:09*claudiuinberlin joined #nim
20:01:39GitDisc<NopeDK> Araq, thanks. Can strscans handle something like the following and split it correctly?
20:01:39GitDisc<NopeDK> ( -a -b=1 -c:2 -d="3" -e="\"" -f:" \" -a:1 " -g:done -h={y} )
20:01:39GitDisc<NopeDK> producing something like
20:01:39GitDisc<NopeDK> @["-a", "-b=1", ..., "-f:\" \\\" -a:1 \"", "-g:done", "-h={y}]
20:02:19GitDisc<NopeDK> Damnit, it removed my \ 's
20:04:16GitDisc<joshi77> Can someone tell me how to fix this
20:04:18GitDisc<NopeDK> Oh, it worked on the IRC side (and newlines in discord apparently spams IRC, my bad)
20:04:26GitDisc<joshi77>
20:04:26GitDisc<joshi77> https://cdn.discordapp.com/attachments/371759389889003532/396030653935910913/image.png
20:04:51GitDisc<joshi77> or where do you put a downloaded package file
20:04:54Yardanicoyou need to install git for windows
20:05:03Yardanicohttps://git-scm.com/download/win
20:05:18GitDisc<joshi77> so it isn't github?
20:05:24Yardanicowhat do you mean?
20:05:35GitDisc<joshi77> nevermind ahm but what does the downloading thing actually do
20:05:40GitDisc<joshi77> lets say I want to do it manually
20:05:52Yardanicoinstall git in your path
20:05:55dom96https://github.com/nim-lang/sdl2
20:05:57Yardanicoto be able to clone git projects
20:05:59dom96Click download button
20:06:05dom96"Download zip"
20:06:06dom96unpack
20:06:10dom96cd into the directory
20:06:13dom96and run `nimble install`
20:06:19dom96And you'll have the same result
20:06:33GitDisc<joshi77> oh
20:06:42GitDisc<joshi77>
20:06:42GitDisc<joshi77> https://cdn.discordapp.com/attachments/371759389889003532/396031224818434058/image.png
20:06:44Yardanicobut you will need to do the same for EVERY nimble package
20:06:45GitDisc<joshi77> It worked thanks
20:06:56dom96yeah, you should just install 'git'
20:09:25*Vladar quit (Quit: Leaving)
20:10:56GitDisc<joshi77> uh now its missing sdl2.dll
20:11:01Yardanicoyeah
20:11:02GitDisc<joshi77> for the compiled exe
20:11:06Yardanicoyou need to download sdl2 separately
20:11:15GitDisc<joshi77> uh
20:11:17Yardanicohttps://www.libsdl.org/download-2.0.php
20:11:30subsetpark> myCounter = mySeq.toCountTable() - yesss
20:11:45GitDisc<joshi77> thx again
20:14:06FromGitter<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:46federico3is there a way to import a define from a header file and use it at compile time?
20:16:13federico3https://github.com/nim-lang/Nim/issues/4441 aha
20:17:05dom96ooh, nice find :)
20:17:20dom96Gonna add a doc label to that
20:17:32federico3c2nim should do that for us
20:23:34subsetparktim-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:41FromGitter<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:56Yardanicouse marshal?
20:26:09Yardanicoto dump/load variables to/from files
20:28:19FromGitter<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:40FromGitter<Quelklef> @tim-st I can't imagine a table would be quicker than a case statement
20:30:42FromGitter<data-man> https://github.com/nim-lang/Nim/pull/6985 - more parsers :)
20:32:08*Yardanico quit (Quit: Quitting...)
20:34:28GitDisc<joshi77> and where do I find sdl2 dll 😮
20:34:43*Yardanico joined #nim
20:38:11GitDisc<joshi77> nvm
20:42:37dom96heh, so I just saw first-hand that my link didn't get to the front page with 4 upvotes
20:42:39dom96whereas another one did
20:43:04dom96sucks, but it seems nim-lang.org has a negative penalty on HN
20:45:52GitDisc<NopeDK> Time to use url shorteners and bypass the wall ;)
20:48:05FromGitter<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:41FromGitter<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:48FromGitter<Quelklef> Can you send me the code?
20:51:20*xet7 quit (Quit: Leaving)
20:52:26FromGitter<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:38FromGitter<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:35GitDisc<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:27GitDisc<NopeDK> Or would you need to do the workaround of staticRead -> emit -> importc?
21:10:21FromGitter<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:21FromGitter<Quelklef> By that logic, maps should only be as fast as switch statements
21:11:35FromGitter<Quelklef> where did you read this, too? I'm curious about this whole thing
21:11:57*nsf joined #nim
21:12:08FromGitter<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:49FromGitter<tim-st> or atleast they should be nearly the same
21:13:22FromGitter<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:08FromGitter<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:41FromGitter<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:19FromGitter<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:02FromGitter<tekjar> @RedBeard0531 How will that make `NU32` `long unsigned int`?
21:31:32FromGitter<RedBeard0531> RT it will make it an alias for uint32_t
21:32:33FromGitter<RedBeard0531> Which you say is unsigned long on your system
21:36:30*xet7 joined #nim
21:36:41FromGitter<tekjar> @RedBeard0531 Oh yeah sorry. Is this common convention to use -D HAVE_STDINT_H while cross compiling?
21:39:00FromGitter<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:55FromGitter<tekjar> @RedBeard0531 mmm..that works..So my f3discovery led roulette works out of the box..thanks
21:42:04FromGitter<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:41FromGitter<zacharycarter> does anyone know how to get https://github.com/SFML/CSFML to successfully compile?
21:56:31*iAmSlow joined #nim
21:58:06iAmSlowanyone tryed numix
21:58:07iAmSlowcould not load: libSDL2.so
21:58:36iAmSlowam i missing some libs in my system
21:58:49iAmSlowi think its probbaly that, duno why i even ask
22:00:53FromGitter<zacharycarter> what is numix?
22:01:02iAmSlowlibsdl2-2.0-0 is already the newest version (2.0.4+dfsg1-2ubuntu2).
22:01:14iAmSlowsorry mispeld
22:01:18iAmSlowhttps://github.com/yglukhov/nimx/issues
22:01:21iAmSlownimx
22:01:35dom96zacharycarter: why are you trying to compile it?
22:01:59FromGitter<zacharycarter> dom96: I want to strip out everything besides the windowing and input code
22:02:07FromGitter<zacharycarter> and use it for a new project
22:02:09iAmSlowyey it works now
22:02:16FromGitter<zacharycarter> \o/
22:02:19iAmSlowinstalled all libsdl2*
22:02:37iAmSlowtought duno why it depends on it and other gtk stuff dosent
22:02:46FromGitter<zacharycarter> it shouldn't
22:03:56*yglukhov quit (Remote host closed the connection)
22:05:27iAmSlowit dient work unitl i istalled those other libs, shoud i post github issue?
22:05:32iAmSlow*create
22:06:31FromGitter<zacharycarter> no
22:07:11dom96what other libs did you install?
22:07:16iAmSlowme?
22:07:20dom96yes
22:07:58iAmSlowi did sudo apt-get install libsdl2* so i have list of 20
22:08:05iAmSlowcan hastebin
22:08:41dom96sure
22:08:56iAmSlowhttps://hastebin.com/vamuzivovi.sql
22:09:18iAmSlowstupit ubuntu void is 10 time better
22:09:28dom96you probably just need the -dev packages
22:09:30dom96i.e. libsdl2-dev
22:09:32FromGitter<zacharycarter> you need libsdl2-dev
22:09:32FromGitter<zacharycarter> yeah
22:09:34FromGitter<zacharycarter> exactly
22:10:04iAmSlowoh right
22:10:06iAmSlowi am tard
22:10:20iAmSlowfrogot i need -dev libs when compiling
22:10:46iAmSlowmy bad sorry
22:10:59iAmSlowbut it dident give me error while i was compiling
22:11:01iAmSlowhmm
22:11:16iAmSlowonly when i tryed to run
22:15:13*Trustable quit (Remote host closed the connection)
22:15:59FromGitter<zacharycarter> what's the error?
22:16:55dom96it is odd that the -dev package is needed tbh
22:16:55iAmSlowhmm i am retard
22:16:56iAmSlowcould not load: libSDL2.so
22:16:57iAmSlowcompile with -d:nimDebugDlOpen for more information
22:17:14iAmSlowit even told me to "compile with -d:nimDebugDlOpen for more information"
22:19:33dom96Don't blame yourself
22:19:45dom96That wouldn't give much useful info
22:25:06Araqmach es wie die Sonnenuhr, zähl die heiteren Stunden nur
22:26:44iAmSlowsprehezni almond non xD
22:27:30Araqwhat language is that? I understood it :P
22:28:42Araq"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:50FromGitter<Yardanico> lol, if I type "yard" in google, it gives 'yardanico' at 8th place (instant suggestions)
22:35:09FromGitter<Yardanico> hard work on changing nicknames everywhere :D
22:35:28FromGitter<Yardanico> ah, it doesn't work on english google :(
22:50:30*lukoko joined #nim
22:55:55GitDisc<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:57AraqI think the answer is yes to all of your questions.
23:06:43GitDisc<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:17GitDisc<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:21FromGitter<data-man> @Yardanico: clear a cookies :)
23:09:46FromGitter<data-man> And Web storage
23:17:34*xet7 joined #nim
23:20:02*nsf quit (Quit: WeeChat 2.0.1)
23:21:51Araqdunno, NopeDK, I doubt it.
23:23:31GitDisc<NopeDK> :( Thanks Araq
23:24:51Araquse 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:55GitDisc<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:32YardanicoYes you can do that
23:29:51YardanicoI mean you can store file content in constants
23:33:04GitDisc<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:04GitDisc<NopeDK> instead of reading it to a const and then just importc the const as if it were a file.
23:34:19YardanicoYou can as well use Enigma VirtualBox :)
23:34:32YardanicoIt's freeware
23:36:34*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
23:42:14GitDisc<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:14GitDisc<NopeDK> const f = VirtualFile(staticRead("file"))
23:42:15GitDisc<NopeDK> let c = readBuffer(f)
23:42:15GitDisc<NopeDK> If endOfFile(f):
23:42:15GitDisc<NopeDK> Echo "done"
23:42:15GitDisc<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:47GitDisc<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:44dom96add ~/.nimble/bin/ to your PATH
23:51:14dom96You might need to run VS Code from your terminal or restart your machine for the PATH changes to apply